diff --git a/.gitignore b/.gitignore index f9155eaedd8dd915775ef119335aa04dbd9de47e..eb2474a3f76eb749366907b7d5cb2b6478b67e2b 100644 --- a/.gitignore +++ b/.gitignore @@ -26,6 +26,9 @@ /data/pages/* /data/tmp/* /lib/tpl/* +!/lib/tpl/default +!/lib/tpl/dokuwiki +!/lib/tpl/index.php /lib/plugins/* !/lib/plugins/acl !/lib/plugins/config @@ -34,6 +37,7 @@ !/lib/plugins/popularity !/lib/plugins/revert !/lib/plugins/safefnrecode +!/lib/plugins/testing !/lib/plugins/usermanager !/lib/plugins/action.php !/lib/plugins/admin.php diff --git a/_test/README b/_test/README index 099290a0dbea6058b95c85c1ab3e571a46a8d93a..a4206f48930f668eff0f12d060bbe68157d220aa 100644 --- a/_test/README +++ b/_test/README @@ -1,84 +1,82 @@ --------------------------------------------------------------------------------- - Dokuwiki Unit Test Suite --------------------------------------------------------------------------------- -$Date: 2004/02/14 02:14:50 $ - -Credits: to the WACT team - http://www.phpwact.org, from whom the basis of -this test suite was stolen - --------------------------------------------------------------------------------- -INSTALLING & SETUP - -1. Grab a copy of the SimpleTest unit testing framework an extract somewhere - - http://www.lastcraft.com/simple_test.php - or - http://sourceforge.net/projects/simpletest - -2. Edit ./tests.ini - - - TEST_ENABLED - set to "1" to allow the test suite to be used - by vistors to your site. Generally best to leave as 0 for - a productive site - running tests alot will hammer the server - Note: you will still be able to run the tests from the command - line even when this is set to 0 - - - WEB_TEST_URL - this is for running "web tests" where SimpleTest - acts as a web browser and executes HTTP requests against pages. - Should point at your Dokuwiki URL e.g. - - http://localhost/dokuwiki - - - PROXY - if you're behind a proxy, specify it here - Note: username / password are optional e.g. - - http://proxyuser:proxypwd@proxy.yourdomain.com:8080 - - - REMOTE_TEST_URL - it's possible to run the full test suite - remotely (over HTTP) with some XML goodness. This should - point at the URL of the test suite you want to test - See the following URL for more info; - http://www.sitepoint.com/blogs/2004/06/15/simple-test-remote-testing/ - - - Simple Test - Update the library_path to point at the directory where you installed - Simple Test - --------------------------------------------------------------------------------- -RUNNING THE TESTS - -You can run the tests in three ways. From the command line: - - $ ./runtests.php -h - -Using a web browser; - - http://localhost/dokuwiki/_test/index.php - -As remote tests run on a remote serveri (specified in tests.ini with REMOTE_TEST_URL) and driven locally from the command line using; - - $ ./remotetests.php -h - - --------------------------------------------------------------------------------- -ADDING TESTS - -The test cases are kept in the './cases' directory in a directory structure -mirroring that of the Dokuwiki's - -Files with the extension .group.php are group tests (collections of -one or more seperate unit test files) - there should be one group -test per file in Dokuwiki's real directory. - -Individual tests files have the extension .test.php - -To add tests, create a .test.php file in the correct directory under ./cases -Probably best to use one of the existing scripts as a basis - -The test will not be executable via one of the test runners (see above). - -To add it to a group of tests, modify the corresponding .group.php file. - -One exception to the naming convention - files named .webtest.php and -.webgroup.php are run using SimpleTest's browser simulator. - +====== DokuWiki Test Suite ====== + +This is the test suit to automatically test various parts of DokuWiki. + +===== Requirements ===== + + * PHPUnit 3.6.10+ http://www.phpunit.de/ + * PHP 5.3+ http://www.php.net + +===== PHPUnit Installation ====== + +via PEAR: + + pear config-set auto_discover 1 + pear upgrade + pear install pear.phpunit.de/PHPUnit + +on Windows: + + FIXME + + +===== Running all Tests ===== + +Just change to the ''_test'' directory and run phpunit: + + cd _testing/ + phpunit + +PHPUnit will fail on some systems with a //headers already sent// error. +This is a known problem with PHPUnit, the error can be avoided by passing the +'--stderr' flag to phpunit: + + phpunit --stderr + +On windows you may have to enable OpenSSL support for https tests. +Some of them point to httpclient_http.tests.php on the failure. +To enable HTTPS support copy the ''libeay32.dll'' and ''ssleay32.dll'' to your ''windows\system32'' folder +and add the following line to your php.ini in the extension section: +<code ini> +extension=php_openssl.dll +</code> + +===== Running selected Tests ===== + +You can run a single test file by providing it as an argument to phpunit: + + phpunit --stderr tests/inc/common_cleanText.test.php + +You can also use groups to exclude certain test from running. For example use +the following command to avoid long running test or tests accessing the +Internet. + + phpunit --stderr --exclude-group slow,internet + +===== Create new Tests ===== + +To create a test for DokuWiki, create a *.test.php file within the tests/ +folder. Please respect the folder structure and naming convention. Inside the +file, implement a class, extending 'DokuWikiTest'. Every method, starting +with 'test' will be called as a test (e.g. 'testIfThisIsValid'); + + +===== TODO for the test framework ===== + + * test cross platform compatibility: especially test windows + * update http://www.dokuwiki.org/devel:unittesting + * optional: add helper methods to TestRequest for easy form submission + * createForm(), ... + * check PHP Unit test_helpers https://github.com/sebastianbergmann/php-test-helpers + + +===== Migration Protocol ===== + +The following tests were not migrated: + + * inc/indexer_idx_indexlengths (fs dependencies) + * inc/mail_send (integration test) + * inc/parser/parser_formatting + * inc/parser/xhtml_htmlphp (runkit) + * inc/parser/xhtml_links + diff --git a/_test/bootstrap.php b/_test/bootstrap.php new file mode 100644 index 0000000000000000000000000000000000000000..6c3d6aaa8888953308a84e75dc72f41ae32f346c --- /dev/null +++ b/_test/bootstrap.php @@ -0,0 +1,107 @@ +<?php +/** + * Test Suite bootstrapping for DokuWiki + */ + +if(!defined('DOKU_UNITTEST')) define('DOKU_UNITTEST',dirname(__FILE__).'/'); +require_once DOKU_UNITTEST.'core/phpQuery-onefile.php'; +require_once DOKU_UNITTEST.'core/DokuWikiTest.php'; +require_once DOKU_UNITTEST.'core/TestResponse.php'; +require_once DOKU_UNITTEST.'core/TestRequest.php'; +require_once DOKU_UNITTEST.'core/TestUtils.php'; + + +// backward compatibility to old test suite +define('SIMPLE_TEST', true); + +// basic behaviours +error_reporting(E_ALL); +set_time_limit(0); +ini_set('memory_limit','2048M'); + +// prepare temporary directories +define('DOKU_INC', dirname(dirname(__FILE__)).'/'); +define('TMP_DIR', sys_get_temp_dir().'/dwtests-'.microtime(true)); +define('DOKU_CONF', TMP_DIR.'/conf/'); +define('DOKU_TMP_DATA', TMP_DIR.'/data/'); + +// default plugins +$default_plugins = array( + 'acl', + 'config', + 'info', + 'plugin', + 'popularity', + 'revert', + 'safefnrecode', + 'usermanager' +); + +// default server variables +$default_server_vars = array( + 'QUERY_STRING' => '?id=', + 'REQUEST_METHOD' => 'GET', + 'CONTENT_TYPE' => '', + 'CONTENT_LENGTH' => '', + 'SCRIPT_NAME' => '/doku.php', + 'REQUEST_URI' => '/doku.php?id=', + 'DOCUMENT_URI' => '/doku.php', + 'DOCUMENT_ROOT' => DOKU_INC, + 'SERVER_PROTOCOL' => 'HTTP/1.1', + 'SERVER_SOFTWARE' => 'nginx/0.7.67', + 'REMOTE_ADDR' => '87.142.120.6', + 'REMOTE_PORT' => '21418', + 'SERVER_ADDR' => '46.38.241.24', + 'SERVER_PORT' => '443', + 'SERVER_NAME' => 'wiki.example.com', + 'REDIRECT_STATUS' => '200', + 'SCRIPT_FILENAME' => DOKU_INC.'doku.php', + 'HTTP_HOST' => 'wiki.example.com', + 'HTTP_USER_AGENT' => 'Mozilla/5.0 (X11; OpenBSD amd64; rv:11.0) Gecko/20100101 Firefox/11.0', + 'HTTP_ACCEPT' => 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8', + 'HTTP_ACCEPT_LANGUAGE' => 'en-us,en;q=0.5', + 'HTTP_ACCEPT_ENCODING' => 'gzip, deflate', + 'HTTP_CONNECTION' => 'keep-alive', + 'HTTP_CACHE_CONTROL' => 'max-age=0', + 'PHP_SELF' => '/doku.php', + 'REQUEST_TIME' => time(), +); + +// create temp directories +mkdir(TMP_DIR); + +// cleanup dir after exit +if (getenv('PRESERVE_TMP') != 'true') { + register_shutdown_function(function() { + TestUtils::rdelete(TMP_DIR); + }); +} else { + echo ">>>> Preserving temporary directory: ".TMP_DIR."\n"; +} + +// populate default dirs +TestUtils::rcopy(TMP_DIR, DOKU_INC.'/conf'); +TestUtils::rcopy(TMP_DIR, dirname(__FILE__).'/conf'); +TestUtils::rcopy(TMP_DIR, dirname(__FILE__).'/data'); + +// disable all non-default plugins by default +$dh = dir(DOKU_INC.'lib/plugins/'); +while (false !== ($entry = $dh->read())) { + if ($entry == '.' || $entry == '..') { + continue; + } + + if (!is_dir(DOKU_INC.'lib/plugins/'.$entry)) { + continue; + } + + if (!in_array($entry, $default_plugins)) { + // disable this plugin + TestUtils::fappend(DOKU_CONF.'plugins.local.php', "\$plugins['$entry'] = 0;\n"); + } +} +$dh->close(); + +// load dw +require_once(DOKU_INC.'inc/init.php'); + diff --git a/_test/cases/inc/DifferenceEngine.test.php b/_test/cases/inc/DifferenceEngine.test.php deleted file mode 100644 index aa1756114ba71691a1b8941c899b480b71729db2..0000000000000000000000000000000000000000 --- a/_test/cases/inc/DifferenceEngine.test.php +++ /dev/null @@ -1,31 +0,0 @@ -<?php -require_once DOKU_INC.'inc/DifferenceEngine.php'; - -class differenceengine_test extends UnitTestCase { - - function test_white_between_words(){ - // From FS#2161 - global $lang; - - $df = new Diff(explode("\n","example"), - explode("\n","example example2")); - - $idf = new InlineDiffFormatter(); - $tdf = new TableDiffFormatter(); - - $this->assertEqual($idf->format($df), '<tr><td colspan="4" class="diff-blockheader">@@ ' . $lang['line'] . - ' -1 +1 @@ <span class="diff-deletedline"><del>' . $lang['deleted'] . - '</del></span> <span class="diff-addedline">' . $lang['created'] . - '</span></td></tr> - -<tr><td colspan="4">example <span class="diff-addedline">example2</span></td></tr> -'); - $this->assertEqual($tdf->format($df), - '<tr><td class="diff-blockheader" colspan="2">' . $lang['line'] . ' 1:</td> -<td class="diff-blockheader" colspan="2">' . $lang['line'] . ' 1:</td> -</tr> -<tr><td>-</td><td class="diff-deletedline">example</td><td>+</td><td class="diff-addedline">example <strong>example2</strong></td></tr> -'); - } -} -//Setup VIM: ex: et ts=4 : diff --git a/_test/cases/inc/auth_aclcheck.test.php b/_test/cases/inc/auth_aclcheck.test.php deleted file mode 100644 index ff092c2de4658ad8e954b2de5723aa7a59eafb64..0000000000000000000000000000000000000000 --- a/_test/cases/inc/auth_aclcheck.test.php +++ /dev/null @@ -1,231 +0,0 @@ -<?php - -require_once DOKU_INC.'inc/init.php'; -require_once DOKU_INC.'inc/auth.php'; - -class auth_acl_test extends UnitTestCase { - - function teardown() { - global $conf; - global $AUTH_ACL; - unset($conf); - unset($AUTH_ACL); - - } - - function test_restricted(){ - global $conf; - global $AUTH_ACL; - $conf['superuser'] = 'john'; - $conf['useacl'] = 1; - - $AUTH_ACL = array( - '* @ALL 0', - '* @user 8', - ); - - // anonymous user - $this->assertEqual(auth_aclcheck('page', '',array()), AUTH_NONE); - $this->assertEqual(auth_aclcheck('namespace:page','',array()), AUTH_NONE); - $this->assertEqual(auth_aclcheck('namespace:*', '',array()), AUTH_NONE); - - // user with no matching group - $this->assertEqual(auth_aclcheck('page', 'jill',array('foo')), AUTH_NONE); - $this->assertEqual(auth_aclcheck('namespace:page','jill',array('foo')), AUTH_NONE); - $this->assertEqual(auth_aclcheck('namespace:*', 'jill',array('foo')), AUTH_NONE); - - // user with matching group - $this->assertEqual(auth_aclcheck('page', 'jill',array('foo','user')), AUTH_UPLOAD); - $this->assertEqual(auth_aclcheck('namespace:page','jill',array('foo','user')), AUTH_UPLOAD); - $this->assertEqual(auth_aclcheck('namespace:*', 'jill',array('foo','user')), AUTH_UPLOAD); - - // super user - $this->assertEqual(auth_aclcheck('page', 'john',array('foo')), AUTH_ADMIN); - $this->assertEqual(auth_aclcheck('namespace:page','john',array('foo')), AUTH_ADMIN); - $this->assertEqual(auth_aclcheck('namespace:*', 'john',array('foo')), AUTH_ADMIN); - } - - function test_restricted_ropage(){ - global $conf; - global $AUTH_ACL; - $conf['superuser'] = 'john'; - $conf['useacl'] = 1; - - $AUTH_ACL = array( - '* @ALL 0', - '* @user 8', - 'namespace:page @user 1', - ); - - // anonymous user - $this->assertEqual(auth_aclcheck('page', '',array()), AUTH_NONE); - $this->assertEqual(auth_aclcheck('namespace:page','',array()), AUTH_NONE); - $this->assertEqual(auth_aclcheck('namespace:*', '',array()), AUTH_NONE); - - // user with no matching group - $this->assertEqual(auth_aclcheck('page', 'jill',array('foo')), AUTH_NONE); - $this->assertEqual(auth_aclcheck('namespace:page','jill',array('foo')), AUTH_NONE); - $this->assertEqual(auth_aclcheck('namespace:*', 'jill',array('foo')), AUTH_NONE); - - // user with matching group - $this->assertEqual(auth_aclcheck('page', 'jill',array('foo','user')), AUTH_UPLOAD); - $this->assertEqual(auth_aclcheck('namespace:page','jill',array('foo','user')), AUTH_READ); - $this->assertEqual(auth_aclcheck('namespace:*', 'jill',array('foo','user')), AUTH_UPLOAD); - - // super user - $this->assertEqual(auth_aclcheck('page', 'john',array('foo')), AUTH_ADMIN); - $this->assertEqual(auth_aclcheck('namespace:page','john',array('foo')), AUTH_ADMIN); - $this->assertEqual(auth_aclcheck('namespace:*', 'john',array('foo')), AUTH_ADMIN); - } - - function test_aclexample(){ - global $conf; - global $AUTH_ACL; - $conf['superuser'] = 'john'; - $conf['useacl'] = 1; - - $AUTH_ACL = array( - '* @ALL 4', - '* bigboss 16', - 'start @ALL 1', - 'marketing:* @marketing 8', - 'devel:* @ALL 0', - 'devel:* @devel 8', - 'devel:* bigboss 16', - 'devel:funstuff bigboss 0', - 'devel:* @marketing 1', - 'devel:marketing @marketing 2', - ); - - - $this->assertEqual(auth_aclcheck('page', '' ,array()) , AUTH_CREATE); - $this->assertEqual(auth_aclcheck('page', 'bigboss' ,array('foo')) , AUTH_DELETE); - $this->assertEqual(auth_aclcheck('page', 'jill' ,array('marketing')) , AUTH_CREATE); - $this->assertEqual(auth_aclcheck('page', 'jane' ,array('devel')) , AUTH_CREATE); - - $this->assertEqual(auth_aclcheck('start', '' ,array()) , AUTH_READ); - $this->assertEqual(auth_aclcheck('start', 'bigboss' ,array('foo')) , AUTH_READ); - $this->assertEqual(auth_aclcheck('start', 'jill' ,array('marketing')) , AUTH_READ); - $this->assertEqual(auth_aclcheck('start', 'jane' ,array('devel')) , AUTH_READ); - - $this->assertEqual(auth_aclcheck('marketing:page', '' ,array()) , AUTH_CREATE); - $this->assertEqual(auth_aclcheck('marketing:page', 'bigboss' ,array('foo')) , AUTH_DELETE); - $this->assertEqual(auth_aclcheck('marketing:page', 'jill' ,array('marketing')) , AUTH_UPLOAD); - $this->assertEqual(auth_aclcheck('marketing:page', 'jane' ,array('devel')) , AUTH_CREATE); - - - $this->assertEqual(auth_aclcheck('devel:page', '' ,array()) , AUTH_NONE); - $this->assertEqual(auth_aclcheck('devel:page', 'bigboss' ,array('foo')) , AUTH_DELETE); - $this->assertEqual(auth_aclcheck('devel:page', 'jill' ,array('marketing')) , AUTH_READ); - $this->assertEqual(auth_aclcheck('devel:page', 'jane' ,array('devel')) , AUTH_UPLOAD); - - $this->assertEqual(auth_aclcheck('devel:funstuff', '' ,array()) , AUTH_NONE); - $this->assertEqual(auth_aclcheck('devel:funstuff', 'bigboss' ,array('foo')) , AUTH_NONE); - $this->assertEqual(auth_aclcheck('devel:funstuff', 'jill' ,array('marketing')) , AUTH_READ); - $this->assertEqual(auth_aclcheck('devel:funstuff', 'jane' ,array('devel')) , AUTH_UPLOAD); - - $this->assertEqual(auth_aclcheck('devel:marketing', '' ,array()) , AUTH_NONE); - $this->assertEqual(auth_aclcheck('devel:marketing', 'bigboss' ,array('foo')) , AUTH_DELETE); - $this->assertEqual(auth_aclcheck('devel:marketing', 'jill' ,array('marketing')) , AUTH_EDIT); - $this->assertEqual(auth_aclcheck('devel:marketing', 'jane' ,array('devel')) , AUTH_UPLOAD); - - } - - function test_multiadmin_restricted(){ - global $conf; - global $AUTH_ACL; - $conf['superuser'] = 'john,@admin,doe,@roots'; - $conf['useacl'] = 1; - - $AUTH_ACL = array( - '* @ALL 0', - '* @user 8', - ); - - // anonymous user - $this->assertEqual(auth_aclcheck('page', '',array()), AUTH_NONE); - $this->assertEqual(auth_aclcheck('namespace:page','',array()), AUTH_NONE); - $this->assertEqual(auth_aclcheck('namespace:*', '',array()), AUTH_NONE); - - // user with no matching group - $this->assertEqual(auth_aclcheck('page', 'jill',array('foo')), AUTH_NONE); - $this->assertEqual(auth_aclcheck('namespace:page','jill',array('foo')), AUTH_NONE); - $this->assertEqual(auth_aclcheck('namespace:*', 'jill',array('foo')), AUTH_NONE); - - // user with matching group - $this->assertEqual(auth_aclcheck('page', 'jill',array('foo','user')), AUTH_UPLOAD); - $this->assertEqual(auth_aclcheck('namespace:page','jill',array('foo','user')), AUTH_UPLOAD); - $this->assertEqual(auth_aclcheck('namespace:*', 'jill',array('foo','user')), AUTH_UPLOAD); - - // super user john - $this->assertEqual(auth_aclcheck('page', 'john',array('foo')), AUTH_ADMIN); - $this->assertEqual(auth_aclcheck('namespace:page','john',array('foo')), AUTH_ADMIN); - $this->assertEqual(auth_aclcheck('namespace:*', 'john',array('foo')), AUTH_ADMIN); - - // super user doe - $this->assertEqual(auth_aclcheck('page', 'doe',array('foo')), AUTH_ADMIN); - $this->assertEqual(auth_aclcheck('namespace:page','doe',array('foo')), AUTH_ADMIN); - $this->assertEqual(auth_aclcheck('namespace:*', 'doe',array('foo')), AUTH_ADMIN); - - // user with matching admin group - $this->assertEqual(auth_aclcheck('page', 'jill',array('foo','admin')), AUTH_ADMIN); - $this->assertEqual(auth_aclcheck('namespace:page','jill',array('foo','admin')), AUTH_ADMIN); - $this->assertEqual(auth_aclcheck('namespace:*', 'jill',array('foo','admin')), AUTH_ADMIN); - - // user with matching another admin group - $this->assertEqual(auth_aclcheck('page', 'jill',array('foo','roots')), AUTH_ADMIN); - $this->assertEqual(auth_aclcheck('namespace:page','jill',array('foo','roots')), AUTH_ADMIN); - $this->assertEqual(auth_aclcheck('namespace:*', 'jill',array('foo','roots')), AUTH_ADMIN); - } - - function test_multiadmin_restricted_ropage(){ - global $conf; - global $AUTH_ACL; - $conf['superuser'] = 'john,@admin,doe,@roots'; - $conf['useacl'] = 1; - - $AUTH_ACL = array( - '* @ALL 0', - '* @user 8', - 'namespace:page @user 1', - ); - - // anonymous user - $this->assertEqual(auth_aclcheck('page', '',array()), AUTH_NONE); - $this->assertEqual(auth_aclcheck('namespace:page','',array()), AUTH_NONE); - $this->assertEqual(auth_aclcheck('namespace:*', '',array()), AUTH_NONE); - - // user with no matching group - $this->assertEqual(auth_aclcheck('page', 'jill',array('foo')), AUTH_NONE); - $this->assertEqual(auth_aclcheck('namespace:page','jill',array('foo')), AUTH_NONE); - $this->assertEqual(auth_aclcheck('namespace:*', 'jill',array('foo')), AUTH_NONE); - - // user with matching group - $this->assertEqual(auth_aclcheck('page', 'jill',array('foo','user')), AUTH_UPLOAD); - $this->assertEqual(auth_aclcheck('namespace:page','jill',array('foo','user')), AUTH_READ); - $this->assertEqual(auth_aclcheck('namespace:*', 'jill',array('foo','user')), AUTH_UPLOAD); - - // super user john - $this->assertEqual(auth_aclcheck('page', 'john',array('foo')), AUTH_ADMIN); - $this->assertEqual(auth_aclcheck('namespace:page','john',array('foo')), AUTH_ADMIN); - $this->assertEqual(auth_aclcheck('namespace:*', 'john',array('foo')), AUTH_ADMIN); - - // super user doe - $this->assertEqual(auth_aclcheck('page', 'doe',array('foo')), AUTH_ADMIN); - $this->assertEqual(auth_aclcheck('namespace:page','doe',array('foo')), AUTH_ADMIN); - $this->assertEqual(auth_aclcheck('namespace:*', 'doe',array('foo')), AUTH_ADMIN); - - // user with matching admin group - $this->assertEqual(auth_aclcheck('page', 'jill',array('foo','admin')), AUTH_ADMIN); - $this->assertEqual(auth_aclcheck('namespace:page','jill',array('foo','admin')), AUTH_ADMIN); - $this->assertEqual(auth_aclcheck('namespace:*', 'jill',array('foo','admin')), AUTH_ADMIN); - - // user with matching another admin group - $this->assertEqual(auth_aclcheck('page', 'jill',array('foo','roots')), AUTH_ADMIN); - $this->assertEqual(auth_aclcheck('namespace:page','jill',array('foo','roots')), AUTH_ADMIN); - $this->assertEqual(auth_aclcheck('namespace:*', 'jill',array('foo','roots')), AUTH_ADMIN); - } - -} - -//Setup VIM: ex: et ts=4 : diff --git a/_test/cases/inc/auth_admincheck.test.php b/_test/cases/inc/auth_admincheck.test.php deleted file mode 100644 index 2a420ffd452d53ff775d68de4bde384031e978db..0000000000000000000000000000000000000000 --- a/_test/cases/inc/auth_admincheck.test.php +++ /dev/null @@ -1,132 +0,0 @@ -<?php - -require_once DOKU_INC.'inc/init.php'; -require_once DOKU_INC.'inc/auth.php'; -require_once DOKU_INC.'inc/auth/basic.class.php'; - -class auth_admin_test_AuthInSensitive extends auth_basic { - function isCaseSensitive(){ - return false; - } -} - -class auth_admin_test extends UnitTestCase { - - private $oldauth; - - function setup() { - global $auth; - $this->oldauth = $auth; - parent::setup(); - } - - function setSensitive() { - global $auth; - $auth = new auth_basic; - } - - function setInSensitive() { - global $auth; - $auth = new auth_admin_test_AuthInSensitive; - } - - function teardown() { - global $auth; - global $conf; - global $AUTH_ACL; - unset($conf); - unset($AUTH_ACL); - $auth = $this->oldauth; - parent::teardown(); - } - - function test_ismanager_insensitive(){ - $this->setInSensitive(); - global $conf; - $conf['superuser'] = 'john,@admin,@Mötly Görls, Dörte'; - $conf['manager'] = 'john,@managers,doe, @Mötly Böys, Dänny'; - - // anonymous user - $this->assertEqual(auth_ismanager('jill', null,false), false); - - // admin or manager users - $this->assertEqual(auth_ismanager('john', null,false), true); - $this->assertEqual(auth_ismanager('doe', null,false), true); - - $this->assertEqual(auth_ismanager('dörte', null,false), true); - $this->assertEqual(auth_ismanager('dänny', null,false), true); - - // admin or manager groups - $this->assertEqual(auth_ismanager('jill', array('admin'),false), true); - $this->assertEqual(auth_ismanager('jill', array('managers'),false), true); - - $this->assertEqual(auth_ismanager('jill', array('mötly görls'),false), true); - $this->assertEqual(auth_ismanager('jill', array('mötly böys'),false), true); - } - - function test_isadmin_insensitive(){ - $this->setInSensitive(); - global $conf; - $conf['superuser'] = 'john,@admin,doe,@roots'; - - // anonymous user - $this->assertEqual(auth_ismanager('jill', null,true), false); - - // admin user - $this->assertEqual(auth_ismanager('john', null,true), true); - $this->assertEqual(auth_ismanager('doe', null,true), true); - - // admin groups - $this->assertEqual(auth_ismanager('jill', array('admin'),true), true); - $this->assertEqual(auth_ismanager('jill', array('roots'),true), true); - $this->assertEqual(auth_ismanager('john', array('admin'),true), true); - $this->assertEqual(auth_ismanager('doe', array('admin'),true), true); - } - - function test_ismanager_sensitive(){ - $this->setSensitive(); - global $conf; - $conf['superuser'] = 'john,@admin,@Mötly Görls, Dörte'; - $conf['manager'] = 'john,@managers,doe, @Mötly Böys, Dänny'; - - // anonymous user - $this->assertEqual(auth_ismanager('jill', null,false), false); - - // admin or manager users - $this->assertEqual(auth_ismanager('john', null,false), true); - $this->assertEqual(auth_ismanager('doe', null,false), true); - - $this->assertEqual(auth_ismanager('dörte', null,false), false); - $this->assertEqual(auth_ismanager('dänny', null,false), false); - - // admin or manager groups - $this->assertEqual(auth_ismanager('jill', array('admin'),false), true); - $this->assertEqual(auth_ismanager('jill', array('managers'),false), true); - - $this->assertEqual(auth_ismanager('jill', array('mötly görls'),false), false); - $this->assertEqual(auth_ismanager('jill', array('mötly böys'),false), false); - } - - function test_isadmin_sensitive(){ - $this->setSensitive(); - global $conf; - $conf['superuser'] = 'john,@admin,doe,@roots'; - - // anonymous user - $this->assertEqual(auth_ismanager('jill', null,true), false); - - // admin user - $this->assertEqual(auth_ismanager('john', null,true), true); - $this->assertEqual(auth_ismanager('Doe', null,true), false); - - // admin groups - $this->assertEqual(auth_ismanager('jill', array('admin'),true), true); - $this->assertEqual(auth_ismanager('jill', array('roots'),true), true); - $this->assertEqual(auth_ismanager('john', array('admin'),true), true); - $this->assertEqual(auth_ismanager('doe', array('admin'),true), true); - $this->assertEqual(auth_ismanager('Doe', array('admin'),true), true); - } - -} - -//Setup VIM: ex: et ts=4 : diff --git a/_test/cases/inc/common_cleanText.test.php b/_test/cases/inc/common_cleanText.test.php deleted file mode 100644 index 936ed1d7693c1786a3ae3312219dea625fa033b4..0000000000000000000000000000000000000000 --- a/_test/cases/inc/common_cleanText.test.php +++ /dev/null @@ -1,34 +0,0 @@ -<?php - -require_once DOKU_INC.'inc/init.php'; -require_once DOKU_INC.'inc/common.php'; - -class common_clientIP_test extends UnitTestCase { - - function test_unix(){ - $unix = 'one - two - - three'; - - $this->assertEqual($unix,cleanText($unix)); - } - - function test_win(){ - $unix = 'one - two - - three'; - $win = 'one - two - - three'; - - $this->assertEqual(bin2hex($unix),'6f6e650a2020202020202020202020202020202074776f0a0a202020202020202020202020202020207468726565'); - $this->assertEqual(bin2hex($win),'6f6e650d0a2020202020202020202020202020202074776f0d0a0d0a202020202020202020202020202020207468726565'); - $this->assertNotEqual($unix,$win); - $this->assertEqual($unix,cleanText($win)); - } -} - -//Setup VIM: ex: et ts=4 : diff --git a/_test/cases/inc/common_pagetemplate.test.php b/_test/cases/inc/common_pagetemplate.test.php deleted file mode 100644 index 2db8b64aeb03502d779a472c6a66c9b540b8b90d..0000000000000000000000000000000000000000 --- a/_test/cases/inc/common_pagetemplate.test.php +++ /dev/null @@ -1,19 +0,0 @@ -<?php - -require_once DOKU_INC.'inc/common.php'; - -class common_pagetemplate_test extends UnitTestCase { - - function test_none(){ - global $conf; - $conf['sepchar'] = '-'; - $data = array( - 'id' => 'page-id-long', - 'tpl' => '"@PAGE@" "@!PAGE@" "@!!PAGE@" "@!PAGE!@"', - ); - $old = error_reporting(E_ALL & ~E_NOTICE); - $this->assertEqual(parsePageTemplate($data), '"page id long" "Page id long" "Page Id Long" "PAGE ID LONG"'); - error_reporting($old); - } -} -//Setup VIM: ex: et ts=4 : diff --git a/_test/cases/inc/html_hilight.test.php b/_test/cases/inc/html_hilight.test.php deleted file mode 100644 index cc5579c7104d685ca47bb923a363b864df6a167d..0000000000000000000000000000000000000000 --- a/_test/cases/inc/html_hilight.test.php +++ /dev/null @@ -1,104 +0,0 @@ -<?php - -require_once DOKU_INC.'inc/html.php'; - -if (!extension_loaded('runkit')) { - SimpleTestOptions::ignore('html_hilight_test'); - trigger_error('Skipping html_hilight_test - http://www.php.net/runkit required'); -} - -function html_hilight_test_unslash($string,$char="'"){ - $str= str_replace('\\'.$char,$char,$string); - return $str; -} - -class html_hilight_test extends UnitTestCase{ - - function setup() { - if ( function_exists('unslash') ) { - runkit_function_rename('unslash','html_hilight_test_unslash_real'); - } - runkit_function_rename('html_hilight_test_unslash','unslash'); - } - - function teardown() { - runkit_function_rename('unslash','html_hilight_test_unslash'); - if ( function_exists('html_hilight_test_unslash_real') ) { - runkit_function_rename('html_hilight_test_unslash_real','unslash'); - } - } - - function testHighlightOneWord() { - $html = 'Foo bar Foo'; - $this->assertPattern( - '/Foo <span.*>bar<\/span> Foo/', - html_hilight($html,'bar') - ); - } - - function testHighlightTwoWords() { - $html = 'Foo bar Foo php Foo'; - $this->assertPattern( - '/Foo <span.*>bar<\/span> Foo <span.*>php<\/span> Foo/', - html_hilight($html,array('bar','php')) - ); - } - - function testHighlightTwoWordsHtml() { - $html = 'Foo <b>bar</b> <i>Foo</i> php Foo'; - $this->assertPattern( - '/Foo <b><span.*>bar<\/span><\/b> <i>Foo<\/i> <span.*>php<\/span> Foo/', - html_hilight($html,array('bar','php')) - ); - } - - function testNoHighlight() { - $html = 'Foo bar Foo'; - $this->assertPattern( - '/Foo bar Foo/', - html_hilight($html,'php') - ); - } - - function testHighlightPHP() { - $html = 'Foo $_GET[\'bar\'] Foo'; - $this->assertEqual( - 'Foo <span class="search_hit">$_GET[\'bar\']</span> Foo', - html_hilight($html,'$_GET[\'bar\']') - ); - } - - function testMatchAttribute() { - $html = 'Foo <b class="x">bar</b> Foo'; - $this->assertPattern( - '/Foo <b class="x">bar<\/b> Foo/', - html_hilight($html,'class="x"') - ); - } - - function testMatchAttributeWord() { - $html = 'Foo <b class="x">bar</b> Foo'; - $this->assertEqual( - 'Foo <b class="x">bar</b> Foo', - html_hilight($html,'class="x">bar') - ); - } - - function testRegexInjection() { - $html = 'Foo bar Foo'; - $this->assertPattern( - '/Foo bar Foo/', - html_hilight($html,'*') - ); - } - - function testRegexInjectionSlash() { - $html = 'Foo bar Foo'; - $this->assertPattern( - '/Foo bar Foo/', - html_hilight($html,'x/') - ); - } - -} - diff --git a/_test/cases/inc/indexer_idx_indexlengths.test.php b/_test/cases/inc/indexer_idx_indexlengths.test.php deleted file mode 100644 index a0f7c9224f6299f882c7ccb731e96174467c4546..0000000000000000000000000000000000000000 --- a/_test/cases/inc/indexer_idx_indexlengths.test.php +++ /dev/null @@ -1,60 +0,0 @@ -<?php - -require_once DOKU_INC.'inc/indexer.php'; - -class indexer_idx_indexlengths_test extends UnitTestCase { - - /** - * Test the function with an array of one value - */ - function test_oneWord(){ - global $conf; - $filter[8] = array('dokuwiki'); - // one word should return the index - $ref[] = 8; - sort($ref); - $result = idx_indexLengths(&$filter); - sort($result); - $this->assertIdentical($result, $ref); - } - - /** - * Test the function with an array of values - */ - function test_moreWords() { - global $conf; - $filter = array( 4 => array('test'), 8 => array('dokuwiki'), 7 => array('powered')); - // more words should return the indexes - $ref = array(4, 7, 8); - sort($ref); - $result = idx_indexLengths(&$filter); - sort($result); - $this->assertIdentical($result, $ref); - } - - /** - * Test a minimal value in case of wildcard search - */ - function test_minValue() { - global $conf; - $filter = 5; - // construction of the list of the index to compare - $dir = @opendir($conf['indexdir']); - $ref = array(); - while (($f = readdir($dir)) !== false) { - if (substr($f,0,1) == 'i' && substr($f,-4) == '.idx'){ - $i = substr($f,1,-4); - if (is_numeric($i) && $i >= $filter) - $ref[] = (int)$i; - } - } - closedir($dir); - sort($ref); - $result = idx_indexLengths(&$filter); - sort($result); - $this->assertIdentical($result, $ref); - } -} - - -//Setup VIM: ex: et ts=4 : diff --git a/_test/cases/inc/mail_send.php b/_test/cases/inc/mail_send.php deleted file mode 100644 index e41c501fe0d0505a229c37d8386df768f26b3c47..0000000000000000000000000000000000000000 --- a/_test/cases/inc/mail_send.php +++ /dev/null @@ -1,49 +0,0 @@ -<?php -require_once DOKU_INC.'inc/mail.php'; - -class mail_send extends UnitTestCase { - - /** - * These tests will try to send a bunch of mails to dokuwiki1@spam.la and - * dokuwiki2@spam.la - check the correctness at http://spam.la - */ - function test1(){ - $addr = array( - 'dokuwiki1@spam.la', - 'dokuwiki2@spam.la', - 'Test User <dokuwiki1@spam.la>', - 'dokuwiki1@spam.la, dokuwiki2@spam.la', - 'Test User 1 <dokuwiki1@spam.la>, Test User 2 <dokuwiki2@spam.la>' - ); - - - $run = 0; - foreach($addr as $ad){ - $run++; - $data = array( - 'to' => $ad, - 'subject' => 'mailtest 1-'.$run, - 'body' => "Mailtest run 1-$run using to: $ad from:", - ); - $this->assertTrue((bool) _mail_send_action($data)); - - $data = array( - 'to' => $ad, - 'from' => 'dokuwiki1@spam.la', - 'subject' => 'mailtest 2-'.$run, - 'body' => "Mailtest run 2-$run using to: $ad from: dokuwiki1@spam.la", - ); - $this->assertTrue((bool) _mail_send_action($data)); - - $data = array( - 'to' => $ad, - 'from' => '"Foo Bar" <dokuwiki@spam.la>', - 'subject' => 'mailtest 3-'.$run, - 'body' => "Mailtest run 3-$run using to: $ad from: \"Foo Bar\" <dokuwiki@spam.la>", - ); - $this->assertTrue((bool) _mail_send_action($data)); - } - } - -} -//Setup VIM: ex: et ts=4 : diff --git a/_test/cases/inc/parser/lexer.group.php b/_test/cases/inc/parser/lexer.group.php deleted file mode 100644 index 6e9ef0742d7ed6fa25b9f6192ae49ea61875bc8a..0000000000000000000000000000000000000000 --- a/_test/cases/inc/parser/lexer.group.php +++ /dev/null @@ -1,21 +0,0 @@ -<?php -/** -* @version $Id: lexer.group.php,v 1.2 2005/03/25 21:00:22 harryf Exp $ -* @package JPSpan -* @subpackage Tests -*/ - -/** -* @package JPSpan -* @subpackage Tests -*/ -class LexerGroupTest extends GroupTest { - - function LexerGroupTest() { - $this->GroupTest('LexerGroupTest'); - $this->addTestFile(dirname(__FILE__).'/lexer.test.php'); - } - -} - -?> diff --git a/_test/cases/inc/parser/lexer.test.php b/_test/cases/inc/parser/lexer.test.php deleted file mode 100644 index e802277f1ed3b6f3ada7f11cfc3d8685d14c95c8..0000000000000000000000000000000000000000 --- a/_test/cases/inc/parser/lexer.test.php +++ /dev/null @@ -1,625 +0,0 @@ -<?php -/** -* @version $Id: lexer.test.php,v 1.2 2005/03/25 21:00:22 harryf Exp $ -* @package Doku -* @subpackage Tests -*/ - -/** -* Includes -*/ -require_once DOKU_INC . 'inc/parser/lexer.php'; - -/** -* @package Doku -* @subpackage Tests -*/ -class TestOfLexerParallelRegex extends UnitTestCase { - function TestOfLexerParallelRegex() { - $this->UnitTestCase(); - } - function testNoPatterns() { - $regex = new Doku_LexerParallelRegex(false); - $this->assertFalse($regex->match("Hello", $match)); - $this->assertEqual($match, ""); - } - function testNoSubject() { - $regex = new Doku_LexerParallelRegex(false); - $regex->addPattern(".*"); - $this->assertTrue($regex->match("", $match)); - $this->assertEqual($match, ""); - } - function testMatchAll() { - $regex = new Doku_LexerParallelRegex(false); - $regex->addPattern(".*"); - $this->assertTrue($regex->match("Hello", $match)); - $this->assertEqual($match, "Hello"); - } - function testCaseSensitive() { - $regex = new Doku_LexerParallelRegex(true); - $regex->addPattern("abc"); - $this->assertTrue($regex->match("abcdef", $match)); - $this->assertEqual($match, "abc"); - $this->assertTrue($regex->match("AAABCabcdef", $match)); - $this->assertEqual($match, "abc"); - } - function testCaseInsensitive() { - $regex = new Doku_LexerParallelRegex(false); - $regex->addPattern("abc"); - $this->assertTrue($regex->match("abcdef", $match)); - $this->assertEqual($match, "abc"); - $this->assertTrue($regex->match("AAABCabcdef", $match)); - $this->assertEqual($match, "ABC"); - } - function testMatchMultiple() { - $regex = new Doku_LexerParallelRegex(true); - $regex->addPattern("abc"); - $regex->addPattern("ABC"); - $this->assertTrue($regex->match("abcdef", $match)); - $this->assertEqual($match, "abc"); - $this->assertTrue($regex->match("AAABCabcdef", $match)); - $this->assertEqual($match, "ABC"); - $this->assertFalse($regex->match("Hello", $match)); - } - function testPatternLabels() { - $regex = new Doku_LexerParallelRegex(false); - $regex->addPattern("abc", "letter"); - $regex->addPattern("123", "number"); - $this->assertIdentical($regex->match("abcdef", $match), "letter"); - $this->assertEqual($match, "abc"); - $this->assertIdentical($regex->match("0123456789", $match), "number"); - $this->assertEqual($match, "123"); - } - function testMatchMultipleWithLookaheadNot() { - $regex = new Doku_LexerParallelRegex(true); - $regex->addPattern("abc"); - $regex->addPattern("ABC"); - $regex->addPattern("a(?!\n).{1}"); - $this->assertTrue($regex->match("abcdef", $match)); - $this->assertEqual($match, "abc"); - $this->assertTrue($regex->match("AAABCabcdef", $match)); - $this->assertEqual($match, "ABC"); - $this->assertTrue($regex->match("a\nab", $match)); - $this->assertEqual($match, "ab"); - $this->assertFalse($regex->match("Hello", $match)); - } - function testMatchSetOptionCaseless() { - $regex = new Doku_LexerParallelRegex(true); - $regex->addPattern("a(?i)b(?i)c"); - $this->assertTrue($regex->match("aBc", $match)); - $this->assertEqual($match, "aBc"); - } - function testMatchSetOptionUngreedy() { - $regex = new Doku_LexerParallelRegex(true); - $regex->addPattern("(?U)\w+"); - $this->assertTrue($regex->match("aaaaaa", $match)); - $this->assertEqual($match, "a"); - } - function testMatchLookaheadEqual() { - $regex = new Doku_LexerParallelRegex(true); - $regex->addPattern("\w(?=c)"); - $this->assertTrue($regex->match("xbyczd", $match)); - $this->assertEqual($match, "y"); - } - function testMatchLookaheadNot() { - $regex = new Doku_LexerParallelRegex(true); - $regex->addPattern("\w(?!b|c)"); - $this->assertTrue($regex->match("xbyczd", $match)); - $this->assertEqual($match, "b"); - } - function testMatchLookbehindEqual() { - $regex = new Doku_LexerParallelRegex(true); - $regex->addPattern("(?<=c)\w"); - $this->assertTrue($regex->match("xbyczd", $match)); - $this->assertEqual($match, "z"); - } - function testMatchLookbehindNot() { - $regex = new Doku_LexerParallelRegex(true); - $regex->addPattern("(?<!\A|x|b)\w"); - $this->assertTrue($regex->match("xbyczd", $match)); - $this->assertEqual($match, "c"); - } -} - - -class TestOfLexerStateStack extends UnitTestCase { - function TestOfLexerStateStack() { - $this->UnitTestCase(); - } - function testStartState() { - $stack = new Doku_LexerStateStack("one"); - $this->assertEqual($stack->getCurrent(), "one"); - } - function testExhaustion() { - $stack = new Doku_LexerStateStack("one"); - $this->assertFalse($stack->leave()); - } - function testStateMoves() { - $stack = new Doku_LexerStateStack("one"); - $stack->enter("two"); - $this->assertEqual($stack->getCurrent(), "two"); - $stack->enter("three"); - $this->assertEqual($stack->getCurrent(), "three"); - $this->assertTrue($stack->leave()); - $this->assertEqual($stack->getCurrent(), "two"); - $stack->enter("third"); - $this->assertEqual($stack->getCurrent(), "third"); - $this->assertTrue($stack->leave()); - $this->assertTrue($stack->leave()); - $this->assertEqual($stack->getCurrent(), "one"); - } -} - -class TestParser { - function TestParser() { - } - function accept() { - } - function a() { - } - function b() { - } -} -Mock::generate('TestParser'); - -class TestOfLexer extends UnitTestCase { - function TestOfLexer() { - $this->UnitTestCase(); - } - function testNoPatterns() { - $handler = new MockTestParser($this); - $handler->expectNever("accept"); - $handler->setReturnValue("accept", true); - $lexer = new Doku_Lexer($handler); - $this->assertFalse($lexer->parse("abcdef")); - } - function testEmptyPage() { - $handler = new MockTestParser($this); - $handler->expectNever("accept"); - $handler->setReturnValue("accept", true); - $handler->expectNever("accept"); - $handler->setReturnValue("accept", true); - $lexer = new Doku_Lexer($handler); - $lexer->addPattern("a+"); - $this->assertTrue($lexer->parse("")); - } - function testSinglePattern() { - $handler = new MockTestParser($this); - $handler->expectArgumentsAt(0, "accept", array("aaa", DOKU_LEXER_MATCHED, 0)); - $handler->expectArgumentsAt(1, "accept", array("x", DOKU_LEXER_UNMATCHED, 3)); - $handler->expectArgumentsAt(2, "accept", array("a", DOKU_LEXER_MATCHED, 4)); - $handler->expectArgumentsAt(3, "accept", array("yyy", DOKU_LEXER_UNMATCHED, 5)); - $handler->expectArgumentsAt(4, "accept", array("a", DOKU_LEXER_MATCHED, 8)); - $handler->expectArgumentsAt(5, "accept", array("x", DOKU_LEXER_UNMATCHED, 9)); - $handler->expectArgumentsAt(6, "accept", array("aaa", DOKU_LEXER_MATCHED, 10)); - $handler->expectArgumentsAt(7, "accept", array("z", DOKU_LEXER_UNMATCHED, 13)); - $handler->expectCallCount("accept", 8); - $handler->setReturnValue("accept", true); - $lexer = new Doku_Lexer($handler); - $lexer->addPattern("a+"); - $this->assertTrue($lexer->parse("aaaxayyyaxaaaz")); - $handler->tally(); - } - function testMultiplePattern() { - $handler = new MockTestParser($this); - $target = array("a", "b", "a", "bb", "x", "b", "a", "xxxxxx", "a", "x"); - $positions = array(0,1,2,3,5,6,7,8,14,15); - for ($i = 0; $i < count($target); $i++) { - $handler->expectArgumentsAt($i, "accept", array($target[$i], '*', $positions[$i])); - } - $handler->expectCallCount("accept", count($target)); - $handler->setReturnValue("accept", true); - $lexer = new Doku_Lexer($handler); - $lexer->addPattern("a+"); - $lexer->addPattern("b+"); - $this->assertTrue($lexer->parse("ababbxbaxxxxxxax")); - $handler->tally(); - } -} - -class TestOfLexerModes extends UnitTestCase { - function TestOfLexerModes() { - $this->UnitTestCase(); - } - function testIsolatedPattern() { - $handler = new MockTestParser($this); - $handler->expectArgumentsAt(0, "a", array("a", DOKU_LEXER_MATCHED,0)); - $handler->expectArgumentsAt(1, "a", array("b", DOKU_LEXER_UNMATCHED,1)); - $handler->expectArgumentsAt(2, "a", array("aa", DOKU_LEXER_MATCHED,2)); - $handler->expectArgumentsAt(3, "a", array("bxb", DOKU_LEXER_UNMATCHED,4)); - $handler->expectArgumentsAt(4, "a", array("aaa", DOKU_LEXER_MATCHED,7)); - $handler->expectArgumentsAt(5, "a", array("x", DOKU_LEXER_UNMATCHED,10)); - $handler->expectArgumentsAt(6, "a", array("aaaa", DOKU_LEXER_MATCHED,11)); - $handler->expectArgumentsAt(7, "a", array("x", DOKU_LEXER_UNMATCHED,15)); - $handler->expectCallCount("a", 8); - $handler->setReturnValue("a", true); - $lexer = new Doku_Lexer($handler, "a"); - $lexer->addPattern("a+", "a"); - $lexer->addPattern("b+", "b"); - $this->assertTrue($lexer->parse("abaabxbaaaxaaaax")); - $handler->tally(); - } - function testModeChange() { - $handler = new MockTestParser($this); - $handler->expectArgumentsAt(0, "a", array("a", DOKU_LEXER_MATCHED,0)); - $handler->expectArgumentsAt(1, "a", array("b", DOKU_LEXER_UNMATCHED,1)); - $handler->expectArgumentsAt(2, "a", array("aa", DOKU_LEXER_MATCHED,2)); - $handler->expectArgumentsAt(3, "a", array("b", DOKU_LEXER_UNMATCHED,4)); - $handler->expectArgumentsAt(4, "a", array("aaa", DOKU_LEXER_MATCHED,5)); - $handler->expectArgumentsAt(0, "b", array(":", DOKU_LEXER_ENTER,8)); - $handler->expectArgumentsAt(1, "b", array("a", DOKU_LEXER_UNMATCHED,9)); - $handler->expectArgumentsAt(2, "b", array("b", DOKU_LEXER_MATCHED, 10)); - $handler->expectArgumentsAt(3, "b", array("a", DOKU_LEXER_UNMATCHED,11)); - $handler->expectArgumentsAt(4, "b", array("bb", DOKU_LEXER_MATCHED,12)); - $handler->expectArgumentsAt(5, "b", array("a", DOKU_LEXER_UNMATCHED,14)); - $handler->expectArgumentsAt(6, "b", array("bbb", DOKU_LEXER_MATCHED,15)); - $handler->expectArgumentsAt(7, "b", array("a", DOKU_LEXER_UNMATCHED,18)); - $handler->expectCallCount("a", 5); - $handler->expectCallCount("b", 8); - $handler->setReturnValue("a", true); - $handler->setReturnValue("b", true); - $lexer = new Doku_Lexer($handler, "a"); - $lexer->addPattern("a+", "a"); - $lexer->addEntryPattern(":", "a", "b"); - $lexer->addPattern("b+", "b"); - $this->assertTrue($lexer->parse("abaabaaa:ababbabbba")); - $handler->tally(); - } - function testNesting() { - $handler = new MockTestParser($this); - $handler->setReturnValue("a", true); - $handler->setReturnValue("b", true); - $handler->expectArgumentsAt(0, "a", array("aa", DOKU_LEXER_MATCHED,0)); - $handler->expectArgumentsAt(1, "a", array("b", DOKU_LEXER_UNMATCHED,2)); - $handler->expectArgumentsAt(2, "a", array("aa", DOKU_LEXER_MATCHED,3)); - $handler->expectArgumentsAt(3, "a", array("b", DOKU_LEXER_UNMATCHED,5)); - $handler->expectArgumentsAt(0, "b", array("(", DOKU_LEXER_ENTER,6)); - $handler->expectArgumentsAt(1, "b", array("bb", DOKU_LEXER_MATCHED,7)); - $handler->expectArgumentsAt(2, "b", array("a", DOKU_LEXER_UNMATCHED,9)); - $handler->expectArgumentsAt(3, "b", array("bb", DOKU_LEXER_MATCHED,10)); - $handler->expectArgumentsAt(4, "b", array(")", DOKU_LEXER_EXIT,12)); - $handler->expectArgumentsAt(4, "a", array("aa", DOKU_LEXER_MATCHED,13)); - $handler->expectArgumentsAt(5, "a", array("b", DOKU_LEXER_UNMATCHED,15)); - $handler->expectCallCount("a", 6); - $handler->expectCallCount("b", 5); - $lexer = new Doku_Lexer($handler, "a"); - $lexer->addPattern("a+", "a"); - $lexer->addEntryPattern("(", "a", "b"); - $lexer->addPattern("b+", "b"); - $lexer->addExitPattern(")", "b"); - $this->assertTrue($lexer->parse("aabaab(bbabb)aab")); - $handler->tally(); - } - function testSingular() { - $handler = new MockTestParser($this); - $handler->setReturnValue("a", true); - $handler->setReturnValue("b", true); - $handler->expectArgumentsAt(0, "a", array("aa", DOKU_LEXER_MATCHED,0)); - $handler->expectArgumentsAt(1, "a", array("aa", DOKU_LEXER_MATCHED,3)); - $handler->expectArgumentsAt(2, "a", array("xx", DOKU_LEXER_UNMATCHED,5)); - $handler->expectArgumentsAt(3, "a", array("xx", DOKU_LEXER_UNMATCHED,10)); - $handler->expectArgumentsAt(0, "b", array("b", DOKU_LEXER_SPECIAL,2)); - $handler->expectArgumentsAt(1, "b", array("bbb", DOKU_LEXER_SPECIAL,7)); - $handler->expectCallCount("a", 4); - $handler->expectCallCount("b", 2); - $lexer = new Doku_Lexer($handler, "a"); - $lexer->addPattern("a+", "a"); - $lexer->addSpecialPattern("b+", "a", "b"); - $this->assertTrue($lexer->parse("aabaaxxbbbxx")); - $handler->tally(); - } - function testUnwindTooFar() { - $handler = new MockTestParser($this); - $handler->setReturnValue("a", true); - $handler->expectArgumentsAt(0, "a", array("aa", DOKU_LEXER_MATCHED,0)); - $handler->expectArgumentsAt(1, "a", array(")", DOKU_LEXER_EXIT,2)); - $handler->expectCallCount("a", 2); - $lexer = new Doku_Lexer($handler, "a"); - $lexer->addPattern("a+", "a"); - $lexer->addExitPattern(")", "a"); - $this->assertFalse($lexer->parse("aa)aa")); - $handler->tally(); - } -} - -class TestOfLexerHandlers extends UnitTestCase { - function TestOfLexerHandlers() { - $this->UnitTestCase(); - } - function testModeMapping() { - $handler = new MockTestParser($this); - $handler->setReturnValue("a", true); - $handler->expectArgumentsAt(0, "a", array("aa", DOKU_LEXER_MATCHED,0)); - $handler->expectArgumentsAt(1, "a", array("(", DOKU_LEXER_ENTER,2)); - $handler->expectArgumentsAt(2, "a", array("bb", DOKU_LEXER_MATCHED,3)); - $handler->expectArgumentsAt(3, "a", array("a", DOKU_LEXER_UNMATCHED,5)); - $handler->expectArgumentsAt(4, "a", array("bb", DOKU_LEXER_MATCHED,6)); - $handler->expectArgumentsAt(5, "a", array(")", DOKU_LEXER_EXIT,8)); - $handler->expectArgumentsAt(6, "a", array("b", DOKU_LEXER_UNMATCHED,9)); - $handler->expectCallCount("a", 7); - $lexer = new Doku_Lexer($handler, "mode_a"); - $lexer->addPattern("a+", "mode_a"); - $lexer->addEntryPattern("(", "mode_a", "mode_b"); - $lexer->addPattern("b+", "mode_b"); - $lexer->addExitPattern(")", "mode_b"); - $lexer->mapHandler("mode_a", "a"); - $lexer->mapHandler("mode_b", "a"); - $this->assertTrue($lexer->parse("aa(bbabb)b")); - $handler->tally(); - } -} - -class TestParserByteIndex { - - function TestParserByteIndex() {} - - function ignore() {} - - function caught() {} -} - -Mock::generate('TestParserByteIndex'); - -class TestOfLexerByteIndices extends UnitTestCase { - - function TestOfLexerByteIndices() { - $this->UnitTestCase(); - } - - function testIndex() { - $doc = "aaa<file>bcd</file>eee"; - - $handler = new MockTestParserByteIndex($this); - $handler->setReturnValue("ignore", true); - $handler->setReturnValue("caught", true); - - $handler->expectArgumentsAt( - 0, - "caught", - array("<file>", DOKU_LEXER_ENTER, strpos($doc,'<file>')) - ); - $handler->expectArgumentsAt( - 1, - "caught", - array("b", DOKU_LEXER_SPECIAL, strpos($doc,'b')) - ); - $handler->expectArgumentsAt( - 2, - "caught", - array("c", DOKU_LEXER_MATCHED, strpos($doc,'c')) - ); - $handler->expectArgumentsAt( - 3, - "caught", - array("d", DOKU_LEXER_UNMATCHED, strpos($doc,'d')) - ); - $handler->expectArgumentsAt( - 4, - "caught", - array("</file>", DOKU_LEXER_EXIT, strpos($doc,'</file>')) - ); - $handler->expectCallCount("caught", 5); - - $lexer = new Doku_Lexer($handler, "ignore"); - $lexer->addEntryPattern("<file>", "ignore", "caught"); - $lexer->addExitPattern("</file>", "caught"); - $lexer->addSpecialPattern('b','caught','special'); - $lexer->mapHandler('special','caught'); - $lexer->addPattern('c','caught'); - - $this->assertTrue($lexer->parse($doc)); - $handler->tally(); - } - - function testIndexLookaheadEqual() { - $doc = "aaa<file>bcd</file>eee"; - - $handler = new MockTestParserByteIndex($this); - $handler->setReturnValue("ignore", true); - $handler->setReturnValue("caught", true); - - $handler->expectArgumentsAt( - 0, - "caught", - array("<file>", DOKU_LEXER_ENTER, strpos($doc,'<file>')) - ); - $handler->expectArgumentsAt( - 1, - "caught", - array("b", DOKU_LEXER_SPECIAL, strpos($doc,'b')) - ); - $handler->expectArgumentsAt( - 2, - "caught", - array("c", DOKU_LEXER_MATCHED, strpos($doc,'c')) - ); - $handler->expectArgumentsAt( - 3, - "caught", - array("d", DOKU_LEXER_UNMATCHED, strpos($doc,'d')) - ); - $handler->expectArgumentsAt( - 4, - "caught", - array("</file>", DOKU_LEXER_EXIT, strpos($doc,'</file>')) - ); - $handler->expectCallCount("caught", 5); - - $lexer = new Doku_Lexer($handler, "ignore"); - $lexer->addEntryPattern('<file>(?=.*</file>)', "ignore", "caught"); - $lexer->addExitPattern("</file>", "caught"); - $lexer->addSpecialPattern('b','caught','special'); - $lexer->mapHandler('special','caught'); - $lexer->addPattern('c','caught'); - - $this->assertTrue($lexer->parse($doc)); - $handler->tally(); - } - - function testIndexLookaheadNotEqual() { - $doc = "aaa<file>bcd</file>eee"; - - $handler = new MockTestParserByteIndex($this); - $handler->setReturnValue("ignore", true); - $handler->setReturnValue("caught", true); - - $handler->expectArgumentsAt( - 0, - "caught", - array("<file>", DOKU_LEXER_ENTER, strpos($doc,'<file>')) - ); - $handler->expectArgumentsAt( - 1, - "caught", - array("b", DOKU_LEXER_SPECIAL, strpos($doc,'b')) - ); - $handler->expectArgumentsAt( - 2, - "caught", - array("c", DOKU_LEXER_MATCHED, strpos($doc,'c')) - ); - $handler->expectArgumentsAt( - 3, - "caught", - array("d", DOKU_LEXER_UNMATCHED, strpos($doc,'d')) - ); - $handler->expectArgumentsAt( - 4, - "caught", - array("</file>", DOKU_LEXER_EXIT, strpos($doc,'</file>')) - ); - $handler->expectCallCount("caught", 5); - - $lexer = new Doku_Lexer($handler, "ignore"); - $lexer->addEntryPattern('<file>(?!foo)', "ignore", "caught"); - $lexer->addExitPattern("</file>", "caught"); - $lexer->addSpecialPattern('b','caught','special'); - $lexer->mapHandler('special','caught'); - $lexer->addPattern('c','caught'); - - $this->assertTrue($lexer->parse($doc)); - $handler->tally(); - } - - function testIndexLookbehindEqual() { - $doc = "aaa<file>bcd</file>eee"; - - $handler = new MockTestParserByteIndex($this); - $handler->setReturnValue("ignore", true); - $handler->setReturnValue("caught", true); - - $handler->expectArgumentsAt( - 0, - "caught", - array("<file>", DOKU_LEXER_ENTER, strpos($doc,'<file>')) - ); - $handler->expectArgumentsAt( - 1, - "caught", - array("b", DOKU_LEXER_SPECIAL, strpos($doc,'b')) - ); - $handler->expectArgumentsAt( - 2, - "caught", - array("c", DOKU_LEXER_MATCHED, strpos($doc,'c')) - ); - $handler->expectArgumentsAt( - 3, - "caught", - array("d", DOKU_LEXER_UNMATCHED, strpos($doc,'d')) - ); - $handler->expectArgumentsAt( - 4, - "caught", - array("</file>", DOKU_LEXER_EXIT, strpos($doc,'</file>')) - ); - $handler->expectCallCount("caught", 5); - - $lexer = new Doku_Lexer($handler, "ignore"); - $lexer->addEntryPattern('<file>', "ignore", "caught"); - $lexer->addExitPattern("(?<=d)</file>", "caught"); - $lexer->addSpecialPattern('b','caught','special'); - $lexer->mapHandler('special','caught'); - $lexer->addPattern('c','caught'); - - $this->assertTrue($lexer->parse($doc)); - $handler->tally(); - } - - function testIndexLookbehindNotEqual() { - $doc = "aaa<file>bcd</file>eee"; - - $handler = new MockTestParserByteIndex($this); - $handler->setReturnValue("ignore", true); - $handler->setReturnValue("caught", true); - - $handler->expectArgumentsAt( - 0, - "caught", - array("<file>", DOKU_LEXER_ENTER, strpos($doc,'<file>')) - ); - $handler->expectArgumentsAt( - 1, - "caught", - array("b", DOKU_LEXER_SPECIAL, strpos($doc,'b')) - ); - $handler->expectArgumentsAt( - 2, - "caught", - array("c", DOKU_LEXER_MATCHED, strpos($doc,'c')) - ); - $handler->expectArgumentsAt( - 3, - "caught", - array("d", DOKU_LEXER_UNMATCHED, strpos($doc,'d')) - ); - $handler->expectArgumentsAt( - 4, - "caught", - array("</file>", DOKU_LEXER_EXIT, strpos($doc,'</file>')) - ); - $handler->expectCallCount("caught", 5); - - $lexer = new Doku_Lexer($handler, "ignore"); - $lexer->addEntryPattern('<file>', "ignore", "caught"); - $lexer->addExitPattern("(?<!c)</file>", "caught"); - $lexer->addSpecialPattern('b','caught','special'); - $lexer->mapHandler('special','caught'); - $lexer->addPattern('c','caught'); - - $this->assertTrue($lexer->parse($doc)); - $handler->tally(); - } - - /** - * This test is primarily to ensure the correct match is chosen - * when there are non-captured elements in the pattern. - */ - function testIndexSelectCorrectMatch() { - $doc = "ALL FOOLS ARE FOO"; - $pattern = '\bFOO\b'; - - $handler = new MockTestParserByteIndex($this); - $handler->setReturnValue("ignore", true); - $handler->setReturnValue("caught", true); - - $matches = array(); - preg_match('/'.$pattern.'/',$doc,$matches,PREG_OFFSET_CAPTURE); - - $handler->expectArgumentsAt( - 0, - "caught", - array("FOO", DOKU_LEXER_SPECIAL, $matches[0][1]) - ); - $handler->expectCallCount("caught", 1); - - $lexer = new Doku_Lexer($handler, "ignore"); - $lexer->addSpecialPattern($pattern,'ignore','caught'); - - $this->assertTrue($lexer->parse($doc)); - $handler->tally(); - } - -} - -?> diff --git a/_test/cases/inc/parser/parser.group.php b/_test/cases/inc/parser/parser.group.php deleted file mode 100644 index ed7fce76ee78af479708de48a0d7a11bc8a0d939..0000000000000000000000000000000000000000 --- a/_test/cases/inc/parser/parser.group.php +++ /dev/null @@ -1,34 +0,0 @@ -<?php -/** -* @version $Id: parser.group.php,v 1.3 2005/03/30 13:42:10 harryf Exp $ -* @package Dokuwiki -* @subpackage Tests -*/ - -/** -* @package Dokuwiki -* @subpackage Tests -*/ -class ParserGroupTest extends GroupTest { - - function ParserGroupTest() { - $dir = dirname(__FILE__).'/'; - $this->GroupTest('ParserGroupTest'); - $this->addTestFile($dir . 'parser_eol.test.php'); - $this->addTestFile($dir . 'parser_footnote.test.php'); - $this->addTestFile($dir .'parser_formatting.test.php'); - $this->addTestFile($dir .'parser_headers.test.php'); - $this->addTestFile($dir .'parser_i18n.test.php'); - $this->addTestFile($dir .'parser_links.test.php'); - $this->addTestFile($dir .'parser_lists.test.php'); - $this->addTestFile($dir .'parser_preformatted.test.php'); - $this->addTestFile($dir .'parser_quote.test.php'); - $this->addTestFile($dir .'parser_replacements.test.php'); - $this->addTestFile($dir .'parser_table.test.php'); -# $this->addTestFile($dir .'parser_tocsections.test.php'); - $this->addTestFile($dir .'parser_unformatted.test.php'); - } - -} - -?> diff --git a/_test/cases/inc/parser/parser.inc.php b/_test/cases/inc/parser/parser.inc.php deleted file mode 100644 index 74d956f4316244da436496b7cbfed26e56e1eef8..0000000000000000000000000000000000000000 --- a/_test/cases/inc/parser/parser.inc.php +++ /dev/null @@ -1,53 +0,0 @@ -<?php -/** -* @version $Id: parser.inc.php,v 1.2 2005/03/25 21:00:22 harryf Exp $ -* @package Doku -* @subpackage Tests -*/ - -/** -* Includes -*/ -require_once DOKU_INC . 'inc/init.php'; -require_once DOKU_INC . 'inc/confutils.php'; -require_once DOKU_INC . 'inc/parser/parser.php'; -require_once DOKU_INC . 'inc/parser/handler.php'; -require_once DOKU_INC . 'inc/events.php'; -require_once DOKU_INC . 'inc/mail.php'; - -//require_once DOKU . 'parser/renderer.php'; - -//Mock::generate('Doku_Renderer'); - -/** -* @package Doku -* @subpackage Tests -*/ -class TestOfDoku_Parser extends UnitTestCase { - - var $P; - var $H; - - function TestOfDoku_Parser() { - $this->UnitTestCase('TestOfDoku_Parser'); - } - - function setup() { - $this->P = new Doku_Parser(); - $this->H = new Doku_Handler(); - $this->P->Handler = & $this->H; - } - - function tearDown() { - unset($this->P); - unset($this->H); - } -} - -function stripByteIndex($call) { - unset($call[2]); - if ($call[0] == "nest") { - $call[1][0] = array_map('stripByteIndex',$call[1][0]); - } - return $call; -} diff --git a/_test/cases/inc/parser/parser_formatting.test.php b/_test/cases/inc/parser/parser_formatting.test.php deleted file mode 100644 index 69c57dfb595a89d55a7782dc41857ae5df35c21f..0000000000000000000000000000000000000000 --- a/_test/cases/inc/parser/parser_formatting.test.php +++ /dev/null @@ -1,434 +0,0 @@ -<?php -require_once 'parser.inc.php'; - -class TestOfDoku_Parser_Formatting extends TestOfDoku_Parser { - - function TestOfDoku_Parser_Formatting() { - $this->UnitTestCase('TestOfDoku_Parser_Formatting'); - } - - function testStrong() { - $this->P->addMode('strong',new Doku_Parser_Mode_Formatting('strong')); - $this->P->parse('abc **bar** def'); - $calls = array ( - array('document_start',array()), - array('p_open',array()), - array('cdata',array("\n".'abc ')), - array('strong_open',array()), - array('cdata',array('bar')), - array('strong_close',array()), - array('cdata',array(' def')), - array('p_close',array()), - array('document_end',array()), - ); - $this->assertEqual(array_map('stripbyteindex',$this->H->calls),$calls); - } - - function testNotStrong() { - $this->P->addMode('strong',new Doku_Parser_Mode_Formatting('strong')); - $this->P->parse('abc **bar def'); - $calls = array ( - array('document_start',array()), - array('p_open',array()), - array('cdata',array("\nabc **bar def")), - array('p_close',array()), - array('document_end',array()), - ); - $this->assertEqual(array_map('stripbyteindex',$this->H->calls),$calls); - } - - function testEm() { - $this->P->addMode('emphasis',new Doku_Parser_Mode_Formatting('emphasis')); - $this->P->parse('abc //bar// def'); - $calls = array ( - array('document_start',array()), - array('p_open',array()), - array('cdata',array("\n".'abc ')), - array('emphasis_open',array()), - array('cdata',array('bar')), - array('emphasis_close',array()), - array('cdata',array(' def')), - array('p_close',array()), - array('document_end',array()), - ); - $this->assertEqual(array_map('stripbyteindex',$this->H->calls),$calls); - } - - function testEmColon() { - $this->P->addMode('emphasis',new Doku_Parser_Mode_Formatting('emphasis')); - $this->P->parse('abc //ТеÑÑ‚: // def'); - $calls = array ( - array('document_start',array()), - array('p_open',array()), - array('cdata',array("\n".'abc ')), - array('emphasis_open',array()), - array('cdata',array('ТеÑÑ‚: ')), - array('emphasis_close',array()), - array('cdata',array(' def')), - array('p_close',array()), - array('document_end',array()), - ); - $this->assertEqual(array_map('stripbyteindex',$this->H->calls),$calls); - } - - function testEmSingleChar() { - $this->P->addMode('emphasis',new Doku_Parser_Mode_Formatting('emphasis')); - $this->P->parse('abc //b// def'); - $calls = array ( - array('document_start',array()), - array('p_open',array()), - array('cdata',array("\n".'abc ')), - array('emphasis_open',array()), - array('cdata',array('b')), - array('emphasis_close',array()), - array('cdata',array(' def')), - array('p_close',array()), - array('document_end',array()), - ); - $this->assertEqual(array_map('stripbyteindex',$this->H->calls),$calls); - } - - function testEmWithUnknownSchema() { - $this->P->addMode('emphasis',new Doku_Parser_Mode_Formatting('emphasis')); - $this->P->parse('abc //foo:// bar// def'); - $calls = array ( - array('document_start',array()), - array('p_open',array()), - array('cdata',array("\n".'abc ')), - array('emphasis_open',array()), - array('cdata',array('foo:')), - array('emphasis_close',array()), - array('cdata',array(' bar// def')), - array('p_close',array()), - array('document_end',array()), - ); - $this->assertEqual(array_map('stripbyteindex',$this->H->calls),$calls); - } - - function testEmWithKnownSchema() { - $this->P->addMode('emphasis',new Doku_Parser_Mode_Formatting('emphasis')); - $this->P->addMode('externallink',new Doku_Parser_Mode_ExternalLink()); - $this->P->parse('abc //foo http://www.google.com bar// def'); - $calls = array ( - array('document_start',array()), - array('p_open',array()), - array('cdata',array("\n".'abc ')), - array('emphasis_open',array()), - array('cdata',array('foo ')), - array('externallink',array('http://www.google.com', NULL)), - array('cdata',array(' bar')), - array('emphasis_close',array()), - array('cdata',array(' def')), - array('p_close',array()), - array('document_end',array()), - ); - $this->assertEqual(array_map('stripbyteindex',$this->H->calls),$calls); - } - - function testNotEm() { - $this->P->addMode('emphasis',new Doku_Parser_Mode_Formatting('emphasis')); - $this->P->parse('abc //bar def'); - $calls = array ( - array('document_start',array()), - array('p_open',array()), - array('cdata',array("\nabc //bar def")), - array('p_close',array()), - array('document_end',array()), - ); - $this->assertEqual(array_map('stripbyteindex',$this->H->calls),$calls); - } - - function testNotEmSchemaAtOpen() { - $this->P->addMode('emphasis',new Doku_Parser_Mode_Formatting('emphasis')); - $this->P->parse('abc foo://bar// def'); - $calls = array ( - array('document_start',array()), - array('p_open',array()), - array('cdata',array("\n".'abc foo:')), - array('emphasis_open',array()), - array('cdata',array('bar')), - array('emphasis_close',array()), - array('cdata',array(' def')), - array('p_close',array()), - array('document_end',array()), - ); - $this->assertEqual(array_map('stripbyteindex',$this->H->calls),$calls); - } - - function testNotEmSchemaAtClose() { - $this->P->addMode('emphasis',new Doku_Parser_Mode_Formatting('emphasis')); - $this->P->parse('abc //http:// def'); - $calls = array ( - array('document_start',array()), - array('p_open',array()), - array('cdata',array("\nabc //http:// def")), - array('p_close',array()), - array('document_end',array()), - ); - $this->assertEqual(array_map('stripbyteindex',$this->H->calls),$calls); - } - - function testEmWithMultiOccurence() { - // Case from #763 - $this->P->addMode('emphasis',new Doku_Parser_Mode_Formatting('emphasis')); - $this->P->parse('//text:// Blablabla Blablabla - -//text:// another Blablabla Blablabla'); - $calls = array ( - array('document_start',array()), - array('p_open',array()), - array('cdata',array("\n")), - array('emphasis_open',array()), - array('cdata',array('text:')), - array('emphasis_close',array()), - array('cdata',array(" Blablabla Blablabla\n\n")), - array('emphasis_open',array()), - array('cdata',array('text:')), - array('emphasis_close',array()), - array('cdata',array(" another Blablabla Blablabla")), - array('p_close',array()), - array('document_end',array()), - ); - $this->assertEqual(array_map('stripbyteindex',$this->H->calls),$calls); - } - - function testEmWithUnicode() { - // Case from #1468 - $this->P->addMode('emphasis',new Doku_Parser_Mode_Formatting('emphasis')); - $this->P->parse('//ТеÑÑ‚://'); - $calls = array ( - array('document_start',array()), - array('p_open',array()), - array('cdata',array("\n")), - array('emphasis_open',array()), - array('cdata',array('ТеÑÑ‚:')), - array('emphasis_close',array()), - array('cdata', array('')), - array('p_close',array()), - array('document_end',array()), - ); - $this->assertEqual(array_map('stripbyteindex',$this->H->calls),$calls); - } - - function testNoEmWithInvalidURL() { - // Case from #1629 - $this->P->addMode('emphasis',new Doku_Parser_Mode_Formatting('emphasis')); - $this->P->parse('http://<CertificateServerName>/certsrv/certcarc.asp'); - $calls = array ( - array('document_start',array()), - array('p_open',array()), - array('cdata',array('http://<CertificateServerName>/certsrv/certcarc.asp')), - array('p_close',array()), - array('document_end',array()), - ); - $this->assertEqual(array_map('stripbyteindex',$this->H->calls),$calls); - } - - function testNoEmWithUnknownURL() { - // Case from #1640 - $this->P->addMode('emphasis',new Doku_Parser_Mode_Formatting('emphasis')); - $this->P->parse('svn://example.com/foo/bar'); - $calls = array ( - array('document_start',array()), - array('p_open',array()), - array('cdata',array('svn://example.com/foo/bar')), - array('p_close',array()), - array('document_end',array()), - ); - $this->assertEqual(array_map('stripbyteindex',$this->H->calls),$calls); - } - - function testUnderline() { - $this->P->addMode('underline',new Doku_Parser_Mode_Formatting('underline')); - $this->P->parse('abc __bar__ def'); - $calls = array ( - array('document_start',array()), - array('p_open',array()), - array('cdata',array("\n".'abc ')), - array('underline_open',array()), - array('cdata',array('bar')), - array('underline_close',array()), - array('cdata',array(' def')), - array('p_close',array()), - array('document_end',array()), - ); - $this->assertEqual(array_map('stripbyteindex',$this->H->calls),$calls); - } - - function testNotUnderline() { - $this->P->addMode('underline',new Doku_Parser_Mode_Formatting('underline')); - $this->P->parse('abc __bar def'); - $calls = array ( - array('document_start',array()), - array('p_open',array()), - array('cdata',array("\nabc __bar def")), - array('p_close',array()), - array('document_end',array()), - ); - $this->assertEqual(array_map('stripbyteindex',$this->H->calls),$calls); - } - - function testMonospace() { - $this->P->addMode('monospace',new Doku_Parser_Mode_Formatting('monospace')); - $this->P->parse("abc ''bar'' def"); - $calls = array ( - array('document_start',array()), - array('p_open',array()), - array('cdata',array("\n".'abc ')), - array('monospace_open',array()), - array('cdata',array('bar')), - array('monospace_close',array()), - array('cdata',array(' def')), - array('p_close',array()), - array('document_end',array()), - ); - $this->assertEqual(array_map('stripbyteindex',$this->H->calls),$calls); - } - - function testNotMonospace() { - $this->P->addMode('monospace',new Doku_Parser_Mode_Formatting('monospace')); - $this->P->parse("abc ''bar def"); - $calls = array ( - array('document_start',array()), - array('p_open',array()), - array('cdata',array("\nabc ''bar def")), - array('p_close',array()), - array('document_end',array()), - ); - $this->assertEqual(array_map('stripbyteindex',$this->H->calls),$calls); - } - - function testSubscript() { - $this->P->addMode('subscript',new Doku_Parser_Mode_Formatting('subscript')); - $this->P->parse('abc <sub>bar</sub> def'); - $calls = array ( - array('document_start',array()), - array('p_open',array()), - array('cdata',array("\n".'abc ')), - array('subscript_open',array()), - array('cdata',array('bar')), - array('subscript_close',array()), - array('cdata',array(' def')), - array('p_close',array()), - array('document_end',array()), - ); - $this->assertEqual(array_map('stripbyteindex',$this->H->calls),$calls); - } - - function testNotSubscript() { - $this->P->addMode('subscript',new Doku_Parser_Mode_Formatting('subscript')); - $this->P->parse('abc <sub>bar def'); - $calls = array ( - array('document_start',array()), - array('p_open',array()), - array('cdata',array("\nabc <sub>bar def")), - array('p_close',array()), - array('document_end',array()), - ); - $this->assertEqual(array_map('stripbyteindex',$this->H->calls),$calls); - } - - function testSuperscript() { - $this->P->addMode('superscript',new Doku_Parser_Mode_Formatting('superscript')); - $this->P->parse("abc <sup>bar</sup> def"); - $calls = array ( - array('document_start',array()), - array('p_open',array()), - array('cdata',array("\n".'abc ')), - array('superscript_open',array()), - array('cdata',array('bar')), - array('superscript_close',array()), - array('cdata',array(' def')), - array('p_close',array()), - array('document_end',array()), - ); - $this->assertEqual(array_map('stripbyteindex',$this->H->calls),$calls); - } - - function testNotSuperscript() { - $this->P->addMode('superscript',new Doku_Parser_Mode_Formatting('superscript')); - $this->P->parse("abc <sup>bar def"); - $calls = array ( - array('document_start',array()), - array('p_open',array()), - array('cdata',array("\nabc <sup>bar def")), - array('p_close',array()), - array('document_end',array()), - ); - $this->assertEqual(array_map('stripbyteindex',$this->H->calls),$calls); - } - - function testDeleted() { - $this->P->addMode('deleted',new Doku_Parser_Mode_Formatting('deleted')); - $this->P->parse('abc <del>bar</del> def'); - $calls = array ( - array('document_start',array()), - array('p_open',array()), - array('cdata',array("\n".'abc ')), - array('deleted_open',array()), - array('cdata',array('bar')), - array('deleted_close',array()), - array('cdata',array(' def')), - array('p_close',array()), - array('document_end',array()), - ); - $this->assertEqual(array_map('stripbyteindex',$this->H->calls),$calls); - } - - function testNotDeleted() { - $this->P->addMode('deleted',new Doku_Parser_Mode_Formatting('deleted')); - $this->P->parse('abc <del>bar def'); - $calls = array ( - array('document_start',array()), - array('p_open',array()), - array('cdata',array("\nabc <del>bar def")), - array('p_close',array()), - array('document_end',array()), - ); - $this->assertEqual(array_map('stripbyteindex',$this->H->calls),$calls); - } - - function testNestedFormatting() { - $this->P->addMode('strong',new Doku_Parser_Mode_Formatting('strong')); - $this->P->addMode('emphasis',new Doku_Parser_Mode_Formatting('emphasis')); - $this->P->parse('abc **a//b//c** def'); - $calls = array ( - array('document_start',array()), - array('p_open',array()), - array('cdata',array("\n".'abc ')), - array('strong_open',array()), - array('cdata',array('a')), - array('emphasis_open',array()), - array('cdata',array('b')), - array('emphasis_close',array()), - array('cdata',array('c')), - array('strong_close',array()), - array('cdata',array(' def')), - array('p_close',array()), - array('document_end',array()), - ); - $this->assertEqual(array_map('stripbyteindex',$this->H->calls),$calls); - } - - function testIllegalNestedFormatting() { - $this->P->addMode('strong',new Doku_Parser_Mode_Formatting('strong')); - $this->P->parse('abc **a**b**c** def'); - $calls = array ( - array('document_start',array()), - array('p_open',array()), - array('cdata',array("\n".'abc ')), - array('strong_open',array()), - array('cdata',array('a')), - array('strong_close',array()), - array('cdata',array('b')), - array('strong_open',array()), - array('cdata',array('c')), - array('strong_close',array()), - array('cdata',array(' def')), - array('p_close',array()), - array('document_end',array()), - ); - $this->assertEqual(array_map('stripbyteindex',$this->H->calls),$calls); - } -} - diff --git a/_test/cases/inc/parser/xhtml_htmlphp.test.php b/_test/cases/inc/parser/xhtml_htmlphp.test.php deleted file mode 100644 index 65d64e579d70e60098fa7b88f08fd3326d7a3e8c..0000000000000000000000000000000000000000 --- a/_test/cases/inc/parser/xhtml_htmlphp.test.php +++ /dev/null @@ -1,203 +0,0 @@ -<?php -if (!defined('DOKU_BASE')) define('DOKU_BASE','./'); - -require_once 'parser.inc.php'; -require_once DOKU_INC.'inc/parser/xhtml.php'; -require_once DOKU_INC.'inc/geshi.php'; - -if (!extension_loaded('runkit')) { - SimpleTestOptions::ignore('xhtml_htmlphp_test'); - trigger_error('Skipping xhtml_htmlphp_test - http://www.php.net/runkit required'); -} - -function xhtml_htmlphp_test_io_makefiledir() { - return; -} -function xhtml_htmlphp_test_io_savefile() { - return true; -} - - -class Doku_Renderer_tester extends Doku_Renderer_xhtml { - -/* - changes to these tests remove the need to redefine any xhtml methods - class left for future use - */ - -} - -/* - * test case for parser/xhtml.php _headertolink method - * definition: function _headertolink($title,$create) - */ - -class xhtml_htmlphp_test extends TestOfDoku_Parser { - - var $purge; - var $cachedir; - - function setup() { - global $conf; - - // set purge to avoid trying to retrieve from cache - $this->purge = isset($_REQUEST['purge']) ? $_REQUEST['purge'] : null; - $_REQUEST['purge'] = 1; - - if (!isset($conf['cachedir'])) { - $conf['cachedir'] = ''; - $this->cachedir = false; - } else { - $this->cachedir = true; - } - - if (function_exists('io_makefiledir')) { - runkit_function_rename('io_makefiledir', 'io_makefiledir_real'); - } - runkit_function_rename('xhtml_htmlphp_test_io_makefiledir','io_makefiledir'); - - if (function_exists('io_savefile')) { - runkit_function_rename('io_savefile', 'io_savefile_real'); - } - runkit_function_rename('xhtml_htmlphp_test_io_savefile','io_savefile'); - - runkit_method_rename('GeSHi','parse_code','parse_code_real'); - runkit_method_add('GeSHi','parse_code','', '{ return hsc($this->source); }'); - - parent::setup(); - } - - function teardown() { - global $conf; - - // restore purge - if (is_null($this->purge)) unset($_REQUEST['purge']); - else $_REQUEST['purge'] = $this->purge; - - // restore $conf['cachedir'] if necessary - if (!$this->cachedir) unset($conf['cachedir']); - - // restore io_functions - runkit_function_rename('io_makefiledir','xhtml_htmlphp_test_io_makefiledir'); - if (function_exists('io_makefiledir_real')) { - runkit_function_rename('io_makefiledir_real', 'io_makefiledir'); - } - - runkit_function_rename('io_savefile','xhtml_htmlphp_test_io_savefile'); - if (function_exists('io_savefile_real')) { - runkit_function_rename('io_savefile_real', 'io_savefile'); - } - - // restore GeSHi::parse_code - runkit_method_remove('GeSHi','parse_code'); - runkit_method_rename('GeSHi','parse_code_real','parse_code'); - - parent::setup(); - } - - function _run_parser($modes,$data) { - - foreach ($modes as $mode => $name) { - $class = 'Doku_Parser_Mode_'.$name; - $this->P->addMode($mode,new $class()); - } - - $R = new Doku_Renderer_tester(); - $this->P->parse($data); - foreach ( $this->H->calls as $instruction ) { - // Execute the callback against the Renderer - call_user_func_array(array(&$R, $instruction[0]),$instruction[1]); - } - - return str_replace("\n",'',$R->doc); - } - - function test_html_off(){ - $test = array('<html><b>bold</b></html>','<p><code class="code html4strict"><b>bold</b></code></p>'); - - global $conf; - $conf['htmlok'] = 0; - - $result = $this->_run_parser(array('html'=>'html'),$test[0]); - - $this->assertEqual($result,$test[1]); - } - - function test_html_on(){ - $test = array('<html><b>bold</b></html>','<p><b>bold</b></p>'); - - global $conf; - $conf['htmlok'] = 1; - - $result = $this->_run_parser(array('html'=>'html'),$test[0]); - - $this->assertEqual($result,$test[1]); - } - - function test_htmlblock_off(){ - $test = array('<HTML><b>bold</b></HTML>','<pre class="code html4strict"><b>bold</b></pre>'); - - global $conf; - $conf['htmlok'] = 0; - - $result = $this->_run_parser(array('html'=>'html'),$test[0]); - - $this->assertEqual($result,$test[1]); - } - - function test_htmlblock_on(){ - $test = array('<HTML><b>bold</b></HTML>','<b>bold</b>'); - - global $conf; - $conf['htmlok'] = 1; - - $result = $this->_run_parser(array('html'=>'html'),$test[0]); - - $this->assertEqual($result,$test[1]); - } - - function test_php_off(){ - $test = array('<php>echo(1+1);</php>','<p><code class="code php">echo(1+1);</code></p>'); - - global $conf; - $conf['phpok'] = 0; - - $result = $this->_run_parser(array('php'=>'php'),$test[0]); - - $this->assertEqual($result,$test[1]); - } - - function test_php_on(){ - $test = array('<php>echo(1+1);</php>','<p>2</p>'); - - global $conf; - $conf['phpok'] = 1; - - $result = $this->_run_parser(array('php'=>'php'),$test[0]); - - $this->assertEqual($result,$test[1]); - } - - function test_phpblock_off(){ - $test = array('<PHP>echo(1+1);</PHP>','<pre class="code php">echo(1+1);</pre>'); - - global $conf; - $conf['phpok'] = 0; - - $result = $this->_run_parser(array('php'=>'php'),$test[0]); - - $this->assertEqual($result,$test[1]); - } - - function test_phpblock_on(){ - $test = array('<PHP>echo(1+1);</PHP>',"2"); - - global $conf; - $conf['phpok'] = 1; - - $result = $this->_run_parser(array('php'=>'php'),$test[0]); - - $this->assertEqual($result,$test[1]); - } - -} diff --git a/_test/cases/inc/parser/xhtml_links.test.php b/_test/cases/inc/parser/xhtml_links.test.php deleted file mode 100644 index a9a6dfdbc14c3d0fb8d5b019a4b6f1ce2f4b05f4..0000000000000000000000000000000000000000 --- a/_test/cases/inc/parser/xhtml_links.test.php +++ /dev/null @@ -1,239 +0,0 @@ -<?php -if (!defined('DOKU_BASE')) define('DOKU_BASE','./'); -require_once DOKU_INC.'inc/parser/xhtml.php'; -require_once DOKU_INC.'inc/pageutils.php'; - -class xhtml_links_test extends UnitTestCase { - - function test_emaillink(){ - global $conf; - $conf['mailguard'] = 'visible'; - $conf['userewrite'] = 0; - - $p = new Doku_Renderer_xhtml(); - $p->emaillink('foo@example.com','<script>alert(\'"alert"\');</script>'); - - $expect = '<a href="mailto:foo%20%5Bat%5D%20example%20%5Bdot%5D%20com" class="mail" title="foo [at] example [dot] com"><script>alert('"alert"');</script></a>'; - - $this->assertEqual($p->doc,$expect); - } - - function test_emaillink_with_media(){ - global $conf; - $conf['mailguard'] = 'visible'; - $conf['userewrite'] = 2; - - $image = array( - 'type'=>'internalmedia', - 'src'=>'img.gif', - 'title'=>'Some Image', - 'align'=>NULL, - 'width'=>10, - 'height'=>20, - 'cache'=>'nocache', - 'linking'=>'details', - ); - - $p = new Doku_Renderer_xhtml(); - $p->emaillink('foo@example.com',$image); - - $expect = '<a href="mailto:foo%20%5Bat%5D%20example%20%5Bdot%5D%20com" class="media" title="foo [at] example [dot] com"><img src="'.DOKU_BASE.'lib/exe/fetch.php/img.gif?w=10&h=20&cache=nocache" class="media" title="Some Image" alt="Some Image" width="10" height="20" /></a>'; - - $this->assertEqual($p->doc,$expect); - } - - /** - * Produced by syntax like [[ ]] - */ - function test_empty_internallink(){ - $page = 'my:space'; - - global $ID; - $ID = $page; - - global $conf; - $conf['start'] = 'start'; - - global $conf; - $conf['basedir'] = '/'; - $conf['useheading'] = 0; - $conf['userewrite'] = 0; - $conf['useslash'] = 0; - $conf['canonical'] = 0; - - $p = new Doku_Renderer_xhtml(); - $p->internallink(''); - - - if (page_exists($page)) { - $class = 'wikilink1'; - $rel = ''; - } - else { - $class = 'wikilink2'; - $rel = ' rel="nofollow"'; - } - - $parts = split(':', $page); - $caption = $parts[count($parts)-1]; - - $expect = '<span class="curid"><a href="/./doku.php?id='.$page.'" class="'.$class.'" title="'.$page.'"'.$rel.'>'.$caption.'</a></span>'; - - $this->assertEqual($p->doc, $expect); - } - - /** - * Produced by syntax like [[ |my caption]] - */ - function test_empty_internallink_with_caption(){ - $page = 'my:space'; - $caption = 'my caption'; - - global $ID; - $ID = $page; - - global $conf; - $conf['basedir'] = '/'; - $conf['useheading'] = 0; - $conf['userewrite'] = 0; - $conf['useslash'] = 0; - $conf['canonical'] = 0; - - $p = new Doku_Renderer_xhtml(); - $p->internallink('', $caption); - - if (page_exists($page)) { - $class = 'wikilink1'; - $rel = ''; - } - else { - $class = 'wikilink2'; - $rel = ' rel="nofollow"'; - } - - $expect = '<span class="curid"><a href="/./doku.php?id='.$page.'" class="'.$class.'" title="'.$page.'"'.$rel.'>'.$caption.'</a></span>'; - - $this->assertEqual($p->doc, $expect); - } - - /** - * Produced by syntax like [[?do=index]] - */ - function test_empty_internallink_index(){ - $page = 'my:space'; - - global $ID; - $ID = $page; - - global $conf; - $conf['start'] = 'start'; - - global $conf; - $conf['basedir'] = '/'; - $conf['useheading'] = 0; - $conf['userewrite'] = 0; - $conf['useslash'] = 0; - $conf['canonical'] = 0; - - $p = new Doku_Renderer_xhtml(); - $p->internallink('?do=index'); - - if (page_exists($page)) { - $class = 'wikilink1'; - $rel = ''; - } - else { - $class = 'wikilink2'; - $rel = ' rel="nofollow"'; - } - - $parts = split(':', $page); - $caption = $parts[count($parts)-1]; - - $expect = '<span class="curid"><a href="/./doku.php?id='.$page.'&do=index" class="'.$class.'" title="'.$page.'"'.$rel.'>'.$caption.'</a></span>'; - - $this->assertEqual($p->doc, $expect); - } - - /** - * Produced by syntax like [[?do=index|my caption]] - */ - function test_empty_internallink_index_with_caption(){ - $page = 'my:space'; - $caption = 'my caption'; - - global $ID; - $ID = $page; - - global $conf; - $conf['basedir'] = '/'; - $conf['useheading'] = 0; - $conf['userewrite'] = 0; - $conf['useslash'] = 0; - $conf['canonical'] = 0; - - $p = new Doku_Renderer_xhtml(); - $p->internallink('?do=index', $caption); - - if (page_exists($page)) { - $class = 'wikilink1'; - $rel = ''; - } - else { - $class = 'wikilink2'; - $rel = ' rel="nofollow"'; - } - - $expect = '<span class="curid"><a href="/./doku.php?id='.$page.'&do=index" class="'.$class.'" title="'.$page.'"'.$rel.'>'.$caption.'</a></span>'; - - $this->assertEqual($p->doc, $expect); - } - - /** - * Produced by syntax like [[#test]] - */ - function test_empty_locallink(){ - $page = 'my:spacex'; - global $ID; - $ID = $page; - - global $conf; - $conf['basedir'] = '/'; - $conf['useheading'] = 0; - $conf['userewrite'] = 0; - $conf['useslash'] = 0; - $conf['canonical'] = 0; - - $p = new Doku_Renderer_xhtml(); - $p->locallink('test'); - - $expect = '<a href="#test" title="'.$page.' ↵" class="wikilink1">test</a>'; - - $this->assertEqual($p->doc, $expect); - } - - /** - * Produced by syntax like [[#test|my caption]] - */ - function test_empty_locallink_with_caption(){ - $page = 'my:spacex'; - $caption = 'my caption'; - - global $ID; - $ID = $page; - - global $conf; - $conf['basedir'] = '/'; - $conf['useheading'] = 0; - $conf['userewrite'] = 0; - $conf['useslash'] = 0; - $conf['canonical'] = 0; - - $p = new Doku_Renderer_xhtml(); - $p->locallink('test', $caption); - - $expect = '<a href="#test" title="'.$page.' ↵" class="wikilink1">'.$caption.'</a>'; - - $this->assertEqual($p->doc, $expect); - } -} diff --git a/_test/conf/acl.auth.php b/_test/conf/acl.auth.php new file mode 100644 index 0000000000000000000000000000000000000000..14344d7785b72176f7386973a9142936b236f287 --- /dev/null +++ b/_test/conf/acl.auth.php @@ -0,0 +1,21 @@ +# acl.auth.php +# <?php exit()?> +# Don't modify the lines above +# +# Access Control Lists +# +# Editing this file by hand shouldn't be necessary. Use the ACL +# Manager interface instead. +# +# If your auth backend allows special char like spaces in groups +# or user names you need to urlencode them (only chars <128, leave +# UTF-8 multibyte chars as is) +# +# none 0 +# read 1 +# edit 2 +# create 4 +# upload 8 +# delete 16 + +* @ALL 8 diff --git a/_test/conf/local.php b/_test/conf/local.php new file mode 100644 index 0000000000000000000000000000000000000000..ff129939359d6593856ea7dd08d8eedb91923786 --- /dev/null +++ b/_test/conf/local.php @@ -0,0 +1,10 @@ +<?php + +$conf['savedir'] = DOKU_TMP_DATA; //where to store all the files + +$conf['title'] = 'My Test Wiki'; //what to show in the title + +$conf['useacl'] = 1; //Use Access Control Lists to restrict access? +$conf['superuser'] = 'testuser'; //password: testpass + +$conf['dnslookups'] = 0; //speedup tests diff --git a/_test/conf/plugins.local.php b/_test/conf/plugins.local.php new file mode 100644 index 0000000000000000000000000000000000000000..00e8c10be368cbe2d71dc090fa66db1d8a21699d --- /dev/null +++ b/_test/conf/plugins.local.php @@ -0,0 +1,8 @@ +<?php +/* + * Local plugin enable/disable settings + * Auto-generated through plugin/extension manager + * + * NOTE: Plugins will not be added to this file unless there is a need to override a default setting. Plugins are + * enabled by default, unless having a 'disabled' file in their plugin folder. + */ diff --git a/_test/conf/users.auth.php b/_test/conf/users.auth.php new file mode 100644 index 0000000000000000000000000000000000000000..4adee0d4b627e142364d9ac3c77afc8b96b20222 --- /dev/null +++ b/_test/conf/users.auth.php @@ -0,0 +1,12 @@ +# users.auth.php +# <?php exit()?> +# Don't modify the lines above +# +# Userfile +# +# Format: +# +# user:MD5password:Real Name:email:groups,comma,seperated +# +# testuser : testpass +testuser:179ad45c6ce2cb97cf1029e212046e81:Arthur Dent:arthur@example.com: diff --git a/_test/core/DokuWikiTest.php b/_test/core/DokuWikiTest.php new file mode 100644 index 0000000000000000000000000000000000000000..e47c063293312f6d7d90d15035159435e8151c2d --- /dev/null +++ b/_test/core/DokuWikiTest.php @@ -0,0 +1,96 @@ +<?php +/** + * Helper class to provide basic functionality for tests + */ +abstract class DokuWikiTest extends PHPUnit_Framework_TestCase { + + /** + * tests can override this + * + * @var array plugins to enable for test class + */ + protected $pluginsEnabled = array(); + + /** + * tests can override this + * + * @var array plugins to disable for test class + */ + protected $pluginsDisabled = array(); + + /** + * Reset the DokuWiki environment before each test run. Makes sure loaded config, + * language and plugins are correct. + * + * @throws Exception if plugin actions fail + * @return void + */ + public function setUp() { + // reload config + global $conf, $config_cascade; + $conf = array(); + foreach (array('default','local','protected') as $config_group) { + if (empty($config_cascade['main'][$config_group])) continue; + foreach ($config_cascade['main'][$config_group] as $config_file) { + if (@file_exists($config_file)) { + include($config_file); + } + } + } + + // reload license config + global $license; + $license = array(); + + // load the license file(s) + foreach (array('default','local') as $config_group) { + if (empty($config_cascade['license'][$config_group])) continue; + foreach ($config_cascade['license'][$config_group] as $config_file) { + if(@file_exists($config_file)){ + include($config_file); + } + } + } + + // make real paths and check them + init_paths(); + init_files(); + + // reset loaded plugins + global $plugin_controller_class, $plugin_controller; + $plugin_controller = new $plugin_controller_class(); + + // disable all non-default plugins + global $default_plugins; + foreach ($plugin_controller->getList() as $plugin) { + if (!in_array($plugin, $default_plugins)) { + if (!$plugin_controller->disable($plugin)) { + throw new Exception('Could not disable plugin "'.$plugin.'"!'); + } + } + } + + // disable and enable configured plugins + foreach ($this->pluginsDisabled as $plugin) { + if (!$plugin_controller->disable($plugin)) { + throw new Exception('Could not disable plugin "'.$plugin.'"!'); + } + } + foreach ($this->pluginsEnabled as $plugin) { + /* enable() returns false but works... + if (!$plugin_controller->enable($plugin)) { + throw new Exception('Could not enable plugin "'.$plugin.'"!'); + } + */ + $plugin_controller->enable($plugin); + } + + // reset event handler + global $EVENT_HANDLER; + $EVENT_HANDLER = new Doku_Event_Handler(); + + // reload language + $local = $conf['lang']; + trigger_event('INIT_LANG_LOAD', $local, 'init_lang', true); + } +} diff --git a/_test/core/TestRequest.php b/_test/core/TestRequest.php new file mode 100644 index 0000000000000000000000000000000000000000..66760b1e0cb38f848dff6b7392175ad700408675 --- /dev/null +++ b/_test/core/TestRequest.php @@ -0,0 +1,87 @@ +<?php +/** + * Simulates a full DokuWiki HTTP Request and allows + * runtime inspection. + */ + +// output buffering +$output_buffer = ''; + +function ob_start_callback($buffer) { + global $output_buffer; + $output_buffer .= $buffer; +} + + +/** + * Helper class to execute a fake request + */ +class TestRequest { + + private $server = array(); + private $session = array(); + private $get = array(); + private $post = array(); + + public function getServer($key) { return $this->server[$key]; } + public function getSession($key) { return $this->session[$key]; } + public function getGet($key) { return $this->get[$key]; } + public function getPost($key) { return $this->post[$key]; } + + public function setServer($key, $value) { $this->server[$key] = $value; } + public function setSession($key, $value) { $this->session[$key] = $value; } + public function setGet($key, $value) { $this->get[$key] = $value; } + public function setPost($key, $value) { $this->post[$key] = $value; } + + /** + * Executes the request + * + * @return TestResponse the resulting output of the request + */ + public function execute() { + // save old environment + $server = $_SERVER; + $session = $_SESSION; + $get = $_GET; + $post = $_POST; + $request = $_REQUEST; + + // import all defined globals into the function scope + foreach(array_keys($GLOBALS) as $glb){ + global $$glb; + } + + // fake environment + global $default_server_vars; + $_SERVER = array_merge($default_server_vars, $this->server); + $_SESSION = $this->session; + $_GET = $this->get; + $_POST = $this->post; + $_REQUEST = array_merge($_GET, $_POST); + + // reset output buffer + global $output_buffer; + $output_buffer = ''; + + // now execute dokuwiki and grep the output + header_remove(); + ob_start('ob_start_callback'); + include(DOKU_INC.'doku.php'); + ob_end_flush(); + + // create the response object + $response = new TestResponse( + $output_buffer, + headers_list() + ); + + // reset environment + $_SERVER = $server; + $_SESSION = $session; + $_GET = $get; + $_POST = $post; + $_REQUEST = $request; + + return $response; + } +} diff --git a/_test/core/TestResponse.php b/_test/core/TestResponse.php new file mode 100644 index 0000000000000000000000000000000000000000..6d20afb2833add44b10a1d8cd77fd055c724d1da --- /dev/null +++ b/_test/core/TestResponse.php @@ -0,0 +1,55 @@ +<?php +/** + * holds a copy of all produced outputs of a TestRequest + */ +class TestResponse { + /** + * @var string + */ + private $content; + + /** + * @var array + */ + private $headers; + + /** + * @var phpQueryObject + */ + private $pq = null; + + /** + * @param $content string + * @param $headers array + */ + function __construct($content, $headers) { + $this->content = $content; + $this->headers = $headers; + } + + /** + * @return string + */ + public function getContent() { + return $this->content; + } + + /** + * @return array + */ + public function getHeaders() { + return $this->headers; + } + + /** + * Query the response for a JQuery compatible CSS selector + * + * @link https://code.google.com/p/phpquery/wiki/Selectors + * @param $selector string + * @return phpQueryObject + */ + public function queryHTML($selector){ + if(is_null($this->pq)) $this->pq = phpQuery::newDocument($this->content); + return $this->pq->find($selector); + } +} diff --git a/_test/core/TestUtils.php b/_test/core/TestUtils.php new file mode 100644 index 0000000000000000000000000000000000000000..2750a3edf1972690913e31f75eb23ae6a802ffc7 --- /dev/null +++ b/_test/core/TestUtils.php @@ -0,0 +1,70 @@ +<?php + +/** + * Helper class with some filesystem utilities. + */ +class TestUtils { + + /** + * helper for recursive copy() + * + * @static + * @param $destdir string + * @param $source string + */ + public static function rcopy($destdir, $source) { + if (!is_dir($source)) { + copy($source, $destdir.'/'.basename($source)); + } else { + $newdestdir = $destdir.'/'.basename($source); + if (!is_dir($newdestdir)) { + mkdir($newdestdir); + } + + $dh = dir($source); + while (false !== ($entry = $dh->read())) { + if ($entry == '.' || $entry == '..') { + continue; + } + TestUtils::rcopy($newdestdir, $source.'/'.$entry); + } + $dh->close(); + } + } + + /** + * helper for recursive rmdir()/unlink() + * + * @static + * @param $target string + */ + public static function rdelete($target) { + if (!is_dir($target)) { + unlink($target); + } else { + $dh = dir($target); + while (false !== ($entry = $dh->read())) { + if ($entry == '.' || $entry == '..') { + continue; + } + TestUtils::rdelete("$target/$entry"); + } + $dh->close(); + rmdir($target); + } + } + + /** + * helper to append text to a file + * + * @static + * @param $file string + * @param $text string + */ + public static function fappend($file, $text) { + $fh = fopen($file, 'a'); + fwrite($fh, $text); + fclose($fh); + } + +} diff --git a/_test/core/phpQuery-onefile.php b/_test/core/phpQuery-onefile.php new file mode 100644 index 0000000000000000000000000000000000000000..4c1dfa3da6dd7d810b799b4cf1faa7bb9c372928 --- /dev/null +++ b/_test/core/phpQuery-onefile.php @@ -0,0 +1,5702 @@ +<?php +/** + * phpQuery is a server-side, chainable, CSS3 selector driven + * Document Object Model (DOM) API based on jQuery JavaScript Library. + * + * @version 0.9.5 + * @link http://code.google.com/p/phpquery/ + * @link http://phpquery-library.blogspot.com/ + * @link http://jquery.com/ + * @author Tobiasz Cudnik <tobiasz.cudnik/gmail.com> + * @license http://www.opensource.org/licenses/mit-license.php MIT License + * @package phpQuery + */ + +// class names for instanceof +// TODO move them as class constants into phpQuery +define('DOMDOCUMENT', 'DOMDocument'); +define('DOMELEMENT', 'DOMElement'); +define('DOMNODELIST', 'DOMNodeList'); +define('DOMNODE', 'DOMNode'); + +/** + * DOMEvent class. + * + * Based on + * @link http://developer.mozilla.org/En/DOM:event + * @author Tobiasz Cudnik <tobiasz.cudnik/gmail.com> + * @package phpQuery + * @todo implement ArrayAccess ? + */ +class DOMEvent { + /** + * Returns a boolean indicating whether the event bubbles up through the DOM or not. + * + * @var unknown_type + */ + public $bubbles = true; + /** + * Returns a boolean indicating whether the event is cancelable. + * + * @var unknown_type + */ + public $cancelable = true; + /** + * Returns a reference to the currently registered target for the event. + * + * @var unknown_type + */ + public $currentTarget; + /** + * Returns detail about the event, depending on the type of event. + * + * @var unknown_type + * @link http://developer.mozilla.org/en/DOM/event.detail + */ + public $detail; // ??? + /** + * Used to indicate which phase of the event flow is currently being evaluated. + * + * NOT IMPLEMENTED + * + * @var unknown_type + * @link http://developer.mozilla.org/en/DOM/event.eventPhase + */ + public $eventPhase; // ??? + /** + * The explicit original target of the event (Mozilla-specific). + * + * NOT IMPLEMENTED + * + * @var unknown_type + */ + public $explicitOriginalTarget; // moz only + /** + * The original target of the event, before any retargetings (Mozilla-specific). + * + * NOT IMPLEMENTED + * + * @var unknown_type + */ + public $originalTarget; // moz only + /** + * Identifies a secondary target for the event. + * + * @var unknown_type + */ + public $relatedTarget; + /** + * Returns a reference to the target to which the event was originally dispatched. + * + * @var unknown_type + */ + public $target; + /** + * Returns the time that the event was created. + * + * @var unknown_type + */ + public $timeStamp; + /** + * Returns the name of the event (case-insensitive). + */ + public $type; + public $runDefault = true; + public $data = null; + public function __construct($data) { + foreach($data as $k => $v) { + $this->$k = $v; + } + if (! $this->timeStamp) + $this->timeStamp = time(); + } + /** + * Cancels the event (if it is cancelable). + * + */ + public function preventDefault() { + $this->runDefault = false; + } + /** + * Stops the propagation of events further along in the DOM. + * + */ + public function stopPropagation() { + $this->bubbles = false; + } +} + + +/** + * DOMDocumentWrapper class simplifies work with DOMDocument. + * + * Know bug: + * - in XHTML fragments, <br /> changes to <br clear="none" /> + * + * @todo check XML catalogs compatibility + * @author Tobiasz Cudnik <tobiasz.cudnik/gmail.com> + * @package phpQuery + */ +class DOMDocumentWrapper { + /** + * @var DOMDocument + */ + public $document; + public $id; + /** + * @todo Rewrite as method and quess if null. + * @var unknown_type + */ + public $contentType = ''; + public $xpath; + public $uuid = 0; + public $data = array(); + public $dataNodes = array(); + public $events = array(); + public $eventsNodes = array(); + public $eventsGlobal = array(); + /** + * @TODO iframes support http://code.google.com/p/phpquery/issues/detail?id=28 + * @var unknown_type + */ + public $frames = array(); + /** + * Document root, by default equals to document itself. + * Used by documentFragments. + * + * @var DOMNode + */ + public $root; + public $isDocumentFragment; + public $isXML = false; + public $isXHTML = false; + public $isHTML = false; + public $charset; + public function __construct($markup = null, $contentType = null, $newDocumentID = null) { + if (isset($markup)) + $this->load($markup, $contentType, $newDocumentID); + $this->id = $newDocumentID + ? $newDocumentID + : md5(microtime()); + } + public function load($markup, $contentType = null, $newDocumentID = null) { +// phpQuery::$documents[$id] = $this; + $this->contentType = strtolower($contentType); + if ($markup instanceof DOMDOCUMENT) { + $this->document = $markup; + $this->root = $this->document; + $this->charset = $this->document->encoding; + // TODO isDocumentFragment + } else { + $loaded = $this->loadMarkup($markup); + } + if ($loaded) { +// $this->document->formatOutput = true; + $this->document->preserveWhiteSpace = true; + $this->xpath = new DOMXPath($this->document); + $this->afterMarkupLoad(); + return true; + // remember last loaded document +// return phpQuery::selectDocument($id); + } + return false; + } + protected function afterMarkupLoad() { + if ($this->isXHTML) { + $this->xpath->registerNamespace("html", "http://www.w3.org/1999/xhtml"); + } + } + protected function loadMarkup($markup) { + $loaded = false; + if ($this->contentType) { + self::debug("Load markup for content type {$this->contentType}"); + // content determined by contentType + list($contentType, $charset) = $this->contentTypeToArray($this->contentType); + switch($contentType) { + case 'text/html': + phpQuery::debug("Loading HTML, content type '{$this->contentType}'"); + $loaded = $this->loadMarkupHTML($markup, $charset); + break; + case 'text/xml': + case 'application/xhtml+xml': + phpQuery::debug("Loading XML, content type '{$this->contentType}'"); + $loaded = $this->loadMarkupXML($markup, $charset); + break; + default: + // for feeds or anything that sometimes doesn't use text/xml + if (strpos('xml', $this->contentType) !== false) { + phpQuery::debug("Loading XML, content type '{$this->contentType}'"); + $loaded = $this->loadMarkupXML($markup, $charset); + } else + phpQuery::debug("Could not determine document type from content type '{$this->contentType}'"); + } + } else { + // content type autodetection + if ($this->isXML($markup)) { + phpQuery::debug("Loading XML, isXML() == true"); + $loaded = $this->loadMarkupXML($markup); + if (! $loaded && $this->isXHTML) { + phpQuery::debug('Loading as XML failed, trying to load as HTML, isXHTML == true'); + $loaded = $this->loadMarkupHTML($markup); + } + } else { + phpQuery::debug("Loading HTML, isXML() == false"); + $loaded = $this->loadMarkupHTML($markup); + } + } + return $loaded; + } + protected function loadMarkupReset() { + $this->isXML = $this->isXHTML = $this->isHTML = false; + } + protected function documentCreate($charset, $version = '1.0') { + if (! $version) + $version = '1.0'; + $this->document = new DOMDocument($version, $charset); + $this->charset = $this->document->encoding; +// $this->document->encoding = $charset; + $this->document->formatOutput = true; + $this->document->preserveWhiteSpace = true; + } + protected function loadMarkupHTML($markup, $requestedCharset = null) { + if (phpQuery::$debug) + phpQuery::debug('Full markup load (HTML): '.substr($markup, 0, 250)); + $this->loadMarkupReset(); + $this->isHTML = true; + if (!isset($this->isDocumentFragment)) + $this->isDocumentFragment = self::isDocumentFragmentHTML($markup); + $charset = null; + $documentCharset = $this->charsetFromHTML($markup); + $addDocumentCharset = false; + if ($documentCharset) { + $charset = $documentCharset; + $markup = $this->charsetFixHTML($markup); + } else if ($requestedCharset) { + $charset = $requestedCharset; + } + if (! $charset) + $charset = phpQuery::$defaultCharset; + // HTTP 1.1 says that the default charset is ISO-8859-1 + // @see http://www.w3.org/International/O-HTTP-charset + if (! $documentCharset) { + $documentCharset = 'ISO-8859-1'; + $addDocumentCharset = true; + } + // Should be careful here, still need 'magic encoding detection' since lots of pages have other 'default encoding' + // Worse, some pages can have mixed encodings... we'll try not to worry about that + $requestedCharset = strtoupper($requestedCharset); + $documentCharset = strtoupper($documentCharset); + phpQuery::debug("DOC: $documentCharset REQ: $requestedCharset"); + if ($requestedCharset && $documentCharset && $requestedCharset !== $documentCharset) { + phpQuery::debug("CHARSET CONVERT"); + // Document Encoding Conversion + // http://code.google.com/p/phpquery/issues/detail?id=86 + if (function_exists('mb_detect_encoding')) { + $possibleCharsets = array($documentCharset, $requestedCharset, 'AUTO'); + $docEncoding = mb_detect_encoding($markup, implode(', ', $possibleCharsets)); + if (! $docEncoding) + $docEncoding = $documentCharset; // ok trust the document + phpQuery::debug("DETECTED '$docEncoding'"); + // Detected does not match what document says... + if ($docEncoding !== $documentCharset) { + // Tricky.. + } + if ($docEncoding !== $requestedCharset) { + phpQuery::debug("CONVERT $docEncoding => $requestedCharset"); + $markup = mb_convert_encoding($markup, $requestedCharset, $docEncoding); + $markup = $this->charsetAppendToHTML($markup, $requestedCharset); + $charset = $requestedCharset; + } + } else { + phpQuery::debug("TODO: charset conversion without mbstring..."); + } + } + $return = false; + if ($this->isDocumentFragment) { + phpQuery::debug("Full markup load (HTML), DocumentFragment detected, using charset '$charset'"); + $return = $this->documentFragmentLoadMarkup($this, $charset, $markup); + } else { + if ($addDocumentCharset) { + phpQuery::debug("Full markup load (HTML), appending charset: '$charset'"); + $markup = $this->charsetAppendToHTML($markup, $charset); + } + phpQuery::debug("Full markup load (HTML), documentCreate('$charset')"); + $this->documentCreate($charset); + $return = phpQuery::$debug === 2 + ? $this->document->loadHTML($markup) + : @$this->document->loadHTML($markup); + if ($return) + $this->root = $this->document; + } + if ($return && ! $this->contentType) + $this->contentType = 'text/html'; + return $return; + } + protected function loadMarkupXML($markup, $requestedCharset = null) { + if (phpQuery::$debug) + phpQuery::debug('Full markup load (XML): '.substr($markup, 0, 250)); + $this->loadMarkupReset(); + $this->isXML = true; + // check agains XHTML in contentType or markup + $isContentTypeXHTML = $this->isXHTML(); + $isMarkupXHTML = $this->isXHTML($markup); + if ($isContentTypeXHTML || $isMarkupXHTML) { + self::debug('Full markup load (XML), XHTML detected'); + $this->isXHTML = true; + } + // determine document fragment + if (! isset($this->isDocumentFragment)) + $this->isDocumentFragment = $this->isXHTML + ? self::isDocumentFragmentXHTML($markup) + : self::isDocumentFragmentXML($markup); + // this charset will be used + $charset = null; + // charset from XML declaration @var string + $documentCharset = $this->charsetFromXML($markup); + if (! $documentCharset) { + if ($this->isXHTML) { + // this is XHTML, try to get charset from content-type meta header + $documentCharset = $this->charsetFromHTML($markup); + if ($documentCharset) { + phpQuery::debug("Full markup load (XML), appending XHTML charset '$documentCharset'"); + $this->charsetAppendToXML($markup, $documentCharset); + $charset = $documentCharset; + } + } + if (! $documentCharset) { + // if still no document charset... + $charset = $requestedCharset; + } + } else if ($requestedCharset) { + $charset = $requestedCharset; + } + if (! $charset) { + $charset = phpQuery::$defaultCharset; + } + if ($requestedCharset && $documentCharset && $requestedCharset != $documentCharset) { + // TODO place for charset conversion +// $charset = $requestedCharset; + } + $return = false; + if ($this->isDocumentFragment) { + phpQuery::debug("Full markup load (XML), DocumentFragment detected, using charset '$charset'"); + $return = $this->documentFragmentLoadMarkup($this, $charset, $markup); + } else { + // FIXME ??? + if ($isContentTypeXHTML && ! $isMarkupXHTML) + if (! $documentCharset) { + phpQuery::debug("Full markup load (XML), appending charset '$charset'"); + $markup = $this->charsetAppendToXML($markup, $charset); + } + // see http://pl2.php.net/manual/en/book.dom.php#78929 + // LIBXML_DTDLOAD (>= PHP 5.1) + // does XML ctalogues works with LIBXML_NONET + // $this->document->resolveExternals = true; + // TODO test LIBXML_COMPACT for performance improvement + // create document + $this->documentCreate($charset); + if (phpversion() < 5.1) { + $this->document->resolveExternals = true; + $return = phpQuery::$debug === 2 + ? $this->document->loadXML($markup) + : @$this->document->loadXML($markup); + } else { + /** @link http://pl2.php.net/manual/en/libxml.constants.php */ + $libxmlStatic = phpQuery::$debug === 2 + ? LIBXML_DTDLOAD|LIBXML_DTDATTR|LIBXML_NONET + : LIBXML_DTDLOAD|LIBXML_DTDATTR|LIBXML_NONET|LIBXML_NOWARNING|LIBXML_NOERROR; + $return = $this->document->loadXML($markup, $libxmlStatic); +// if (! $return) +// $return = $this->document->loadHTML($markup); + } + if ($return) + $this->root = $this->document; + } + if ($return) { + if (! $this->contentType) { + if ($this->isXHTML) + $this->contentType = 'application/xhtml+xml'; + else + $this->contentType = 'text/xml'; + } + return $return; + } else { + throw new Exception("Error loading XML markup"); + } + } + protected function isXHTML($markup = null) { + if (! isset($markup)) { + return strpos($this->contentType, 'xhtml') !== false; + } + // XXX ok ? + return strpos($markup, "<!DOCTYPE html") !== false; +// return stripos($doctype, 'xhtml') !== false; +// $doctype = isset($dom->doctype) && is_object($dom->doctype) +// ? $dom->doctype->publicId +// : self::$defaultDoctype; + } + protected function isXML($markup) { +// return strpos($markup, '<?xml') !== false && stripos($markup, 'xhtml') === false; + return strpos(substr($markup, 0, 100), '<'.'?xml') !== false; + } + protected function contentTypeToArray($contentType) { + $matches = explode(';', trim(strtolower($contentType))); + if (isset($matches[1])) { + $matches[1] = explode('=', $matches[1]); + // strip 'charset=' + $matches[1] = isset($matches[1][1]) && trim($matches[1][1]) + ? $matches[1][1] + : $matches[1][0]; + } else + $matches[1] = null; + return $matches; + } + /** + * + * @param $markup + * @return array contentType, charset + */ + protected function contentTypeFromHTML($markup) { + $matches = array(); + // find meta tag + preg_match('@<meta[^>]+http-equiv\\s*=\\s*(["|\'])Content-Type\\1([^>]+?)>@i', + $markup, $matches + ); + if (! isset($matches[0])) + return array(null, null); + // get attr 'content' + preg_match('@content\\s*=\\s*(["|\'])(.+?)\\1@', $matches[0], $matches); + if (! isset($matches[0])) + return array(null, null); + return $this->contentTypeToArray($matches[2]); + } + protected function charsetFromHTML($markup) { + $contentType = $this->contentTypeFromHTML($markup); + return $contentType[1]; + } + protected function charsetFromXML($markup) { + $matches; + // find declaration + preg_match('@<'.'?xml[^>]+encoding\\s*=\\s*(["|\'])(.*?)\\1@i', + $markup, $matches + ); + return isset($matches[2]) + ? strtolower($matches[2]) + : null; + } + /** + * Repositions meta[type=charset] at the start of head. Bypasses DOMDocument bug. + * + * @link http://code.google.com/p/phpquery/issues/detail?id=80 + * @param $html + */ + protected function charsetFixHTML($markup) { + $matches = array(); + // find meta tag + preg_match('@\s*<meta[^>]+http-equiv\\s*=\\s*(["|\'])Content-Type\\1([^>]+?)>@i', + $markup, $matches, PREG_OFFSET_CAPTURE + ); + if (! isset($matches[0])) + return; + $metaContentType = $matches[0][0]; + $markup = substr($markup, 0, $matches[0][1]) + .substr($markup, $matches[0][1]+strlen($metaContentType)); + $headStart = stripos($markup, '<head>'); + $markup = substr($markup, 0, $headStart+6).$metaContentType + .substr($markup, $headStart+6); + return $markup; + } + protected function charsetAppendToHTML($html, $charset, $xhtml = false) { + // remove existing meta[type=content-type] + $html = preg_replace('@\s*<meta[^>]+http-equiv\\s*=\\s*(["|\'])Content-Type\\1([^>]+?)>@i', '', $html); + $meta = '<meta http-equiv="Content-Type" content="text/html;charset=' + .$charset.'" ' + .($xhtml ? '/' : '') + .'>'; + if (strpos($html, '<head') === false) { + if (strpos($hltml, '<html') === false) { + return $meta.$html; + } else { + return preg_replace( + '@<html(.*?)(?(?<!\?)>)@s', + "<html\\1><head>{$meta}</head>", + $html + ); + } + } else { + return preg_replace( + '@<head(.*?)(?(?<!\?)>)@s', + '<head\\1>'.$meta, + $html + ); + } + } + protected function charsetAppendToXML($markup, $charset) { + $declaration = '<'.'?xml version="1.0" encoding="'.$charset.'"?'.'>'; + return $declaration.$markup; + } + public static function isDocumentFragmentHTML($markup) { + return stripos($markup, '<html') === false && stripos($markup, '<!doctype') === false; + } + public static function isDocumentFragmentXML($markup) { + return stripos($markup, '<'.'?xml') === false; + } + public static function isDocumentFragmentXHTML($markup) { + return self::isDocumentFragmentHTML($markup); + } + public function importAttr($value) { + // TODO + } + /** + * + * @param $source + * @param $target + * @param $sourceCharset + * @return array Array of imported nodes. + */ + public function import($source, $sourceCharset = null) { + // TODO charset conversions + $return = array(); + if ($source instanceof DOMNODE && !($source instanceof DOMNODELIST)) + $source = array($source); +// if (is_array($source)) { +// foreach($source as $node) { +// if (is_string($node)) { +// // string markup +// $fake = $this->documentFragmentCreate($node, $sourceCharset); +// if ($fake === false) +// throw new Exception("Error loading documentFragment markup"); +// else +// $return = array_merge($return, +// $this->import($fake->root->childNodes) +// ); +// } else { +// $return[] = $this->document->importNode($node, true); +// } +// } +// return $return; +// } else { +// // string markup +// $fake = $this->documentFragmentCreate($source, $sourceCharset); +// if ($fake === false) +// throw new Exception("Error loading documentFragment markup"); +// else +// return $this->import($fake->root->childNodes); +// } + if (is_array($source) || $source instanceof DOMNODELIST) { + // dom nodes + self::debug('Importing nodes to document'); + foreach($source as $node) + $return[] = $this->document->importNode($node, true); + } else { + // string markup + $fake = $this->documentFragmentCreate($source, $sourceCharset); + if ($fake === false) + throw new Exception("Error loading documentFragment markup"); + else + return $this->import($fake->root->childNodes); + } + return $return; + } + /** + * Creates new document fragment. + * + * @param $source + * @return DOMDocumentWrapper + */ + protected function documentFragmentCreate($source, $charset = null) { + $fake = new DOMDocumentWrapper(); + $fake->contentType = $this->contentType; + $fake->isXML = $this->isXML; + $fake->isHTML = $this->isHTML; + $fake->isXHTML = $this->isXHTML; + $fake->root = $fake->document; + if (! $charset) + $charset = $this->charset; +// $fake->documentCreate($this->charset); + if ($source instanceof DOMNODE && !($source instanceof DOMNODELIST)) + $source = array($source); + if (is_array($source) || $source instanceof DOMNODELIST) { + // dom nodes + // load fake document + if (! $this->documentFragmentLoadMarkup($fake, $charset)) + return false; + $nodes = $fake->import($source); + foreach($nodes as $node) + $fake->root->appendChild($node); + } else { + // string markup + $this->documentFragmentLoadMarkup($fake, $charset, $source); + } + return $fake; + } + /** + * + * @param $document DOMDocumentWrapper + * @param $markup + * @return $document + */ + private function documentFragmentLoadMarkup($fragment, $charset, $markup = null) { + // TODO error handling + // TODO copy doctype + // tempolary turn off + $fragment->isDocumentFragment = false; + if ($fragment->isXML) { + if ($fragment->isXHTML) { + // add FAKE element to set default namespace + $fragment->loadMarkupXML('<?xml version="1.0" encoding="'.$charset.'"?>' + .'<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" ' + .'"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">' + .'<fake xmlns="http://www.w3.org/1999/xhtml">'.$markup.'</fake>'); + $fragment->root = $fragment->document->firstChild->nextSibling; + } else { + $fragment->loadMarkupXML('<?xml version="1.0" encoding="'.$charset.'"?><fake>'.$markup.'</fake>'); + $fragment->root = $fragment->document->firstChild; + } + } else { + $markup2 = phpQuery::$defaultDoctype.'<html><head><meta http-equiv="Content-Type" content="text/html;charset=' + .$charset.'"></head>'; + $noBody = strpos($markup, '<body') === false; + if ($noBody) + $markup2 .= '<body>'; + $markup2 .= $markup; + if ($noBody) + $markup2 .= '</body>'; + $markup2 .= '</html>'; + $fragment->loadMarkupHTML($markup2); + // TODO resolv body tag merging issue + $fragment->root = $noBody + ? $fragment->document->firstChild->nextSibling->firstChild->nextSibling + : $fragment->document->firstChild->nextSibling->firstChild->nextSibling; + } + if (! $fragment->root) + return false; + $fragment->isDocumentFragment = true; + return true; + } + protected function documentFragmentToMarkup($fragment) { + phpQuery::debug('documentFragmentToMarkup'); + $tmp = $fragment->isDocumentFragment; + $fragment->isDocumentFragment = false; + $markup = $fragment->markup(); + if ($fragment->isXML) { + $markup = substr($markup, 0, strrpos($markup, '</fake>')); + if ($fragment->isXHTML) { + $markup = substr($markup, strpos($markup, '<fake')+43); + } else { + $markup = substr($markup, strpos($markup, '<fake>')+6); + } + } else { + $markup = substr($markup, strpos($markup, '<body>')+6); + $markup = substr($markup, 0, strrpos($markup, '</body>')); + } + $fragment->isDocumentFragment = $tmp; + if (phpQuery::$debug) + phpQuery::debug('documentFragmentToMarkup: '.substr($markup, 0, 150)); + return $markup; + } + /** + * Return document markup, starting with optional $nodes as root. + * + * @param $nodes DOMNode|DOMNodeList + * @return string + */ + public function markup($nodes = null, $innerMarkup = false) { + if (isset($nodes) && count($nodes) == 1 && $nodes[0] instanceof DOMDOCUMENT) + $nodes = null; + if (isset($nodes)) { + $markup = ''; + if (!is_array($nodes) && !($nodes instanceof DOMNODELIST) ) + $nodes = array($nodes); + if ($this->isDocumentFragment && ! $innerMarkup) + foreach($nodes as $i => $node) + if ($node->isSameNode($this->root)) { + // var_dump($node); + $nodes = array_slice($nodes, 0, $i) + + phpQuery::DOMNodeListToArray($node->childNodes) + + array_slice($nodes, $i+1); + } + if ($this->isXML && ! $innerMarkup) { + self::debug("Getting outerXML with charset '{$this->charset}'"); + // we need outerXML, so we can benefit from + // $node param support in saveXML() + foreach($nodes as $node) + $markup .= $this->document->saveXML($node); + } else { + $loop = array(); + if ($innerMarkup) + foreach($nodes as $node) { + if ($node->childNodes) + foreach($node->childNodes as $child) + $loop[] = $child; + else + $loop[] = $node; + } + else + $loop = $nodes; + self::debug("Getting markup, moving selected nodes (".count($loop).") to new DocumentFragment"); + $fake = $this->documentFragmentCreate($loop); + $markup = $this->documentFragmentToMarkup($fake); + } + if ($this->isXHTML) { + self::debug("Fixing XHTML"); + $markup = self::markupFixXHTML($markup); + } + self::debug("Markup: ".substr($markup, 0, 250)); + return $markup; + } else { + if ($this->isDocumentFragment) { + // documentFragment, html only... + self::debug("Getting markup, DocumentFragment detected"); +// return $this->markup( +//// $this->document->getElementsByTagName('body')->item(0) +// $this->document->root, true +// ); + $markup = $this->documentFragmentToMarkup($this); + // no need for markupFixXHTML, as it's done thought markup($nodes) method + return $markup; + } else { + self::debug("Getting markup (".($this->isXML?'XML':'HTML')."), final with charset '{$this->charset}'"); + $markup = $this->isXML + ? $this->document->saveXML() + : $this->document->saveHTML(); + if ($this->isXHTML) { + self::debug("Fixing XHTML"); + $markup = self::markupFixXHTML($markup); + } + self::debug("Markup: ".substr($markup, 0, 250)); + return $markup; + } + } + } + protected static function markupFixXHTML($markup) { + $markup = self::expandEmptyTag('script', $markup); + $markup = self::expandEmptyTag('select', $markup); + $markup = self::expandEmptyTag('textarea', $markup); + return $markup; + } + public static function debug($text) { + phpQuery::debug($text); + } + /** + * expandEmptyTag + * + * @param $tag + * @param $xml + * @return unknown_type + * @author mjaque at ilkebenson dot com + * @link http://php.net/manual/en/domdocument.savehtml.php#81256 + */ + public static function expandEmptyTag($tag, $xml){ + $indice = 0; + while ($indice< strlen($xml)){ + $pos = strpos($xml, "<$tag ", $indice); + if ($pos){ + $posCierre = strpos($xml, ">", $pos); + if ($xml[$posCierre-1] == "/"){ + $xml = substr_replace($xml, "></$tag>", $posCierre-1, 2); + } + $indice = $posCierre; + } + else break; + } + return $xml; + } +} + +/** + * Event handling class. + * + * @author Tobiasz Cudnik + * @package phpQuery + * @static + */ +abstract class phpQueryEvents { + /** + * Trigger a type of event on every matched element. + * + * @param DOMNode|phpQueryObject|string $document + * @param unknown_type $type + * @param unknown_type $data + * + * @TODO exclusive events (with !) + * @TODO global events (test) + * @TODO support more than event in $type (space-separated) + */ + public static function trigger($document, $type, $data = array(), $node = null) { + // trigger: function(type, data, elem, donative, extra) { + $documentID = phpQuery::getDocumentID($document); + $namespace = null; + if (strpos($type, '.') !== false) + list($name, $namespace) = explode('.', $type); + else + $name = $type; + if (! $node) { + if (self::issetGlobal($documentID, $type)) { + $pq = phpQuery::getDocument($documentID); + // TODO check add($pq->document) + $pq->find('*')->add($pq->document) + ->trigger($type, $data); + } + } else { + if (isset($data[0]) && $data[0] instanceof DOMEvent) { + $event = $data[0]; + $event->relatedTarget = $event->target; + $event->target = $node; + $data = array_slice($data, 1); + } else { + $event = new DOMEvent(array( + 'type' => $type, + 'target' => $node, + 'timeStamp' => time(), + )); + } + $i = 0; + while($node) { + // TODO whois + phpQuery::debug("Triggering ".($i?"bubbled ":'')."event '{$type}' on " + ."node \n");//.phpQueryObject::whois($node)."\n"); + $event->currentTarget = $node; + $eventNode = self::getNode($documentID, $node); + if (isset($eventNode->eventHandlers)) { + foreach($eventNode->eventHandlers as $eventType => $handlers) { + $eventNamespace = null; + if (strpos($type, '.') !== false) + list($eventName, $eventNamespace) = explode('.', $eventType); + else + $eventName = $eventType; + if ($name != $eventName) + continue; + if ($namespace && $eventNamespace && $namespace != $eventNamespace) + continue; + foreach($handlers as $handler) { + phpQuery::debug("Calling event handler\n"); + $event->data = $handler['data'] + ? $handler['data'] + : null; + $params = array_merge(array($event), $data); + $return = phpQuery::callbackRun($handler['callback'], $params); + if ($return === false) { + $event->bubbles = false; + } + } + } + } + // to bubble or not to bubble... + if (! $event->bubbles) + break; + $node = $node->parentNode; + $i++; + } + } + } + /** + * Binds a handler to one or more events (like click) for each matched element. + * Can also bind custom events. + * + * @param DOMNode|phpQueryObject|string $document + * @param unknown_type $type + * @param unknown_type $data Optional + * @param unknown_type $callback + * + * @TODO support '!' (exclusive) events + * @TODO support more than event in $type (space-separated) + * @TODO support binding to global events + */ + public static function add($document, $node, $type, $data, $callback = null) { + phpQuery::debug("Binding '$type' event"); + $documentID = phpQuery::getDocumentID($document); +// if (is_null($callback) && is_callable($data)) { +// $callback = $data; +// $data = null; +// } + $eventNode = self::getNode($documentID, $node); + if (! $eventNode) + $eventNode = self::setNode($documentID, $node); + if (!isset($eventNode->eventHandlers[$type])) + $eventNode->eventHandlers[$type] = array(); + $eventNode->eventHandlers[$type][] = array( + 'callback' => $callback, + 'data' => $data, + ); + } + /** + * Enter description here... + * + * @param DOMNode|phpQueryObject|string $document + * @param unknown_type $type + * @param unknown_type $callback + * + * @TODO namespace events + * @TODO support more than event in $type (space-separated) + */ + public static function remove($document, $node, $type = null, $callback = null) { + $documentID = phpQuery::getDocumentID($document); + $eventNode = self::getNode($documentID, $node); + if (is_object($eventNode) && isset($eventNode->eventHandlers[$type])) { + if ($callback) { + foreach($eventNode->eventHandlers[$type] as $k => $handler) + if ($handler['callback'] == $callback) + unset($eventNode->eventHandlers[$type][$k]); + } else { + unset($eventNode->eventHandlers[$type]); + } + } + } + protected static function getNode($documentID, $node) { + foreach(phpQuery::$documents[$documentID]->eventsNodes as $eventNode) { + if ($node->isSameNode($eventNode)) + return $eventNode; + } + } + protected static function setNode($documentID, $node) { + phpQuery::$documents[$documentID]->eventsNodes[] = $node; + return phpQuery::$documents[$documentID]->eventsNodes[ + count(phpQuery::$documents[$documentID]->eventsNodes)-1 + ]; + } + protected static function issetGlobal($documentID, $type) { + return isset(phpQuery::$documents[$documentID]) + ? in_array($type, phpQuery::$documents[$documentID]->eventsGlobal) + : false; + } +} + + +interface ICallbackNamed { + function hasName(); + function getName(); +} +/** + * Callback class introduces currying-like pattern. + * + * Example: + * function foo($param1, $param2, $param3) { + * var_dump($param1, $param2, $param3); + * } + * $fooCurried = new Callback('foo', + * 'param1 is now statically set', + * new CallbackParam, new CallbackParam + * ); + * phpQuery::callbackRun($fooCurried, + * array('param2 value', 'param3 value' + * ); + * + * Callback class is supported in all phpQuery methods which accepts callbacks. + * + * @link http://code.google.com/p/phpquery/wiki/Callbacks#Param_Structures + * @author Tobiasz Cudnik <tobiasz.cudnik/gmail.com> + * + * @TODO??? return fake forwarding function created via create_function + * @TODO honor paramStructure + */ +class Callback + implements ICallbackNamed { + public $callback = null; + public $params = null; + protected $name; + public function __construct($callback, $param1 = null, $param2 = null, + $param3 = null) { + $params = func_get_args(); + $params = array_slice($params, 1); + if ($callback instanceof Callback) { + // TODO implement recurention + } else { + $this->callback = $callback; + $this->params = $params; + } + } + public function getName() { + return 'Callback: '.$this->name; + } + public function hasName() { + return isset($this->name) && $this->name; + } + public function setName($name) { + $this->name = $name; + return $this; + } + // TODO test me +// public function addParams() { +// $params = func_get_args(); +// return new Callback($this->callback, $this->params+$params); +// } +} +/** + * Shorthand for new Callback(create_function(...), ...); + * + * @author Tobiasz Cudnik <tobiasz.cudnik/gmail.com> + */ +class CallbackBody extends Callback { + public function __construct($paramList, $code, $param1 = null, $param2 = null, + $param3 = null) { + $params = func_get_args(); + $params = array_slice($params, 2); + $this->callback = create_function($paramList, $code); + $this->params = $params; + } +} +/** + * Callback type which on execution returns reference passed during creation. + * + * @author Tobiasz Cudnik <tobiasz.cudnik/gmail.com> + */ +class CallbackReturnReference extends Callback + implements ICallbackNamed { + protected $reference; + public function __construct(&$reference, $name = null){ + $this->reference =& $reference; + $this->callback = array($this, 'callback'); + } + public function callback() { + return $this->reference; + } + public function getName() { + return 'Callback: '.$this->name; + } + public function hasName() { + return isset($this->name) && $this->name; + } +} +/** + * Callback type which on execution returns value passed during creation. + * + * @author Tobiasz Cudnik <tobiasz.cudnik/gmail.com> + */ +class CallbackReturnValue extends Callback + implements ICallbackNamed { + protected $value; + protected $name; + public function __construct($value, $name = null){ + $this->value =& $value; + $this->name = $name; + $this->callback = array($this, 'callback'); + } + public function callback() { + return $this->value; + } + public function __toString() { + return $this->getName(); + } + public function getName() { + return 'Callback: '.$this->name; + } + public function hasName() { + return isset($this->name) && $this->name; + } +} +/** + * CallbackParameterToReference can be used when we don't really want a callback, + * only parameter passed to it. CallbackParameterToReference takes first + * parameter's value and passes it to reference. + * + * @author Tobiasz Cudnik <tobiasz.cudnik/gmail.com> + */ +class CallbackParameterToReference extends Callback { + /** + * @param $reference + * @TODO implement $paramIndex; + * param index choose which callback param will be passed to reference + */ + public function __construct(&$reference){ + $this->callback =& $reference; + } +} +//class CallbackReference extends Callback { +// /** +// * +// * @param $reference +// * @param $paramIndex +// * @todo implement $paramIndex; param index choose which callback param will be passed to reference +// */ +// public function __construct(&$reference, $name = null){ +// $this->callback =& $reference; +// } +//} +class CallbackParam {} + +/** + * Class representing phpQuery objects. + * + * @author Tobiasz Cudnik <tobiasz.cudnik/gmail.com> + * @package phpQuery + * @method phpQueryObject clone() clone() + * @method phpQueryObject empty() empty() + * @method phpQueryObject next() next($selector = null) + * @method phpQueryObject prev() prev($selector = null) + * @property Int $length + */ +class phpQueryObject + implements Iterator, Countable, ArrayAccess { + public $documentID = null; + /** + * DOMDocument class. + * + * @var DOMDocument + */ + public $document = null; + public $charset = null; + /** + * + * @var DOMDocumentWrapper + */ + public $documentWrapper = null; + /** + * XPath interface. + * + * @var DOMXPath + */ + public $xpath = null; + /** + * Stack of selected elements. + * @TODO refactor to ->nodes + * @var array + */ + public $elements = array(); + /** + * @access private + */ + protected $elementsBackup = array(); + /** + * @access private + */ + protected $previous = null; + /** + * @access private + * @TODO deprecate + */ + protected $root = array(); + /** + * Indicated if doument is just a fragment (no <html> tag). + * + * Every document is realy a full document, so even documentFragments can + * be queried against <html>, but getDocument(id)->htmlOuter() will return + * only contents of <body>. + * + * @var bool + */ + public $documentFragment = true; + /** + * Iterator interface helper + * @access private + */ + protected $elementsInterator = array(); + /** + * Iterator interface helper + * @access private + */ + protected $valid = false; + /** + * Iterator interface helper + * @access private + */ + protected $current = null; + /** + * Enter description here... + * + * @return phpQueryObject|QueryTemplatesSource|QueryTemplatesParse|QueryTemplatesSourceQuery + */ + public function __construct($documentID) { +// if ($documentID instanceof self) +// var_dump($documentID->getDocumentID()); + $id = $documentID instanceof self + ? $documentID->getDocumentID() + : $documentID; +// var_dump($id); + if (! isset(phpQuery::$documents[$id] )) { +// var_dump(phpQuery::$documents); + throw new Exception("Document with ID '{$id}' isn't loaded. Use phpQuery::newDocument(\$html) or phpQuery::newDocumentFile(\$file) first."); + } + $this->documentID = $id; + $this->documentWrapper =& phpQuery::$documents[$id]; + $this->document =& $this->documentWrapper->document; + $this->xpath =& $this->documentWrapper->xpath; + $this->charset =& $this->documentWrapper->charset; + $this->documentFragment =& $this->documentWrapper->isDocumentFragment; + // TODO check $this->DOM->documentElement; +// $this->root = $this->document->documentElement; + $this->root =& $this->documentWrapper->root; +// $this->toRoot(); + $this->elements = array($this->root); + } + /** + * + * @access private + * @param $attr + * @return unknown_type + */ + public function __get($attr) { + switch($attr) { + // FIXME doesnt work at all ? + case 'length': + return $this->size(); + break; + default: + return $this->$attr; + } + } + /** + * Saves actual object to $var by reference. + * Useful when need to break chain. + * @param phpQueryObject $var + * @return phpQueryObject|QueryTemplatesSource|QueryTemplatesParse|QueryTemplatesSourceQuery + */ + public function toReference(&$var) { + return $var = $this; + } + public function documentFragment($state = null) { + if ($state) { + phpQuery::$documents[$this->getDocumentID()]['documentFragment'] = $state; + return $this; + } + return $this->documentFragment; + } + /** + * @access private + * @TODO documentWrapper + */ + protected function isRoot( $node) { +// return $node instanceof DOMDOCUMENT || $node->tagName == 'html'; + return $node instanceof DOMDOCUMENT + || ($node instanceof DOMELEMENT && $node->tagName == 'html') + || $this->root->isSameNode($node); + } + /** + * @access private + */ + protected function stackIsRoot() { + return $this->size() == 1 && $this->isRoot($this->elements[0]); + } + /** + * Enter description here... + * NON JQUERY METHOD + * + * Watch out, it doesn't creates new instance, can be reverted with end(). + * + * @return phpQueryObject|QueryTemplatesSource|QueryTemplatesParse|QueryTemplatesSourceQuery + */ + public function toRoot() { + $this->elements = array($this->root); + return $this; +// return $this->newInstance(array($this->root)); + } + /** + * Saves object's DocumentID to $var by reference. + * <code> + * $myDocumentId; + * phpQuery::newDocument('<div/>') + * ->getDocumentIDRef($myDocumentId) + * ->find('div')->... + * </code> + * + * @param unknown_type $domId + * @see phpQuery::newDocument + * @see phpQuery::newDocumentFile + * @return phpQueryObject|QueryTemplatesSource|QueryTemplatesParse|QueryTemplatesSourceQuery + */ + public function getDocumentIDRef(&$documentID) { + $documentID = $this->getDocumentID(); + return $this; + } + /** + * Returns object with stack set to document root. + * + * @return phpQueryObject|QueryTemplatesSource|QueryTemplatesParse|QueryTemplatesSourceQuery + */ + public function getDocument() { + return phpQuery::getDocument($this->getDocumentID()); + } + /** + * + * @return DOMDocument + */ + public function getDOMDocument() { + return $this->document; + } + /** + * Get object's Document ID. + * + * @return phpQueryObject|QueryTemplatesSource|QueryTemplatesParse|QueryTemplatesSourceQuery + */ + public function getDocumentID() { + return $this->documentID; + } + /** + * Unloads whole document from memory. + * CAUTION! None further operations will be possible on this document. + * All objects refering to it will be useless. + * + * @return phpQueryObject|QueryTemplatesSource|QueryTemplatesParse|QueryTemplatesSourceQuery + */ + public function unloadDocument() { + phpQuery::unloadDocuments($this->getDocumentID()); + } + public function isHTML() { + return $this->documentWrapper->isHTML; + } + public function isXHTML() { + return $this->documentWrapper->isXHTML; + } + public function isXML() { + return $this->documentWrapper->isXML; + } + /** + * Enter description here... + * + * @link http://docs.jquery.com/Ajax/serialize + * @return string + */ + public function serialize() { + return phpQuery::param($this->serializeArray()); + } + /** + * Enter description here... + * + * @link http://docs.jquery.com/Ajax/serializeArray + * @return array + */ + public function serializeArray($submit = null) { + $source = $this->filter('form, input, select, textarea') + ->find('input, select, textarea') + ->andSelf() + ->not('form'); + $return = array(); +// $source->dumpDie(); + foreach($source as $input) { + $input = phpQuery::pq($input); + if ($input->is('[disabled]')) + continue; + if (!$input->is('[name]')) + continue; + if ($input->is('[type=checkbox]') && !$input->is('[checked]')) + continue; + // jquery diff + if ($submit && $input->is('[type=submit]')) { + if ($submit instanceof DOMELEMENT && ! $input->elements[0]->isSameNode($submit)) + continue; + else if (is_string($submit) && $input->attr('name') != $submit) + continue; + } + $return[] = array( + 'name' => $input->attr('name'), + 'value' => $input->val(), + ); + } + return $return; + } + /** + * @access private + */ + protected function debug($in) { + if (! phpQuery::$debug ) + return; + print('<pre>'); + print_r($in); + // file debug +// file_put_contents(dirname(__FILE__).'/phpQuery.log', print_r($in, true)."\n", FILE_APPEND); + // quite handy debug trace +// if ( is_array($in)) +// print_r(array_slice(debug_backtrace(), 3)); + print("</pre>\n"); + } + /** + * @access private + */ + protected function isRegexp($pattern) { + return in_array( + $pattern[ mb_strlen($pattern)-1 ], + array('^','*','$') + ); + } + /** + * Determines if $char is really a char. + * + * @param string $char + * @return bool + * @todo rewrite me to charcode range ! ;) + * @access private + */ + protected function isChar($char) { + return extension_loaded('mbstring') && phpQuery::$mbstringSupport + ? mb_eregi('\w', $char) + : preg_match('@\w@', $char); + } + /** + * @access private + */ + protected function parseSelector($query) { + // clean spaces + // TODO include this inside parsing ? + $query = trim( + preg_replace('@\s+@', ' ', + preg_replace('@\s*(>|\\+|~)\s*@', '\\1', $query) + ) + ); + $queries = array(array()); + if (! $query) + return $queries; + $return =& $queries[0]; + $specialChars = array('>',' '); +// $specialCharsMapping = array('/' => '>'); + $specialCharsMapping = array(); + $strlen = mb_strlen($query); + $classChars = array('.', '-'); + $pseudoChars = array('-'); + $tagChars = array('*', '|', '-'); + // split multibyte string + // http://code.google.com/p/phpquery/issues/detail?id=76 + $_query = array(); + for ($i=0; $i<$strlen; $i++) + $_query[] = mb_substr($query, $i, 1); + $query = $_query; + // it works, but i dont like it... + $i = 0; + while( $i < $strlen) { + $c = $query[$i]; + $tmp = ''; + // TAG + if ($this->isChar($c) || in_array($c, $tagChars)) { + while(isset($query[$i]) + && ($this->isChar($query[$i]) || in_array($query[$i], $tagChars))) { + $tmp .= $query[$i]; + $i++; + } + $return[] = $tmp; + // IDs + } else if ( $c == '#') { + $i++; + while( isset($query[$i]) && ($this->isChar($query[$i]) || $query[$i] == '-')) { + $tmp .= $query[$i]; + $i++; + } + $return[] = '#'.$tmp; + // SPECIAL CHARS + } else if (in_array($c, $specialChars)) { + $return[] = $c; + $i++; + // MAPPED SPECIAL MULTICHARS +// } else if ( $c.$query[$i+1] == '//') { +// $return[] = ' '; +// $i = $i+2; + // MAPPED SPECIAL CHARS + } else if ( isset($specialCharsMapping[$c])) { + $return[] = $specialCharsMapping[$c]; + $i++; + // COMMA + } else if ( $c == ',') { + $queries[] = array(); + $return =& $queries[ count($queries)-1 ]; + $i++; + while( isset($query[$i]) && $query[$i] == ' ') + $i++; + // CLASSES + } else if ($c == '.') { + while( isset($query[$i]) && ($this->isChar($query[$i]) || in_array($query[$i], $classChars))) { + $tmp .= $query[$i]; + $i++; + } + $return[] = $tmp; + // ~ General Sibling Selector + } else if ($c == '~') { + $spaceAllowed = true; + $tmp .= $query[$i++]; + while( isset($query[$i]) + && ($this->isChar($query[$i]) + || in_array($query[$i], $classChars) + || $query[$i] == '*' + || ($query[$i] == ' ' && $spaceAllowed) + )) { + if ($query[$i] != ' ') + $spaceAllowed = false; + $tmp .= $query[$i]; + $i++; + } + $return[] = $tmp; + // + Adjacent sibling selectors + } else if ($c == '+') { + $spaceAllowed = true; + $tmp .= $query[$i++]; + while( isset($query[$i]) + && ($this->isChar($query[$i]) + || in_array($query[$i], $classChars) + || $query[$i] == '*' + || ($spaceAllowed && $query[$i] == ' ') + )) { + if ($query[$i] != ' ') + $spaceAllowed = false; + $tmp .= $query[$i]; + $i++; + } + $return[] = $tmp; + // ATTRS + } else if ($c == '[') { + $stack = 1; + $tmp .= $c; + while( isset($query[++$i])) { + $tmp .= $query[$i]; + if ( $query[$i] == '[') { + $stack++; + } else if ( $query[$i] == ']') { + $stack--; + if (! $stack ) + break; + } + } + $return[] = $tmp; + $i++; + // PSEUDO CLASSES + } else if ($c == ':') { + $stack = 1; + $tmp .= $query[$i++]; + while( isset($query[$i]) && ($this->isChar($query[$i]) || in_array($query[$i], $pseudoChars))) { + $tmp .= $query[$i]; + $i++; + } + // with arguments ? + if ( isset($query[$i]) && $query[$i] == '(') { + $tmp .= $query[$i]; + $stack = 1; + while( isset($query[++$i])) { + $tmp .= $query[$i]; + if ( $query[$i] == '(') { + $stack++; + } else if ( $query[$i] == ')') { + $stack--; + if (! $stack ) + break; + } + } + $return[] = $tmp; + $i++; + } else { + $return[] = $tmp; + } + } else { + $i++; + } + } + foreach($queries as $k => $q) { + if (isset($q[0])) { + if (isset($q[0][0]) && $q[0][0] == ':') + array_unshift($queries[$k], '*'); + if ($q[0] != '>') + array_unshift($queries[$k], ' '); + } + } + return $queries; + } + /** + * Return matched DOM nodes. + * + * @param int $index + * @return array|DOMElement Single DOMElement or array of DOMElement. + */ + public function get($index = null, $callback1 = null, $callback2 = null, $callback3 = null) { + $return = isset($index) + ? (isset($this->elements[$index]) ? $this->elements[$index] : null) + : $this->elements; + // pass thou callbacks + $args = func_get_args(); + $args = array_slice($args, 1); + foreach($args as $callback) { + if (is_array($return)) + foreach($return as $k => $v) + $return[$k] = phpQuery::callbackRun($callback, array($v)); + else + $return = phpQuery::callbackRun($callback, array($return)); + } + return $return; + } + /** + * Return matched DOM nodes. + * jQuery difference. + * + * @param int $index + * @return array|string Returns string if $index != null + * @todo implement callbacks + * @todo return only arrays ? + * @todo maybe other name... + */ + public function getString($index = null, $callback1 = null, $callback2 = null, $callback3 = null) { + if ($index) + $return = $this->eq($index)->text(); + else { + $return = array(); + for($i = 0; $i < $this->size(); $i++) { + $return[] = $this->eq($i)->text(); + } + } + // pass thou callbacks + $args = func_get_args(); + $args = array_slice($args, 1); + foreach($args as $callback) { + $return = phpQuery::callbackRun($callback, array($return)); + } + return $return; + } + /** + * Return matched DOM nodes. + * jQuery difference. + * + * @param int $index + * @return array|string Returns string if $index != null + * @todo implement callbacks + * @todo return only arrays ? + * @todo maybe other name... + */ + public function getStrings($index = null, $callback1 = null, $callback2 = null, $callback3 = null) { + if ($index) + $return = $this->eq($index)->text(); + else { + $return = array(); + for($i = 0; $i < $this->size(); $i++) { + $return[] = $this->eq($i)->text(); + } + // pass thou callbacks + $args = func_get_args(); + $args = array_slice($args, 1); + } + foreach($args as $callback) { + if (is_array($return)) + foreach($return as $k => $v) + $return[$k] = phpQuery::callbackRun($callback, array($v)); + else + $return = phpQuery::callbackRun($callback, array($return)); + } + return $return; + } + /** + * Returns new instance of actual class. + * + * @param array $newStack Optional. Will replace old stack with new and move old one to history.c + */ + public function newInstance($newStack = null) { + $class = get_class($this); + // support inheritance by passing old object to overloaded constructor + $new = $class != 'phpQuery' + ? new $class($this, $this->getDocumentID()) + : new phpQueryObject($this->getDocumentID()); + $new->previous = $this; + if (is_null($newStack)) { + $new->elements = $this->elements; + if ($this->elementsBackup) + $this->elements = $this->elementsBackup; + } else if (is_string($newStack)) { + $new->elements = phpQuery::pq($newStack, $this->getDocumentID())->stack(); + } else { + $new->elements = $newStack; + } + return $new; + } + /** + * Enter description here... + * + * In the future, when PHP will support XLS 2.0, then we would do that this way: + * contains(tokenize(@class, '\s'), "something") + * @param unknown_type $class + * @param unknown_type $node + * @return boolean + * @access private + */ + protected function matchClasses($class, $node) { + // multi-class + if ( mb_strpos($class, '.', 1)) { + $classes = explode('.', substr($class, 1)); + $classesCount = count( $classes ); + $nodeClasses = explode(' ', $node->getAttribute('class') ); + $nodeClassesCount = count( $nodeClasses ); + if ( $classesCount > $nodeClassesCount ) + return false; + $diff = count( + array_diff( + $classes, + $nodeClasses + ) + ); + if (! $diff ) + return true; + // single-class + } else { + return in_array( + // strip leading dot from class name + substr($class, 1), + // get classes for element as array + explode(' ', $node->getAttribute('class') ) + ); + } + } + /** + * @access private + */ + protected function runQuery($XQuery, $selector = null, $compare = null) { + if ($compare && ! method_exists($this, $compare)) + return false; + $stack = array(); + if (! $this->elements) + $this->debug('Stack empty, skipping...'); +// var_dump($this->elements[0]->nodeType); + // element, document + foreach($this->stack(array(1, 9, 13)) as $k => $stackNode) { + $detachAfter = false; + // to work on detached nodes we need temporary place them somewhere + // thats because context xpath queries sucks ;] + $testNode = $stackNode; + while ($testNode) { + if (! $testNode->parentNode && ! $this->isRoot($testNode)) { + $this->root->appendChild($testNode); + $detachAfter = $testNode; + break; + } + $testNode = isset($testNode->parentNode) + ? $testNode->parentNode + : null; + } + // XXX tmp ? + $xpath = $this->documentWrapper->isXHTML + ? $this->getNodeXpath($stackNode, 'html') + : $this->getNodeXpath($stackNode); + // FIXME pseudoclasses-only query, support XML + $query = $XQuery == '//' && $xpath == '/html[1]' + ? '//*' + : $xpath.$XQuery; + $this->debug("XPATH: {$query}"); + // run query, get elements + $nodes = $this->xpath->query($query); + $this->debug("QUERY FETCHED"); + if (! $nodes->length ) + $this->debug('Nothing found'); + $debug = array(); + foreach($nodes as $node) { + $matched = false; + if ( $compare) { + phpQuery::$debug ? + $this->debug("Found: ".$this->whois( $node ).", comparing with {$compare}()") + : null; + $phpQueryDebug = phpQuery::$debug; + phpQuery::$debug = false; + // TODO ??? use phpQuery::callbackRun() + if (call_user_func_array(array($this, $compare), array($selector, $node))) + $matched = true; + phpQuery::$debug = $phpQueryDebug; + } else { + $matched = true; + } + if ( $matched) { + if (phpQuery::$debug) + $debug[] = $this->whois( $node ); + $stack[] = $node; + } + } + if (phpQuery::$debug) { + $this->debug("Matched ".count($debug).": ".implode(', ', $debug)); + } + if ($detachAfter) + $this->root->removeChild($detachAfter); + } + $this->elements = $stack; + } + /** + * Enter description here... + * + * @return phpQueryObject|QueryTemplatesSource|QueryTemplatesParse|QueryTemplatesSourceQuery + */ + public function find($selectors, $context = null, $noHistory = false) { + if (!$noHistory) + // backup last stack /for end()/ + $this->elementsBackup = $this->elements; + // allow to define context + // TODO combine code below with phpQuery::pq() context guessing code + // as generic function + if ($context) { + if (! is_array($context) && $context instanceof DOMELEMENT) + $this->elements = array($context); + else if (is_array($context)) { + $this->elements = array(); + foreach ($context as $c) + if ($c instanceof DOMELEMENT) + $this->elements[] = $c; + } else if ( $context instanceof self ) + $this->elements = $context->elements; + } + $queries = $this->parseSelector($selectors); + $this->debug(array('FIND', $selectors, $queries)); + $XQuery = ''; + // remember stack state because of multi-queries + $oldStack = $this->elements; + // here we will be keeping found elements + $stack = array(); + foreach($queries as $selector) { + $this->elements = $oldStack; + $delimiterBefore = false; + foreach($selector as $s) { + // TAG + $isTag = extension_loaded('mbstring') && phpQuery::$mbstringSupport + ? mb_ereg_match('^[\w|\||-]+$', $s) || $s == '*' + : preg_match('@^[\w|\||-]+$@', $s) || $s == '*'; + if ($isTag) { + if ($this->isXML()) { + // namespace support + if (mb_strpos($s, '|') !== false) { + $ns = $tag = null; + list($ns, $tag) = explode('|', $s); + $XQuery .= "$ns:$tag"; + } else if ($s == '*') { + $XQuery .= "*"; + } else { + $XQuery .= "*[local-name()='$s']"; + } + } else { + $XQuery .= $s; + } + // ID + } else if ($s[0] == '#') { + if ($delimiterBefore) + $XQuery .= '*'; + $XQuery .= "[@id='".substr($s, 1)."']"; + // ATTRIBUTES + } else if ($s[0] == '[') { + if ($delimiterBefore) + $XQuery .= '*'; + // strip side brackets + $attr = trim($s, ']['); + $execute = false; + // attr with specifed value + if (mb_strpos($s, '=')) { + $value = null; + list($attr, $value) = explode('=', $attr); + $value = trim($value, "'\""); + if ($this->isRegexp($attr)) { + // cut regexp character + $attr = substr($attr, 0, -1); + $execute = true; + $XQuery .= "[@{$attr}]"; + } else { + $XQuery .= "[@{$attr}='{$value}']"; + } + // attr without specified value + } else { + $XQuery .= "[@{$attr}]"; + } + if ($execute) { + $this->runQuery($XQuery, $s, 'is'); + $XQuery = ''; + if (! $this->length()) + break; + } + // CLASSES + } else if ($s[0] == '.') { + // TODO use return $this->find("./self::*[contains(concat(\" \",@class,\" \"), \" $class \")]"); + // thx wizDom ;) + if ($delimiterBefore) + $XQuery .= '*'; + $XQuery .= '[@class]'; + $this->runQuery($XQuery, $s, 'matchClasses'); + $XQuery = ''; + if (! $this->length() ) + break; + // ~ General Sibling Selector + } else if ($s[0] == '~') { + $this->runQuery($XQuery); + $XQuery = ''; + $this->elements = $this + ->siblings( + substr($s, 1) + )->elements; + if (! $this->length() ) + break; + // + Adjacent sibling selectors + } else if ($s[0] == '+') { + // TODO /following-sibling:: + $this->runQuery($XQuery); + $XQuery = ''; + $subSelector = substr($s, 1); + $subElements = $this->elements; + $this->elements = array(); + foreach($subElements as $node) { + // search first DOMElement sibling + $test = $node->nextSibling; + while($test && ! ($test instanceof DOMELEMENT)) + $test = $test->nextSibling; + if ($test && $this->is($subSelector, $test)) + $this->elements[] = $test; + } + if (! $this->length() ) + break; + // PSEUDO CLASSES + } else if ($s[0] == ':') { + // TODO optimization for :first :last + if ($XQuery) { + $this->runQuery($XQuery); + $XQuery = ''; + } + if (! $this->length()) + break; + $this->pseudoClasses($s); + if (! $this->length()) + break; + // DIRECT DESCENDANDS + } else if ($s == '>') { + $XQuery .= '/'; + $delimiterBefore = 2; + // ALL DESCENDANDS + } else if ($s == ' ') { + $XQuery .= '//'; + $delimiterBefore = 2; + // ERRORS + } else { + phpQuery::debug("Unrecognized token '$s'"); + } + $delimiterBefore = $delimiterBefore === 2; + } + // run query if any + if ($XQuery && $XQuery != '//') { + $this->runQuery($XQuery); + $XQuery = ''; + } + foreach($this->elements as $node) + if (! $this->elementsContainsNode($node, $stack)) + $stack[] = $node; + } + $this->elements = $stack; + return $this->newInstance(); + } + /** + * @todo create API for classes with pseudoselectors + * @access private + */ + protected function pseudoClasses($class) { + // TODO clean args parsing ? + $class = ltrim($class, ':'); + $haveArgs = mb_strpos($class, '('); + if ($haveArgs !== false) { + $args = substr($class, $haveArgs+1, -1); + $class = substr($class, 0, $haveArgs); + } + switch($class) { + case 'even': + case 'odd': + $stack = array(); + foreach($this->elements as $i => $node) { + if ($class == 'even' && ($i%2) == 0) + $stack[] = $node; + else if ( $class == 'odd' && $i % 2 ) + $stack[] = $node; + } + $this->elements = $stack; + break; + case 'eq': + $k = intval($args); + $this->elements = isset( $this->elements[$k] ) + ? array( $this->elements[$k] ) + : array(); + break; + case 'gt': + $this->elements = array_slice($this->elements, $args+1); + break; + case 'lt': + $this->elements = array_slice($this->elements, 0, $args+1); + break; + case 'first': + if (isset($this->elements[0])) + $this->elements = array($this->elements[0]); + break; + case 'last': + if ($this->elements) + $this->elements = array($this->elements[count($this->elements)-1]); + break; + /*case 'parent': + $stack = array(); + foreach($this->elements as $node) { + if ( $node->childNodes->length ) + $stack[] = $node; + } + $this->elements = $stack; + break;*/ + case 'contains': + $text = trim($args, "\"'"); + $stack = array(); + foreach($this->elements as $node) { + if (mb_stripos($node->textContent, $text) === false) + continue; + $stack[] = $node; + } + $this->elements = $stack; + break; + case 'not': + $selector = self::unQuote($args); + $this->elements = $this->not($selector)->stack(); + break; + case 'slice': + // TODO jQuery difference ? + $args = explode(',', + str_replace(', ', ',', trim($args, "\"'")) + ); + $start = $args[0]; + $end = isset($args[1]) + ? $args[1] + : null; + if ($end > 0) + $end = $end-$start; + $this->elements = array_slice($this->elements, $start, $end); + break; + case 'has': + $selector = trim($args, "\"'"); + $stack = array(); + foreach($this->stack(1) as $el) { + if ($this->find($selector, $el, true)->length) + $stack[] = $el; + } + $this->elements = $stack; + break; + case 'submit': + case 'reset': + $this->elements = phpQuery::merge( + $this->map(array($this, 'is'), + "input[type=$class]", new CallbackParam() + ), + $this->map(array($this, 'is'), + "button[type=$class]", new CallbackParam() + ) + ); + break; +// $stack = array(); +// foreach($this->elements as $node) +// if ($node->is('input[type=submit]') || $node->is('button[type=submit]')) +// $stack[] = $el; +// $this->elements = $stack; + case 'input': + $this->elements = $this->map( + array($this, 'is'), + 'input', new CallbackParam() + )->elements; + break; + case 'password': + case 'checkbox': + case 'radio': + case 'hidden': + case 'image': + case 'file': + $this->elements = $this->map( + array($this, 'is'), + "input[type=$class]", new CallbackParam() + )->elements; + break; + case 'parent': + $this->elements = $this->map( + create_function('$node', ' + return $node instanceof DOMELEMENT && $node->childNodes->length + ? $node : null;') + )->elements; + break; + case 'empty': + $this->elements = $this->map( + create_function('$node', ' + return $node instanceof DOMELEMENT && $node->childNodes->length + ? null : $node;') + )->elements; + break; + case 'disabled': + case 'selected': + case 'checked': + $this->elements = $this->map( + array($this, 'is'), + "[$class]", new CallbackParam() + )->elements; + break; + case 'enabled': + $this->elements = $this->map( + create_function('$node', ' + return pq($node)->not(":disabled") ? $node : null;') + )->elements; + break; + case 'header': + $this->elements = $this->map( + create_function('$node', + '$isHeader = isset($node->tagName) && in_array($node->tagName, array( + "h1", "h2", "h3", "h4", "h5", "h6", "h7" + )); + return $isHeader + ? $node + : null;') + )->elements; +// $this->elements = $this->map( +// create_function('$node', '$node = pq($node); +// return $node->is("h1") +// || $node->is("h2") +// || $node->is("h3") +// || $node->is("h4") +// || $node->is("h5") +// || $node->is("h6") +// || $node->is("h7") +// ? $node +// : null;') +// )->elements; + break; + case 'only-child': + $this->elements = $this->map( + create_function('$node', + 'return pq($node)->siblings()->size() == 0 ? $node : null;') + )->elements; + break; + case 'first-child': + $this->elements = $this->map( + create_function('$node', 'return pq($node)->prevAll()->size() == 0 ? $node : null;') + )->elements; + break; + case 'last-child': + $this->elements = $this->map( + create_function('$node', 'return pq($node)->nextAll()->size() == 0 ? $node : null;') + )->elements; + break; + case 'nth-child': + $param = trim($args, "\"'"); + if (! $param) + break; + // nth-child(n+b) to nth-child(1n+b) + if ($param{0} == 'n') + $param = '1'.$param; + // :nth-child(index/even/odd/equation) + if ($param == 'even' || $param == 'odd') + $mapped = $this->map( + create_function('$node, $param', + '$index = pq($node)->prevAll()->size()+1; + if ($param == "even" && ($index%2) == 0) + return $node; + else if ($param == "odd" && $index%2 == 1) + return $node; + else + return null;'), + new CallbackParam(), $param + ); + else if (mb_strlen($param) > 1 && $param{1} == 'n') + // an+b + $mapped = $this->map( + create_function('$node, $param', + '$prevs = pq($node)->prevAll()->size(); + $index = 1+$prevs; + $b = mb_strlen($param) > 3 + ? $param{3} + : 0; + $a = $param{0}; + if ($b && $param{2} == "-") + $b = -$b; + if ($a > 0) { + return ($index-$b)%$a == 0 + ? $node + : null; + phpQuery::debug($a."*".floor($index/$a)."+$b-1 == ".($a*floor($index/$a)+$b-1)." ?= $prevs"); + return $a*floor($index/$a)+$b-1 == $prevs + ? $node + : null; + } else if ($a == 0) + return $index == $b + ? $node + : null; + else + // negative value + return $index <= $b + ? $node + : null; +// if (! $b) +// return $index%$a == 0 +// ? $node +// : null; +// else +// return ($index-$b)%$a == 0 +// ? $node +// : null; + '), + new CallbackParam(), $param + ); + else + // index + $mapped = $this->map( + create_function('$node, $index', + '$prevs = pq($node)->prevAll()->size(); + if ($prevs && $prevs == $index-1) + return $node; + else if (! $prevs && $index == 1) + return $node; + else + return null;'), + new CallbackParam(), $param + ); + $this->elements = $mapped->elements; + break; + default: + $this->debug("Unknown pseudoclass '{$class}', skipping..."); + } + } + /** + * @access private + */ + protected function __pseudoClassParam($paramsString) { + // TODO; + } + /** + * Enter description here... + * + * @return phpQueryObject|QueryTemplatesSource|QueryTemplatesParse|QueryTemplatesSourceQuery + */ + public function is($selector, $nodes = null) { + phpQuery::debug(array("Is:", $selector)); + if (! $selector) + return false; + $oldStack = $this->elements; + $returnArray = false; + if ($nodes && is_array($nodes)) { + $this->elements = $nodes; + } else if ($nodes) + $this->elements = array($nodes); + $this->filter($selector, true); + $stack = $this->elements; + $this->elements = $oldStack; + if ($nodes) + return $stack ? $stack : null; + return (bool)count($stack); + } + /** + * Enter description here... + * jQuery difference. + * + * Callback: + * - $index int + * - $node DOMNode + * + * @return phpQueryObject|QueryTemplatesSource|QueryTemplatesParse|QueryTemplatesSourceQuery + * @link http://docs.jquery.com/Traversing/filter + */ + public function filterCallback($callback, $_skipHistory = false) { + if (! $_skipHistory) { + $this->elementsBackup = $this->elements; + $this->debug("Filtering by callback"); + } + $newStack = array(); + foreach($this->elements as $index => $node) { + $result = phpQuery::callbackRun($callback, array($index, $node)); + if (is_null($result) || (! is_null($result) && $result)) + $newStack[] = $node; + } + $this->elements = $newStack; + return $_skipHistory + ? $this + : $this->newInstance(); + } + /** + * Enter description here... + * + * @return phpQueryObject|QueryTemplatesSource|QueryTemplatesParse|QueryTemplatesSourceQuery + * @link http://docs.jquery.com/Traversing/filter + */ + public function filter($selectors, $_skipHistory = false) { + if ($selectors instanceof Callback OR $selectors instanceof Closure) + return $this->filterCallback($selectors, $_skipHistory); + if (! $_skipHistory) + $this->elementsBackup = $this->elements; + $notSimpleSelector = array(' ', '>', '~', '+', '/'); + if (! is_array($selectors)) + $selectors = $this->parseSelector($selectors); + if (! $_skipHistory) + $this->debug(array("Filtering:", $selectors)); + $finalStack = array(); + foreach($selectors as $selector) { + $stack = array(); + if (! $selector) + break; + // avoid first space or / + if (in_array($selector[0], $notSimpleSelector)) + $selector = array_slice($selector, 1); + // PER NODE selector chunks + foreach($this->stack() as $node) { + $break = false; + foreach($selector as $s) { + if (!($node instanceof DOMELEMENT)) { + // all besides DOMElement + if ( $s[0] == '[') { + $attr = trim($s, '[]'); + if ( mb_strpos($attr, '=')) { + list( $attr, $val ) = explode('=', $attr); + if ($attr == 'nodeType' && $node->nodeType != $val) + $break = true; + } + } else + $break = true; + } else { + // DOMElement only + // ID + if ( $s[0] == '#') { + if ( $node->getAttribute('id') != substr($s, 1) ) + $break = true; + // CLASSES + } else if ( $s[0] == '.') { + if (! $this->matchClasses( $s, $node ) ) + $break = true; + // ATTRS + } else if ( $s[0] == '[') { + // strip side brackets + $attr = trim($s, '[]'); + if (mb_strpos($attr, '=')) { + list($attr, $val) = explode('=', $attr); + $val = self::unQuote($val); + if ($attr == 'nodeType') { + if ($val != $node->nodeType) + $break = true; + } else if ($this->isRegexp($attr)) { + $val = extension_loaded('mbstring') && phpQuery::$mbstringSupport + ? quotemeta(trim($val, '"\'')) + : preg_quote(trim($val, '"\''), '@'); + // switch last character + switch( substr($attr, -1)) { + // quotemeta used insted of preg_quote + // http://code.google.com/p/phpquery/issues/detail?id=76 + case '^': + $pattern = '^'.$val; + break; + case '*': + $pattern = '.*'.$val.'.*'; + break; + case '$': + $pattern = '.*'.$val.'$'; + break; + } + // cut last character + $attr = substr($attr, 0, -1); + $isMatch = extension_loaded('mbstring') && phpQuery::$mbstringSupport + ? mb_ereg_match($pattern, $node->getAttribute($attr)) + : preg_match("@{$pattern}@", $node->getAttribute($attr)); + if (! $isMatch) + $break = true; + } else if ($node->getAttribute($attr) != $val) + $break = true; + } else if (! $node->hasAttribute($attr)) + $break = true; + // PSEUDO CLASSES + } else if ( $s[0] == ':') { + // skip + // TAG + } else if (trim($s)) { + if ($s != '*') { + // TODO namespaces + if (isset($node->tagName)) { + if ($node->tagName != $s) + $break = true; + } else if ($s == 'html' && ! $this->isRoot($node)) + $break = true; + } + // AVOID NON-SIMPLE SELECTORS + } else if (in_array($s, $notSimpleSelector)) { + $break = true; + $this->debug(array('Skipping non simple selector', $selector)); + } + } + if ($break) + break; + } + // if element passed all chunks of selector - add it to new stack + if (! $break ) + $stack[] = $node; + } + $tmpStack = $this->elements; + $this->elements = $stack; + // PER ALL NODES selector chunks + foreach($selector as $s) + // PSEUDO CLASSES + if ($s[0] == ':') + $this->pseudoClasses($s); + foreach($this->elements as $node) + // XXX it should be merged without duplicates + // but jQuery doesnt do that + $finalStack[] = $node; + $this->elements = $tmpStack; + } + $this->elements = $finalStack; + if ($_skipHistory) { + return $this; + } else { + $this->debug("Stack length after filter(): ".count($finalStack)); + return $this->newInstance(); + } + } + /** + * + * @param $value + * @return unknown_type + * @TODO implement in all methods using passed parameters + */ + protected static function unQuote($value) { + return $value[0] == '\'' || $value[0] == '"' + ? substr($value, 1, -1) + : $value; + } + /** + * Enter description here... + * + * @link http://docs.jquery.com/Ajax/load + * @return phpQuery|QueryTemplatesSource|QueryTemplatesParse|QueryTemplatesSourceQuery + * @todo Support $selector + */ + public function load($url, $data = null, $callback = null) { + if ($data && ! is_array($data)) { + $callback = $data; + $data = null; + } + if (mb_strpos($url, ' ') !== false) { + $matches = null; + if (extension_loaded('mbstring') && phpQuery::$mbstringSupport) + mb_ereg('^([^ ]+) (.*)$', $url, $matches); + else + preg_match('^([^ ]+) (.*)$', $url, $matches); + $url = $matches[1]; + $selector = $matches[2]; + // FIXME this sucks, pass as callback param + $this->_loadSelector = $selector; + } + $ajax = array( + 'url' => $url, + 'type' => $data ? 'POST' : 'GET', + 'data' => $data, + 'complete' => $callback, + 'success' => array($this, '__loadSuccess') + ); + phpQuery::ajax($ajax); + return $this; + } + /** + * @access private + * @param $html + * @return unknown_type + */ + public function __loadSuccess($html) { + if ($this->_loadSelector) { + $html = phpQuery::newDocument($html)->find($this->_loadSelector); + unset($this->_loadSelector); + } + foreach($this->stack(1) as $node) { + phpQuery::pq($node, $this->getDocumentID()) + ->markup($html); + } + } + /** + * Enter description here... + * + * @return phpQuery|QueryTemplatesSource|QueryTemplatesParse|QueryTemplatesSourceQuery + * @todo + */ + public function css() { + // TODO + return $this; + } + /** + * @todo + * + */ + public function show(){ + // TODO + return $this; + } + /** + * @todo + * + */ + public function hide(){ + // TODO + return $this; + } + /** + * Trigger a type of event on every matched element. + * + * @param unknown_type $type + * @param unknown_type $data + * @return phpQueryObject|QueryTemplatesSource|QueryTemplatesParse|QueryTemplatesSourceQuery + * @TODO support more than event in $type (space-separated) + */ + public function trigger($type, $data = array()) { + foreach($this->elements as $node) + phpQueryEvents::trigger($this->getDocumentID(), $type, $data, $node); + return $this; + } + /** + * This particular method triggers all bound event handlers on an element (for a specific event type) WITHOUT executing the browsers default actions. + * + * @param unknown_type $type + * @param unknown_type $data + * @return phpQueryObject|QueryTemplatesSource|QueryTemplatesParse|QueryTemplatesSourceQuery + * @TODO + */ + public function triggerHandler($type, $data = array()) { + // TODO; + } + /** + * Binds a handler to one or more events (like click) for each matched element. + * Can also bind custom events. + * + * @param unknown_type $type + * @param unknown_type $data Optional + * @param unknown_type $callback + * @return phpQueryObject|QueryTemplatesSource|QueryTemplatesParse|QueryTemplatesSourceQuery + * @TODO support '!' (exclusive) events + * @TODO support more than event in $type (space-separated) + */ + public function bind($type, $data, $callback = null) { + // TODO check if $data is callable, not using is_callable + if (! isset($callback)) { + $callback = $data; + $data = null; + } + foreach($this->elements as $node) + phpQueryEvents::add($this->getDocumentID(), $node, $type, $data, $callback); + return $this; + } + /** + * Enter description here... + * + * @param unknown_type $type + * @param unknown_type $callback + * @return unknown + * @TODO namespace events + * @TODO support more than event in $type (space-separated) + */ + public function unbind($type = null, $callback = null) { + foreach($this->elements as $node) + phpQueryEvents::remove($this->getDocumentID(), $node, $type, $callback); + return $this; + } + /** + * Enter description here... + * + * @return phpQueryObject|QueryTemplatesSource|QueryTemplatesParse|QueryTemplatesSourceQuery + */ + public function change($callback = null) { + if ($callback) + return $this->bind('change', $callback); + return $this->trigger('change'); + } + /** + * Enter description here... + * + * @return phpQueryObject|QueryTemplatesSource|QueryTemplatesParse|QueryTemplatesSourceQuery + */ + public function submit($callback = null) { + if ($callback) + return $this->bind('submit', $callback); + return $this->trigger('submit'); + } + /** + * Enter description here... + * + * @return phpQueryObject|QueryTemplatesSource|QueryTemplatesParse|QueryTemplatesSourceQuery + */ + public function click($callback = null) { + if ($callback) + return $this->bind('click', $callback); + return $this->trigger('click'); + } + /** + * Enter description here... + * + * @param String|phpQuery + * @return phpQueryObject|QueryTemplatesSource|QueryTemplatesParse|QueryTemplatesSourceQuery + */ + public function wrapAllOld($wrapper) { + $wrapper = pq($wrapper)->_clone(); + if (! $wrapper->length() || ! $this->length() ) + return $this; + $wrapper->insertBefore($this->elements[0]); + $deepest = $wrapper->elements[0]; + while($deepest->firstChild && $deepest->firstChild instanceof DOMELEMENT) + $deepest = $deepest->firstChild; + pq($deepest)->append($this); + return $this; + } + /** + * Enter description here... + * + * TODO testme... + * @param String|phpQuery + * @return phpQueryObject|QueryTemplatesSource|QueryTemplatesParse|QueryTemplatesSourceQuery + */ + public function wrapAll($wrapper) { + if (! $this->length()) + return $this; + return phpQuery::pq($wrapper, $this->getDocumentID()) + ->clone() + ->insertBefore($this->get(0)) + ->map(array($this, '___wrapAllCallback')) + ->append($this); + } + /** + * + * @param $node + * @return unknown_type + * @access private + */ + public function ___wrapAllCallback($node) { + $deepest = $node; + while($deepest->firstChild && $deepest->firstChild instanceof DOMELEMENT) + $deepest = $deepest->firstChild; + return $deepest; + } + /** + * Enter description here... + * NON JQUERY METHOD + * + * @param String|phpQuery + * @return phpQueryObject|QueryTemplatesSource|QueryTemplatesParse|QueryTemplatesSourceQuery + */ + public function wrapAllPHP($codeBefore, $codeAfter) { + return $this + ->slice(0, 1) + ->beforePHP($codeBefore) + ->end() + ->slice(-1) + ->afterPHP($codeAfter) + ->end(); + } + /** + * Enter description here... + * + * @param String|phpQuery + * @return phpQueryObject|QueryTemplatesSource|QueryTemplatesParse|QueryTemplatesSourceQuery + */ + public function wrap($wrapper) { + foreach($this->stack() as $node) + phpQuery::pq($node, $this->getDocumentID())->wrapAll($wrapper); + return $this; + } + /** + * Enter description here... + * + * @param String|phpQuery + * @return phpQueryObject|QueryTemplatesSource|QueryTemplatesParse|QueryTemplatesSourceQuery + */ + public function wrapPHP($codeBefore, $codeAfter) { + foreach($this->stack() as $node) + phpQuery::pq($node, $this->getDocumentID())->wrapAllPHP($codeBefore, $codeAfter); + return $this; + } + /** + * Enter description here... + * + * @param String|phpQuery + * @return phpQueryObject|QueryTemplatesSource|QueryTemplatesParse|QueryTemplatesSourceQuery + */ + public function wrapInner($wrapper) { + foreach($this->stack() as $node) + phpQuery::pq($node, $this->getDocumentID())->contents()->wrapAll($wrapper); + return $this; + } + /** + * Enter description here... + * + * @param String|phpQuery + * @return phpQueryObject|QueryTemplatesSource|QueryTemplatesParse|QueryTemplatesSourceQuery + */ + public function wrapInnerPHP($codeBefore, $codeAfter) { + foreach($this->stack(1) as $node) + phpQuery::pq($node, $this->getDocumentID())->contents() + ->wrapAllPHP($codeBefore, $codeAfter); + return $this; + } + /** + * Enter description here... + * + * @return phpQueryObject|QueryTemplatesSource|QueryTemplatesParse|QueryTemplatesSourceQuery + * @testme Support for text nodes + */ + public function contents() { + $stack = array(); + foreach($this->stack(1) as $el) { + // FIXME (fixed) http://code.google.com/p/phpquery/issues/detail?id=56 +// if (! isset($el->childNodes)) +// continue; + foreach($el->childNodes as $node) { + $stack[] = $node; + } + } + return $this->newInstance($stack); + } + /** + * Enter description here... + * + * jQuery difference. + * + * @return phpQueryObject|QueryTemplatesSource|QueryTemplatesParse|QueryTemplatesSourceQuery + */ + public function contentsUnwrap() { + foreach($this->stack(1) as $node) { + if (! $node->parentNode ) + continue; + $childNodes = array(); + // any modification in DOM tree breaks childNodes iteration, so cache them first + foreach($node->childNodes as $chNode ) + $childNodes[] = $chNode; + foreach($childNodes as $chNode ) +// $node->parentNode->appendChild($chNode); + $node->parentNode->insertBefore($chNode, $node); + $node->parentNode->removeChild($node); + } + return $this; + } + /** + * Enter description here... + * + * jQuery difference. + */ + public function switchWith($markup) { + $markup = pq($markup, $this->getDocumentID()); + $content = null; + foreach($this->stack(1) as $node) { + pq($node) + ->contents()->toReference($content)->end() + ->replaceWith($markup->clone()->append($content)); + } + return $this; + } + /** + * Enter description here... + * + * @return phpQueryObject|QueryTemplatesSource|QueryTemplatesParse|QueryTemplatesSourceQuery + */ + public function eq($num) { + $oldStack = $this->elements; + $this->elementsBackup = $this->elements; + $this->elements = array(); + if ( isset($oldStack[$num]) ) + $this->elements[] = $oldStack[$num]; + return $this->newInstance(); + } + /** + * Enter description here... + * + * @return phpQueryObject|QueryTemplatesSource|QueryTemplatesParse|QueryTemplatesSourceQuery + */ + public function size() { + return count($this->elements); + } + /** + * Enter description here... + * + * @return phpQueryObject|QueryTemplatesSource|QueryTemplatesParse|QueryTemplatesSourceQuery + * @deprecated Use length as attribute + */ + public function length() { + return $this->size(); + } + public function count() { + return $this->size(); + } + /** + * Enter description here... + * + * @return phpQueryObject|QueryTemplatesSource|QueryTemplatesParse|QueryTemplatesSourceQuery + * @todo $level + */ + public function end($level = 1) { +// $this->elements = array_pop( $this->history ); +// return $this; +// $this->previous->DOM = $this->DOM; +// $this->previous->XPath = $this->XPath; + return $this->previous + ? $this->previous + : $this; + } + /** + * Enter description here... + * Normal use ->clone() . + * + * @return phpQueryObject|QueryTemplatesSource|QueryTemplatesParse|QueryTemplatesSourceQuery + * @access private + */ + public function _clone() { + $newStack = array(); + //pr(array('copy... ', $this->whois())); + //$this->dumpHistory('copy'); + $this->elementsBackup = $this->elements; + foreach($this->elements as $node) { + $newStack[] = $node->cloneNode(true); + } + $this->elements = $newStack; + return $this->newInstance(); + } + /** + * Enter description here... + * + * @return phpQueryObject|QueryTemplatesSource|QueryTemplatesParse|QueryTemplatesSourceQuery + */ + public function replaceWithPHP($code) { + return $this->replaceWith(phpQuery::php($code)); + } + /** + * Enter description here... + * + * @param String|phpQuery $content + * @link http://docs.jquery.com/Manipulation/replaceWith#content + * @return phpQueryObject|QueryTemplatesSource|QueryTemplatesParse|QueryTemplatesSourceQuery + */ + public function replaceWith($content) { + return $this->after($content)->remove(); + } + /** + * Enter description here... + * + * @param String $selector + * @return phpQueryObject|QueryTemplatesSource|QueryTemplatesParse|QueryTemplatesSourceQuery + * @todo this works ? + */ + public function replaceAll($selector) { + foreach(phpQuery::pq($selector, $this->getDocumentID()) as $node) + phpQuery::pq($node, $this->getDocumentID()) + ->after($this->_clone()) + ->remove(); + return $this; + } + /** + * Enter description here... + * + * @return phpQueryObject|QueryTemplatesSource|QueryTemplatesParse|QueryTemplatesSourceQuery + */ + public function remove($selector = null) { + $loop = $selector + ? $this->filter($selector)->elements + : $this->elements; + foreach($loop as $node) { + if (! $node->parentNode ) + continue; + if (isset($node->tagName)) + $this->debug("Removing '{$node->tagName}'"); + $node->parentNode->removeChild($node); + // Mutation event + $event = new DOMEvent(array( + 'target' => $node, + 'type' => 'DOMNodeRemoved' + )); + phpQueryEvents::trigger($this->getDocumentID(), + $event->type, array($event), $node + ); + } + return $this; + } + protected function markupEvents($newMarkup, $oldMarkup, $node) { + if ($node->tagName == 'textarea' && $newMarkup != $oldMarkup) { + $event = new DOMEvent(array( + 'target' => $node, + 'type' => 'change' + )); + phpQueryEvents::trigger($this->getDocumentID(), + $event->type, array($event), $node + ); + } + } + /** + * jQuey difference + * + * @param $markup + * @return unknown_type + * @TODO trigger change event for textarea + */ + public function markup($markup = null, $callback1 = null, $callback2 = null, $callback3 = null) { + $args = func_get_args(); + if ($this->documentWrapper->isXML) + return call_user_func_array(array($this, 'xml'), $args); + else + return call_user_func_array(array($this, 'html'), $args); + } + /** + * jQuey difference + * + * @param $markup + * @return unknown_type + */ + public function markupOuter($callback1 = null, $callback2 = null, $callback3 = null) { + $args = func_get_args(); + if ($this->documentWrapper->isXML) + return call_user_func_array(array($this, 'xmlOuter'), $args); + else + return call_user_func_array(array($this, 'htmlOuter'), $args); + } + /** + * Enter description here... + * + * @param unknown_type $html + * @return string|phpQuery|QueryTemplatesSource|QueryTemplatesParse|QueryTemplatesSourceQuery + * @TODO force html result + */ + public function html($html = null, $callback1 = null, $callback2 = null, $callback3 = null) { + if (isset($html)) { + // INSERT + $nodes = $this->documentWrapper->import($html); + $this->empty(); + foreach($this->stack(1) as $alreadyAdded => $node) { + // for now, limit events for textarea + if (($this->isXHTML() || $this->isHTML()) && $node->tagName == 'textarea') + $oldHtml = pq($node, $this->getDocumentID())->markup(); + foreach($nodes as $newNode) { + $node->appendChild($alreadyAdded + ? $newNode->cloneNode(true) + : $newNode + ); + } + // for now, limit events for textarea + if (($this->isXHTML() || $this->isHTML()) && $node->tagName == 'textarea') + $this->markupEvents($html, $oldHtml, $node); + } + return $this; + } else { + // FETCH + $return = $this->documentWrapper->markup($this->elements, true); + $args = func_get_args(); + foreach(array_slice($args, 1) as $callback) { + $return = phpQuery::callbackRun($callback, array($return)); + } + return $return; + } + } + /** + * @TODO force xml result + */ + public function xml($xml = null, $callback1 = null, $callback2 = null, $callback3 = null) { + $args = func_get_args(); + return call_user_func_array(array($this, 'html'), $args); + } + /** + * Enter description here... + * @TODO force html result + * + * @return String + */ + public function htmlOuter($callback1 = null, $callback2 = null, $callback3 = null) { + $markup = $this->documentWrapper->markup($this->elements); + // pass thou callbacks + $args = func_get_args(); + foreach($args as $callback) { + $markup = phpQuery::callbackRun($callback, array($markup)); + } + return $markup; + } + /** + * @TODO force xml result + */ + public function xmlOuter($callback1 = null, $callback2 = null, $callback3 = null) { + $args = func_get_args(); + return call_user_func_array(array($this, 'htmlOuter'), $args); + } + public function __toString() { + return $this->markupOuter(); + } + /** + * Just like html(), but returns markup with VALID (dangerous) PHP tags. + * + * @return phpQueryObject|QueryTemplatesSource|QueryTemplatesParse|QueryTemplatesSourceQuery + * @todo support returning markup with PHP tags when called without param + */ + public function php($code = null) { + return $this->markupPHP($code); + } + /** + * Enter description here... + * + * @param $code + * @return unknown_type + */ + public function markupPHP($code = null) { + return isset($code) + ? $this->markup(phpQuery::php($code)) + : phpQuery::markupToPHP($this->markup()); + } + /** + * Enter description here... + * + * @param $code + * @return unknown_type + */ + public function markupOuterPHP() { + return phpQuery::markupToPHP($this->markupOuter()); + } + /** + * Enter description here... + * + * @return phpQueryObject|QueryTemplatesSource|QueryTemplatesParse|QueryTemplatesSourceQuery + */ + public function children($selector = null) { + $stack = array(); + foreach($this->stack(1) as $node) { +// foreach($node->getElementsByTagName('*') as $newNode) { + foreach($node->childNodes as $newNode) { + if ($newNode->nodeType != 1) + continue; + if ($selector && ! $this->is($selector, $newNode)) + continue; + if ($this->elementsContainsNode($newNode, $stack)) + continue; + $stack[] = $newNode; + } + } + $this->elementsBackup = $this->elements; + $this->elements = $stack; + return $this->newInstance(); + } + /** + * Enter description here... + * + * @return phpQueryObject|QueryTemplatesSource|QueryTemplatesParse|QueryTemplatesSourceQuery + */ + public function ancestors($selector = null) { + return $this->children( $selector ); + } + /** + * Enter description here... + * + * @return phpQueryObject|QueryTemplatesSource|QueryTemplatesParse|QueryTemplatesSourceQuery + */ + public function append( $content) { + return $this->insert($content, __FUNCTION__); + } + /** + * Enter description here... + * + * @return phpQueryObject|QueryTemplatesSource|QueryTemplatesParse|QueryTemplatesSourceQuery + */ + public function appendPHP( $content) { + return $this->insert("<php><!-- {$content} --></php>", 'append'); + } + /** + * Enter description here... + * + * @return phpQueryObject|QueryTemplatesSource|QueryTemplatesParse|QueryTemplatesSourceQuery + */ + public function appendTo( $seletor) { + return $this->insert($seletor, __FUNCTION__); + } + /** + * Enter description here... + * + * @return phpQueryObject|QueryTemplatesSource|QueryTemplatesParse|QueryTemplatesSourceQuery + */ + public function prepend( $content) { + return $this->insert($content, __FUNCTION__); + } + /** + * Enter description here... + * + * @todo accept many arguments, which are joined, arrays maybe also + * @return phpQueryObject|QueryTemplatesSource|QueryTemplatesParse|QueryTemplatesSourceQuery + */ + public function prependPHP( $content) { + return $this->insert("<php><!-- {$content} --></php>", 'prepend'); + } + /** + * Enter description here... + * + * @return phpQueryObject|QueryTemplatesSource|QueryTemplatesParse|QueryTemplatesSourceQuery + */ + public function prependTo( $seletor) { + return $this->insert($seletor, __FUNCTION__); + } + /** + * Enter description here... + * + * @return phpQueryObject|QueryTemplatesSource|QueryTemplatesParse|QueryTemplatesSourceQuery + */ + public function before($content) { + return $this->insert($content, __FUNCTION__); + } + /** + * Enter description here... + * + * @return phpQueryObject|QueryTemplatesSource|QueryTemplatesParse|QueryTemplatesSourceQuery + */ + public function beforePHP( $content) { + return $this->insert("<php><!-- {$content} --></php>", 'before'); + } + /** + * Enter description here... + * + * @param String|phpQuery + * @return phpQueryObject|QueryTemplatesSource|QueryTemplatesParse|QueryTemplatesSourceQuery + */ + public function insertBefore( $seletor) { + return $this->insert($seletor, __FUNCTION__); + } + /** + * Enter description here... + * + * @return phpQueryObject|QueryTemplatesSource|QueryTemplatesParse|QueryTemplatesSourceQuery + */ + public function after( $content) { + return $this->insert($content, __FUNCTION__); + } + /** + * Enter description here... + * + * @return phpQueryObject|QueryTemplatesSource|QueryTemplatesParse|QueryTemplatesSourceQuery + */ + public function afterPHP( $content) { + return $this->insert("<php><!-- {$content} --></php>", 'after'); + } + /** + * Enter description here... + * + * @return phpQueryObject|QueryTemplatesSource|QueryTemplatesParse|QueryTemplatesSourceQuery + */ + public function insertAfter( $seletor) { + return $this->insert($seletor, __FUNCTION__); + } + /** + * Internal insert method. Don't use it. + * + * @param unknown_type $target + * @param unknown_type $type + * @return phpQueryObject|QueryTemplatesSource|QueryTemplatesParse|QueryTemplatesSourceQuery + * @access private + */ + public function insert($target, $type) { + $this->debug("Inserting data with '{$type}'"); + $to = false; + switch( $type) { + case 'appendTo': + case 'prependTo': + case 'insertBefore': + case 'insertAfter': + $to = true; + } + switch(gettype($target)) { + case 'string': + $insertFrom = $insertTo = array(); + if ($to) { + // INSERT TO + $insertFrom = $this->elements; + if (phpQuery::isMarkup($target)) { + // $target is new markup, import it + $insertTo = $this->documentWrapper->import($target); + // insert into selected element + } else { + // $tagret is a selector + $thisStack = $this->elements; + $this->toRoot(); + $insertTo = $this->find($target)->elements; + $this->elements = $thisStack; + } + } else { + // INSERT FROM + $insertTo = $this->elements; + $insertFrom = $this->documentWrapper->import($target); + } + break; + case 'object': + $insertFrom = $insertTo = array(); + // phpQuery + if ($target instanceof self) { + if ($to) { + $insertTo = $target->elements; + if ($this->documentFragment && $this->stackIsRoot()) + // get all body children +// $loop = $this->find('body > *')->elements; + // TODO test it, test it hard... +// $loop = $this->newInstance($this->root)->find('> *')->elements; + $loop = $this->root->childNodes; + else + $loop = $this->elements; + // import nodes if needed + $insertFrom = $this->getDocumentID() == $target->getDocumentID() + ? $loop + : $target->documentWrapper->import($loop); + } else { + $insertTo = $this->elements; + if ( $target->documentFragment && $target->stackIsRoot() ) + // get all body children +// $loop = $target->find('body > *')->elements; + $loop = $target->root->childNodes; + else + $loop = $target->elements; + // import nodes if needed + $insertFrom = $this->getDocumentID() == $target->getDocumentID() + ? $loop + : $this->documentWrapper->import($loop); + } + // DOMNODE + } elseif ($target instanceof DOMNODE) { + // import node if needed +// if ( $target->ownerDocument != $this->DOM ) +// $target = $this->DOM->importNode($target, true); + if ( $to) { + $insertTo = array($target); + if ($this->documentFragment && $this->stackIsRoot()) + // get all body children + $loop = $this->root->childNodes; +// $loop = $this->find('body > *')->elements; + else + $loop = $this->elements; + foreach($loop as $fromNode) + // import nodes if needed + $insertFrom[] = ! $fromNode->ownerDocument->isSameNode($target->ownerDocument) + ? $target->ownerDocument->importNode($fromNode, true) + : $fromNode; + } else { + // import node if needed + if (! $target->ownerDocument->isSameNode($this->document)) + $target = $this->document->importNode($target, true); + $insertTo = $this->elements; + $insertFrom[] = $target; + } + } + break; + } + phpQuery::debug("From ".count($insertFrom)."; To ".count($insertTo)." nodes"); + foreach($insertTo as $insertNumber => $toNode) { + // we need static relative elements in some cases + switch( $type) { + case 'prependTo': + case 'prepend': + $firstChild = $toNode->firstChild; + break; + case 'insertAfter': + case 'after': + $nextSibling = $toNode->nextSibling; + break; + } + foreach($insertFrom as $fromNode) { + // clone if inserted already before + $insert = $insertNumber + ? $fromNode->cloneNode(true) + : $fromNode; + switch($type) { + case 'appendTo': + case 'append': +// $toNode->insertBefore( +// $fromNode, +// $toNode->lastChild->nextSibling +// ); + $toNode->appendChild($insert); + $eventTarget = $insert; + break; + case 'prependTo': + case 'prepend': + $toNode->insertBefore( + $insert, + $firstChild + ); + break; + case 'insertBefore': + case 'before': + if (! $toNode->parentNode) + throw new Exception("No parentNode, can't do {$type}()"); + else + $toNode->parentNode->insertBefore( + $insert, + $toNode + ); + break; + case 'insertAfter': + case 'after': + if (! $toNode->parentNode) + throw new Exception("No parentNode, can't do {$type}()"); + else + $toNode->parentNode->insertBefore( + $insert, + $nextSibling + ); + break; + } + // Mutation event + $event = new DOMEvent(array( + 'target' => $insert, + 'type' => 'DOMNodeInserted' + )); + phpQueryEvents::trigger($this->getDocumentID(), + $event->type, array($event), $insert + ); + } + } + return $this; + } + /** + * Enter description here... + * + * @return Int + */ + public function index($subject) { + $index = -1; + $subject = $subject instanceof phpQueryObject + ? $subject->elements[0] + : $subject; + foreach($this->newInstance() as $k => $node) { + if ($node->isSameNode($subject)) + $index = $k; + } + return $index; + } + /** + * Enter description here... + * + * @param unknown_type $start + * @param unknown_type $end + * + * @return phpQueryObject|QueryTemplatesSource|QueryTemplatesParse|QueryTemplatesSourceQuery + * @testme + */ + public function slice($start, $end = null) { +// $last = count($this->elements)-1; +// $end = $end +// ? min($end, $last) +// : $last; +// if ($start < 0) +// $start = $last+$start; +// if ($start > $last) +// return array(); + if ($end > 0) + $end = $end-$start; + return $this->newInstance( + array_slice($this->elements, $start, $end) + ); + } + /** + * Enter description here... + * + * @return phpQueryObject|QueryTemplatesSource|QueryTemplatesParse|QueryTemplatesSourceQuery + */ + public function reverse() { + $this->elementsBackup = $this->elements; + $this->elements = array_reverse($this->elements); + return $this->newInstance(); + } + /** + * Return joined text content. + * @return String + */ + public function text($text = null, $callback1 = null, $callback2 = null, $callback3 = null) { + if (isset($text)) + return $this->html(htmlspecialchars($text)); + $args = func_get_args(); + $args = array_slice($args, 1); + $return = ''; + foreach($this->elements as $node) { + $text = $node->textContent; + if (count($this->elements) > 1 && $text) + $text .= "\n"; + foreach($args as $callback) { + $text = phpQuery::callbackRun($callback, array($text)); + } + $return .= $text; + } + return $return; + } + /** + * Enter description here... + * + * @return phpQueryObject|QueryTemplatesSource|QueryTemplatesParse|QueryTemplatesSourceQuery + */ + public function plugin($class, $file = null) { + phpQuery::plugin($class, $file); + return $this; + } + /** + * Deprecated, use $pq->plugin() instead. + * + * @deprecated + * @param $class + * @param $file + * @return unknown_type + */ + public static function extend($class, $file = null) { + return $this->plugin($class, $file); + } + /** + * + * @access private + * @param $method + * @param $args + * @return unknown_type + */ + public function __call($method, $args) { + $aliasMethods = array('clone', 'empty'); + if (isset(phpQuery::$extendMethods[$method])) { + array_unshift($args, $this); + return phpQuery::callbackRun( + phpQuery::$extendMethods[$method], $args + ); + } else if (isset(phpQuery::$pluginsMethods[$method])) { + array_unshift($args, $this); + $class = phpQuery::$pluginsMethods[$method]; + $realClass = "phpQueryObjectPlugin_$class"; + $return = call_user_func_array( + array($realClass, $method), + $args + ); + // XXX deprecate ? + return is_null($return) + ? $this + : $return; + } else if (in_array($method, $aliasMethods)) { + return call_user_func_array(array($this, '_'.$method), $args); + } else + throw new Exception("Method '{$method}' doesnt exist"); + } + /** + * Safe rename of next(). + * + * Use it ONLY when need to call next() on an iterated object (in same time). + * Normaly there is no need to do such thing ;) + * + * @return phpQueryObject|QueryTemplatesSource|QueryTemplatesParse|QueryTemplatesSourceQuery + * @access private + */ + public function _next($selector = null) { + return $this->newInstance( + $this->getElementSiblings('nextSibling', $selector, true) + ); + } + /** + * Use prev() and next(). + * + * @deprecated + * @return phpQueryObject|QueryTemplatesSource|QueryTemplatesParse|QueryTemplatesSourceQuery + * @access private + */ + public function _prev($selector = null) { + return $this->prev($selector); + } + /** + * Enter description here... + * + * @return phpQueryObject|QueryTemplatesSource|QueryTemplatesParse|QueryTemplatesSourceQuery + */ + public function prev($selector = null) { + return $this->newInstance( + $this->getElementSiblings('previousSibling', $selector, true) + ); + } + /** + * @return phpQueryObject|QueryTemplatesSource|QueryTemplatesParse|QueryTemplatesSourceQuery + * @todo + */ + public function prevAll($selector = null) { + return $this->newInstance( + $this->getElementSiblings('previousSibling', $selector) + ); + } + /** + * @return phpQueryObject|QueryTemplatesSource|QueryTemplatesParse|QueryTemplatesSourceQuery + * @todo FIXME: returns source elements insted of next siblings + */ + public function nextAll($selector = null) { + return $this->newInstance( + $this->getElementSiblings('nextSibling', $selector) + ); + } + /** + * @access private + */ + protected function getElementSiblings($direction, $selector = null, $limitToOne = false) { + $stack = array(); + $count = 0; + foreach($this->stack() as $node) { + $test = $node; + while( isset($test->{$direction}) && $test->{$direction}) { + $test = $test->{$direction}; + if (! $test instanceof DOMELEMENT) + continue; + $stack[] = $test; + if ($limitToOne) + break; + } + } + if ($selector) { + $stackOld = $this->elements; + $this->elements = $stack; + $stack = $this->filter($selector, true)->stack(); + $this->elements = $stackOld; + } + return $stack; + } + /** + * Enter description here... + * + * @return phpQueryObject|QueryTemplatesSource|QueryTemplatesParse|QueryTemplatesSourceQuery + */ + public function siblings($selector = null) { + $stack = array(); + $siblings = array_merge( + $this->getElementSiblings('previousSibling', $selector), + $this->getElementSiblings('nextSibling', $selector) + ); + foreach($siblings as $node) { + if (! $this->elementsContainsNode($node, $stack)) + $stack[] = $node; + } + return $this->newInstance($stack); + } + /** + * Enter description here... + * + * @return phpQueryObject|QueryTemplatesSource|QueryTemplatesParse|QueryTemplatesSourceQuery + */ + public function not($selector = null) { + if (is_string($selector)) + phpQuery::debug(array('not', $selector)); + else + phpQuery::debug('not'); + $stack = array(); + if ($selector instanceof self || $selector instanceof DOMNODE) { + foreach($this->stack() as $node) { + if ($selector instanceof self) { + $matchFound = false; + foreach($selector->stack() as $notNode) { + if ($notNode->isSameNode($node)) + $matchFound = true; + } + if (! $matchFound) + $stack[] = $node; + } else if ($selector instanceof DOMNODE) { + if (! $selector->isSameNode($node)) + $stack[] = $node; + } else { + if (! $this->is($selector)) + $stack[] = $node; + } + } + } else { + $orgStack = $this->stack(); + $matched = $this->filter($selector, true)->stack(); +// $matched = array(); +// // simulate OR in filter() instead of AND 5y +// foreach($this->parseSelector($selector) as $s) { +// $matched = array_merge($matched, +// $this->filter(array($s))->stack() +// ); +// } + foreach($orgStack as $node) + if (! $this->elementsContainsNode($node, $matched)) + $stack[] = $node; + } + return $this->newInstance($stack); + } + /** + * Enter description here... + * + * @param string|phpQueryObject + * @return phpQueryObject|QueryTemplatesSource|QueryTemplatesParse|QueryTemplatesSourceQuery + */ + public function add($selector = null) { + if (! $selector) + return $this; + $stack = array(); + $this->elementsBackup = $this->elements; + $found = phpQuery::pq($selector, $this->getDocumentID()); + $this->merge($found->elements); + return $this->newInstance(); + } + /** + * @access private + */ + protected function merge() { + foreach(func_get_args() as $nodes) + foreach($nodes as $newNode ) + if (! $this->elementsContainsNode($newNode) ) + $this->elements[] = $newNode; + } + /** + * @access private + * TODO refactor to stackContainsNode + */ + protected function elementsContainsNode($nodeToCheck, $elementsStack = null) { + $loop = ! is_null($elementsStack) + ? $elementsStack + : $this->elements; + foreach($loop as $node) { + if ( $node->isSameNode( $nodeToCheck ) ) + return true; + } + return false; + } + /** + * Enter description here... + * + * @return phpQueryObject|QueryTemplatesSource|QueryTemplatesParse|QueryTemplatesSourceQuery + */ + public function parent($selector = null) { + $stack = array(); + foreach($this->elements as $node ) + if ( $node->parentNode && ! $this->elementsContainsNode($node->parentNode, $stack) ) + $stack[] = $node->parentNode; + $this->elementsBackup = $this->elements; + $this->elements = $stack; + if ( $selector ) + $this->filter($selector, true); + return $this->newInstance(); + } + /** + * Enter description here... + * + * @return phpQueryObject|QueryTemplatesSource|QueryTemplatesParse|QueryTemplatesSourceQuery + */ + public function parents($selector = null) { + $stack = array(); + if (! $this->elements ) + $this->debug('parents() - stack empty'); + foreach($this->elements as $node) { + $test = $node; + while( $test->parentNode) { + $test = $test->parentNode; + if ($this->isRoot($test)) + break; + if (! $this->elementsContainsNode($test, $stack)) { + $stack[] = $test; + continue; + } + } + } + $this->elementsBackup = $this->elements; + $this->elements = $stack; + if ( $selector ) + $this->filter($selector, true); + return $this->newInstance(); + } + /** + * Internal stack iterator. + * + * @access private + */ + public function stack($nodeTypes = null) { + if (!isset($nodeTypes)) + return $this->elements; + if (!is_array($nodeTypes)) + $nodeTypes = array($nodeTypes); + $return = array(); + foreach($this->elements as $node) { + if (in_array($node->nodeType, $nodeTypes)) + $return[] = $node; + } + return $return; + } + // TODO phpdoc; $oldAttr is result of hasAttribute, before any changes + protected function attrEvents($attr, $oldAttr, $oldValue, $node) { + // skip events for XML documents + if (! $this->isXHTML() && ! $this->isHTML()) + return; + $event = null; + // identify + $isInputValue = $node->tagName == 'input' + && ( + in_array($node->getAttribute('type'), + array('text', 'password', 'hidden')) + || !$node->getAttribute('type') + ); + $isRadio = $node->tagName == 'input' + && $node->getAttribute('type') == 'radio'; + $isCheckbox = $node->tagName == 'input' + && $node->getAttribute('type') == 'checkbox'; + $isOption = $node->tagName == 'option'; + if ($isInputValue && $attr == 'value' && $oldValue != $node->getAttribute($attr)) { + $event = new DOMEvent(array( + 'target' => $node, + 'type' => 'change' + )); + } else if (($isRadio || $isCheckbox) && $attr == 'checked' && ( + // check + (! $oldAttr && $node->hasAttribute($attr)) + // un-check + || (! $node->hasAttribute($attr) && $oldAttr) + )) { + $event = new DOMEvent(array( + 'target' => $node, + 'type' => 'change' + )); + } else if ($isOption && $node->parentNode && $attr == 'selected' && ( + // select + (! $oldAttr && $node->hasAttribute($attr)) + // un-select + || (! $node->hasAttribute($attr) && $oldAttr) + )) { + $event = new DOMEvent(array( + 'target' => $node->parentNode, + 'type' => 'change' + )); + } + if ($event) { + phpQueryEvents::trigger($this->getDocumentID(), + $event->type, array($event), $node + ); + } + } + public function attr($attr = null, $value = null) { + foreach($this->stack(1) as $node) { + if (! is_null($value)) { + $loop = $attr == '*' + ? $this->getNodeAttrs($node) + : array($attr); + foreach($loop as $a) { + $oldValue = $node->getAttribute($a); + $oldAttr = $node->hasAttribute($a); + // TODO raises an error when charset other than UTF-8 + // while document's charset is also not UTF-8 + @$node->setAttribute($a, $value); + $this->attrEvents($a, $oldAttr, $oldValue, $node); + } + } else if ($attr == '*') { + // jQuery difference + $return = array(); + foreach($node->attributes as $n => $v) + $return[$n] = $v->value; + return $return; + } else + return $node->hasAttribute($attr) + ? $node->getAttribute($attr) + : null; + } + return is_null($value) + ? '' : $this; + } + /** + * @access private + */ + protected function getNodeAttrs($node) { + $return = array(); + foreach($node->attributes as $n => $o) + $return[] = $n; + return $return; + } + /** + * Enter description here... + * + * @return phpQueryObject|QueryTemplatesSource|QueryTemplatesParse|QueryTemplatesSourceQuery + * @todo check CDATA ??? + */ + public function attrPHP($attr, $code) { + if (! is_null($code)) { + $value = '<'.'?php '.$code.' ?'.'>'; + // TODO tempolary solution + // http://code.google.com/p/phpquery/issues/detail?id=17 +// if (function_exists('mb_detect_encoding') && mb_detect_encoding($value) == 'ASCII') +// $value = mb_convert_encoding($value, 'UTF-8', 'HTML-ENTITIES'); + } + foreach($this->stack(1) as $node) { + if (! is_null($code)) { +// $attrNode = $this->DOM->createAttribute($attr); + $node->setAttribute($attr, $value); +// $attrNode->value = $value; +// $node->appendChild($attrNode); + } else if ( $attr == '*') { + // jQuery diff + $return = array(); + foreach($node->attributes as $n => $v) + $return[$n] = $v->value; + return $return; + } else + return $node->getAttribute($attr); + } + return $this; + } + /** + * Enter description here... + * + * @return phpQueryObject|QueryTemplatesSource|QueryTemplatesParse|QueryTemplatesSourceQuery + */ + public function removeAttr($attr) { + foreach($this->stack(1) as $node) { + $loop = $attr == '*' + ? $this->getNodeAttrs($node) + : array($attr); + foreach($loop as $a) { + $oldValue = $node->getAttribute($a); + $node->removeAttribute($a); + $this->attrEvents($a, $oldValue, null, $node); + } + } + return $this; + } + /** + * Return form element value. + * + * @return String Fields value. + */ + public function val($val = null) { + if (! isset($val)) { + if ($this->eq(0)->is('select')) { + $selected = $this->eq(0)->find('option[selected=selected]'); + if ($selected->is('[value]')) + return $selected->attr('value'); + else + return $selected->text(); + } else if ($this->eq(0)->is('textarea')) + return $this->eq(0)->markup(); + else + return $this->eq(0)->attr('value'); + } else { + $_val = null; + foreach($this->stack(1) as $node) { + $node = pq($node, $this->getDocumentID()); + if (is_array($val) && in_array($node->attr('type'), array('checkbox', 'radio'))) { + $isChecked = in_array($node->attr('value'), $val) + || in_array($node->attr('name'), $val); + if ($isChecked) + $node->attr('checked', 'checked'); + else + $node->removeAttr('checked'); + } else if ($node->get(0)->tagName == 'select') { + if (! isset($_val)) { + $_val = array(); + if (! is_array($val)) + $_val = array((string)$val); + else + foreach($val as $v) + $_val[] = $v; + } + foreach($node['option']->stack(1) as $option) { + $option = pq($option, $this->getDocumentID()); + $selected = false; + // XXX: workaround for string comparsion, see issue #96 + // http://code.google.com/p/phpquery/issues/detail?id=96 + $selected = is_null($option->attr('value')) + ? in_array($option->markup(), $_val) + : in_array($option->attr('value'), $_val); +// $optionValue = $option->attr('value'); +// $optionText = $option->text(); +// $optionTextLenght = mb_strlen($optionText); +// foreach($_val as $v) +// if ($optionValue == $v) +// $selected = true; +// else if ($optionText == $v && $optionTextLenght == mb_strlen($v)) +// $selected = true; + if ($selected) + $option->attr('selected', 'selected'); + else + $option->removeAttr('selected'); + } + } else if ($node->get(0)->tagName == 'textarea') + $node->markup($val); + else + $node->attr('value', $val); + } + } + return $this; + } + /** + * Enter description here... + * + * @return phpQueryObject|QueryTemplatesSource|QueryTemplatesParse|QueryTemplatesSourceQuery + */ + public function andSelf() { + if ( $this->previous ) + $this->elements = array_merge($this->elements, $this->previous->elements); + return $this; + } + /** + * Enter description here... + * + * @return phpQueryObject|QueryTemplatesSource|QueryTemplatesParse|QueryTemplatesSourceQuery + */ + public function addClass( $className) { + if (! $className) + return $this; + foreach($this->stack(1) as $node) { + if (! $this->is(".$className", $node)) + $node->setAttribute( + 'class', + trim($node->getAttribute('class').' '.$className) + ); + } + return $this; + } + /** + * Enter description here... + * + * @return phpQueryObject|QueryTemplatesSource|QueryTemplatesParse|QueryTemplatesSourceQuery + */ + public function addClassPHP( $className) { + foreach($this->stack(1) as $node) { + $classes = $node->getAttribute('class'); + $newValue = $classes + ? $classes.' <'.'?php '.$className.' ?'.'>' + : '<'.'?php '.$className.' ?'.'>'; + $node->setAttribute('class', $newValue); + } + return $this; + } + /** + * Enter description here... + * + * @param string $className + * @return bool + */ + public function hasClass($className) { + foreach($this->stack(1) as $node) { + if ( $this->is(".$className", $node)) + return true; + } + return false; + } + /** + * Enter description here... + * + * @return phpQueryObject|QueryTemplatesSource|QueryTemplatesParse|QueryTemplatesSourceQuery + */ + public function removeClass($className) { + foreach($this->stack(1) as $node) { + $classes = explode( ' ', $node->getAttribute('class')); + if ( in_array($className, $classes)) { + $classes = array_diff($classes, array($className)); + if ( $classes ) + $node->setAttribute('class', implode(' ', $classes)); + else + $node->removeAttribute('class'); + } + } + return $this; + } + /** + * Enter description here... + * + * @return phpQueryObject|QueryTemplatesSource|QueryTemplatesParse|QueryTemplatesSourceQuery + */ + public function toggleClass($className) { + foreach($this->stack(1) as $node) { + if ( $this->is( $node, '.'.$className )) + $this->removeClass($className); + else + $this->addClass($className); + } + return $this; + } + /** + * Proper name without underscore (just ->empty()) also works. + * + * Removes all child nodes from the set of matched elements. + * + * Example: + * pq("p")._empty() + * + * HTML: + * <p>Hello, <span>Person</span> <a href="#">and person</a></p> + * + * Result: + * [ <p></p> ] + * + * @return phpQueryObject|QueryTemplatesSource|QueryTemplatesParse|QueryTemplatesSourceQuery + * @access private + */ + public function _empty() { + foreach($this->stack(1) as $node) { + // thx to 'dave at dgx dot cz' + $node->nodeValue = ''; + } + return $this; + } + /** + * Enter description here... + * + * @param array|string $callback Expects $node as first param, $index as second + * @param array $scope External variables passed to callback. Use compact('varName1', 'varName2'...) and extract($scope) + * @param array $arg1 Will ba passed as third and futher args to callback. + * @param array $arg2 Will ba passed as fourth and futher args to callback, and so on... + * @return phpQueryObject|QueryTemplatesSource|QueryTemplatesParse|QueryTemplatesSourceQuery + */ + public function each($callback, $param1 = null, $param2 = null, $param3 = null) { + $paramStructure = null; + if (func_num_args() > 1) { + $paramStructure = func_get_args(); + $paramStructure = array_slice($paramStructure, 1); + } + foreach($this->elements as $v) + phpQuery::callbackRun($callback, array($v), $paramStructure); + return $this; + } + /** + * Run callback on actual object. + * + * @return phpQueryObject|QueryTemplatesSource|QueryTemplatesParse|QueryTemplatesSourceQuery + */ + public function callback($callback, $param1 = null, $param2 = null, $param3 = null) { + $params = func_get_args(); + $params[0] = $this; + phpQuery::callbackRun($callback, $params); + return $this; + } + /** + * Enter description here... + * + * @return phpQueryObject|QueryTemplatesSource|QueryTemplatesParse|QueryTemplatesSourceQuery + * @todo add $scope and $args as in each() ??? + */ + public function map($callback, $param1 = null, $param2 = null, $param3 = null) { +// $stack = array(); +//// foreach($this->newInstance() as $node) { +// foreach($this->newInstance() as $node) { +// $result = call_user_func($callback, $node); +// if ($result) +// $stack[] = $result; +// } + $params = func_get_args(); + array_unshift($params, $this->elements); + return $this->newInstance( + call_user_func_array(array('phpQuery', 'map'), $params) +// phpQuery::map($this->elements, $callback) + ); + } + /** + * Enter description here... + * + * @param <type> $key + * @param <type> $value + */ + public function data($key, $value = null) { + if (! isset($value)) { + // TODO? implement specific jQuery behavior od returning parent values + // is child which we look up doesn't exist + return phpQuery::data($this->get(0), $key, $value, $this->getDocumentID()); + } else { + foreach($this as $node) + phpQuery::data($node, $key, $value, $this->getDocumentID()); + return $this; + } + } + /** + * Enter description here... + * + * @param <type> $key + */ + public function removeData($key) { + foreach($this as $node) + phpQuery::removeData($node, $key, $this->getDocumentID()); + return $this; + } + // INTERFACE IMPLEMENTATIONS + + // ITERATOR INTERFACE + /** + * @access private + */ + public function rewind(){ + $this->debug('iterating foreach'); +// phpQuery::selectDocument($this->getDocumentID()); + $this->elementsBackup = $this->elements; + $this->elementsInterator = $this->elements; + $this->valid = isset( $this->elements[0] ) + ? 1 : 0; +// $this->elements = $this->valid +// ? array($this->elements[0]) +// : array(); + $this->current = 0; + } + /** + * @access private + */ + public function current(){ + return $this->elementsInterator[ $this->current ]; + } + /** + * @access private + */ + public function key(){ + return $this->current; + } + /** + * Double-function method. + * + * First: main iterator interface method. + * Second: Returning next sibling, alias for _next(). + * + * Proper functionality is choosed automagicaly. + * + * @see phpQueryObject::_next() + * @return phpQueryObject|QueryTemplatesSource|QueryTemplatesParse|QueryTemplatesSourceQuery + */ + public function next($cssSelector = null){ +// if ($cssSelector || $this->valid) +// return $this->_next($cssSelector); + $this->valid = isset( $this->elementsInterator[ $this->current+1 ] ) + ? true + : false; + if (! $this->valid && $this->elementsInterator) { + $this->elementsInterator = null; + } else if ($this->valid) { + $this->current++; + } else { + return $this->_next($cssSelector); + } + } + /** + * @access private + */ + public function valid(){ + return $this->valid; + } + // ITERATOR INTERFACE END + // ARRAYACCESS INTERFACE + /** + * @access private + */ + public function offsetExists($offset) { + return $this->find($offset)->size() > 0; + } + /** + * @access private + */ + public function offsetGet($offset) { + return $this->find($offset); + } + /** + * @access private + */ + public function offsetSet($offset, $value) { +// $this->find($offset)->replaceWith($value); + $this->find($offset)->html($value); + } + /** + * @access private + */ + public function offsetUnset($offset) { + // empty + throw new Exception("Can't do unset, use array interface only for calling queries and replacing HTML."); + } + // ARRAYACCESS INTERFACE END + /** + * Returns node's XPath. + * + * @param unknown_type $oneNode + * @return string + * @TODO use native getNodePath is avaible + * @access private + */ + protected function getNodeXpath($oneNode = null, $namespace = null) { + $return = array(); + $loop = $oneNode + ? array($oneNode) + : $this->elements; +// if ($namespace) +// $namespace .= ':'; + foreach($loop as $node) { + if ($node instanceof DOMDOCUMENT) { + $return[] = ''; + continue; + } + $xpath = array(); + while(! ($node instanceof DOMDOCUMENT)) { + $i = 1; + $sibling = $node; + while($sibling->previousSibling) { + $sibling = $sibling->previousSibling; + $isElement = $sibling instanceof DOMELEMENT; + if ($isElement && $sibling->tagName == $node->tagName) + $i++; + } + $xpath[] = $this->isXML() + ? "*[local-name()='{$node->tagName}'][{$i}]" + : "{$node->tagName}[{$i}]"; + $node = $node->parentNode; + } + $xpath = join('/', array_reverse($xpath)); + $return[] = '/'.$xpath; + } + return $oneNode + ? $return[0] + : $return; + } + // HELPERS + public function whois($oneNode = null) { + $return = array(); + $loop = $oneNode + ? array( $oneNode ) + : $this->elements; + foreach($loop as $node) { + if (isset($node->tagName)) { + $tag = in_array($node->tagName, array('php', 'js')) + ? strtoupper($node->tagName) + : $node->tagName; + $return[] = $tag + .($node->getAttribute('id') + ? '#'.$node->getAttribute('id'):'') + .($node->getAttribute('class') + ? '.'.join('.', split(' ', $node->getAttribute('class'))):'') + .($node->getAttribute('name') + ? '[name="'.$node->getAttribute('name').'"]':'') + .($node->getAttribute('value') && strpos($node->getAttribute('value'), '<'.'?php') === false + ? '[value="'.substr(str_replace("\n", '', $node->getAttribute('value')), 0, 15).'"]':'') + .($node->getAttribute('value') && strpos($node->getAttribute('value'), '<'.'?php') !== false + ? '[value=PHP]':'') + .($node->getAttribute('selected') + ? '[selected]':'') + .($node->getAttribute('checked') + ? '[checked]':'') + ; + } else if ($node instanceof DOMTEXT) { + if (trim($node->textContent)) + $return[] = 'Text:'.substr(str_replace("\n", ' ', $node->textContent), 0, 15); + } else { + + } + } + return $oneNode && isset($return[0]) + ? $return[0] + : $return; + } + /** + * Dump htmlOuter and preserve chain. Usefull for debugging. + * + * @return phpQueryObject|QueryTemplatesSource|QueryTemplatesParse|QueryTemplatesSourceQuery + * + */ + public function dump() { + print 'DUMP #'.(phpQuery::$dumpCount++).' '; + $debug = phpQuery::$debug; + phpQuery::$debug = false; +// print __FILE__.':'.__LINE__."\n"; + var_dump($this->htmlOuter()); + return $this; + } + public function dumpWhois() { + print 'DUMP #'.(phpQuery::$dumpCount++).' '; + $debug = phpQuery::$debug; + phpQuery::$debug = false; +// print __FILE__.':'.__LINE__."\n"; + var_dump('whois', $this->whois()); + phpQuery::$debug = $debug; + return $this; + } + public function dumpLength() { + print 'DUMP #'.(phpQuery::$dumpCount++).' '; + $debug = phpQuery::$debug; + phpQuery::$debug = false; +// print __FILE__.':'.__LINE__."\n"; + var_dump('length', $this->length()); + phpQuery::$debug = $debug; + return $this; + } + public function dumpTree($html = true, $title = true) { + $output = $title + ? 'DUMP #'.(phpQuery::$dumpCount++)." \n" : ''; + $debug = phpQuery::$debug; + phpQuery::$debug = false; + foreach($this->stack() as $node) + $output .= $this->__dumpTree($node); + phpQuery::$debug = $debug; + print $html + ? nl2br(str_replace(' ', ' ', $output)) + : $output; + return $this; + } + private function __dumpTree($node, $intend = 0) { + $whois = $this->whois($node); + $return = ''; + if ($whois) + $return .= str_repeat(' - ', $intend).$whois."\n"; + if (isset($node->childNodes)) + foreach($node->childNodes as $chNode) + $return .= $this->__dumpTree($chNode, $intend+1); + return $return; + } + /** + * Dump htmlOuter and stop script execution. Usefull for debugging. + * + */ + public function dumpDie() { + print __FILE__.':'.__LINE__; + var_dump($this->htmlOuter()); + die(); + } +} + + +// -- Multibyte Compatibility functions --------------------------------------- +// http://svn.iphonewebdev.com/lace/lib/mb_compat.php + +/** + * mb_internal_encoding() + * + * Included for mbstring pseudo-compatability. + */ +if (!function_exists('mb_internal_encoding')) +{ + function mb_internal_encoding($enc) {return true; } +} + +/** + * mb_regex_encoding() + * + * Included for mbstring pseudo-compatability. + */ +if (!function_exists('mb_regex_encoding')) +{ + function mb_regex_encoding($enc) {return true; } +} + +/** + * mb_strlen() + * + * Included for mbstring pseudo-compatability. + */ +if (!function_exists('mb_strlen')) +{ + function mb_strlen($str) + { + return strlen($str); + } +} + +/** + * mb_strpos() + * + * Included for mbstring pseudo-compatability. + */ +if (!function_exists('mb_strpos')) +{ + function mb_strpos($haystack, $needle, $offset=0) + { + return strpos($haystack, $needle, $offset); + } +} +/** + * mb_stripos() + * + * Included for mbstring pseudo-compatability. + */ +if (!function_exists('mb_stripos')) +{ + function mb_stripos($haystack, $needle, $offset=0) + { + return stripos($haystack, $needle, $offset); + } +} + +/** + * mb_substr() + * + * Included for mbstring pseudo-compatability. + */ +if (!function_exists('mb_substr')) +{ + function mb_substr($str, $start, $length=0) + { + return substr($str, $start, $length); + } +} + +/** + * mb_substr_count() + * + * Included for mbstring pseudo-compatability. + */ +if (!function_exists('mb_substr_count')) +{ + function mb_substr_count($haystack, $needle) + { + return substr_count($haystack, $needle); + } +} + + +/** + * Static namespace for phpQuery functions. + * + * @author Tobiasz Cudnik <tobiasz.cudnik/gmail.com> + * @package phpQuery + */ +abstract class phpQuery { + /** + * XXX: Workaround for mbstring problems + * + * @var bool + */ + public static $mbstringSupport = true; + public static $debug = false; + public static $documents = array(); + public static $defaultDocumentID = null; +// public static $defaultDoctype = 'html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"'; + /** + * Applies only to HTML. + * + * @var unknown_type + */ + public static $defaultDoctype = '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" +"http://www.w3.org/TR/html4/loose.dtd">'; + public static $defaultCharset = 'UTF-8'; + /** + * Static namespace for plugins. + * + * @var object + */ + public static $plugins = array(); + /** + * List of loaded plugins. + * + * @var unknown_type + */ + public static $pluginsLoaded = array(); + public static $pluginsMethods = array(); + public static $pluginsStaticMethods = array(); + public static $extendMethods = array(); + /** + * @TODO implement + */ + public static $extendStaticMethods = array(); + /** + * Hosts allowed for AJAX connections. + * Dot '.' means $_SERVER['HTTP_HOST'] (if any). + * + * @var array + */ + public static $ajaxAllowedHosts = array( + '.' + ); + /** + * AJAX settings. + * + * @var array + * XXX should it be static or not ? + */ + public static $ajaxSettings = array( + 'url' => '',//TODO + 'global' => true, + 'type' => "GET", + 'timeout' => null, + 'contentType' => "application/x-www-form-urlencoded", + 'processData' => true, +// 'async' => true, + 'data' => null, + 'username' => null, + 'password' => null, + 'accepts' => array( + 'xml' => "application/xml, text/xml", + 'html' => "text/html", + 'script' => "text/javascript, application/javascript", + 'json' => "application/json, text/javascript", + 'text' => "text/plain", + '_default' => "*/*" + ) + ); + public static $lastModified = null; + public static $active = 0; + public static $dumpCount = 0; + /** + * Multi-purpose function. + * Use pq() as shortcut. + * + * In below examples, $pq is any result of pq(); function. + * + * 1. Import markup into existing document (without any attaching): + * - Import into selected document: + * pq('<div/>') // DOESNT accept text nodes at beginning of input string ! + * - Import into document with ID from $pq->getDocumentID(): + * pq('<div/>', $pq->getDocumentID()) + * - Import into same document as DOMNode belongs to: + * pq('<div/>', DOMNode) + * - Import into document from phpQuery object: + * pq('<div/>', $pq) + * + * 2. Run query: + * - Run query on last selected document: + * pq('div.myClass') + * - Run query on document with ID from $pq->getDocumentID(): + * pq('div.myClass', $pq->getDocumentID()) + * - Run query on same document as DOMNode belongs to and use node(s)as root for query: + * pq('div.myClass', DOMNode) + * - Run query on document from phpQuery object + * and use object's stack as root node(s) for query: + * pq('div.myClass', $pq) + * + * @param string|DOMNode|DOMNodeList|array $arg1 HTML markup, CSS Selector, DOMNode or array of DOMNodes + * @param string|phpQueryObject|DOMNode $context DOM ID from $pq->getDocumentID(), phpQuery object (determines also query root) or DOMNode (determines also query root) + * + * @return phpQueryObject|QueryTemplatesSource|QueryTemplatesParse|QueryTemplatesSourceQuery|QueryTemplatesPhpQuery|false + * phpQuery object or false in case of error. + */ + public static function pq($arg1, $context = null) { + if ($arg1 instanceof DOMNODE && ! isset($context)) { + foreach(phpQuery::$documents as $documentWrapper) { + $compare = $arg1 instanceof DOMDocument + ? $arg1 : $arg1->ownerDocument; + if ($documentWrapper->document->isSameNode($compare)) + $context = $documentWrapper->id; + } + } + if (! $context) { + $domId = self::$defaultDocumentID; + if (! $domId) + throw new Exception("Can't use last created DOM, because there isn't any. Use phpQuery::newDocument() first."); +// } else if (is_object($context) && ($context instanceof PHPQUERY || is_subclass_of($context, 'phpQueryObject'))) + } else if (is_object($context) && $context instanceof phpQueryObject) + $domId = $context->getDocumentID(); + else if ($context instanceof DOMDOCUMENT) { + $domId = self::getDocumentID($context); + if (! $domId) { + //throw new Exception('Orphaned DOMDocument'); + $domId = self::newDocument($context)->getDocumentID(); + } + } else if ($context instanceof DOMNODE) { + $domId = self::getDocumentID($context); + if (! $domId) { + throw new Exception('Orphaned DOMNode'); +// $domId = self::newDocument($context->ownerDocument); + } + } else + $domId = $context; + if ($arg1 instanceof phpQueryObject) { +// if (is_object($arg1) && (get_class($arg1) == 'phpQueryObject' || $arg1 instanceof PHPQUERY || is_subclass_of($arg1, 'phpQueryObject'))) { + /** + * Return $arg1 or import $arg1 stack if document differs: + * pq(pq('<div/>')) + */ + if ($arg1->getDocumentID() == $domId) + return $arg1; + $class = get_class($arg1); + // support inheritance by passing old object to overloaded constructor + $phpQuery = $class != 'phpQuery' + ? new $class($arg1, $domId) + : new phpQueryObject($domId); + $phpQuery->elements = array(); + foreach($arg1->elements as $node) + $phpQuery->elements[] = $phpQuery->document->importNode($node, true); + return $phpQuery; + } else if ($arg1 instanceof DOMNODE || (is_array($arg1) && isset($arg1[0]) && $arg1[0] instanceof DOMNODE)) { + /* + * Wrap DOM nodes with phpQuery object, import into document when needed: + * pq(array($domNode1, $domNode2)) + */ + $phpQuery = new phpQueryObject($domId); + if (!($arg1 instanceof DOMNODELIST) && ! is_array($arg1)) + $arg1 = array($arg1); + $phpQuery->elements = array(); + foreach($arg1 as $node) { + $sameDocument = $node->ownerDocument instanceof DOMDOCUMENT + && ! $node->ownerDocument->isSameNode($phpQuery->document); + $phpQuery->elements[] = $sameDocument + ? $phpQuery->document->importNode($node, true) + : $node; + } + return $phpQuery; + } else if (self::isMarkup($arg1)) { + /** + * Import HTML: + * pq('<div/>') + */ + $phpQuery = new phpQueryObject($domId); + return $phpQuery->newInstance( + $phpQuery->documentWrapper->import($arg1) + ); + } else { + /** + * Run CSS query: + * pq('div.myClass') + */ + $phpQuery = new phpQueryObject($domId); +// if ($context && ($context instanceof PHPQUERY || is_subclass_of($context, 'phpQueryObject'))) + if ($context && $context instanceof phpQueryObject) + $phpQuery->elements = $context->elements; + else if ($context && $context instanceof DOMNODELIST) { + $phpQuery->elements = array(); + foreach($context as $node) + $phpQuery->elements[] = $node; + } else if ($context && $context instanceof DOMNODE) + $phpQuery->elements = array($context); + return $phpQuery->find($arg1); + } + } + /** + * Sets default document to $id. Document has to be loaded prior + * to using this method. + * $id can be retrived via getDocumentID() or getDocumentIDRef(). + * + * @param unknown_type $id + */ + public static function selectDocument($id) { + $id = self::getDocumentID($id); + self::debug("Selecting document '$id' as default one"); + self::$defaultDocumentID = self::getDocumentID($id); + } + /** + * Returns document with id $id or last used as phpQueryObject. + * $id can be retrived via getDocumentID() or getDocumentIDRef(). + * Chainable. + * + * @see phpQuery::selectDocument() + * @param unknown_type $id + * @return phpQueryObject|QueryTemplatesSource|QueryTemplatesParse|QueryTemplatesSourceQuery + */ + public static function getDocument($id = null) { + if ($id) + phpQuery::selectDocument($id); + else + $id = phpQuery::$defaultDocumentID; + return new phpQueryObject($id); + } + /** + * Creates new document from markup. + * Chainable. + * + * @param unknown_type $markup + * @return phpQueryObject|QueryTemplatesSource|QueryTemplatesParse|QueryTemplatesSourceQuery + */ + public static function newDocument($markup = null, $contentType = null) { + if (! $markup) + $markup = ''; + $documentID = phpQuery::createDocumentWrapper($markup, $contentType); + return new phpQueryObject($documentID); + } + /** + * Creates new document from markup. + * Chainable. + * + * @param unknown_type $markup + * @return phpQueryObject|QueryTemplatesSource|QueryTemplatesParse|QueryTemplatesSourceQuery + */ + public static function newDocumentHTML($markup = null, $charset = null) { + $contentType = $charset + ? ";charset=$charset" + : ''; + return self::newDocument($markup, "text/html{$contentType}"); + } + /** + * Creates new document from markup. + * Chainable. + * + * @param unknown_type $markup + * @return phpQueryObject|QueryTemplatesSource|QueryTemplatesParse|QueryTemplatesSourceQuery + */ + public static function newDocumentXML($markup = null, $charset = null) { + $contentType = $charset + ? ";charset=$charset" + : ''; + return self::newDocument($markup, "text/xml{$contentType}"); + } + /** + * Creates new document from markup. + * Chainable. + * + * @param unknown_type $markup + * @return phpQueryObject|QueryTemplatesSource|QueryTemplatesParse|QueryTemplatesSourceQuery + */ + public static function newDocumentXHTML($markup = null, $charset = null) { + $contentType = $charset + ? ";charset=$charset" + : ''; + return self::newDocument($markup, "application/xhtml+xml{$contentType}"); + } + /** + * Creates new document from markup. + * Chainable. + * + * @param unknown_type $markup + * @return phpQueryObject|QueryTemplatesSource|QueryTemplatesParse|QueryTemplatesSourceQuery + */ + public static function newDocumentPHP($markup = null, $contentType = "text/html") { + // TODO pass charset to phpToMarkup if possible (use DOMDocumentWrapper function) + $markup = phpQuery::phpToMarkup($markup, self::$defaultCharset); + return self::newDocument($markup, $contentType); + } + public static function phpToMarkup($php, $charset = 'utf-8') { + $regexes = array( + '@(<(?!\\?)(?:[^>]|\\?>)+\\w+\\s*=\\s*)(\')([^\']*)<'.'?php?(.*?)(?:\\?>)([^\']*)\'@s', + '@(<(?!\\?)(?:[^>]|\\?>)+\\w+\\s*=\\s*)(")([^"]*)<'.'?php?(.*?)(?:\\?>)([^"]*)"@s', + ); + foreach($regexes as $regex) + while (preg_match($regex, $php, $matches)) { + $php = preg_replace_callback( + $regex, +// create_function('$m, $charset = "'.$charset.'"', +// 'return $m[1].$m[2] +// .htmlspecialchars("<"."?php".$m[4]."?".">", ENT_QUOTES|ENT_NOQUOTES, $charset) +// .$m[5].$m[2];' +// ), + array('phpQuery', '_phpToMarkupCallback'), + $php + ); + } + $regex = '@(^|>[^<]*)+?(<\?php(.*?)(\?>))@s'; +//preg_match_all($regex, $php, $matches); +//var_dump($matches); + $php = preg_replace($regex, '\\1<php><!-- \\3 --></php>', $php); + return $php; + } + public static function _phpToMarkupCallback($php, $charset = 'utf-8') { + return $m[1].$m[2] + .htmlspecialchars("<"."?php".$m[4]."?".">", ENT_QUOTES|ENT_NOQUOTES, $charset) + .$m[5].$m[2]; + } + public static function _markupToPHPCallback($m) { + return "<"."?php ".htmlspecialchars_decode($m[1])." ?".">"; + } + /** + * Converts document markup containing PHP code generated by phpQuery::php() + * into valid (executable) PHP code syntax. + * + * @param string|phpQueryObject $content + * @return string PHP code. + */ + public static function markupToPHP($content) { + if ($content instanceof phpQueryObject) + $content = $content->markupOuter(); + /* <php>...</php> to <?php...? > */ + $content = preg_replace_callback( + '@<php>\s*<!--(.*?)-->\s*</php>@s', +// create_function('$m', +// 'return "<'.'?php ".htmlspecialchars_decode($m[1])." ?'.'>";' +// ), + array('phpQuery', '_markupToPHPCallback'), + $content + ); + /* <node attr='< ?php ? >'> extra space added to save highlighters */ + $regexes = array( + '@(<(?!\\?)(?:[^>]|\\?>)+\\w+\\s*=\\s*)(\')([^\']*)(?:<|%3C)\\?(?:php)?(.*?)(?:\\?(?:>|%3E))([^\']*)\'@s', + '@(<(?!\\?)(?:[^>]|\\?>)+\\w+\\s*=\\s*)(")([^"]*)(?:<|%3C)\\?(?:php)?(.*?)(?:\\?(?:>|%3E))([^"]*)"@s', + ); + foreach($regexes as $regex) + while (preg_match($regex, $content)) + $content = preg_replace_callback( + $regex, + create_function('$m', + 'return $m[1].$m[2].$m[3]."<?php " + .str_replace( + array("%20", "%3E", "%09", " ", "	", "%7B", "%24", "%7D", "%22", "%5B", "%5D"), + array(" ", ">", " ", "\n", " ", "{", "$", "}", \'"\', "[", "]"), + htmlspecialchars_decode($m[4]) + ) + ." ?>".$m[5].$m[2];' + ), + $content + ); + return $content; + } + /** + * Creates new document from file $file. + * Chainable. + * + * @param string $file URLs allowed. See File wrapper page at php.net for more supported sources. + * @return phpQueryObject|QueryTemplatesSource|QueryTemplatesParse|QueryTemplatesSourceQuery + */ + public static function newDocumentFile($file, $contentType = null) { + $documentID = self::createDocumentWrapper( + file_get_contents($file), $contentType + ); + return new phpQueryObject($documentID); + } + /** + * Creates new document from markup. + * Chainable. + * + * @param unknown_type $markup + * @return phpQueryObject|QueryTemplatesSource|QueryTemplatesParse|QueryTemplatesSourceQuery + */ + public static function newDocumentFileHTML($file, $charset = null) { + $contentType = $charset + ? ";charset=$charset" + : ''; + return self::newDocumentFile($file, "text/html{$contentType}"); + } + /** + * Creates new document from markup. + * Chainable. + * + * @param unknown_type $markup + * @return phpQueryObject|QueryTemplatesSource|QueryTemplatesParse|QueryTemplatesSourceQuery + */ + public static function newDocumentFileXML($file, $charset = null) { + $contentType = $charset + ? ";charset=$charset" + : ''; + return self::newDocumentFile($file, "text/xml{$contentType}"); + } + /** + * Creates new document from markup. + * Chainable. + * + * @param unknown_type $markup + * @return phpQueryObject|QueryTemplatesSource|QueryTemplatesParse|QueryTemplatesSourceQuery + */ + public static function newDocumentFileXHTML($file, $charset = null) { + $contentType = $charset + ? ";charset=$charset" + : ''; + return self::newDocumentFile($file, "application/xhtml+xml{$contentType}"); + } + /** + * Creates new document from markup. + * Chainable. + * + * @param unknown_type $markup + * @return phpQueryObject|QueryTemplatesSource|QueryTemplatesParse|QueryTemplatesSourceQuery + */ + public static function newDocumentFilePHP($file, $contentType = null) { + return self::newDocumentPHP(file_get_contents($file), $contentType); + } + /** + * Reuses existing DOMDocument object. + * Chainable. + * + * @param $document DOMDocument + * @return phpQueryObject|QueryTemplatesSource|QueryTemplatesParse|QueryTemplatesSourceQuery + * @TODO support DOMDocument + */ + public static function loadDocument($document) { + // TODO + die('TODO loadDocument'); + } + /** + * Enter description here... + * + * @param unknown_type $html + * @param unknown_type $domId + * @return unknown New DOM ID + * @todo support PHP tags in input + * @todo support passing DOMDocument object from self::loadDocument + */ + protected static function createDocumentWrapper($html, $contentType = null, $documentID = null) { + if (function_exists('domxml_open_mem')) + throw new Exception("Old PHP4 DOM XML extension detected. phpQuery won't work until this extension is enabled."); +// $id = $documentID +// ? $documentID +// : md5(microtime()); + $document = null; + if ($html instanceof DOMDOCUMENT) { + if (self::getDocumentID($html)) { + // document already exists in phpQuery::$documents, make a copy + $document = clone $html; + } else { + // new document, add it to phpQuery::$documents + $wrapper = new DOMDocumentWrapper($html, $contentType, $documentID); + } + } else { + $wrapper = new DOMDocumentWrapper($html, $contentType, $documentID); + } +// $wrapper->id = $id; + // bind document + phpQuery::$documents[$wrapper->id] = $wrapper; + // remember last loaded document + phpQuery::selectDocument($wrapper->id); + return $wrapper->id; + } + /** + * Extend class namespace. + * + * @param string|array $target + * @param array $source + * @TODO support string $source + * @return unknown_type + */ + public static function extend($target, $source) { + switch($target) { + case 'phpQueryObject': + $targetRef = &self::$extendMethods; + $targetRef2 = &self::$pluginsMethods; + break; + case 'phpQuery': + $targetRef = &self::$extendStaticMethods; + $targetRef2 = &self::$pluginsStaticMethods; + break; + default: + throw new Exception("Unsupported \$target type"); + } + if (is_string($source)) + $source = array($source => $source); + foreach($source as $method => $callback) { + if (isset($targetRef[$method])) { +// throw new Exception + self::debug("Duplicate method '{$method}', can\'t extend '{$target}'"); + continue; + } + if (isset($targetRef2[$method])) { +// throw new Exception + self::debug("Duplicate method '{$method}' from plugin '{$targetRef2[$method]}'," + ." can\'t extend '{$target}'"); + continue; + } + $targetRef[$method] = $callback; + } + return true; + } + /** + * Extend phpQuery with $class from $file. + * + * @param string $class Extending class name. Real class name can be prepended phpQuery_. + * @param string $file Filename to include. Defaults to "{$class}.php". + */ + public static function plugin($class, $file = null) { + // TODO $class checked agains phpQuery_$class +// if (strpos($class, 'phpQuery') === 0) +// $class = substr($class, 8); + if (in_array($class, self::$pluginsLoaded)) + return true; + if (! $file) + $file = $class.'.php'; + $objectClassExists = class_exists('phpQueryObjectPlugin_'.$class); + $staticClassExists = class_exists('phpQueryPlugin_'.$class); + if (! $objectClassExists && ! $staticClassExists) + require_once($file); + self::$pluginsLoaded[] = $class; + // static methods + if (class_exists('phpQueryPlugin_'.$class)) { + $realClass = 'phpQueryPlugin_'.$class; + $vars = get_class_vars($realClass); + $loop = isset($vars['phpQueryMethods']) + && ! is_null($vars['phpQueryMethods']) + ? $vars['phpQueryMethods'] + : get_class_methods($realClass); + foreach($loop as $method) { + if ($method == '__initialize') + continue; + if (! is_callable(array($realClass, $method))) + continue; + if (isset(self::$pluginsStaticMethods[$method])) { + throw new Exception("Duplicate method '{$method}' from plugin '{$c}' conflicts with same method from plugin '".self::$pluginsStaticMethods[$method]."'"); + return; + } + self::$pluginsStaticMethods[$method] = $class; + } + if (method_exists($realClass, '__initialize')) + call_user_func_array(array($realClass, '__initialize'), array()); + } + // object methods + if (class_exists('phpQueryObjectPlugin_'.$class)) { + $realClass = 'phpQueryObjectPlugin_'.$class; + $vars = get_class_vars($realClass); + $loop = isset($vars['phpQueryMethods']) + && ! is_null($vars['phpQueryMethods']) + ? $vars['phpQueryMethods'] + : get_class_methods($realClass); + foreach($loop as $method) { + if (! is_callable(array($realClass, $method))) + continue; + if (isset(self::$pluginsMethods[$method])) { + throw new Exception("Duplicate method '{$method}' from plugin '{$c}' conflicts with same method from plugin '".self::$pluginsMethods[$method]."'"); + continue; + } + self::$pluginsMethods[$method] = $class; + } + } + return true; + } + /** + * Unloades all or specified document from memory. + * + * @param mixed $documentID @see phpQuery::getDocumentID() for supported types. + */ + public static function unloadDocuments($id = null) { + if (isset($id)) { + if ($id = self::getDocumentID($id)) + unset(phpQuery::$documents[$id]); + } else { + foreach(phpQuery::$documents as $k => $v) { + unset(phpQuery::$documents[$k]); + } + } + } + /** + * Parses phpQuery object or HTML result against PHP tags and makes them active. + * + * @param phpQuery|string $content + * @deprecated + * @return string + */ + public static function unsafePHPTags($content) { + return self::markupToPHP($content); + } + public static function DOMNodeListToArray($DOMNodeList) { + $array = array(); + if (! $DOMNodeList) + return $array; + foreach($DOMNodeList as $node) + $array[] = $node; + return $array; + } + /** + * Checks if $input is HTML string, which has to start with '<'. + * + * @deprecated + * @param String $input + * @return Bool + * @todo still used ? + */ + public static function isMarkup($input) { + return ! is_array($input) && substr(trim($input), 0, 1) == '<'; + } + public static function debug($text) { + if (self::$debug) + print var_dump($text); + } + /** + * Make an AJAX request. + * + * @param array See $options http://docs.jquery.com/Ajax/jQuery.ajax#toptions + * Additional options are: + * 'document' - document for global events, @see phpQuery::getDocumentID() + * 'referer' - implemented + * 'requested_with' - TODO; not implemented (X-Requested-With) + * @return Zend_Http_Client + * @link http://docs.jquery.com/Ajax/jQuery.ajax + * + * @TODO $options['cache'] + * @TODO $options['processData'] + * @TODO $options['xhr'] + * @TODO $options['data'] as string + * @TODO XHR interface + */ + public static function ajax($options = array(), $xhr = null) { + $options = array_merge( + self::$ajaxSettings, $options + ); + $documentID = isset($options['document']) + ? self::getDocumentID($options['document']) + : null; + if ($xhr) { + // reuse existing XHR object, but clean it up + $client = $xhr; +// $client->setParameterPost(null); +// $client->setParameterGet(null); + $client->setAuth(false); + $client->setHeaders("If-Modified-Since", null); + $client->setHeaders("Referer", null); + $client->resetParameters(); + } else { + // create new XHR object + require_once('Zend/Http/Client.php'); + $client = new Zend_Http_Client(); + $client->setCookieJar(); + } + if (isset($options['timeout'])) + $client->setConfig(array( + 'timeout' => $options['timeout'], + )); +// 'maxredirects' => 0, + foreach(self::$ajaxAllowedHosts as $k => $host) + if ($host == '.' && isset($_SERVER['HTTP_HOST'])) + self::$ajaxAllowedHosts[$k] = $_SERVER['HTTP_HOST']; + $host = parse_url($options['url'], PHP_URL_HOST); + if (! in_array($host, self::$ajaxAllowedHosts)) { + throw new Exception("Request not permitted, host '$host' not present in " + ."phpQuery::\$ajaxAllowedHosts"); + } + // JSONP + $jsre = "/=\\?(&|$)/"; + if (isset($options['dataType']) && $options['dataType'] == 'jsonp') { + $jsonpCallbackParam = $options['jsonp'] + ? $options['jsonp'] : 'callback'; + if (strtolower($options['type']) == 'get') { + if (! preg_match($jsre, $options['url'])) { + $sep = strpos($options['url'], '?') + ? '&' : '?'; + $options['url'] .= "$sep$jsonpCallbackParam=?"; + } + } else if ($options['data']) { + $jsonp = false; + foreach($options['data'] as $n => $v) { + if ($v == '?') + $jsonp = true; + } + if (! $jsonp) { + $options['data'][$jsonpCallbackParam] = '?'; + } + } + $options['dataType'] = 'json'; + } + if (isset($options['dataType']) && $options['dataType'] == 'json') { + $jsonpCallback = 'json_'.md5(microtime()); + $jsonpData = $jsonpUrl = false; + if ($options['data']) { + foreach($options['data'] as $n => $v) { + if ($v == '?') + $jsonpData = $n; + } + } + if (preg_match($jsre, $options['url'])) + $jsonpUrl = true; + if ($jsonpData !== false || $jsonpUrl) { + // remember callback name for httpData() + $options['_jsonp'] = $jsonpCallback; + if ($jsonpData !== false) + $options['data'][$jsonpData] = $jsonpCallback; + if ($jsonpUrl) + $options['url'] = preg_replace($jsre, "=$jsonpCallback\\1", $options['url']); + } + } + $client->setUri($options['url']); + $client->setMethod(strtoupper($options['type'])); + if (isset($options['referer']) && $options['referer']) + $client->setHeaders('Referer', $options['referer']); + $client->setHeaders(array( +// 'content-type' => $options['contentType'], + 'User-Agent' => 'Mozilla/5.0 (X11; U; Linux x86; en-US; rv:1.9.0.5) Gecko' + .'/2008122010 Firefox/3.0.5', + // TODO custom charset + 'Accept-Charset' => 'ISO-8859-1,utf-8;q=0.7,*;q=0.7', +// 'Connection' => 'keep-alive', +// 'Accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8', + 'Accept-Language' => 'en-us,en;q=0.5', + )); + if ($options['username']) + $client->setAuth($options['username'], $options['password']); + if (isset($options['ifModified']) && $options['ifModified']) + $client->setHeaders("If-Modified-Since", + self::$lastModified + ? self::$lastModified + : "Thu, 01 Jan 1970 00:00:00 GMT" + ); + $client->setHeaders("Accept", + isset($options['dataType']) + && isset(self::$ajaxSettings['accepts'][ $options['dataType'] ]) + ? self::$ajaxSettings['accepts'][ $options['dataType'] ].", */*" + : self::$ajaxSettings['accepts']['_default'] + ); + // TODO $options['processData'] + if ($options['data'] instanceof phpQueryObject) { + $serialized = $options['data']->serializeArray($options['data']); + $options['data'] = array(); + foreach($serialized as $r) + $options['data'][ $r['name'] ] = $r['value']; + } + if (strtolower($options['type']) == 'get') { + $client->setParameterGet($options['data']); + } else if (strtolower($options['type']) == 'post') { + $client->setEncType($options['contentType']); + $client->setParameterPost($options['data']); + } + if (self::$active == 0 && $options['global']) + phpQueryEvents::trigger($documentID, 'ajaxStart'); + self::$active++; + // beforeSend callback + if (isset($options['beforeSend']) && $options['beforeSend']) + phpQuery::callbackRun($options['beforeSend'], array($client)); + // ajaxSend event + if ($options['global']) + phpQueryEvents::trigger($documentID, 'ajaxSend', array($client, $options)); + if (phpQuery::$debug) { + self::debug("{$options['type']}: {$options['url']}\n"); + self::debug("Options: <pre>".var_export($options, true)."</pre>\n"); +// if ($client->getCookieJar()) +// self::debug("Cookies: <pre>".var_export($client->getCookieJar()->getMatchingCookies($options['url']), true)."</pre>\n"); + } + // request + $response = $client->request(); + if (phpQuery::$debug) { + self::debug('Status: '.$response->getStatus().' / '.$response->getMessage()); + self::debug($client->getLastRequest()); + self::debug($response->getHeaders()); + } + if ($response->isSuccessful()) { + // XXX tempolary + self::$lastModified = $response->getHeader('Last-Modified'); + $data = self::httpData($response->getBody(), $options['dataType'], $options); + if (isset($options['success']) && $options['success']) + phpQuery::callbackRun($options['success'], array($data, $response->getStatus(), $options)); + if ($options['global']) + phpQueryEvents::trigger($documentID, 'ajaxSuccess', array($client, $options)); + } else { + if (isset($options['error']) && $options['error']) + phpQuery::callbackRun($options['error'], array($client, $response->getStatus(), $response->getMessage())); + if ($options['global']) + phpQueryEvents::trigger($documentID, 'ajaxError', array($client, /*$response->getStatus(),*/$response->getMessage(), $options)); + } + if (isset($options['complete']) && $options['complete']) + phpQuery::callbackRun($options['complete'], array($client, $response->getStatus())); + if ($options['global']) + phpQueryEvents::trigger($documentID, 'ajaxComplete', array($client, $options)); + if ($options['global'] && ! --self::$active) + phpQueryEvents::trigger($documentID, 'ajaxStop'); + return $client; +// if (is_null($domId)) +// $domId = self::$defaultDocumentID ? self::$defaultDocumentID : false; +// return new phpQueryAjaxResponse($response, $domId); + } + protected static function httpData($data, $type, $options) { + if (isset($options['dataFilter']) && $options['dataFilter']) + $data = self::callbackRun($options['dataFilter'], array($data, $type)); + if (is_string($data)) { + if ($type == "json") { + if (isset($options['_jsonp']) && $options['_jsonp']) { + $data = preg_replace('/^\s*\w+\((.*)\)\s*$/s', '$1', $data); + } + $data = self::parseJSON($data); + } + } + return $data; + } + /** + * Enter description here... + * + * @param array|phpQuery $data + * + */ + public static function param($data) { + return http_build_query($data, null, '&'); + } + public static function get($url, $data = null, $callback = null, $type = null) { + if (!is_array($data)) { + $callback = $data; + $data = null; + } + // TODO some array_values on this shit + return phpQuery::ajax(array( + 'type' => 'GET', + 'url' => $url, + 'data' => $data, + 'success' => $callback, + 'dataType' => $type, + )); + } + public static function post($url, $data = null, $callback = null, $type = null) { + if (!is_array($data)) { + $callback = $data; + $data = null; + } + return phpQuery::ajax(array( + 'type' => 'POST', + 'url' => $url, + 'data' => $data, + 'success' => $callback, + 'dataType' => $type, + )); + } + public static function getJSON($url, $data = null, $callback = null) { + if (!is_array($data)) { + $callback = $data; + $data = null; + } + // TODO some array_values on this shit + return phpQuery::ajax(array( + 'type' => 'GET', + 'url' => $url, + 'data' => $data, + 'success' => $callback, + 'dataType' => 'json', + )); + } + public static function ajaxSetup($options) { + self::$ajaxSettings = array_merge( + self::$ajaxSettings, + $options + ); + } + public static function ajaxAllowHost($host1, $host2 = null, $host3 = null) { + $loop = is_array($host1) + ? $host1 + : func_get_args(); + foreach($loop as $host) { + if ($host && ! in_array($host, phpQuery::$ajaxAllowedHosts)) { + phpQuery::$ajaxAllowedHosts[] = $host; + } + } + } + public static function ajaxAllowURL($url1, $url2 = null, $url3 = null) { + $loop = is_array($url1) + ? $url1 + : func_get_args(); + foreach($loop as $url) + phpQuery::ajaxAllowHost(parse_url($url, PHP_URL_HOST)); + } + /** + * Returns JSON representation of $data. + * + * @static + * @param mixed $data + * @return string + */ + public static function toJSON($data) { + if (function_exists('json_encode')) + return json_encode($data); + require_once('Zend/Json/Encoder.php'); + return Zend_Json_Encoder::encode($data); + } + /** + * Parses JSON into proper PHP type. + * + * @static + * @param string $json + * @return mixed + */ + public static function parseJSON($json) { + if (function_exists('json_decode')) { + $return = json_decode(trim($json), true); + // json_decode and UTF8 issues + if (isset($return)) + return $return; + } + require_once('Zend/Json/Decoder.php'); + return Zend_Json_Decoder::decode($json); + } + /** + * Returns source's document ID. + * + * @param $source DOMNode|phpQueryObject + * @return string + */ + public static function getDocumentID($source) { + if ($source instanceof DOMDOCUMENT) { + foreach(phpQuery::$documents as $id => $document) { + if ($source->isSameNode($document->document)) + return $id; + } + } else if ($source instanceof DOMNODE) { + foreach(phpQuery::$documents as $id => $document) { + if ($source->ownerDocument->isSameNode($document->document)) + return $id; + } + } else if ($source instanceof phpQueryObject) + return $source->getDocumentID(); + else if (is_string($source) && isset(phpQuery::$documents[$source])) + return $source; + } + /** + * Get DOMDocument object related to $source. + * Returns null if such document doesn't exist. + * + * @param $source DOMNode|phpQueryObject|string + * @return string + */ + public static function getDOMDocument($source) { + if ($source instanceof DOMDOCUMENT) + return $source; + $source = self::getDocumentID($source); + return $source + ? self::$documents[$id]['document'] + : null; + } + + // UTILITIES + // http://docs.jquery.com/Utilities + + /** + * + * @return unknown_type + * @link http://docs.jquery.com/Utilities/jQuery.makeArray + */ + public static function makeArray($obj) { + $array = array(); + if (is_object($object) && $object instanceof DOMNODELIST) { + foreach($object as $value) + $array[] = $value; + } else if (is_object($object) && ! ($object instanceof Iterator)) { + foreach(get_object_vars($object) as $name => $value) + $array[0][$name] = $value; + } else { + foreach($object as $name => $value) + $array[0][$name] = $value; + } + return $array; + } + public static function inArray($value, $array) { + return in_array($value, $array); + } + /** + * + * @param $object + * @param $callback + * @return unknown_type + * @link http://docs.jquery.com/Utilities/jQuery.each + */ + public static function each($object, $callback, $param1 = null, $param2 = null, $param3 = null) { + $paramStructure = null; + if (func_num_args() > 2) { + $paramStructure = func_get_args(); + $paramStructure = array_slice($paramStructure, 2); + } + if (is_object($object) && ! ($object instanceof Iterator)) { + foreach(get_object_vars($object) as $name => $value) + phpQuery::callbackRun($callback, array($name, $value), $paramStructure); + } else { + foreach($object as $name => $value) + phpQuery::callbackRun($callback, array($name, $value), $paramStructure); + } + } + /** + * + * @link http://docs.jquery.com/Utilities/jQuery.map + */ + public static function map($array, $callback, $param1 = null, $param2 = null, $param3 = null) { + $result = array(); + $paramStructure = null; + if (func_num_args() > 2) { + $paramStructure = func_get_args(); + $paramStructure = array_slice($paramStructure, 2); + } + foreach($array as $v) { + $vv = phpQuery::callbackRun($callback, array($v), $paramStructure); +// $callbackArgs = $args; +// foreach($args as $i => $arg) { +// $callbackArgs[$i] = $arg instanceof CallbackParam +// ? $v +// : $arg; +// } +// $vv = call_user_func_array($callback, $callbackArgs); + if (is_array($vv)) { + foreach($vv as $vvv) + $result[] = $vvv; + } else if ($vv !== null) { + $result[] = $vv; + } + } + return $result; + } + /** + * + * @param $callback Callback + * @param $params + * @param $paramStructure + * @return unknown_type + */ + public static function callbackRun($callback, $params = array(), $paramStructure = null) { + if (! $callback) + return; + if ($callback instanceof CallbackParameterToReference) { + // TODO support ParamStructure to select which $param push to reference + if (isset($params[0])) + $callback->callback = $params[0]; + return true; + } + if ($callback instanceof Callback) { + $paramStructure = $callback->params; + $callback = $callback->callback; + } + if (! $paramStructure) + return call_user_func_array($callback, $params); + $p = 0; + foreach($paramStructure as $i => $v) { + $paramStructure[$i] = $v instanceof CallbackParam + ? $params[$p++] + : $v; + } + return call_user_func_array($callback, $paramStructure); + } + /** + * Merge 2 phpQuery objects. + * @param array $one + * @param array $two + * @protected + * @todo node lists, phpQueryObject + */ + public static function merge($one, $two) { + $elements = $one->elements; + foreach($two->elements as $node) { + $exists = false; + foreach($elements as $node2) { + if ($node2->isSameNode($node)) + $exists = true; + } + if (! $exists) + $elements[] = $node; + } + return $elements; +// $one = $one->newInstance(); +// $one->elements = $elements; +// return $one; + } + /** + * + * @param $array + * @param $callback + * @param $invert + * @return unknown_type + * @link http://docs.jquery.com/Utilities/jQuery.grep + */ + public static function grep($array, $callback, $invert = false) { + $result = array(); + foreach($array as $k => $v) { + $r = call_user_func_array($callback, array($v, $k)); + if ($r === !(bool)$invert) + $result[] = $v; + } + return $result; + } + public static function unique($array) { + return array_unique($array); + } + /** + * + * @param $function + * @return unknown_type + * @TODO there are problems with non-static methods, second parameter pass it + * but doesnt verify is method is really callable + */ + public static function isFunction($function) { + return is_callable($function); + } + public static function trim($str) { + return trim($str); + } + /* PLUGINS NAMESPACE */ + /** + * + * @param $url + * @param $callback + * @param $param1 + * @param $param2 + * @param $param3 + * @return phpQueryObject + */ + public static function browserGet($url, $callback, $param1 = null, $param2 = null, $param3 = null) { + if (self::plugin('WebBrowser')) { + $params = func_get_args(); + return self::callbackRun(array(self::$plugins, 'browserGet'), $params); + } else { + self::debug('WebBrowser plugin not available...'); + } + } + /** + * + * @param $url + * @param $data + * @param $callback + * @param $param1 + * @param $param2 + * @param $param3 + * @return phpQueryObject + */ + public static function browserPost($url, $data, $callback, $param1 = null, $param2 = null, $param3 = null) { + if (self::plugin('WebBrowser')) { + $params = func_get_args(); + return self::callbackRun(array(self::$plugins, 'browserPost'), $params); + } else { + self::debug('WebBrowser plugin not available...'); + } + } + /** + * + * @param $ajaxSettings + * @param $callback + * @param $param1 + * @param $param2 + * @param $param3 + * @return phpQueryObject + */ + public static function browser($ajaxSettings, $callback, $param1 = null, $param2 = null, $param3 = null) { + if (self::plugin('WebBrowser')) { + $params = func_get_args(); + return self::callbackRun(array(self::$plugins, 'browser'), $params); + } else { + self::debug('WebBrowser plugin not available...'); + } + } + /** + * + * @param $code + * @return string + */ + public static function php($code) { + return self::code('php', $code); + } + /** + * + * @param $type + * @param $code + * @return string + */ + public static function code($type, $code) { + return "<$type><!-- ".trim($code)." --></$type>"; + } + + public static function __callStatic($method, $params) { + return call_user_func_array( + array(phpQuery::$plugins, $method), + $params + ); + } + protected static function dataSetupNode($node, $documentID) { + // search are return if alredy exists + foreach(phpQuery::$documents[$documentID]->dataNodes as $dataNode) { + if ($node->isSameNode($dataNode)) + return $dataNode; + } + // if doesn't, add it + phpQuery::$documents[$documentID]->dataNodes[] = $node; + return $node; + } + protected static function dataRemoveNode($node, $documentID) { + // search are return if alredy exists + foreach(phpQuery::$documents[$documentID]->dataNodes as $k => $dataNode) { + if ($node->isSameNode($dataNode)) { + unset(self::$documents[$documentID]->dataNodes[$k]); + unset(self::$documents[$documentID]->data[ $dataNode->dataID ]); + } + } + } + public static function data($node, $name, $data, $documentID = null) { + if (! $documentID) + // TODO check if this works + $documentID = self::getDocumentID($node); + $document = phpQuery::$documents[$documentID]; + $node = self::dataSetupNode($node, $documentID); + if (! isset($node->dataID)) + $node->dataID = ++phpQuery::$documents[$documentID]->uuid; + $id = $node->dataID; + if (! isset($document->data[$id])) + $document->data[$id] = array(); + if (! is_null($data)) + $document->data[$id][$name] = $data; + if ($name) { + if (isset($document->data[$id][$name])) + return $document->data[$id][$name]; + } else + return $id; + } + public static function removeData($node, $name, $documentID) { + if (! $documentID) + // TODO check if this works + $documentID = self::getDocumentID($node); + $document = phpQuery::$documents[$documentID]; + $node = self::dataSetupNode($node, $documentID); + $id = $node->dataID; + if ($name) { + if (isset($document->data[$id][$name])) + unset($document->data[$id][$name]); + $name = null; + foreach($document->data[$id] as $name) + break; + if (! $name) + self::removeData($node, $name, $documentID); + } else { + self::dataRemoveNode($node, $documentID); + } + } +} +/** + * Plugins static namespace class. + * + * @author Tobiasz Cudnik <tobiasz.cudnik/gmail.com> + * @package phpQuery + * @todo move plugin methods here (as statics) + */ +class phpQueryPlugins { + public function __call($method, $args) { + if (isset(phpQuery::$extendStaticMethods[$method])) { + $return = call_user_func_array( + phpQuery::$extendStaticMethods[$method], + $args + ); + } else if (isset(phpQuery::$pluginsStaticMethods[$method])) { + $class = phpQuery::$pluginsStaticMethods[$method]; + $realClass = "phpQueryPlugin_$class"; + $return = call_user_func_array( + array($realClass, $method), + $args + ); + return isset($return) + ? $return + : $this; + } else + throw new Exception("Method '{$method}' doesnt exist"); + } +} +/** + * Shortcut to phpQuery::pq($arg1, $context) + * Chainable. + * + * @see phpQuery::pq() + * @return phpQueryObject|QueryTemplatesSource|QueryTemplatesParse|QueryTemplatesSourceQuery + * @author Tobiasz Cudnik <tobiasz.cudnik/gmail.com> + * @package phpQuery + */ +function pq($arg1, $context = null) { + $args = func_get_args(); + return call_user_func_array( + array('phpQuery', 'pq'), + $args + ); +} +// add plugins dir and Zend framework to include path +set_include_path( + get_include_path() + .PATH_SEPARATOR.dirname(__FILE__).'/phpQuery/' + .PATH_SEPARATOR.dirname(__FILE__).'/phpQuery/plugins/' +); +// why ? no __call nor __get for statics in php... +// XXX __callStatic will be available in PHP 5.3 +phpQuery::$plugins = new phpQueryPlugins(); +// include bootstrap file (personal library config) +if (file_exists(dirname(__FILE__).'/phpQuery/bootstrap.php')) + require_once dirname(__FILE__).'/phpQuery/bootstrap.php'; diff --git a/_test/cases/inc/search/data/ns1/ns3/page3.txt b/_test/data/_dummy similarity index 100% rename from _test/cases/inc/search/data/ns1/ns3/page3.txt rename to _test/data/_dummy diff --git a/_test/cases/inc/search/data/ns1/page1.txt b/_test/data/attic/_dummy similarity index 100% rename from _test/cases/inc/search/data/ns1/page1.txt rename to _test/data/attic/_dummy diff --git a/_test/cases/inc/search/data/ns1/page2.txt b/_test/data/cache/_dummy similarity index 100% rename from _test/cases/inc/search/data/ns1/page2.txt rename to _test/data/cache/_dummy diff --git a/_test/cases/inc/search/data/ns2/nopage.ext b/_test/data/index/_dummy similarity index 100% rename from _test/cases/inc/search/data/ns2/nopage.ext rename to _test/data/index/_dummy diff --git a/_test/cases/inc/search/data/ns2/page1.txt b/_test/data/locks/_dummy similarity index 100% rename from _test/cases/inc/search/data/ns2/page1.txt rename to _test/data/locks/_dummy diff --git a/_test/data/media/wiki/dokuwiki-128.png b/_test/data/media/wiki/dokuwiki-128.png new file mode 100644 index 0000000000000000000000000000000000000000..b2306ac9571f39c6f30c0a5967e5b520415b3d80 Binary files /dev/null and b/_test/data/media/wiki/dokuwiki-128.png differ diff --git a/_test/data/media_attic/_dummy b/_test/data/media_attic/_dummy new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/_test/data/media_meta/_dummy b/_test/data/media_meta/_dummy new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/_test/data/meta/_dummy b/_test/data/meta/_dummy new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/_test/data/pages/wiki/dokuwiki.txt b/_test/data/pages/wiki/dokuwiki.txt new file mode 100644 index 0000000000000000000000000000000000000000..e6fac5b65237681e83f57c4555280d66a223b884 --- /dev/null +++ b/_test/data/pages/wiki/dokuwiki.txt @@ -0,0 +1,64 @@ +====== DokuWiki ====== + +[[doku>wiki:dokuwiki|{{wiki:dokuwiki-128.png }}]] DokuWiki is a standards compliant, simple to use [[wp>Wiki]], mainly aimed at creating documentation of any kind. It is targeted at developer teams, workgroups and small companies. It has a simple but powerful [[wiki:syntax]] which makes sure the datafiles remain readable outside the Wiki and eases the creation of structured texts. All data is stored in plain text files -- no database is required. + +Read the [[doku>manual|DokuWiki Manual]] to unleash the full power of DokuWiki. + +===== Download ===== + +DokuWiki is available at http://www.splitbrain.org/go/dokuwiki + + +===== Read More ===== + +All documentation and additional information besides the [[syntax|syntax description]] is maintained in the DokuWiki at [[doku>|www.dokuwiki.org]]. + +**About DokuWiki** + + * [[doku>features|A feature list]] :!: + * [[doku>users|Happy Users]] + * [[doku>press|Who wrote about it]] + * [[doku>blogroll|What Bloggers think]] + * [[http://www.wikimatrix.org/show/DokuWiki|Compare it with other wiki software]] + +**Installing DokuWiki** + + * [[doku>requirements|System Requirements]] + * [[http://www.splitbrain.org/go/dokuwiki|Download DokuWiki]] :!: + * [[doku>changes|Change Log]] + * [[doku>Install|How to install or upgrade]] :!: + * [[doku>config|Configuration]] + +**Using DokuWiki** + + * [[doku>syntax|Wiki Syntax]] + * [[doku>manual|The manual]] :!: + * [[doku>FAQ|Frequently Asked Questions (FAQ)]] + * [[doku>glossary|Glossary]] + * [[http://search.dokuwiki.org|Search for DokuWiki help and documentation]] + +**Customizing DokuWiki** + + * [[doku>tips|Tips and Tricks]] + * [[doku>Template|How to create and use templates]] + * [[doku>plugins|Installing plugins]] + * [[doku>development|Development Resources]] + +**DokuWiki Feedback and Community** + + * [[doku>newsletter|Subscribe to the newsletter]] :!: + * [[doku>mailinglist|Join the mailing list]] + * [[http://forum.dokuwiki.org|Check out the user forum]] + * [[doku>irc|Talk to other users in the IRC channel]] + * [[http://bugs.splitbrain.org/index.php?project=1|Submit bugs and feature wishes]] + * [[http://www.wikimatrix.org/forum/viewforum.php?id=10|Share your experiences in the WikiMatrix forum]] + * [[doku>thanks|Some humble thanks]] + + +===== Copyright ===== + +2004-2010 (c) Andreas Gohr <andi@splitbrain.org>((Please do not contact me for help and support -- use the [[doku>mailinglist]] or [[http://forum.dokuwiki.org|forum]] instead)) and the DokuWiki Community + +The DokuWiki engine is licensed under [[http://www.gnu.org/licenses/gpl.html|GNU General Public License]] Version 2. If you use DokuWiki in your company, consider [[doku>donate|donating]] a few bucks ;-). + +Not sure what this means? See the [[doku>faq:license|FAQ on the Licenses]]. diff --git a/_test/data/pages/wiki/syntax.txt b/_test/data/pages/wiki/syntax.txt new file mode 100644 index 0000000000000000000000000000000000000000..0b54809492ae6cba8bcca5414f53d3970e035497 --- /dev/null +++ b/_test/data/pages/wiki/syntax.txt @@ -0,0 +1,486 @@ +====== Formatting Syntax ====== + +[[doku>DokuWiki]] supports some simple markup language, which tries to make the datafiles to be as readable as possible. This page contains all possible syntax you may use when editing the pages. Simply have a look at the source of this page by pressing the //Edit this page// button at the top or bottom of the page. If you want to try something, just use the [[playground:playground|playground]] page. The simpler markup is easily accessible via [[doku>toolbar|quickbuttons]], too. + +===== Basic Text Formatting ===== + +DokuWiki supports **bold**, //italic//, __underlined__ and ''monospaced'' texts. Of course you can **__//''combine''//__** all these. + + DokuWiki supports **bold**, //italic//, __underlined__ and ''monospaced'' texts. + Of course you can **__//''combine''//__** all these. + +You can use <sub>subscript</sub> and <sup>superscript</sup>, too. + + You can use <sub>subscript</sub> and <sup>superscript</sup>, too. + +You can mark something as <del>deleted</del> as well. + + You can mark something as <del>deleted</del> as well. + +**Paragraphs** are created from blank lines. If you want to **force a newline** without a paragraph, you can use two backslashes followed by a whitespace or the end of line. + +This is some text with some linebreaks\\ Note that the +two backslashes are only recognized at the end of a line\\ +or followed by\\ a whitespace \\this happens without it. + + This is some text with some linebreaks\\ Note that the + two backslashes are only recognized at the end of a line\\ + or followed by\\ a whitespace \\this happens without it. + +You should use forced newlines only if really needed. + +===== Links ===== + +DokuWiki supports multiple ways of creating links. + +==== External ==== + +External links are recognized automagically: http://www.google.com or simply www.google.com - You can set the link text as well: [[http://www.google.com|This Link points to google]]. Email addresses like this one: <andi@splitbrain.org> are recognized, too. + + DokuWiki supports multiple ways of creating links. External links are recognized + automagically: http://www.google.com or simply www.google.com - You can set + link text as well: [[http://www.google.com|This Link points to google]]. Email + addresses like this one: <andi@splitbrain.org> are recognized, too. + +==== Internal ==== + +Internal links are created by using square brackets. You can either just give a [[pagename]] or use an additional [[pagename|link text]]. + + Internal links are created by using square brackets. You can either just give + a [[pagename]] or use an additional [[pagename|link text]]. + +[[doku>pagename|Wiki pagenames]] are converted to lowercase automatically, special characters are not allowed. + +You can use [[some:namespaces]] by using a colon in the pagename. + + You can use [[some:namespaces]] by using a colon in the pagename. + +For details about namespaces see [[doku>namespaces]]. + +Linking to a specific section is possible, too. Just add the section name behind a hash character as known from HTML. This links to [[syntax#internal|this Section]]. + + This links to [[syntax#internal|this Section]]. + +Notes: + + * Links to [[syntax|existing pages]] are shown in a different style from [[nonexisting]] ones. + * DokuWiki does not use [[wp>CamelCase]] to automatically create links by default, but this behavior can be enabled in the [[doku>config]] file. Hint: If DokuWiki is a link, then it's enabled. + * When a section's heading is changed, its bookmark changes, too. So don't rely on section linking too much. + +==== Interwiki ==== + +DokuWiki supports [[doku>Interwiki]] links. These are quick links to other Wikis. For example this is a link to Wikipedia's page about Wikis: [[wp>Wiki]]. + + DokuWiki supports [[doku>Interwiki]] links. These are quick links to other Wikis. + For example this is a link to Wikipedia's page about Wikis: [[wp>Wiki]]. + +==== Windows Shares ==== + +Windows shares like [[\\server\share|this]] are recognized, too. Please note that these only make sense in a homogeneous user group like a corporate [[wp>Intranet]]. + + Windows Shares like [[\\server\share|this]] are recognized, too. + +Notes: + + * For security reasons direct browsing of windows shares only works in Microsoft Internet Explorer per default (and only in the "local zone"). + * For Mozilla and Firefox it can be enabled through different workaround mentioned in the [[http://kb.mozillazine.org/Links_to_local_pages_do_not_work|Mozilla Knowledge Base]]. However, there will still be a JavaScript warning about trying to open a Windows Share. To remove this warning (for all users), put the following line in ''conf/local.protected.php'': + + $lang['js']['nosmblinks'] = ''; + +==== Image Links ==== + +You can also use an image to link to another internal or external page by combining the syntax for links and [[#images_and_other_files|images]] (see below) like this: + + [[http://www.php.net|{{wiki:dokuwiki-128.png}}]] + +[[http://www.php.net|{{wiki:dokuwiki-128.png}}]] + +Please note: The image formatting is the only formatting syntax accepted in link names. + +The whole [[#images_and_other_files|image]] and [[#links|link]] syntax is supported (including image resizing, internal and external images and URLs and interwiki links). + +===== Footnotes ===== + +You can add footnotes ((This is a footnote)) by using double parentheses. + + You can add footnotes ((This is a footnote)) by using double parentheses. + +===== Sectioning ===== + +You can use up to five different levels of headlines to structure your content. If you have more than three headlines, a table of contents is generated automatically -- this can be disabled by including the string ''<nowiki>~~NOTOC~~</nowiki>'' in the document. + +==== Headline Level 3 ==== +=== Headline Level 4 === +== Headline Level 5 == + + ==== Headline Level 3 ==== + === Headline Level 4 === + == Headline Level 5 == + +By using four or more dashes, you can make a horizontal line: + +---- + +===== Images and Other Files ===== + +You can include external and internal [[doku>images]] with curly brackets. Optionally you can specify the size of them. + +Real size: {{wiki:dokuwiki-128.png}} + +Resize to given width: {{wiki:dokuwiki-128.png?50}} + +Resize to given width and height((when the aspect ratio of the given width and height doesn't match that of the image, it will be cropped to the new ratio before resizing)): {{wiki:dokuwiki-128.png?200x50}} + +Resized external image: {{http://de3.php.net/images/php.gif?200x50}} + + Real size: {{wiki:dokuwiki-128.png}} + Resize to given width: {{wiki:dokuwiki-128.png?50}} + Resize to given width and height: {{wiki:dokuwiki-128.png?200x50}} + Resized external image: {{http://de3.php.net/images/php.gif?200x50}} + + +By using left or right whitespaces you can choose the alignment. + +{{ wiki:dokuwiki-128.png}} + +{{wiki:dokuwiki-128.png }} + +{{ wiki:dokuwiki-128.png }} + + {{ wiki:dokuwiki-128.png}} + {{wiki:dokuwiki-128.png }} + {{ wiki:dokuwiki-128.png }} + +Of course, you can add a title (displayed as a tooltip by most browsers), too. + +{{ wiki:dokuwiki-128.png |This is the caption}} + + {{ wiki:dokuwiki-128.png |This is the caption}} + +If you specify a filename (external or internal) that is not an image (''gif, jpeg, png''), then it will be displayed as a link instead. + +For linking an image to another page see [[#Image Links]] above. + +===== Lists ===== + +Dokuwiki supports ordered and unordered lists. To create a list item, indent your text by two spaces and use a ''*'' for unordered lists or a ''-'' for ordered ones. + + * This is a list + * The second item + * You may have different levels + * Another item + + - The same list but ordered + - Another item + - Just use indention for deeper levels + - That's it + +<code> + * This is a list + * The second item + * You may have different levels + * Another item + + - The same list but ordered + - Another item + - Just use indention for deeper levels + - That's it +</code> + +Also take a look at the [[doku>faq:lists|FAQ on list items]]. + +===== Text Conversions ===== + +DokuWiki can convert certain pre-defined characters or strings into images or other text or HTML. + +The text to image conversion is mainly done for smileys. And the text to HTML conversion is used for typography replacements, but can be configured to use other HTML as well. + +==== Text to Image Conversions ==== + +DokuWiki converts commonly used [[wp>emoticon]]s to their graphical equivalents. Those [[doku>Smileys]] and other images can be configured and extended. Here is an overview of Smileys included in DokuWiki: + + * 8-) %% 8-) %% + * 8-O %% 8-O %% + * :-( %% :-( %% + * :-) %% :-) %% + * =) %% =) %% + * :-/ %% :-/ %% + * :-\ %% :-\ %% + * :-? %% :-? %% + * :-D %% :-D %% + * :-P %% :-P %% + * :-O %% :-O %% + * :-X %% :-X %% + * :-| %% :-| %% + * ;-) %% ;-) %% + * ^_^ %% ^_^ %% + * :?: %% :?: %% + * :!: %% :!: %% + * LOL %% LOL %% + * FIXME %% FIXME %% + * DELETEME %% DELETEME %% + +==== Text to HTML Conversions ==== + +Typography: [[DokuWiki]] can convert simple text characters to their typographically correct entities. Here is an example of recognized characters. + +-> <- <-> => <= <=> >> << -- --- 640x480 (c) (tm) (r) +"He thought 'It's a man's world'..." + +<code> +-> <- <-> => <= <=> >> << -- --- 640x480 (c) (tm) (r) +"He thought 'It's a man's world'..." +</code> + +The same can be done to produce any kind of HTML, it just needs to be added to the [[doku>entities|pattern file]]. + +There are three exceptions which do not come from that pattern file: multiplication entity (640x480), 'single' and "double quotes". They can be turned off through a [[doku>config:typography|config option]]. + +===== Quoting ===== + +Some times you want to mark some text to show it's a reply or comment. You can use the following syntax: + + I think we should do it + + > No we shouldn't + + >> Well, I say we should + + > Really? + + >> Yes! + + >>> Then lets do it! + +I think we should do it + +> No we shouldn't + +>> Well, I say we should + +> Really? + +>> Yes! + +>>> Then lets do it! + +===== Tables ===== + +DokuWiki supports a simple syntax to create tables. + +^ Heading 1 ^ Heading 2 ^ Heading 3 ^ +| Row 1 Col 1 | Row 1 Col 2 | Row 1 Col 3 | +| Row 2 Col 1 | some colspan (note the double pipe) || +| Row 3 Col 1 | Row 3 Col 2 | Row 3 Col 3 | + +Table rows have to start and end with a ''|'' for normal rows or a ''^'' for headers. + + ^ Heading 1 ^ Heading 2 ^ Heading 3 ^ + | Row 1 Col 1 | Row 1 Col 2 | Row 1 Col 3 | + | Row 2 Col 1 | some colspan (note the double pipe) || + | Row 3 Col 1 | Row 3 Col 2 | Row 3 Col 3 | + +To connect cells horizontally, just make the next cell completely empty as shown above. Be sure to have always the same amount of cell separators! + +Vertical tableheaders are possible, too. + +| ^ Heading 1 ^ Heading 2 ^ +^ Heading 3 | Row 1 Col 2 | Row 1 Col 3 | +^ Heading 4 | no colspan this time | | +^ Heading 5 | Row 2 Col 2 | Row 2 Col 3 | + +As you can see, it's the cell separator before a cell which decides about the formatting: + + | ^ Heading 1 ^ Heading 2 ^ + ^ Heading 3 | Row 1 Col 2 | Row 1 Col 3 | + ^ Heading 4 | no colspan this time | | + ^ Heading 5 | Row 2 Col 2 | Row 2 Col 3 | + +You can have rowspans (vertically connected cells) by adding '':::'' into the cells below the one to which they should connect. + +^ Heading 1 ^ Heading 2 ^ Heading 3 ^ +| Row 1 Col 1 | this cell spans vertically | Row 1 Col 3 | +| Row 2 Col 1 | ::: | Row 2 Col 3 | +| Row 3 Col 1 | ::: | Row 2 Col 3 | + +Apart from the rowspan syntax those cells should not contain anything else. + + ^ Heading 1 ^ Heading 2 ^ Heading 3 ^ + | Row 1 Col 1 | this cell spans vertically | Row 1 Col 3 | + | Row 2 Col 1 | ::: | Row 2 Col 3 | + | Row 3 Col 1 | ::: | Row 2 Col 3 | + +You can align the table contents, too. Just add at least two whitespaces at the opposite end of your text: Add two spaces on the left to align right, two spaces on the right to align left and two spaces at least at both ends for centered text. + +^ Table with alignment ^^^ +| right| center |left | +|left | right| center | +| xxxxxxxxxxxx | xxxxxxxxxxxx | xxxxxxxxxxxx | + +This is how it looks in the source: + + ^ Table with alignment ^^^ + | right| center |left | + |left | right| center | + | xxxxxxxxxxxx | xxxxxxxxxxxx | xxxxxxxxxxxx | + +Note: Vertical alignment is not supported. + +===== No Formatting ===== + +If you need to display text exactly like it is typed (without any formatting), enclose the area either with ''%%<nowiki>%%'' tags or even simpler, with double percent signs ''<nowiki>%%</nowiki>''. + +<nowiki> +This is some text which contains addresses like this: http://www.splitbrain.org and **formatting**, but nothing is done with it. +</nowiki> +The same is true for %%//__this__ text// with a smiley ;-)%%. + + <nowiki> + This is some text which contains addresses like this: http://www.splitbrain.org and **formatting**, but nothing is done with it. + </nowiki> + The same is true for %%//__this__ text// with a smiley ;-)%%. + +===== Code Blocks ===== + +You can include code blocks into your documents by either indenting them by at least two spaces (like used for the previous examples) or by using the tags ''%%<code>%%'' or ''%%<file>%%''. + + This is text is indented by two spaces. + +<code> +This is preformatted code all spaces are preserved: like <-this +</code> + +<file> +This is pretty much the same, but you could use it to show that you quoted a file. +</file> + +Those blocks were created by this source: + + This is text is indented by two spaces. + + <code> + This is preformatted code all spaces are preserved: like <-this + </code> + + <file> + This is pretty much the same, but you could use it to show that you quoted a file. + </file> + +==== Syntax Highlighting ==== + +[[wiki:DokuWiki]] can highlight sourcecode, which makes it easier to read. It uses the [[http://qbnz.com/highlighter/|GeSHi]] Generic Syntax Highlighter -- so any language supported by GeSHi is supported. The syntax uses the same code and file blocks described in the previous section, but this time the name of the language syntax to be highlighted is included inside the tag, e.g. ''<nowiki><code java></nowiki>'' or ''<nowiki><file java></nowiki>''. + +<code java> +/** + * The HelloWorldApp class implements an application that + * simply displays "Hello World!" to the standard output. + */ +class HelloWorldApp { + public static void main(String[] args) { + System.out.println("Hello World!"); //Display the string. + } +} +</code> + +The following language strings are currently recognized: //4cs, abap, actionscript-french, actionscript, actionscript3, ada, apache, applescript, asm, asp, autoconf, autohotkey, autoit, avisynth, awk, bash, basic4gl, bf, bibtex, blitzbasic, bnf, boo, c, c_mac, caddcl, cadlisp, cfdg, cfm, chaiscript, cil, clojure, cmake, cobol, cpp, cpp-qt, csharp, css, cuesheet, d, dcs, delphi, diff, div, dos, dot, ecmascript, eiffel, email, erlang, fo, fortran, freebasic, fsharp, gambas, genero, genie, gdb, glsl, gml, gnuplot, groovy, gettext, gwbasic, haskell, hicest, hq9plus, html, icon, idl, ini, inno, intercal, io, j, java5, java, javascript, jquery, kixtart, klonec, klonecpp, latex, lisp, locobasic, logtalk, lolcode, lotusformulas, lotusscript, lscript, lsl2, lua, m68k, magiksf, make, mapbasic, matlab, mirc, modula2, modula3, mmix, mpasm, mxml, mysql, newlisp, nsis, oberon2, objc, ocaml-brief, ocaml, oobas, oracle8, oracle11, oxygene, oz, pascal, pcre, perl, perl6, per, pf, php-brief, php, pike, pic16, pixelbender, plsql, postgresql, povray, powerbuilder, powershell, progress, prolog, properties, providex, purebasic, python, q, qbasic, rails, rebol, reg, robots, rpmspec, rsplus, ruby, sas, scala, scheme, scilab, sdlbasic, smalltalk, smarty, sql, systemverilog, tcl, teraterm, text, thinbasic, tsql, typoscript, unicon, vala, vbnet, vb, verilog, vhdl, vim, visualfoxpro, visualprolog, whitespace, winbatch, whois, xbasic, xml, xorg_conf, xpp, z80// + +==== Downloadable Code Blocks ==== + +When you use the ''%%<code>%%'' or ''%%<file>%%'' syntax as above, you might want to make the shown code available for download as well. You can to this by specifying a file name after language code like this: + +<code> +<file php myexample.php> +<?php echo "hello world!"; ?> +</file> +</code> + +<file php myexample.php> +<?php echo "hello world!"; ?> +</file> + +If you don't want any highlighting but want a downloadable file, specify a dash (''-'') as the language code: ''%%<code - myfile.foo>%%''. + + +===== Embedding HTML and PHP ===== + +You can embed raw HTML or PHP code into your documents by using the ''%%<html>%%'' or ''%%<php>%%'' tags. (Use uppercase tags if you need to enclose block level elements.) + +HTML example: + +<code> +<html> +This is some <span style="color:red;font-size:150%;">inline HTML</span> +</html> +<HTML> +<p style="border:2px dashed red;">And this is some block HTML</p> +</HTML> +</code> + +<html> +This is some <span style="color:red;font-size:150%;">inline HTML</span> +</html> +<HTML> +<p style="border:2px dashed red;">And this is some block HTML</p> +</HTML> + +PHP example: + +<code> +<php> +echo 'A logo generated by PHP:'; +echo '<img src="' . $_SERVER['PHP_SELF'] . '?=' . php_logo_guid() . '" alt="PHP Logo !" />'; +echo '(generated inline HTML)'; +</php> +<PHP> +echo '<table class="inline"><tr><td>The same, but inside a block level element:</td>'; +echo '<td><img src="' . $_SERVER['PHP_SELF'] . '?=' . php_logo_guid() . '" alt="PHP Logo !" /></td>'; +echo '</tr></table>'; +</PHP> +</code> + +<php> +echo 'A logo generated by PHP:'; +echo '<img src="' . $_SERVER['PHP_SELF'] . '?=' . php_logo_guid() . '" alt="PHP Logo !" />'; +echo '(inline HTML)'; +</php> +<PHP> +echo '<table class="inline"><tr><td>The same, but inside a block level element:</td>'; +echo '<td><img src="' . $_SERVER['PHP_SELF'] . '?=' . php_logo_guid() . '" alt="PHP Logo !" /></td>'; +echo '</tr></table>'; +</PHP> + +**Please Note**: HTML and PHP embedding is disabled by default in the configuration. If disabled, the code is displayed instead of executed. + +===== RSS/ATOM Feed Aggregation ===== +[[DokuWiki]] can integrate data from external XML feeds. For parsing the XML feeds, [[http://simplepie.org/|SimplePie]] is used. All formats understood by SimplePie can be used in DokuWiki as well. You can influence the rendering by multiple additional space separated parameters: + +^ Parameter ^ Description ^ +| any number | will be used as maximum number items to show, defaults to 8 | +| reverse | display the last items in the feed first | +| author | show item authors names | +| date | show item dates | +| description| show the item description. If [[doku>config:htmlok|HTML]] is disabled all tags will be stripped | +| //n//[dhm] | refresh period, where d=days, h=hours, m=minutes. (e.g. 12h = 12 hours). | + +The refresh period defaults to 4 hours. Any value below 10 minutes will be treated as 10 minutes. [[wiki:DokuWiki]] will generally try to supply a cached version of a page, obviously this is inappropriate when the page contains dynamic external content. The parameter tells [[wiki:DokuWiki]] to re-render the page if it is more than //refresh period// since the page was last rendered. + +**Example:** + + {{rss>http://slashdot.org/index.rss 5 author date 1h }} + +{{rss>http://slashdot.org/index.rss 5 author date 1h }} + + +===== Control Macros ===== + +Some syntax influences how DokuWiki renders a page without creating any output it self. The following control macros are availble: + +^ Macro ^ Description | +| %%~~NOTOC~~%% | If this macro is found on the page, no table of contents will be created | +| %%~~NOCACHE~~%% | DokuWiki caches all output by default. Sometimes this might not be wanted (eg. when the %%<php>%% syntax above is used), adding this macro will force DokuWiki to rerender a page on every call | + +===== Syntax Plugins ===== + +DokuWiki's syntax can be extended by [[doku>plugins|Plugins]]. How the installed plugins are used is described on their appropriate description pages. The following syntax plugins are available in this particular DokuWiki installation: + +~~INFO:syntaxplugins~~ diff --git a/_test/data/tmp/_dummy b/_test/data/tmp/_dummy new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/_test/debug.note b/_test/debug.note deleted file mode 100644 index 28c34d8eec4b518cc048fb552e839ce2b8902264..0000000000000000000000000000000000000000 --- a/_test/debug.note +++ /dev/null @@ -1,4 +0,0 @@ -print "-----------------------------------------------------\n"; -print_r(array_map('stripbyteindex',$this->H->calls)); -print "-----------------------------------------------------\n"; -print_r($calls); diff --git a/_test/index.php b/_test/index.php deleted file mode 100644 index 64ece47624db320c0850c9dfe81a52273d35d2de..0000000000000000000000000000000000000000 --- a/_test/index.php +++ /dev/null @@ -1,228 +0,0 @@ -<?php -define('DOKU_UNITTEST',true); -define('DOKU_TESTSCRIPT',$_SERVER['PHP_SELF']); - -if(!defined('DOKU_INC')) define('DOKU_INC',realpath(dirname(__FILE__).'/../').'/'); -define('DOKU_CONF',realpath(dirname(__FILE__).'/../conf').'/'); - -require_once DOKU_CONF . 'dokuwiki.php'; -if(@file_exists(DOKU_CONF.'local.php')){ require_once(DOKU_CONF.'local.php'); } - -$conf['lang'] = 'en'; -define('TEST_ROOT', dirname(__FILE__)); -define('TMPL_FILESCHEME_PATH', TEST_ROOT . '/filescheme/'); -error_reporting(E_ALL & ~E_DEPRECATED); - -set_time_limit(600); -ini_set('memory_limit','128M'); - -/* Used to determine output to display */ -define('DW_TESTS_OUTPUT_HTML',1); -define('DW_TESTS_OUTPUT_XML',2); - -if ( isset($_GET['output']) && $_GET['output'] == 'xml' ) { - define('DW_TESTS_OUTPUT',DW_TESTS_OUTPUT_XML); -} else { - define('DW_TESTS_OUTPUT',DW_TESTS_OUTPUT_HTML); -} - -require_once 'lib/testmanager.php'; -TestManager::setup('tests.ini'); - -if ( !defined('SIMPLE_TEST') ) { - define('SIMPLE_TEST', ConfigManager::getOptionAsPath('tests', 'simpletest', 'library_path')); -} - -if (!@include_once SIMPLE_TEST . 'reporter.php') { - RaiseError('runtime', 'LIBRARY_REQUIRED', array( - 'library' => 'Simple Test', - 'path' => SIMPLE_TEST)); -} - -function & DW_TESTS_GetReporter() { - static $Reporter = NULL; - if ( !$Reporter ) { - switch ( DW_TESTS_OUTPUT ) { - case DW_TESTS_OUTPUT_XML: - require_once SIMPLE_TEST . 'xml.php'; - $Reporter = new XmlReporter(); - break; - case DW_TESTS_OUTPUT_HTML: - default: - $Reporter = new HTMLReporter('utf-8'); - break; - } - } - return $Reporter; -} - -function DW_TESTS_PaintRunMore() { - switch ( DW_TESTS_OUTPUT ) { - case DW_TESTS_OUTPUT_XML: - break; - case DW_TESTS_OUTPUT_HTML: - default: - echo "<p><a href='" . DOKU_TESTSCRIPT . "'>Run more tests</a></p>"; - break; - } -} - -function DW_TESTS_PaintHeader() { - switch ( DW_TESTS_OUTPUT ) { - case DW_TESTS_OUTPUT_XML: - header('Content-Type: text/xml; charset="utf-8"'); - break; - case DW_TESTS_OUTPUT_HTML: - $header = <<<EOD -<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Strict//EN' - 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd'> -<html xmlns='http://www.w3.org/1999/xhtml' xml:lang='en' lang='en'> - <head> - <meta http-equiv='Content-Type' - content='text/html; charset=iso-8859-1' /> - - <title>Dokuwiki: Unit Test Suite</title> - <link href="tests.css" type="text/css" rel="stylesheet" media="all"/> - - </head> - <body> -EOD; - echo $header; - default: - break; - } -} - -function DW_TESTS_PaintSuiteHeader() { - switch ( DW_TESTS_OUTPUT ) { - case DW_TESTS_OUTPUT_XML: - break; - case DW_TESTS_OUTPUT_HTML: - default: - echo "<h1>Dokuwiki: Unit Test Suite</h1>\n"; - echo "<p><a href='". DOKU_TESTSCRIPT ."?show=groups'>Test groups</a>"; - echo " || <a href='". DOKU_TESTSCRIPT ."?show=cases'>Test cases</a></p>"; - break; - } -} - -function DW_TESTS_PaintCaseList() { - switch ( DW_TESTS_OUTPUT ) { - case DW_TESTS_OUTPUT_XML: - echo XMLTestManager::getTestCaseList(TEST_CASES); - break; - case DW_TESTS_OUTPUT_HTML: - default: - echo HTMLTestManager::getTestCaseList(TEST_CASES); - break; - } -} - -function DW_TESTS_PaintGroupTestList() { - switch ( DW_TESTS_OUTPUT ) { - case DW_TESTS_OUTPUT_XML: - echo XMLTestManager::getGroupTestList(TEST_GROUPS); - break; - case DW_TESTS_OUTPUT_HTML: - default: - echo HTMLTestManager::getGroupTestList(TEST_GROUPS); - break; - } -} - -function DW_TESTS_PaintPluginTestCaseList() { - switch ( DW_TESTS_OUTPUT ) { - case DW_TESTS_OUTPUT_XML: - echo XMLTestManager::getPluginTestCaseList(TEST_PLUGINS); - break; - case DW_TESTS_OUTPUT_HTML: - default: - echo HTMLTestManager::getPluginTestCaseList(TEST_PLUGINS); - break; - } -} - -function DW_TESTS_PaintPluginGroupTestList() { - switch ( DW_TESTS_OUTPUT ) { - case DW_TESTS_OUTPUT_XML: - echo XMLTestManager::getPluginGroupTestList(TEST_PLUGINS); - break; - case DW_TESTS_OUTPUT_HTML: - default: - echo HTMLTestManager::getPluginGroupTestList(TEST_PLUGINS); - break; - } -} - -function DW_TESTS_PaintFooter() { - switch ( DW_TESTS_OUTPUT ) { - case DW_TESTS_OUTPUT_XML: - break; - case DW_TESTS_OUTPUT_HTML: - default: - $footer = <<<EOD - </body> -</html> -EOD; - echo $footer; - break; - } -} - -/** OUTPUT STARTS HERE **/ - -// If it's a group test -if (isset($_GET['group'])) { - if ('all' == $_GET['group']) { - TestManager::runAllTests(DW_TESTS_GetReporter()); - } else { - TestManager::runGroupTest(ucfirst($_GET['group']), - TEST_GROUPS, - DW_TESTS_GetReporter()); - } - DW_TESTS_PaintRunMore(); - exit(); -} - -// If it's a plugin group test -if (isset($_GET['plugin_group'])) { - if ('all' == $_GET['plugin_group']) { - TestManager::runAllPluginTests(DW_TESTS_GetReporter()); - } else { - TestManager::runGroupTest(ucfirst($_GET['plugin_group']), - TEST_PLUGINS, - DW_TESTS_GetReporter()); - } - DW_TESTS_PaintRunMore(); - exit(); -} - -// If it's a single test case -if (isset($_GET['case'])) { - TestManager::runTestCase($_GET['case'], TEST_CASES, DW_TESTS_GetReporter()); - DW_TESTS_PaintRunMore(); - exit(); -} - -// If it's a single plugin test case -if (isset($_GET['plugin_case'])) { - TestManager::runTestCase($_GET['plugin_case'], TEST_PLUGINS, DW_TESTS_GetReporter()); - DW_TESTS_PaintRunMore(); - exit(); -} - -// Else it's the main page -DW_TESTS_PaintHeader(); - -DW_TESTS_PaintSuiteHeader(); - -if (isset($_GET['show']) && $_GET['show'] == 'cases') { - DW_TESTS_PaintCaseList(); - DW_TESTS_PaintPluginTestCaseList(); -} else { - /* no group specified, so list them all */ - DW_TESTS_PaintGroupTestList(); - DW_TESTS_PaintPluginGroupTestList(); -} - -DW_TESTS_PaintFooter(); diff --git a/_test/jslint.js b/_test/jslint.js deleted file mode 100644 index 730f8d8a8b9daf47190c3d7a257a0ba6c28bae06..0000000000000000000000000000000000000000 --- a/_test/jslint.js +++ /dev/null @@ -1,89 +0,0 @@ -/** - * Copy to a JavaScript console on your DokuWiki instance and execute - * Runs JSLint on all our JavaScript files with our settings - */ - -(function () { -var globals = ['jQuery', 'SIG', 'NS', 'JSINFO', 'LANG', 'DOKU_BASE', - 'DOKU_UHC' // FIXME: Should be moved to JSINFO - ], files = { - 'scripts/behaviour.js': null, - //"scripts/compatibility.js": null, - "scripts/cookie.js": null, - //"scripts/delay.js": null, - //"scripts/drag.js": null, - "scripts/edit.js": null, - "scripts/editor.js": null, - "scripts/helpers.js": null, - "scripts/hotkeys.js": null, - "scripts/index.js": null, - "scripts/linkwiz.js": null, - "scripts/locktimer.js": null, - "scripts/media.js": null, - "scripts/page.js": null, - "scripts/qsearch.js": null, - "scripts/script.js": null, - "scripts/textselection.js": null, - "scripts/toolbar.js": null, - "scripts/tree.js": null //, - //"scripts/tw-sack.js": null - }, overwrites = { - "scripts/script.js": {evil: true}, - "scripts/media.js": {devel: true, windows: true}, - "scripts/locktimer.js": {devel: true}, - "scripts/behaviour.js": {devel: true}, - "scripts/helpers.js": {windows: true} - }; - -jQuery.ajax({ - dataType: 'script', - type: "GET", -// url: 'http://jshint.com/jshint.js' - url: 'https://raw.github.com/douglascrockford/JSLint/master/jslint.js', - success: function () { - for (var file in files) { - jQuery.ajax({ - cache: false, - async: false, - type: "GET", - url: DOKU_BASE + 'lib/' + file, - dataType: 'text', - success: function (res) { - files[file] = res; - var data = lint(files[file]); - jQuery.merge(globals, data.globals); - }}); - } - - for (var file in files) { - if (!files[file]) { - continue; - } - // FIXME more fine-grained write access - var data = lint('/*global ' + globals.join(':true, ') + - ':true*/\n' + files[file], overwrites[file]); - console.log(file); - jQuery.each(data.errors || [], function (_, val) { - if (val === null) { - return; - } - console.error(val.reason + ' (Line ' + (val.line - 1) + - ', character ' + val.character + '):\n' + - val.evidence); - }); - }; - } -}); - -function lint(txt, overwrite) { - JSLINT(txt, jQuery.extend({ - // These settings are necessary - browser: true, - - // Things we probably should learn someday - sloppy: true, white: true, eqeq: true, nomen: true, - plusplus: true, regexp: true - }, overwrite)); - return JSLINT.data(); -} -})(); diff --git a/_test/lib/cli_reporter.php b/_test/lib/cli_reporter.php deleted file mode 100644 index 3ad88119db2732c96ce83732934992822f645768..0000000000000000000000000000000000000000 --- a/_test/lib/cli_reporter.php +++ /dev/null @@ -1,114 +0,0 @@ -<?php // -*- fill-column: 80; tab-width: 4; c-basic-offset: 4 -*- - -if (! defined('ST_FAILDETAIL_SEPARATOR')) { - define('ST_FAILDETAIL_SEPARATOR', "->"); -} - -if (! defined('ST_FAILS_RETURN_CODE')) { - define('ST_FAILS_RETURN_CODE', 1); -} - -if (version_compare(phpversion(), '4.3.0', '<') || - php_sapi_name() == 'cgi') { - define('STDOUT', fopen('php://stdout', 'w')); - define('STDERR', fopen('php://stderr', 'w')); - register_shutdown_function( - create_function('', 'fclose(STDOUT); fclose(STDERR); return true;')); -} - -/** - * Minimal command line test displayer. Writes fail details to STDERR. Returns 0 - * to the shell if all tests pass, ST_FAILS_RETURN_CODE if any test fails. - */ -class CLIReporter extends SimpleReporter { - - var $faildetail_separator = ST_FAILDETAIL_SEPARATOR; - var $_failinfo; - - function CLIReporter($faildetail_separator = NULL) { - $this->SimpleReporter(); - if (! is_null($faildetail_separator)) { - $this->setFailDetailSeparator($faildetail_separator); - } - } - - function setFailDetailSeparator($separator) { - $this->faildetail_separator = $separator; - } - - /** - * Return a formatted faildetail for printing. - */ - function &_paintTestFailDetail(&$message) { - $buffer = ''; - $faildetail = $this->getTestList(); - array_shift($faildetail); - $buffer .= implode($this->faildetail_separator, $faildetail); - $buffer .= $this->faildetail_separator . "$message\n"; - return $buffer; - } - - /** - * Paint fail faildetail to STDERR. - */ - function paintFail($message) { - parent::paintFail($message); - fwrite(STDERR, 'FAIL' . $this->faildetail_separator . - $this->_paintTestFailDetail($message)); - if($this->_failinfo){ - fwrite(STDERR, ' additional info was: '.$this->_failinfo."\n"); - $this->_failinfo = ''; - } - } - - /** - * reset failinfo - */ - function paintPass($message) { - parent::paintPass($message); - $this->_failinfo = ''; - } - - /** - * Paint exception faildetail to STDERR. - */ - function paintException($message) { - parent::paintException($message); - fwrite(STDERR, 'EXCEPTION' . $this->faildetail_separator . - $this->_paintTestFailDetail($message)); - } - - /** - * Handle failinfo message - */ - function paintSignal($type,$message) { - parent::paintSignal($type,$message); - if($type = 'failinfo') $this->_failinfo = $message; - } - - - - /** - * Paint a footer with test case name, timestamp, counts of fails and - * exceptions. - */ - function paintFooter($test_name) { - $buffer = $this->getTestCaseProgress() . '/' . - $this->getTestCaseCount() . ' test cases complete: '; - - if (0 < ($this->getFailCount() + $this->getExceptionCount())) { - $buffer .= $this->getPassCount() . " passes"; - if (0 < $this->getFailCount()) { - $buffer .= ", " . $this->getFailCount() . " fails"; - } - if (0 < $this->getExceptionCount()) { - $buffer .= ", " . $this->getExceptionCount() . " exceptions"; - } - $buffer .= ".\n"; - fwrite(STDOUT, $buffer); - exit(ST_FAILS_RETURN_CODE); - } else { - fwrite(STDOUT, $buffer . $this->getPassCount() . " passes.\n"); - } - } -} diff --git a/_test/lib/mock_functions.php b/_test/lib/mock_functions.php deleted file mode 100644 index 9ef5b7b8f841c604088de8b87a3f0d97c3f9a690..0000000000000000000000000000000000000000 --- a/_test/lib/mock_functions.php +++ /dev/null @@ -1,519 +0,0 @@ -<?php - /** - * base include file for SimpleTest - * @package SimpleTest - * @subpackage MockFunctions - * @version $Id: mock_objects.php,v 1.86 2005/09/10 23:01:56 lastcraft Exp $ - */ - - /** - * Generates a mock version of a function. - * Note that all public methods in this class should be called - * statically - * Note that you must call the restore method yourself, to remove - * a mock function implementation after associated tests are - * complete - * @package SimpleTest - * @subpackage MockFunctions - */ - class MockFunction { - - /** - * Raises an error if you construct MockFunction - * @access private - */ - function MockFunction() { - trigger_error('MockFunction only provides static methods', - E_USER_ERROR); - } - - /** - * Generates a mock function - * @param string $function Function name to mock - * @access public - * @return SimpleMockFunction - * @static - */ - function & generate($function) { - $mock = & MockFunction::_instance($function, TRUE); - $mock->deploy(); - return $mock; - } - - /** - * Removes the mock function implementation and restores - * the real implementation (if one existed) - * @TODO Would be good to have this called automatically - * @param string $function Function name - * @access public - * @static - */ - function restore($function) { - $mock = & MockFunction::_instance($function); - $mock->restore(); - } - - /** - * Fetch a singleton instance of SimpleMockFunction - * @param string $function Function name - * @param boolean $fresh Force a fresh instance - * @access private - * @static - */ - function &_instance($function, $fresh = FALSE) { - static $singleton = array(); - - $function = strtolower($function); - - if ( $fresh ) { - if ( isset($singleton[$function]) ) { - unset($singleton[$function]); - } - } - - if ( !isset($singleton[$function]) ) { - // TODO: case sensitivity issues - $class = $function."MockFunction"; - MockFunction::_generateSubClass($class, $function); - $singleton[$function] = new $class($function); - } - - return $singleton[$function]; - } - - /** - * Required for strict mode and SimpleMock - * @TODO Should perhaps be placed in SimpleFunctionGenerator - * @param string $class subclass name - * @param string $method method name - * @access private - * @static - */ - function _generateSubClass($class, $method) { - if ( class_exists($class) ) { - return; - } - $code = "class $class extends SimpleMockFunction {\n"; - $code .= " function $method () {}\n"; - $code .= "}\n"; - eval($code); - } - - /** - * Changes the default wildcard object. - * @param string $function Function name wildcard applies to - * @param mixed $wildcard Parameter matching wildcard. - * @access public - * @static - */ - function setWildcard($function, $wildcard) { - $mock = & MockFunction::_instance($function); - $mock->setWildcard($wildcard); - } - - /** - * Fetches the call count of a function so far. - * @param string $function Function name called. - * @return Number of calls so far. - * @access public - * @static - */ - function getCallCount($function) { - $mock = & MockFunction::_instance($function); - return $mock->getCallCount($function); - } - - /** - * Sets a return for a parameter list that will - * be passed by value for all calls to this function. - * @param string $function Function name. - * @param mixed $value Result of call passed by value. - * @param array $args List of parameters to match - * including wildcards. - * @access public - * @static - */ - function setReturnValue($function, $value, $args = false) { - $mock = & MockFunction::_instance($function); - $mock->setReturnValue($function, $value, $args); - } - - /** - * Sets a return for a parameter list that will - * be passed by value only when the required call count - * is reached. - * @param integer $timing Number of calls in the future - * to which the result applies. If - * not set then all calls will return - * the value. - * @param string $function Function name. - * @param mixed $value Result of call passed by value. - * @param array $args List of parameters to match - * including wildcards. - * @access public - * @static - */ - function setReturnValueAt($timing, $function, $value, $args = false) { - $mock = & MockFunction::_instance($function); - $mock->setReturnValueAt($timing, $function, $value, $args); - } - - /** - * Sets a return for a parameter list that will - * be passed by reference for all calls. - * @param string $function Function name. - * @param mixed $reference Result of the call will be this object. - * @param array $args List of parameters to match - * including wildcards. - * @access public - * @static - */ - function setReturnReference($function, &$reference, $args = false) { - $mock = & MockFunction::_instance($function); - $mock->setReturnReference($function, $reference, $args); - } - - /** - * Sets a return for a parameter list that will - * be passed by value only when the required call count - * is reached. - * @param integer $timing Number of calls in the future - * to which the result applies. If - * not set then all calls will return - * the value. - * @param string $function Function name. - * @param mixed $reference Result of the call will be this object. - * @param array $args List of parameters to match - * including wildcards. - * @access public - * @static - */ - function setReturnReferenceAt($timing, $function, &$reference, $args = false) { - $mock = & MockFunction::_instance($function); - $mock->setReturnReferenceAt($timing, $function, $reference, $args); - } - - /** - * Sets up an expected call with a set of - * expected parameters in that call. All - * calls will be compared to these expectations - * regardless of when the call is made. - * @param string $function Function call to test. - * @param array $args Expected parameters for the call - * including wildcards. - * @param string $message Overridden message. - * @access public - * @static - */ - function expectArguments($function, $args, $message = '%s') { - $mock = & MockFunction::_instance($function); - $mock->expectArguments($function, $args, $message); - } - - /** - * Sets up an expected call with a set of - * expected parameters in that call. The - * expected call count will be adjusted if it - * is set too low to reach this call. - * @param integer $timing Number of calls in the future at - * which to test. Next call is 0. - * @param string $function Function call to test. - * @param array $args Expected parameters for the call - * including wildcards. - * @param string $message Overridden message. - * @access public - * @static - */ - function expectArgumentsAt($timing, $function, $args, $message = '%s') { - $mock = & MockFunction::_instance($function); - $mock->expectArgumentsAt($timing, $function, $args, $message); - } - - /** - * Sets an expectation for the number of times - * a function will be called. - * @param string $function Function call to test. - * @param integer $count Number of times it should - * have been called at tally. - * @param string $message Overridden message. - * @access public - * @static - */ - function expectCallCount($function, $count, $message = '%s') { - $mock = & MockFunction::_instance($function); - $mock->expectCallCount($function, $count, $message); - } - - /** - * Sets the number of times a function may be called - * before a test failure is triggered. - * @param string $function Function call to test. - * @param integer $count Most number of times it should - * have been called. - * @param string $message Overridden message. - * @access public - * @static - */ - function expectMaximumCallCount($function, $count, $message = '%s') { - $mock = & MockFunction::_instance($function); - $mock->expectMaximumCallCount($function, $count, $message); - } - - /** - * Sets the minimum number of times the function must be called - * otherwise a test failure is triggered - * @param string $function Function call to test. - * @param integer $count Least number of times it should - * have been called. - * @param string $message Overridden message. - * @access public - * @static - */ - function expectMinimumCallCount($function, $count, $message = '%s') { - $mock = & MockFunction::_instance($function); - $mock->expectMinimumCallCount($function, $count, $message); - } - - /** - * Convenience method for barring a function - * call. - * @param string $function Function call to ban. - * @param string $message Overridden message. - * @access public - * @static - */ - function expectNever($function, $message = '%s') { - $mock = & MockFunction::_instance($function); - $mock->expectNever($function, $message); - } - - /** - * Convenience method for a single function - * call. - * @param string $function Function call to track. - * @param array $args Expected argument list or - * false for any arguments. - * @param string $message Overridden message. - * @access public - * @static - */ - function expectOnce($function, $args = false, $message = '%s') { - $mock = & MockFunction::_instance($function); - $mock->expectOnce($function, $args, $message); - } - - /** - * Convenience method for requiring a function - * call. - * @param string $function Function call to track. - * @param array $args Expected argument list or - * false for any arguments. - * @param string $message Overridden message. - * @access public - * @static - */ - function expectAtLeastOnce($function, $args = false, $message = '%s') { - $mock = & MockFunction::_instance($function); - $mock->expectAtLeastOnce($function, $args, $message); - } - - function atTestEnd($function) { - $mock = & MockFunction::_instance($function); - $mock->atTestEnd($function); - } - - } - - /** - * Represents a single, mocked function, tracking calls made to it - * @package SimpleTest - * @subpackage MockFunctions - */ - class SimpleMockFunction extends SimpleMock { - - var $_is_mocked = FALSE; - var $_generator; - - /** - * Sets up the mock, creating a generator depending on whether - * the function is already declared - * @param string $function Name of function being mocked - */ - function SimpleMockFunction($function) { - - SimpleMock :: SimpleMock(); - - if ( function_exists($function) ) { - $this->_generator = new SimpleDeclaredFunctionGenerator($function); - } else { - $this->_generator = new SimpleUndeclaredFunctionGenerator($function); - } - - } - - /** - * Deploys the mock function implementation into PHP's function - * table, replacing any existing implementation - * @access public - */ - function deploy() { - - if ( !$this->_is_mocked ) { - - $this->_is_mocked = TRUE; - $this->_generator->deploy(); - - } - - } - - /** - * Restores the state of PHP's function table to that before - * the mock function was deployed. Removes the mock function - * implementation and restores any existing implementation of - * that function - * @access public - */ - function restore() { - - if ( $this->_is_mocked ) { - - $this->_is_mocked = FALSE; - $this->_generator->restore(); - - } - - } - - } - - /** - * Base class for deploying and restoring from mock functions - * @package SimpleTest - * @subpackage MockFunctions - * @abstract - */ - class SimpleFunctionGenerator { - - var $_function; - - /** - * @TODO Validate the function name (as it's being used in eval) - * @TODO Add list of illegal functions (ones which must not be mocked - * as they will break SimpleTest, which uses them) - * @param string $function Name of function being mocked - */ - function SimpleFunctionGenerator($function) { - $this->_function = $function; - } - - /** - * Generates the mock function implementation, using eval - * @access private - */ - function _generateMockFunction() { - $code = "function " . $this->_function . "() {\n"; - $code .= " \$args = func_get_args();\n"; - $code .= " \$mock = & MockFunction::_instance('".$this->_function."');\n"; - $code .= " \$result = &\$mock->_invoke(\"".$this->_function."\", \$args);\n"; - $code .= " return \$result;\n"; - $code .= "}\n"; - eval($code); - } - } - - /** - * Mock function generator for functions which have already been declared - * @package SimpleTest - * @subpackage MockFunctions - */ - class SimpleDeclaredFunctionGenerator extends SimpleFunctionGenerator { - - var $_tmp_function = NULL; - - /** - * Invokes the _generateTmpFnFname - * @param string $function Name of function being mocked - */ - function SimpleDeclaredFunctionGenerator($function) { - - SimpleFunctionGenerator::SimpleFunctionGenerator($function); - $this->_generateTmpFnFname(); - - } - - /** - * Generates a temporary name for the declared function implementation - * which is will be renamed to while the mock function is in use - * @access private - */ - function _generateTmpFnFname() { - static $count = 1; - $this->_tmp_function = 'tmp_'.md5(time().$this->_function.$count); - $count++; - } - - /** - * Deploys the mock function implementation - * @access public - */ - function deploy() { - - runkit_function_rename( - $this->_function, - $this->_tmp_function - ) or - trigger_error('Error archiving real function implementation', - E_USER_ERROR); - - $this->_generateMockFunction(); - } - - /** - * Removes the mock function implementation and restores - * the previously declared implementation - * @access public - */ - function restore() { - - runkit_function_remove($this->_function) or - trigger_error('Error removing mock function', - E_USER_ERROR); - - runkit_function_rename( - $this->_tmp_function, - $this->_function - ) or - trigger_error('Error restoring real function', - E_USER_ERROR); - } - } - - /** - * Mock function generator for functions which have not - * already been declared - * @package SimpleTest - * @subpackage MockFunctions - */ - class SimpleUndeclaredFunctionGenerator extends SimpleFunctionGenerator { - - /** - * Deploys the mock function implementation - * @access public - */ - function deploy() { - $this->_generateMockFunction(); - } - - /** - * Removes the mock function implementation - * @access public - */ - function restore() { - runkit_function_remove($this->_function) or - trigger_error('Error removing mock function', - E_USER_ERROR); - } - - } - diff --git a/_test/lib/rss_writer_class.php b/_test/lib/rss_writer_class.php deleted file mode 100644 index 684acfcfac7bcf2277d7b3c94baeeb616337e515..0000000000000000000000000000000000000000 --- a/_test/lib/rss_writer_class.php +++ /dev/null @@ -1,369 +0,0 @@ -<?php -if(!defined("METAL_LIBRARY_XML_RSS_WRITER_CLASS")) -{ - define("METAL_LIBRARY_XML_RSS_WRITER_CLASS",1); - -/* - * - * Copyright � (C) Manuel Lemos 2002 - * - * @(#) $Id: rss_writer_class.php,v 1.5 2005/08/20 09:46:06 pachanga Exp $ - * - */ - -class rss_writer_class extends xml_writer_class -{ - /* - * Protected variables - * - */ - var $root=""; - var $channel=""; - var $image=""; - var $textinput=""; - var $items=0; - var $itemsequence=""; - - /* - * Public variables - * - */ - var $specification="1.0"; - var $about=""; - var $rssnamespaces=array(); - var $allownoitems=0; - var $generatedcomment="Generated by: http://www.phpclasses.org/rsswriter"; - - - /* - * Protected functions - * - */ - Function addrssproperties(&$properties,$parent,&$required,&$optional,$scope) - { - $noattributes=array(); - $required_properties=0; - Reset($properties); - $end=(GetType($property=Key($properties))!="string"); - for(;!$end;) - { - if(IsSet($required[$property])) - { - if($required[$property]) - { - $this->error=("required ".$scope." property \"".$property."\" is already set"); - return 0; - } - $required[$property]=1; - $required_properties++; - } - else - { - if(IsSet($optional[$property])) - { - if($optional[$property]) - { - $this->error=("optional ".$scope." property \"".$property."\" is already set"); - return 0; - } - $optional[$property]=1; - } - else - { - if(GetType($colon=strpos($property,":",0))=="integer") - { - $namespace=substr($property,0,$colon); - if(!(!strcmp($namespace,"rdf") || IsSet($this->rssnamespaces[$namespace]))) - $this->error=("the name space of property \"".$property."\" was not declared"); - } - else - $this->error=("\"".$property."\" is not a supported ".$scope." property"); - } - } - if(!($this->adddatatag($property,$noattributes,$properties[$property],$parent,$path))) - return 0; - Next($properties); - $end=(GetType($property=Key($properties))!="string"); - } - if($required_properties<count($required)) - { - Reset($required); - $end=(GetType($property=Key($required))!="string"); - for(;!$end;) - { - if(!($required[$property])) - { - $this->error=("it was not specified the required ".$scope." property \"".$property."\""); - return 0; - } - Next($required); - $end=(GetType($property=Key($required))!="string"); - } - } - return 1; - } - - /* - * Public functions - * - */ - Function addchannel(&$properties) - { - if(strcmp($this->error,"")) - return 0; - if(strcmp($this->channel,"")) - { - $this->error="a channel was already added"; - return 0; - } - $channel_attributes=array(); - switch($this->specification) - { - case "0.9": - $root="rdf:RDF"; - $attributes=array("xmlns:rdf"=>"http://www.w3.org/1999/02/22-rdf-syntax-ns#","xmlns"=>"http://my.netscape.com/rdf/simple/0.9/"); - $required=array("description"=>0,"link"=>0,"title"=>0); - $optional=array(); - break; - case "0.91": - $root="rss"; - $attributes=array("version"=>$this->specification); - $required=array("description"=>0,"language"=>0,"link"=>0,"title"=>0); - $optional=array("copyright"=>0,"docs"=>0,"lastBuildDate"=>0,"managingEditor"=>0,"pubDate"=>0,"rating"=>0,"webMaster"=>0); - break; - case "1.0": - if(!strcmp($this->about,"")) - { - $this->error="it was not specified the about URL attribute"; - return 0; - } - $root="rdf:RDF"; - $attributes=array("xmlns:rdf"=>"http://www.w3.org/1999/02/22-rdf-syntax-ns#","xmlns"=>"http://purl.org/rss/1.0/"); - Reset($this->rssnamespaces); - $end=(GetType($namespace=Key($this->rssnamespaces))!="string"); - for(;!$end;) - { - if(!strcmp($namespace,"rdf")) - { - $this->error="the rdf namespace is being redeclared"; - return 0; - } - $attributes[("xmlns:".$namespace)]=$this->rssnamespaces[$namespace]; - Next($this->rssnamespaces); - $end=(GetType($namespace=Key($this->rssnamespaces))!="string"); - } - $channel_attributes=array("rdf:about"=>$this->about); - $required=array("description"=>0,"link"=>0,"title"=>0); - $optional=array(); - break; - default: - $this->error="it was not specified a supported RSS specification version"; - return 0; - } - $this->addtag($root,$attributes,"",$path,1); - $this->root=$path; - if(!($this->addtag("channel",$channel_attributes,$this->root,$path,1))) - return 0; - if(!($this->addrssproperties($properties,$path,$required,$optional,"channel"))) - return 0; - $this->channel=$path; - return 1; - } - - Function additem(&$properties) - { - if(strcmp($this->error,"")) - return 0; - if(!strcmp($this->channel,"")) - { - $this->error="the channel was not yet added"; - return 0; - } - if(strcmp($this->textinput,"")) - { - $this->error="items can not be added to the channel after defining the textinput"; - return 0; - } - $attributes=array(); - switch($this->specification) - { - case "0.9": - $parent=$this->root; - break; - case "0.91": - $parent=$this->channel; - break; - case "1.0": - if(IsSet($properties["link"])) - $attributes["rdf:about"]=$properties["link"]; - $parent=$this->root; - break; - default: - $this->error="it was not specified a supported RSS specification version"; - return 0; - } - if(!($this->addtag("item",$attributes,$parent,$path,1))) - return 0; - $required=array("link"=>0,"title"=>0); - $optional=array("description"=>0); - if(!($this->addrssproperties($properties,$path,$required,$optional,"item"))) - return 0; - if(!strcmp($this->specification,"1.0")) - { - if(!strcmp($this->itemsequence,"")) - { - $attributes=array(); - if(!($this->addtag("items",$attributes,$this->channel,$path,1) && $this->addtag("rdf:Seq",$attributes,$path,$path,1))) - return 0; - $this->itemsequence=$path; - } - $attributes=array("rdf:resource"=>$properties["link"]); - if(!($this->addtag("rdf:li",$attributes,$this->itemsequence,$path,0))) - return 0; - } - $this->items++; - return 1; - } - - Function addimage(&$properties) - { - if(strcmp($this->error,"")) - return 0; - if(!strcmp($this->channel,"")) - { - $this->error="the channel was not yet added"; - return 0; - } - if(strcmp($this->image,"")) - { - $this->error="the channel image was already associated"; - return 0; - } - if($this->items!=0) - { - $this->error="the image can only be defined before adding the channel items"; - return 0; - } - $attributes=array(); - switch($this->specification) - { - case "0.9": - $parent=$this->root; - break; - case "0.91": - $parent=$this->channel; - break; - case "1.0": - if(IsSet($properties["url"])) - $attributes["rdf:about"]=$properties["url"]; - $parent=$this->root; - break; - default: - $this->error="it was not specified a supported RSS specification version"; - return 0; - } - if(!($this->addtag("image",$attributes,$parent,$path,1))) - return 0; - $this->image=$path; - $required=array("link"=>0,"title"=>0,"url"=>0); - $optional=array("description"=>0,"width"=>0,"height"=>0); - if(!($this->addrssproperties($properties,$this->image,$required,$optional,"image"))) - return 0; - if(!strcmp($this->specification,"1.0")) - { - $attributes=array("rdf:resource"=>$properties["url"]); - return $this->addtag("image",$attributes,$this->channel,$path,0); - } - return 1; - } - - Function addtextinput(&$properties) - { - if(strcmp($this->error,"")) - return 0; - if(!strcmp($this->channel,"")) - { - $this->error="the channel was not yet added"; - return 0; - } - if(strcmp($this->textinput,"")) - { - $this->error="the channel text input was already associated"; - return 0; - } - if($this->items==0 && !$this->allownoitems) - { - $this->error="it were not specified any items before defining the channel text input"; - return 0; - } - $attributes=array(); - switch($this->specification) - { - case "0.9": - $parent=$this->root; - break; - case "0.91": - $parent=$this->channel; - break; - case "1.0": - if(IsSet($properties["link"])) - $attributes["rdf:about"]=$properties["link"]; - $parent=$this->root; - break; - default: - $this->error="it was not specified a supported RSS specification version"; - return 0; - } - if(!($this->addtag("textinput",$attributes,$parent,$path,1))) - return 0; - $this->textinput=$path; - $required=array("description"=>0,"link"=>0,"name"=>0,"title"=>0); - $optional=array(); - if(!($this->addrssproperties($properties,$this->textinput,$required,$optional,"textinput"))) - return 0; - if(!strcmp($this->specification,"1.0")) - { - $attributes=array("rdf:resource"=>$properties["link"]); - return $this->addtag("textinput",$attributes,$this->channel,$path,0); - } - return 1; - } - - Function writerss(&$output) - { - if(strcmp($this->error,"")) - return 0; - if(!strcmp($this->channel,"")) - { - $this->error="it was not defined the RSS channel"; - return 0; - } - if($this->items==0 && !$this->allownoitems) - { - $this->error="it were not defined any RSS channel items"; - return 0; - } - switch($this->specification) - { - case "0.9": - $this->dtdtype="PUBLIC"; - $this->dtddefinition="-//Netscape Communications//DTD RSS 0.9//EN"; - $this->dtdurl="http://my.netscape.com/publish/formats/rss-0.9.dtd"; - break; - case "0.91": - $this->dtdtype="PUBLIC"; - $this->dtddefinition="-//Netscape Communications//DTD RSS 0.91//EN"; - $this->dtdurl="http://my.netscape.com/publish/formats/rss-0.91.dtd"; - break; - case "1.0": - $this->dtdtype=""; - break; - default: - $this->error="it was not specified a supported RSS specification version"; - return 0; - } - return $this->write($output); - } -}; - -} diff --git a/_test/lib/testmanager.php b/_test/lib/testmanager.php deleted file mode 100644 index 06efd269488a97174d17f3db035b9e708992ba61..0000000000000000000000000000000000000000 --- a/_test/lib/testmanager.php +++ /dev/null @@ -1,579 +0,0 @@ -<?php // -*- fill-column: 80; tab-width: 4; c-basic-offset: 4 -*- -/** -* Lots TODO here... -*/ - -define('TEST_GROUPS',realpath(dirname(__FILE__).'/../cases')); -define('TEST_CASES',realpath(dirname(__FILE__).'/../cases')); -define('TEST_PLUGINS',realpath(dirname(__FILE__).'/../../lib/plugins')); - -// try to load runkit extension -if (!extension_loaded('runkit') && function_exists('dl')) { - if (strtoupper(substr(PHP_OS, 0, 3) == 'WIN')) { - @dl('php_runkit.dll'); - } else { - @dl('runkit.so'); - } -} - -class TestManager { - var $_testcase_extension = '.test.php'; - var $_grouptest_extension = '.group.php'; - - function setup() { - $ini_file = realpath(dirname(__FILE__).'/../tests.ini'); - - if (! file_exists($ini_file)) { - trigger_error("Missing configuration file {$ini_file}", - E_USER_ERROR); - } - $config = parse_ini_file($ini_file); - foreach ($config as $key => $value) { - define($key, $value); - } - TestManager::_installSimpleTest(); - - list($version) = file(SIMPLE_TEST.'VERSION'); - $version = trim($version); - if(!version_compare('1.0.1alpha',$version,'<')){ - echo "At least SimpleTest Version 1.0.1alpha is required."; - echo " Yours is $version\n"; - exit; - } - } - - function _installSimpleTest() { - require_once SIMPLE_TEST . 'unit_tester.php'; - require_once SIMPLE_TEST . 'web_tester.php'; - require_once SIMPLE_TEST . 'mock_objects.php'; - require_once 'web.inc.php'; - require_once 'mock_functions.php'; - } - - function runAllTests(&$reporter) { - $manager = new TestManager(); - $test_cases =& $manager->_getTestFileList(); - $test = new GroupTest('All Tests'); - foreach ($test_cases as $test_case) { - $test->addTestFile($test_case); - } - $test->run($reporter); - } - - function runAllPluginTests(&$reporter) { - $manager = new TestManager(); - $test_cases =& $manager->_getTestFileList(TEST_PLUGINS); - $test = new GroupTest('All Plugin Tests'); - foreach ($test_cases as $test_case) { - $test->addTestFile($test_case); - } - $test->run($reporter); - } - - - function runTestCase($testcase_name, $test_case_directory, &$reporter) { - $manager = new TestManager(); - - $testcase_name = preg_replace('/[^a-zA-Z0-9_:]/','',$testcase_name); - $testcase_name = str_replace(':',DIRECTORY_SEPARATOR,$testcase_name); - - $testcase_file = $test_case_directory . DIRECTORY_SEPARATOR . - strtolower($testcase_name) . $manager->_testcase_extension; - - if (! file_exists($testcase_file)) { - trigger_error("Test case {$testcase_file} cannot be found", - E_USER_ERROR); - } - - $test = new GroupTest("Individual test case: " . $testcase_name); - $test->addTestFile($testcase_file); - $test->run($reporter); - } - - function runTestFile($testcase_file, &$reporter) { - $manager = new TestManager(); - - if (! file_exists($testcase_file)) { - trigger_error("Test case {$testcase_file} cannot be found", - E_USER_ERROR); - } - - $test = new GroupTest("Individual test case: " . $testcase_file); - $test->addTestFile($testcase_file); - $test->run($reporter); - } - - function runGroupTest($group_test_name, $group_test_directory, &$reporter) { - $manager = new TestManager(); - $group_test_name = preg_replace('/[^a-zA-Z0-9_:]/','',$group_test_name); - $group_test_name = str_replace(':',DIRECTORY_SEPARATOR,$group_test_name); - $file_path = $group_test_directory . DIRECTORY_SEPARATOR . - strtolower($group_test_name) . $manager->_grouptest_extension; - - if (! file_exists($file_path)) { - trigger_error("Group test {$group_test_name} cannot be found at {$file_path}", - E_USER_ERROR); - } - - require_once $file_path; - $test = new GroupTest($group_test_name . ' group test'); - foreach ($manager->_getGroupTestClassNames($file_path) as $group_test) { - $test->addTestCase(new $group_test()); - } - $test->run($reporter); - } - - function addTestCasesFromDirectory(&$group_test, $directory = '.') { - $manager = new TestManager(); - $test_cases =& $manager->_getTestFileList($directory); - foreach ($test_cases as $test_case) { - $group_test->addTestFile($test_case); - } - } - - function &getTestCaseList($directory = '.') { - $manager = new TestManager(); - return $manager->_getTestCaseList($directory); - } - - function &_getTestCaseList($directory = '.') { - $file_list =& $this->_getTestFileList($directory); - $testcases = array(); - foreach ($file_list as $testcase_file) { - $case = str_replace($this->_testcase_extension, '',$testcase_file); - $case = str_replace(TEST_GROUPS . DIRECTORY_SEPARATOR, '', $case); - $case = str_replace(TEST_PLUGINS . DIRECTORY_SEPARATOR, '', $case); - $case = str_replace(DIRECTORY_SEPARATOR, ':', $case); - $testcases[$testcase_file] = $case; - } - return $testcases; - } - - function &_getTestFileList($directory = '.') { - return $this->_getRecursiveFileList($directory, - array(&$this, '_isTestCaseFile')); - } - - function &getPluginTestCaseList($directory = '.') { - $manager = new TestManager(); - return $manager->_getTestCaseList($directory); - } - - function &getPluginGroupTestList($directory = '.') { - $manager = new TestManager(); - return $manager->_getTestGroupList($directory); - } - - function &getGroupTestList($directory = '.') { - $manager = new TestManager(); - return $manager->_getTestGroupList($directory); - } - - function &_getTestGroupFileList($directory = '.') { - return $this->_getRecursiveFileList($directory, - array(&$this, '_isTestGroupFile')); - } - - function &_getTestGroupList($directory = '.') { - $file_list =& $this->_getTestGroupFileList($directory); - $grouptests = array(); - foreach ($file_list as $grouptest_file) { - $group = str_replace($this->_grouptest_extension, '',$grouptest_file); - $group = str_replace(TEST_GROUPS . DIRECTORY_SEPARATOR, '', $group); - $group = str_replace(TEST_PLUGINS . DIRECTORY_SEPARATOR, '', $group); - $group = str_replace(DIRECTORY_SEPARATOR, ':', $group); - $grouptests[$grouptest_file] = $group; - } - sort($grouptests); - return $grouptests; - } - - function &_getGroupTestClassNames($grouptest_file) { - $file = implode("\n", file($grouptest_file)); - preg_match("~lass\s+?(.*)\s+?extends .*?GroupTest~", $file, $matches); - if (! empty($matches)) { - unset($matches[0]); - return $matches; - } else { - return array(); - } - } - - function &_getRecursiveFileList($directory = '.', $file_test_function) { - $dh = opendir($directory); - if (! is_resource($dh)) { - trigger_error("Couldn't open {$directory}", E_USER_ERROR); - } - - $file_list = array(); - while ($file = readdir($dh)) { - $file_path = $directory . DIRECTORY_SEPARATOR . $file; - - if (0 === strpos($file, '.')) continue; - - if (is_dir($file_path)) { - $file_list = - array_merge($file_list, - $this->_getRecursiveFileList($file_path, - $file_test_function)); - } - if ($file_test_function[0]->$file_test_function[1]($file)) { - $file_list[] = $file_path; - } - } - closedir($dh); - return $file_list; - } - - function _isTestCaseFile($file) { - return $this->_hasExpectedExtension($file, $this->_testcase_extension); - } - - function _isTestGroupFile($file) { - return $this->_hasExpectedExtension($file, $this->_grouptest_extension); - } - - function _hasExpectedExtension($file, $extension) { - return $extension == - strtolower(substr($file, (0 - strlen($extension)))); - } -} - -/** -* @package WACT_TESTS -*/ -class CLITestManager extends TestManager { - function &getGroupTestList($directory = '.') { - $manager = new CLITestManager(); - $group_tests =& $manager->_getTestGroupList($directory); - - $buffer = "Available grouptests:\n"; - foreach ($group_tests as $group_test) { - $buffer .= " " . $group_test . "\n"; - } - return $buffer . "\n"; - } - - function &getTestCaseList($directory = '.') { - $manager = new CLITestManager(); - $test_cases =& $manager->_getTestCaseList($directory); - - $buffer = "Available test cases:\n"; - foreach ($test_cases as $test_case) { - $buffer .= " " . $test_case . "\n"; - } - return $buffer . "\n"; - } - - function &getPluginTestCaseList($directory = '.') { - $manager = new CLITestManager(); - $test_cases =& $manager->_getTestCaseList($directory); - - $buffer = "Available test cases:\n"; - foreach ($test_cases as $test_case) { - $buffer .= " " . $test_case . "\n"; - } - return $buffer . "\n"; - } - - function &getPluginGroupTestList($directory = '.') { - $manager = new CLITestManager(); - $test_cases =& $manager->_getTestGroupList($directory); - - $buffer = "Available test cases:\n"; - foreach ($test_cases as $test_case) { - $buffer .= " " . $test_case . "\n"; - } - return $buffer . "\n"; - } - -} - -class HTMLTestManager extends TestManager { - var $_url; - - function HTMLTestManager() { - $this->_url = $_SERVER['PHP_SELF']; - } - - function getBaseURL() { - return $this->_url; - } - - function &getGroupTestList($directory = '.') { - $manager = new HTMLTestManager(); - $group_tests =& $manager->_getTestGroupList($directory); - if (1 > count($group_tests)) { - return "<p>No test groups set up!</p>"; - } - $buffer = "<p>Available test groups:</p>\n<ul>"; - $buffer .= "<li><a href='" . $manager->getBaseURL() . "?group=all'>All tests</a></li>\n"; - foreach ($group_tests as $group_test) { - $buffer .= "<li><a href='" . $manager->getBaseURL() . "?group={$group_test}'>" . - $group_test . "</a></li>\n"; - } - - $buffer .= "</ul>\n"; - return $buffer; - } - - function &getTestCaseList($directory = '.') { - $manager = new HTMLTestManager(); - $testcases =& $manager->_getTestCaseList($directory); - - if (1 > count($testcases)) { - return "<p>No test cases set up!</p>"; - } - $buffer = "<p>Available test cases:</p>\n<ul>"; - foreach ($testcases as $testcase) { - $buffer .= "<li><a href='" . $manager->getBaseURL() . - "?case=" . urlencode($testcase) . "'>" . - $testcase . "</a></li>\n"; - } - - $buffer .= "</ul>\n"; - return $buffer; - } - - function &getPluginTestCaseList($directory = '.') { - $manager = new HTMLTestManager(); - $testcases =& $manager->_getTestCaseList($directory); - - if (1 > count($testcases)) { - return "<p>No plugin test cases set up!</p>"; - } - $buffer = "<p>Available plugin test cases:</p>\n<ul>"; - foreach ($testcases as $testcase) { - $buffer .= "<li><a href='" . $manager->getBaseURL() . - "?plugin_case=" . urlencode($testcase) . "'>" . - $testcase . "</a></li>\n"; - } - - $buffer .= "</ul>\n"; - return $buffer; - } - - function &getPluginGroupTestList($directory = '.') { - $manager = new HTMLTestManager(); - $group_tests =& $manager->_getTestGroupList($directory); - if (1 > count($group_tests)) { - return "<p>No plugin test groups set up!</p>"; - } - $buffer = "<p>Available plugin groups:</p>\n<ul>"; - $buffer .= "<li><a href='" . $manager->getBaseURL() . "?plugin_group=all'>All tests</a></li>\n"; - foreach ($group_tests as $group_test) { - $buffer .= "<li><a href='" . $manager->getBaseURL() . "?plugin_group={$group_test}'>" . - $group_test . "</a></li>\n"; - } - - $buffer .= "</ul>\n"; - return $buffer; - } - -} - -/** -* @package WACT_TESTS -*/ -class XMLTestManager extends HTMLTestManager { - - function XMLTestManager() { - parent::HTMLTestManager(); - } - - function &getGroupTestList($directory = '.') { - - $manager = new XMLTestManager(); - $group_tests =& $manager->_getTestGroupList($directory); - - $rss = & $manager->_getRssWriter(); - - if (1 > count($group_tests)) { - $rss->writeRss($output); - return $output; - } - - $properties["title"]="All Tests"; - $properties["description"]="All Tests"; - $properties["link"]='http://'.$_SERVER['SERVER_NAME']. - $manager->getBaseURL()."?group=all&output=xml"; - - $rss->additem($properties); - - foreach ($group_tests as $group_test) { - $properties["title"]=$group_test; - $properties["description"]=$group_test; - $properties["link"]='http://'.$_SERVER['SERVER_NAME']. - $manager->getBaseURL(). - "?group={$group_test}&output=xml"; - - $rss->additem($properties); - } - if ( !$rss->writeRss($output) ) { - die ( $rss->error ); - } - return $output; - - } - - function &getTestCaseList($directory = '.') { - - $manager = new XMLTestManager(); - $testcases =& $manager->_getTestCaseList($directory); - - $rss = & $manager->_getRssWriter(); - - if (1 > count($testcases)) { - $rss->writeRss($output); - return $output; - } - - foreach ($testcases as $testfile => $testcase) { - $properties["title"]=$testcase; - $properties["description"]=$testcase; - $properties["link"]='http://'.$_SERVER['SERVER_NAME']. - $manager->getBaseURL()."?case=" . - urlencode($testcase) . "&output=xml"; - - // Comment this out for performance? - $properties["dc:date"]=gmdate("Y-m-d\TH:i:sO",filemtime($testfile)); - - $rss->additem($properties); - } - - $rss->writeRss($output); - return $output; - } - - function &_getRssWriter() { - - $url = 'http://'.$_SERVER['SERVER_NAME'].str_replace('index.php','',$_SERVER['PHP_SELF']); - - require_once TEST_ROOT . '/lib/xml_writer_class.php'; - require_once TEST_ROOT . '/lib/rss_writer_class.php'; - - $rss_writer_object= new rss_writer_class(); - $rss_writer_object->specification="1.0"; - $rss_writer_object->about=$url."index.php?output=xml"; - $rss_writer_object->stylesheet=$url."rss2html.xsl"; - $rss_writer_object->rssnamespaces["dc"]="http://purl.org/dc/elements/1.1/"; - - // Channel Properties - $properties=array(); - $properties["title"]="Dokuwiki Unit Test Cases"; - $properties["description"]="Dokuwiki Unit Test Cases"; - $properties["link"]="http://wiki.splitbrain.org/"; - $properties["dc:date"]=gmdate("Y-m-d\TH:i:sO"); - $rss_writer_object->addchannel($properties); - - // Logo like this (if we had one) - /* - $properties=array(); - - $properties["link"]="http://www.phpclasses.org/"; - $properties["title"]="PHP Classes repository logo"; - $properties["description"]="Repository of components and other resources for PHP developers"; - $rss_writer_object->addimage($properties); - */ - - return $rss_writer_object; - } - -} - -/** -* @package WACT_TESTS -*/ -class RemoteTestManager extends TestManager { - - function RemoteTestManager() { - RemoteTestManager::_installSimpleTest(); - } - - function _installSimpleTest() { - require_once SIMPLE_TEST . 'remote.php'; - } - - function runAllTests(&$reporter, $url = FALSE) { - $groups = RemoteTestManager::getGroupTestList($url); - $T = new RemoteTestCase($groups['All Tests']); - $T->run($reporter); - } - - function runTestUrl($case_url,& $reporter, $url = FALSE) { - RemoteTestManager::_installSimpleTest(); - $T = new RemoteTestCase($case_url); - $T->run($reporter); - } - - function runTestCase($case_id,& $reporter, $url = FALSE) { - $cases = RemoteTestManager::getTestCaseList($url); - if ( !array_key_exists($case_id, $cases) ) { - trigger_error("Unknown test id $case_id\n",E_USER_ERROR); - } - $T = new RemoteTestCase($cases[$case_id]); - $T->run($reporter); - } - - function runGroupTest($group_name, &$reporter, $url = FALSE) { - $groups = RemoteTestManager::getGroupTestList($url); - if ( !array_key_exists($group_name, $groups) ) { - trigger_error("Unknown group $group_name\n",E_USER_ERROR); - } - $T = new RemoteTestCase($groups[$group_name]); - $T->run($reporter); - } - - function & getGroupTestList($url = FALSE) { - - if ( !$url ) { - $url = REMOTE_TEST_URL; - } - - $url .= '?output=xml'; - - $manager = new RemoteTestManager(); - $rss = & $manager->_getRssReader($url); - - $groupList = array(); - - foreach ($rss->getItems() as $item) { - $groupList[$item['title']] = $item['link']; - } - - return $groupList; - } - - function &getTestCaseList($url = FALSE) { - if ( !$url ) { - $url = REMOTE_TEST_URL; - } - - $url .= '?show=cases&output=xml'; - $manager = new RemoteTestManager(); - $rss = & $manager->_getRssReader($url); - - $caseList = array(); - - foreach ($rss->getItems() as $item) { - $caseList[$item['title']] = $item['link']; - } - - return $caseList; - } - - function &_getRssReader($url) { - require_once "XML/RSS.php"; - - $rss_reader = new XML_RSS($url); - - $status = $rss_reader->parse(); - - if (PEAR::isError($status) ) { - trigger_error($status->getMessage(),E_USER_WARNING); - } - - return $rss_reader; - } - -} diff --git a/_test/lib/unittest.php b/_test/lib/unittest.php deleted file mode 100644 index 220aa6c1bf15484839de5bbf10c70d6c25ebaed3..0000000000000000000000000000000000000000 --- a/_test/lib/unittest.php +++ /dev/null @@ -1,5 +0,0 @@ -<?php -class Doku_UnitTestCase extends UnitTestCase { -} -class Doku_GroupTest extends GroupTest { -} diff --git a/_test/lib/web.inc.php b/_test/lib/web.inc.php deleted file mode 100644 index 7ca70f204a6876ec8638ff58e2dac478af744ef1..0000000000000000000000000000000000000000 --- a/_test/lib/web.inc.php +++ /dev/null @@ -1,47 +0,0 @@ -<?php -/** -* @package WACT_TESTS -* @version $Id: web.inc.php,v 1.6 2005/08/20 09:46:06 pachanga Exp $ -*/ - -SimpleTestOptions::ignore('DWWebTestCase'); - -class DWWebTestCase extends WebTestCase { - - function assertNormalPage() { - $this->assertResponse(array(200)); - $this->assertNoUnwantedPattern('/Warning:/i'); - $this->assertNoUnwantedPattern('/Error:/i'); - $this->assertNoUnwantedPattern('/Fatal error/i'); - } - - function assertWantedLiteral($str) { - $this->assertWantedPattern('/' . preg_quote($str, '/'). '/'); - } - - function assertNoUnWantedLiteral($str) { - $this->assertNoUnWantedPattern('/' . preg_quote($str, '/'). '/'); - } - - function &_fileToPattern($file) { - $file_as_array = file($file); - $pattern = '#^'; - foreach ($file_as_array as $line) { - /* strip trailing newline */ - if ($line[strlen($line) - 1] == "\n") { - $line = substr($line, 0, strlen($line) - 1); - } - $line = preg_quote($line, '#'); - - /* replace paths with wildcard */ - $line = preg_replace("#'/[^']*#", "'.*", $line); - - $pattern .= $line . '\n'; - } - /* strip final newline */ - $pattern = substr($pattern, 0, strlen($pattern) - 2); - $pattern .= '$#i'; - return $pattern; - } - -} diff --git a/_test/lib/xml_writer_class.php b/_test/lib/xml_writer_class.php deleted file mode 100644 index 97fb1bee03486c7b6e5d4161409c0b7e322e8dea..0000000000000000000000000000000000000000 --- a/_test/lib/xml_writer_class.php +++ /dev/null @@ -1,292 +0,0 @@ -<?php -if(!defined("METAL_LIBRARY_XML_XML_WRITER_CLASS")) -{ - define("METAL_LIBRARY_XML_XML_WRITER_CLASS",1); - -/* - * - * Copyright � (C) Manuel Lemos 2001-2002 - * - * @(#) $Id: xml_writer_class.php,v 1.5 2005/08/20 09:46:06 pachanga Exp $ - * - */ - -class xml_writer_class -{ - /* - * Protected variables - * - */ - var $structure=array(); - var $nodes=array(); - - /* - * Public variables - * - */ - var $stylesheet=""; - var $stylesheettype="text/xsl"; - var $dtdtype=""; - var $dtddefinition=""; - var $dtdurl=""; - var $outputencoding="utf-8"; - var $inputencoding="iso-8859-1"; - var $linebreak="\n"; - var $indenttext=" "; - var $generatedcomment="Generated by: http://www.phpclasses.org/xmlwriter"; - var $error=""; - - - /* - * Protected functions - * - */ - Function escapedata($data) - { - $position=0; - $length=strlen($data); - $escapeddata=""; - for(;$position<$length;) - { - $character=substr($data,$position,1); - $code=Ord($character); - switch($code) - { - case 34: - $character="""; - break; - case 38: - $character="&"; - break; - case 39: - $character="'"; - break; - case 60: - $character="<"; - break; - case 62: - $character=">"; - break; - default: - if($code<32) - $character=("&#".strval($code).";"); - break; - } - $escapeddata.=$character; - $position++; - } - return $escapeddata; - } - - Function encodedata($data,&$encodeddata) - { - if(!strcmp($this->inputencoding,$this->outputencoding)) - $encodeddata=$this->escapedata($data); - else - { - switch(strtolower($this->outputencoding)) - { - case "utf-8": - if(!strcmp(strtolower($this->inputencoding),"iso-8859-1")) - { - $encoded_data=utf8_encode($this->escapedata($data)); - $encodeddata=$encoded_data; - } - else - { - $this->error=("can not encode iso-8859-1 data in ".$this->outputencoding); - return 0; - } - break; - case "iso-8859-1": - if(!strcmp(strtolower($this->inputencoding),"utf-8")) - { - $decoded=utf8_decode($data); - $encodeddata=$this->escapedata($decoded); - } - else - { - $this->error=("can not encode utf-8 data in ".$this->outputencoding); - return 0; - } - break; - default: - $this->error=("can not encode data in ".$this->inputencoding); - return 0; - } - } - return 1; - } - - Function writetag(&$output,$path,$indent) - { - $tag=$this->structure[$path]["Tag"]; - $output.=("<".$tag); - $attributecount=count($this->structure[$path]["Attributes"]); - if($attributecount>0) - { - $attributes=$this->structure[$path]["Attributes"]; - Reset($attributes); - $end=(GetType($key=Key($attributes))!="string"); - for(;!$end;) - { - $output.=(" ".$key."=\"".$attributes[$key]."\""); - Next($attributes); - $end=(GetType($key=Key($attributes))!="string"); - } - } - $elements=$this->structure[$path]["Elements"]; - if($elements>0) - { - $output.=">"; - $doindent=$this->structure[$path]["Indent"]; - $elementindent=(($doindent) ? $this->linebreak.$indent.$this->indenttext : ""); - $element=0; - for(;$element<$elements;) - { - $elementpath=($path.",".strval($element)); - $output.=$elementindent; - if(IsSet($this->nodes[$elementpath])) - { - if(!($this->writetag($output,$elementpath,$indent.$this->indenttext))) - return 0; - } - else - $output.=$this->structure[$elementpath]; - $element++; - } - $output.=((($doindent) ? $this->linebreak.$indent : "")."</".$tag.">"); - } - else - $output.="/>"; - return 1; - } - - /* - * Public functions - * - */ - Function write(&$output) - { - if(strcmp($this->error,"")) - return 0; - if(!(IsSet($this->structure["0"]))) - { - $this->error="XML document structure is empty"; - return 0; - } - $output=("<?xml version=\"1.0\" encoding=\"".$this->outputencoding."\"?>".$this->linebreak); - if(strcmp($this->dtdtype,"")) - { - $output.=("<!DOCTYPE ".$this->structure["0"]["Tag"]." "); - switch($this->dtdtype) - { - case "INTERNAL": - if(!strcmp($this->dtddefinition,"")) - { - $this->error="it was not specified a valid internal DTD definition"; - return 0; - } - $output.=("[".$this->linebreak.$this->dtddefinition.$this->linebreak."]"); - break; - case "SYSTEM": - if(!strcmp($this->dtdurl,"")) - { - $this->error="it was not specified a valid system DTD url"; - return 0; - } - $output.="SYSTEM"; - if(strcmp($this->dtddefinition,"")) - $output.=(" \"".$this->dtddefinition."\""); - $output.=(" \"".$this->dtdurl."\""); - break; - case "PUBLIC": - if(!strcmp($this->dtddefinition,"")) - { - $this->error="it was not specified a valid public DTD definition"; - return 0; - } - $output.=("PUBLIC \"".$this->dtddefinition."\""); - if(strcmp($this->dtdurl,"")) - $output.=(" \"".$this->dtdurl."\""); - break; - default: - $this->error="it was not specified a valid DTD type"; - return 0; - } - $output.=(">".$this->linebreak); - } - if(strcmp($this->stylesheet,"")) - { - if(!strcmp($this->stylesheettype,"")) - { - $this->error="it was not specified a valid stylesheet type"; - return 0; - } - $output.=("<?xml-stylesheet type=\"".$this->stylesheettype."\" href=\"".$this->stylesheet."\"?>".$this->linebreak); - } - if(strcmp($this->generatedcomment,"")) - $output.=("<!-- ".$this->generatedcomment." -->".$this->linebreak); - return $this->writetag($output,"0",""); - } - - Function addtag($tag,&$attributes,$parent,&$path,$indent) - { - if(strcmp($this->error,"")) - return 0; - $path=((!strcmp($parent,"")) ? "0" : ($parent.",".strval($this->structure[$parent]["Elements"]))); - if(IsSet($this->structure[$path])) - { - $this->error=("tag with path ".$path." is already defined"); - return 0; - } - $encodedattributes=array(); - Reset($attributes); - $end=(GetType($attribute_name=Key($attributes))!="string"); - for(;!$end;) - { - $encodedattributes[$attribute_name]=""; - if(!($this->encodedata($attributes[$attribute_name],$encoded_data))) - return 0; - $encodedattributes[$attribute_name]=$encoded_data; - Next($attributes); - $end=(GetType($attribute_name=Key($attributes))!="string"); - } - $this->structure[$path]=array( - "Tag"=>$tag, - "Attributes"=>$encodedattributes, - "Elements"=>0, - "Indent"=>$indent - ); - $this->nodes[$path]=1; - if(strcmp($parent,"")) - $this->structure[$parent]["Elements"]=($this->structure[$parent]["Elements"]+1); - return 1; - } - - Function adddata($data,$parent,&$path) - { - if(strcmp($this->error,"")) - return 0; - if(!(IsSet($this->structure[$parent]))) - { - $this->error=("the parent tag path".$path."is not defined"); - return 0; - } - if(!strcmp($data,"")) - return 1; - $path=($parent.",".strval($this->structure[$parent]["Elements"])); - if(!($this->encodedata($data,$encoded_data))) - return 0; - $this->structure[$path]=$encoded_data; - $this->structure[$parent]["Elements"]=($this->structure[$parent]["Elements"]+1); - return 1; - } - - Function adddatatag($tag,&$attributes,$data,$parent,&$path) - { - return $this->addtag($tag,$attributes,$parent,$path,0) && $this->adddata($data,$path,$datapath); - } -}; - -} diff --git a/_test/phpunit.xml b/_test/phpunit.xml new file mode 100644 index 0000000000000000000000000000000000000000..13676f207c71f1cde3ca081ac86d401b3b1cf4c3 --- /dev/null +++ b/_test/phpunit.xml @@ -0,0 +1,26 @@ +<?xml version="1.0" encoding="UTF-8"?> +<phpunit + bootstrap="bootstrap.php" + convertNoticesToExceptions="false"> + + <testsuites> + <testsuite name="DokuWiki Tests"> + <directory suffix=".test.php">tests/</directory> + </testsuite> + <testsuite name="Plugin Tests"> + <directory suffix=".test.php">../lib/plugins/*/_test</directory> + </testsuite> + </testsuites> + + <filter> + <whitelist addUncoveredFilesFromWhitelist="false"> + <directory suffix=".php">../</directory> + <exclude> + <directory suffix=".php">../_cs/</directory> + <directory suffix=".php">../_test/</directory> + <directory suffix=".php">../lib/plugins/*/_test/</directory> + </exclude> + </whitelist> + </filter> + +</phpunit> diff --git a/_test/remotetests.php b/_test/remotetests.php deleted file mode 100755 index 3dd290712ce15306ff933df80230b9a6e8893467..0000000000000000000000000000000000000000 --- a/_test/remotetests.php +++ /dev/null @@ -1,163 +0,0 @@ -#!/usr/bin/php -q -<?php -ini_set('memory_limit','128M'); - -if(!defined('DOKU_INC')) define('DOKU_INC',realpath(dirname(__FILE__).'/../').'/'); - -require_once 'lib/testmanager.php'; -TestManager::setup(); - -function usage() { - $usage = <<<EOD -Usage: ./remotetests.php [OPTION]... -Run the Dokuwiki unit tests remotely executing tests over HTTP and delivering -results to the command line. If ALL of the test cases pass a count of -total passes is printed on STDOUT. If ANY of the test cases fail (or raise -errors) details are printed on STDERR and this script returns a non-zero -exit code. - -c --case=NAME specify a test case by it's ID (see -i for list) - -f --caseurl=NAME specify a test case file (full or relative path) - -g --group=NAME specify a grouptest. If no grouptest is - specified, all test cases will be run. - -i --caselist list individual test cases by their ID - -l --grouplist list available grouptests - -s, --separator=SEP set the character(s) used to separate fail - details to SEP - -p, --path path to SimpleTest installation - -h, --help display this help and exit - -u --url=TEST_URL specify remote server test url (w. index.php) - -EOD; - echo $usage; - exit(0); -} - -/* default test options */ -$opt_separator = '->'; -$opt_caselist = FALSE; -$opt_grouplist = FALSE; -$opt_caseid = FALSE; -$opt_caseurl = FALSE; -$opt_groupfile = FALSE; -$opt_url = FALSE; - -include_once(DOKU_INC.'inc/cliopts.php'); -$short_opts = "c:f:g:hils:p:u:"; -$long_opts = array("case=","caselist","help", "caseurl=", "group=", "grouplist", "separator=", "path=","url="); -$OPTS = Doku_Cli_Opts::getOptions(__FILE__,$short_opts,$long_opts); -if ( $OPTS->isError() ) { - fwrite( STDERR, $OPTS->getMessage() . "\n"); - usage($available_grouptests); - exit(1); -} - -foreach ($OPTS->options as $key => $val) { - switch ($key) { - case 'c': - case 'case': - $opt_caseid = $val; - break; - case 'h': - case 'help': - usage(); - break; - case 'f': - case 'caseurl': - $opt_caseurl = $val; - break; - case 'g': - case 'group': - $opt_groupfile = $val; - break; - case 'i': - case 'caselist': - $opt_caselist = TRUE; - break; - case 'l': - case 'grouplist': - $opt_grouplist = TRUE; - break; - case 's': - case 'separator': - $opt_separator = $val; - break; - case 'p': - case 'path': - if (file_exists($val)) { - define('SIMPLE_TEST', $val); - } - break; - case 'u': - case '--url': - $opt_url = $val; - break; - } -} - -if ( ! $opt_url ) { - if ( !defined('REMOTE_TEST_URL') ) { - fwrite( STDERR, "No test URL defined. Either modify tests.ini or use -u option\n"); - exit(1); - } else { - $opt_url = REMOTE_TEST_URL; - } -} - - -if (!@include_once SIMPLE_TEST . 'reporter.php') { - if ( defined(SIMPLE_TEST) ) { - fwrite( STDERR, "Where's Simple Test ?!? Not at ".SIMPLE_TEST." \n"); - } else { - fwrite( STDERR, "Where's Simple Test ?!? SIMPLE_TEST not even defined!\n"); - } - exit(1); -} - -require_once 'lib/cli_reporter.php'; - -/* list grouptests */ -if ($opt_grouplist) { - $groups = RemoteTestManager::getGroupTestList($opt_url); - fwrite( STDOUT, "Available grouptests:\n"); - foreach ( array_keys($groups) as $group ) { - fwrite( STDOUT, $group."\n"); - } -} - -/* list test cases */ -if ($opt_caselist) { - $cases = RemoteTestManager::getTestCaseList($opt_url); - fwrite( STDOUT, "Available tests tests:\n"); - foreach ( array_keys($cases) as $case ) { - fwrite( STDOUT, $case."\n"); - } -} - -/* exit if we've displayed a list */ -if ( $opt_grouplist || $opt_caselist ) { - exit(0); -} - -/* run a test case given it's URL */ -if ($opt_caseurl) { - RemoteTestManager::runTestUrl($opt_caseurl, new CLIReporter($opt_separator), $opt_url); - exit(0); -} - -/* run a test case by id*/ -if ($opt_caseid) { - RemoteTestManager::runTestCase($opt_caseid, new CLIReporter($opt_separator), $opt_url); - exit(0); -} - -/* run a grouptest */ -if ($opt_groupfile) { - RemoteTestManager::runGroupTest( - $opt_groupfile, new CLIReporter($opt_separator), $opt_url - ); - exit(0); -} -/* run all tests */ -RemoteTestManager::runAllTests(new CLIReporter($opt_separator), $opt_url); -exit(0); -?> \ No newline at end of file diff --git a/_test/rss2html.xsl b/_test/rss2html.xsl deleted file mode 100644 index ae56d2c203585174114c4b5f1bcb16a8f4d264a4..0000000000000000000000000000000000000000 --- a/_test/rss2html.xsl +++ /dev/null @@ -1,110 +0,0 @@ -<?xml version="1.0" encoding="iso-8859-1"?> -<!-- - @(#) $Id: rss2html.xsl,v 1.1 2004/06/11 22:00:57 harryf Exp $ - --> -<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rss="http://purl.org/rss/1.0/" xmlns="http://www.w3.org/1999/xhtml"> - -<xsl:output method="html"/> - -<xsl:template match="/"> -<html> -<head> -<meta http-equiv="content-type" content="text/html; charset=iso-8859-1" /> -<style type="text/css"> -div.channel-title { font-family: sans-serif, arial, helvetica } -</style> -<style type="text/css"> -div.image { font-family: sans-serif, arial, helvetica } -</style> -<style type="text/css"> -div.image-description { font-family: sans-serif, arial, helvetica } -</style> -<style type="text/css"> -div.item-title { font-family: sans-serif, arial, helvetica } -</style> -<style type="text/css"> -div.item-description { font-family: sans-serif, arial, helvetica } -</style> -<style type="text/css"> -div.textinput-title { font-family: sans-serif, arial, helvetica } -</style> -<style type="text/css"> -div.textinput-form { font-family: sans-serif, arial, helvetica } -</style> -<title> -<xsl:for-each select="rdf:RDF/rss:channel"> -<xsl:value-of select="rss:description"/> -</xsl:for-each> -</title> -</head> -<body> - -<xsl:for-each select="rdf:RDF/rss:image"> -<center><div class="image"> -<xsl:element name="a"> - <xsl:attribute name="href"><xsl:value-of select="rss:link"/></xsl:attribute> - <xsl:element name="img"> - <xsl:attribute name="src"><xsl:value-of select="rss:url"/></xsl:attribute> - <xsl:attribute name="alt"><xsl:value-of select="rss:title"/></xsl:attribute> - <xsl:attribute name="border">0</xsl:attribute> - </xsl:element> -</xsl:element> -</div></center> -<center><div class="image-description"> -<xsl:value-of select="rss:description"/> -</div></center> -</xsl:for-each> - -<xsl:for-each select="rdf:RDF/rss:channel"> -<center><div class="channel-title"> -<xsl:element name="a"> - <xsl:attribute name="href"><xsl:value-of select="rss:link"/></xsl:attribute> - <xsl:value-of select="rss:title"/> - <xsl:text> (</xsl:text> - <xsl:value-of select="dc:date"/> - <xsl:text>)</xsl:text> -</xsl:element> -</div></center> -</xsl:for-each> - -<ul> -<hr /> -<xsl:for-each select="rdf:RDF/rss:item"> -<div class="item-title"><li> -<xsl:element name="a"> - <xsl:attribute name="href"><xsl:value-of select="rss:link"/></xsl:attribute> - <xsl:value-of select="rss:title"/> -</xsl:element> -<xsl:text> (</xsl:text> -<xsl:value-of select="dc:date"/> -<xsl:text>)</xsl:text> -</li></div> -<div class="item-description"><xsl:value-of select="rss:description"/></div> -<hr /> -</xsl:for-each> -</ul> - -<xsl:for-each select="rdf:RDF/rss:textinput"> -<center><b><div class="textinput-title"><xsl:value-of select="rss:description"/></div></b></center> -<xsl:element name="form"> - <xsl:attribute name="action"><xsl:value-of select="rss:link"/></xsl:attribute> - <xsl:attribute name="method">POST</xsl:attribute> - <center><div class="textinput-form"> - <xsl:element name="input"> - <xsl:attribute name="name"><xsl:value-of select="rss:name"/></xsl:attribute> - <xsl:attribute name="type">text</xsl:attribute> - </xsl:element> - <xsl:text> </xsl:text> - <xsl:element name="input"> - <xsl:attribute name="value"><xsl:value-of select="rss:title"/></xsl:attribute> - <xsl:attribute name="type">submit</xsl:attribute> - </xsl:element> -</div></center> -</xsl:element> -</xsl:for-each> - -</body> -</html> -</xsl:template> - -</xsl:stylesheet> \ No newline at end of file diff --git a/_test/runtests.php b/_test/runtests.php deleted file mode 100755 index 8b93efec3d8183c2d3354a05a8d666637a78d70a..0000000000000000000000000000000000000000 --- a/_test/runtests.php +++ /dev/null @@ -1,187 +0,0 @@ -#!/usr/bin/php -q -<?php -ini_set('memory_limit','128M'); -if(!defined('DOKU_INC')) define('DOKU_INC',realpath(dirname(__FILE__).'/../').'/'); -define('DOKU_UNITTEST',true); - -require_once(DOKU_INC.'inc/init.php'); -require_once(DOKU_INC.'inc/events.php'); - -define('TEST_ROOT', dirname(__FILE__)); -define('TMPL_FILESCHEME_PATH', TEST_ROOT . '/filescheme/'); - -require_once 'lib/testmanager.php'; -TestManager::setup(); - -function usage() { - $usage = <<<EOD -Usage: ./runtests.php [OPTION]... -Run the Dokuwiki unit tests. If ALL of the test cases pass a count of total -passes is printed on STDOUT. If ANY of the test cases fail (or raise -errors) details are printed on STDERR and this script returns a non-zero -exit code. - -c --case=NAME specify a test case by it's ID (see -i for list) - --pcase=NAME specify a plugin test case by it's ID - (see --plugincaselist for list) - -f --file=NAME specify a test case file (full or relative path) - -g --group=NAME specify a grouptest. If no grouptest is - specified, all test cases will be run. - --pgroup=NAME specify a plugin grouptest. If no grouptest is - specified, all test cases will be run. - -i --caselist list individual test cases by their ID - -l --grouplist list available grouptests - --plugincaselist list all individual plugin test cases by their ID - --plugingrouplist list avialable plugin grouptests - -s, --separator=SEP set the character(s) used to separate fail - details to SEP - -p, --path path to SimpleTest installation - -h, --help display this help and exit - -EOD; - echo $usage; - exit(0); -} - -/* test options */ -$opt_separator = '->'; -$opt_caselist = FALSE; -$opt_grouplist = FALSE; -$opt_plugincaselist = FALSE; -$opt_plugingrouplist = FALSE; -$opt_caseid = FALSE; -$top_plugincaseid = FALSE; -$opt_casefile = FALSE; -$opt_groupfile = FALSE; -$opt_plugingroupfile = FALSE; - -include_once(DOKU_INC.'inc/cliopts.php'); - -$short_opts = "c:f:g:hils:p:"; -$long_opts = array("case=","pcase=","caselist","help", "file=", "group=", "pgroup=", "grouplist", "plugincaselist", "plugingrouplist", "separator=", "path="); -$OPTS = Doku_Cli_Opts::getOptions(__FILE__,$short_opts,$long_opts); -if ( $OPTS->isError() ) { - fwrite( STDERR, $OPTS->getMessage() . "\n"); - usage($available_grouptests); - exit(1); -} - -foreach ($OPTS->options as $key => $val) { - switch ($key) { - case 'c': - case 'case': - $opt_caseid = $val; - break; - case 'pcase': - $opt_plugincaseid = $val; - break; - case 'h': - case 'help': - usage(); - break; - case 'f': - case 'file': - $opt_casefile = $val; - break; - case 'g': - case 'group': - $opt_groupfile = $val; - break; - case 'pgroup': - $opt_plugingroupfile = $val; - break; - case 'i': - case 'caselist': - $opt_caselist = TRUE; - break; - case 'l': - case 'grouplist': - $opt_grouplist = TRUE; - break; - case 'plugincaselist': - $opt_plugincaselist = TRUE; - break; - case 'plugingrouplist': - $opt_plugingrouplist = TRUE; - break; - case 's': - case 'separator': - $opt_separator = $val; - break; - case 'p': - case 'path': - if (file_exists($val)) { - define('SIMPLE_TEST', $val); - } - break; - } -} - -if (!@include_once SIMPLE_TEST . 'reporter.php') { - die("Where's Simple Test ?!? Not at ".SIMPLE_TEST); -} - -require_once 'lib/cli_reporter.php'; - -/* list grouptests */ -if ($opt_grouplist) { - echo CLITestManager::getGroupTestList(TEST_GROUPS); -} - -/* list test cases */ -if ($opt_caselist) { - echo CLITestManager::getTestCaseList(TEST_CASES); -} - -/* list plugin test cases */ -if ($opt_plugincaselist) { - echo CLITestManager::getPluginTestCaseList(TEST_PLUGINS); -} - -/* list plugin group tests */ -if($opt_plugingrouplist) { - echo CLITestManager::getPluginGroupTestList(TEST_PLUGINS); -} - -/* exit if we've displayed a list */ -if ( $opt_grouplist || $opt_caselist || $opt_plugincaselist || $opt_plugingrouplist ) { - exit(0); -} - -/* run a test case */ -if ($opt_casefile) { - TestManager::runTestFile($opt_casefile, new CLIReporter($opt_separator)); - exit(0); -} - -/* run a test case by id */ -if ($opt_caseid) { - TestManager::runTestCase($opt_caseid, TEST_CASES, new CLIReporter($opt_separator)); - exit(0); -} - -/* run a plugin test by case id */ -if ($opt_plugincaseid) { - TestManager::runTestCase($opt_plugincaseid, TEST_PLUGINS, new CLIReporter($opt_separator)); - exit(0); -} - -/* run a grouptest */ -if ($opt_groupfile) { - TestManager::runGroupTest($opt_groupfile, TEST_GROUPS, - new CLIReporter($opt_separator)); - exit(0); -} - -/* run a plugin grouptest */ -if ($opt_plugingroupfile) { - TestManager::runGroupTest($opt_plugingroupfile, TEST_PLUGINS, - new CLIReporter($opt_separator)); - exit(0); -} - -/* run a plugin group test */ -//FIXME -/* run all tests */ -TestManager::runAllTests(new CLIReporter($opt_separator)); -exit(0); -?> diff --git a/_test/tests.css b/_test/tests.css deleted file mode 100644 index c20d8bb4f9910edb3b200412eb4ab99426dab016..0000000000000000000000000000000000000000 --- a/_test/tests.css +++ /dev/null @@ -1,27 +0,0 @@ -body { - background-color:#eee; - color:#000; - font:100%/1.2em Georgia,Verdana,Arial,Helvetica,sans-serif; - margin-left:20ex; - max-width:120ex; - } - -#sf { float:right; } - -h1 { - background-image:url(rephlux.png); - background-repeat:no-repeat; - margin-top:0; - padding:20px 0 0 90px; - color:#600; - font-size:3em; - line-height: 1em; - background-color:inherit; - border-bottom:9px double #333; - } - -pre { - font-size:120%; - line-height:1.2em; - color:#006; - } \ No newline at end of file diff --git a/_test/tests.ini b/_test/tests.ini deleted file mode 100644 index cb16d4f1b4cd1a6174e7968ad7c5879a20ae4d29..0000000000000000000000000000000000000000 --- a/_test/tests.ini +++ /dev/null @@ -1,12 +0,0 @@ -TEST_ENABLED = 0 - -; For performing "web tests" - PHP scripts acting as web browser -WEB_TEST_URL = http://localhost/dokuwiki - -; See http://www.sitepoint.com/blogs/2004/06/15/simple-test-remote-testing/ -REMOTE_TEST_URL = http://localhost/dokuwiki/test/index.php - -;PROXY = http://proxyuser:proxypwd@proxy.yourdomain.com:8080 - -; Path to Simple Test -SIMPLE_TEST = ../../simpletest/ diff --git a/_test/tests/inc/auth_aclcheck.test.php b/_test/tests/inc/auth_aclcheck.test.php new file mode 100644 index 0000000000000000000000000000000000000000..ea48ec6a50643926a7b6dc2f6ec8b3e93de601b3 --- /dev/null +++ b/_test/tests/inc/auth_aclcheck.test.php @@ -0,0 +1,240 @@ +<?php + +class auth_acl_test extends DokuWikiTest { + + var $oldConf; + var $oldAuthAcl; + + function setup() { + global $conf; + global $AUTH_ACL; + global $auth; + $this->oldConf = $conf; + $this->oldAuthAcl = $AUTH_ACL; + $auth = new auth_basic(); + } + + function teardown() { + global $conf; + global $AUTH_ACL; + $conf = $this->oldConf; + $AUTH_ACL = $this->oldAuthAcl; + + } + + function test_restricted(){ + global $conf; + global $AUTH_ACL; + $conf['superuser'] = 'john'; + $conf['useacl'] = 1; + + $AUTH_ACL = array( + '* @ALL 0', + '* @user 8', + ); + + // anonymous user + $this->assertEquals(auth_aclcheck('page', '',array()), AUTH_NONE); + $this->assertEquals(auth_aclcheck('namespace:page','',array()), AUTH_NONE); + $this->assertEquals(auth_aclcheck('namespace:*', '',array()), AUTH_NONE); + + // user with no matching group + $this->assertEquals(auth_aclcheck('page', 'jill',array('foo')), AUTH_NONE); + $this->assertEquals(auth_aclcheck('namespace:page','jill',array('foo')), AUTH_NONE); + $this->assertEquals(auth_aclcheck('namespace:*', 'jill',array('foo')), AUTH_NONE); + + // user with matching group + $this->assertEquals(auth_aclcheck('page', 'jill',array('foo','user')), AUTH_UPLOAD); + $this->assertEquals(auth_aclcheck('namespace:page','jill',array('foo','user')), AUTH_UPLOAD); + $this->assertEquals(auth_aclcheck('namespace:*', 'jill',array('foo','user')), AUTH_UPLOAD); + + // super user + $this->assertEquals(auth_aclcheck('page', 'john',array('foo')), AUTH_ADMIN); + $this->assertEquals(auth_aclcheck('namespace:page','john',array('foo')), AUTH_ADMIN); + $this->assertEquals(auth_aclcheck('namespace:*', 'john',array('foo')), AUTH_ADMIN); + } + + function test_restricted_ropage(){ + global $conf; + global $AUTH_ACL; + $conf['superuser'] = 'john'; + $conf['useacl'] = 1; + + $AUTH_ACL = array( + '* @ALL 0', + '* @user 8', + 'namespace:page @user 1', + ); + + // anonymous user + $this->assertEquals(auth_aclcheck('page', '',array()), AUTH_NONE); + $this->assertEquals(auth_aclcheck('namespace:page','',array()), AUTH_NONE); + $this->assertEquals(auth_aclcheck('namespace:*', '',array()), AUTH_NONE); + + // user with no matching group + $this->assertEquals(auth_aclcheck('page', 'jill',array('foo')), AUTH_NONE); + $this->assertEquals(auth_aclcheck('namespace:page','jill',array('foo')), AUTH_NONE); + $this->assertEquals(auth_aclcheck('namespace:*', 'jill',array('foo')), AUTH_NONE); + + // user with matching group + $this->assertEquals(auth_aclcheck('page', 'jill',array('foo','user')), AUTH_UPLOAD); + $this->assertEquals(auth_aclcheck('namespace:page','jill',array('foo','user')), AUTH_READ); + $this->assertEquals(auth_aclcheck('namespace:*', 'jill',array('foo','user')), AUTH_UPLOAD); + + // super user + $this->assertEquals(auth_aclcheck('page', 'john',array('foo')), AUTH_ADMIN); + $this->assertEquals(auth_aclcheck('namespace:page','john',array('foo')), AUTH_ADMIN); + $this->assertEquals(auth_aclcheck('namespace:*', 'john',array('foo')), AUTH_ADMIN); + } + + function test_aclexample(){ + global $conf; + global $AUTH_ACL; + $conf['superuser'] = 'john'; + $conf['useacl'] = 1; + + $AUTH_ACL = array( + '* @ALL 4', + '* bigboss 16', + 'start @ALL 1', + 'marketing:* @marketing 8', + 'devel:* @ALL 0', + 'devel:* @devel 8', + 'devel:* bigboss 16', + 'devel:funstuff bigboss 0', + 'devel:* @marketing 1', + 'devel:marketing @marketing 2', + ); + + + $this->assertEquals(auth_aclcheck('page', '' ,array()) , AUTH_CREATE); + $this->assertEquals(auth_aclcheck('page', 'bigboss' ,array('foo')) , AUTH_DELETE); + $this->assertEquals(auth_aclcheck('page', 'jill' ,array('marketing')) , AUTH_CREATE); + $this->assertEquals(auth_aclcheck('page', 'jane' ,array('devel')) , AUTH_CREATE); + + $this->assertEquals(auth_aclcheck('start', '' ,array()) , AUTH_READ); + $this->assertEquals(auth_aclcheck('start', 'bigboss' ,array('foo')) , AUTH_READ); + $this->assertEquals(auth_aclcheck('start', 'jill' ,array('marketing')) , AUTH_READ); + $this->assertEquals(auth_aclcheck('start', 'jane' ,array('devel')) , AUTH_READ); + + $this->assertEquals(auth_aclcheck('marketing:page', '' ,array()) , AUTH_CREATE); + $this->assertEquals(auth_aclcheck('marketing:page', 'bigboss' ,array('foo')) , AUTH_DELETE); + $this->assertEquals(auth_aclcheck('marketing:page', 'jill' ,array('marketing')) , AUTH_UPLOAD); + $this->assertEquals(auth_aclcheck('marketing:page', 'jane' ,array('devel')) , AUTH_CREATE); + + + $this->assertEquals(auth_aclcheck('devel:page', '' ,array()) , AUTH_NONE); + $this->assertEquals(auth_aclcheck('devel:page', 'bigboss' ,array('foo')) , AUTH_DELETE); + $this->assertEquals(auth_aclcheck('devel:page', 'jill' ,array('marketing')) , AUTH_READ); + $this->assertEquals(auth_aclcheck('devel:page', 'jane' ,array('devel')) , AUTH_UPLOAD); + + $this->assertEquals(auth_aclcheck('devel:funstuff', '' ,array()) , AUTH_NONE); + $this->assertEquals(auth_aclcheck('devel:funstuff', 'bigboss' ,array('foo')) , AUTH_NONE); + $this->assertEquals(auth_aclcheck('devel:funstuff', 'jill' ,array('marketing')) , AUTH_READ); + $this->assertEquals(auth_aclcheck('devel:funstuff', 'jane' ,array('devel')) , AUTH_UPLOAD); + + $this->assertEquals(auth_aclcheck('devel:marketing', '' ,array()) , AUTH_NONE); + $this->assertEquals(auth_aclcheck('devel:marketing', 'bigboss' ,array('foo')) , AUTH_DELETE); + $this->assertEquals(auth_aclcheck('devel:marketing', 'jill' ,array('marketing')) , AUTH_EDIT); + $this->assertEquals(auth_aclcheck('devel:marketing', 'jane' ,array('devel')) , AUTH_UPLOAD); + + } + + function test_multiadmin_restricted(){ + global $conf; + global $AUTH_ACL; + $conf['superuser'] = 'john,@admin,doe,@roots'; + $conf['useacl'] = 1; + + $AUTH_ACL = array( + '* @ALL 0', + '* @user 8', + ); + + // anonymous user + $this->assertEquals(auth_aclcheck('page', '',array()), AUTH_NONE); + $this->assertEquals(auth_aclcheck('namespace:page','',array()), AUTH_NONE); + $this->assertEquals(auth_aclcheck('namespace:*', '',array()), AUTH_NONE); + + // user with no matching group + $this->assertEquals(auth_aclcheck('page', 'jill',array('foo')), AUTH_NONE); + $this->assertEquals(auth_aclcheck('namespace:page','jill',array('foo')), AUTH_NONE); + $this->assertEquals(auth_aclcheck('namespace:*', 'jill',array('foo')), AUTH_NONE); + + // user with matching group + $this->assertEquals(auth_aclcheck('page', 'jill',array('foo','user')), AUTH_UPLOAD); + $this->assertEquals(auth_aclcheck('namespace:page','jill',array('foo','user')), AUTH_UPLOAD); + $this->assertEquals(auth_aclcheck('namespace:*', 'jill',array('foo','user')), AUTH_UPLOAD); + + // super user john + $this->assertEquals(auth_aclcheck('page', 'john',array('foo')), AUTH_ADMIN); + $this->assertEquals(auth_aclcheck('namespace:page','john',array('foo')), AUTH_ADMIN); + $this->assertEquals(auth_aclcheck('namespace:*', 'john',array('foo')), AUTH_ADMIN); + + // super user doe + $this->assertEquals(auth_aclcheck('page', 'doe',array('foo')), AUTH_ADMIN); + $this->assertEquals(auth_aclcheck('namespace:page','doe',array('foo')), AUTH_ADMIN); + $this->assertEquals(auth_aclcheck('namespace:*', 'doe',array('foo')), AUTH_ADMIN); + + // user with matching admin group + $this->assertEquals(auth_aclcheck('page', 'jill',array('foo','admin')), AUTH_ADMIN); + $this->assertEquals(auth_aclcheck('namespace:page','jill',array('foo','admin')), AUTH_ADMIN); + $this->assertEquals(auth_aclcheck('namespace:*', 'jill',array('foo','admin')), AUTH_ADMIN); + + // user with matching another admin group + $this->assertEquals(auth_aclcheck('page', 'jill',array('foo','roots')), AUTH_ADMIN); + $this->assertEquals(auth_aclcheck('namespace:page','jill',array('foo','roots')), AUTH_ADMIN); + $this->assertEquals(auth_aclcheck('namespace:*', 'jill',array('foo','roots')), AUTH_ADMIN); + } + + function test_multiadmin_restricted_ropage(){ + global $conf; + global $AUTH_ACL; + $conf['superuser'] = 'john,@admin,doe,@roots'; + $conf['useacl'] = 1; + + $AUTH_ACL = array( + '* @ALL 0', + '* @user 8', + 'namespace:page @user 1', + ); + + // anonymous user + $this->assertEquals(auth_aclcheck('page', '',array()), AUTH_NONE); + $this->assertEquals(auth_aclcheck('namespace:page','',array()), AUTH_NONE); + $this->assertEquals(auth_aclcheck('namespace:*', '',array()), AUTH_NONE); + + // user with no matching group + $this->assertEquals(auth_aclcheck('page', 'jill',array('foo')), AUTH_NONE); + $this->assertEquals(auth_aclcheck('namespace:page','jill',array('foo')), AUTH_NONE); + $this->assertEquals(auth_aclcheck('namespace:*', 'jill',array('foo')), AUTH_NONE); + + // user with matching group + $this->assertEquals(auth_aclcheck('page', 'jill',array('foo','user')), AUTH_UPLOAD); + $this->assertEquals(auth_aclcheck('namespace:page','jill',array('foo','user')), AUTH_READ); + $this->assertEquals(auth_aclcheck('namespace:*', 'jill',array('foo','user')), AUTH_UPLOAD); + + // super user john + $this->assertEquals(auth_aclcheck('page', 'john',array('foo')), AUTH_ADMIN); + $this->assertEquals(auth_aclcheck('namespace:page','john',array('foo')), AUTH_ADMIN); + $this->assertEquals(auth_aclcheck('namespace:*', 'john',array('foo')), AUTH_ADMIN); + + // super user doe + $this->assertEquals(auth_aclcheck('page', 'doe',array('foo')), AUTH_ADMIN); + $this->assertEquals(auth_aclcheck('namespace:page','doe',array('foo')), AUTH_ADMIN); + $this->assertEquals(auth_aclcheck('namespace:*', 'doe',array('foo')), AUTH_ADMIN); + + // user with matching admin group + $this->assertEquals(auth_aclcheck('page', 'jill',array('foo','admin')), AUTH_ADMIN); + $this->assertEquals(auth_aclcheck('namespace:page','jill',array('foo','admin')), AUTH_ADMIN); + $this->assertEquals(auth_aclcheck('namespace:*', 'jill',array('foo','admin')), AUTH_ADMIN); + + // user with matching another admin group + $this->assertEquals(auth_aclcheck('page', 'jill',array('foo','roots')), AUTH_ADMIN); + $this->assertEquals(auth_aclcheck('namespace:page','jill',array('foo','roots')), AUTH_ADMIN); + $this->assertEquals(auth_aclcheck('namespace:*', 'jill',array('foo','roots')), AUTH_ADMIN); + } + +} + +//Setup VIM: ex: et ts=4 : diff --git a/_test/tests/inc/auth_admincheck.test.php b/_test/tests/inc/auth_admincheck.test.php new file mode 100644 index 0000000000000000000000000000000000000000..d88399cbebebc345e76cee2f81466ea12ec46365 --- /dev/null +++ b/_test/tests/inc/auth_admincheck.test.php @@ -0,0 +1,126 @@ +<?php + +class auth_admin_test_AuthInSensitive extends auth_basic { + function isCaseSensitive(){ + return false; + } +} + +class auth_admin_test extends DokuWikiTest { + + private $oldauth; + + function setup() { + global $auth; + $this->oldauth = $auth; + } + + function setSensitive() { + global $auth; + $auth = new auth_basic(); + } + + function setInSensitive() { + global $auth; + $auth = new auth_admin_test_AuthInSensitive(); + } + + function teardown() { + global $auth; + global $conf; + global $AUTH_ACL; + unset($conf); + unset($AUTH_ACL); + $auth = $this->oldauth; + } + + function test_ismanager_insensitive(){ + $this->setInSensitive(); + global $conf; + $conf['superuser'] = 'john,@admin,@Mötly Görls, Dörte'; + $conf['manager'] = 'john,@managers,doe, @Mötly Böys, Dänny'; + + // anonymous user + $this->assertEquals(auth_ismanager('jill', null,false), false); + + // admin or manager users + $this->assertEquals(auth_ismanager('john', null,false), true); + $this->assertEquals(auth_ismanager('doe', null,false), true); + + $this->assertEquals(auth_ismanager('dörte', null,false), true); + $this->assertEquals(auth_ismanager('dänny', null,false), true); + + // admin or manager groups + $this->assertEquals(auth_ismanager('jill', array('admin'),false), true); + $this->assertEquals(auth_ismanager('jill', array('managers'),false), true); + + $this->assertEquals(auth_ismanager('jill', array('mötly görls'),false), true); + $this->assertEquals(auth_ismanager('jill', array('mötly böys'),false), true); + } + + function test_isadmin_insensitive(){ + $this->setInSensitive(); + global $conf; + $conf['superuser'] = 'john,@admin,doe,@roots'; + + // anonymous user + $this->assertEquals(auth_ismanager('jill', null,true), false); + + // admin user + $this->assertEquals(auth_ismanager('john', null,true), true); + $this->assertEquals(auth_ismanager('doe', null,true), true); + + // admin groups + $this->assertEquals(auth_ismanager('jill', array('admin'),true), true); + $this->assertEquals(auth_ismanager('jill', array('roots'),true), true); + $this->assertEquals(auth_ismanager('john', array('admin'),true), true); + $this->assertEquals(auth_ismanager('doe', array('admin'),true), true); + } + + function test_ismanager_sensitive(){ + $this->setSensitive(); + global $conf; + $conf['superuser'] = 'john,@admin,@Mötly Görls, Dörte'; + $conf['manager'] = 'john,@managers,doe, @Mötly Böys, Dänny'; + + // anonymous user + $this->assertEquals(auth_ismanager('jill', null,false), false); + + // admin or manager users + $this->assertEquals(auth_ismanager('john', null,false), true); + $this->assertEquals(auth_ismanager('doe', null,false), true); + + $this->assertEquals(auth_ismanager('dörte', null,false), false); + $this->assertEquals(auth_ismanager('dänny', null,false), false); + + // admin or manager groups + $this->assertEquals(auth_ismanager('jill', array('admin'),false), true); + $this->assertEquals(auth_ismanager('jill', array('managers'),false), true); + + $this->assertEquals(auth_ismanager('jill', array('mötly görls'),false), false); + $this->assertEquals(auth_ismanager('jill', array('mötly böys'),false), false); + } + + function test_isadmin_sensitive(){ + $this->setSensitive(); + global $conf; + $conf['superuser'] = 'john,@admin,doe,@roots'; + + // anonymous user + $this->assertEquals(auth_ismanager('jill', null,true), false); + + // admin user + $this->assertEquals(auth_ismanager('john', null,true), true); + $this->assertEquals(auth_ismanager('Doe', null,true), false); + + // admin groups + $this->assertEquals(auth_ismanager('jill', array('admin'),true), true); + $this->assertEquals(auth_ismanager('jill', array('roots'),true), true); + $this->assertEquals(auth_ismanager('john', array('admin'),true), true); + $this->assertEquals(auth_ismanager('doe', array('admin'),true), true); + $this->assertEquals(auth_ismanager('Doe', array('admin'),true), true); + } + +} + +//Setup VIM: ex: et ts=4 : diff --git a/_test/cases/inc/auth_nameencode.test.php b/_test/tests/inc/auth_nameencode.test.php similarity index 62% rename from _test/cases/inc/auth_nameencode.test.php rename to _test/tests/inc/auth_nameencode.test.php index 56806a862a73208edea7c7b6abfec65a46ce5ef8..21db304e062887fa0ad54d474a6e74e5c764ca8b 100644 --- a/_test/cases/inc/auth_nameencode.test.php +++ b/_test/tests/inc/auth_nameencode.test.php @@ -1,9 +1,6 @@ <?php -require_once DOKU_INC.'inc/init.php'; -require_once DOKU_INC.'inc/auth.php'; - -class auth_nameencode_test extends UnitTestCase { +class auth_nameencode_test extends DokuWikiTest { function teardown() { global $cache_authname; @@ -13,37 +10,37 @@ class auth_nameencode_test extends UnitTestCase { function test_simple(){ $in = 'hey$you'; $out = 'hey%24you'; - $this->assertEqual(auth_nameencode($in),$out); + $this->assertEquals(auth_nameencode($in),$out); } function test_quote(){ $in = 'hey"you'; $out = 'hey%22you'; - $this->assertEqual(auth_nameencode($in),$out); + $this->assertEquals(auth_nameencode($in),$out); } function test_complex(){ $in = 'hey $ you !$%! foo '; $out = 'hey%20%24%20you%20%21%24%25%21%20foo%20'; - $this->assertEqual(auth_nameencode($in),$out); + $this->assertEquals(auth_nameencode($in),$out); } function test_complexutf8(){ $in = 'häü $ yü !$%! foo '; $out = 'häü%20%24%20yü%20%21%24%25%21%20foo%20'; - $this->assertEqual(auth_nameencode($in),$out); + $this->assertEquals(auth_nameencode($in),$out); } function test_groupskipon(){ $in = '@hey$you'; $out = '@hey%24you'; - $this->assertEqual(auth_nameencode($in,true),$out); + $this->assertEquals(auth_nameencode($in,true),$out); } function test_groupskipoff(){ $in = '@hey$you'; $out = '%40hey%24you'; - $this->assertEqual(auth_nameencode($in),$out); + $this->assertEquals(auth_nameencode($in),$out); } } diff --git a/_test/cases/inc/auth_password.test.php b/_test/tests/inc/auth_password.test.php similarity index 75% rename from _test/cases/inc/auth_password.test.php rename to _test/tests/inc/auth_password.test.php index d4a4d2bdbd6ef33a3218391c5d7ca4b13b514574..4263532919f189aef8958064ee2dc0afd529ad61 100644 --- a/_test/cases/inc/auth_password.test.php +++ b/_test/tests/inc/auth_password.test.php @@ -1,9 +1,6 @@ <?php -require_once DOKU_INC.'inc/init.php'; -require_once DOKU_INC.'inc/auth.php'; - -class auth_password_test extends UnitTestCase { +class auth_password_test extends PHPUnit_Framework_TestCase { // hashes for the password foo$method, using abcdefgh as salt var $passes = array( @@ -17,8 +14,6 @@ class auth_password_test extends UnitTestCase { 'mysql' => '4a1fa3780bd6fd55', 'my411' => '*e5929347e25f82e19e4ebe92f1dc6b6e7c2dbd29', 'kmd5' => 'a579299436d7969791189acadd86fcb716', - 'pmd5' => '$P$abcdefgh1RC6Fd32heUzl7EYCG9uGw.', - 'hmd5' => '$H$abcdefgh1ZbJodHxmeXVAhEzTG7IAp.', 'djangomd5' => 'md5$abcde$d0fdddeda8cd92725d2b54148ac09158', 'djangosha1' => 'sha1$abcde$c8e65a7f0acc9158843048a53dcc5a6bc4d17678', ); @@ -27,25 +22,24 @@ class auth_password_test extends UnitTestCase { function test_cryptPassword(){ foreach($this->passes as $method => $hash){ $info = "testing method $method"; - $this->signal('failinfo',$info); - $this->assertEqual(auth_cryptPassword('foo'.$method,$method,'abcdefgh12345678912345678912345678'),$hash); + $this->assertEquals(auth_cryptPassword('foo'.$method, $method,'abcdefgh12345678912345678912345678'), + $hash, $info); } } function test_verifyPassword(){ foreach($this->passes as $method => $hash){ $info = "testing method $method"; - $this->signal('failinfo',$info); - $this->assertTrue(auth_verifyPassword('foo'.$method,$hash)); + $this->assertTrue(auth_verifyPassword('foo'.$method, $hash), $info); + $this->assertFalse(auth_verifyPassword('bar'.$method, $hash), $info); } } function test_verifySelf(){ foreach($this->passes as $method => $hash){ $info = "testing method $method"; - $this->signal('failinfo',$info); $hash = auth_cryptPassword('foo'.$method,$method); - $this->assertTrue(auth_verifyPassword('foo'.$method,$hash)); + $this->assertTrue(auth_verifyPassword('foo'.$method, $hash), $info); } } @@ -67,6 +61,20 @@ class auth_password_test extends UnitTestCase { $this->assertTrue(auth_verifyPassword('test12345','$H$9IQRaTwmfeRo7ud9Fh4E2PdI0S3r.L0')); } + /** + * pmd5 checking should throw an exception when a hash with a too high + * iteration count is passed + */ + function test_verifyPassword_pmd5Exception(){ + $except = false; + try{ + auth_verifyPassword('foopmd5', '$H$abcdefgh1ZbJodHxmeXVAhEzTG7IAp.'); + }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 new file mode 100644 index 0000000000000000000000000000000000000000..972df11f4b16a8df50a5ab745b33e44dd09a55b0 --- /dev/null +++ b/_test/tests/inc/blowfish.test.php @@ -0,0 +1,33 @@ +<?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/common_cleanText.test.php b/_test/tests/inc/common_cleanText.test.php new file mode 100644 index 0000000000000000000000000000000000000000..00e70d4c72f2779acc34544fa0bd1baa161761a9 --- /dev/null +++ b/_test/tests/inc/common_cleanText.test.php @@ -0,0 +1,25 @@ +<?php + +class common_cleanText_test extends DokuWikiTest { + + function test_unix(){ + $unix = 'one + two + + three'; + + $this->assertEquals($unix,cleanText($unix)); + } + + function test_win(){ + $unix = "one\ntwo\nthree"; + $win = "one\r\ntwo\r\nthree"; + + $this->assertEquals(bin2hex($unix), '6f6e650a74776f0a7468726565'); + $this->assertEquals(bin2hex($win), '6f6e650d0a74776f0d0a7468726565'); + $this->assertNotEquals($unix, $win); + $this->assertEquals($unix, cleanText($win)); + } +} + +//Setup VIM: ex: et ts=4 : diff --git a/_test/cases/inc/common_clientip.test.php b/_test/tests/inc/common_clientip.test.php similarity index 82% rename from _test/cases/inc/common_clientip.test.php rename to _test/tests/inc/common_clientip.test.php index 68c1081657600d5ab08b0a19022cd36e5d34a120..5b569cd987d4357e15d48651d0d9ad3f5ef90fe5 100644 --- a/_test/cases/inc/common_clientip.test.php +++ b/_test/tests/inc/common_clientip.test.php @@ -1,16 +1,13 @@ <?php -require_once DOKU_INC.'inc/init.php'; -require_once DOKU_INC.'inc/common.php'; - -class common_clientIP_test extends UnitTestCase { +class common_clientIP_test extends DokuWikiTest { function test_simple_all(){ $_SERVER['REMOTE_ADDR'] = '123.123.123.123'; $_SERVER['HTTP_X_REAL_IP'] = ''; $_SERVER['HTTP_X_FORWARDED_FOR'] = ''; $out = '123.123.123.123'; - $this->assertEqual(clientIP(),$out); + $this->assertEquals(clientIP(),$out); } function test_proxy1_all(){ @@ -18,7 +15,7 @@ class common_clientIP_test extends UnitTestCase { $_SERVER['HTTP_X_REAL_IP'] = '77.77.77.77'; $_SERVER['HTTP_X_FORWARDED_FOR'] = ''; $out = '123.123.123.123,77.77.77.77'; - $this->assertEqual(clientIP(),$out); + $this->assertEquals(clientIP(),$out); } function test_proxy2_all(){ @@ -26,7 +23,7 @@ class common_clientIP_test extends UnitTestCase { $_SERVER['HTTP_X_REAL_IP'] = ''; $_SERVER['HTTP_X_FORWARDED_FOR'] = '77.77.77.77'; $out = '123.123.123.123,77.77.77.77'; - $this->assertEqual(clientIP(),$out); + $this->assertEquals(clientIP(),$out); } function test_proxyhops_all(){ @@ -34,7 +31,7 @@ class common_clientIP_test extends UnitTestCase { $_SERVER['HTTP_X_REAL_IP'] = ''; $_SERVER['HTTP_X_FORWARDED_FOR'] = '77.77.77.77,66.66.66.66'; $out = '123.123.123.123,77.77.77.77,66.66.66.66'; - $this->assertEqual(clientIP(),$out); + $this->assertEquals(clientIP(),$out); } function test_simple_single(){ @@ -42,7 +39,7 @@ class common_clientIP_test extends UnitTestCase { $_SERVER['HTTP_X_REAL_IP'] = ''; $_SERVER['HTTP_X_FORWARDED_FOR'] = ''; $out = '123.123.123.123'; - $this->assertEqual(clientIP(true),$out); + $this->assertEquals(clientIP(true),$out); } function test_proxy1_single(){ @@ -50,7 +47,7 @@ class common_clientIP_test extends UnitTestCase { $_SERVER['HTTP_X_REAL_IP'] = '77.77.77.77'; $_SERVER['HTTP_X_FORWARDED_FOR'] = ''; $out = '77.77.77.77'; - $this->assertEqual(clientIP(true),$out); + $this->assertEquals(clientIP(true),$out); } function test_proxy2_single(){ @@ -58,7 +55,7 @@ class common_clientIP_test extends UnitTestCase { $_SERVER['HTTP_X_REAL_IP'] = ''; $_SERVER['HTTP_X_FORWARDED_FOR'] = '77.77.77.77'; $out = '77.77.77.77'; - $this->assertEqual(clientIP(true),$out); + $this->assertEquals(clientIP(true),$out); } function test_proxyhops_single(){ @@ -66,7 +63,7 @@ class common_clientIP_test extends UnitTestCase { $_SERVER['HTTP_X_REAL_IP'] = ''; $_SERVER['HTTP_X_FORWARDED_FOR'] = '77.77.77.77,66.66.66.66'; $out = '66.66.66.66'; - $this->assertEqual(clientIP(true),$out); + $this->assertEquals(clientIP(true),$out); } function test_local_all(){ @@ -74,7 +71,7 @@ class common_clientIP_test extends UnitTestCase { $_SERVER['HTTP_X_REAL_IP'] = ''; $_SERVER['HTTP_X_FORWARDED_FOR'] = '127.0.0.1'; $out = '123.123.123.123,127.0.0.1'; - $this->assertEqual(clientIP(),$out); + $this->assertEquals(clientIP(),$out); } function test_local1_single(){ @@ -82,7 +79,7 @@ class common_clientIP_test extends UnitTestCase { $_SERVER['HTTP_X_REAL_IP'] = ''; $_SERVER['HTTP_X_FORWARDED_FOR'] = '127.0.0.1'; $out = '123.123.123.123'; - $this->assertEqual(clientIP(true),$out); + $this->assertEquals(clientIP(true),$out); } function test_local2_single(){ @@ -90,7 +87,7 @@ class common_clientIP_test extends UnitTestCase { $_SERVER['HTTP_X_REAL_IP'] = ''; $_SERVER['HTTP_X_FORWARDED_FOR'] = '123.123.123.123'; $out = '123.123.123.123'; - $this->assertEqual(clientIP(true),$out); + $this->assertEquals(clientIP(true),$out); } function test_local3_single(){ @@ -98,7 +95,7 @@ class common_clientIP_test extends UnitTestCase { $_SERVER['HTTP_X_REAL_IP'] = ''; $_SERVER['HTTP_X_FORWARDED_FOR'] = '127.0.0.1,10.0.0.1,192.168.0.2,172.17.1.1,172.21.1.1,172.31.1.1'; $out = '123.123.123.123'; - $this->assertEqual(clientIP(true),$out); + $this->assertEquals(clientIP(true),$out); } function test_local4_single(){ @@ -106,7 +103,7 @@ class common_clientIP_test extends UnitTestCase { $_SERVER['HTTP_X_REAL_IP'] = ''; $_SERVER['HTTP_X_FORWARDED_FOR'] = '192.168.0.5'; $out = '192.168.0.5'; - $this->assertEqual(clientIP(true),$out); + $this->assertEquals(clientIP(true),$out); } function test_garbage_all(){ @@ -114,7 +111,7 @@ class common_clientIP_test extends UnitTestCase { $_SERVER['HTTP_X_REAL_IP'] = ''; $_SERVER['HTTP_X_FORWARDED_FOR'] = 'some garbage, or something, 222'; $out = '123.123.123.123'; - $this->assertEqual(clientIP(),$out); + $this->assertEquals(clientIP(),$out); } function test_garbage_single(){ @@ -122,7 +119,7 @@ class common_clientIP_test extends UnitTestCase { $_SERVER['HTTP_X_REAL_IP'] = ''; $_SERVER['HTTP_X_FORWARDED_FOR'] = 'some garbage, or something, 222'; $out = '123.123.123.123'; - $this->assertEqual(clientIP(true),$out); + $this->assertEquals(clientIP(true),$out); } function test_garbageonly_all(){ @@ -130,7 +127,7 @@ class common_clientIP_test extends UnitTestCase { $_SERVER['HTTP_X_REAL_IP'] = ''; $_SERVER['HTTP_X_FORWARDED_FOR'] = 'some garbage, or something, 222'; $out = '0.0.0.0'; - $this->assertEqual(clientIP(),$out); + $this->assertEquals(clientIP(),$out); } function test_garbageonly_single(){ @@ -138,7 +135,7 @@ class common_clientIP_test extends UnitTestCase { $_SERVER['HTTP_X_REAL_IP'] = ''; $_SERVER['HTTP_X_FORWARDED_FOR'] = 'some garbage, or something, 222'; $out = '0.0.0.0'; - $this->assertEqual(clientIP(true),$out); + $this->assertEquals(clientIP(true),$out); } function test_malicious(){ @@ -146,10 +143,9 @@ class common_clientIP_test extends UnitTestCase { $_SERVER['HTTP_X_REAL_IP'] = ''; $_SERVER['HTTP_X_FORWARDED_FOR'] = '<?php set_time_limit(0);echo \'my_delim\';passthru(123.123.123.123);die;?>'; $out = '0.0.0.0'; - $this->assertEqual(clientIP(),$out); + $this->assertEquals(clientIP(),$out); } - } //Setup VIM: ex: et ts=4 : diff --git a/_test/cases/inc/common_obfuscate.test.php b/_test/tests/inc/common_obfuscate.test.php similarity index 56% rename from _test/cases/inc/common_obfuscate.test.php rename to _test/tests/inc/common_obfuscate.test.php index 31321bea12bd5c658e6beeab387714c58d9414c9..b8ec7098097ff0c7fd76df7baab3607700cc1faf 100644 --- a/_test/cases/inc/common_obfuscate.test.php +++ b/_test/tests/inc/common_obfuscate.test.php @@ -1,26 +1,24 @@ <?php -require_once DOKU_INC.'inc/common.php'; - -class common_obfuscate_test extends UnitTestCase { +class common_obfuscate_test extends DokuWikiTest { function test_none(){ global $conf; $conf['mailguard'] = 'none'; - $this->assertEqual(obfuscate('jon-doe@example.com'), 'jon-doe@example.com'); + $this->assertEquals(obfuscate('jon-doe@example.com'), 'jon-doe@example.com'); } function test_hex(){ global $conf; $conf['mailguard'] = 'hex'; - $this->assertEqual(obfuscate('jon-doe@example.com'), + $this->assertEquals(obfuscate('jon-doe@example.com'), 'jon-doe@example.com'); } function test_visible(){ global $conf; $conf['mailguard'] = 'visible'; - $this->assertEqual(obfuscate('jon-doe@example.com'), 'jon [dash] doe [at] example [dot] com'); + $this->assertEquals(obfuscate('jon-doe@example.com'), 'jon [dash] doe [at] example [dot] com'); } diff --git a/_test/tests/inc/common_pagetemplate.test.php b/_test/tests/inc/common_pagetemplate.test.php new file mode 100644 index 0000000000000000000000000000000000000000..a076ce069d942f9f541a2b84634489bd4b203d89 --- /dev/null +++ b/_test/tests/inc/common_pagetemplate.test.php @@ -0,0 +1,15 @@ +<?php + +class common_pagetemplate_test extends DokuWikiTest { + + function test_none(){ + global $conf; + $conf['sepchar'] = '-'; + $data = array( + 'id' => 'page-id-long', + 'tpl' => '"@PAGE@" "@!PAGE@" "@!!PAGE@" "@!PAGE!@"', + ); + $this->assertEquals(parsePageTemplate($data), '"page id long" "Page id long" "Page Id Long" "PAGE ID LONG"'); + } +} +//Setup VIM: ex: et ts=4 : diff --git a/_test/tests/inc/common_wl.test.php b/_test/tests/inc/common_wl.test.php new file mode 100644 index 0000000000000000000000000000000000000000..2e34dcae3c4aa3eec9919a625a49c7e316bf5543 --- /dev/null +++ b/_test/tests/inc/common_wl.test.php @@ -0,0 +1,148 @@ +<?php + +class common_wl_test extends DokuWikiTest { + + function test_wl_empty() { + global $conf; + $conf['useslash'] = 0; + $conf['userewrite'] = 0; + $conf['start'] = 'start'; + + $this->assertEquals(DOKU_BASE . DOKU_SCRIPT . '?id=start' , wl()); + } + + function test_wl_empty_rewrite1() { + global $conf; + $conf['useslash'] = 0; + $conf['userewrite'] = 1; + $conf['start'] = 'start'; + + $this->assertEquals(DOKU_BASE . 'start' , wl()); + } + + function test_wl_empty_rewrite2() { + global $conf; + $conf['useslash'] = 0; + $conf['userewrite'] = 2; + $conf['start'] = 'start'; + + $this->assertEquals(DOKU_BASE . DOKU_SCRIPT . '/start' , wl()); + } + + function test_wl_id() { + global $conf; + $conf['useslash'] = 0; + $conf['userewrite'] = 0; + + $expect = DOKU_BASE . DOKU_SCRIPT . '?id=some'; + $this->assertEquals($expect, wl('some')); + } + + function test_wl_id_ns() { + global $conf; + $conf['useslash'] = 0; + $conf['userewrite'] = 0; + + $expect = DOKU_BASE . DOKU_SCRIPT . '?id=some:some'; + $this->assertEquals($expect, wl('some:some')); + } + + function test_wl_id_ns_start() { + global $conf; + $conf['useslash'] = 0; + $conf['userewrite'] = 0; + + $expect = DOKU_BASE . DOKU_SCRIPT . '?id=some:'; + $this->assertEquals($expect, wl('some:')); + } + + function test_wl_args_array() { + global $conf; + $conf['useslash'] = 0; + $conf['userewrite'] = 0; + + $args = array('a' => 'b', 'c' => 'd', 'q' => '&ä'); + + $expect = DOKU_BASE . DOKU_SCRIPT . '?id=some:&a=b&c=d&q=%26%C3%A4'; + $this->assertEquals($expect, wl('some:', $args)); + } + + function test_wl_args_string() { + global $conf; + $conf['useslash'] = 0; + $conf['userewrite'] = 0; + + $args = 'a=b&c=d'; + + $expect = DOKU_BASE . DOKU_SCRIPT . '?id=some:&a=b&c=d'; + $this->assertEquals($expect, wl('some:', $args)); + } + + function test_wl_args_comma_string() { + global $conf; + $conf['useslash'] = 0; + $conf['userewrite'] = 0; + + $args = 'a=b,c=d'; + + $expect = DOKU_BASE . DOKU_SCRIPT . '?id=some:&a=b&c=d'; + $this->assertEquals($expect, wl('some:', $args)); + } + + function test_wl_abs() { + global $conf; + $conf['useslash'] = 0; + $conf['userewrite'] = 0; + + $expect = DOKU_URL . DOKU_SCRIPT . '?id=some:'; + $this->assertEquals($expect, wl('some:', '', true)); + } + + function test_wl_sep() { + global $conf; + $conf['useslash'] = 0; + $conf['userewrite'] = 0; + + $expect = DOKU_BASE . DOKU_SCRIPT . '?id=some:&a=b&c=d'; + $this->assertEquals($expect, wl('some:', 'a=b,c=d', false, '&')); + } + + function test_wl_useslash() { + global $conf; + $conf['useslash'] = 1; + $conf['userewrite'] = 0; + + $expect = DOKU_BASE . DOKU_SCRIPT . '?id=some:&a=b&c=d'; + $this->assertEquals($expect, wl('some:', 'a=b,c=d', false, '&')); + } + + function test_wl_useslash_rewrite1() { + global $conf; + $conf['useslash'] = 1; + $conf['userewrite'] = 1; + + $expect = DOKU_BASE . 'some/?a=b&c=d'; + $this->assertEquals($expect, wl('some:', 'a=b,c=d', false, '&')); + } + + function test_wl_useslash_rewrite1_sub_page() { + global $conf; + $conf['useslash'] = 1; + $conf['userewrite'] = 1; + + $expect = DOKU_BASE . 'some/one?a=b&c=d'; + $this->assertEquals($expect, wl('some:one', 'a=b,c=d', false, '&')); + } + + function test_wl_useslash_rewrite2() { + global $conf; + $conf['useslash'] = 1; + $conf['userewrite'] = 2; + + $expect = DOKU_BASE . DOKU_SCRIPT . '/some/one?a=b&c=d'; + $this->assertEquals($expect, wl('some:one', 'a=b,c=d', false, '&')); + } + + + +} \ No newline at end of file diff --git a/_test/cases/inc/form_form.test.php b/_test/tests/inc/form_form.test.php similarity index 85% rename from _test/cases/inc/form_form.test.php rename to _test/tests/inc/form_form.test.php index 5d5fa72afc2f9d0fe869736417f6d3f5e5d65718..02242a807ff64812fee492bf386da13d0e9778d4 100644 --- a/_test/cases/inc/form_form.test.php +++ b/_test/tests/inc/form_form.test.php @@ -1,9 +1,6 @@ <?php -require_once DOKU_INC.'inc/auth.php'; -require_once DOKU_INC.'inc/form.php'; - -class form_test extends UnitTestCase { +class form_test extends DokuWikiTest { function _testform() { $form = new Doku_Form(array('id' => 'dw__testform', 'action' => '/test')); @@ -52,13 +49,13 @@ class form_test extends UnitTestCase { $output = ob_get_contents(); ob_end_clean(); $form->addHidden('sectok', getSecurityToken()); - $this->assertEqual($this->_ignoreTagWS($output),$this->_ignoreTagWS($this->_realoutput())); + $this->assertEquals($this->_ignoreTagWS($output),$this->_ignoreTagWS($this->_realoutput())); } function test_get_element_at() { $form = $this->_testform(); $e1 =& $form->getElementAt(1); - $this->assertEqual($e1, array('_elem'=>'textfield', + $this->assertEquals($e1, array('_elem'=>'textfield', '_text'=>'Text', '_class'=>'block', 'id'=>'text__id', @@ -66,24 +63,24 @@ class form_test extends UnitTestCase { 'value'=>'v', 'class'=>'edit')); $e2 =& $form->getElementAt(99); - $this->assertEqual($e2, array('_elem'=>'closefieldset')); + $this->assertEquals($e2, array('_elem'=>'closefieldset')); } function test_find_element_by_type() { $form = $this->_testform(); - $this->assertEqual($form->findElementByType('button'), 3); + $this->assertEquals($form->findElementByType('button'), 3); $this->assertFalse($form->findElementByType('text')); } function test_find_element_by_id() { $form = $this->_testform(); - $this->assertEqual($form->findElementById('check__id'), 2); + $this->assertEquals($form->findElementById('check__id'), 2); $this->assertFalse($form->findElementById('dw__testform')); } function test_find_element_by_attribute() { $form = $this->_testform(); - $this->assertEqual($form->findElementByAttribute('value','Cancel'), 4); + $this->assertEquals($form->findElementByAttribute('value','Cancel'), 4); $this->assertFalse($form->findElementByAttribute('name','cancel')); } @@ -99,7 +96,7 @@ class form_test extends UnitTestCase { $form->printForm(); $output = ob_get_contents(); ob_end_clean(); - $this->assertEqual($this->_ignoreTagWS($output),$this->_ignoreTagWS($this->_realoutput())); + $this->assertEquals($this->_ignoreTagWS($output),$this->_ignoreTagWS($this->_realoutput())); } } diff --git a/_test/tests/inc/html_hilight.test.php b/_test/tests/inc/html_hilight.test.php new file mode 100644 index 0000000000000000000000000000000000000000..bb0cdd4248298c29d0844cfdaba6f90c38642ba8 --- /dev/null +++ b/_test/tests/inc/html_hilight.test.php @@ -0,0 +1,100 @@ +<?php + +class html_hilight_test extends DokuWikiTest { + + function testHighlightOneWord() { + $html = 'Foo bar Foo'; + $this->assertRegExp( + '/Foo <span.*>bar<\/span> Foo/', + html_hilight($html,'bar') + ); + } + + function testHighlightTwoWords() { + $html = 'Foo bar Foo php Foo'; + $this->assertRegExp( + '/Foo <span.*>bar<\/span> Foo <span.*>php<\/span> Foo/', + html_hilight($html,array('bar','php')) + ); + } + + function testHighlightTwoWordsHtml() { + $html = 'Foo <b>bar</b> <i>Foo</i> php Foo'; + $this->assertRegExp( + '/Foo <b><span.*>bar<\/span><\/b> <i>Foo<\/i> <span.*>php<\/span> Foo/', + html_hilight($html,array('bar','php')) + ); + } + + function testNoMatchHtml() { + $html = 'Foo <font>font</font> Bar'; + $this->assertRegExp( + '/Foo <font><span.*>font<\/span><\/font> Bar/', + html_hilight($html,'font') + ); + } + + function testWildcardRight() { + $html = 'foo bar foobar barfoo foobarfoo foo'; + $this->assertRegExp( + '/foo <span.*>bar<\/span> foobar <span.*>bar<\/span>foo foobarfoo foo/', + html_hilight($html,'bar*') + ); + } + + function testWildcardLeft() { + $html = 'foo bar foobar barfoo foobarfoo foo'; + $this->assertRegExp( + '/foo <span.*>bar<\/span> foo<span.*>bar<\/span> barfoo foobarfoo foo/', + html_hilight($html,'*bar') + ); + } + + function testWildcardBoth() { + $html = 'foo bar foobar barfoo foobarfoo foo'; + $this->assertRegExp( + '/foo <span.*>bar<\/span> foo<span.*>bar<\/span> <span.*>bar<\/span>foo foo<span.*>bar<\/span>foo foo/', + html_hilight($html,'*bar*') + ); + } + + function testNoHighlight() { + $html = 'Foo bar Foo'; + $this->assertRegExp( + '/Foo bar Foo/', + html_hilight($html,'php') + ); + } + + function testMatchAttribute() { + $html = 'Foo <b class="x">bar</b> Foo'; + $this->assertRegExp( + '/Foo <b class="x">bar<\/b> Foo/', + html_hilight($html,'class="x"') + ); + } + + function testMatchAttributeWord() { + $html = 'Foo <b class="x">bar</b> Foo'; + $this->assertEquals( + 'Foo <b class="x">bar</b> Foo', + html_hilight($html,'class="x">bar') + ); + } + + function testRegexInjection() { + $html = 'Foo bar Foo'; + $this->assertRegExp( + '/Foo bar Foo/', + html_hilight($html,'*') + ); + } + + function testRegexInjectionSlash() { + $html = 'Foo bar Foo'; + $this->assertRegExp( + '/Foo bar Foo/', + html_hilight($html,'x/') + ); + } +} diff --git a/_test/tests/inc/httpclient_http.test.php b/_test/tests/inc/httpclient_http.test.php new file mode 100644 index 0000000000000000000000000000000000000000..9cae3736a7d0380fae95d6ae9a86e862f2a5cff3 --- /dev/null +++ b/_test/tests/inc/httpclient_http.test.php @@ -0,0 +1,180 @@ +<?php + +class httpclient_http_test extends DokuWikiTest { + protected $server = 'http://httpbin.org'; + + /** + * @group internet + */ + function test_simpleget(){ + $http = new HTTPClient(); + $data = $http->get($this->server.'/get?foo=bar'); + $this->assertFalse($data === false, 'HTTP response'); + $resp = json_decode($data, true); + $this->assertTrue(is_array($resp), 'JSON response'); + $this->assertArrayHasKey('args',$resp); + $this->assertEquals(array('foo'=>'bar'), $resp['args']); + } + + /** + * @group internet + */ + function test_dget(){ + $http = new HTTPClient(); + $data = $http->dget($this->server.'/get',array('foo'=>'bar')); + $this->assertFalse($data === false, 'HTTP response'); + $resp = json_decode($data, true); + $this->assertTrue(is_array($resp), 'JSON response'); + $this->assertArrayHasKey('args',$resp); + $this->assertEquals(array('foo'=>'bar'), $resp['args']); + } + + /** + * @group internet + */ + function test_gzip(){ + $http = new HTTPClient(); + $data = $http->get($this->server.'/gzip'); + $this->assertFalse($data === false, 'HTTP response'); + $resp = json_decode($data, true); + $this->assertTrue(is_array($resp), 'JSON response'); + $this->assertArrayHasKey('gzipped',$resp); + $this->assertTrue($resp['gzipped']); + } + + /** + * @group internet + */ + function test_simplepost(){ + $http = new HTTPClient(); + $data = $http->post($this->server.'/post',array('foo'=>'bar')); + $this->assertFalse($data === false, 'HTTP response'); + $resp = json_decode($data, true); + $this->assertTrue(is_array($resp), 'JSON response'); + $this->assertArrayHasKey('form',$resp); + $this->assertEquals(array('foo'=>'bar'), $resp['form']); + } + + /** + * @group internet + */ + function test_redirect(){ + $http = new HTTPClient(); + $data = $http->get($this->server.'/redirect/3'); + $this->assertFalse($data === false, 'HTTP response'); + $resp = json_decode($data, true); + $this->assertTrue(is_array($resp), 'JSON response'); + $this->assertArrayHasKey('url',$resp); + $this->assertRegExp('/\/get$/', $resp['url']); + } + + /** + * @group internet + */ + function test_relredirect(){ + $http = new HTTPClient(); + $data = $http->get($this->server.'/relative-redirect/3'); + $this->assertFalse($data === false, 'HTTP response'); + $resp = json_decode($data, true); + $this->assertTrue(is_array($resp), 'JSON response'); + $this->assertArrayHasKey('url',$resp); + $this->assertRegExp('/\/get$/', $resp['url']); + } + + /** + * @group internet + */ + function test_redirectfail(){ + $http = new HTTPClient(); + $data = $http->get($this->server.'/redirect/5'); + $this->assertTrue($data === false, 'HTTP response'); + $this->assertEquals('Maximum number of redirects exceeded',$http->error); + } + + /** + * @group internet + */ + function test_cookies(){ + $http = new HTTPClient(); + $http->get($this->server.'/cookies/set/foo/bar'); + $this->assertEquals(array('foo' => 'bar'), $http->cookies); + $data = $http->get($this->server.'/cookies'); + $this->assertFalse($data === false, 'HTTP response'); + $resp = json_decode($data, true); + $this->assertTrue(is_array($resp), 'JSON response'); + $this->assertArrayHasKey('cookies',$resp); + $this->assertEquals(array('foo'=>'bar'), $resp['cookies']); + } + + /** + * @group internet + */ + function test_teapot(){ + $http = new HTTPClient(); + $data = $http->get($this->server.'/status/418'); + $this->assertTrue($data === false, 'HTTP response'); + $this->assertEquals(418,$http->status); + } + + /** + * @group internet + */ + function test_maxbody(){ + $http = new HTTPClient(); + $http->max_bodysize = 250; + $data = $http->get($this->server.'/stream/30'); + $this->assertTrue($data === false, 'HTTP response'); + } + + /** + * @group internet + */ + function test_basicauth(){ + $http = new HTTPClient(); + $http->user = 'user'; + $http->pass = 'pass'; + $data = $http->get($this->server.'/basic-auth/user/pass'); + $this->assertFalse($data === false, 'HTTP response'); + $resp = json_decode($data, true); + $this->assertTrue(is_array($resp), 'JSON response'); + $this->assertEquals(array('authenticated'=>true,'user'=>'user'), $resp); + } + + /** + * @group internet + */ + function test_basicauthfail(){ + $http = new HTTPClient(); + $http->user = 'user'; + $http->pass = 'invalid'; + $data = $http->get($this->server.'/basic-auth/user/pass'); + $this->assertTrue($data === false, 'HTTP response'); + $this->assertEquals(401,$http->status); + } + + /** + * @group internet + */ + function test_timeout(){ + $http = new HTTPClient(); + $http->timeout = 5; + $data = $http->get($this->server.'/delay/10'); + $this->assertTrue($data === false, 'HTTP response'); + $this->assertEquals(-100,$http->status); + } + + /** + * @group internet + */ + function test_headers(){ + $http = new HTTPClient(); + $data = $http->get($this->server.'/response-headers?baz=&foo=bar'); + $this->assertFalse($data === false, 'HTTP response'); + $resp = json_decode($data, true); + $this->assertTrue(is_array($resp), 'JSON response'); + $this->assertArrayHasKey('baz',$http->resp_headers); + $this->assertArrayHasKey('foo',$http->resp_headers); + $this->assertEquals('bar',$http->resp_headers['foo']); + } +} +//Setup VIM: ex: et ts=4 : diff --git a/_test/tests/inc/httpclient_https.test.php b/_test/tests/inc/httpclient_https.test.php new file mode 100644 index 0000000000000000000000000000000000000000..26a0f86db40b0c16b21bc9e2ea4f80446baef1cc --- /dev/null +++ b/_test/tests/inc/httpclient_https.test.php @@ -0,0 +1,15 @@ +<?php + +class httpclient_https_test extends httpclient_http_test { + protected $server = 'https://httpbin.org/'; + + public function setUp(){ + // skip tests when this PHP has no SSL support + $transports = stream_get_transports(); + if(!in_array('ssl',$transports)){ + $this->markTestSkipped('No SSL support available.'); + } + parent::setUp(); + } +} +//Setup VIM: ex: et ts=4 : diff --git a/_test/cases/inc/init_fullpath.test.php b/_test/tests/inc/init_fullpath.test.php similarity index 92% rename from _test/cases/inc/init_fullpath.test.php rename to _test/tests/inc/init_fullpath.test.php index aa63b0ce97fb1985611836bcc3b5874bc75fbda1..fabf03fa05849c370562c79309b54c02cce796d1 100644 --- a/_test/cases/inc/init_fullpath.test.php +++ b/_test/tests/inc/init_fullpath.test.php @@ -1,7 +1,6 @@ <?php -require_once DOKU_INC.'inc/init.php'; -class init_fullpath_test extends UnitTestCase { +class init_fullpath_test extends DokuWikiTest { function test_unix_paths(){ $base = $_SERVER['SCRIPT_FILENAME']; @@ -27,9 +26,8 @@ class init_fullpath_test extends UnitTestCase { foreach($tests as $from => $to){ $info = "Testing '$from' resulted in '".fullpath($from)."'"; - $this->signal('failinfo',$info); - $this->assertEqual(fullpath($from),$to); + $this->assertEquals(fullpath($from), $to, $info); } @@ -75,9 +73,8 @@ class init_fullpath_test extends UnitTestCase { foreach($tests as $from => $to){ $info = "Testing '$from' resulted in '".fullpath($from)."'"; - $this->signal('failinfo',$info); - $this->assertEqual(fullpath($from),$to); + $this->assertEquals(fullpath($from), $to, $info); } diff --git a/_test/cases/inc/init_getbaseurl.test.php b/_test/tests/inc/init_getbaseurl.test.php similarity index 92% rename from _test/cases/inc/init_getbaseurl.test.php rename to _test/tests/inc/init_getbaseurl.test.php index a22172febe627b75535b8e8bbf8451d4a09277c6..af5a8b31858cc985dcfd0352212feae5a4eb73ff 100644 --- a/_test/cases/inc/init_getbaseurl.test.php +++ b/_test/tests/inc/init_getbaseurl.test.php @@ -1,8 +1,6 @@ <?php -require_once DOKU_INC.'inc/init.php'; - -class init_getBaseURL_test extends UnitTestCase { +class init_getBaseURL_test extends DokuWikiTest { /** * Apache, mod_php, subdirectory @@ -24,7 +22,7 @@ class init_getBaseURL_test extends UnitTestCase { $_SERVER['PATH_TRANSLATED'] = '/var/www/dokuwiki/doku.php'; $_SERVER['PHP_SELF'] = '/dokuwiki/doku.php'; - $this->assertEqual(getBaseURL(),'/dokuwiki/'); + $this->assertEquals(getBaseURL(),'/dokuwiki/'); } /** @@ -47,7 +45,7 @@ class init_getBaseURL_test extends UnitTestCase { $_SERVER['PATH_TRANSLATED'] = '/home/bengen/public_html/dokuwiki/doku.php'; $_SERVER['PHP_SELF'] = '/~bengen/dokuwiki/doku.php'; - $this->assertEqual(getBaseURL(),'/~bengen/dokuwiki/'); + $this->assertEquals(getBaseURL(),'/~bengen/dokuwiki/'); } /** @@ -70,7 +68,7 @@ class init_getBaseURL_test extends UnitTestCase { $_SERVER['PATH_TRANSLATED'] = '/home/bengen/public_html/dokuwiki/doku.php'; $_SERVER['PHP_SELF'] = '/~bengen/dokuwiki/doku.php'; - $this->assertEqual(getBaseURL(),'/~bengen/dokuwiki/'); + $this->assertEquals(getBaseURL(),'/~bengen/dokuwiki/'); } /** @@ -93,7 +91,7 @@ class init_getBaseURL_test extends UnitTestCase { $_SERVER['PATH_TRANSLATED'] = '/home/bengen/public_html/dokuwiki/doku.php'; $_SERVER['PHP_SELF'] = '/~bengen/dokuwiki/doku.php'; - $this->assertEqual(getBaseURL(),'/~bengen/dokuwiki/'); + $this->assertEquals(getBaseURL(),'/~bengen/dokuwiki/'); } /** @@ -116,7 +114,7 @@ class init_getBaseURL_test extends UnitTestCase { $_SERVER['PATH_TRANSLATED'] = 'C:\\Inetpub\\wwwroot\\wiki\\doku.php'; $_SERVER['PHP_SELF'] = '/wiki/doku.php'; - $this->assertEqual(getBaseURL(),'/wiki/'); + $this->assertEquals(getBaseURL(),'/wiki/'); } /** @@ -139,7 +137,7 @@ class init_getBaseURL_test extends UnitTestCase { $_SERVER['PATH_TRANSLATED'] = null; $_SERVER['PHP_SELF'] = '/wiki/syntax'; - $this->assertEqual(getBaseURL(),'/'); + $this->assertEquals(getBaseURL(),'/'); } /** @@ -162,7 +160,7 @@ class init_getBaseURL_test extends UnitTestCase { $_SERVER['PATH_TRANSLATED'] = null; $_SERVER['PHP_SELF'] = ''; - $this->assertEqual(getBaseURL(),'/dokuwiki/'); + $this->assertEquals(getBaseURL(),'/dokuwiki/'); } /** @@ -185,7 +183,7 @@ class init_getBaseURL_test extends UnitTestCase { $_SERVER['PATH_TRANSLATED'] = '/var/www/wiki/syntax'; $_SERVER['PHP_SELF'] = '/dokuwiki/doku.php/wiki/syntax'; - $this->assertEqual(getBaseURL(),'/dokuwiki/'); + $this->assertEquals(getBaseURL(),'/dokuwiki/'); } /** @@ -208,7 +206,7 @@ class init_getBaseURL_test extends UnitTestCase { $_SERVER['PATH_TRANSLATED'] = '/var/www/dokuwiki/doku.php'; $_SERVER['PHP_SELF'] = '/dokuwiki/doku.php'; - $this->assertEqual(getBaseURL(),'/dokuwiki/'); + $this->assertEquals(getBaseURL(),'/dokuwiki/'); } /** @@ -240,7 +238,7 @@ class init_getBaseURL_test extends UnitTestCase { foreach ($tests as $test => $correct_result) { $conf['baseurl'] = $test; - $this->assertEqual(getBaseURL(true),$correct_result); + $this->assertEquals(getBaseURL(true),$correct_result); } } /** @@ -272,7 +270,7 @@ class init_getBaseURL_test extends UnitTestCase { foreach ($tests as $test => $correct_result) { $conf['baseurl'] = $test; - $this->assertEqual(getBaseURL(true),$correct_result); + $this->assertEquals(getBaseURL(true),$correct_result); } } @@ -298,7 +296,7 @@ class init_getBaseURL_test extends UnitTestCase { $_SERVER['PHP_SELF'] = '/~michitux/dokuwiki/doku.php'; $_SERVER['SERVER_PORT'] = '80'; $_SERVER['SERVER_NAME'] = '[fd00'; - $this->assertEqual(getBaseURL(true), 'http://[fd00::6592:39ed:a2ed:2c78]/~michitux/dokuwiki/'); + $this->assertEquals(getBaseURL(true), 'http://[fd00::6592:39ed:a2ed:2c78]/~michitux/dokuwiki/'); } } diff --git a/_test/tests/inc/input.test.php b/_test/tests/inc/input.test.php new file mode 100644 index 0000000000000000000000000000000000000000..761b7ddbc1dea06a8b8af63f619347717e576508 --- /dev/null +++ b/_test/tests/inc/input.test.php @@ -0,0 +1,216 @@ +<?php + +/** + * Tests for the Input class + */ +class input_test extends DokuWikiTest { + + private $data = array( + 'array' => array('foo', 'bar'), + 'string' => 'foo', + 'int' => '17', + 'zero' => '0', + 'one' => '1', + 'empty' => '', + 'emptya' => array() + ); + + public function test_str() { + $_REQUEST = $this->data; + $_POST = $this->data; + $_GET = $this->data; + $_GET['get'] = 1; + $_POST['post'] = 1; + $INPUT = new Input(); + + $this->assertSame('foo', $INPUT->str('string')); + $this->assertSame('', $INPUT->str('none')); + $this->assertSame('', $INPUT->str('empty')); + $this->assertSame('foo', $INPUT->str('none', 'foo')); + $this->assertSame('', $INPUT->str('empty', 'foo')); + $this->assertSame('foo', $INPUT->str('empty', 'foo', true)); + + $this->assertSame(false, $INPUT->str('get', false)); + $this->assertSame(false, $INPUT->str('post', false)); + + $this->assertSame('foo', $INPUT->post->str('string')); + $this->assertSame('', $INPUT->post->str('none')); + $this->assertSame('', $INPUT->post->str('empty')); + $this->assertSame('foo', $INPUT->post->str('none', 'foo')); + $this->assertSame('', $INPUT->post->str('empty', 'foo')); + $this->assertSame('foo', $INPUT->post->str('empty', 'foo', true)); + + $this->assertSame(false, $INPUT->post->str('get', false)); + $this->assertSame('1', $INPUT->post->str('post', false)); + + $this->assertSame('foo', $INPUT->get->str('string')); + $this->assertSame('', $INPUT->get->str('none')); + $this->assertSame('', $INPUT->get->str('empty')); + $this->assertSame('foo', $INPUT->get->str('none', 'foo')); + $this->assertSame('', $INPUT->get->str('empty', 'foo')); + $this->assertSame('foo', $INPUT->get->str('empty', 'foo', true)); + + $this->assertSame(false, $INPUT->get->str('post', false)); + $this->assertSame('1', $INPUT->get->str('get', false)); + + $this->assertSame('', $INPUT->str('array')); + } + + public function test_int() { + $_REQUEST = $this->data; + $_POST = $this->data; + $_GET = $this->data; + $_GET['get'] = 1; + $_POST['post'] = 1; + $INPUT = new Input(); + + $this->assertSame(17, $INPUT->int('int')); + $this->assertSame(0, $INPUT->int('none')); + $this->assertSame(0, $INPUT->int('empty')); + $this->assertSame(42, $INPUT->int('none', 42)); + $this->assertSame(0, $INPUT->int('zero', 42)); + $this->assertSame(42, $INPUT->int('zero', 42, true)); + + $this->assertSame(false, $INPUT->int('get', false)); + $this->assertSame(false, $INPUT->int('post', false)); + + $this->assertSame(17, $INPUT->post->int('int')); + $this->assertSame(0, $INPUT->post->int('none')); + $this->assertSame(0, $INPUT->post->int('empty')); + $this->assertSame(42, $INPUT->post->int('none', 42)); + $this->assertSame(0, $INPUT->post->int('zero', 42)); + $this->assertSame(42, $INPUT->post->int('zero', 42, true)); + + $this->assertSame(false, $INPUT->post->int('get', false)); + $this->assertSame(1, $INPUT->post->int('post', false)); + + $this->assertSame(17, $INPUT->post->int('int')); + $this->assertSame(0, $INPUT->post->int('none')); + $this->assertSame(0, $INPUT->post->int('empty')); + $this->assertSame(42, $INPUT->post->int('none', 42)); + $this->assertSame(0, $INPUT->post->int('zero', 42)); + $this->assertSame(42, $INPUT->post->int('zero', 42, true)); + + $this->assertSame(false, $INPUT->get->int('post', false)); + $this->assertSame(1, $INPUT->get->int('get', false)); + + $this->assertSame(0, $INPUT->int('array')); + + $this->assertSame(0, $INPUT->int('zero', -1)); + $this->assertSame(-1, $INPUT->int('empty', -1)); + $this->assertSame(-1, $INPUT->int('zero', -1, true)); + $this->assertSame(-1, $INPUT->int('empty', -1, true)); + } + + public function test_arr() { + $_REQUEST = $this->data; + $_POST = $this->data; + $_GET = $this->data; + $_GET['get'] = array(1, 2); + $_POST['post'] = array(1, 2); + $INPUT = new Input(); + + $this->assertSame(array('foo', 'bar'), $INPUT->arr('array')); + $this->assertSame(array(), $INPUT->arr('none')); + $this->assertSame(array(), $INPUT->arr('empty')); + $this->assertSame(array(1, 2), $INPUT->arr('none', array(1, 2))); + $this->assertSame(array(), $INPUT->arr('emptya', array(1, 2))); + $this->assertSame(array(1, 2), $INPUT->arr('emptya', array(1, 2), true)); + + $this->assertSame(false, $INPUT->arr('get', false)); + $this->assertSame(false, $INPUT->arr('post', false)); + + $this->assertSame(array('foo', 'bar'), $INPUT->post->arr('array')); + $this->assertSame(array(), $INPUT->post->arr('none')); + $this->assertSame(array(), $INPUT->post->arr('empty')); + $this->assertSame(array(1, 2), $INPUT->post->arr('none', array(1, 2))); + $this->assertSame(array(), $INPUT->post->arr('emptya', array(1, 2))); + $this->assertSame(array(1, 2), $INPUT->post->arr('emptya', array(1, 2), true)); + + $this->assertSame(false, $INPUT->post->arr('get', false)); + $this->assertSame(array(1, 2), $INPUT->post->arr('post', false)); + + $this->assertSame(array('foo', 'bar'), $INPUT->get->arr('array')); + $this->assertSame(array(), $INPUT->get->arr('none')); + $this->assertSame(array(), $INPUT->get->arr('empty')); + $this->assertSame(array(1, 2), $INPUT->get->arr('none', array(1, 2))); + $this->assertSame(array(), $INPUT->get->arr('emptya', array(1, 2))); + $this->assertSame(array(1, 2), $INPUT->get->arr('emptya', array(1, 2), true)); + + $this->assertSame(array(1, 2), $INPUT->get->arr('get', false)); + $this->assertSame(false, $INPUT->get->arr('post', false)); + } + + public function test_bool() { + $_REQUEST = $this->data; + $_POST = $this->data; + $_GET = $this->data; + $_GET['get'] = '1'; + $_POST['post'] = '1'; + $INPUT = new Input(); + + $this->assertSame(true, $INPUT->bool('one')); + $this->assertSame(false, $INPUT->bool('zero')); + + $this->assertSame(false, $INPUT->bool('get')); + $this->assertSame(false, $INPUT->bool('post')); + + $this->assertSame(true, $INPUT->post->bool('one')); + $this->assertSame(false, $INPUT->post->bool('zero')); + + $this->assertSame(false, $INPUT->post->bool('get')); + $this->assertSame(true, $INPUT->post->bool('post')); + + $this->assertSame(false, $INPUT->bool('zero', -1)); + $this->assertSame(-1, $INPUT->bool('empty', -1)); + $this->assertSame(-1, $INPUT->bool('zero', -1, true)); + $this->assertSame(-1, $INPUT->bool('empty', -1, true)); + } + + public function test_remove() { + $_REQUEST = $this->data; + $_POST = $this->data; + $_GET = $this->data; + $INPUT = new Input(); + + $INPUT->remove('string'); + $this->assertNull($_REQUEST['string']); + $this->assertNull($_POST['string']); + $this->assertNull($_GET['string']); + + $INPUT->post->remove('int'); + $this->assertNull($_POST['int']); + $this->assertEquals(17, $_GET['int']); + $this->assertEquals(17, $_REQUEST['int']); + } + + public function test_set(){ + $_REQUEST = $this->data; + $_POST = $this->data; + $_GET = $this->data; + $INPUT = new Input(); + + $INPUT->set('test','foo'); + $this->assertEquals('foo',$_REQUEST['test']); + $this->assertNull($_POST['test']); + $this->assertNull($_GET['test']); + + $INPUT->get->set('test2','foo'); + $this->assertEquals('foo',$_GET['test2']); + $this->assertEquals('foo',$_REQUEST['test2']); + $this->assertNull($_POST['test']); + } + + public function test_ref(){ + $_REQUEST = $this->data; + $_POST = $this->data; + $_GET = $this->data; + $INPUT = new Input(); + + $test = &$INPUT->ref('string'); + $this->assertEquals('foo',$test); + $_REQUEST['string'] = 'bla'; + $this->assertEquals('bla',$test); + } + +} diff --git a/_test/cases/inc/IXR_Library_date.test.php b/_test/tests/inc/ixr_library_date.test.php similarity index 89% rename from _test/cases/inc/IXR_Library_date.test.php rename to _test/tests/inc/ixr_library_date.test.php index 28fa86486d27ea229d3b3e03d5fddba0c97cec03..f384869258abf341aee97fb885b7222409c7ce21 100644 --- a/_test/cases/inc/IXR_Library_date.test.php +++ b/_test/tests/inc/ixr_library_date.test.php @@ -1,7 +1,8 @@ <?php + require_once DOKU_INC.'inc/IXR_Library.php'; -class ixr_library_date_test extends UnitTestCase { +class ixr_library_date_test extends DokuWikiTest { function test_parseIso(){ @@ -26,7 +27,7 @@ class ixr_library_date_test extends UnitTestCase { foreach($tests as $test){ $dt = new IXR_Date($test[0]); - $this->assertEqual($dt->getTimeStamp(),$test[1]); + $this->assertEquals($dt->getTimeStamp(),$test[1]); } } diff --git a/_test/cases/inc/IXR_Library_IXR_Message.test.php b/_test/tests/inc/ixr_library_ixr_message.test.php similarity index 69% rename from _test/cases/inc/IXR_Library_IXR_Message.test.php rename to _test/tests/inc/ixr_library_ixr_message.test.php index bc9be572d79d23cf7d157d325c79141b35f1af11..b8afd607ee786b10c276f445d66edb7d1a72bb88 100644 --- a/_test/cases/inc/IXR_Library_IXR_Message.test.php +++ b/_test/tests/inc/ixr_library_ixr_message.test.php @@ -1,11 +1,6 @@ <?php -require_once DOKU_INC.'inc/IXR_Library.php'; - -class ixr_library_ixr_message_test extends UnitTestCase { - - - +class ixr_library_ixr_message_test extends DokuWikiTest { function test_untypedvalue1(){ $xml = '<?xml version="1.0" encoding="UTF-8"?><methodCall><methodName>wiki.getBackLinks</methodName><params><param><value> change </value></param></params></methodCall>'; @@ -13,9 +8,9 @@ class ixr_library_ixr_message_test extends UnitTestCase { $ixrmsg = new IXR_Message($xml); $ixrmsg->parse(); - $this->assertEqual($ixrmsg->messageType,'methodCall'); - $this->assertEqual($ixrmsg->methodName,'wiki.getBackLinks'); - $this->assertEqual($ixrmsg->params,array(' change ')); + $this->assertEquals($ixrmsg->messageType,'methodCall'); + $this->assertEquals($ixrmsg->methodName,'wiki.getBackLinks'); + $this->assertEquals($ixrmsg->params,array(' change ')); } function test_untypedvalue2(){ @@ -32,9 +27,9 @@ class ixr_library_ixr_message_test extends UnitTestCase { $ixrmsg = new IXR_Message($xml); $ixrmsg->parse(); - $this->assertEqual($ixrmsg->messageType,'methodCall'); - $this->assertEqual($ixrmsg->methodName,'wiki.getBackLinks'); - $this->assertEqual($ixrmsg->params,array(' change ')); + $this->assertEquals($ixrmsg->messageType,'methodCall'); + $this->assertEquals($ixrmsg->methodName,'wiki.getBackLinks'); + $this->assertEquals($ixrmsg->params,array(' change ')); } function test_stringvalue1(){ @@ -43,9 +38,9 @@ class ixr_library_ixr_message_test extends UnitTestCase { $ixrmsg = new IXR_Message($xml); $ixrmsg->parse(); - $this->assertEqual($ixrmsg->messageType,'methodCall'); - $this->assertEqual($ixrmsg->methodName,'wiki.getBackLinks'); - $this->assertEqual($ixrmsg->params,array(' change ')); + $this->assertEquals($ixrmsg->messageType,'methodCall'); + $this->assertEquals($ixrmsg->methodName,'wiki.getBackLinks'); + $this->assertEquals($ixrmsg->params,array(' change ')); } function test_stringvalue2(){ @@ -64,9 +59,9 @@ class ixr_library_ixr_message_test extends UnitTestCase { $ixrmsg = new IXR_Message($xml); $ixrmsg->parse(); - $this->assertEqual($ixrmsg->messageType,'methodCall'); - $this->assertEqual($ixrmsg->methodName,'wiki.getBackLinks'); - $this->assertEqual($ixrmsg->params,array(' change ')); + $this->assertEquals($ixrmsg->messageType,'methodCall'); + $this->assertEquals($ixrmsg->methodName,'wiki.getBackLinks'); + $this->assertEquals($ixrmsg->params,array(' change ')); } function test_emptyvalue1(){ @@ -75,9 +70,9 @@ class ixr_library_ixr_message_test extends UnitTestCase { $ixrmsg = new IXR_Message($xml); $ixrmsg->parse(); - $this->assertEqual($ixrmsg->messageType,'methodCall'); - $this->assertEqual($ixrmsg->methodName,'wiki.getBackLinks'); - $this->assertEqual($ixrmsg->params,array('')); + $this->assertEquals($ixrmsg->messageType,'methodCall'); + $this->assertEquals($ixrmsg->methodName,'wiki.getBackLinks'); + $this->assertEquals($ixrmsg->params,array('')); } function test_emptyvalue2(){ @@ -96,9 +91,9 @@ class ixr_library_ixr_message_test extends UnitTestCase { $ixrmsg = new IXR_Message($xml); $ixrmsg->parse(); - $this->assertEqual($ixrmsg->messageType,'methodCall'); - $this->assertEqual($ixrmsg->methodName,'wiki.getBackLinks'); - $this->assertEqual($ixrmsg->params,array('')); + $this->assertEquals($ixrmsg->messageType,'methodCall'); + $this->assertEquals($ixrmsg->methodName,'wiki.getBackLinks'); + $this->assertEquals($ixrmsg->params,array('')); } function test_struct(){ @@ -130,9 +125,9 @@ class ixr_library_ixr_message_test extends UnitTestCase { $ixrmsg = new IXR_Message($xml); $ixrmsg->parse(); - $this->assertEqual($ixrmsg->messageType,'methodCall'); - $this->assertEqual($ixrmsg->methodName,'wiki.putPage'); - $this->assertEqual($ixrmsg->params,array('start','test text',array('sum'=>'xmlrpc edit','minor'=>'1'))); + $this->assertEquals($ixrmsg->messageType,'methodCall'); + $this->assertEquals($ixrmsg->methodName,'wiki.putPage'); + $this->assertEquals($ixrmsg->params,array('start','test text',array('sum'=>'xmlrpc edit','minor'=>'1'))); } } diff --git a/_test/tests/inc/json.test.php b/_test/tests/inc/json.test.php new file mode 100644 index 0000000000000000000000000000000000000000..ca939d8857658de1b955d5b8575a40a1114d6f52 --- /dev/null +++ b/_test/tests/inc/json.test.php @@ -0,0 +1,418 @@ +<?php +/** + * Unit tests for JSON. + * + * @author Michal Migurski <mike-json@teczno.com> + * @author Matt Knapp <mdknapp[at]gmail[dot]com> + * @author Brett Stimmerman <brettstimmerman[at]gmail[dot]com> + * @copyright 2005 Michal Migurski + * @version CVS: $Id: Test-JSON.php,v 1.28 2006/06/28 05:54:17 migurski Exp $ + * @license http://www.opensource.org/licenses/bsd-license.php + * @link http://pear.php.net/pepr/pepr-proposal-show.php?id=198 + * @link http://mike.teczno.com/JSON/Test-JSON.phps + */ + +class JSON_EncDec_TestCase extends DokuWikiTest { + + function setUp() { + parent::setUp(); + + $this->json = new JSON(); + $this->json->skipnative = true; + + $obj = new stdClass(); + $obj->a_string = '"he":llo}:{world'; + $obj->an_array = array(1, 2, 3); + $obj->obj = new stdClass(); + $obj->obj->a_number = 123; + + $this->obj = $obj; + $this->obj_j = '{"a_string":"\"he\":llo}:{world","an_array":[1,2,3],"obj":{"a_number":123}}'; + $this->obj_d = 'object with properties, nested object and arrays'; + + $this->arr = array(null, true, array(1, 2, 3), "hello\"],[world!"); + $this->arr_j = '[null,true,[1,2,3],"hello\"],[world!"]'; + $this->arr_d = 'array with elements and nested arrays'; + + $this->str1 = 'hello world'; + $this->str1_j = '"hello world"'; + $this->str1_j_ = "'hello world'"; + $this->str1_d = 'hello world'; + $this->str1_d_ = 'hello world, double quotes'; + + $this->str2 = "hello\t\"world\""; + $this->str2_j = '"hello\\t\\"world\\""'; + $this->str2_d = 'hello world, with tab, double-quotes'; + + $this->str3 = "\\\r\n\t\"/"; + $this->str3_j = '"\\\\\\r\\n\\t\\"\\/"'; + $this->str3_d = 'backslash, return, newline, tab, double-quote'; + + $this->str4 = 'héllö wørÅ‚d'; + $this->str4_j = '"h\u00e9ll\u00f6 w\u00f8r\u0142d"'; + $this->str4_j_ = '"héllö wørÅ‚d"'; + $this->str4_d = 'hello world, with unicode'; + } + + function test_to_JSON() { + $this->assertEquals('null', $this->json->encode(null), 'type case: null'); + $this->assertEquals('true', $this->json->encode(true), 'type case: boolean true'); + $this->assertEquals('false', $this->json->encode(false), 'type case: boolean false'); + + $this->assertEquals('1', $this->json->encode(1), 'numeric case: 1'); + $this->assertEquals('-1', $this->json->encode(-1), 'numeric case: -1'); + $this->assertEquals('1.000000', $this->json->encode(1.0), 'numeric case: 1.0'); + $this->assertEquals('1.100000', $this->json->encode(1.1), 'numeric case: 1.1'); + + $this->assertEquals($this->str1_j, $this->json->encode($this->str1), "string case: {$this->str1_d}"); + $this->assertEquals($this->str2_j, $this->json->encode($this->str2), "string case: {$this->str2_d}"); + $this->assertEquals($this->str3_j, $this->json->encode($this->str3), "string case: {$this->str3_d}"); + $this->assertEquals($this->str4_j, $this->json->encode($this->str4), "string case: {$this->str4_d}"); + + $this->assertEquals($this->arr_j, $this->json->encode($this->arr), "array case: {$this->arr_d}"); + $this->assertEquals($this->obj_j, $this->json->encode($this->obj), "object case: {$this->obj_d}"); + } + + function test_from_JSON() { + $this->assertEquals(null, $this->json->decode('null'), 'type case: null'); + $this->assertEquals(true, $this->json->decode('true'), 'type case: boolean true'); + $this->assertEquals(false, $this->json->decode('false'), 'type case: boolean false'); + + $this->assertEquals(1, $this->json->decode('1'), 'numeric case: 1'); + $this->assertEquals(-1, $this->json->decode('-1'), 'numeric case: -1'); + $this->assertEquals(1.0, $this->json->decode('1.0'), 'numeric case: 1.0'); + $this->assertEquals(1.1, $this->json->decode('1.1'), 'numeric case: 1.1'); + + $this->assertEquals(11.0, $this->json->decode('1.1e1'), 'numeric case: 1.1e1'); + $this->assertEquals(11.0, $this->json->decode('1.10e+1'), 'numeric case: 1.10e+1'); + $this->assertEquals(0.11, $this->json->decode('1.1e-1'), 'numeric case: 1.1e-1'); + $this->assertEquals(-0.11, $this->json->decode('-1.1e-1'), 'numeric case: -1.1e-1'); + + $this->assertEquals($this->str1, $this->json->decode($this->str1_j), "string case: {$this->str1_d}"); + $this->assertEquals($this->str1, $this->json->decode($this->str1_j_), "string case: {$this->str1_d_}"); + $this->assertEquals($this->str2, $this->json->decode($this->str2_j), "string case: {$this->str2_d}"); + $this->assertEquals($this->str3, $this->json->decode($this->str3_j), "string case: {$this->str3_d}"); + $this->assertEquals($this->str4, $this->json->decode($this->str4_j), "string case: {$this->str4_d}"); + $this->assertEquals($this->str4, $this->json->decode($this->str4_j_), "string case: {$this->str4_d}"); + + $this->assertEquals($this->arr, $this->json->decode($this->arr_j), "array case: {$this->arr_d}"); + $this->assertEquals($this->obj, $this->json->decode($this->obj_j), "object case: {$this->obj_d}"); + } + + function test_to_then_from_JSON() { + $this->assertEquals(null, $this->json->decode($this->json->encode(null)), 'type case: null'); + $this->assertEquals(true, $this->json->decode($this->json->encode(true)), 'type case: boolean true'); + $this->assertEquals(false, $this->json->decode($this->json->encode(false)), 'type case: boolean false'); + + $this->assertEquals(1, $this->json->decode($this->json->encode(1)), 'numeric case: 1'); + $this->assertEquals(-1, $this->json->decode($this->json->encode(-1)), 'numeric case: -1'); + $this->assertEquals(1.0, $this->json->decode($this->json->encode(1.0)), 'numeric case: 1.0'); + $this->assertEquals(1.1, $this->json->decode($this->json->encode(1.1)), 'numeric case: 1.1'); + + $this->assertEquals($this->str1, $this->json->decode($this->json->encode($this->str1)), "string case: {$this->str1_d}"); + $this->assertEquals($this->str2, $this->json->decode($this->json->encode($this->str2)), "string case: {$this->str2_d}"); + $this->assertEquals($this->str3, $this->json->decode($this->json->encode($this->str3)), "string case: {$this->str3_d}"); + $this->assertEquals($this->str4, $this->json->decode($this->json->encode($this->str4)), "string case: {$this->str4_d}"); + + $this->assertEquals($this->arr, $this->json->decode($this->json->encode($this->arr)), "array case: {$this->arr_d}"); + $this->assertEquals($this->obj, $this->json->decode($this->json->encode($this->obj)), "object case: {$this->obj_d}"); + } + + function test_from_then_to_JSON() { + $this->assertEquals('null', $this->json->encode($this->json->decode('null')), 'type case: null'); + $this->assertEquals('true', $this->json->encode($this->json->decode('true')), 'type case: boolean true'); + $this->assertEquals('false', $this->json->encode($this->json->decode('false')), 'type case: boolean false'); + + $this->assertEquals('1', $this->json->encode($this->json->decode('1')), 'numeric case: 1'); + $this->assertEquals('-1', $this->json->encode($this->json->decode('-1')), 'numeric case: -1'); + $this->assertEquals('1.0', $this->json->encode($this->json->decode('1.0')), 'numeric case: 1.0'); + $this->assertEquals('1.1', $this->json->encode($this->json->decode('1.1')), 'numeric case: 1.1'); + + $this->assertEquals($this->str1_j, $this->json->encode($this->json->decode($this->str1_j)), "string case: {$this->str1_d}"); + $this->assertEquals($this->str2_j, $this->json->encode($this->json->decode($this->str2_j)), "string case: {$this->str2_d}"); + $this->assertEquals($this->str3_j, $this->json->encode($this->json->decode($this->str3_j)), "string case: {$this->str3_d}"); + $this->assertEquals($this->str4_j, $this->json->encode($this->json->decode($this->str4_j)), "string case: {$this->str4_d}"); + $this->assertEquals($this->str4_j, $this->json->encode($this->json->decode($this->str4_j_)), "string case: {$this->str4_d}"); + + $this->assertEquals($this->arr_j, $this->json->encode($this->json->decode($this->arr_j)), "array case: {$this->arr_d}"); + $this->assertEquals($this->obj_j, $this->json->encode($this->json->decode($this->obj_j)), "object case: {$this->obj_d}"); + } +} + +class JSON_AssocArray_TestCase extends DokuWikiTest { + + function setUp() { + parent::setUp(); + + $this->json_l = new JSON(JSON_LOOSE_TYPE); + $this->json_l->skipnative = true; + $this->json_s = new JSON(); + $this->json_s->skipnative = true; + + $this->arr = array('car1'=> array('color'=> 'tan', 'model' => 'sedan'), + 'car2' => array('color' => 'red', 'model' => 'sports')); + $this->arr_jo = '{"car1":{"color":"tan","model":"sedan"},"car2":{"color":"red","model":"sports"}}'; + $this->arr_d = 'associative array with nested associative arrays'; + + $this->arn = array(0=> array(0=> 'tan\\', 'model\\' => 'sedan'), 1 => array(0 => 'red', 'model' => 'sports')); + $this->arn_ja = '[{"0":"tan\\\\","model\\\\":"sedan"},{"0":"red","model":"sports"}]'; + $this->arn_d = 'associative array with nested associative arrays, and some numeric keys thrown in'; + + $this->arrs = array (1 => 'one', 2 => 'two', 5 => 'five'); + $this->arrs_jo = '{"1":"one","2":"two","5":"five"}'; + $this->arrs_d = 'associative array numeric keys which are not fully populated in a range of 0 to length-1'; + } + + function test_type() { + $this->assertEquals('array', gettype($this->json_l->decode($this->arn_ja)), "loose type should be array"); + $this->assertEquals('array', gettype($this->json_s->decode($this->arn_ja)), "strict type should be array"); + } + + function test_to_JSON() { + // both strict and loose JSON should result in an object + $this->assertEquals($this->arr_jo, $this->json_l->encode($this->arr), "array case - loose: {$this->arr_d}"); + $this->assertEquals($this->arr_jo, $this->json_s->encode($this->arr), "array case - strict: {$this->arr_d}"); + + // ...unless the input array has some numeric indeces, in which case the behavior is to degrade to a regular array + $this->assertEquals($this->arn_ja, $this->json_s->encode($this->arn), "array case - strict: {$this->arn_d}"); + + // Test a sparsely populated numerically indexed associative array + $this->assertEquals($this->arrs_jo, $this->json_l->encode($this->arrs), "sparse numeric assoc array: {$this->arrs_d}"); + } + + function test_to_then_from_JSON() { + // these tests motivated by a bug in which strings that end + // with backslashes followed by quotes were incorrectly decoded. + + foreach(array('\\"', '\\\\"', '\\"\\"', '\\""\\""', '\\\\"\\\\"') as $v) { + $this->assertEquals(array($v), $this->json_l->decode($this->json_l->encode(array($v)))); + $this->assertEquals(array('a' => $v), $this->json_l->decode($this->json_l->encode(array('a' => $v)))); + } + } +} + +class JSON_NestedArray_TestCase extends DokuWikiTest { + + function setUp() { + parent::setUp(); + + $this->json = new JSON(JSON_LOOSE_TYPE); + $this->json->skipnative = true; + + $this->str1 = '[{"this":"that"}]'; + $this->arr1 = array(array('this' => 'that')); + + $this->str2 = '{"this":["that"]}'; + $this->arr2 = array('this' => array('that')); + + $this->str3 = '{"params":[{"foo":["1"],"bar":"1"}]}'; + $this->arr3 = array('params' => array(array('foo' => array('1'), 'bar' => '1'))); + + $this->str4 = '{"0": {"foo": "bar", "baz": "winkle"}}'; + $this->arr4 = array('0' => array('foo' => 'bar', 'baz' => 'winkle')); + + $this->str5 = '{"params":[{"options": {"old": [ ], "new": {"0": {"elements": {"old": [], "new": {"0": {"elementName": "aa", "isDefault": false, "elementRank": "0", "priceAdjust": "0", "partNumber": ""}}}, "optionName": "aa", "isRequired": false, "optionDesc": null}}}}]}'; + $this->arr5 = array ( + 'params' => array ( + 0 => array ( + 'options' => + array ( + 'old' => array(), + 'new' => array ( + 0 => array ( + 'elements' => array ( + 'old' => array(), + 'new' => array ( + 0 => array ( + 'elementName' => 'aa', + 'isDefault' => false, + 'elementRank' => '0', + 'priceAdjust' => '0', + 'partNumber' => '', + ), + ), + ), + 'optionName' => 'aa', + 'isRequired' => false, + 'optionDesc' => NULL, + ), + ), + ), + ), + ), + ); + } + + function test_type() { + $this->assertEquals('array', gettype($this->json->decode($this->str1)), "loose type should be array"); + $this->assertEquals('array', gettype($this->json->decode($this->str2)), "loose type should be array"); + $this->assertEquals('array', gettype($this->json->decode($this->str3)), "loose type should be array"); + } + + function test_from_JSON() { + $this->assertEquals($this->arr1, $this->json->decode($this->str1), "simple compactly-nested array"); + $this->assertEquals($this->arr2, $this->json->decode($this->str2), "simple compactly-nested array"); + $this->assertEquals($this->arr3, $this->json->decode($this->str3), "complex compactly nested array"); + $this->assertEquals($this->arr4, $this->json->decode($this->str4), "complex compactly nested array"); + $this->assertEquals($this->arr5, $this->json->decode($this->str5), "super complex compactly nested array"); + } + + function _test_from_JSON() { + $super = '{"params":[{"options": {"old": {}, "new": {"0": {"elements": {"old": {}, "new": {"0": {"elementName": "aa", "isDefault": false, "elementRank": "0", "priceAdjust": "0", "partNumber": ""}}}, "optionName": "aa", "isRequired": false, "optionDesc": ""}}}}]}'; + print("trying {$super}...\n"); + print var_export($this->json->decode($super)); + } +} + +class JSON_Object_TestCase extends DokuWikiTest { + + function setUp() { + parent::setUp(); + + $this->json_l = new JSON(JSON_LOOSE_TYPE); + $this->json_l->skipnative = true; + $this->json_s = new JSON(); + $this->json_s->skipnative = true; + + $this->obj_j = '{"a_string":"\"he\":llo}:{world","an_array":[1,2,3],"obj":{"a_number":123}}'; + + $this->obj1 = new stdClass(); + $this->obj1->car1 = new stdClass(); + $this->obj1->car1->color = 'tan'; + $this->obj1->car1->model = 'sedan'; + $this->obj1->car2 = new stdClass(); + $this->obj1->car2->color = 'red'; + $this->obj1->car2->model = 'sports'; + $this->obj1_j = '{"car1":{"color":"tan","model":"sedan"},"car2":{"color":"red","model":"sports"}}'; + $this->obj1_d = 'Object with nested objects'; + } + + function test_type() { + $this->assertEquals('object', gettype($this->json_s->decode($this->obj_j)), "checking whether decoded type is object"); + $this->assertEquals('array', gettype($this->json_l->decode($this->obj_j)), "checking whether decoded type is array"); + } + + function test_to_JSON() { + $this->assertEquals($this->obj1_j, $this->json_s->encode($this->obj1), "object - strict: {$this->obj1_d}"); + $this->assertEquals($this->obj1_j, $this->json_l->encode($this->obj1), "object - loose: {$this->obj1_d}"); + } + + function test_from_then_to_JSON() { + $this->assertEquals($this->obj_j, $this->json_s->encode($this->json_s->decode($this->obj_j)), "object case"); + $this->assertEquals($this->obj_j, $this->json_l->encode($this->json_l->decode($this->obj_j)), "array case"); + } +} + +class JSON_Spaces_Comments_TestCase extends DokuWikiTest { + + function setUp() { + parent::setUp(); + + $this->json = new JSON(JSON_LOOSE_TYPE); + $this->json->skipnative = true; + + $this->obj_j = '{"a_string":"\"he\":llo}:{world","an_array":[1,2,3],"obj":{"a_number":123}}'; + + $this->obj_js = '{"a_string": "\"he\":llo}:{world", + "an_array":[1, 2, 3], + "obj": {"a_number":123}}'; + + $this->obj_jc1 = '{"a_string": "\"he\":llo}:{world", + // here is a comment, hoorah + "an_array":[1, 2, 3], + "obj": {"a_number":123}}'; + + $this->obj_jc2 = '/* this here is the sneetch */ "the sneetch" + // this has been the sneetch.'; + + $this->obj_jc3 = '{"a_string": "\"he\":llo}:{world", + /* here is a comment, hoorah */ + "an_array":[1, 2, 3 /* and here is another */], + "obj": {"a_number":123}}'; + + $this->obj_jc4 = '{\'a_string\': "\"he\":llo}:{world", + /* here is a comment, hoorah */ + \'an_array\':[1, 2, 3 /* and here is another */], + "obj": {"a_number":123}}'; + } + + function test_spaces() { + $this->assertEquals($this->json->decode($this->obj_j), $this->json->decode($this->obj_js), "checking whether notation with spaces works"); + } + + function test_comments() { + $this->assertEquals($this->json->decode($this->obj_j), $this->json->decode($this->obj_jc1), "checking whether notation with single line comments works"); + $this->assertEquals('the sneetch', $this->json->decode($this->obj_jc2), "checking whether notation with multiline comments works"); + $this->assertEquals($this->json->decode($this->obj_j), $this->json->decode($this->obj_jc3), "checking whether notation with multiline comments works"); + $this->assertEquals($this->json->decode($this->obj_j), $this->json->decode($this->obj_jc4), "checking whether notation with single-quotes and multiline comments works"); + } +} + +class JSON_Empties_TestCase extends DokuWikiTest { + + function setUp() { + parent::setUp(); + + $this->json_l = new JSON(JSON_LOOSE_TYPE); + $this->json_l->skipnative = true; + $this->json_l->skipnative = true; + $this->json_s = new JSON(); + $this->json_s->skipnative = true; + + $this->obj0_j = '{}'; + $this->arr0_j = '[]'; + + $this->obj1_j = '{ }'; + $this->arr1_j = '[ ]'; + + $this->obj2_j = '{ /* comment inside */ }'; + $this->arr2_j = '[ /* comment inside */ ]'; + } + + function test_type() { + $this->assertEquals('array', gettype($this->json_l->decode($this->arr0_j)), "should be array"); + $this->assertEquals('object', gettype($this->json_s->decode($this->obj0_j)), "should be object"); + + $this->assertEquals(0, count($this->json_l->decode($this->arr0_j)), "should be empty array"); + $this->assertEquals(0, count(get_object_vars($this->json_s->decode($this->obj0_j))), "should be empty object"); + + $this->assertEquals('array', gettype($this->json_l->decode($this->arr1_j)), "should be array, even with space"); + $this->assertEquals('object', gettype($this->json_s->decode($this->obj1_j)), "should be object, even with space"); + + $this->assertEquals(0, count($this->json_l->decode($this->arr1_j)), "should be empty array, even with space"); + $this->assertEquals(0, count(get_object_vars($this->json_s->decode($this->obj1_j))), "should be empty object, even with space"); + + $this->assertEquals('array', gettype($this->json_l->decode($this->arr2_j)), "should be array, despite comment"); + $this->assertEquals('object', gettype($this->json_s->decode($this->obj2_j)), "should be object, despite comment"); + + $this->assertEquals(0, count($this->json_l->decode($this->arr2_j)), "should be empty array, despite comment"); + $this->assertEquals(0, count(get_object_vars($this->json_s->decode($this->obj2_j))), "should be empty object, despite commentt"); + } +} + +class JSON_UnquotedKeys_TestCase extends DokuWikiTest { + + function setUp() { + parent::setUp(); + + $this->json = new JSON(JSON_LOOSE_TYPE); + $this->json->skipnative = true; + + $this->arn = array(0=> array(0=> 'tan', 'model' => 'sedan'), 1 => array(0 => 'red', 'model' => 'sports')); + $this->arn_ja = '[{0:"tan","model":"sedan"},{"0":"red",model:"sports"}]'; + $this->arn_d = 'associative array with unquoted keys, nested associative arrays, and some numeric keys thrown in'; + + $this->arrs = array (1 => 'one', 2 => 'two', 5 => 'fi"ve'); + $this->arrs_jo = '{"1":"one",2:"two","5":\'fi"ve\'}'; + $this->arrs_d = 'associative array with unquoted keys, single-quoted values, numeric keys which are not fully populated in a range of 0 to length-1'; + } + + function test_from_JSON() { + // ...unless the input array has some numeric indeces, in which case the behavior is to degrade to a regular array + $this->assertEquals($this->arn, $this->json->decode($this->arn_ja), "array case - strict: {$this->arn_d}"); + + // Test a sparsely populated numerically indexed associative array + $this->assertEquals($this->arrs, $this->json->decode($this->arrs_jo), "sparse numeric assoc array: {$this->arrs_d}"); + } +} + diff --git a/_test/cases/inc/mail_isvalid.test.php b/_test/tests/inc/mail_isvalid.test.php similarity index 94% rename from _test/cases/inc/mail_isvalid.test.php rename to _test/tests/inc/mail_isvalid.test.php index d8c88765e342c0babd24719baf4abee6f212b121..25e6b1f7bb087f32ba094e12ae936f884c511942 100644 --- a/_test/cases/inc/mail_isvalid.test.php +++ b/_test/tests/inc/mail_isvalid.test.php @@ -1,8 +1,6 @@ <?php -// use no mbstring help here -require_once DOKU_INC.'inc/mail.php'; -class mail_isvalid extends UnitTestCase { +class mail_isvalid extends DokuWikiTest { function test1(){ @@ -69,12 +67,11 @@ class mail_isvalid extends UnitTestCase { foreach($tests as $test){ $info = 'Testing '.$test[0]; - $this->signal('failinfo',$info); if($test[1]){ - $this->assertTrue((bool) mail_isvalid($test[0])); + $this->assertTrue((bool) mail_isvalid($test[0]), $info); }else{ - $this->assertFalse((bool) mail_isvalid($test[0])); + $this->assertFalse((bool) mail_isvalid($test[0]), $info); } } } diff --git a/_test/cases/inc/mail_quoted_printable_encode.php b/_test/tests/inc/mail_quoted_printable_encode.test.php similarity index 69% rename from _test/cases/inc/mail_quoted_printable_encode.php rename to _test/tests/inc/mail_quoted_printable_encode.test.php index a5a36e35b4e197bbd4181f4b9f6169a3058ad54b..52ddf622844d45ada0154f178c79317ef481f3c7 100644 --- a/_test/cases/inc/mail_quoted_printable_encode.php +++ b/_test/tests/inc/mail_quoted_printable_encode.test.php @@ -1,43 +1,41 @@ <?php -require_once DOKU_INC.'inc/mail.php'; - -class mail_quotedprintable_encode extends UnitTestCase { +class mail_quotedprintable_encode extends DokuWikiTest { function test_simple(){ $in = 'hello'; $out = 'hello'; - $this->assertEqual(mail_quotedprintable_encode($in),$out); + $this->assertEquals(mail_quotedprintable_encode($in),$out); } function test_spaceend(){ $in = "hello \nhello"; $out = "hello=20\nhello"; - $this->assertEqual(mail_quotedprintable_encode($in),$out); + $this->assertEquals(mail_quotedprintable_encode($in),$out); } function test_german_utf8(){ $in = 'hello überlänge'; $out = 'hello =C3=BCberl=C3=A4nge'; - $this->assertEqual(mail_quotedprintable_encode($in),$out); + $this->assertEquals(mail_quotedprintable_encode($in),$out); } function test_wrap(){ $in = '123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789'; $out = "123456789 123456789 123456789 123456789 123456789 123456789 123456789 1234=\n56789 123456789"; - $this->assertEqual(mail_quotedprintable_encode($in,74),$out); + $this->assertEquals(mail_quotedprintable_encode($in,74),$out); } function test_nowrap(){ $in = '123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789'; $out = '123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789'; - $this->assertEqual(mail_quotedprintable_encode($in,0),$out); + $this->assertEquals(mail_quotedprintable_encode($in,0),$out); } function test_russian_utf8(){ $in = 'Ваш пароль Ð´Ð»Ñ ÑиÑтемы Доку Вики'; $out = '=D0=92=D0=B0=D1=88 =D0=BF=D0=B0=D1=80=D0=BE=D0=BB=D1=8C =D0=B4=D0=BB=D1=8F =D1=81=D0=B8=D1=81=D1=82=D0=B5=D0=BC=D1=8B =D0=94=D0=BE=D0=BA=D1=83 =D0=92=D0=B8=D0=BA=D0=B8'; - $this->assertEqual(mail_quotedprintable_encode($in,0),$out); + $this->assertEquals(mail_quotedprintable_encode($in,0),$out); } } diff --git a/_test/tests/inc/mailer.test.php b/_test/tests/inc/mailer.test.php new file mode 100644 index 0000000000000000000000000000000000000000..b2c74a257d24c6667bc9a10be60ad7bb9abac30f --- /dev/null +++ b/_test/tests/inc/mailer.test.php @@ -0,0 +1,94 @@ +<?php + +/** + * Extends the mailer class to expose internal variables for testing + */ +class TestMailer extends Mailer { + public function prop($name){ + return $this->$name; + } +} + +class mailer_test extends DokuWikiTest { + + + function test_userheader(){ + $mail = new TestMailer(); + $headers = $mail->prop('headers'); + $this->assertArrayNotHasKey('X-Dokuwiki-User',$headers); + + $_SERVER['REMOTE_USER'] = 'andi'; + $mail = new TestMailer(); + $headers = $mail->prop('headers'); + $this->assertArrayHasKey('X-Dokuwiki-User',$headers); + } + + function test_setHeader(){ + $mail = new TestMailer(); + + // check existance of default headers + $headers = $mail->prop('headers'); + $this->assertArrayHasKey('X-Mailer',$headers); + $this->assertArrayHasKey('X-Dokuwiki-Title',$headers); + $this->assertArrayHasKey('X-Dokuwiki-Server',$headers); + $this->assertArrayHasKey('X-Auto-Response-Suppress',$headers); + $this->assertArrayHasKey('List-Id',$headers); + + // set a bunch of test headers + $mail->setHeader('test-header','bla'); + $mail->setHeader('to','A valid ASCII name <test@example.com>'); + $mail->setHeader('from',"Thös ne\needs\x00serious cleaning$§%."); + $mail->setHeader('bad',"Thös ne\needs\x00serious cleaning$§%.",false); + $mail->setHeader("weird\n*+\x00foo.-_@bar?",'now clean'); + + // are they set? + $headers = $mail->prop('headers'); + $this->assertArrayHasKey('Test-Header',$headers); + $this->assertEquals('bla',$headers['Test-Header']); + $this->assertArrayHasKey('To',$headers); + $this->assertEquals('A valid ASCII name <test@example.com>',$headers['To']); + $this->assertArrayHasKey('From',$headers); + $this->assertEquals('Ths neeedsserious cleaning.',$headers['From']); + $this->assertArrayHasKey('Bad',$headers); + $this->assertEquals("Thös ne\needs\x00serious cleaning$§%.",$headers['Bad']); + $this->assertArrayHasKey('Weird+foo.-_@bar',$headers); + + // unset a header again + $mail->setHeader('test-header',''); + $headers = $mail->prop('headers'); + $this->assertArrayNotHasKey('Test-Header',$headers); + } + + function test_simplemail(){ + global $conf; + $conf['htmlmail'] = 0; + $mail = new TestMailer(); + $mail->to('test@example.com'); + $mail->setBody('A test mail in ASCII'); + + $dump = $mail->dump(); + $this->assertNotRegexp('/Content-Type: multipart/',$dump); + $this->assertRegexp('#Content-Type: text/plain; charset=UTF-8#',$dump); + $this->assertRegexp('/'.base64_encode('A test mail in ASCII').'/',$dump); + + $conf['htmlmail'] = 1; + } + + function test_replacements(){ + $mail = new TestMailer(); + + $replacements = array( '@DATE@','@BROWSER@','@IPADDRESS@','@HOSTNAME@', + '@TITLE@','@DOKUWIKIURL@','@USER@','@NAME@','@MAIL@'); + $mail->setBody('A test mail in with replacements '.join(' ',$replacements)); + + $text = $mail->prop('text'); + $html = $mail->prop('html'); + + foreach($replacements as $repl){ + $this->assertNotRegexp("/$repl/",$text,"$repl replacement still in text"); + $this->assertNotRegexp("/$repl/",$html,"$repl replacement still in html"); + } + } + +} +//Setup VIM: ex: et ts=4 : diff --git a/_test/cases/inc/pageutils_clean_id.test.php b/_test/tests/inc/pageutils_clean_id.test.php similarity index 86% rename from _test/cases/inc/pageutils_clean_id.test.php rename to _test/tests/inc/pageutils_clean_id.test.php index 167229c7f8b68c12d394ef1cc8694dd41b8710c7..9c5781b248edd5cd13d7c4f7ddbec60c11269160 100644 --- a/_test/cases/inc/pageutils_clean_id.test.php +++ b/_test/tests/inc/pageutils_clean_id.test.php @@ -1,8 +1,6 @@ <?php -require_once DOKU_INC.'inc/utf8.php'; -require_once DOKU_INC.'inc/pageutils.php'; -class init_clean_id_test extends UnitTestCase { +class init_clean_id_test extends DokuWikiTest { function teardown() { global $cache_cleanid; @@ -50,7 +48,7 @@ class init_clean_id_test extends UnitTestCase { $tests[] = array('page/page',false,'page_page'); foreach($tests as $test){ - $this->assertEqual(cleanID($test[0],$test[1]),$test[2]); + $this->assertEquals(cleanID($test[0],$test[1]),$test[2]); } $conf['useslash'] = 1; @@ -60,7 +58,7 @@ class init_clean_id_test extends UnitTestCase { $this->teardown(); foreach($tests as $test){ - $this->assertEqual(cleanID($test[0],$test[1]),$test[2]); + $this->assertEquals(cleanID($test[0],$test[1]),$test[2]); } } @@ -77,7 +75,7 @@ class init_clean_id_test extends UnitTestCase { $tests[] = array('pa%ge',false,'pa-ge'); foreach($tests as $test){ - $this->assertEqual(cleanID($test[0],$test[1]),$test[2]); + $this->assertEquals(cleanID($test[0],$test[1]),$test[2]); } } @@ -97,7 +95,7 @@ class init_clean_id_test extends UnitTestCase { $tests[] = array('ښ侧化并곦à¦à´ˆÎ²',false,'ښ侧化并곦à¦à´ˆÎ²'); foreach($tests as $test){ - $this->assertEqual(cleanID($test[0],$test[1]),$test[2]); + $this->assertEquals(cleanID($test[0],$test[1]),$test[2]); } } @@ -117,7 +115,7 @@ class init_clean_id_test extends UnitTestCase { $tests[] = array('ښ侧化并곦à¦à´ˆÎ²',false,'ښ侧化并곦à¦à´ˆÎ²'); foreach($tests as $test){ - $this->assertEqual(cleanID($test[0],$test[1]),$test[2]); + $this->assertEquals(cleanID($test[0],$test[1]),$test[2]); } } @@ -137,19 +135,19 @@ class init_clean_id_test extends UnitTestCase { $tests[] = array('ښ侧化并곦à¦à´ˆÎ²',true,''); foreach($tests as $test){ - $this->assertEqual(cleanID($test[0],$test[1]),$test[2]); + $this->assertEquals(cleanID($test[0],$test[1]),$test[2]); } $conf['deaccent'] = 1; foreach($tests as $test){ - $this->assertEqual(cleanID($test[0],$test[1]),$test[2]); + $this->assertEquals(cleanID($test[0],$test[1]),$test[2]); } $conf['deaccent'] = 2; foreach($tests as $test){ - $this->assertEqual(cleanID($test[0],$test[1]),$test[2]); + $this->assertEquals(cleanID($test[0],$test[1]),$test[2]); } } diff --git a/_test/cases/inc/pageutils_getid.test.php b/_test/tests/inc/pageutils_getid.test.php similarity index 86% rename from _test/cases/inc/pageutils_getid.test.php rename to _test/tests/inc/pageutils_getid.test.php index 6eddeb5ea519266ec732a1477138d2c8465e85e2..0fcd58666a7ce0924534451f057cb046e8816529 100644 --- a/_test/cases/inc/pageutils_getid.test.php +++ b/_test/tests/inc/pageutils_getid.test.php @@ -1,12 +1,10 @@ <?php -require_once DOKU_INC.'inc/utf8.php'; -require_once DOKU_INC.'inc/pageutils.php'; -class init_getID_test extends UnitTestCase { +class init_getID_test extends DokuWikiTest { /** * fetch media files with basedir and urlrewrite=2 - * + * * data provided by Jan Decaluwe <jan@jandecaluwe.com> */ function test1(){ @@ -19,7 +17,7 @@ class init_getID_test extends UnitTestCase { $_SERVER['SCRIPT_FILENAME'] = '/lib/exe/fetch.php'; $_SERVER['REQUEST_URI'] = '/lib/exe/fetch.php/myhdl-0.5dev1.tar.gz?id=snapshots&cache=cache'; - $this->assertEqual(getID('media'), 'myhdl-0.5dev1.tar.gz'); + $this->assertEquals(getID('media'), 'myhdl-0.5dev1.tar.gz'); } @@ -41,8 +39,8 @@ class init_getID_test extends UnitTestCase { $_SERVER['PATH_INFO'] = '/wiki/discussion/button-dw.png'; $_SERVER['PATH_TRANSLATED'] = '/var/www/wiki/discussion/button-dw.png'; - $this->assertEqual(getID('media',true), 'wiki:discussion:button-dw.png'); - $this->assertEqual(getID('media',false), 'wiki/discussion/button-dw.png'); + $this->assertEquals(getID('media',true), 'wiki:discussion:button-dw.png'); + $this->assertEquals(getID('media',false), 'wiki/discussion/button-dw.png'); } /** @@ -61,7 +59,7 @@ class init_getID_test extends UnitTestCase { $_SERVER['PATH_TRANSLATED'] = '/var/www/wiki:dokuwiki'; $_SERVER['PHP_SELF'] = '/dokuwiki/doku.php/wiki:dokuwiki'; - $this->assertEqual(getID(), 'wiki:dokuwiki'); + $this->assertEquals(getID(), 'wiki:dokuwiki'); } /** @@ -72,6 +70,8 @@ class init_getID_test extends UnitTestCase { $conf['basedir'] = ''; $conf['userewrite'] = '2'; $conf['baseurl'] = ''; + $conf['useslash'] = '1'; + $_SERVER['DOCUMENT_ROOT'] = '/var/www/vhosts/example.com/htdocs'; $_SERVER['SCRIPT_FILENAME'] = '/var/www/vhosts/example.com/htdocs/doku.php'; $_SERVER['SCRIPT_NAME'] = '/doku.php'; @@ -80,7 +80,7 @@ class init_getID_test extends UnitTestCase { $_SERVER['PATH_TRANSLATED'] = '/var/www/vhosts/example.com/htdocs/doku.php'; $_SERVER['PHP_SELF'] = '/doku.php/wiki/dokuwiki'; - $this->assertEqual(getID(), 'wiki:dokuwiki'); + $this->assertEquals(getID(), 'wiki:dokuwiki'); } /** @@ -99,7 +99,7 @@ class init_getID_test extends UnitTestCase { $_SERVER['PATH_TRANSLATED'] = '/var/www/index.html'; $_SERVER['PHP_SELF'] = '/dokuwiki/doku.php/'; - $this->assertEqual(getID(), cleanID($conf['start'])); + $this->assertEquals(getID(), cleanID($conf['start'])); } } diff --git a/_test/cases/inc/pageutils_resolve_id.test.php b/_test/tests/inc/pageutils_resolve_id.test.php similarity index 86% rename from _test/cases/inc/pageutils_resolve_id.test.php rename to _test/tests/inc/pageutils_resolve_id.test.php index 9aa4ee8b7c9ef05501e6501ba9a9dc225fc00fa5..23a2405d492e5726ed62f8758883f0ede3ed93a3 100644 --- a/_test/cases/inc/pageutils_resolve_id.test.php +++ b/_test/tests/inc/pageutils_resolve_id.test.php @@ -1,8 +1,6 @@ <?php -require_once DOKU_INC.'inc/utf8.php'; -require_once DOKU_INC.'inc/pageutils.php'; -class init_resolve_id_test extends UnitTestCase { +class init_resolve_id_test extends DokuWikiTest { function test1(){ @@ -37,7 +35,7 @@ class init_resolve_id_test extends UnitTestCase { $tests[] = array('lev1:lev2','..:..:lev3:..:page:....:...','page'); foreach($tests as $test){ - $this->assertEqual(resolve_id($test[0],$test[1]),$test[2]); + $this->assertEquals(resolve_id($test[0],$test[1]),$test[2]); } } diff --git a/_test/cases/inc/pageutils_resolve_pageid.test.php b/_test/tests/inc/pageutils_resolve_pageid.test.php similarity index 84% rename from _test/cases/inc/pageutils_resolve_pageid.test.php rename to _test/tests/inc/pageutils_resolve_pageid.test.php index c65ed1866e7b639688d11753771c9c956dd73d5f..41a441658338c65201e6471f9768569f0a8bbe31 100644 --- a/_test/cases/inc/pageutils_resolve_pageid.test.php +++ b/_test/tests/inc/pageutils_resolve_pageid.test.php @@ -1,11 +1,6 @@ <?php -require_once DOKU_INC.'inc/utf8.php'; -require_once DOKU_INC.'inc/pageutils.php'; -global $conf; -if (!isset($conf['datadir'])) $conf['datadir'] = $conf['savedir'].'/pages'; - -class init_resolve_pageid_test extends UnitTestCase { +class init_resolve_pageid_test extends DokuWikiTest { function test1(){ @@ -48,7 +43,6 @@ class init_resolve_pageid_test extends UnitTestCase { $tests[] = array('foo','.:','foo:start'); $tests[] = array('','foo:','foo:start'); $tests[] = array('foo','foo:','foo:start'); - $tests[] = array('foo','playground:','playground:playground'); // empty $page global $ID; @@ -59,7 +53,7 @@ class init_resolve_pageid_test extends UnitTestCase { $page = $test[1]; resolve_pageid($test[0],$page,$foo); - $this->assertEqual($page,$test[2]); + $this->assertEquals($page,$test[2]); } } @@ -69,7 +63,6 @@ class init_resolve_pageid_test extends UnitTestCase { function test_resolve_pageid_empty_homepage() { global $ID; $ID = ''; - global $conf; $conf['start'] = 'someverystrangestartname'; @@ -78,7 +71,7 @@ class init_resolve_pageid_test extends UnitTestCase { $exist = true; resolve_pageid($ns, $page, $exist); - $this->assertEqual($page, $conf['start']); + $this->assertEquals($page, $conf['start']); } } diff --git a/_test/tests/inc/parser/lexer.test.php b/_test/tests/inc/parser/lexer.test.php new file mode 100644 index 0000000000000000000000000000000000000000..d0965a13e6c055539bcceb76a2722dd47cc664da --- /dev/null +++ b/_test/tests/inc/parser/lexer.test.php @@ -0,0 +1,531 @@ +<?php +/** +* @version $Id: lexer.todo.php,v 1.2 2005/03/25 21:00:22 harryf Exp $ +* @package Doku +* @subpackage Tests +*/ + +/** +* Includes +*/ +require_once DOKU_INC . 'inc/parser/lexer.php'; + +/** +* @package Doku +* @subpackage Tests +*/ +class TestOfLexerParallelRegex extends DokuWikiTest { + + function testNoPatterns() { + $regex = new Doku_LexerParallelRegex(false); + $this->assertFalse($regex->match("Hello", $match)); + $this->assertEquals($match, ""); + } + function testNoSubject() { + $regex = new Doku_LexerParallelRegex(false); + $regex->addPattern(".*"); + $this->assertTrue($regex->match("", $match)); + $this->assertEquals($match, ""); + } + function testMatchAll() { + $regex = new Doku_LexerParallelRegex(false); + $regex->addPattern(".*"); + $this->assertTrue($regex->match("Hello", $match)); + $this->assertEquals($match, "Hello"); + } + function testCaseSensitive() { + $regex = new Doku_LexerParallelRegex(true); + $regex->addPattern("abc"); + $this->assertTrue($regex->match("abcdef", $match)); + $this->assertEquals($match, "abc"); + $this->assertTrue($regex->match("AAABCabcdef", $match)); + $this->assertEquals($match, "abc"); + } + function testCaseInsensitive() { + $regex = new Doku_LexerParallelRegex(false); + $regex->addPattern("abc"); + $this->assertTrue($regex->match("abcdef", $match)); + $this->assertEquals($match, "abc"); + $this->assertTrue($regex->match("AAABCabcdef", $match)); + $this->assertEquals($match, "ABC"); + } + function testMatchMultiple() { + $regex = new Doku_LexerParallelRegex(true); + $regex->addPattern("abc"); + $regex->addPattern("ABC"); + $this->assertTrue($regex->match("abcdef", $match)); + $this->assertEquals($match, "abc"); + $this->assertTrue($regex->match("AAABCabcdef", $match)); + $this->assertEquals($match, "ABC"); + $this->assertFalse($regex->match("Hello", $match)); + } + function testPatternLabels() { + $regex = new Doku_LexerParallelRegex(false); + $regex->addPattern("abc", "letter"); + $regex->addPattern("123", "number"); + $this->assertEquals($regex->match("abcdef", $match), "letter"); + $this->assertEquals($match, "abc"); + $this->assertEquals($regex->match("0123456789", $match), "number"); + $this->assertEquals($match, "123"); + } + function testMatchMultipleWithLookaheadNot() { + $regex = new Doku_LexerParallelRegex(true); + $regex->addPattern("abc"); + $regex->addPattern("ABC"); + $regex->addPattern("a(?!\n).{1}"); + $this->assertTrue($regex->match("abcdef", $match)); + $this->assertEquals($match, "abc"); + $this->assertTrue($regex->match("AAABCabcdef", $match)); + $this->assertEquals($match, "ABC"); + $this->assertTrue($regex->match("a\nab", $match)); + $this->assertEquals($match, "ab"); + $this->assertFalse($regex->match("Hello", $match)); + } + function testMatchSetOptionCaseless() { + $regex = new Doku_LexerParallelRegex(true); + $regex->addPattern("a(?i)b(?i)c"); + $this->assertTrue($regex->match("aBc", $match)); + $this->assertEquals($match, "aBc"); + } + function testMatchSetOptionUngreedy() { + $regex = new Doku_LexerParallelRegex(true); + $regex->addPattern("(?U)\w+"); + $this->assertTrue($regex->match("aaaaaa", $match)); + $this->assertEquals($match, "a"); + } + function testMatchLookaheadEqual() { + $regex = new Doku_LexerParallelRegex(true); + $regex->addPattern("\w(?=c)"); + $this->assertTrue($regex->match("xbyczd", $match)); + $this->assertEquals($match, "y"); + } + function testMatchLookaheadNot() { + $regex = new Doku_LexerParallelRegex(true); + $regex->addPattern("\w(?!b|c)"); + $this->assertTrue($regex->match("xbyczd", $match)); + $this->assertEquals($match, "b"); + } + function testMatchLookbehindEqual() { + $regex = new Doku_LexerParallelRegex(true); + $regex->addPattern("(?<=c)\w"); + $this->assertTrue($regex->match("xbyczd", $match)); + $this->assertEquals($match, "z"); + } + function testMatchLookbehindNot() { + $regex = new Doku_LexerParallelRegex(true); + $regex->addPattern("(?<!\A|x|b)\w"); + $this->assertTrue($regex->match("xbyczd", $match)); + $this->assertEquals($match, "c"); + } +} + + +class TestOfLexerStateStack extends DokuWikiTest { + function testStartState() { + $stack = new Doku_LexerStateStack("one"); + $this->assertEquals($stack->getCurrent(), "one"); + } + function testExhaustion() { + $stack = new Doku_LexerStateStack("one"); + $this->assertFalse($stack->leave()); + } + function testStateMoves() { + $stack = new Doku_LexerStateStack("one"); + $stack->enter("two"); + $this->assertEquals($stack->getCurrent(), "two"); + $stack->enter("three"); + $this->assertEquals($stack->getCurrent(), "three"); + $this->assertTrue($stack->leave()); + $this->assertEquals($stack->getCurrent(), "two"); + $stack->enter("third"); + $this->assertEquals($stack->getCurrent(), "third"); + $this->assertTrue($stack->leave()); + $this->assertTrue($stack->leave()); + $this->assertEquals($stack->getCurrent(), "one"); + } +} + +class TestParser { + function TestParser() { + } + function accept() { + } + function a() { + } + function b() { + } +} + +class TestOfLexer extends DokuWikiTest { + function testNoPatterns() { + $handler = $this->getMock('TestParser'); + $handler->expects($this->never())->method('accept'); + $lexer = new Doku_Lexer($handler); + $this->assertFalse($lexer->parse("abcdef")); + } + function testEmptyPage() { + $handler = $this->getMock('TestParser'); + $handler->expects($this->never())->method('accept'); + $lexer = new Doku_Lexer($handler); + $lexer->addPattern("a+"); + $this->assertTrue($lexer->parse("")); + } + function testSinglePattern() { + $handler = $this->getMock('TestParser'); + $handler->expects($this->at(0))->method('accept') + ->with("aaa", DOKU_LEXER_MATCHED, 0)->will($this->returnValue(true)); + $handler->expects($this->at(1))->method('accept') + ->with("x", DOKU_LEXER_UNMATCHED, 3)->will($this->returnValue(true)); + $handler->expects($this->at(2))->method('accept') + ->with("a", DOKU_LEXER_MATCHED, 4)->will($this->returnValue(true)); + $handler->expects($this->at(3))->method('accept') + ->with("yyy", DOKU_LEXER_UNMATCHED, 5)->will($this->returnValue(true)); + $handler->expects($this->at(4))->method('accept') + ->with("a", DOKU_LEXER_MATCHED, 8)->will($this->returnValue(true)); + $handler->expects($this->at(5))->method('accept') + ->with("x", DOKU_LEXER_UNMATCHED, 9)->will($this->returnValue(true)); + $handler->expects($this->at(6))->method('accept') + ->with("aaa", DOKU_LEXER_MATCHED, 10)->will($this->returnValue(true)); + $handler->expects($this->at(7))->method('accept') + ->with("z", DOKU_LEXER_UNMATCHED, 13)->will($this->returnValue(true)); + + $lexer = new Doku_Lexer($handler); + $lexer->addPattern("a+"); + $this->assertTrue($lexer->parse("aaaxayyyaxaaaz")); + } + function testMultiplePattern() { + $handler = $this->getMock('TestParser', array('accept')); + $target = array("a", "b", "a", "bb", "x", "b", "a", "xxxxxx", "a", "x"); + $positions = array(0, 1, 2, 3, 5, 6, 7, 8, 14, 15); + for ($i = 0; $i < count($target); $i++) { + $handler->expects($this->at($i))->method('accept') + ->with($target[$i], $this->anything(), $positions[$i])->will($this->returnValue(true)); + } + $lexer = new Doku_Lexer($handler); + $lexer->addPattern("a+"); + $lexer->addPattern("b+"); + $this->assertTrue($lexer->parse("ababbxbaxxxxxxax")); + } +} + +class TestOfLexerModes extends DokuWikiTest { + function testIsolatedPattern() { + $handler = $this->getMock('TestParser'); + $handler->expects($this->at(0))->method('a') + ->with("a", DOKU_LEXER_MATCHED,0)->will($this->returnValue(true)); + $handler->expects($this->at(1))->method('a') + ->with("b", DOKU_LEXER_UNMATCHED,1)->will($this->returnValue(true)); + $handler->expects($this->at(2))->method('a') + ->with("aa", DOKU_LEXER_MATCHED,2)->will($this->returnValue(true)); + $handler->expects($this->at(3))->method('a') + ->with("bxb", DOKU_LEXER_UNMATCHED,4)->will($this->returnValue(true)); + $handler->expects($this->at(4))->method('a') + ->with("aaa", DOKU_LEXER_MATCHED,7)->will($this->returnValue(true)); + $handler->expects($this->at(5))->method('a') + ->with("x", DOKU_LEXER_UNMATCHED,10)->will($this->returnValue(true)); + $handler->expects($this->at(6))->method('a') + ->with("aaaa", DOKU_LEXER_MATCHED,11)->will($this->returnValue(true)); + $handler->expects($this->at(7))->method('a') + ->with("x", DOKU_LEXER_UNMATCHED,15)->will($this->returnValue(true)); + $lexer = new Doku_Lexer($handler, "a"); + $lexer->addPattern("a+", "a"); + $lexer->addPattern("b+", "b"); + $this->assertTrue($lexer->parse("abaabxbaaaxaaaax")); + } + function testModeChange() { + $handler = $this->getMock('TestParser'); + $handler->expects($this->at(0))->method('a') + ->with("a", DOKU_LEXER_MATCHED,0)->will($this->returnValue(true)); + $handler->expects($this->at(1))->method('a') + ->with("b", DOKU_LEXER_UNMATCHED,1)->will($this->returnValue(true)); + $handler->expects($this->at(2))->method('a') + ->with("aa", DOKU_LEXER_MATCHED,2)->will($this->returnValue(true)); + $handler->expects($this->at(3))->method('a') + ->with("b", DOKU_LEXER_UNMATCHED,4)->will($this->returnValue(true)); + $handler->expects($this->at(4))->method('a') + ->with("aaa", DOKU_LEXER_MATCHED,5)->will($this->returnValue(true)); + $handler->expects($this->at(5))->method('b') + ->with(":", DOKU_LEXER_ENTER,8)->will($this->returnValue(true)); + $handler->expects($this->at(6))->method('b') + ->with("a", DOKU_LEXER_UNMATCHED,9)->will($this->returnValue(true)); + $handler->expects($this->at(7))->method('b') + ->with("b", DOKU_LEXER_MATCHED, 10)->will($this->returnValue(true)); + $handler->expects($this->at(8))->method('b') + ->with("a", DOKU_LEXER_UNMATCHED,11)->will($this->returnValue(true)); + $handler->expects($this->at(9))->method('b') + ->with("bb", DOKU_LEXER_MATCHED,12)->will($this->returnValue(true)); + $handler->expects($this->at(10))->method('b') + ->with("a", DOKU_LEXER_UNMATCHED,14)->will($this->returnValue(true)); + $handler->expects($this->at(11))->method('b') + ->with("bbb", DOKU_LEXER_MATCHED,15)->will($this->returnValue(true)); + $handler->expects($this->at(12))->method('b') + ->with("a", DOKU_LEXER_UNMATCHED,18)->will($this->returnValue(true)); + + $lexer = new Doku_Lexer($handler, "a"); + $lexer->addPattern("a+", "a"); + $lexer->addEntryPattern(":", "a", "b"); + $lexer->addPattern("b+", "b"); + $this->assertTrue($lexer->parse("abaabaaa:ababbabbba")); + } + function testNesting() { + $handler = $this->getMock('TestParser'); + $handler->expects($this->at(0))->method('a') + ->with("aa", DOKU_LEXER_MATCHED,0)->will($this->returnValue(true)); + $handler->expects($this->at(1))->method('a') + ->with("b", DOKU_LEXER_UNMATCHED,2)->will($this->returnValue(true)); + $handler->expects($this->at(2))->method('a') + ->with("aa", DOKU_LEXER_MATCHED,3)->will($this->returnValue(true)); + $handler->expects($this->at(3))->method('a') + ->with("b", DOKU_LEXER_UNMATCHED,5)->will($this->returnValue(true)); + $handler->expects($this->at(4))->method('b') + ->with("(", DOKU_LEXER_ENTER,6)->will($this->returnValue(true)); + $handler->expects($this->at(5))->method('b') + ->with("bb", DOKU_LEXER_MATCHED,7)->will($this->returnValue(true)); + $handler->expects($this->at(6))->method('b') + ->with("a", DOKU_LEXER_UNMATCHED,9)->will($this->returnValue(true)); + $handler->expects($this->at(7))->method('b') + ->with("bb", DOKU_LEXER_MATCHED,10)->will($this->returnValue(true)); + $handler->expects($this->at(8))->method('b') + ->with(")", DOKU_LEXER_EXIT,12)->will($this->returnValue(true)); + $handler->expects($this->at(9))->method('a') + ->with("aa", DOKU_LEXER_MATCHED,13)->will($this->returnValue(true)); + $handler->expects($this->at(10))->method('a') + ->with("b", DOKU_LEXER_UNMATCHED,15)->will($this->returnValue(true)); + + + $lexer = new Doku_Lexer($handler, "a"); + $lexer->addPattern("a+", "a"); + $lexer->addEntryPattern("(", "a", "b"); + $lexer->addPattern("b+", "b"); + $lexer->addExitPattern(")", "b"); + $this->assertTrue($lexer->parse("aabaab(bbabb)aab")); + } + function testSingular() { + $handler = $this->getMock('TestParser'); + $handler->expects($this->at(0))->method('a') + ->with("aa", DOKU_LEXER_MATCHED,0)->will($this->returnValue(true)); + $handler->expects($this->at(1))->method('b') + ->with("b", DOKU_LEXER_SPECIAL,2)->will($this->returnValue(true)); + $handler->expects($this->at(2))->method('a') + ->with("aa", DOKU_LEXER_MATCHED,3)->will($this->returnValue(true)); + $handler->expects($this->at(3))->method('a') + ->with("xx", DOKU_LEXER_UNMATCHED,5)->will($this->returnValue(true)); + $handler->expects($this->at(4))->method('b') + ->with("bbb", DOKU_LEXER_SPECIAL,7)->will($this->returnValue(true)); + $handler->expects($this->at(5))->method('a') + ->with("xx", DOKU_LEXER_UNMATCHED,10)->will($this->returnValue(true)); + $lexer = new Doku_Lexer($handler, "a"); + $lexer->addPattern("a+", "a"); + $lexer->addSpecialPattern("b+", "a", "b"); + $this->assertTrue($lexer->parse("aabaaxxbbbxx")); + } + function testUnwindTooFar() { + $handler = $this->getMock('TestParser'); + $handler->expects($this->at(0))->method('a') + ->with("aa", DOKU_LEXER_MATCHED,0)->will($this->returnValue(true)); + $handler->expects($this->at(1))->method('a') + ->with(")", DOKU_LEXER_EXIT,2)->will($this->returnValue(true)); + + $lexer = new Doku_Lexer($handler, "a"); + $lexer->addPattern("a+", "a"); + $lexer->addExitPattern(")", "a"); + $this->assertFalse($lexer->parse("aa)aa")); + } +} + +class TestOfLexerHandlers extends DokuWikiTest { + function testModeMapping() { + $handler = $this->getMock('TestParser'); + $handler->expects($this->at(0))->method('a') + ->with("aa", DOKU_LEXER_MATCHED,0)->will($this->returnValue(true)); + $handler->expects($this->at(1))->method('a') + ->with("(", DOKU_LEXER_ENTER,2)->will($this->returnValue(true)); + $handler->expects($this->at(2))->method('a') + ->with("bb", DOKU_LEXER_MATCHED,3)->will($this->returnValue(true)); + $handler->expects($this->at(3))->method('a') + ->with("a", DOKU_LEXER_UNMATCHED,5)->will($this->returnValue(true)); + $handler->expects($this->at(4))->method('a') + ->with("bb", DOKU_LEXER_MATCHED,6)->will($this->returnValue(true)); + $handler->expects($this->at(5))->method('a') + ->with(")", DOKU_LEXER_EXIT,8)->will($this->returnValue(true)); + $handler->expects($this->at(6))->method('a') + ->with("b", DOKU_LEXER_UNMATCHED,9)->will($this->returnValue(true)); + + $lexer = new Doku_Lexer($handler, "mode_a"); + $lexer->addPattern("a+", "mode_a"); + $lexer->addEntryPattern("(", "mode_a", "mode_b"); + $lexer->addPattern("b+", "mode_b"); + $lexer->addExitPattern(")", "mode_b"); + $lexer->mapHandler("mode_a", "a"); + $lexer->mapHandler("mode_b", "a"); + $this->assertTrue($lexer->parse("aa(bbabb)b")); + } +} + +class TestParserByteIndex { + + function TestParserByteIndex() {} + + function ignore() {} + + function caught() {} +} + +class TestOfLexerByteIndices extends DokuWikiTest { + + function testIndex() { + $doc = "aaa<file>bcd</file>eee"; + + $handler = $this->getMock('TestParserByteIndex'); + $handler->expects($this->any())->method('ignore')->will($this->returnValue(true)); + $handler->expects($this->at(1))->method('caught') + ->with("<file>", DOKU_LEXER_ENTER, strpos($doc,'<file>'))->will($this->returnValue(true)); + $handler->expects($this->at(2))->method('caught') + ->with("b", DOKU_LEXER_SPECIAL, strpos($doc,'b'))->will($this->returnValue(true)); + $handler->expects($this->at(3))->method('caught') + ->with("c", DOKU_LEXER_MATCHED, strpos($doc,'c'))->will($this->returnValue(true)); + $handler->expects($this->at(4))->method('caught') + ->with("d", DOKU_LEXER_UNMATCHED, strpos($doc,'d'))->will($this->returnValue(true)); + $handler->expects($this->at(5))->method('caught') + ->with("</file>", DOKU_LEXER_EXIT, strpos($doc,'</file>'))->will($this->returnValue(true)); + + $lexer = new Doku_Lexer($handler, "ignore"); + $lexer->addEntryPattern("<file>", "ignore", "caught"); + $lexer->addExitPattern("</file>", "caught"); + $lexer->addSpecialPattern('b','caught','special'); + $lexer->mapHandler('special','caught'); + $lexer->addPattern('c','caught'); + + $this->assertTrue($lexer->parse($doc)); + } + + function testIndexLookaheadEqual() { + $doc = "aaa<file>bcd</file>eee"; + + $handler = $this->getMock('TestParserByteIndex'); + $handler->expects($this->any())->method('ignore')->will($this->returnValue(true)); + $handler->expects($this->at(1))->method('caught') + ->with("<file>", DOKU_LEXER_ENTER, strpos($doc,'<file>'))->will($this->returnValue(true)); + $handler->expects($this->at(2))->method('caught') + ->with("b", DOKU_LEXER_SPECIAL, strpos($doc,'b'))->will($this->returnValue(true)); + $handler->expects($this->at(3))->method('caught') + ->with("c", DOKU_LEXER_MATCHED, strpos($doc,'c'))->will($this->returnValue(true)); + $handler->expects($this->at(4))->method('caught') + ->with("d", DOKU_LEXER_UNMATCHED, strpos($doc,'d'))->will($this->returnValue(true)); + $handler->expects($this->at(5))->method('caught') + ->with("</file>", DOKU_LEXER_EXIT, strpos($doc,'</file>'))->will($this->returnValue(true)); + + $lexer = new Doku_Lexer($handler, "ignore"); + $lexer->addEntryPattern('<file>(?=.*</file>)', "ignore", "caught"); + $lexer->addExitPattern("</file>", "caught"); + $lexer->addSpecialPattern('b','caught','special'); + $lexer->mapHandler('special','caught'); + $lexer->addPattern('c','caught'); + + $this->assertTrue($lexer->parse($doc)); + } + + function testIndexLookaheadNotEqual() { + $doc = "aaa<file>bcd</file>eee"; + + $handler = $this->getMock('TestParserByteIndex'); + $handler->expects($this->any())->method('ignore')->will($this->returnValue(true)); + $handler->expects($this->at(1))->method('caught') + ->with("<file>", DOKU_LEXER_ENTER, strpos($doc,'<file>'))->will($this->returnValue(true)); + $handler->expects($this->at(2))->method('caught') + ->with("b", DOKU_LEXER_SPECIAL, strpos($doc,'b'))->will($this->returnValue(true)); + $handler->expects($this->at(3))->method('caught') + ->with("c", DOKU_LEXER_MATCHED, strpos($doc,'c'))->will($this->returnValue(true)); + $handler->expects($this->at(4))->method('caught') + ->with("d", DOKU_LEXER_UNMATCHED, strpos($doc,'d'))->will($this->returnValue(true)); + $handler->expects($this->at(5))->method('caught') + ->with("</file>", DOKU_LEXER_EXIT, strpos($doc,'</file>'))->will($this->returnValue(true)); + + $lexer = new Doku_Lexer($handler, "ignore"); + $lexer->addEntryPattern('<file>(?!foo)', "ignore", "caught"); + $lexer->addExitPattern("</file>", "caught"); + $lexer->addSpecialPattern('b','caught','special'); + $lexer->mapHandler('special','caught'); + $lexer->addPattern('c','caught'); + + $this->assertTrue($lexer->parse($doc)); + } + + function testIndexLookbehindEqual() { + $doc = "aaa<file>bcd</file>eee"; + + $handler = $this->getMock('TestParserByteIndex'); + $handler->expects($this->any())->method('ignore')->will($this->returnValue(true)); + $handler->expects($this->at(1))->method('caught') + ->with("<file>", DOKU_LEXER_ENTER, strpos($doc,'<file>'))->will($this->returnValue(true)); + $handler->expects($this->at(2))->method('caught') + ->with("b", DOKU_LEXER_SPECIAL, strpos($doc,'b'))->will($this->returnValue(true)); + $handler->expects($this->at(3))->method('caught') + ->with("c", DOKU_LEXER_MATCHED, strpos($doc,'c'))->will($this->returnValue(true)); + $handler->expects($this->at(4))->method('caught') + ->with("d", DOKU_LEXER_UNMATCHED, strpos($doc,'d'))->will($this->returnValue(true)); + $handler->expects($this->at(5))->method('caught') + ->with("</file>", DOKU_LEXER_EXIT, strpos($doc,'</file>'))->will($this->returnValue(true)); + + $lexer = new Doku_Lexer($handler, "ignore"); + $lexer->addEntryPattern('<file>', "ignore", "caught"); + $lexer->addExitPattern("(?<=d)</file>", "caught"); + $lexer->addSpecialPattern('b','caught','special'); + $lexer->mapHandler('special','caught'); + $lexer->addPattern('c','caught'); + + $this->assertTrue($lexer->parse($doc)); + } + + function testIndexLookbehindNotEqual() { + $doc = "aaa<file>bcd</file>eee"; + + $handler = $this->getMock('TestParserByteIndex'); + $handler->expects($this->any())->method('ignore')->will($this->returnValue(true)); + $handler->expects($this->at(1))->method('caught') + ->with("<file>", DOKU_LEXER_ENTER, strpos($doc,'<file>'))->will($this->returnValue(true)); + $handler->expects($this->at(2))->method('caught') + ->with("b", DOKU_LEXER_SPECIAL, strpos($doc,'b'))->will($this->returnValue(true)); + $handler->expects($this->at(3))->method('caught') + ->with("c", DOKU_LEXER_MATCHED, strpos($doc,'c'))->will($this->returnValue(true)); + $handler->expects($this->at(4))->method('caught') + ->with("d", DOKU_LEXER_UNMATCHED, strpos($doc,'d'))->will($this->returnValue(true)); + $handler->expects($this->at(5))->method('caught') + ->with("</file>", DOKU_LEXER_EXIT, strpos($doc,'</file>'))->will($this->returnValue(true)); + + $lexer = new Doku_Lexer($handler, 'ignore'); + $lexer->addEntryPattern('<file>', 'ignore', 'caught'); + $lexer->addExitPattern('(?<!c)</file>', 'caught'); + $lexer->addSpecialPattern('b','caught','special'); + $lexer->mapHandler('special','caught'); + $lexer->addPattern('c','caught'); + + $this->assertTrue($lexer->parse($doc)); + } + + /** + * This test is primarily to ensure the correct match is chosen + * when there are non-captured elements in the pattern. + */ + function testIndexSelectCorrectMatch() { + $doc = "ALL FOOLS ARE FOO"; + $pattern = '\bFOO\b'; + + $handler = $this->getMock('TestParserByteIndex'); + $handler->expects($this->any())->method('ignore')->will($this->returnValue(true)); + + $matches = array(); + preg_match('/'.$pattern.'/',$doc,$matches,PREG_OFFSET_CAPTURE); + + $handler->expects($this->once())->method('caught') + ->with("FOO", DOKU_LEXER_SPECIAL, $matches[0][1])->will($this->returnValue(true)); + + $lexer = new Doku_Lexer($handler, "ignore"); + $lexer->addSpecialPattern($pattern,'ignore','caught'); + + $this->assertTrue($lexer->parse($doc)); + } + +} + +?> diff --git a/_test/tests/inc/parser/parser.inc.php b/_test/tests/inc/parser/parser.inc.php new file mode 100644 index 0000000000000000000000000000000000000000..e9efef0d3637684cad95b1d9369f6b534afd3779 --- /dev/null +++ b/_test/tests/inc/parser/parser.inc.php @@ -0,0 +1,29 @@ +<?php + +require_once DOKU_INC . 'inc/parser/parser.php'; +require_once DOKU_INC . 'inc/parser/handler.php'; + +abstract class TestOfDoku_Parser extends PHPUnit_Framework_TestCase { + + var $P; + var $H; + + function setup() { + $this->P = new Doku_Parser(); + $this->H = new Doku_Handler(); + $this->P->Handler = & $this->H; + } + + function tearDown() { + unset($this->P); + unset($this->H); + } +} + +function stripByteIndex($call) { + unset($call[2]); + if ($call[0] == "nest") { + $call[1][0] = array_map('stripByteIndex',$call[1][0]); + } + return $call; +} diff --git a/_test/cases/inc/parser/parser_eol.test.php b/_test/tests/inc/parser/parser_eol.test.php similarity index 82% rename from _test/cases/inc/parser/parser_eol.test.php rename to _test/tests/inc/parser/parser_eol.test.php index 692882c6c6a95f2e8c2d9600b42ff01a938b9190..6264f8b558aa0a3e6897f65ec2b6ab82a223b62d 100644 --- a/_test/cases/inc/parser/parser_eol.test.php +++ b/_test/tests/inc/parser/parser_eol.test.php @@ -3,10 +3,6 @@ require_once 'parser.inc.php'; class TestOfDoku_Parser_Eol extends TestOfDoku_Parser { - function TestOfDoku_Parser_Eol() { - $this->UnitTestCase('TestOfDoku_Parser_Eol'); - } - function testEol() { $this->P->addMode('eol',new Doku_Parser_Mode_Eol()); $this->P->parse("Foo\nBar"); @@ -17,7 +13,7 @@ class TestOfDoku_Parser_Eol extends TestOfDoku_Parser { array('p_close',array()), array('document_end',array()), ); - $this->assertEqual(array_map('stripByteIndex',$this->H->calls),$calls); + $this->assertEquals(array_map('stripByteIndex',$this->H->calls),$calls); } function testEolMultiple() { @@ -33,9 +29,9 @@ class TestOfDoku_Parser_Eol extends TestOfDoku_Parser { array('p_close',array()), array('document_end',array()), ); - $this->assertEqual(array_map('stripByteIndex',$this->H->calls),$calls); + $this->assertEquals(array_map('stripByteIndex',$this->H->calls),$calls); } - + function testWinEol() { $this->P->addMode('eol',new Doku_Parser_Mode_Eol()); $this->P->parse("Foo\r\nBar"); @@ -46,9 +42,9 @@ class TestOfDoku_Parser_Eol extends TestOfDoku_Parser { array('p_close',array()), array('document_end',array()), ); - $this->assertEqual(array_map('stripByteIndex',$this->H->calls),$calls); + $this->assertEquals(array_map('stripByteIndex',$this->H->calls),$calls); } - + function testLinebreak() { $this->P->addMode('linebreak',new Doku_Parser_Mode_Linebreak()); $this->P->parse('Foo\\\\ Bar'); @@ -61,14 +57,14 @@ class TestOfDoku_Parser_Eol extends TestOfDoku_Parser { array('p_close',array()), array('document_end',array()), ); - $this->assertEqual(array_map('stripByteIndex',$this->H->calls),$calls); + $this->assertEquals(array_map('stripByteIndex',$this->H->calls),$calls); } - + function testLinebreakPlusEol() { $this->P->addMode('linebreak',new Doku_Parser_Mode_Linebreak()); $this->P->addMode('eol',new Doku_Parser_Mode_Eol()); $this->P->parse('Foo\\\\'."\n\n".'Bar'); - + $calls = array ( array('document_start',array()), array('p_open',array()), @@ -80,9 +76,9 @@ class TestOfDoku_Parser_Eol extends TestOfDoku_Parser { array('p_close',array()), array('document_end',array()), ); - $this->assertEqual(array_map('stripByteIndex',$this->H->calls),$calls); + $this->assertEquals(array_map('stripByteIndex',$this->H->calls),$calls); } - + function testLinebreakInvalid() { $this->P->addMode('linebreak',new Doku_Parser_Mode_Linebreak()); $this->P->parse('Foo\\\\Bar'); @@ -93,7 +89,7 @@ class TestOfDoku_Parser_Eol extends TestOfDoku_Parser { array('p_close',array()), array('document_end',array()), ); - $this->assertEqual(array_map('stripByteIndex',$this->H->calls),$calls); + $this->assertEquals(array_map('stripByteIndex',$this->H->calls),$calls); } } diff --git a/_test/cases/inc/parser/parser_footnote.test.php b/_test/tests/inc/parser/parser_footnote.test.php similarity index 90% rename from _test/cases/inc/parser/parser_footnote.test.php rename to _test/tests/inc/parser/parser_footnote.test.php index e3571d8e7733a5fe663522c80e3171785119e5b2..f3b5ddf56ba1faee4e81e65fa3240747b3e811f7 100644 --- a/_test/cases/inc/parser/parser_footnote.test.php +++ b/_test/tests/inc/parser/parser_footnote.test.php @@ -3,10 +3,6 @@ require_once 'parser.inc.php'; class TestOfDoku_Parser_Footnote extends TestOfDoku_Parser { - function TestOfDoku_Parser_Footnote() { - $this->UnitTestCase('TestOfDoku_Parser_Footnote'); - } - function setup() { parent::setup(); $this->P->addMode('footnote',new Doku_Parser_Mode_Footnote()); @@ -27,7 +23,7 @@ class TestOfDoku_Parser_Footnote extends TestOfDoku_Parser { array('p_close',array()), array('document_end',array()), ); - $this->assertEqual(array_map('stripbyteindex',$this->H->calls),$calls); + $this->assertEquals(array_map('stripbyteindex',$this->H->calls),$calls); } function testNotAFootnote() { @@ -39,7 +35,7 @@ class TestOfDoku_Parser_Footnote extends TestOfDoku_Parser { array('p_close',array()), array('document_end',array()), ); - $this->assertEqual(array_map('stripbyteindex',$this->H->calls),$calls); + $this->assertEquals(array_map('stripbyteindex',$this->H->calls),$calls); } function testFootnoteLinefeed() { @@ -58,7 +54,7 @@ class TestOfDoku_Parser_Footnote extends TestOfDoku_Parser { array('p_close',array()), array('document_end',array()), ); - $this->assertEqual(array_map('stripbyteindex',$this->H->calls),$calls); + $this->assertEquals(array_map('stripbyteindex',$this->H->calls),$calls); } function testFootnoteNested() { @@ -76,7 +72,7 @@ class TestOfDoku_Parser_Footnote extends TestOfDoku_Parser { array('p_close',array()), array('document_end',array()), ); - $this->assertEqual(array_map('stripbyteindex',$this->H->calls),$calls); + $this->assertEquals(array_map('stripbyteindex',$this->H->calls),$calls); } function testFootnoteEol() { @@ -95,7 +91,7 @@ class TestOfDoku_Parser_Footnote extends TestOfDoku_Parser { array('p_close',array()), array('document_end',array()), ); - $this->assertEqual(array_map('stripbyteindex',$this->H->calls),$calls); + $this->assertEquals(array_map('stripbyteindex',$this->H->calls),$calls); } function testFootnoteStrong() { @@ -118,7 +114,7 @@ class TestOfDoku_Parser_Footnote extends TestOfDoku_Parser { array('p_close',array()), array('document_end',array()), ); - $this->assertEqual(array_map('stripbyteindex',$this->H->calls),$calls); + $this->assertEquals(array_map('stripbyteindex',$this->H->calls),$calls); } function testFootnoteHr() { @@ -139,7 +135,7 @@ class TestOfDoku_Parser_Footnote extends TestOfDoku_Parser { array('p_close',array()), array('document_end',array()), ); - $this->assertEqual(array_map('stripbyteindex',$this->H->calls),$calls); + $this->assertEquals(array_map('stripbyteindex',$this->H->calls),$calls); } function testFootnoteCode() { @@ -160,7 +156,7 @@ class TestOfDoku_Parser_Footnote extends TestOfDoku_Parser { array('p_close',array()), array('document_end',array()), ); - $this->assertEqual(array_map('stripbyteindex',$this->H->calls),$calls); + $this->assertEquals(array_map('stripbyteindex',$this->H->calls),$calls); } function testFootnotePreformatted() { @@ -181,7 +177,7 @@ class TestOfDoku_Parser_Footnote extends TestOfDoku_Parser { array('p_close',array()), array('document_end',array()), ); - $this->assertEqual(array_map('stripbyteindex',$this->H->calls),$calls); + $this->assertEquals(array_map('stripbyteindex',$this->H->calls),$calls); } function testFootnotePreformattedEol() { @@ -204,7 +200,7 @@ class TestOfDoku_Parser_Footnote extends TestOfDoku_Parser { array('document_end',array()), ); - $this->assertEqual(array_map('stripbyteindex',$this->H->calls),$calls); + $this->assertEquals(array_map('stripbyteindex',$this->H->calls),$calls); } function testFootnoteUnformatted() { @@ -225,7 +221,7 @@ class TestOfDoku_Parser_Footnote extends TestOfDoku_Parser { array('p_close',array()), array('document_end',array()), ); - $this->assertEqual(array_map('stripbyteindex',$this->H->calls),$calls); + $this->assertEquals(array_map('stripbyteindex',$this->H->calls),$calls); } function testFootnoteNotHeader() { @@ -244,7 +240,7 @@ class TestOfDoku_Parser_Footnote extends TestOfDoku_Parser { array('p_close',array()), array('document_end',array()), ); - $this->assertEqual(array_map('stripbyteindex',$this->H->calls),$calls); + $this->assertEquals(array_map('stripbyteindex',$this->H->calls),$calls); } function testFootnoteTable() { @@ -290,7 +286,7 @@ class TestOfDoku_Parser_Footnote extends TestOfDoku_Parser { array('p_close',array()), array('document_end',array()), ); - $this->assertEqual(array_map('stripbyteindex',$this->H->calls),$calls); + $this->assertEquals(array_map('stripbyteindex',$this->H->calls),$calls); } function testFootnoteList() { @@ -332,7 +328,7 @@ class TestOfDoku_Parser_Footnote extends TestOfDoku_Parser { array('p_close',array()), array('document_end',array()), ); - $this->assertEqual(array_map('stripbyteindex',$this->H->calls),$calls); + $this->assertEquals(array_map('stripbyteindex',$this->H->calls),$calls); } function testFootnoteQuote() { @@ -361,7 +357,7 @@ class TestOfDoku_Parser_Footnote extends TestOfDoku_Parser { array('document_end',array()), ); - $this->assertEqual(array_map('stripbyteindex',$this->H->calls),$calls); + $this->assertEquals(array_map('stripbyteindex',$this->H->calls),$calls); } function testFootnoteNesting() { @@ -386,7 +382,7 @@ class TestOfDoku_Parser_Footnote extends TestOfDoku_Parser { array('document_end',array()), ); - $this->assertEqual(array_map('stripbyteindex',$this->H->calls),$calls); + $this->assertEquals(array_map('stripbyteindex',$this->H->calls),$calls); } } diff --git a/_test/cases/inc/parser/parser_headers.test.php b/_test/tests/inc/parser/parser_headers.test.php similarity index 88% rename from _test/cases/inc/parser/parser_headers.test.php rename to _test/tests/inc/parser/parser_headers.test.php index 688bac2ebbf6c26e5c704049c8c66ce3283fdb38..a1bf7d2ba419f1f6c382d347e26eb35662803728 100644 --- a/_test/cases/inc/parser/parser_headers.test.php +++ b/_test/tests/inc/parser/parser_headers.test.php @@ -3,10 +3,6 @@ require_once 'parser.inc.php'; class TestOfDoku_Parser_Headers extends TestOfDoku_Parser { - function TestOfDoku_Parser_Headers() { - $this->UnitTestCase('TestOfDoku_Parser_Headers'); - } - function testHeader1() { $this->P->addMode('header',new Doku_Parser_Mode_Header()); $this->P->parse("abc \n ====== Header ====== \n def"); @@ -23,9 +19,9 @@ class TestOfDoku_Parser_Headers extends TestOfDoku_Parser { array('section_close',array()), array('document_end',array()), ); - $this->assertEqual(array_map('stripByteIndex',$this->H->calls),$calls); + $this->assertEquals(array_map('stripByteIndex',$this->H->calls),$calls); } - + function testHeader2() { $this->P->addMode('header',new Doku_Parser_Mode_Header()); $this->P->parse("abc \n ===== Header ===== \n def"); @@ -42,9 +38,9 @@ class TestOfDoku_Parser_Headers extends TestOfDoku_Parser { array('section_close',array()), array('document_end',array()), ); - $this->assertEqual(array_map('stripByteIndex',$this->H->calls),$calls); + $this->assertEquals(array_map('stripByteIndex',$this->H->calls),$calls); } - + function testHeader3() { $this->P->addMode('header',new Doku_Parser_Mode_Header()); $this->P->parse("abc \n ==== Header ==== \n def"); @@ -61,9 +57,9 @@ class TestOfDoku_Parser_Headers extends TestOfDoku_Parser { array('section_close',array()), array('document_end',array()), ); - $this->assertEqual(array_map('stripByteIndex',$this->H->calls),$calls); + $this->assertEquals(array_map('stripByteIndex',$this->H->calls),$calls); } - + function testHeader4() { $this->P->addMode('header',new Doku_Parser_Mode_Header()); $this->P->parse("abc \n === Header === \n def"); @@ -80,9 +76,9 @@ class TestOfDoku_Parser_Headers extends TestOfDoku_Parser { array('section_close',array()), array('document_end',array()), ); - $this->assertEqual(array_map('stripByteIndex',$this->H->calls),$calls); + $this->assertEquals(array_map('stripByteIndex',$this->H->calls),$calls); } - + function testHeader5() { $this->P->addMode('header',new Doku_Parser_Mode_Header()); $this->P->parse("abc \n == Header == \n def"); @@ -99,7 +95,7 @@ class TestOfDoku_Parser_Headers extends TestOfDoku_Parser { array('section_close',array()), array('document_end',array()), ); - $this->assertEqual(array_map('stripByteIndex',$this->H->calls),$calls); + $this->assertEquals(array_map('stripByteIndex',$this->H->calls),$calls); } function testHeader2UnevenSmaller() { @@ -118,9 +114,9 @@ class TestOfDoku_Parser_Headers extends TestOfDoku_Parser { array('section_close',array()), array('document_end',array()), ); - $this->assertEqual(array_map('stripByteIndex',$this->H->calls),$calls); + $this->assertEquals(array_map('stripByteIndex',$this->H->calls),$calls); } - + function testHeader2UnevenBigger() { $this->P->addMode('header',new Doku_Parser_Mode_Header()); $this->P->parse("abc \n ===== Header =========== \n def"); @@ -137,9 +133,9 @@ class TestOfDoku_Parser_Headers extends TestOfDoku_Parser { array('section_close',array()), array('document_end',array()), ); - $this->assertEqual(array_map('stripByteIndex',$this->H->calls),$calls); + $this->assertEquals(array_map('stripByteIndex',$this->H->calls),$calls); } - + function testHeaderLarge() { $this->P->addMode('header',new Doku_Parser_Mode_Header()); $this->P->parse("abc \n ======= Header ======= \n def"); @@ -156,9 +152,9 @@ class TestOfDoku_Parser_Headers extends TestOfDoku_Parser { array('section_close',array()), array('document_end',array()), ); - $this->assertEqual(array_map('stripByteIndex',$this->H->calls),$calls); + $this->assertEquals(array_map('stripByteIndex',$this->H->calls),$calls); } - + function testHeaderSmall() { $this->P->addMode('header',new Doku_Parser_Mode_Header()); $this->P->parse("abc \n= Header =\n def"); @@ -169,10 +165,10 @@ class TestOfDoku_Parser_Headers extends TestOfDoku_Parser { array('p_close',array()), array('document_end',array()), ); - $this->assertEqual(array_map('stripByteIndex',$this->H->calls),$calls); + $this->assertEquals(array_map('stripByteIndex',$this->H->calls),$calls); } - - + + function testHeader1Mixed() { $this->P->addMode('header',new Doku_Parser_Mode_Header()); $this->P->parse("abc \n====== == Header == ======\n def"); @@ -189,7 +185,7 @@ class TestOfDoku_Parser_Headers extends TestOfDoku_Parser { array('section_close',array()), array('document_end',array()), ); - $this->assertEqual(array_map('stripByteIndex',$this->H->calls),$calls); + $this->assertEquals(array_map('stripByteIndex',$this->H->calls),$calls); } function testHeader5Mixed() { @@ -208,9 +204,9 @@ class TestOfDoku_Parser_Headers extends TestOfDoku_Parser { array('section_close',array()), array('document_end',array()), ); - $this->assertEqual(array_map('stripByteIndex',$this->H->calls),$calls); + $this->assertEquals(array_map('stripByteIndex',$this->H->calls),$calls); } - + function testHeaderMultiline() { $this->P->addMode('header',new Doku_Parser_Mode_Header()); $this->P->parse("abc \n== ====== Header\n ====== ==\n def"); @@ -227,15 +223,15 @@ class TestOfDoku_Parser_Headers extends TestOfDoku_Parser { array('section_close',array()), array('document_end',array()), ); - $this->assertEqual(array_map('stripByteIndex',$this->H->calls),$calls); + $this->assertEquals(array_map('stripByteIndex',$this->H->calls),$calls); } - + # function testNoToc() { # $this->P->addMode('notoc',new Doku_Parser_Mode_NoToc()); # $this->P->parse('abc ~~NOTOC~~ def'); # $this->assertFalse($this->H->meta['toc']); # } - + function testHeader1Eol() { $this->P->addMode('header',new Doku_Parser_Mode_Header()); $this->P->addMode('eol',new Doku_Parser_Mode_Eol()); @@ -253,8 +249,8 @@ class TestOfDoku_Parser_Headers extends TestOfDoku_Parser { array('section_close',array()), array('document_end',array()), ); - $this->assertEqual(array_map('stripByteIndex',$this->H->calls),$calls); - + $this->assertEquals(array_map('stripByteIndex',$this->H->calls),$calls); + } function testHeaderMulti2() { @@ -279,8 +275,8 @@ class TestOfDoku_Parser_Headers extends TestOfDoku_Parser { array('section_close',array()), array('document_end',array()) ); - $this->assertEqual(array_map('stripByteIndex',$this->H->calls),$calls); + $this->assertEquals(array_map('stripByteIndex',$this->H->calls),$calls); } - + } diff --git a/_test/cases/inc/parser/parser_i18n.test.php b/_test/tests/inc/parser/parser_i18n.test.php similarity index 91% rename from _test/cases/inc/parser/parser_i18n.test.php rename to _test/tests/inc/parser/parser_i18n.test.php index 27ec3c78bc66bdf0c50bad71dcec19c3856074c8..096f2e227cec364d2660b446e354a1995d0e7fde 100644 --- a/_test/cases/inc/parser/parser_i18n.test.php +++ b/_test/tests/inc/parser/parser_i18n.test.php @@ -3,10 +3,6 @@ require_once 'parser.inc.php'; class TestOfDoku_Parser_i18n extends TestOfDoku_Parser { - function TestOfDoku_Parser_i18n() { - $this->UnitTestCase('TestOfDoku_Parser_i18n'); - } - function testFormatting() { $formats = array ( 'strong', 'emphasis', 'underline', 'monospace', @@ -51,7 +47,7 @@ class TestOfDoku_Parser_i18n extends TestOfDoku_Parser { array('p_close',array()), array('document_end',array()), ); - $this->assertEqual(array_map('stripbyteindex',$this->H->calls),$calls); + $this->assertEquals(array_map('stripbyteindex',$this->H->calls),$calls); } function testHeader() { @@ -70,7 +66,7 @@ class TestOfDoku_Parser_i18n extends TestOfDoku_Parser { array('section_close',array()), array('document_end',array()), ); - $this->assertEqual(array_map('stripbyteindex',$this->H->calls),$calls); + $this->assertEquals(array_map('stripbyteindex',$this->H->calls),$calls); } function testTable() { @@ -114,7 +110,7 @@ def'); array('p_close',array()), array('document_end',array()), ); - $this->assertEqual(array_map('stripbyteindex',$this->H->calls),$calls); + $this->assertEquals(array_map('stripbyteindex',$this->H->calls),$calls); } function testAcronym() { @@ -130,7 +126,7 @@ def'); array('p_close',array()), array('document_end',array()), ); - $this->assertEqual(array_map('stripbyteindex',$this->H->calls),$calls); + $this->assertEquals(array_map('stripbyteindex',$this->H->calls),$calls); } function testInterwiki() { @@ -145,7 +141,7 @@ def'); array('p_close',array()), array('document_end',array()), ); - $this->assertEqual(array_map('stripByteIndex',$this->H->calls),$calls); + $this->assertEquals(array_map('stripByteIndex',$this->H->calls),$calls); } function testInternalLink() { @@ -160,7 +156,7 @@ def'); array('p_close',array()), array('document_end',array()), ); - $this->assertEqual(array_map('stripByteIndex',$this->H->calls),$calls); + $this->assertEquals(array_map('stripByteIndex',$this->H->calls),$calls); } } diff --git a/_test/cases/inc/parser/parser_links.test.php b/_test/tests/inc/parser/parser_links.test.php similarity index 87% rename from _test/cases/inc/parser/parser_links.test.php rename to _test/tests/inc/parser/parser_links.test.php index d0fb19570b24d61c5990650702c91ff83c7236e5..529efac6e6141936db37cfc6fc3900681a7bcf3f 100644 --- a/_test/cases/inc/parser/parser_links.test.php +++ b/_test/tests/inc/parser/parser_links.test.php @@ -3,11 +3,6 @@ require_once 'parser.inc.php'; class TestOfDoku_Parser_Links extends TestOfDoku_Parser { - function TestOfDoku_Parser_Links() { - $this->UnitTestCase('TestOfDoku_Parser_Links'); - } - - function testExternalLinkSimple() { $this->P->addMode('externallink',new Doku_Parser_Mode_ExternalLink()); $this->P->parse("Foo http://www.google.com Bar"); @@ -20,7 +15,7 @@ class TestOfDoku_Parser_Links extends TestOfDoku_Parser { array('p_close',array()), array('document_end',array()), ); - $this->assertEqual(array_map('stripByteIndex',$this->H->calls),$calls); + $this->assertEquals(array_map('stripByteIndex',$this->H->calls),$calls); } function testExternalLinkCase() { @@ -35,7 +30,7 @@ class TestOfDoku_Parser_Links extends TestOfDoku_Parser { array('p_close',array()), array('document_end',array()), ); - $this->assertEqual(array_map('stripByteIndex',$this->H->calls),$calls); + $this->assertEquals(array_map('stripByteIndex',$this->H->calls),$calls); } function testExternalIPv4() { @@ -50,7 +45,7 @@ class TestOfDoku_Parser_Links extends TestOfDoku_Parser { array('p_close',array()), array('document_end',array()), ); - $this->assertEqual(array_map('stripByteIndex',$this->H->calls),$calls); + $this->assertEquals(array_map('stripByteIndex',$this->H->calls),$calls); } function testExternalIPv6() { @@ -65,7 +60,7 @@ class TestOfDoku_Parser_Links extends TestOfDoku_Parser { array('p_close',array()), array('document_end',array()), ); - $this->assertEqual(array_map('stripByteIndex',$this->H->calls),$calls); + $this->assertEquals(array_map('stripByteIndex',$this->H->calls),$calls); } function testExternalMulti(){ @@ -95,8 +90,6 @@ class TestOfDoku_Parser_Links extends TestOfDoku_Parser { $source = "[[$link|$title]]"; $name = $title; } - $this->signal('failinfo',$source); - $this->setup(); $this->P->addMode('internallink',new Doku_Parser_Mode_InternalLink()); $this->P->addMode('externallink',new Doku_Parser_Mode_ExternalLink()); @@ -110,7 +103,7 @@ class TestOfDoku_Parser_Links extends TestOfDoku_Parser { array('p_close',array()), array('document_end',array()), ); - $this->assertEqual(array_map('stripByteIndex',$this->H->calls),$calls); + $this->assertEquals(array_map('stripByteIndex',$this->H->calls), $calls, $source); $this->teardown(); } } @@ -128,7 +121,7 @@ class TestOfDoku_Parser_Links extends TestOfDoku_Parser { array('p_close',array()), array('document_end',array()), ); - $this->assertEqual(array_map('stripByteIndex',$this->H->calls),$calls); + $this->assertEquals(array_map('stripByteIndex',$this->H->calls),$calls); } function testExternalWWWLink() { @@ -143,7 +136,7 @@ class TestOfDoku_Parser_Links extends TestOfDoku_Parser { array('p_close',array()), array('document_end',array()), ); - $this->assertEqual(array_map('stripByteIndex',$this->H->calls),$calls); + $this->assertEquals(array_map('stripByteIndex',$this->H->calls),$calls); } function testExternalFTPLink() { @@ -158,7 +151,7 @@ class TestOfDoku_Parser_Links extends TestOfDoku_Parser { array('p_close',array()), array('document_end',array()), ); - $this->assertEqual(array_map('stripByteIndex',$this->H->calls),$calls); + $this->assertEquals(array_map('stripByteIndex',$this->H->calls),$calls); } function testEmail() { $this->P->addMode('emaillink',new Doku_Parser_Mode_Emaillink()); @@ -172,7 +165,7 @@ class TestOfDoku_Parser_Links extends TestOfDoku_Parser { array('p_close',array()), array('document_end',array()), ); - $this->assertEqual(array_map('stripByteIndex',$this->H->calls),$calls); + $this->assertEquals(array_map('stripByteIndex',$this->H->calls),$calls); } function testEmailRFC2822() { @@ -187,7 +180,7 @@ class TestOfDoku_Parser_Links extends TestOfDoku_Parser { array('p_close',array()), array('document_end',array()), ); - $this->assertEqual(array_map('stripByteIndex',$this->H->calls),$calls); + $this->assertEquals(array_map('stripByteIndex',$this->H->calls),$calls); } function testEmailCase() { @@ -202,7 +195,7 @@ class TestOfDoku_Parser_Links extends TestOfDoku_Parser { array('p_close',array()), array('document_end',array()), ); - $this->assertEqual(array_map('stripByteIndex',$this->H->calls),$calls); + $this->assertEquals(array_map('stripByteIndex',$this->H->calls),$calls); } @@ -218,7 +211,7 @@ class TestOfDoku_Parser_Links extends TestOfDoku_Parser { array('p_close',array()), array('document_end',array()), ); - $this->assertEqual(array_map('stripByteIndex',$this->H->calls),$calls); + $this->assertEquals(array_map('stripByteIndex',$this->H->calls),$calls); } function testInternalLinkNoChar() { @@ -233,7 +226,7 @@ class TestOfDoku_Parser_Links extends TestOfDoku_Parser { array('p_close',array()), array('document_end',array()), ); - $this->assertEqual(array_map('stripByteIndex',$this->H->calls),$calls); + $this->assertEquals(array_map('stripByteIndex',$this->H->calls),$calls); } function testInternalLinkNamespaceNoTitle() { @@ -248,7 +241,7 @@ class TestOfDoku_Parser_Links extends TestOfDoku_Parser { array('p_close',array()), array('document_end',array()), ); - $this->assertEqual(array_map('stripByteIndex',$this->H->calls),$calls); + $this->assertEquals(array_map('stripByteIndex',$this->H->calls),$calls); } function testInternalLinkNamespace() { @@ -263,7 +256,7 @@ class TestOfDoku_Parser_Links extends TestOfDoku_Parser { array('p_close',array()), array('document_end',array()), ); - $this->assertEqual(array_map('stripByteIndex',$this->H->calls),$calls); + $this->assertEquals(array_map('stripByteIndex',$this->H->calls),$calls); } function testInternalLinkSectionRef() { @@ -278,7 +271,7 @@ class TestOfDoku_Parser_Links extends TestOfDoku_Parser { array('p_close',array()), array('document_end',array()), ); - $this->assertEqual(array_map('stripByteIndex',$this->H->calls),$calls); + $this->assertEquals(array_map('stripByteIndex',$this->H->calls),$calls); } function testExternalInInternalLink() { @@ -293,7 +286,7 @@ class TestOfDoku_Parser_Links extends TestOfDoku_Parser { array('p_close',array()), array('document_end',array()), ); - $this->assertEqual(array_map('stripByteIndex',$this->H->calls),$calls); + $this->assertEquals(array_map('stripByteIndex',$this->H->calls),$calls); } function testInterwikiLink() { @@ -308,7 +301,7 @@ class TestOfDoku_Parser_Links extends TestOfDoku_Parser { array('p_close',array()), array('document_end',array()), ); - $this->assertEqual(array_map('stripByteIndex',$this->H->calls),$calls); + $this->assertEquals(array_map('stripByteIndex',$this->H->calls),$calls); } function testInterwikiLinkCase() { @@ -323,7 +316,7 @@ class TestOfDoku_Parser_Links extends TestOfDoku_Parser { array('p_close',array()), array('document_end',array()), ); - $this->assertEqual(array_map('stripByteIndex',$this->H->calls),$calls); + $this->assertEquals(array_map('stripByteIndex',$this->H->calls),$calls); } function testInterwikiPedia() { @@ -338,7 +331,7 @@ class TestOfDoku_Parser_Links extends TestOfDoku_Parser { array('p_close',array()), array('document_end',array()), ); - $this->assertEqual(array_map('stripByteIndex',$this->H->calls),$calls); + $this->assertEquals(array_map('stripByteIndex',$this->H->calls),$calls); } function testCamelCase() { @@ -353,7 +346,7 @@ class TestOfDoku_Parser_Links extends TestOfDoku_Parser { array('p_close',array()), array('document_end',array()), ); - $this->assertEqual(array_map('stripByteIndex',$this->H->calls),$calls); + $this->assertEquals(array_map('stripByteIndex',$this->H->calls),$calls); } function testFileLink() { @@ -368,7 +361,7 @@ class TestOfDoku_Parser_Links extends TestOfDoku_Parser { array('p_close',array()), array('document_end',array()), ); - $this->assertEqual(array_map('stripByteIndex',$this->H->calls),$calls); + $this->assertEquals(array_map('stripByteIndex',$this->H->calls),$calls); } function testFileLinkInternal() { @@ -383,7 +376,7 @@ class TestOfDoku_Parser_Links extends TestOfDoku_Parser { array('p_close',array()), array('document_end',array()), ); - $this->assertEqual(array_map('stripByteIndex',$this->H->calls),$calls); + $this->assertEquals(array_map('stripByteIndex',$this->H->calls),$calls); } function testWindowsShareLink() { @@ -398,7 +391,7 @@ class TestOfDoku_Parser_Links extends TestOfDoku_Parser { array('p_close',array()), array('document_end',array()), ); - $this->assertEqual(array_map('stripByteIndex',$this->H->calls),$calls); + $this->assertEquals(array_map('stripByteIndex',$this->H->calls),$calls); } function testWindowsShareLinkHyphen() { @@ -413,7 +406,7 @@ class TestOfDoku_Parser_Links extends TestOfDoku_Parser { array('p_close',array()), array('document_end',array()), ); - $this->assertEqual(array_map('stripByteIndex',$this->H->calls),$calls); + $this->assertEquals(array_map('stripByteIndex',$this->H->calls),$calls); } function testWindowsShareLinkInternal() { @@ -428,7 +421,7 @@ class TestOfDoku_Parser_Links extends TestOfDoku_Parser { array('p_close',array()), array('document_end',array()), ); - $this->assertEqual(array_map('stripByteIndex',$this->H->calls),$calls); + $this->assertEquals(array_map('stripByteIndex',$this->H->calls),$calls); } function testMediaInternal() { @@ -443,7 +436,7 @@ class TestOfDoku_Parser_Links extends TestOfDoku_Parser { array('p_close',array()), array('document_end',array()), ); - $this->assertEqual(array_map('stripByteIndex',$this->H->calls),$calls); + $this->assertEquals(array_map('stripByteIndex',$this->H->calls),$calls); } function testMediaInternalLinkOnly() { @@ -458,7 +451,7 @@ class TestOfDoku_Parser_Links extends TestOfDoku_Parser { array('p_close',array()), array('document_end',array()), ); - $this->assertEqual(array_map('stripByteIndex',$this->H->calls),$calls); + $this->assertEquals(array_map('stripByteIndex',$this->H->calls),$calls); } function testMediaNotImage() { @@ -473,7 +466,7 @@ class TestOfDoku_Parser_Links extends TestOfDoku_Parser { array('p_close',array()), array('document_end',array()), ); - $this->assertEqual(array_map('stripByteIndex',$this->H->calls),$calls); + $this->assertEquals(array_map('stripByteIndex',$this->H->calls),$calls); } function testMediaInternalLAlign() { @@ -488,7 +481,7 @@ class TestOfDoku_Parser_Links extends TestOfDoku_Parser { array('p_close',array()), array('document_end',array()), ); - $this->assertEqual(array_map('stripByteIndex',$this->H->calls),$calls); + $this->assertEquals(array_map('stripByteIndex',$this->H->calls),$calls); } function testMediaInternalRAlign() { @@ -503,7 +496,7 @@ class TestOfDoku_Parser_Links extends TestOfDoku_Parser { array('p_close',array()), array('document_end',array()), ); - $this->assertEqual(array_map('stripByteIndex',$this->H->calls),$calls); + $this->assertEquals(array_map('stripByteIndex',$this->H->calls),$calls); } function testMediaInternalCenter() { @@ -518,7 +511,7 @@ class TestOfDoku_Parser_Links extends TestOfDoku_Parser { array('p_close',array()), array('document_end',array()), ); - $this->assertEqual(array_map('stripByteIndex',$this->H->calls),$calls); + $this->assertEquals(array_map('stripByteIndex',$this->H->calls),$calls); } function testMediaInternalParams() { @@ -533,7 +526,7 @@ class TestOfDoku_Parser_Links extends TestOfDoku_Parser { array('p_close',array()), array('document_end',array()), ); - $this->assertEqual(array_map('stripByteIndex',$this->H->calls),$calls); + $this->assertEquals(array_map('stripByteIndex',$this->H->calls),$calls); } function testMediaInternalTitle() { @@ -548,7 +541,7 @@ class TestOfDoku_Parser_Links extends TestOfDoku_Parser { array('p_close',array()), array('document_end',array()), ); - $this->assertEqual(array_map('stripByteIndex',$this->H->calls),$calls); + $this->assertEquals(array_map('stripByteIndex',$this->H->calls),$calls); } function testMediaExternal() { @@ -563,7 +556,7 @@ class TestOfDoku_Parser_Links extends TestOfDoku_Parser { array('p_close',array()), array('document_end',array()), ); - $this->assertEqual(array_map('stripByteIndex',$this->H->calls),$calls); + $this->assertEquals(array_map('stripByteIndex',$this->H->calls),$calls); } function testMediaExternalParams() { @@ -578,7 +571,7 @@ class TestOfDoku_Parser_Links extends TestOfDoku_Parser { array('p_close',array()), array('document_end',array()), ); - $this->assertEqual(array_map('stripByteIndex',$this->H->calls),$calls); + $this->assertEquals(array_map('stripByteIndex',$this->H->calls),$calls); } function testMediaExternalTitle() { @@ -594,7 +587,7 @@ class TestOfDoku_Parser_Links extends TestOfDoku_Parser { array('p_close',array()), array('document_end',array()), ); - $this->assertEqual(array_map('stripByteIndex',$this->H->calls),$calls); + $this->assertEquals(array_map('stripByteIndex',$this->H->calls),$calls); } function testMediaInInternalLink() { @@ -621,7 +614,7 @@ class TestOfDoku_Parser_Links extends TestOfDoku_Parser { array('p_close',array()), array('document_end',array()), ); - $this->assertEqual(array_map('stripByteIndex',$this->H->calls),$calls); + $this->assertEquals(array_map('stripByteIndex',$this->H->calls),$calls); } function testMediaNoImageInInternalLink() { @@ -648,7 +641,7 @@ class TestOfDoku_Parser_Links extends TestOfDoku_Parser { array('p_close',array()), array('document_end',array()), ); - $this->assertEqual(array_map('stripByteIndex',$this->H->calls),$calls); + $this->assertEquals(array_map('stripByteIndex',$this->H->calls),$calls); } function testMediaInEmailLink() { @@ -675,7 +668,7 @@ class TestOfDoku_Parser_Links extends TestOfDoku_Parser { array('p_close',array()), array('document_end',array()), ); - $this->assertEqual(array_map('stripByteIndex',$this->H->calls),$calls); + $this->assertEquals(array_map('stripByteIndex',$this->H->calls),$calls); } function testNestedMedia() { @@ -691,7 +684,7 @@ class TestOfDoku_Parser_Links extends TestOfDoku_Parser { array('p_close',array()), array('document_end',array()), ); - $this->assertEqual(array_map('stripByteIndex',$this->H->calls),$calls); + $this->assertEquals(array_map('stripByteIndex',$this->H->calls),$calls); } } diff --git a/_test/cases/inc/parser/parser_lists.test.php b/_test/tests/inc/parser/parser_lists.test.php similarity index 92% rename from _test/cases/inc/parser/parser_lists.test.php rename to _test/tests/inc/parser/parser_lists.test.php index 6e61da1a140046669d854664645a8c738a78ab1d..e4ef1f83e5dc162b72567f76f3d739f0f76acb91 100644 --- a/_test/cases/inc/parser/parser_lists.test.php +++ b/_test/tests/inc/parser/parser_lists.test.php @@ -3,10 +3,6 @@ require_once 'parser.inc.php'; class TestOfDoku_Parser_Lists extends TestOfDoku_Parser { - function TestOfDoku_Parser_Lists() { - $this->UnitTestCase('TestOfDoku_Parser_Lists'); - } - function testUnorderedList() { $this->P->addMode('listblock',new Doku_Parser_Mode_ListBlock()); $this->P->parse(' @@ -37,7 +33,7 @@ class TestOfDoku_Parser_Lists extends TestOfDoku_Parser { array('listu_close',array()), array('document_end',array()), ); - $this->assertEqual(array_map('stripbyteindex',$this->H->calls),$calls); + $this->assertEquals(array_map('stripbyteindex',$this->H->calls),$calls); } function testOrderedList() { @@ -70,7 +66,7 @@ class TestOfDoku_Parser_Lists extends TestOfDoku_Parser { array('listo_close',array()), array('document_end',array()), ); - $this->assertEqual(array_map('stripbyteindex',$this->H->calls),$calls); + $this->assertEquals(array_map('stripbyteindex',$this->H->calls),$calls); } @@ -104,7 +100,7 @@ class TestOfDoku_Parser_Lists extends TestOfDoku_Parser { array('listo_close',array()), array('document_end',array()), ); - $this->assertEqual(array_map('stripbyteindex',$this->H->calls),$calls); + $this->assertEquals(array_map('stripbyteindex',$this->H->calls),$calls); } function testUnorderedListWinEOL() { @@ -133,7 +129,7 @@ class TestOfDoku_Parser_Lists extends TestOfDoku_Parser { array('listu_close',array()), array('document_end',array()), ); - $this->assertEqual(array_map('stripbyteindex',$this->H->calls),$calls); + $this->assertEquals(array_map('stripbyteindex',$this->H->calls),$calls); } function testOrderedListWinEOL() { @@ -162,7 +158,7 @@ class TestOfDoku_Parser_Lists extends TestOfDoku_Parser { array('listo_close',array()), array('document_end',array()), ); - $this->assertEqual(array_map('stripbyteindex',$this->H->calls),$calls); + $this->assertEquals(array_map('stripbyteindex',$this->H->calls),$calls); } function testNotAList() { @@ -175,7 +171,7 @@ class TestOfDoku_Parser_Lists extends TestOfDoku_Parser { array('p_close',array()), array('document_end',array()), ); - $this->assertEqual(array_map('stripbyteindex',$this->H->calls),$calls); + $this->assertEquals(array_map('stripbyteindex',$this->H->calls),$calls); } function testUnorderedListParagraph() { @@ -215,7 +211,7 @@ Bar'); array('p_close',array()), array('document_end',array()), ); - $this->assertEqual(array_map('stripbyteindex',$this->H->calls),$calls); + $this->assertEquals(array_map('stripbyteindex',$this->H->calls),$calls); } // This is really a failing test - formatting able to spread across list items @@ -250,7 +246,7 @@ Bar'); array('listu_close',array()), array('document_end',array()), ); - $this->assertEqual(array_map('stripbyteindex',$this->H->calls),$calls); + $this->assertEquals(array_map('stripbyteindex',$this->H->calls),$calls); } // This is really a failing test - unformatted able to spread across list items @@ -281,7 +277,7 @@ Bar'); array('listu_close',array()), array('document_end',array()), ); - $this->assertEqual(array_map('stripbyteindex',$this->H->calls),$calls); + $this->assertEquals(array_map('stripbyteindex',$this->H->calls),$calls); } function testUnorderedListLinebreak() { @@ -317,7 +313,7 @@ Bar'); array('listu_close',array()), array('document_end',array()), ); - $this->assertEqual(array_map('stripbyteindex',$this->H->calls),$calls); + $this->assertEquals(array_map('stripbyteindex',$this->H->calls),$calls); } function testUnorderedListLinebreak2() { @@ -344,7 +340,7 @@ Bar'); array('listu_close',array()), array('document_end',array()), ); - $this->assertEqual(array_map('stripbyteindex',$this->H->calls),$calls); + $this->assertEquals(array_map('stripbyteindex',$this->H->calls),$calls); } function testUnorderedListFootnote() { @@ -391,7 +387,7 @@ Bar'); array('document_end',array()) ); - $this->assertEqual(array_map('stripbyteindex',$this->H->calls),$calls); + $this->assertEquals(array_map('stripbyteindex',$this->H->calls),$calls); } } diff --git a/_test/cases/inc/parser/parser_preformatted.test.php b/_test/tests/inc/parser/parser_preformatted.test.php similarity index 88% rename from _test/cases/inc/parser/parser_preformatted.test.php rename to _test/tests/inc/parser/parser_preformatted.test.php index 7a00f3599a1709d6f203cda4ad9e9eaed26be495..f7a01a7e580263f635f8b19aee36eb8cbebf844f 100644 --- a/_test/cases/inc/parser/parser_preformatted.test.php +++ b/_test/tests/inc/parser/parser_preformatted.test.php @@ -3,10 +3,6 @@ require_once 'parser.inc.php'; class TestOfDoku_Parser_Preformatted extends TestOfDoku_Parser { - function TestOfDoku_Parser_Preformatted() { - $this->UnitTestCase('TestOfDoku_Parser_Preformatted'); - } - function testFile() { $this->P->addMode('file',new Doku_Parser_Mode_File()); $this->P->parse('Foo <file>testing</file> Bar'); @@ -22,7 +18,7 @@ class TestOfDoku_Parser_Preformatted extends TestOfDoku_Parser { array('document_end',array()), ); - $this->assertEqual(array_map('stripbyteindex',$this->H->calls),$calls); + $this->assertEquals(array_map('stripbyteindex',$this->H->calls),$calls); } function testCode() { @@ -39,7 +35,7 @@ class TestOfDoku_Parser_Preformatted extends TestOfDoku_Parser { array('p_close',array()), array('document_end',array()), ); - $this->assertEqual(array_map('stripbyteindex',$this->H->calls),$calls); + $this->assertEquals(array_map('stripbyteindex',$this->H->calls),$calls); } function testCodeWhitespace() { @@ -56,7 +52,7 @@ class TestOfDoku_Parser_Preformatted extends TestOfDoku_Parser { array('p_close',array()), array('document_end',array()), ); - $this->assertEqual(array_map('stripbyteindex',$this->H->calls),$calls); + $this->assertEquals(array_map('stripbyteindex',$this->H->calls),$calls); } function testCodeLang() { @@ -73,7 +69,7 @@ class TestOfDoku_Parser_Preformatted extends TestOfDoku_Parser { array('p_close',array()), array('document_end',array()), ); - $this->assertEqual(array_map('stripbyteindex',$this->H->calls),$calls); + $this->assertEquals(array_map('stripbyteindex',$this->H->calls),$calls); } function testPreformatted() { @@ -90,7 +86,7 @@ class TestOfDoku_Parser_Preformatted extends TestOfDoku_Parser { array('p_close',array()), array('document_end',array()), ); - $this->assertEqual(array_map('stripbyteindex',$this->H->calls),$calls); + $this->assertEquals(array_map('stripbyteindex',$this->H->calls),$calls); } function testPreformattedWinEOL() { @@ -107,7 +103,7 @@ class TestOfDoku_Parser_Preformatted extends TestOfDoku_Parser { array('p_close',array()), array('document_end',array()), ); - $this->assertEqual(array_map('stripbyteindex',$this->H->calls),$calls); + $this->assertEquals(array_map('stripbyteindex',$this->H->calls),$calls); } function testPreformattedTab() { @@ -124,7 +120,7 @@ class TestOfDoku_Parser_Preformatted extends TestOfDoku_Parser { array('p_close',array()), array('document_end',array()), ); - $this->assertEqual(array_map('stripbyteindex',$this->H->calls),$calls); + $this->assertEquals(array_map('stripbyteindex',$this->H->calls),$calls); } function testPreformattedTabWinEOL() { @@ -141,7 +137,7 @@ class TestOfDoku_Parser_Preformatted extends TestOfDoku_Parser { array('p_close',array()), array('document_end',array()), ); - $this->assertEqual(array_map('stripbyteindex',$this->H->calls),$calls); + $this->assertEquals(array_map('stripbyteindex',$this->H->calls),$calls); } function testPreformattedList() { @@ -173,7 +169,7 @@ class TestOfDoku_Parser_Preformatted extends TestOfDoku_Parser { array('p_close',array()), array('document_end',array()), ); - $this->assertEqual(array_map('stripbyteindex',$this->H->calls),$calls); + $this->assertEquals(array_map('stripbyteindex',$this->H->calls),$calls); } // test for php @@ -190,7 +186,7 @@ class TestOfDoku_Parser_Preformatted extends TestOfDoku_Parser { array('p_close',array()), array('document_end',array()), ); - $this->assertEqual(array_map('stripbyteindex',$this->H->calls),$calls); + $this->assertEquals(array_map('stripbyteindex',$this->H->calls),$calls); } // test with for HTML @@ -207,7 +203,7 @@ class TestOfDoku_Parser_Preformatted extends TestOfDoku_Parser { array('p_close',array()), array('document_end',array()), ); - $this->assertEqual(array_map('stripbyteindex',$this->H->calls),$calls); + $this->assertEquals(array_map('stripbyteindex',$this->H->calls),$calls); } @@ -229,7 +225,7 @@ class TestOfDoku_Parser_Preformatted extends TestOfDoku_Parser { array('p_close',array()), array('document_end',array()), ); - $this->assertEqual(array_map('stripbyteindex',$this->H->calls),$calls); + $this->assertEquals(array_map('stripbyteindex',$this->H->calls),$calls); } } diff --git a/_test/cases/inc/parser/parser_quote.test.php b/_test/tests/inc/parser/parser_quote.test.php similarity index 85% rename from _test/cases/inc/parser/parser_quote.test.php rename to _test/tests/inc/parser/parser_quote.test.php index ebc5da6044cb9c8f207e78c59b497663bddec0ea..ae14671c1b4da808cfafcebab47f938b4531e1cf 100644 --- a/_test/cases/inc/parser/parser_quote.test.php +++ b/_test/tests/inc/parser/parser_quote.test.php @@ -3,10 +3,6 @@ require_once 'parser.inc.php'; class TestOfDoku_Parser_Quote extends TestOfDoku_Parser { - function TestOfDoku_Parser_Quote() { - $this->UnitTestCase('TestOfDoku_Parser_Quote'); - } - function testQuote() { $this->P->addMode('quote',new Doku_Parser_Mode_Quote()); $this->P->parse("abc\n> def\n>>ghi\nklm"); @@ -25,11 +21,11 @@ class TestOfDoku_Parser_Quote extends TestOfDoku_Parser { array('cdata',array("klm")), array('p_close',array()), array('document_end',array()), - + ); - $this->assertEqual(array_map('stripbyteindex',$this->H->calls),$calls); + $this->assertEquals(array_map('stripbyteindex',$this->H->calls),$calls); } - + function testQuoteWinCr() { $this->P->addMode('quote',new Doku_Parser_Mode_Quote()); $this->P->parse("abc\r\n> def\r\n>>ghi\r\nklm"); @@ -48,11 +44,11 @@ class TestOfDoku_Parser_Quote extends TestOfDoku_Parser { array('cdata',array("klm")), array('p_close',array()), array('document_end',array()), - + ); - $this->assertEqual(array_map('stripbyteindex',$this->H->calls),$calls); + $this->assertEquals(array_map('stripbyteindex',$this->H->calls),$calls); } - + function testQuoteMinumumContext() { $this->P->addMode('quote',new Doku_Parser_Mode_Quote()); $this->P->parse("\n> def\n>>ghi\n "); @@ -65,11 +61,11 @@ class TestOfDoku_Parser_Quote extends TestOfDoku_Parser { array('quote_close',array()), array('quote_close',array()), array('document_end',array()), - + ); - $this->assertEqual(array_map('stripbyteindex',$this->H->calls),$calls); + $this->assertEquals(array_map('stripbyteindex',$this->H->calls),$calls); } - + function testQuoteEol() { $this->P->addMode('quote',new Doku_Parser_Mode_Quote()); $this->P->addMode('eol',new Doku_Parser_Mode_Eol()); @@ -89,9 +85,9 @@ class TestOfDoku_Parser_Quote extends TestOfDoku_Parser { array('cdata',array("klm")), array('p_close',array()), array('document_end',array()), - + ); - $this->assertEqual(array_map('stripbyteindex',$this->H->calls),$calls); + $this->assertEquals(array_map('stripbyteindex',$this->H->calls),$calls); } } diff --git a/_test/cases/inc/parser/parser_quotes.test.php b/_test/tests/inc/parser/parser_quotes.test.php similarity index 86% rename from _test/cases/inc/parser/parser_quotes.test.php rename to _test/tests/inc/parser/parser_quotes.test.php index 77e323799e87874a3bfeb64831b90f574e4c6c1f..b2dae1039a68eb8b4ae771a0b7ac51f1afc36868 100644 --- a/_test/cases/inc/parser/parser_quotes.test.php +++ b/_test/tests/inc/parser/parser_quotes.test.php @@ -9,10 +9,6 @@ class TestOfDoku_Parser_Quotes extends TestOfDoku_Parser { $conf['typography'] = 2; } - function TestOfDoku_Parser_Quotes() { - $this->UnitTestCase('TestOfDoku_Parser_Quotes'); - } - function testSingleQuoteOpening() { $this->P->addMode('quotes',new Doku_Parser_Mode_Quotes()); $this->P->parse("Foo 'hello Bar"); @@ -27,7 +23,7 @@ class TestOfDoku_Parser_Quotes extends TestOfDoku_Parser { array('document_end',array()), ); - $this->assertEqual(array_map('stripbyteindex',$this->H->calls),$calls); + $this->assertEquals(array_map('stripbyteindex',$this->H->calls),$calls); } function testSingleQuoteOpeningSpecial() { @@ -44,7 +40,7 @@ class TestOfDoku_Parser_Quotes extends TestOfDoku_Parser { array('document_end',array()), ); - $this->assertEqual(array_map('stripbyteindex',$this->H->calls),$calls); + $this->assertEquals(array_map('stripbyteindex',$this->H->calls),$calls); } function testSingleQuoteClosing() { @@ -61,7 +57,7 @@ class TestOfDoku_Parser_Quotes extends TestOfDoku_Parser { array('document_end',array()), ); - $this->assertEqual(array_map('stripbyteindex',$this->H->calls),$calls); + $this->assertEquals(array_map('stripbyteindex',$this->H->calls),$calls); } function testSingleQuoteClosingSpecial() { @@ -78,7 +74,7 @@ class TestOfDoku_Parser_Quotes extends TestOfDoku_Parser { array('document_end',array()), ); - $this->assertEqual(array_map('stripbyteindex',$this->H->calls),$calls); + $this->assertEquals(array_map('stripbyteindex',$this->H->calls),$calls); } function testSingleQuotes() { @@ -97,7 +93,7 @@ class TestOfDoku_Parser_Quotes extends TestOfDoku_Parser { array('document_end',array()), ); - $this->assertEqual(array_map('stripbyteindex',$this->H->calls),$calls); + $this->assertEquals(array_map('stripbyteindex',$this->H->calls),$calls); } function testApostrophe() { @@ -114,7 +110,7 @@ class TestOfDoku_Parser_Quotes extends TestOfDoku_Parser { array('document_end',array()), ); - $this->assertEqual(array_map('stripbyteindex',$this->H->calls),$calls); + $this->assertEquals(array_map('stripbyteindex',$this->H->calls),$calls); } @@ -134,7 +130,7 @@ class TestOfDoku_Parser_Quotes extends TestOfDoku_Parser { array('document_end',array()), ); - $this->assertEqual(array_map('stripbyteindex',$this->H->calls),$calls); + $this->assertEquals(array_map('stripbyteindex',$this->H->calls),$calls); } function testDoubleQuoteOpening() { @@ -151,7 +147,7 @@ class TestOfDoku_Parser_Quotes extends TestOfDoku_Parser { array('document_end',array()), ); - $this->assertEqual(array_map('stripbyteindex',$this->H->calls),$calls); + $this->assertEquals(array_map('stripbyteindex',$this->H->calls),$calls); } function testDoubleQuoteOpeningSpecial() { @@ -168,7 +164,7 @@ class TestOfDoku_Parser_Quotes extends TestOfDoku_Parser { array('document_end',array()), ); - $this->assertEqual(array_map('stripbyteindex',$this->H->calls),$calls); + $this->assertEquals(array_map('stripbyteindex',$this->H->calls),$calls); } function testDoubleQuoteClosing() { @@ -185,7 +181,7 @@ class TestOfDoku_Parser_Quotes extends TestOfDoku_Parser { array('document_end',array()), ); - $this->assertEqual(array_map('stripbyteindex',$this->H->calls),$calls); + $this->assertEquals(array_map('stripbyteindex',$this->H->calls),$calls); } function testDoubleQuoteClosingSpecial() { @@ -202,7 +198,7 @@ class TestOfDoku_Parser_Quotes extends TestOfDoku_Parser { array('document_end',array()), ); - $this->assertEqual(array_map('stripbyteindex',$this->H->calls),$calls); + $this->assertEquals(array_map('stripbyteindex',$this->H->calls),$calls); } function testDoubleQuotes() { @@ -221,7 +217,7 @@ class TestOfDoku_Parser_Quotes extends TestOfDoku_Parser { array('document_end',array()), ); - $this->assertEqual(array_map('stripbyteindex',$this->H->calls),$calls); + $this->assertEquals(array_map('stripbyteindex',$this->H->calls),$calls); } function testDoubleQuotesSpecial() { @@ -240,7 +236,7 @@ class TestOfDoku_Parser_Quotes extends TestOfDoku_Parser { array('document_end',array()), ); - $this->assertEqual(array_map('stripbyteindex',$this->H->calls),$calls); + $this->assertEquals(array_map('stripbyteindex',$this->H->calls),$calls); } function testAllQuotes() { @@ -266,7 +262,7 @@ class TestOfDoku_Parser_Quotes extends TestOfDoku_Parser { array('document_end',array()), ); - $this->assertEqual(array_map('stripbyteindex',$this->H->calls),$calls); + $this->assertEquals(array_map('stripbyteindex',$this->H->calls),$calls); } } diff --git a/_test/cases/inc/parser/parser_replacements.test.php b/_test/tests/inc/parser/parser_replacements.test.php similarity index 86% rename from _test/cases/inc/parser/parser_replacements.test.php rename to _test/tests/inc/parser/parser_replacements.test.php index d277560c742754b94df2232271164ab4e17258a0..f0367dac05737f949af683b93378c7465fc3436e 100644 --- a/_test/cases/inc/parser/parser_replacements.test.php +++ b/_test/tests/inc/parser/parser_replacements.test.php @@ -3,11 +3,6 @@ require_once 'parser.inc.php'; class TestOfDoku_Parser_Replacements extends TestOfDoku_Parser { - function TestOfDoku_Parser_Replacements() { - $this->UnitTestCase('TestOfDoku_Parser_Replacements'); - } - - function testSingleAcronym() { $this->P->addMode('acronym',new Doku_Parser_Mode_Acronym(array('FOOBAR'))); $this->P->parse('abc FOOBAR xyz'); @@ -22,7 +17,7 @@ class TestOfDoku_Parser_Replacements extends TestOfDoku_Parser { array('document_end',array()), ); - $this->assertEqual(array_map('stripbyteindex',$this->H->calls),$calls); + $this->assertEquals(array_map('stripbyteindex',$this->H->calls),$calls); } function testAlmostAnAcronym() { @@ -37,7 +32,7 @@ class TestOfDoku_Parser_Replacements extends TestOfDoku_Parser { array('document_end',array()), ); - $this->assertEqual(array_map('stripbyteindex',$this->H->calls),$calls); + $this->assertEquals(array_map('stripbyteindex',$this->H->calls),$calls); } function testPickAcronymCorrectly() { @@ -54,7 +49,7 @@ class TestOfDoku_Parser_Replacements extends TestOfDoku_Parser { array('document_end',array()), ); - $this->assertEqual(array_map('stripbyteindex',$this->H->calls),$calls); + $this->assertEquals(array_map('stripbyteindex',$this->H->calls),$calls); } function testMultipleAcronyms() { @@ -73,7 +68,7 @@ class TestOfDoku_Parser_Replacements extends TestOfDoku_Parser { array('document_end',array()), ); - $this->assertEqual(array_map('stripbyteindex',$this->H->calls),$calls); + $this->assertEquals(array_map('stripbyteindex',$this->H->calls),$calls); } @@ -97,7 +92,7 @@ class TestOfDoku_Parser_Replacements extends TestOfDoku_Parser { array('document_end',array()), ); - $this->assertEqual(array_map('stripbyteindex',$this->H->calls),$calls); + $this->assertEquals(array_map('stripbyteindex',$this->H->calls),$calls); } function testMultipleAcronymsWithSubset2() { @@ -120,7 +115,7 @@ class TestOfDoku_Parser_Replacements extends TestOfDoku_Parser { array('document_end',array()), ); - $this->assertEqual(array_map('stripbyteindex',$this->H->calls),$calls); + $this->assertEquals(array_map('stripbyteindex',$this->H->calls),$calls); } function testSingleSmileyFail() { @@ -135,7 +130,7 @@ class TestOfDoku_Parser_Replacements extends TestOfDoku_Parser { array('document_end',array()), ); - $this->assertEqual(array_map('stripbyteindex',$this->H->calls),$calls); + $this->assertEquals(array_map('stripbyteindex',$this->H->calls),$calls); } function testSingleSmiley() { @@ -152,7 +147,7 @@ class TestOfDoku_Parser_Replacements extends TestOfDoku_Parser { array('document_end',array()), ); - $this->assertEqual(array_map('stripbyteindex',$this->H->calls),$calls); + $this->assertEquals(array_map('stripbyteindex',$this->H->calls),$calls); } function testMultipleSmileysFail() { @@ -167,7 +162,7 @@ class TestOfDoku_Parser_Replacements extends TestOfDoku_Parser { array('document_end',array()), ); - $this->assertEqual(array_map('stripbyteindex',$this->H->calls),$calls); + $this->assertEquals(array_map('stripbyteindex',$this->H->calls),$calls); } function testMultipleSmileys() { @@ -186,7 +181,7 @@ class TestOfDoku_Parser_Replacements extends TestOfDoku_Parser { array('document_end',array()), ); - $this->assertEqual(array_map('stripbyteindex',$this->H->calls),$calls); + $this->assertEquals(array_map('stripbyteindex',$this->H->calls),$calls); } function testBackslashSmileyFail() { @@ -202,7 +197,7 @@ class TestOfDoku_Parser_Replacements extends TestOfDoku_Parser { array('document_end',array()), ); - $this->assertEqual(array_map('stripbyteindex',$this->H->calls),$calls); + $this->assertEquals(array_map('stripbyteindex',$this->H->calls),$calls); } function testBackslashSmiley() { @@ -220,7 +215,7 @@ class TestOfDoku_Parser_Replacements extends TestOfDoku_Parser { array('document_end',array()), ); - $this->assertEqual(array_map('stripbyteindex',$this->H->calls),$calls); + $this->assertEquals(array_map('stripbyteindex',$this->H->calls),$calls); } function testSingleWordblock() { @@ -237,7 +232,7 @@ class TestOfDoku_Parser_Replacements extends TestOfDoku_Parser { array('document_end',array()), ); - $this->assertEqual(array_map('stripbyteindex',$this->H->calls),$calls); + $this->assertEquals(array_map('stripbyteindex',$this->H->calls),$calls); } function testWordblockCase() { @@ -254,7 +249,7 @@ class TestOfDoku_Parser_Replacements extends TestOfDoku_Parser { array('document_end',array()), ); - $this->assertEqual(array_map('stripbyteindex',$this->H->calls),$calls); + $this->assertEquals(array_map('stripbyteindex',$this->H->calls),$calls); } function testMultipleWordblock() { @@ -273,7 +268,7 @@ class TestOfDoku_Parser_Replacements extends TestOfDoku_Parser { array('document_end',array()), ); - $this->assertEqual(array_map('stripbyteindex',$this->H->calls),$calls); + $this->assertEquals(array_map('stripbyteindex',$this->H->calls),$calls); } function testSingleEntity() { @@ -290,7 +285,7 @@ class TestOfDoku_Parser_Replacements extends TestOfDoku_Parser { array('document_end',array()), ); - $this->assertEqual(array_map('stripbyteindex',$this->H->calls),$calls); + $this->assertEquals(array_map('stripbyteindex',$this->H->calls),$calls); } function testMultipleEntities() { @@ -309,7 +304,7 @@ class TestOfDoku_Parser_Replacements extends TestOfDoku_Parser { array('document_end',array()), ); - $this->assertEqual(array_map('stripbyteindex',$this->H->calls),$calls); + $this->assertEquals(array_map('stripbyteindex',$this->H->calls),$calls); } function testMultiplyEntity() { @@ -326,7 +321,7 @@ class TestOfDoku_Parser_Replacements extends TestOfDoku_Parser { array('document_end',array()), ); - $this->assertEqual(array_map('stripbyteindex',$this->H->calls),$calls); + $this->assertEquals(array_map('stripbyteindex',$this->H->calls),$calls); } function testMultiplyEntityHex() { @@ -342,7 +337,7 @@ class TestOfDoku_Parser_Replacements extends TestOfDoku_Parser { array('document_end',array()), ); - $this->assertEqual(array_map('stripbyteindex',$this->H->calls),$calls); + $this->assertEquals(array_map('stripbyteindex',$this->H->calls),$calls); } function testHR() { @@ -360,7 +355,7 @@ class TestOfDoku_Parser_Replacements extends TestOfDoku_Parser { array('p_close',array()), array('document_end',array()), ); - $this->assertEqual(array_map('stripbyteindex',$this->H->calls),$calls); + $this->assertEquals(array_map('stripbyteindex',$this->H->calls),$calls); } function testHREol() { @@ -378,7 +373,7 @@ class TestOfDoku_Parser_Replacements extends TestOfDoku_Parser { array('p_close',array()), array('document_end',array()), ); - $this->assertEqual(array_map('stripbyteindex',$this->H->calls),$calls); + $this->assertEquals(array_map('stripbyteindex',$this->H->calls),$calls); } } diff --git a/_test/cases/inc/parser/parser_table.test.php b/_test/tests/inc/parser/parser_table.test.php similarity index 95% rename from _test/cases/inc/parser/parser_table.test.php rename to _test/tests/inc/parser/parser_table.test.php index 12898860cdbc775c6c287132aaecb622c9947171..96789c38c9c8b06ce44b9b27ef2061c2dc2a86ff 100644 --- a/_test/cases/inc/parser/parser_table.test.php +++ b/_test/tests/inc/parser/parser_table.test.php @@ -3,10 +3,6 @@ require_once 'parser.inc.php'; class TestOfDoku_Parser_Table extends TestOfDoku_Parser { - function TestOfDoku_Parser_Table() { - $this->UnitTestCase('TestOfDoku_Parser_Table'); - } - function testTable() { $this->P->addMode('table',new Doku_Parser_Mode_Table()); $this->P->parse(' @@ -48,7 +44,7 @@ def'); array('p_close',array()), array('document_end',array()), ); - $this->assertEqual(array_map('stripbyteindex',$this->H->calls),$calls); + $this->assertEquals(array_map('stripbyteindex',$this->H->calls),$calls); } function testTableWinEOL() { @@ -88,7 +84,7 @@ def'); array('p_close',array()), array('document_end',array()), ); - $this->assertEqual(array_map('stripbyteindex',$this->H->calls),$calls); + $this->assertEquals(array_map('stripbyteindex',$this->H->calls),$calls); } function testEmptyTable() { @@ -113,7 +109,7 @@ def'); array('document_end',array()), ); - $this->assertEqual(array_map('stripbyteindex',$this->H->calls),$calls); + $this->assertEquals(array_map('stripbyteindex',$this->H->calls),$calls); } function testTableHeaders() { @@ -147,7 +143,7 @@ def'); array('document_end',array()), ); - $this->assertEqual(array_map('stripbyteindex',$this->H->calls),$calls); + $this->assertEquals(array_map('stripbyteindex',$this->H->calls),$calls); } @@ -182,7 +178,7 @@ def'); array('document_end',array()), ); - $this->assertEqual(array_map('stripbyteindex',$this->H->calls),$calls); + $this->assertEquals(array_map('stripbyteindex',$this->H->calls),$calls); } function testCellSpan() { @@ -224,7 +220,7 @@ def'); array('p_close',array()), array('document_end',array()), ); - $this->assertEqual(array_map('stripbyteindex',$this->H->calls),$calls); + $this->assertEquals(array_map('stripbyteindex',$this->H->calls),$calls); } function testCellRowSpan() { @@ -272,7 +268,7 @@ def'); array('p_close',array()), array('document_end',array()), ); - $this->assertEqual(array_map('stripbyteindex',$this->H->calls),$calls); + $this->assertEquals(array_map('stripbyteindex',$this->H->calls),$calls); } function testCellAlignmentFormatting() { @@ -311,7 +307,7 @@ def'); array('document_end',array()), ); - $this->assertEqual(array_map('stripbyteindex',$this->H->calls),$calls); + $this->assertEquals(array_map('stripbyteindex',$this->H->calls),$calls); } @@ -357,7 +353,7 @@ def'); array('p_close',array()), array('document_end',array()), ); - $this->assertEqual(array_map('stripbyteindex',$this->H->calls),$calls); + $this->assertEquals(array_map('stripbyteindex',$this->H->calls),$calls); } // This is really a failing test - formatting able to spread across cols @@ -412,7 +408,7 @@ def'); array('p_close',array()), array('document_end',array()), ); - $this->assertEqual(array_map('stripbyteindex',$this->H->calls),$calls); + $this->assertEquals(array_map('stripbyteindex',$this->H->calls),$calls); } // This is really a failing test - unformatted able to spread across cols @@ -463,7 +459,7 @@ def'); array('p_close',array()), array('document_end',array()), ); - $this->assertEqual(array_map('stripbyteindex',$this->H->calls),$calls); + $this->assertEquals(array_map('stripbyteindex',$this->H->calls),$calls); } function testTableLinebreak() { @@ -511,7 +507,7 @@ def'); array('document_end',array()), ); - $this->assertEqual(array_map('stripbyteindex',$this->H->calls),$calls); + $this->assertEquals(array_map('stripbyteindex',$this->H->calls),$calls); } // This is really a failing test - footnote able to spread across cols @@ -570,7 +566,7 @@ def'); array('p_close',array()), array('document_end',array()), ); - $this->assertEqual(array_map('stripbyteindex',$this->H->calls),$calls); + $this->assertEquals(array_map('stripbyteindex',$this->H->calls),$calls); } } diff --git a/_test/cases/inc/parser/parser_unformatted.test.php b/_test/tests/inc/parser/parser_unformatted.test.php similarity index 78% rename from _test/cases/inc/parser/parser_unformatted.test.php rename to _test/tests/inc/parser/parser_unformatted.test.php index dd69564b4443b332e0581006e8ea34f29cbcfb43..f20ba5e8b3cdaa34292f4de3323ed1fefb9f04c5 100644 --- a/_test/cases/inc/parser/parser_unformatted.test.php +++ b/_test/tests/inc/parser/parser_unformatted.test.php @@ -2,11 +2,7 @@ require_once 'parser.inc.php'; class TestOfDoku_Parser_Unformatted extends TestOfDoku_Parser { - - function TestOfDoku_Parser_Unformatted() { - $this->UnitTestCase('TestOfDoku_Parser_Unformatted'); - } - + function testNowiki() { $this->P->addMode('unformatted',new Doku_Parser_Mode_Unformatted()); $this->P->parse("Foo <nowiki>testing</nowiki> Bar"); @@ -20,10 +16,10 @@ class TestOfDoku_Parser_Unformatted extends TestOfDoku_Parser { array('document_end',array()), ); - $this->assertEqual(array_map('stripByteIndex',$this->H->calls),$calls); - + $this->assertEquals(array_map('stripByteIndex',$this->H->calls),$calls); + } - + function testDoublePercent() { $this->P->addMode('unformatted',new Doku_Parser_Mode_Unformatted()); $this->P->parse("Foo %%testing%% Bar"); @@ -36,7 +32,7 @@ class TestOfDoku_Parser_Unformatted extends TestOfDoku_Parser { array('p_close',array()), array('document_end',array()), ); - $this->assertEqual(array_map('stripByteIndex',$this->H->calls),$calls); + $this->assertEquals(array_map('stripByteIndex',$this->H->calls),$calls); } } diff --git a/_test/cases/inc/parserutils_set_metadata_during_rendering.test.php b/_test/tests/inc/parserutils_set_metadata_during_rendering.test.php similarity index 85% rename from _test/cases/inc/parserutils_set_metadata_during_rendering.test.php rename to _test/tests/inc/parserutils_set_metadata_during_rendering.test.php index 8319da2983ae1c29183a6f9c928eb8f4eacb6713..0683848f154d56ce55f19b2f7dcc1d91370dd177 100644 --- a/_test/cases/inc/parserutils_set_metadata_during_rendering.test.php +++ b/_test/tests/inc/parserutils_set_metadata_during_rendering.test.php @@ -1,8 +1,6 @@ <?php -require_once DOKU_INC.'inc/init.php'; - -class parserutils_set_metadata_during_rendering_test extends UnitTestCase { +class parserutils_set_metadata_during_rendering_test extends DokuWikiTest { // the id used for this test case private $id; // if the test case is currently running @@ -35,15 +33,15 @@ class parserutils_set_metadata_during_rendering_test extends UnitTestCase { $plugin_controller = $this->plugin_controller; // assert that all three calls to p_set_metadata have been successful - $this->assertEqual($newMeta['test_before_set'], 'test'); - $this->assertEqual($newMeta['test_after_set'], 'test'); - $this->assertEqual($newMeta['test_during_rendering'], 'test'); + $this->assertEquals($newMeta['test_before_set'], 'test'); + $this->assertEquals($newMeta['test_after_set'], 'test'); + $this->assertEquals($newMeta['test_during_rendering'], 'test'); // clean up $this->active = false; // make sure the saved metadata is the one that has been rendered - $this->assertEqual($newMeta, p_get_metadata($this->id)); + $this->assertEquals($newMeta, p_get_metadata($this->id)); saveWikiText($this->id, '', 'Test data remove'); } @@ -55,7 +53,7 @@ class parserutils_set_metadata_during_rendering_test extends UnitTestCase { $key = array_pop(array_keys($meta)); $this->assertTrue(is_string($meta[$key])); // ensure we really have a key // ensure that the metadata property hasn't been set previously - $this->assertNotEqual($meta[$key], p_get_metadata($this->id, $key)); + $this->assertNotEquals($meta[$key], p_get_metadata($this->id, $key)); } } @@ -71,7 +69,7 @@ class parserutils_set_metadata_during_rendering_test extends UnitTestCase { $key = 'test_during_rendering'; p_set_metadata($this->id, array($key => 'test'), false, true); // ensure that the metadata property hasn't been set previously - $this->assertNotEqual($key, p_get_metadata($this->id, $key)); + $this->assertNotEquals($key, p_get_metadata($this->id, $key)); } } diff --git a/_test/cases/inc/remote.test.php b/_test/tests/inc/remote.test.php similarity index 80% rename from _test/cases/inc/remote.test.php rename to _test/tests/inc/remote.test.php index f03d13ce1453c30280e0123f8ed139450f952428..49152d8dbb9658c65d04f6706a93b4625765592a 100644 --- a/_test/cases/inc/remote.test.php +++ b/_test/tests/inc/remote.test.php @@ -1,11 +1,5 @@ <?php -require_once DOKU_INC . 'inc/init.php'; -require_once DOKU_INC . 'inc/RemoteAPICore.php'; -require_once DOKU_INC . 'inc/auth/basic.class.php'; - -Mock::generate('Doku_Plugin_Controller'); - class MockAuth extends auth_basic { function isCaseSensitive() { return true; } } @@ -116,7 +110,7 @@ class remote_plugin_testplugin extends DokuWiki_Remote_Plugin { } -class remote_test extends UnitTestCase { +class remote_test extends DokuWikiTest { var $originalConf; var $userinfo; @@ -130,9 +124,11 @@ class remote_test extends UnitTestCase { global $auth; parent::setUp(); - $pluginManager = new MockDoku_Plugin_Controller(); - $pluginManager->setReturnValue('getList', array('testplugin')); - $pluginManager->setReturnValue('load', new remote_plugin_testplugin()); + + $pluginManager = $this->getMock('Doku_Plugin_Controller'); + $pluginManager->expects($this->any())->method('getList')->will($this->returnValue(array('testplugin'))); + $pluginManager->expects($this->any())->method('load')->will($this->returnValue(new remote_plugin_testplugin())); + $plugin_controller = $pluginManager; $this->originalConf = $conf; @@ -160,7 +156,7 @@ class remote_test extends UnitTestCase { sort($actual); $expect = array('plugin.testplugin.method1', 'plugin.testplugin.method2', 'plugin.testplugin.methodString', 'plugin.testplugin.method2ext', 'plugin.testplugin.publicCall'); sort($expect); - $this->assertEqual($expect,$actual); + $this->assertEquals($expect,$actual); } function test_hasAccessSuccess() { @@ -213,10 +209,12 @@ class remote_test extends UnitTestCase { $this->remote->forceAccess(); // no exception should occur } + /** + * @expectedException RemoteException + */ function test_forceAccessFail() { global $conf; $conf['remote'] = 0; - $this->expectException('RemoteException'); $this->remote->forceAccess(); } @@ -226,21 +224,23 @@ class remote_test extends UnitTestCase { $remoteApi = new RemoteApi(); $remoteApi->getCoreMethods(new RemoteAPICoreTest()); - $this->assertEqual($remoteApi->call('wiki.stringTestMethod'), 'success'); - $this->assertEqual($remoteApi->call('wiki.intTestMethod'), 42); - $this->assertEqual($remoteApi->call('wiki.floatTestMethod'), 3.14159265); - $this->assertEqual($remoteApi->call('wiki.dateTestMethod'), 2623452346); - $this->assertEqual($remoteApi->call('wiki.fileTestMethod'), 'file content'); - $this->assertEqual($remoteApi->call('wiki.voidTestMethod'), null); + $this->assertEquals($remoteApi->call('wiki.stringTestMethod'), 'success'); + $this->assertEquals($remoteApi->call('wiki.intTestMethod'), 42); + $this->assertEquals($remoteApi->call('wiki.floatTestMethod'), 3.14159265); + $this->assertEquals($remoteApi->call('wiki.dateTestMethod'), 2623452346); + $this->assertEquals($remoteApi->call('wiki.fileTestMethod'), 'file content'); + $this->assertEquals($remoteApi->call('wiki.voidTestMethod'), null); } + /** + * @expectedException RemoteException + */ function test_generalCoreFunctionOnArgumentMismatch() { global $conf; $conf['remote'] = 1; $remoteApi = new RemoteApi(); $remoteApi->getCoreMethods(new RemoteAPICoreTest()); - $this->expectException('RemoteException'); $remoteApi->call('wiki.voidTestMethod', array('something')); } @@ -251,10 +251,10 @@ class remote_test extends UnitTestCase { $remoteApi = new RemoteApi(); $remoteApi->getCoreMethods(new RemoteAPICoreTest()); - $this->assertEqual($remoteApi->call('wiki.oneStringArgMethod', array('string')), 'string'); - $this->assertEqual($remoteApi->call('wiki.twoArgMethod', array('string', 1)), array('string' , 1)); - $this->assertEqual($remoteApi->call('wiki.twoArgWithDefaultArg', array('string')), array('string', 'default')); - $this->assertEqual($remoteApi->call('wiki.twoArgWithDefaultArg', array('string', 'another')), array('string', 'another')); + $this->assertEquals($remoteApi->call('wiki.oneStringArgMethod', array('string')), 'string'); + $this->assertEquals($remoteApi->call('wiki.twoArgMethod', array('string', 1)), array('string' , 1)); + $this->assertEquals($remoteApi->call('wiki.twoArgWithDefaultArg', array('string')), array('string', 'default')); + $this->assertEquals($remoteApi->call('wiki.twoArgWithDefaultArg', array('string', 'another')), array('string', 'another')); } function test_pluginCallMethods() { @@ -262,18 +262,20 @@ class remote_test extends UnitTestCase { $conf['remote'] = 1; $remoteApi = new RemoteApi(); - $this->assertEqual($remoteApi->call('plugin.testplugin.method1'), null); - $this->assertEqual($remoteApi->call('plugin.testplugin.method2', array('string', 7)), array('string', 7, false)); - $this->assertEqual($remoteApi->call('plugin.testplugin.method2ext', array('string', 7, true)), array('string', 7, true)); - $this->assertEqual($remoteApi->call('plugin.testplugin.methodString'), 'success'); + $this->assertEquals($remoteApi->call('plugin.testplugin.method1'), null); + $this->assertEquals($remoteApi->call('plugin.testplugin.method2', array('string', 7)), array('string', 7, false)); + $this->assertEquals($remoteApi->call('plugin.testplugin.method2ext', array('string', 7, true)), array('string', 7, true)); + $this->assertEquals($remoteApi->call('plugin.testplugin.methodString'), 'success'); } + /** + * @expectedException RemoteException + */ function test_notExistingCall() { global $conf; $conf['remote'] = 1; $remoteApi = new RemoteApi(); - $this->expectException('RemoteException'); $remoteApi->call('dose not exist'); } @@ -292,30 +294,34 @@ class remote_test extends UnitTestCase { $this->assertTrue($remoteApi->call('plugin.testplugin.publicCall')); } + /** + * @expectedException RemoteAccessDeniedException + */ function test_publicCallCoreDeny() { global $conf; $conf['useacl'] = 1; $remoteApi = new RemoteApi(); $remoteApi->getCoreMethods(new RemoteAPICoreTest()); - $this->expectException('RemoteAccessDeniedException'); $remoteApi->call('wiki.stringTestMethod'); } + /** + * @expectedException RemoteAccessDeniedException + */ function test_publicCallPluginDeny() { global $conf; $conf['useacl'] = 1; $remoteApi = new RemoteApi(); - $this->expectException('RemoteAccessDeniedException'); $remoteApi->call('plugin.testplugin.methodString'); } function test_pluginCallCustomPath() { global $EVENT_HANDLER; - $EVENT_HANDLER->register_hook('RPC_CALL_ADD', 'BEFORE', &$this, 'pluginCallCustomPathRegister'); + $EVENT_HANDLER->register_hook('RPC_CALL_ADD', 'BEFORE', $this, 'pluginCallCustomPathRegister'); $remoteApi = new RemoteAPI(); $result = $remoteApi->call('custom.path'); - $this->assertEqual($result, 'success'); + $this->assertEquals($result, 'success'); } function pluginCallCustomPathRegister(&$event, $param) { diff --git a/_test/cases/inc/safefn.test.php b/_test/tests/inc/safefn.test.php similarity index 85% rename from _test/cases/inc/safefn.test.php rename to _test/tests/inc/safefn.test.php index 1227e55783dbf38c37c3785c81787cb752dc5457..175b72dfc72ba0bf1931ff838fc1bae5d5422d25 100644 --- a/_test/cases/inc/safefn.test.php +++ b/_test/tests/inc/safefn.test.php @@ -1,10 +1,8 @@ <?php // use no mbstring help here if(!defined('UTF8_NOMBSTRING')) define('UTF8_NOMBSTRING',1); -require_once DOKU_INC.'inc/utf8.php'; -require_once DOKU_INC.'inc/SafeFN.class.php'; -class safeFN_test extends UnitTestCase { +class safeFN_test extends DokuWikiTest { function test1(){ @@ -30,17 +28,17 @@ class safeFN_test extends UnitTestCase { foreach($tests as $test){ list($utf8,$safe) = $test; - $this->assertEqual(SafeFN::encode($utf8),$safe); - $this->assertEqual(SafeFN::decode($safe),$utf8); + $this->assertEquals(SafeFN::encode($utf8),$safe); + $this->assertEquals(SafeFN::decode($safe),$utf8); } } - + function test2(){ $tests[] = array('ÑовмеÑтимаÑ','%td%ta%sy%t8%t1%td%te%t4%t8%sw%tr'); foreach($tests as $test){ list($utf8,$safe) = $test; - $this->assertEqual(SafeFN::decode($safe),$utf8); + $this->assertEquals(SafeFN::decode($safe),$utf8); } } diff --git a/_test/tests/inc/search/data/ns1/ns3/page3.txt b/_test/tests/inc/search/data/ns1/ns3/page3.txt new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/_test/tests/inc/search/data/ns1/page1.txt b/_test/tests/inc/search/data/ns1/page1.txt new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/_test/tests/inc/search/data/ns1/page2.txt b/_test/tests/inc/search/data/ns1/page2.txt new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/_test/tests/inc/search/data/ns2/nopage.ext b/_test/tests/inc/search/data/ns2/nopage.ext new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/_test/tests/inc/search/data/ns2/page1.txt b/_test/tests/inc/search/data/ns2/page1.txt new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/_test/cases/inc/search/search.test.php b/_test/tests/inc/search/search.test.php similarity index 92% rename from _test/cases/inc/search/search.test.php rename to _test/tests/inc/search/search.test.php index a6f15e9b68eb7495887689c9bb8411bd78a79339..33cc80e744427e1645fb7a4049879a2d42aff1f5 100644 --- a/_test/cases/inc/search/search.test.php +++ b/_test/tests/inc/search/search.test.php @@ -1,7 +1,6 @@ <?php -require_once DOKU_INC.'inc/search.php'; -class search_test extends UnitTestCase { +class search_test extends DokuWikiTest { function strip_index_data($entry) { $n_entry = array(); foreach(array('id', 'type', 'level', 'open') as $k) { @@ -14,7 +13,7 @@ class search_test extends UnitTestCase { $data = array(); search($data, dirname(__FILE__) . '/data', 'search_index', array('ns' => 'ns2')); - $this->assertEqual(array_map(array($this, 'strip_index_data'), $data), + $this->assertEquals(array_map(array($this, 'strip_index_data'), $data), array( array( 'id' => 'ns1', @@ -35,7 +34,7 @@ class search_test extends UnitTestCase { $data = array(); search($data, dirname(__FILE__) . '/data', 'search_index', array('ns' => 'ns1/ns3')); - $this->assertEqual(array_map(array($this, 'strip_index_data'), $data), + $this->assertEquals(array_map(array($this, 'strip_index_data'), $data), array( array( 'id' => 'ns1', @@ -76,7 +75,7 @@ class search_test extends UnitTestCase { $data = array(); search($data, dirname(__FILE__) . '/data', 'search_index', array('ns' => 'ns1/ns3', 'nofiles' => true)); - $this->assertEqual(array_map(array($this, 'strip_index_data'), $data), + $this->assertEquals(array_map(array($this, 'strip_index_data'), $data), array( array( 'id' => 'ns1', diff --git a/_test/cases/inc/utf8_correctidx.test.php b/_test/tests/inc/utf8_correctidx.test.php similarity index 85% rename from _test/cases/inc/utf8_correctidx.test.php rename to _test/tests/inc/utf8_correctidx.test.php index 20f6ba3a38252ab97710757c06dd6ed647a7705c..a704fd0e8ae04d1bc15be59913369db9021dc873 100644 --- a/_test/cases/inc/utf8_correctidx.test.php +++ b/_test/tests/inc/utf8_correctidx.test.php @@ -1,9 +1,8 @@ <?php // use no mbstring help here if(!defined('UTF8_NOMBSTRING')) define('UTF8_NOMBSTRING',1); -require_once DOKU_INC.'inc/utf8.php'; -class utf8_correctidx_test extends UnitTestCase { +class utf8_correctidx_test extends DokuWikiTest { function test_singlebyte(){ @@ -16,7 +15,7 @@ class utf8_correctidx_test extends UnitTestCase { $tests[] = array('aaживπά우리をã‚öä',1,true,1); foreach($tests as $test){ - $this->assertEqual(utf8_correctIdx($test[0],$test[1],$test[2]),$test[3]); + $this->assertEquals(utf8_correctIdx($test[0],$test[1],$test[2]),$test[3]); } } @@ -34,7 +33,7 @@ class utf8_correctidx_test extends UnitTestCase { $tests[] = array('aaживπά우리をã‚öä',4,true,4); foreach($tests as $test){ - $this->assertEqual(utf8_correctIdx($test[0],$test[1],$test[2]),$test[3]); + $this->assertEquals(utf8_correctIdx($test[0],$test[1],$test[2]),$test[3]); } } @@ -54,7 +53,7 @@ class utf8_correctidx_test extends UnitTestCase { $tests[] = array('aaживπά우리をã‚öä',13,true,13); foreach($tests as $test){ - $this->assertEqual(utf8_correctIdx($test[0],$test[1],$test[2]),$test[3]); + $this->assertEquals(utf8_correctIdx($test[0],$test[1],$test[2]),$test[3]); } } @@ -70,7 +69,7 @@ class utf8_correctidx_test extends UnitTestCase { $tests[] = array('aaживπά우리をã‚öä',128,true,29); foreach($tests as $test){ - $this->assertEqual(utf8_correctIdx($test[0],$test[1],$test[2]),$test[3]); + $this->assertEquals(utf8_correctIdx($test[0],$test[1],$test[2]),$test[3]); } } diff --git a/_test/cases/inc/utf8_html.test.php b/_test/tests/inc/utf8_html.test.php similarity index 64% rename from _test/cases/inc/utf8_html.test.php rename to _test/tests/inc/utf8_html.test.php index 3e6d35bc728a8a30b4545b0703eaae8fa19bbb72..bdebd9d4517e25bf8a47ebf7bf39e7da23ef6170 100644 --- a/_test/cases/inc/utf8_html.test.php +++ b/_test/tests/inc/utf8_html.test.php @@ -1,70 +1,68 @@ <?php -require_once DOKU_INC.'inc/utf8.php'; - // use no mbstring help here if(!defined('UTF8_NOMBSTRING')) define('UTF8_NOMBSTRING',1); -class utf8_html_test extends UnitTestCase { +class utf8_html_test extends DokuWikiTest { function test_from_1byte(){ $in = 'a'; $out = 'a'; - $this->assertEqual(utf8_tohtml($in),$out); + $this->assertEquals(utf8_tohtml($in),$out); } function test_from_2byte(){ $in = "\xc3\xbc"; $out = 'ü'; - $this->assertEqual(utf8_tohtml($in),$out); + $this->assertEquals(utf8_tohtml($in),$out); } function test_from_3byte(){ $in = "\xe2\x99\x8a"; $out = '♊'; - $this->assertEqual(utf8_tohtml($in),$out); + $this->assertEquals(utf8_tohtml($in),$out); } function test_from_4byte(){ $in = "\xf4\x80\x80\x81"; $out = '􀀁'; - $this->assertEqual(utf8_tohtml($in),$out); + $this->assertEquals(utf8_tohtml($in),$out); } function test_to_1byte(){ $out = 'a'; $in = 'a'; - $this->assertEqual(utf8_unhtml($in),$out); + $this->assertEquals(utf8_unhtml($in),$out); } function test_to_2byte(){ $out = "\xc3\xbc"; $in = 'ü'; - $this->assertEqual(utf8_unhtml($in),$out); + $this->assertEquals(utf8_unhtml($in),$out); } function test_to_3byte(){ $out = "\xe2\x99\x8a"; $in = '♊'; - $this->assertEqual(utf8_unhtml($in),$out); + $this->assertEquals(utf8_unhtml($in),$out); } function test_to_4byte(){ $out = "\xf4\x80\x80\x81"; $in = '􀀁'; - $this->assertEqual(utf8_unhtml($in),$out); + $this->assertEquals(utf8_unhtml($in),$out); } function test_without_entities(){ $out = '&#38;&#38;'; $in = '&#38;&amp;#38;'; - $this->assertEqual(utf8_unhtml($in),$out); + $this->assertEquals(utf8_unhtml($in),$out); } function test_with_entities(){ $out = '&&#38;'; $in = '&#38;&amp;#38;'; - $this->assertEqual(utf8_unhtml($in,HTML_ENTITIES),$out); + $this->assertEquals(utf8_unhtml($in,HTML_ENTITIES),$out); } } diff --git a/_test/cases/inc/utf8_kanaromaji.txt b/_test/tests/inc/utf8_kanaromaji.txt similarity index 100% rename from _test/cases/inc/utf8_kanaromaji.txt rename to _test/tests/inc/utf8_kanaromaji.txt diff --git a/_test/cases/inc/utf8_romanize.test.php b/_test/tests/inc/utf8_romanize.test.php similarity index 72% rename from _test/cases/inc/utf8_romanize.test.php rename to _test/tests/inc/utf8_romanize.test.php index 950c8842a40f96f0880a515b26dbcc42aea341af..d08346faae72e6c15fcbfc3422b112b287830d6c 100644 --- a/_test/cases/inc/utf8_romanize.test.php +++ b/_test/tests/inc/utf8_romanize.test.php @@ -1,9 +1,11 @@ <?php // use no mbstring help here if(!defined('UTF8_NOMBSTRING')) define('UTF8_NOMBSTRING',1); -require_once DOKU_INC.'inc/utf8.php'; -class utf8_romanize_test extends UnitTestCase { +/** + * @group slow + */ +class utf8_romanize_test extends PHPUnit_Framework_TestCase { /** * Check Japanese romanization @@ -17,8 +19,7 @@ class utf8_romanize_test extends UnitTestCase { list($jap,$rom) = explode(';',trim($test)); $chk = utf8_romanize($jap); - #if($chk != $rom) echo "$jap\t->\t$chk\t!=\t$rom\t($line)\n"; - $this->assertEqual($chk,$rom); + $this->assertEquals($rom,$chk,"$jap\t->\t$chk\t!=\t$rom\t($line)"); $line++; } } @@ -30,7 +31,7 @@ class utf8_romanize_test extends UnitTestCase { * @author Andreas Gohr <andi@splitbrain.org> */ function test_deaccented(){ - $this->assertEqual("a A a A a o O",utf8_romanize("Ã¥ Ã… ä Ä ä ö Ö")); + $this->assertEquals("a A a A a o O",utf8_romanize("Ã¥ Ã… ä Ä ä ö Ö")); } } //Setup VIM: ex: et ts=4 : diff --git a/_test/cases/inc/utf8_stripspecials.test.php b/_test/tests/inc/utf8_stripspecials.test.php similarity index 83% rename from _test/cases/inc/utf8_stripspecials.test.php rename to _test/tests/inc/utf8_stripspecials.test.php index 481f476506a35c94c0597ac9e5ac6b282688080e..c9dc3205fb755501cab69f299f9c1db963efdf2d 100644 --- a/_test/cases/inc/utf8_stripspecials.test.php +++ b/_test/tests/inc/utf8_stripspecials.test.php @@ -1,9 +1,8 @@ <?php // use no mbstring help here if(!defined('UTF8_NOMBSTRING')) define('UTF8_NOMBSTRING',1); -require_once DOKU_INC.'inc/utf8.php'; -class utf8_stripspecials extends UnitTestCase { +class utf8_stripspecials extends DokuWikiTest { function test1(){ @@ -20,7 +19,7 @@ class utf8_stripspecials extends UnitTestCase { $tests[] = array('string with nbsps','_','\*','string_with_nbsps'); foreach($tests as $test){ - $this->assertEqual(utf8_stripspecials($test[0],$test[1],$test[2]),$test[3]); + $this->assertEquals(utf8_stripspecials($test[0],$test[1],$test[2]),$test[3]); } } diff --git a/_test/cases/inc/utf8_substr.test.php b/_test/tests/inc/utf8_substr.test.php similarity index 83% rename from _test/cases/inc/utf8_substr.test.php rename to _test/tests/inc/utf8_substr.test.php index 2806d34f10008276563eb7c03048184335b3f19c..758e8c9d4ce12ab0f6059226cf5c87186178d74c 100644 --- a/_test/cases/inc/utf8_substr.test.php +++ b/_test/tests/inc/utf8_substr.test.php @@ -1,9 +1,8 @@ <?php // use no mbstring help here if(!defined('UTF8_NOMBSTRING')) define('UTF8_NOMBSTRING',1); -require_once DOKU_INC.'inc/utf8.php'; -class utf8_substr_test extends UnitTestCase { +class utf8_substr_test extends DokuWikiTest { function test1(){ @@ -22,7 +21,7 @@ class utf8_substr_test extends UnitTestCase { $tests[] = array('живπά우리をã‚öä',-6,-2,'우리をã‚'); foreach($tests as $test){ - $this->assertEqual(utf8_substr($test[0],$test[1],$test[2]),$test[3]); + $this->assertEquals(utf8_substr($test[0],$test[1],$test[2]),$test[3]); } } @@ -35,7 +34,7 @@ class utf8_substr_test extends UnitTestCase { $tests[] = array($str,0,66002,$str); foreach($tests as $test){ - $this->assertEqual(utf8_substr($test[0],$test[1],$test[2]),$test[3]); + $this->assertEquals(utf8_substr($test[0],$test[1],$test[2]),$test[3]); } } diff --git a/_test/cases/inc/utf8_unicode.test.php b/_test/tests/inc/utf8_unicode.test.php similarity index 62% rename from _test/cases/inc/utf8_unicode.test.php rename to _test/tests/inc/utf8_unicode.test.php index 424f47d11e25513d96b12a1d2e1e4eb745d536b4..fde8c5d0261f0af2ddb0d3d61a1bf1c944de07a4 100644 --- a/_test/cases/inc/utf8_unicode.test.php +++ b/_test/tests/inc/utf8_unicode.test.php @@ -1,58 +1,56 @@ <?php -require_once DOKU_INC.'inc/utf8.php'; - // use no mbstring help here if(!defined('UTF8_NOMBSTRING')) define('UTF8_NOMBSTRING',1); -class utf8_unicode_test extends UnitTestCase { +class utf8_unicode_test extends DokuWikiTest { function test_from_1byte(){ $in = 'a'; $out = array(97); - $this->assertEqual(utf8_to_unicode($in),$out); + $this->assertEquals(utf8_to_unicode($in),$out); } function test_from_2byte(){ $in = "\xc3\xbc"; $out = array(252); - $this->assertEqual(utf8_to_unicode($in),$out); + $this->assertEquals(utf8_to_unicode($in),$out); } function test_from_3byte(){ $in = "\xe2\x99\x8a"; $out = array(9802); - $this->assertEqual(utf8_to_unicode($in),$out); + $this->assertEquals(utf8_to_unicode($in),$out); } function test_from_4byte(){ $in = "\xf4\x80\x80\x81"; $out = array(1048577); - $this->assertEqual(utf8_to_unicode($in),$out); + $this->assertEquals(utf8_to_unicode($in),$out); } function test_to_1byte(){ $out = 'a'; $in = array(97); - $this->assertEqual(unicode_to_utf8($in),$out); + $this->assertEquals(unicode_to_utf8($in),$out); } function test_to_2byte(){ $out = "\xc3\xbc"; $in = array(252); - $this->assertEqual(unicode_to_utf8($in),$out); + $this->assertEquals(unicode_to_utf8($in),$out); } function test_to_3byte(){ $out = "\xe2\x99\x8a"; $in = array(9802); - $this->assertEqual(unicode_to_utf8($in),$out); + $this->assertEquals(unicode_to_utf8($in),$out); } function test_to_4byte(){ $out = "\xf4\x80\x80\x81"; $in = array(1048577); - $this->assertEqual(unicode_to_utf8($in),$out); + $this->assertEquals(unicode_to_utf8($in),$out); } } diff --git a/_test/cases/inc/utf8_utf16be.test.php b/_test/tests/inc/utf8_utf16be.test.php similarity index 65% rename from _test/cases/inc/utf8_utf16be.test.php rename to _test/tests/inc/utf8_utf16be.test.php index d8b8746f2bc11a96901cbd0979dd9f2bc7964482..6a12a01fdafef702f105b54ac647386f062d8801 100644 --- a/_test/cases/inc/utf8_utf16be.test.php +++ b/_test/tests/inc/utf8_utf16be.test.php @@ -1,11 +1,9 @@ <?php -require_once DOKU_INC.'inc/utf8.php'; - // use no mbstring help here if(!defined('UTF8_NOMBSTRING')) define('UTF8_NOMBSTRING',1); -class utf8_utf16be_test extends UnitTestCase { +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"; @@ -14,14 +12,14 @@ class utf8_utf16be_test extends UnitTestCase { * Convert from UTF-8 to UTF-16BE */ function test_to16be(){ - $this->assertEqual(utf8_to_utf16be($this->utf8), $this->utf16); + $this->assertEquals(utf8_to_utf16be($this->utf8), $this->utf16); } /** * Convert from UTF-16BE to UTF-8 */ function test_from16be(){ - $this->assertEqual(utf16be_to_utf8($this->utf16),$this->utf8); + $this->assertEquals(utf16be_to_utf8($this->utf16),$this->utf8); } } diff --git a/_test/cases/lib/exe/css_css_compress.test.php b/_test/tests/lib/exe/css_css_compress.test.php similarity index 65% rename from _test/cases/lib/exe/css_css_compress.test.php rename to _test/tests/lib/exe/css_css_compress.test.php index 527071bbe8d301ffc5985c383c9d6948cfa5ff0d..a7c87b6a7eb50a8aae2212323818d6c3e88be124 100644 --- a/_test/cases/lib/exe/css_css_compress.test.php +++ b/_test/tests/lib/exe/css_css_compress.test.php @@ -2,8 +2,7 @@ require_once DOKU_INC.'lib/exe/css.php'; - -class css_css_compress_test extends UnitTestCase { +class css_css_compress_test extends DokuWikiTest { function test_mlcom1(){ $text = '/** @@ -11,33 +10,33 @@ class css_css_compress_test extends UnitTestCase { * line *test* * check */'; - $this->assertEqual(css_compress($text), ''); + $this->assertEquals(css_compress($text), ''); } function test_mlcom2(){ $text = '#comment/* */ { color: lime; }'; - $this->assertEqual(css_compress($text), '#comment/* */{color:lime;}'); + $this->assertEquals(css_compress($text), '#comment/* */{color:lime;}'); } function test_slcom1(){ $text = '// this is a comment'; - $this->assertEqual(css_compress($text), ''); + $this->assertEquals(css_compress($text), ''); } function test_slcom2(){ $text = '#foo { color: lime; // another comment }'; - $this->assertEqual(css_compress($text), '#foo{color:lime;}'); + $this->assertEquals(css_compress($text), '#foo{color:lime;}'); } function test_slcom3(){ $text = '#foo { background-image: url(http://foo.bar/baz.jpg); }'; - $this->assertEqual(css_compress($text), '#foo{background-image:url(http://foo.bar/baz.jpg);}'); + $this->assertEquals(css_compress($text), '#foo{background-image:url(http://foo.bar/baz.jpg);}'); } function test_hack(){ @@ -45,7 +44,7 @@ class css_css_compress_test extends UnitTestCase { /* \\*/ display: inline; /* */'; - $this->assertEqual(css_compress($text), '/* \\*/display:inline;/* */'); + $this->assertEquals(css_compress($text), '/* \\*/display:inline;/* */'); } function test_hack2(){ @@ -55,12 +54,12 @@ class css_css_compress_test extends UnitTestCase { height: 450px; } /**/'; - $this->assertEqual(css_compress($text), '/*\\*/* html .page{height:450px;}/**/'); + $this->assertEquals(css_compress($text), '/*\\*/* html .page{height:450px;}/**/'); } function test_nl1(){ $text = "a{left:20px;\ntop:20px}"; - $this->assertEqual(css_compress($text), 'a{left:20px;top:20px}'); + $this->assertEquals(css_compress($text), 'a{left:20px;top:20px}'); } } diff --git a/_test/cases/lib/exe/css_css_loadfile.test.php b/_test/tests/lib/exe/css_css_loadfile.test.php similarity index 91% rename from _test/cases/lib/exe/css_css_loadfile.test.php rename to _test/tests/lib/exe/css_css_loadfile.test.php index a444d008661fb40846d7e2fbf99963eeea2c788d..c89b69b2c56e4701f67a7b2b5d9ebeabe5bacb99 100644 --- a/_test/cases/lib/exe/css_css_loadfile.test.php +++ b/_test/tests/lib/exe/css_css_loadfile.test.php @@ -2,15 +2,14 @@ require_once DOKU_INC.'lib/exe/css.php'; -class css_css_loadfile_test extends UnitTestCase { +class css_css_loadfile_test extends DokuWikiTest { public function setUp() { $this->file = tempnam('/tmp', 'css'); - parent::setUp(); } private function csstest($input, $output = null, $location = 'http://www.example.com/') { io_saveFile($this->file, $input); - $this->assertEqual(css_loadfile($this->file, $location), (is_null($output) ? $input : $output)); + $this->assertEquals(css_loadfile($this->file, $location), (is_null($output) ? $input : $output)); } public function test_url_relative() { @@ -50,7 +49,6 @@ class css_css_loadfile_test extends UnitTestCase { public function tearDown() { unlink($this->file); unset($this->file); - parent::tearDown(); } } diff --git a/_test/cases/lib/exe/js_js_compress.test.php b/_test/tests/lib/exe/js_js_compress.test.php similarity index 60% rename from _test/cases/lib/exe/js_js_compress.test.php rename to _test/tests/lib/exe/js_js_compress.test.php index 4702d35d380cdcb22221ad197dba08c90178d308..aa8d82933b600fca0c905073a307c639827ac7ab 100644 --- a/_test/cases/lib/exe/js_js_compress.test.php +++ b/_test/tests/lib/exe/js_js_compress.test.php @@ -2,8 +2,7 @@ require_once DOKU_INC.'lib/exe/js.php'; - -class js_js_compress_test extends UnitTestCase { +class js_js_compress_test extends DokuWikiTest { function test_mlcom1(){ $text = '/** @@ -11,106 +10,117 @@ class js_js_compress_test extends UnitTestCase { * line *test* * check */'; - $this->assertEqual(js_compress($text), ''); + $this->assertEquals(js_compress($text), ''); } function test_mlcom2(){ $text = 'var foo=6;/* another comment */'; - $this->assertEqual(js_compress($text), 'var foo=6;'); + $this->assertEquals(js_compress($text), 'var foo=6;'); } function test_mlcomcond(){ $text = '/*@if (@_win32)'; - $this->assertEqual(js_compress($text), '/*@if(@_win32)'); + $this->assertEquals(js_compress($text), '/*@if(@_win32)'); } function test_slcom1(){ $text = '// an comment'; - $this->assertEqual(js_compress($text), ''); + $this->assertEquals(js_compress($text), ''); } function test_slcom2(){ $text = 'var foo=6;// another comment '; - $this->assertEqual(js_compress($text), 'var foo=6;'); + $this->assertEquals(js_compress($text), 'var foo=6;'); } function test_slcom3(){ $text = 'var foo=6;// another comment / or something with // comments '; - $this->assertEqual(js_compress($text), 'var foo=6;'); + $this->assertEquals(js_compress($text), 'var foo=6;'); } function test_regex1(){ $text = 'foo.split( /[a-Z\/]*/ );'; - $this->assertEqual(js_compress($text), 'foo.split(/[a-Z\/]*/);'); + $this->assertEquals(js_compress($text), 'foo.split(/[a-Z\/]*/);'); } function test_regex_in_array(){ $text = '[/"/ , /"/ , /"/]'; - $this->assertEqual(js_compress($text), '[/"/,/"/,/"/]'); + $this->assertEquals(js_compress($text), '[/"/,/"/,/"/]'); } function test_regex_in_hash(){ $text = '{ a : /"/ }'; - $this->assertEqual(js_compress($text), '{a:/"/}'); + $this->assertEquals(js_compress($text), '{a:/"/}'); } function test_regex_preceded_by_spaces_caracters(){ $text = "text.replace( \t \r\n /\"/ , ".'"//" )'; - $this->assertEqual(js_compress($text), 'text.replace(/"/,"//")'); + $this->assertEquals(js_compress($text), 'text.replace(/"/,"//")'); } function test_dquot1(){ $text = 'var foo="Now what \\" \'do we//get /*here*/ ?";'; - $this->assertEqual(js_compress($text), $text); + $this->assertEquals(js_compress($text), $text); } function test_dquot2(){ $text = 'var foo="Now what \\\\\\" \'do we//get /*here*/ ?";'; - $this->assertEqual(js_compress($text), $text); + $this->assertEquals(js_compress($text), $text); } function test_dquotrunaway(){ $text = 'var foo="Now where does it end'; - $this->assertEqual(js_compress($text), $text); + $this->assertEquals(js_compress($text), $text); } function test_squot1(){ $text = "var foo='Now what \\' \"do we//get /*here*/ ?';"; - $this->assertEqual(js_compress($text), $text); + $this->assertEquals(js_compress($text), $text); } function test_squotrunaway(){ $text = "var foo='Now where does it end"; - $this->assertEqual(js_compress($text), $text); + $this->assertEquals(js_compress($text), $text); } function test_nl1(){ $text = "var foo=6;\nvar baz=7;"; - $this->assertEqual(js_compress($text), 'var foo=6;var baz=7;'); + $this->assertEquals(js_compress($text), 'var foo=6;var baz=7;'); } function test_lws1(){ $text = " \t var foo=6;"; - $this->assertEqual(js_compress($text), 'var foo=6;'); + $this->assertEquals(js_compress($text), 'var foo=6;'); } function test_tws1(){ $text = "var foo=6; \t "; - $this->assertEqual(js_compress($text), 'var foo=6;'); + $this->assertEquals(js_compress($text), 'var foo=6;'); } function test_shortcond(){ $text = "var foo = (baz) ? 'bar' : 'bla';"; - $this->assertEqual(js_compress($text), "var foo=(baz)?'bar':'bla';"); + $this->assertEquals(js_compress($text), "var foo=(baz)?'bar':'bla';"); } function test_complexminified(){ $text = 'if(!k.isXML(a))try{if(e||!l.match.PSEUDO.test(c)&&!/!=/.test(c)){var f=b.call(a,c);if(f||!d||a.document&&a.document.nodeType!==11)return f}}catch(g){}return k(c,null,null,[a]).length>0}}}(),function(){var a=c.createElement("div");a.innerHTML="<div class=\'test e\'></div><div class=\'test\'></div>";if(!!a.getElementsByClassName&&a.getElementsByClassName("e").length!==0){a.lastChild.className="e";if(a.getElementsByClassName("e").length===1)return;foo="text/*";bla="*/"'; - $this->assertEqual(js_compress($text),$text); + $this->assertEquals(js_compress($text),$text); } + function test_multilinestring(){ + $text = 'var foo = "this is a \\ +multiline string";'; + $this->assertEquals('var foo="this is a multiline string";',js_compress($text)); + + $text = "var foo = 'this is a \\ +multiline string';"; + $this->assertEquals("var foo='this is a multiline string';",js_compress($text)); + } + + /** * Test the files provided with the original JsStrip */ @@ -119,9 +129,8 @@ class js_js_compress_test extends UnitTestCase { foreach($files as $file){ $info = "Using file $file"; - $this->signal('failinfo',$info); - $this->assertEqual(js_compress(file_get_contents($file)), - file_get_contents(substr($file,0,-5).'out.js')); + $this->assertEquals(js_compress(file_get_contents($file)), + file_get_contents(substr($file,0,-5).'out.js'), $info); }; } } diff --git a/_test/cases/lib/exe/js_js_compress/test-CommentInDoubleQuotes1-in.js b/_test/tests/lib/exe/js_js_compress/test-CommentInDoubleQuotes1-in.js similarity index 100% rename from _test/cases/lib/exe/js_js_compress/test-CommentInDoubleQuotes1-in.js rename to _test/tests/lib/exe/js_js_compress/test-CommentInDoubleQuotes1-in.js diff --git a/_test/cases/lib/exe/js_js_compress/test-CommentInDoubleQuotes1-out.js b/_test/tests/lib/exe/js_js_compress/test-CommentInDoubleQuotes1-out.js similarity index 100% rename from _test/cases/lib/exe/js_js_compress/test-CommentInDoubleQuotes1-out.js rename to _test/tests/lib/exe/js_js_compress/test-CommentInDoubleQuotes1-out.js diff --git a/_test/cases/lib/exe/js_js_compress/test-CommentInDoubleQuotes2-in.js b/_test/tests/lib/exe/js_js_compress/test-CommentInDoubleQuotes2-in.js similarity index 100% rename from _test/cases/lib/exe/js_js_compress/test-CommentInDoubleQuotes2-in.js rename to _test/tests/lib/exe/js_js_compress/test-CommentInDoubleQuotes2-in.js diff --git a/_test/cases/lib/exe/js_js_compress/test-CommentInDoubleQuotes2-out.js b/_test/tests/lib/exe/js_js_compress/test-CommentInDoubleQuotes2-out.js similarity index 100% rename from _test/cases/lib/exe/js_js_compress/test-CommentInDoubleQuotes2-out.js rename to _test/tests/lib/exe/js_js_compress/test-CommentInDoubleQuotes2-out.js diff --git a/_test/cases/lib/exe/js_js_compress/test-CommentInSingleQuotes1-in.js b/_test/tests/lib/exe/js_js_compress/test-CommentInSingleQuotes1-in.js similarity index 100% rename from _test/cases/lib/exe/js_js_compress/test-CommentInSingleQuotes1-in.js rename to _test/tests/lib/exe/js_js_compress/test-CommentInSingleQuotes1-in.js diff --git a/_test/cases/lib/exe/js_js_compress/test-CommentInSingleQuotes1-out.js b/_test/tests/lib/exe/js_js_compress/test-CommentInSingleQuotes1-out.js similarity index 100% rename from _test/cases/lib/exe/js_js_compress/test-CommentInSingleQuotes1-out.js rename to _test/tests/lib/exe/js_js_compress/test-CommentInSingleQuotes1-out.js diff --git a/_test/cases/lib/exe/js_js_compress/test-CommentInSingleQuotes2-in.js b/_test/tests/lib/exe/js_js_compress/test-CommentInSingleQuotes2-in.js similarity index 100% rename from _test/cases/lib/exe/js_js_compress/test-CommentInSingleQuotes2-in.js rename to _test/tests/lib/exe/js_js_compress/test-CommentInSingleQuotes2-in.js diff --git a/_test/cases/lib/exe/js_js_compress/test-CommentInSingleQuotes2-out.js b/_test/tests/lib/exe/js_js_compress/test-CommentInSingleQuotes2-out.js similarity index 100% rename from _test/cases/lib/exe/js_js_compress/test-CommentInSingleQuotes2-out.js rename to _test/tests/lib/exe/js_js_compress/test-CommentInSingleQuotes2-out.js diff --git a/_test/cases/lib/exe/js_js_compress/test-CommentMultiline-in.js b/_test/tests/lib/exe/js_js_compress/test-CommentMultiline-in.js similarity index 100% rename from _test/cases/lib/exe/js_js_compress/test-CommentMultiline-in.js rename to _test/tests/lib/exe/js_js_compress/test-CommentMultiline-in.js diff --git a/_test/cases/lib/exe/js_js_compress/test-CommentMultiline-out.js b/_test/tests/lib/exe/js_js_compress/test-CommentMultiline-out.js similarity index 100% rename from _test/cases/lib/exe/js_js_compress/test-CommentMultiline-out.js rename to _test/tests/lib/exe/js_js_compress/test-CommentMultiline-out.js diff --git a/_test/cases/lib/exe/js_js_compress/test-CommentSingleLine-in.js b/_test/tests/lib/exe/js_js_compress/test-CommentSingleLine-in.js similarity index 100% rename from _test/cases/lib/exe/js_js_compress/test-CommentSingleLine-in.js rename to _test/tests/lib/exe/js_js_compress/test-CommentSingleLine-in.js diff --git a/_test/cases/lib/exe/js_js_compress/test-CommentSingleLine-out.js b/_test/tests/lib/exe/js_js_compress/test-CommentSingleLine-out.js similarity index 100% rename from _test/cases/lib/exe/js_js_compress/test-CommentSingleLine-out.js rename to _test/tests/lib/exe/js_js_compress/test-CommentSingleLine-out.js diff --git a/_test/cases/lib/exe/js_js_compress/test-IfThenElseBraces-in.js b/_test/tests/lib/exe/js_js_compress/test-IfThenElseBraces-in.js similarity index 100% rename from _test/cases/lib/exe/js_js_compress/test-IfThenElseBraces-in.js rename to _test/tests/lib/exe/js_js_compress/test-IfThenElseBraces-in.js diff --git a/_test/cases/lib/exe/js_js_compress/test-IfThenElseBraces-out.js b/_test/tests/lib/exe/js_js_compress/test-IfThenElseBraces-out.js similarity index 100% rename from _test/cases/lib/exe/js_js_compress/test-IfThenElseBraces-out.js rename to _test/tests/lib/exe/js_js_compress/test-IfThenElseBraces-out.js diff --git a/_test/cases/lib/exe/js_js_compress/test-IfThenElseNoBraces-in.js b/_test/tests/lib/exe/js_js_compress/test-IfThenElseNoBraces-in.js similarity index 100% rename from _test/cases/lib/exe/js_js_compress/test-IfThenElseNoBraces-in.js rename to _test/tests/lib/exe/js_js_compress/test-IfThenElseNoBraces-in.js diff --git a/_test/cases/lib/exe/js_js_compress/test-IfThenElseNoBraces-out.js b/_test/tests/lib/exe/js_js_compress/test-IfThenElseNoBraces-out.js similarity index 100% rename from _test/cases/lib/exe/js_js_compress/test-IfThenElseNoBraces-out.js rename to _test/tests/lib/exe/js_js_compress/test-IfThenElseNoBraces-out.js diff --git a/_test/cases/lib/exe/js_js_compress/test-RegexpBackslash-in.js b/_test/tests/lib/exe/js_js_compress/test-RegexpBackslash-in.js similarity index 100% rename from _test/cases/lib/exe/js_js_compress/test-RegexpBackslash-in.js rename to _test/tests/lib/exe/js_js_compress/test-RegexpBackslash-in.js diff --git a/_test/cases/lib/exe/js_js_compress/test-RegexpBackslash-out.js b/_test/tests/lib/exe/js_js_compress/test-RegexpBackslash-out.js similarity index 100% rename from _test/cases/lib/exe/js_js_compress/test-RegexpBackslash-out.js rename to _test/tests/lib/exe/js_js_compress/test-RegexpBackslash-out.js diff --git a/_test/cases/lib/exe/js_js_compress/test-RegexpSimple-in.js b/_test/tests/lib/exe/js_js_compress/test-RegexpSimple-in.js similarity index 100% rename from _test/cases/lib/exe/js_js_compress/test-RegexpSimple-in.js rename to _test/tests/lib/exe/js_js_compress/test-RegexpSimple-in.js diff --git a/_test/cases/lib/exe/js_js_compress/test-RegexpSimple-out.js b/_test/tests/lib/exe/js_js_compress/test-RegexpSimple-out.js similarity index 100% rename from _test/cases/lib/exe/js_js_compress/test-RegexpSimple-out.js rename to _test/tests/lib/exe/js_js_compress/test-RegexpSimple-out.js diff --git a/_test/cases/lib/exe/js_js_compress/test-RegexpSimpleWhitespace-in.js b/_test/tests/lib/exe/js_js_compress/test-RegexpSimpleWhitespace-in.js similarity index 100% rename from _test/cases/lib/exe/js_js_compress/test-RegexpSimpleWhitespace-in.js rename to _test/tests/lib/exe/js_js_compress/test-RegexpSimpleWhitespace-in.js diff --git a/_test/cases/lib/exe/js_js_compress/test-RegexpSimpleWhitespace-out.js b/_test/tests/lib/exe/js_js_compress/test-RegexpSimpleWhitespace-out.js similarity index 100% rename from _test/cases/lib/exe/js_js_compress/test-RegexpSimpleWhitespace-out.js rename to _test/tests/lib/exe/js_js_compress/test-RegexpSimpleWhitespace-out.js diff --git a/_test/cases/lib/exe/js_js_compress/test-RegexpString-in.js b/_test/tests/lib/exe/js_js_compress/test-RegexpString-in.js similarity index 100% rename from _test/cases/lib/exe/js_js_compress/test-RegexpString-in.js rename to _test/tests/lib/exe/js_js_compress/test-RegexpString-in.js diff --git a/_test/cases/lib/exe/js_js_compress/test-RegexpString-out.js b/_test/tests/lib/exe/js_js_compress/test-RegexpString-out.js similarity index 100% rename from _test/cases/lib/exe/js_js_compress/test-RegexpString-out.js rename to _test/tests/lib/exe/js_js_compress/test-RegexpString-out.js diff --git a/_test/cases/lib/exe/js_js_compress/test-StatementDoWhile-in.js b/_test/tests/lib/exe/js_js_compress/test-StatementDoWhile-in.js similarity index 100% rename from _test/cases/lib/exe/js_js_compress/test-StatementDoWhile-in.js rename to _test/tests/lib/exe/js_js_compress/test-StatementDoWhile-in.js diff --git a/_test/cases/lib/exe/js_js_compress/test-StatementDoWhile-out.js b/_test/tests/lib/exe/js_js_compress/test-StatementDoWhile-out.js similarity index 100% rename from _test/cases/lib/exe/js_js_compress/test-StatementDoWhile-out.js rename to _test/tests/lib/exe/js_js_compress/test-StatementDoWhile-out.js diff --git a/_test/cases/lib/exe/js_js_compress/test-StatementForIn-in.js b/_test/tests/lib/exe/js_js_compress/test-StatementForIn-in.js similarity index 100% rename from _test/cases/lib/exe/js_js_compress/test-StatementForIn-in.js rename to _test/tests/lib/exe/js_js_compress/test-StatementForIn-in.js diff --git a/_test/cases/lib/exe/js_js_compress/test-StatementForIn-out.js b/_test/tests/lib/exe/js_js_compress/test-StatementForIn-out.js similarity index 100% rename from _test/cases/lib/exe/js_js_compress/test-StatementForIn-out.js rename to _test/tests/lib/exe/js_js_compress/test-StatementForIn-out.js diff --git a/_test/cases/lib/exe/js_js_compress/test-StatementNew-in.js b/_test/tests/lib/exe/js_js_compress/test-StatementNew-in.js similarity index 100% rename from _test/cases/lib/exe/js_js_compress/test-StatementNew-in.js rename to _test/tests/lib/exe/js_js_compress/test-StatementNew-in.js diff --git a/_test/cases/lib/exe/js_js_compress/test-StatementNew-out.js b/_test/tests/lib/exe/js_js_compress/test-StatementNew-out.js similarity index 100% rename from _test/cases/lib/exe/js_js_compress/test-StatementNew-out.js rename to _test/tests/lib/exe/js_js_compress/test-StatementNew-out.js diff --git a/_test/cases/lib/exe/js_js_compress/test-StatementSwitchCase-in.js b/_test/tests/lib/exe/js_js_compress/test-StatementSwitchCase-in.js similarity index 100% rename from _test/cases/lib/exe/js_js_compress/test-StatementSwitchCase-in.js rename to _test/tests/lib/exe/js_js_compress/test-StatementSwitchCase-in.js diff --git a/_test/cases/lib/exe/js_js_compress/test-StatementSwitchCase-out.js b/_test/tests/lib/exe/js_js_compress/test-StatementSwitchCase-out.js similarity index 100% rename from _test/cases/lib/exe/js_js_compress/test-StatementSwitchCase-out.js rename to _test/tests/lib/exe/js_js_compress/test-StatementSwitchCase-out.js diff --git a/_test/cases/lib/exe/js_js_compress/test-StringDoubleQuotes-in.js b/_test/tests/lib/exe/js_js_compress/test-StringDoubleQuotes-in.js similarity index 100% rename from _test/cases/lib/exe/js_js_compress/test-StringDoubleQuotes-in.js rename to _test/tests/lib/exe/js_js_compress/test-StringDoubleQuotes-in.js diff --git a/_test/cases/lib/exe/js_js_compress/test-StringDoubleQuotes-out.js b/_test/tests/lib/exe/js_js_compress/test-StringDoubleQuotes-out.js similarity index 100% rename from _test/cases/lib/exe/js_js_compress/test-StringDoubleQuotes-out.js rename to _test/tests/lib/exe/js_js_compress/test-StringDoubleQuotes-out.js diff --git a/_test/cases/lib/exe/js_js_compress/test-StringSingleQuotes-in.js b/_test/tests/lib/exe/js_js_compress/test-StringSingleQuotes-in.js similarity index 100% rename from _test/cases/lib/exe/js_js_compress/test-StringSingleQuotes-in.js rename to _test/tests/lib/exe/js_js_compress/test-StringSingleQuotes-in.js diff --git a/_test/cases/lib/exe/js_js_compress/test-StringSingleQuotes-out.js b/_test/tests/lib/exe/js_js_compress/test-StringSingleQuotes-out.js similarity index 100% rename from _test/cases/lib/exe/js_js_compress/test-StringSingleQuotes-out.js rename to _test/tests/lib/exe/js_js_compress/test-StringSingleQuotes-out.js diff --git a/_test/tests/test/basic.test.php b/_test/tests/test/basic.test.php new file mode 100644 index 0000000000000000000000000000000000000000..b4926d2ba522e80a67776c5b50708a5e0bc635e4 --- /dev/null +++ b/_test/tests/test/basic.test.php @@ -0,0 +1,22 @@ +<?php + +/** + * @group integration + */ +class InttestsBasicTest extends DokuWikiTest { + /** + * Execute the simplest possible request and expect + * a dokuwiki page which obviously has the word "DokuWiki" + * in it somewhere. + */ + function testSimpleRun() { + $request = new TestRequest(); + + $response = $request->execute(); + + $this->assertTrue( + strpos($response->getContent(), 'DokuWiki') >= 0, + 'DokuWiki was not a word in the output' + ); + } +} diff --git a/_test/tests/test/globals.test.php b/_test/tests/test/globals.test.php new file mode 100644 index 0000000000000000000000000000000000000000..180fd0d0d77f53be676aadc43ac0724c7063a957 --- /dev/null +++ b/_test/tests/test/globals.test.php @@ -0,0 +1,49 @@ +<?php + +/** + * @group integration + */ +class InttestsGlobalsTest extends DokuWikiTest { + + /** + * every request should be with its own variables + */ + function testFirstRun() { + global $EVENT_HANDLER; + + $request = new TestRequest(); + $request->setServer('testvar', true); + + $self = $this; + $EVENT_HANDLER->register_hook('TPL_CONTENT_DISPLAY', 'AFTER', null, + function() use ($self) { + $self->assertTrue($_SERVER['testvar'], 'Server variable not set correctly: testvar'); + $self->assertEquals('87.142.120.6', $_SERVER['REMOTE_ADDR'], 'Server variable not set correctly: REMOTE_ADDR'); + $_SERVER['tmpvar'] = true; + } + ); + + $request->execute(); + } + + /** + * @depends testFirstRun + */ + function testSecondRun() { + global $EVENT_HANDLER; + + $request = new TestRequest(); + $request->setServer('testvar', false); + + $self = $this; + $EVENT_HANDLER->register_hook('TPL_CONTENT_DISPLAY', 'AFTER', null, + function() use ($self) { + $self->assertFalse($_SERVER['testvar'], 'Server variable not set correctly: testvar'); + $self->assertEquals('87.142.120.6', $_SERVER['REMOTE_ADDR'], 'Server variable not set correctly: REMOTE_ADDR'); + $self->assertFalse(isset($_SERVER['tmpvar'])); + } + ); + + $request->execute(); + } +} diff --git a/_test/tests/test/hooks.test.php b/_test/tests/test/hooks.test.php new file mode 100644 index 0000000000000000000000000000000000000000..621b9f9b88cab9fe8b462774ab7cb2eb3a88d771 --- /dev/null +++ b/_test/tests/test/hooks.test.php @@ -0,0 +1,24 @@ +<?php + +/** + * @group integration + */ +class InttestsHooksTest extends DokuWikiTest { + + function testHookTriggering() { + global $EVENT_HANDLER; + + $request = new TestRequest(); + $hookTriggered = false; + + $EVENT_HANDLER->register_hook('TPL_CONTENT_DISPLAY', 'AFTER', null, + function() use (&$hookTriggered) { + $hookTriggered = true; + } + ); + + $request->execute(); + + $this->assertTrue($hookTriggered, 'Hook was not triggered as expected!'); + } +} diff --git a/_test/tests/test/phpquery.test.php b/_test/tests/test/phpquery.test.php new file mode 100644 index 0000000000000000000000000000000000000000..188d834cbff6e8b4d9523e6ccf54f2df9727099e --- /dev/null +++ b/_test/tests/test/phpquery.test.php @@ -0,0 +1,18 @@ +<?php + +/** + * @group integration + */ +class InttestsPHPQueryTest extends DokuWikiTest { + /** + * Execute the simplest possible request and check the + * meta generator tag is set to "DokuWiki" + */ + function testSimpleRun() { + $request = new TestRequest(); + + $response = $request->execute(); + + $this->assertEquals('DokuWiki', $response->queryHTML('meta[name="generator"]')->attr('content') ); + } +} diff --git a/_test/tests/test/plugins.test.php b/_test/tests/test/plugins.test.php new file mode 100644 index 0000000000000000000000000000000000000000..ac6d1ee45a3dc501c5f4ed00bbdb2b977d97849e --- /dev/null +++ b/_test/tests/test/plugins.test.php @@ -0,0 +1,32 @@ +<?php + +/** + * @group integration + */ +class InttestsPluginsTest extends DokuWikiTest { + + function setUp() { + $this->pluginsEnabled = array( + 'testing' + ); + + parent::setUp(); + } + + function testTestingPluginEnabled() { + global $EVENT_HANDLER; + + $request = new TestRequest(); + $hookTriggered = false; + + $EVENT_HANDLER->register_hook('TESTING_PLUGIN_INSTALLED', 'AFTER', null, + function() use (&$hookTriggered) { + $hookTriggered = true; + } + ); + + $request->execute(); + + $this->assertTrue($hookTriggered, 'Testing plugin did not trigger!'); + } +} diff --git a/_test/tests/test/plugins_defaults.test.php b/_test/tests/test/plugins_defaults.test.php new file mode 100644 index 0000000000000000000000000000000000000000..953960bb7d22a2a781ad492af542bc612a236378 --- /dev/null +++ b/_test/tests/test/plugins_defaults.test.php @@ -0,0 +1,24 @@ +<?php + +/** + * @group integration + */ +class InttestsPluginsDefaultTest extends DokuWikiTest { + + function testTestingPluginDisabledDefault() { + global $EVENT_HANDLER; + + $request = new TestRequest(); + $hookTriggered = false; + + $EVENT_HANDLER->register_hook('TESTING_PLUGIN_INSTALLED', 'AFTER', null, + function() use (&$hookTriggered) { + $hookTriggered = true; + } + ); + + $request->execute(); + + $this->assertFalse($hookTriggered, 'Testing plugin did trigger!'); + } +} diff --git a/_test/tests/test/reset.test.php b/_test/tests/test/reset.test.php new file mode 100644 index 0000000000000000000000000000000000000000..39c43cd3b51d84834c02bc190d8fa16a3b338a22 --- /dev/null +++ b/_test/tests/test/reset.test.php @@ -0,0 +1,38 @@ +<?php + +/** + * @group integration + */ +class InttestsScopeTest extends DokuWikiTest { + + public $triggered = false; + + function testFirstRun(){ + global $conf; + $conf['foo'] = 'bar'; + + global $EVENT_HANDLER; + $self = $this; + $EVENT_HANDLER->register_hook('DOKUWIKI_STARTED', 'AFTER', null, + function() use ($self) { + $self->triggered = true; + } + ); + $request = new TestRequest(); + $request->execute(); + $this->assertTrue($this->triggered); + } + + /** + * @depends testFirstRun + */ + function testSecondRun(){ + global $conf; + $this->assertFalse(isset($conf['foo']), 'conf setting'); + + $request = new TestRequest(); + $request->execute(); + + $this->assertFalse($this->triggered, 'trigger'); + } +} diff --git a/_test/tests/test/scope.test.php b/_test/tests/test/scope.test.php new file mode 100644 index 0000000000000000000000000000000000000000..8c4ad9cf81d4b0025f03a33910c4d478e1724013 --- /dev/null +++ b/_test/tests/test/scope.test.php @@ -0,0 +1,49 @@ +<?php + +/** + * @group integration + */ +class InttestsResetTest extends DokuWikiTest { + /** + * It should be possible to have two test cases within one test class. + */ + function testFirstRun() { + $request = new TestRequest(); + $response = $request->execute(); + $this->assertTrue( + strpos($response->getContent(), 'DokuWiki') >= 0, + 'DokuWiki was not a word in the output' + ); + } + + /** + * @depends testFirstRun + */ + function testSecondRun() { + $request = new TestRequest(); + $response = $request->execute(); + $this->assertTrue( + strpos($response->getContent(), 'DokuWiki') >= 0, + 'DokuWiki was not a word in the output' + ); + } + + /** + * two requests within the same test case should be possible + */ + function testMultipleRequests() { + $request = new TestRequest(); + $response = $request->execute(); + $this->assertTrue( + strpos($response->getContent(), 'DokuWiki') >= 0, + 'DokuWiki was not a word in the output' + ); + + $request = new TestRequest(); + $response = $request->execute(); + $this->assertTrue( + strpos($response->getContent(), 'DokuWiki') >= 0, + 'DokuWiki was not a word in the output' + ); + } +} diff --git a/_test/webtest-stripper.sh b/_test/webtest-stripper.sh deleted file mode 100755 index f7991cc0bf5528b0bbc97e7744c18d56a5fd1cc0..0000000000000000000000000000000000000000 --- a/_test/webtest-stripper.sh +++ /dev/null @@ -1,41 +0,0 @@ -#!/bin/sh -################################################################################ -# Quick script to make simpletest web test fail output more legible -# -# Run the web test group from the command line w/ the command: -# -# $ ./runtests.php -g [GROUP] 2> tmp -# -# redirecting the error messages to the file tmp -# -# Then run this command on the tmp file -# -# $ ./webtest-stripper.sh tmp -# -################################################################################ - -usage="Usage: ${0} [WEB_TEST_OUTPUT_FILE]"; - -if [ -z "$1" ]; then - echo $usage; - exit 1; -elif [ ! -f "$1" ]; then - echo "${1} is not a file!"; - echo $usage; - exit 1; -fi - -sed -e 's/\\n/\ -/g' "${1}" |\ -sed -e 's/\\//g' |\ -sed -e 's/FAIL.*Pattern \[\#\^/EXPECTED:\ -/g' |\ -sed -e 's/\$#i\].*string \[/\ -\ -GOT:\ -/g' |\ -sed -e 's/\]$/\ -----------------------------------------------------------------\ -/g' - -exit 0 \ No newline at end of file diff --git a/conf/dokuwiki.php b/conf/dokuwiki.php index 5c0b28114be31cf55beaa436a571b706d9f96a6b..cbd42115df3a1f19377d3f207488526f61a3da29 100644 --- a/conf/dokuwiki.php +++ b/conf/dokuwiki.php @@ -7,39 +7,40 @@ * * This is a piece of PHP code so PHP syntax applies! * - * For help with the configuration see http://www.dokuwiki.org/config + * For help with the configuration and a more detailed explanation of the various options + * see http://www.dokuwiki.org/config */ -/* Datastorage and Permissions */ - -$conf['fmode'] = 0644; //set file creation mode -$conf['dmode'] = 0755; //set directory creation mode +/* Basic Settings */ +$conf['title'] = 'DokuWiki'; //what to show in the title +$conf['start'] = 'start'; //name of start page $conf['lang'] = 'en'; //your language +$conf['template'] = 'dokuwiki'; //see lib/tpl directory +$conf['tagline'] = ''; //tagline in header (if template supports it) +$conf['sidebar'] = 'sidebar'; //name of sidebar in root namespace (if template supports it) +$conf['license'] = 'cc-by-nc-sa'; //see conf/license.php +$conf['savedir'] = './data'; //where to store all the files $conf['basedir'] = ''; //absolute dir from serveroot - blank for autodetection $conf['baseurl'] = ''; //URL to server including protocol - blank for autodetect -$conf['cookiedir'] = ''; //Cookie path. Leave blank for using baseurl. -$conf['savedir'] = './data'; //where to store all the files +$conf['cookiedir'] = ''; //path to use in cookies - blank for basedir +$conf['dmode'] = 0755; //set directory creation mode +$conf['fmode'] = 0644; //set file creation mode $conf['allowdebug'] = 0; //allow debug output, enable if needed 0|1 -$conf['mediarevisions'] = 1; //enable/disable media revisions -/* Display Options */ - -$conf['start'] = 'start'; //name of start page -$conf['title'] = 'DokuWiki'; //what to show in the title -$conf['template'] = 'dokuwiki'; //see lib/tpl directory -$conf['tagline'] = ''; //tagline in header (if template supports it) -$conf['sidebar'] = 'sidebar'; //name of sidebar in root namespace (if template supports it) -$conf['license'] = 'cc-by-nc-sa'; //see conf/license.php -$conf['fullpath'] = 0; //show full path of the document or relative to datadir only? 0|1 +/* Display Settings */ $conf['recent'] = 20; //how many entries to show in recent +$conf['recent_days'] = 7; //How many days of recent changes to keep. (days) $conf['breadcrumbs'] = 10; //how many recent visited pages to show $conf['youarehere'] = 0; //show "You are here" navigation? 0|1 +$conf['fullpath'] = 0; //show full path of the document or relative to datadir only? 0|1 $conf['typography'] = 1; //smartquote conversion 0=off, 1=doublequotes, 2=all quotes -$conf['htmlok'] = 0; //may raw HTML be embedded? This may break layout and XHTML validity 0|1 -$conf['phpok'] = 0; //may PHP code be embedded? Never do this on the internet! 0|1 $conf['dformat'] = '%Y/%m/%d %H:%M'; //dateformat accepted by PHPs strftime() function -$conf['signature'] = ' --- //[[@MAIL@|@NAME@]] @DATE@//'; //signature see wiki:config for details +$conf['signature'] = ' --- //[[@MAIL@|@NAME@]] @DATE@//'; //signature see wiki page for details +$conf['showuseras'] = 'loginname'; // 'loginname' users login name + // 'username' users full name + // 'email' e-mail address (will be obfuscated as per mailguard) + // 'email_link' e-mail address as a mailto: link (obfuscated) $conf['toptoclevel'] = 1; //Level starting with and below to include in AutoTOC (max. 5) $conf['tocminheads'] = 3; //Minimum amount of headlines that determines if a TOC is built $conf['maxtoclevel'] = 3; //Up to which level include into AutoTOC (max. 5) @@ -47,27 +48,10 @@ $conf['maxseclevel'] = 3; //Up to which level create editable se $conf['camelcase'] = 0; //Use CamelCase for linking? (I don't like it) 0|1 $conf['deaccent'] = 1; //deaccented chars in pagenames (1) or romanize (2) or keep (0)? $conf['useheading'] = 0; //use the first heading in a page as its name -$conf['refcheck'] = 1; //check for references before deleting media files -$conf['refshow'] = 0; //how many references should be shown, 5 is a good value -$conf['showuseras'] = 'loginname'; // 'loginname' users login name - // 'username' users full name - // 'email' e-mail address (will be obfuscated as per mailguard) - // 'email_link' e-mail address as a mailto: link (obfuscated) - -/* Antispam Features */ - -$conf['usewordblock']= 1; //block spam based on words? 0|1 -$conf['indexdelay'] = 60*60*24*5; //allow indexing after this time (seconds) default is 5 days -$conf['relnofollow'] = 1; //use rel="nofollow" for external links? -$conf['mailguard'] = 'hex'; //obfuscate email addresses against spam harvesters? - //valid entries are: - // 'visible' - replace @ with [at], . with [dot] and - with [dash] - // 'hex' - use hex entities to encode the mail address - // 'none' - do not obfuscate addresses -$conf['iexssprotect']= 1; // check for JavaScript and HTML in uploaded files 0|1 - -/* Authentication Options - read http://www.splitbrain.org/dokuwiki/wiki:acl */ +$conf['sneaky_index']= 0; //check for namespace read permission in index view (0|1) (1 might cause unexpected behavior) +$conf['hidepages'] = ''; //Regexp for pages to be skipped from RSS, Search and Recent Changes +/* Authentication Settings */ $conf['useacl'] = 0; //Use Access Control Lists to restrict access? $conf['autopasswd'] = 1; //autogenerate passwords and email them to user $conf['authtype'] = 'plain'; //which authentication backend should be used @@ -76,45 +60,59 @@ $conf['defaultgroup']= 'user'; //Default groups new Users are added to $conf['superuser'] = '!!not set!!'; //The admin can be user or @group or comma separated list user1,@group1,user2 $conf['manager'] = '!!not set!!'; //The manager can be user or @group or comma separated list user1,@group1,user2 $conf['profileconfirm'] = 1; //Require current password to confirm changes to user profile +$conf['rememberme'] = 1; //Enable/disable remember me on login $conf['disableactions'] = ''; //comma separated list of actions to disable -$conf['sneaky_index'] = 0; //check for namespace read permission in index view (0|1) (1 might cause unexpected behavior) $conf['auth_security_timeout'] = 900; //time (seconds) auth data is considered valid, set to 0 to recheck on every page view $conf['securecookie'] = 1; //never send HTTPS cookies via HTTP - $conf['remote'] = 0; //Enable/disable remote interfaces $conf['remoteuser'] = '!!not set !!'; //user/groups that have access to remote interface (comma separated) -/* Advanced Options */ - -$conf['updatecheck'] = 1; //automatically check for new releases? -$conf['userewrite'] = 0; //this makes nice URLs: 0: off 1: .htaccess 2: internal -$conf['useslash'] = 0; //use slash instead of colon? only when rewrite is on +/* Antispam Features */ +$conf['usewordblock']= 1; //block spam based on words? 0|1 +$conf['relnofollow'] = 1; //use rel="nofollow" for external links? +$conf['indexdelay'] = 60*60*24*5; //allow indexing after this time (seconds) default is 5 days +$conf['mailguard'] = 'hex'; //obfuscate email addresses against spam harvesters? + //valid entries are: + // 'visible' - replace @ with [at], . with [dot] and - with [dash] + // 'hex' - use hex entities to encode the mail address + // 'none' - do not obfuscate addresses +$conf['iexssprotect']= 1; // check for JavaScript and HTML in uploaded files 0|1 + +/* Editing Settings */ $conf['usedraft'] = 1; //automatically save a draft while editing (0|1) -$conf['sepchar'] = '_'; //word separator character in page names; may be a - // letter, a digit, '_', '-', or '.'. -$conf['canonical'] = 0; //Should all URLs use full canonical http://... style? -$conf['fnencode'] = 'url'; //encode filenames (url|safe|utf-8) -$conf['autoplural'] = 0; //try (non)plural form of nonexisting files? -$conf['compression'] = 'gz'; //compress old revisions: (0: off) ('gz': gnuzip) ('bz2': bzip) - // bz2 generates smaller files, but needs more cpu-power -$conf['cachetime'] = 60*60*24; //maximum age for cachefile in seconds (defaults to a day) +$conf['htmlok'] = 0; //may raw HTML be embedded? This may break layout and XHTML validity 0|1 +$conf['phpok'] = 0; //may PHP code be embedded? Never do this on the internet! 0|1 $conf['locktime'] = 15*60; //maximum age for lockfiles (defaults to 15 minutes) -$conf['fetchsize'] = 0; //maximum size (bytes) fetch.php may download from extern, disabled by default -$conf['notify'] = ''; //send change info to this email (leave blank for nobody) -$conf['registernotify'] = ''; //send info about newly registered users to this email (leave blank for nobody) -$conf['mailfrom'] = ''; //use this email when sending mails -$conf['mailprefix'] = ''; //use this as prefix of outgoing mails -$conf['gzip_output'] = 0; //use gzip content encodeing for the output xhtml (if allowed by browser) +$conf['cachetime'] = 60*60*24; //maximum age for cachefile in seconds (defaults to a day) + +/* Link Settings */ +// Set target to use when creating links - leave empty for same window +$conf['target']['wiki'] = ''; +$conf['target']['interwiki'] = ''; +$conf['target']['extern'] = ''; +$conf['target']['media'] = ''; +$conf['target']['windows'] = ''; + +/* Media Settings */ +$conf['mediarevisions'] = 1; //enable/disable media revisions +$conf['refcheck'] = 1; //check for references before deleting media files +$conf['refshow'] = 0; //how many references should be shown, 5 is a good value $conf['gdlib'] = 2; //the GDlib version (0, 1 or 2) 2 tries to autodetect $conf['im_convert'] = ''; //path to ImageMagicks convert (will be used instead of GD) $conf['jpg_quality'] = '70'; //quality of compression when scaling jpg images (0-100) +$conf['fetchsize'] = 0; //maximum size (bytes) fetch.php may download from extern, disabled by default + +/* Notification Settings */ $conf['subscribers'] = 0; //enable change notice subscription support $conf['subscribe_time'] = 24*60*60; //Time after which digests / lists are sent (in sec, default 1 day) //Should be smaller than the time specified in recent_days -$conf['compress'] = 1; //Strip whitespaces and comments from Styles and JavaScript? 1|0 -$conf['cssdatauri'] = 0; //Maximum byte size of small images to embed into CSS, won't work on IE<8 -$conf['hidepages'] = ''; //Regexp for pages to be skipped from RSS, Search and Recent Changes -$conf['send404'] = 0; //Send a HTTP 404 status for non existing pages? +$conf['notify'] = ''; //send change info to this email (leave blank for nobody) +$conf['registernotify'] = ''; //send info about newly registered users to this email (leave blank for nobody) +$conf['mailfrom'] = ''; //use this email when sending mails +$conf['mailprefix'] = ''; //use this as prefix of outgoing mails +$conf['htmlmail'] = 1; //send HTML multipart mails + +/* Syndication Settings */ $conf['sitemap'] = 0; //Create a google sitemap? How often? In days. $conf['rss_type'] = 'rss1'; //type of RSS feed to provide, by default: // 'rss' - RSS 0.91 @@ -138,34 +136,42 @@ $conf['rss_media'] = 'both'; //what should be listed? // 'media' - media changes only $conf['rss_update'] = 5*60; //Update the RSS feed every n seconds (defaults to 5 minutes) $conf['rss_show_summary'] = 1; //Add revision summary to title? 0|1 -$conf['recent_days'] = 7; //How many days of recent changes to keep. (days) + +/* Advanced Settings */ +$conf['updatecheck'] = 1; //automatically check for new releases? +$conf['userewrite'] = 0; //this makes nice URLs: 0: off 1: .htaccess 2: internal +$conf['useslash'] = 0; //use slash instead of colon? only when rewrite is on +$conf['sepchar'] = '_'; //word separator character in page names; may be a + // letter, a digit, '_', '-', or '.'. +$conf['canonical'] = 0; //Should all URLs use full canonical http://... style? +$conf['fnencode'] = 'url'; //encode filenames (url|safe|utf-8) +$conf['autoplural'] = 0; //try (non)plural form of nonexisting files? +$conf['compression'] = 'gz'; //compress old revisions: (0: off) ('gz': gnuzip) ('bz2': bzip) + // bz2 generates smaller files, but needs more cpu-power +$conf['gzip_output'] = 0; //use gzip content encodeing for the output xhtml (if allowed by browser) +$conf['compress'] = 1; //Strip whitespaces and comments from Styles and JavaScript? 1|0 +$conf['cssdatauri'] = 0; //Maximum byte size of small images to embed into CSS, won't work on IE<8 +$conf['send404'] = 0; //Send a HTTP 404 status for non existing pages? $conf['broken_iua'] = 0; //Platform with broken ignore_user_abort (IIS+CGI) 0|1 $conf['xsendfile'] = 0; //Use X-Sendfile (1 = lighttpd, 2 = standard) $conf['renderer_xhtml'] = 'xhtml'; //renderer to use for main page generation -$conf['rememberme'] = 1; //Enable/disable remember me on login - -//Set target to use when creating links - leave empty for same window -$conf['target']['wiki'] = ''; -$conf['target']['interwiki'] = ''; -$conf['target']['extern'] = ''; -$conf['target']['media'] = ''; -$conf['target']['windows'] = ''; +$conf['readdircache'] = 0; //time cache in second for the readdir operation, 0 to deactivate. -//Proxy setup - if your Server needs a proxy to access the web set these +/* Network Settings */ +$conf['dnslookups'] = 1; //disable to disallow IP to hostname lookups +// Proxy setup - if your Server needs a proxy to access the web set these $conf['proxy']['host'] = ''; $conf['proxy']['port'] = ''; $conf['proxy']['user'] = ''; $conf['proxy']['pass'] = ''; $conf['proxy']['ssl'] = 0; $conf['proxy']['except'] = ''; - -/* Safemode Hack */ - -$conf['safemodehack'] = 0; //read http://www.dokuwiki.org/config:safemodehack ! +// Safemode Hack - read http://www.dokuwiki.org/config:safemodehack ! +$conf['safemodehack'] = 0; $conf['ftp']['host'] = 'localhost'; $conf['ftp']['port'] = '21'; $conf['ftp']['user'] = 'user'; $conf['ftp']['pass'] = 'password'; $conf['ftp']['root'] = '/home/user/htdocs'; -$conf['readdircache'] = 0; //time cache in second for the readdir opération, 0 to deactivate. + diff --git a/conf/mime.conf b/conf/mime.conf index 24529b06cf4cf4cfba45d23be94215a19722353d..381b93f8640158bcdf28261ad2dad5c78d95f0cd 100644 --- a/conf/mime.conf +++ b/conf/mime.conf @@ -7,6 +7,7 @@ jpg image/jpeg jpeg image/jpeg gif image/gif png image/png +ico image/vnd.microsoft.icon swf application/x-shockwave-flash mp3 audio/mpeg diff --git a/conf/plugins.php b/conf/plugins.php new file mode 100644 index 0000000000000000000000000000000000000000..b2c79970d8be8991d6bbe0eb95583a4d88d1e228 --- /dev/null +++ b/conf/plugins.php @@ -0,0 +1,6 @@ +<?php +/** + * This file configures the default states of available plugins. All settings in + * the plugins.*.php files will override those here. + */ +$plugins['testing'] = 0; diff --git a/conf/users.auth.php.dist b/conf/users.auth.php.dist index 6576eeb5fba9375b7dd9440191ae028fd0199e1f..df3c7848278b83255ce80df3b209dd1696e768f5 100644 --- a/conf/users.auth.php.dist +++ b/conf/users.auth.php.dist @@ -6,5 +6,5 @@ # # Format: # -# user:MD5password:Real Name:email:groups,comma,seperated +# login:passwordhash:Real Name:email:groups,comma,seperated diff --git a/data/pages/wiki/syntax.txt b/data/pages/wiki/syntax.txt index 0b54809492ae6cba8bcca5414f53d3970e035497..dd3154ef066692f83a56a6944a1c004f17fb7408 100644 --- a/data/pages/wiki/syntax.txt +++ b/data/pages/wiki/syntax.txt @@ -382,11 +382,11 @@ class HelloWorldApp { } </code> -The following language strings are currently recognized: //4cs, abap, actionscript-french, actionscript, actionscript3, ada, apache, applescript, asm, asp, autoconf, autohotkey, autoit, avisynth, awk, bash, basic4gl, bf, bibtex, blitzbasic, bnf, boo, c, c_mac, caddcl, cadlisp, cfdg, cfm, chaiscript, cil, clojure, cmake, cobol, cpp, cpp-qt, csharp, css, cuesheet, d, dcs, delphi, diff, div, dos, dot, ecmascript, eiffel, email, erlang, fo, fortran, freebasic, fsharp, gambas, genero, genie, gdb, glsl, gml, gnuplot, groovy, gettext, gwbasic, haskell, hicest, hq9plus, html, icon, idl, ini, inno, intercal, io, j, java5, java, javascript, jquery, kixtart, klonec, klonecpp, latex, lisp, locobasic, logtalk, lolcode, lotusformulas, lotusscript, lscript, lsl2, lua, m68k, magiksf, make, mapbasic, matlab, mirc, modula2, modula3, mmix, mpasm, mxml, mysql, newlisp, nsis, oberon2, objc, ocaml-brief, ocaml, oobas, oracle8, oracle11, oxygene, oz, pascal, pcre, perl, perl6, per, pf, php-brief, php, pike, pic16, pixelbender, plsql, postgresql, povray, powerbuilder, powershell, progress, prolog, properties, providex, purebasic, python, q, qbasic, rails, rebol, reg, robots, rpmspec, rsplus, ruby, sas, scala, scheme, scilab, sdlbasic, smalltalk, smarty, sql, systemverilog, tcl, teraterm, text, thinbasic, tsql, typoscript, unicon, vala, vbnet, vb, verilog, vhdl, vim, visualfoxpro, visualprolog, whitespace, winbatch, whois, xbasic, xml, xorg_conf, xpp, z80// +The following language strings are currently recognized: //4cs, 6502acme, 6502kickass, 6502tasm, 68000devpac, abap, actionscript-french, actionscript, actionscript3, ada, algol68, apache, applescript, asm, asp, autoconf, autohotkey, autoit, avisynth, awk, bascomavr, bash, basic4gl, bf, bibtex, blitzbasic, bnf, boo, c, c_loadrunner, c_mac, caddcl, cadlisp, cfdg, cfm, chaiscript, cil, clojure, cmake, cobol, coffeescript, cpp, cpp-qt, csharp, css, cuesheet, d, dcs, delphi, diff, div, dos, dot, e, epc, ecmascript, eiffel, email, erlang, euphoria, f1, falcon, fo, fortran, freebasic, fsharp, gambas, genero, genie, gdb, glsl, gml, gnuplot, go, groovy, gettext, gwbasic, haskell, hicest, hq9plus, html, html5, icon, idl, ini, inno, intercal, io, j, java5, java, javascript, jquery, kixtart, klonec, klonecpp, latex, lb, lisp, llvm, locobasic, logtalk, lolcode, lotusformulas, lotusscript, lscript, lsl2, lua, m68k, magiksf, make, mapbasic, matlab, mirc, modula2, modula3, mmix, mpasm, mxml, mysql, newlisp, nsis, oberon2, objc, objeck, ocaml-brief, ocaml, oobas, oracle8, oracle11, oxygene, oz, pascal, pcre, perl, perl6, per, pf, php-brief, php, pike, pic16, pixelbender, pli, plsql, postgresql, povray, powerbuilder, powershell, proftpd, progress, prolog, properties, providex, purebasic, pycon, python, q, qbasic, rails, rebol, reg, robots, rpmspec, rsplus, ruby, sas, scala, scheme, scilab, sdlbasic, smalltalk, smarty, sql, systemverilog, tcl, teraterm, text, thinbasic, tsql, typoscript, unicon, uscript, vala, vbnet, vb, verilog, vhdl, vim, visualfoxpro, visualprolog, whitespace, winbatch, whois, xbasic, xml, xorg_conf, xpp, yaml, z80, zxbasic// ==== Downloadable Code Blocks ==== -When you use the ''%%<code>%%'' or ''%%<file>%%'' syntax as above, you might want to make the shown code available for download as well. You can to this by specifying a file name after language code like this: +When you use the ''%%<code>%%'' or ''%%<file>%%'' syntax as above, you might want to make the shown code available for download as well. You can do this by specifying a file name after language code like this: <code> <file php myexample.php> diff --git a/doku.php b/doku.php index e699c818b6273276e75009686c3c7fa605444858..4499bc1977df561149cbf841bfe9c01f80475e3d 100644 --- a/doku.php +++ b/doku.php @@ -4,20 +4,22 @@ * * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * @author Andreas Gohr <andi@splitbrain.org> + * + * @global Input $INPUT */ // update message version -$updateVersion = 36; +$updateVersion = 36.1; // xdebug_start_profiling(); -if(!defined('DOKU_INC')) define('DOKU_INC',dirname(__FILE__).'/'); +if(!defined('DOKU_INC')) define('DOKU_INC', dirname(__FILE__).'/'); -if (isset($_SERVER['HTTP_X_DOKUWIKI_DO'])){ +if(isset($_SERVER['HTTP_X_DOKUWIKI_DO'])) { $ACT = trim(strtolower($_SERVER['HTTP_X_DOKUWIKI_DO'])); -} elseif (!empty($_REQUEST['idx'])) { +} elseif(!empty($_REQUEST['idx'])) { $ACT = 'index'; -} elseif (isset($_REQUEST['do'])) { +} elseif(isset($_REQUEST['do'])) { $ACT = $_REQUEST['do']; } else { $ACT = 'show'; @@ -27,29 +29,26 @@ if (isset($_SERVER['HTTP_X_DOKUWIKI_DO'])){ require_once(DOKU_INC.'inc/init.php'); //import variables -$_REQUEST['id'] = str_replace("\xC2\xAD",'',$_REQUEST['id']); //soft-hyphen -$QUERY = trim($_REQUEST['id']); -$ID = getID(); +$_REQUEST['id'] = str_replace("\xC2\xAD", '', $INPUT->str('id')); //soft-hyphen +$QUERY = trim($INPUT->str('id')); +$ID = getID(); // deprecated 2011-01-14 -$NS = getNS($ID); +$NS = getNS($ID); -$REV = $_REQUEST['rev']; -$IDX = $_REQUEST['idx']; -$DATE = $_REQUEST['date']; -$RANGE = $_REQUEST['range']; -$HIGH = $_REQUEST['s']; +$REV = $INPUT->int('rev'); +$IDX = $INPUT->str('idx'); +$DATE = $INPUT->int('date'); +$RANGE = $INPUT->str('range'); +$HIGH = $INPUT->param('s'); if(empty($HIGH)) $HIGH = getGoogleQuery(); -if (isset($_POST['wikitext'])) { - $TEXT = cleanText($_POST['wikitext']); +if($INPUT->post->has('wikitext')) { + $TEXT = cleanText($INPUT->post->str('wikitext')); } -$PRE = cleanText(substr($_POST['prefix'], 0, -1)); -$SUF = cleanText($_POST['suffix']); -$SUM = $_REQUEST['summary']; - -//sanitize revision -$REV = preg_replace('/[^0-9]/','',$REV); +$PRE = cleanText(substr($INPUT->post->str('prefix'), 0, -1)); +$SUF = cleanText($INPUT->post->str('suffix')); +$SUM = $INPUT->post->str('summary'); //make infos about the selected page available $INFO = pageinfo(); @@ -58,28 +57,28 @@ $INFO = pageinfo(); $JSINFO['id'] = $ID; $JSINFO['namespace'] = (string) $INFO['namespace']; - // handle debugging -if($conf['allowdebug'] && $ACT == 'debug'){ +if($conf['allowdebug'] && $ACT == 'debug') { html_debug(); exit; } //send 404 for missing pages if configured or ID has special meaning to bots if(!$INFO['exists'] && - ($conf['send404'] || preg_match('/^(robots\.txt|sitemap\.xml(\.gz)?|favicon\.ico|crossdomain\.xml)$/',$ID)) && - ($ACT == 'show' || (!is_array($ACT) && substr($ACT,0,7) == 'export_')) ){ + ($conf['send404'] || preg_match('/^(robots\.txt|sitemap\.xml(\.gz)?|favicon\.ico|crossdomain\.xml)$/', $ID)) && + ($ACT == 'show' || (!is_array($ACT) && substr($ACT, 0, 7) == 'export_')) +) { header('HTTP/1.0 404 Not Found'); } //prepare breadcrumbs (initialize a static var) -if ($conf['breadcrumbs']) breadcrumbs(); +if($conf['breadcrumbs']) breadcrumbs(); // check upstream checkUpdateMessages(); $tmp = array(); // No event data -trigger_event('DOKUWIKI_STARTED',$tmp); +trigger_event('DOKUWIKI_STARTED', $tmp); //close session session_write_close(); diff --git a/feed.php b/feed.php index 793180ca61b916b3b879c9d8d85a9927d4dc9147..b8db5387f0911cc656aa2c235427a4d4f8082097 100644 --- a/feed.php +++ b/feed.php @@ -4,9 +4,12 @@ * * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * @author Andreas Gohr <andi@splitbrain.org> + * + * @global array $conf + * @global Input $INPUT */ -if(!defined('DOKU_INC')) define('DOKU_INC',dirname(__FILE__).'/'); +if(!defined('DOKU_INC')) define('DOKU_INC', dirname(__FILE__).'/'); require_once(DOKU_INC.'inc/init.php'); //close session @@ -17,14 +20,14 @@ $opt = rss_parseOptions(); // the feed is dynamic - we need a cache for each combo // (but most people just use the default feed so it's still effective) -$cache = getCacheName(join('',array_values($opt)).$_SERVER['REMOTE_USER'],'.feed'); -$key = join('', array_values($opt)) . $_SERVER['REMOTE_USER']; +$cache = getCacheName(join('', array_values($opt)).$_SERVER['REMOTE_USER'], '.feed'); +$key = join('', array_values($opt)).$_SERVER['REMOTE_USER']; $cache = new cache($key, '.feed'); // prepare cache depends $depends['files'] = getConfigFiles('main'); $depends['age'] = $conf['rss_update']; -$depends['purge'] = isset($_REQUEST['purge']); +$depends['purge'] = $INPUT->bool('purge'); // check cacheage and deliver if nothing has changed since last // time or the update interval has not passed, also handles conditional requests @@ -39,34 +42,36 @@ if($cache->useCache($depends)) { exit; } else { http_conditionalRequest(time()); - } +} // create new feed -$rss = new DokuWikiFeedCreator(); -$rss->title = $conf['title'].(($opt['namespace']) ? ' '.$opt['namespace'] : ''); -$rss->link = DOKU_URL; +$rss = new DokuWikiFeedCreator(); +$rss->title = $conf['title'].(($opt['namespace']) ? ' '.$opt['namespace'] : ''); +$rss->link = DOKU_URL; $rss->syndicationURL = DOKU_URL.'feed.php'; $rss->cssStyleSheet = DOKU_URL.'lib/exe/css.php?s=feed'; -$image = new FeedImage(); +$image = new FeedImage(); $image->title = $conf['title']; -$image->url = tpl_getMediaFile('favicon.ico', true); -$image->link = DOKU_URL; -$rss->image = $image; - -$data = null; -$modes = array('list' => 'rssListNamespace', - 'search' => 'rssSearch', - 'recent' => 'rssRecentChanges'); -if (isset($modes[$opt['feed_mode']])) { +$image->url = tpl_getMediaFile('favicon.ico', true); +$image->link = DOKU_URL; +$rss->image = $image; + +$data = null; +$modes = array( + 'list' => 'rssListNamespace', + 'search' => 'rssSearch', + 'recent' => 'rssRecentChanges' +); +if(isset($modes[$opt['feed_mode']])) { $data = $modes[$opt['feed_mode']]($opt); } else { $eventData = array( 'opt' => &$opt, 'data' => &$data, ); - $event = new Doku_Event('FEED_MODE_UNKNOWN', $eventData); - if ($event->advise_before(true)) { + $event = new Doku_Event('FEED_MODE_UNKNOWN', $eventData); + if($event->advise_before(true)) { echo sprintf('<error>Unknown feed mode %s</error>', hsc($opt['feed_mode'])); exit; } @@ -74,7 +79,7 @@ if (isset($modes[$opt['feed_mode']])) { } rss_buildItems($rss, $data, $opt); -$feed = $rss->createFeed($opt['feed_type'],'utf-8'); +$feed = $rss->createFeed($opt['feed_type'], 'utf-8'); // save cachefile $cache->storeCache($feed); @@ -89,51 +94,55 @@ print $feed; * * @author Andreas Gohr <andi@splitbrain.org> */ -function rss_parseOptions(){ +function rss_parseOptions() { global $conf; + global $INPUT; $opt = array(); foreach(array( - // Basic feed properties - // Plugins may probably want to add new values to these - // properties for implementing own feeds - - // One of: list, search, recent - 'feed_mode' => array('mode', 'recent'), - // One of: diff, page, rev, current - 'link_to' => array('linkto', $conf['rss_linkto']), - // One of: abstract, diff, htmldiff, html - 'item_content' => array('content', $conf['rss_content']), - - // Special feed properties - // These are only used by certain feed_modes - - // String, used for feed title, in list and rc mode - 'namespace' => array('ns', null), - // Positive integer, only used in rc mode - 'items' => array('num', $conf['recent']), - // Boolean, only used in rc mode - 'show_minor' => array('minor', false), - // String, only used in search mode - 'search_query' => array('q', null), - // One of: pages, media, both - 'content_type' => array('view', $conf['rss_media']) - - ) as $name => $val) { - $opt[$name] = (isset($_REQUEST[$val[0]]) && !empty($_REQUEST[$val[0]])) - ? $_REQUEST[$val[0]] : $val[1]; + // Basic feed properties + // Plugins may probably want to add new values to these + // properties for implementing own feeds + + // One of: list, search, recent + 'feed_mode' => array('str', 'mode', 'recent'), + // One of: diff, page, rev, current + 'link_to' => array('str', 'linkto', $conf['rss_linkto']), + // One of: abstract, diff, htmldiff, html + 'item_content' => array('str', 'content', $conf['rss_content']), + + // Special feed properties + // These are only used by certain feed_modes + + // String, used for feed title, in list and rc mode + 'namespace' => array('str', 'ns', null), + // Positive integer, only used in rc mode + 'items' => array('int', 'num', $conf['recent']), + // Boolean, only used in rc mode + 'show_minor' => array('bool', 'minor', false), + // String, only used in search mode + 'search_query' => array('str', 'q', null), + // One of: pages, media, both + 'content_type' => array('str', 'view', $conf['rss_media']) + + ) as $name => $val) { + $opt[$name] = $INPUT->$val[0]($val[1], $val[2], true); } - $opt['items'] = max(0, (int) $opt['items']); - $opt['show_minor'] = (bool) $opt['show_minor']; + $opt['items'] = max(0, (int) $opt['items']); + $opt['show_minor'] = (bool) $opt['show_minor']; - $opt['guardmail'] = ($conf['mailguard'] != '' && $conf['mailguard'] != 'none'); + $opt['guardmail'] = ($conf['mailguard'] != '' && $conf['mailguard'] != 'none'); - $type = valid_input_set('type', array('rss','rss2','atom','atom1','rss1', - 'default' => $conf['rss_type']), - $_REQUEST); - switch ($type){ + $type = valid_input_set( + 'type', array( + 'rss', 'rss2', 'atom', 'atom1', 'rss1', + 'default' => $conf['rss_type'] + ), + $_REQUEST + ); + switch($type) { case 'rss': $opt['feed_type'] = 'RSS0.91'; $opt['mime_type'] = 'text/xml'; @@ -166,26 +175,27 @@ function rss_parseOptions(){ * Add recent changed pages to a feed object * * @author Andreas Gohr <andi@splitbrain.org> - * @param object $rss - the FeedCreator Object - * @param array $data - the items to add - * @param array $opt - the feed options + * @param FeedCreator $rss the FeedCreator Object + * @param array $data the items to add + * @param array $opt the feed options */ -function rss_buildItems(&$rss,&$data,$opt){ +function rss_buildItems(&$rss, &$data, $opt) { global $conf; global $lang; + /* @var auth_basic $auth */ global $auth; $eventData = array( - 'rss' => &$rss, + 'rss' => &$rss, 'data' => &$data, - 'opt' => &$opt, + 'opt' => &$opt, ); - $event = new Doku_Event('FEED_DATA_PROCESS', $eventData); - if ($event->advise_before(false)){ - foreach($data as $ditem){ - if(!is_array($ditem)){ + $event = new Doku_Event('FEED_DATA_PROCESS', $eventData); + if($event->advise_before(false)) { + foreach($data as $ditem) { + if(!is_array($ditem)) { // not an array? then only a list of IDs was given - $ditem = array( 'id' => $ditem ); + $ditem = array('id' => $ditem); } $item = new FeedItem(); @@ -195,88 +205,104 @@ function rss_buildItems(&$rss,&$data,$opt){ } // add date - if($ditem['date']){ + if($ditem['date']) { $date = $ditem['date']; - }elseif($meta['date']['modified']){ + } elseif($meta['date']['modified']) { $date = $meta['date']['modified']; - }else{ + } else { $date = @filemtime(wikiFN($id)); } - if($date) $item->date = date('r',$date); + if($date) $item->date = date('r', $date); // add title - if($conf['useheading'] && $meta['title']){ + if($conf['useheading'] && $meta['title']) { $item->title = $meta['title']; - }else{ + } else { $item->title = $ditem['id']; } - if($conf['rss_show_summary'] && !empty($ditem['sum'])){ + if($conf['rss_show_summary'] && !empty($ditem['sum'])) { $item->title .= ' - '.strip_tags($ditem['sum']); } // add item link - switch ($opt['link_to']){ + switch($opt['link_to']) { case 'page': - if ($ditem['media']) { - $item->link = media_managerURL(array('image' => $id, - 'ns' => getNS($id), - 'rev' => $date), '&', true); + if($ditem['media']) { + $item->link = media_managerURL( + array( + 'image' => $id, + 'ns' => getNS($id), + 'rev' => $date + ), '&', true + ); } else { - $item->link = wl($id,'rev='.$date,true,'&', true); + $item->link = wl($id, 'rev='.$date, true, '&', true); } break; case 'rev': - if ($ditem['media']) { - $item->link = media_managerURL(array('image' => $id, - 'ns' => getNS($id), - 'rev' => $date, - 'tab_details' => 'history'), '&', true); + if($ditem['media']) { + $item->link = media_managerURL( + array( + 'image' => $id, + 'ns' => getNS($id), + 'rev' => $date, + 'tab_details' => 'history' + ), '&', true + ); } else { - $item->link = wl($id,'do=revisions&rev='.$date,true,'&'); + $item->link = wl($id, 'do=revisions&rev='.$date, true, '&'); } break; case 'current': - if ($ditem['media']) { - $item->link = media_managerURL(array('image' => $id, - 'ns' => getNS($id)), '&', true); + if($ditem['media']) { + $item->link = media_managerURL( + array( + 'image' => $id, + 'ns' => getNS($id) + ), '&', true + ); } else { - $item->link = wl($id, '', true,'&'); + $item->link = wl($id, '', true, '&'); } break; case 'diff': default: - if ($ditem['media']) { - $item->link = media_managerURL(array('image' => $id, - 'ns' => getNS($id), - 'rev' => $date, - 'tab_details' => 'history', - 'mediado' => 'diff'), '&', true); + if($ditem['media']) { + $item->link = media_managerURL( + array( + 'image' => $id, + 'ns' => getNS($id), + 'rev' => $date, + 'tab_details' => 'history', + 'mediado' => 'diff' + ), '&', true + ); } else { - $item->link = wl($id,'rev='.$date.'&do=diff',true,'&'); + $item->link = wl($id, 'rev='.$date.'&do=diff', true, '&'); } } // add item content - switch ($opt['item_content']){ + switch($opt['item_content']) { case 'diff': case 'htmldiff': - if ($ditem['media']) { - $revs = getRevisions($id, 0, 1, 8192, true); - $rev = $revs[0]; + if($ditem['media']) { + $revs = getRevisions($id, 0, 1, 8192, true); + $rev = $revs[0]; $src_r = ''; $src_l = ''; - if ($size = media_image_preview_size($id, false, new JpegMeta(mediaFN($id)), 300)) { - $more = 'w='.$size[0].'&h='.$size[1].'t='.@filemtime(mediaFN($id)); + if($size = media_image_preview_size($id, false, new JpegMeta(mediaFN($id)), 300)) { + $more = 'w='.$size[0].'&h='.$size[1].'t='.@filemtime(mediaFN($id)); $src_r = ml($id, $more); } - if ($rev && $size = media_image_preview_size($id, $rev, new JpegMeta(mediaFN($id, $rev)), 300)){ - $more = 'rev='.$rev.'&w='.$size[0].'&h='.$size[1]; + if($rev && $size = media_image_preview_size($id, $rev, new JpegMeta(mediaFN($id, $rev)), 300)) { + $more = 'rev='.$rev.'&w='.$size[0].'&h='.$size[1]; $src_l = ml($id, $more); } $content = ''; - if ($src_r) { - $content = '<table>'; + if($src_r) { + $content = '<table>'; $content .= '<tr><th width="50%">'.$rev.'</th>'; $content .= '<th width="50%">'.$lang['current'].'</th></tr>'; $content .= '<tr align="center"><td><img src="'.$src_l.'" alt="" /></td><td>'; @@ -287,61 +313,61 @@ function rss_buildItems(&$rss,&$data,$opt){ } else { require_once(DOKU_INC.'inc/DifferenceEngine.php'); $revs = getRevisions($id, 0, 1); - $rev = $revs[0]; - - if($rev){ - $df = new Diff(explode("\n",htmlspecialchars(rawWiki($id,$rev))), - explode("\n",htmlspecialchars(rawWiki($id,'')))); - }else{ - $df = new Diff(array(''), - explode("\n",htmlspecialchars(rawWiki($id,'')))); + $rev = $revs[0]; + + if($rev) { + $df = new Diff(explode("\n", htmlspecialchars(rawWiki($id, $rev))), + explode("\n", htmlspecialchars(rawWiki($id, '')))); + } else { + $df = new Diff(array(''), + explode("\n", htmlspecialchars(rawWiki($id, '')))); } - if($opt['item_content'] == 'htmldiff'){ - $tdf = new TableDiffFormatter(); - $content = '<table>'; + if($opt['item_content'] == 'htmldiff') { + $tdf = new TableDiffFormatter(); + $content = '<table>'; $content .= '<tr><th colspan="2" width="50%">'.$rev.'</th>'; $content .= '<th colspan="2" width="50%">'.$lang['current'].'</th></tr>'; $content .= $tdf->format($df); $content .= '</table>'; - }else{ - $udf = new UnifiedDiffFormatter(); + } else { + $udf = new UnifiedDiffFormatter(); $content = "<pre>\n".$udf->format($df)."\n</pre>"; } } break; case 'html': - if ($ditem['media']) { - if ($size = media_image_preview_size($id, false, new JpegMeta(mediaFN($id)))) { - $more = 'w='.$size[0].'&h='.$size[1].'t='.@filemtime(mediaFN($id)); - $src = ml($id, $more); + if($ditem['media']) { + if($size = media_image_preview_size($id, false, new JpegMeta(mediaFN($id)))) { + $more = 'w='.$size[0].'&h='.$size[1].'t='.@filemtime(mediaFN($id)); + $src = ml($id, $more); $content = '<img src="'.$src.'" alt="'.$id.'" />'; } else { $content = ''; } } else { - $content = p_wiki_xhtml($id,$date,false); + $content = p_wiki_xhtml($id, $date, false); // no TOC in feeds - $content = preg_replace('/(<!-- TOC START -->).*(<!-- TOC END -->)/s','',$content); + $content = preg_replace('/(<!-- TOC START -->).*(<!-- TOC END -->)/s', '', $content); // add alignment for images $content = preg_replace('/(<img .*?class="medialeft")/s', '\\1 align="left"', $content); $content = preg_replace('/(<img .*?class="mediaright")/s', '\\1 align="right"', $content); // make URLs work when canonical is not set, regexp instead of rerendering! - if(!$conf['canonical']){ - $base = preg_quote(DOKU_REL,'/'); - $content = preg_replace('/(<a href|<img src)="('.$base.')/s','$1="'.DOKU_URL,$content); + if(!$conf['canonical']) { + $base = preg_quote(DOKU_REL, '/'); + $content = preg_replace('/(<a href|<img src)="('.$base.')/s', '$1="'.DOKU_URL, $content); } } break; case 'abstract': default: - if ($ditem['media']) { - if ($size = media_image_preview_size($id, false, new JpegMeta(mediaFN($id)))) { - $more = 'w='.$size[0].'&h='.$size[1].'t='.@filemtime(mediaFN($id)); - $src = ml($id, $more); + if($ditem['media']) { + if($size = media_image_preview_size($id, false, new JpegMeta(mediaFN($id)))) { + $more = 'w='.$size[0].'&h='.$size[1].'t='.@filemtime(mediaFN($id)); + $src = ml($id, $more); $content = '<img src="'.$src.'" alt="'.$id.'" />'; } else { $content = ''; @@ -354,12 +380,12 @@ function rss_buildItems(&$rss,&$data,$opt){ // add user # FIXME should the user be pulled from metadata as well? - $user = @$ditem['user']; // the @ spares time repeating lookup + $user = @$ditem['user']; // the @ spares time repeating lookup $item->author = ''; - if($user && $conf['useacl'] && $auth){ + if($user && $conf['useacl'] && $auth) { $userInfo = $auth->getUserData($user); - if ($userInfo){ - switch ($conf['showuseras']){ + if($userInfo) { + switch($conf['showuseras']) { case 'username': $item->author = $userInfo['name']; break; @@ -370,35 +396,37 @@ function rss_buildItems(&$rss,&$data,$opt){ } else { $item->author = $user; } - if($userInfo && !$opt['guardmail']){ + if($userInfo && !$opt['guardmail']) { $item->authorEmail = $userInfo['mail']; - }else{ + } else { //cannot obfuscate because some RSS readers may check validity $item->authorEmail = $user.'@'.$ditem['ip']; } - }elseif($user){ + } elseif($user) { // this happens when no ACL but some Apache auth is used $item->author = $user; $item->authorEmail = $user.'@'.$ditem['ip']; - }else{ + } else { $item->authorEmail = 'anonymous@'.$ditem['ip']; } // add category if(isset($meta['subject'])) { $item->category = $meta['subject']; - }else{ + } else { $cat = getNS($id); if($cat) $item->category = $cat; } // finally add the item to the feed object, after handing it to registered plugins - $evdata = array('item' => &$item, - 'opt' => &$opt, - 'ditem' => &$ditem, - 'rss' => &$rss); - $evt = new Doku_Event('FEED_ITEM_ADD', $evdata); - if ($evt->advise_before()){ + $evdata = array( + 'item' => &$item, + 'opt' => &$opt, + 'ditem' => &$ditem, + 'rss' => &$rss + ); + $evt = new Doku_Event('FEED_ITEM_ADD', $evdata); + if($evt->advise_before()) { $rss->addItem($item); } $evt->advise_after(); // for completeness @@ -407,20 +435,19 @@ function rss_buildItems(&$rss,&$data,$opt){ $event->advise_after(); } - /** * Add recent changed pages to the feed object * * @author Andreas Gohr <andi@splitbrain.org> */ -function rssRecentChanges($opt){ +function rssRecentChanges($opt) { global $conf; $flags = RECENTS_SKIP_DELETED; if(!$opt['show_minor']) $flags += RECENTS_SKIP_MINORS; if($opt['content_type'] == 'media' && $conf['mediarevisions']) $flags += RECENTS_MEDIA_CHANGES; if($opt['content_type'] == 'both' && $conf['mediarevisions']) $flags += RECENTS_MEDIA_PAGES_MIXED; - $recents = getRecents(0,$opt['items'],$opt['namespace'],$flags); + $recents = getRecents(0, $opt['items'], $opt['namespace'], $flags); return $recents; } @@ -429,16 +456,16 @@ function rssRecentChanges($opt){ * * @author Andreas Gohr <andi@splitbrain.org> */ -function rssListNamespace($opt){ +function rssListNamespace($opt) { require_once(DOKU_INC.'inc/search.php'); global $conf; - $ns=':'.cleanID($opt['namespace']); - $ns=str_replace(':','/',$ns); + $ns = ':'.cleanID($opt['namespace']); + $ns = str_replace(':', '/', $ns); $data = array(); sort($data); - search($data,$conf['datadir'],'search_list','',$ns); + search($data, $conf['datadir'], 'search_list', '', $ns); return $data; } @@ -448,11 +475,11 @@ function rssListNamespace($opt){ * * @author Andreas Gohr <andi@splitbrain.org> */ -function rssSearch($opt){ - if(!$opt['search_query']) return; +function rssSearch($opt) { + if(!$opt['search_query']) return array(); require_once(DOKU_INC.'inc/fulltext.php'); - $data = ft_pageSearch($opt['search_query'],$poswords); + $data = ft_pageSearch($opt['search_query'], $poswords); $data = array_keys($data); return $data; diff --git a/inc/DifferenceEngine.php b/inc/DifferenceEngine.php index 01926b20cffc3bbbe8730d4e15dbabff315c947f..0a7ce8e7c421ccea3cb1ddf4dcc5ecd42821330d 100644 --- a/inc/DifferenceEngine.php +++ b/inc/DifferenceEngine.php @@ -818,6 +818,39 @@ class DiffFormatter { } } +/** + * Utilityclass for styling HTML formatted diffs + * + * Depends on global var $DIFF_INLINESTYLES, if true some minimal predefined + * inline styles are used. Useful for HTML mails and RSS feeds + * + * @author Andreas Gohr <andi@splitbrain.org> + */ +class HTMLDiff { + /** + * Holds the style names and basic CSS + */ + static public $styles = array( + 'diff-addedline' => 'background-color: #ddffdd;', + 'diff-deletedline' => 'background-color: #ffdddd;', + 'diff-context' => 'background-color: #f5f5f5;', + 'diff-mark' => 'color: #ff0000;', + ); + + /** + * Return a class or style parameter + */ + static function css($classname){ + global $DIFF_INLINESTYLES; + + if($DIFF_INLINESTYLES){ + if(!isset(self::$styles[$classname])) return ''; + return 'style="'.self::$styles[$classname].'"'; + }else{ + return 'class="'.$classname.'"'; + } + } +} /** * Additions by Axel Boldt follow, partly taken from diff.php, phpwiki-1.3.3 @@ -838,11 +871,11 @@ class _HWLDF_WordAccumulator { function _flushGroup($new_tag) { if ($this->_group !== '') { if ($this->_tag == 'mark') - $this->_line .= '<strong>'.$this->_group.'</strong>'; + $this->_line .= '<strong '.HTMLDiff::css('diff-mark').'>'.$this->_group.'</strong>'; elseif ($this->_tag == 'add') - $this->_line .= '<span class="diff-addedline">'.$this->_group.'</span>'; + $this->_line .= '<span '.HTMLDiff::css('diff-addedline').'>'.$this->_group.'</span>'; elseif ($this->_tag == 'del') - $this->_line .= '<span class="diff-deletedline"><del>'.$this->_group.'</del></span>'; + $this->_line .= '<span '.HTMLDiff::css('diff-deletedline').'><del>'.$this->_group.'</del></span>'; else $this->_line .= $this->_group; } @@ -1020,8 +1053,8 @@ class TableDiffFormatter extends DiffFormatter { global $lang; $l1 = $lang['line'].' '.$xbeg; $l2 = $lang['line'].' '.$ybeg; - $r = '<tr><td class="diff-blockheader" colspan="2">'.$l1.":</td>\n". - '<td class="diff-blockheader" colspan="2">'.$l2.":</td>\n". + $r = '<tr><td '.HTMLDiff::css('diff-blockheader').' colspan="2">'.$l1.":</td>\n". + '<td '.HTMLDiff::css('diff-blockheader').' colspan="2">'.$l2.":</td>\n". "</tr>\n"; return $r; } @@ -1037,11 +1070,11 @@ class TableDiffFormatter extends DiffFormatter { } function addedLine($line) { - return '<td>+</td><td class="diff-addedline">' . $line.'</td>'; + return '<td>+</td><td '.HTMLDiff::css('diff-addedline').'>' . $line.'</td>'; } function deletedLine($line) { - return '<td>-</td><td class="diff-deletedline">' . $line.'</td>'; + return '<td>-</td><td '.HTMLDiff::css('diff-deletedline').'>' . $line.'</td>'; } function emptyLine() { @@ -1049,7 +1082,7 @@ class TableDiffFormatter extends DiffFormatter { } function contextLine($line) { - return '<td> </td><td class="diff-context">'.$line.'</td>'; + return '<td> </td><td '.HTMLDiff::css('diff-context').'>'.$line.'</td>'; } function _added($lines) { @@ -1115,9 +1148,9 @@ class InlineDiffFormatter extends DiffFormatter { $xbeg .= "," . $xlen; if ($ylen != 1) $ybeg .= "," . $ylen; - $r = '<tr><td colspan="'.$this->colspan.'" class="diff-blockheader">@@ '.$lang['line']." -$xbeg +$ybeg @@"; - $r .= ' <span class="diff-deletedline"><del>'.$lang['deleted'].'</del></span>'; - $r .= ' <span class="diff-addedline">'.$lang['created'].'</span>'; + $r = '<tr><td colspan="'.$this->colspan.'" '.HTMLDiff::css('diff-blockheader').'>@@ '.$lang['line']." -$xbeg +$ybeg @@"; + $r .= ' <span '.HTMLDiff::css('diff-deletedline').'><del>'.$lang['deleted'].'</del></span>'; + $r .= ' <span '.HTMLDiff::css('diff-addedline').'>'.$lang['created'].'</span>'; $r .= "</td></tr>\n"; return $r; } @@ -1134,19 +1167,19 @@ class InlineDiffFormatter extends DiffFormatter { function _added($lines) { foreach ($lines as $line) { - print('<tr><td colspan="'.$this->colspan.'" class="diff-addedline">'. $line . "</td></tr>\n"); + print('<tr><td colspan="'.$this->colspan.'" '.HTMLDiff::css('diff-addedline').'>'. $line . "</td></tr>\n"); } } function _deleted($lines) { foreach ($lines as $line) { - print('<tr><td colspan="'.$this->colspan.'" class="diff-deletedline"><del>' . $line . "</del></td></tr>\n"); + print('<tr><td colspan="'.$this->colspan.'" '.HTMLDiff::css('diff-deletedline').'><del>' . $line . "</del></td></tr>\n"); } } function _context($lines) { foreach ($lines as $line) { - print('<tr><td colspan="'.$this->colspan.'" class="diff-context">'.$line."</td></tr>\n"); + print('<tr><td colspan="'.$this->colspan.'" '.HTMLDiff::css('diff-context').'>'.$line."</td></tr>\n"); } } diff --git a/inc/Input.class.php b/inc/Input.class.php new file mode 100644 index 0000000000000000000000000000000000000000..f4174404a9b91e813f2a7f11a095ebca4e3598b7 --- /dev/null +++ b/inc/Input.class.php @@ -0,0 +1,229 @@ +<?php + +/** + * Encapsulates access to the $_REQUEST array, making sure used parameters are initialized and + * have the correct type. + * + * All function access the $_REQUEST array by default, if you want to access $_POST or $_GET + * explicitly use the $post and $get members. + * + * @author Andreas Gohr <andi@splitbrain.org> + */ +class Input { + + /** @var PostInput Access $_POST parameters */ + public $post; + /** @var GetInput Access $_GET parameters */ + public $get; + + protected $access; + + /** + * Intilizes the Input class and it subcomponents + */ + function __construct() { + $this->access = &$_REQUEST; + $this->post = new PostInput(); + $this->get = new GetInput(); + } + + /** + * Check if a parameter was set + * + * Basically a wrapper around isset. When called on the $post and $get subclasses, + * the parameter is set to $_POST or $_GET and to $_REQUEST + * + * @see isset + * @param string $name Parameter name + * @return bool + */ + public function has($name) { + return isset($this->access[$name]); + } + + /** + * Remove a parameter from the superglobals + * + * Basically a wrapper around unset. When NOT called on the $post and $get subclasses, + * the parameter will also be removed from $_POST or $_GET + * + * @see isset + * @param string $name Parameter name + * @return bool + */ + public function remove($name) { + if(isset($this->access[$name])) { + unset($this->access[$name]); + } + // also remove from sub classes + if(isset($this->post) && isset($_POST[$name])) { + unset($_POST[$name]); + } + if(isset($this->get) && isset($_GET[$name])) { + unset($_GET[$name]); + } + } + + /** + * Access a request parameter without any type conversion + * + * @param string $name Parameter name + * @param mixed $default Default to return if parameter isn't set + * @param bool $nonempty Return $default if parameter is set but empty() + * @return mixed + */ + public function param($name, $default = null, $nonempty = false) { + if(!isset($this->access[$name])) return $default; + if($nonempty && empty($this->access[$name])) return $default; + return $this->access[$name]; + } + + /** + * Sets a parameter + * + * @param string $name Parameter name + * @param mixed $value Value to set + */ + public function set($name, $value) { + $this->access[$name] = $value; + } + + /** + * Get a reference to a request parameter + * + * This avoids copying data in memory, when the parameter is not set it will be created + * and intialized with the given $default value before a reference is returned + * + * @param string $name Parameter name + * @param mixed $default If parameter is not set, initialize with this value + * @param bool $nonempty Init with $default if parameter is set but empty() + * @return &mixed + */ + public function &ref($name, $default = '', $nonempty = false) { + if(!isset($this->access[$name]) || ($nonempty && empty($this->access[$name]))) { + $this->set($name, $default); + } + + return $this->access[$name]; + } + + /** + * Access a request parameter as int + * + * @param string $name Parameter name + * @param mixed $default Default to return if parameter isn't set or is an array + * @param bool $nonempty Return $default if parameter is set but empty() + * @return int + */ + public function int($name, $default = 0, $nonempty = false) { + if(!isset($this->access[$name])) return $default; + if(is_array($this->access[$name])) return $default; + if($this->access[$name] === '') return $default; + if($nonempty && empty($this->access[$name])) return $default; + + return (int) $this->access[$name]; + } + + /** + * Access a request parameter as string + * + * @param string $name Parameter name + * @param mixed $default Default to return if parameter isn't set or is an array + * @param bool $nonempty Return $default if parameter is set but empty() + * @return string + */ + public function str($name, $default = '', $nonempty = false) { + if(!isset($this->access[$name])) return $default; + if(is_array($this->access[$name])) return $default; + if($nonempty && empty($this->access[$name])) return $default; + + return (string) $this->access[$name]; + } + + /** + * Access a request parameter as bool + * + * Note: $nonempty is here for interface consistency and makes not much sense for booleans + * + * @param string $name Parameter name + * @param mixed $default Default to return if parameter isn't set + * @param bool $nonempty Return $default if parameter is set but empty() + * @return bool + */ + public function bool($name, $default = false, $nonempty = false) { + if(!isset($this->access[$name])) return $default; + if(is_array($this->access[$name])) return $default; + if($this->access[$name] === '') return $default; + if($nonempty && empty($this->access[$name])) return $default; + + return (bool) $this->access[$name]; + } + + /** + * Access a request parameter as array + * + * @param string $name Parameter name + * @param mixed $default Default to return if parameter isn't set + * @param bool $nonempty Return $default if parameter is set but empty() + * @return array + */ + public function arr($name, $default = array(), $nonempty = false) { + if(!isset($this->access[$name])) return $default; + if(!is_array($this->access[$name])) return $default; + if($nonempty && empty($this->access[$name])) return $default; + + return (array) $this->access[$name]; + } + +} + +/** + * Internal class used for $_POST access in Input class + */ +class PostInput extends Input { + protected $access; + + /** + * Initialize the $access array, remove subclass members + */ + function __construct() { + $this->access = &$_POST; + } + + /** + * Sets a parameter in $_POST and $_REQUEST + * + * @param string $name Parameter name + * @param mixed $value Value to set + */ + public function set($name, $value) { + parent::set($name, $value); + $_REQUEST[$name] = $value; + } +} + +/** + * Internal class used for $_GET access in Input class + + */ +class GetInput extends Input { + protected $access; + + /** + * Initialize the $access array, remove subclass members + */ + function __construct() { + $this->access = &$_GET; + } + + /** + * Sets a parameter in $_GET and $_REQUEST + * + * @param string $name Parameter name + * @param mixed $value Value to set + */ + public function set($name, $value) { + parent::set($name, $value); + $_REQUEST[$name] = $value; + } +} diff --git a/inc/JSON.php b/inc/JSON.php index 2dea44003fc24c7dfe84df7fdc96592a908c4f2b..7f89005ff80109d44eb8ace1100f0e64327c1c47 100644 --- a/inc/JSON.php +++ b/inc/JSON.php @@ -47,8 +47,6 @@ * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH * DAMAGE. * - * @category - * @package * @author Michal Migurski <mike-json@teczno.com> * @author Matt Knapp <mdknapp[at]gmail[dot]com> * @author Brett Stimmerman <brettstimmerman[at]gmail[dot]com> @@ -97,19 +95,6 @@ define('JSON_STRICT_TYPE', 11); /** * Converts to and from JSON format. - * - * @category - * @package - * @author Michal Migurski <mike-json@teczno.com> - * @author Matt Knapp <mdknapp[at]gmail[dot]com> - * @author Brett Stimmerman <brettstimmerman[at]gmail[dot]com> - * @copyright 2005 Michal Migurski - * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version - * @link - * @see - * @since - * @deprecated */ class JSON { @@ -151,7 +136,9 @@ class JSON { * @access public */ function encode($var) { - if (function_exists('json_encode')) return json_encode($var); + if (!$this->skipnative && function_exists('json_encode')){ + return json_encode($var); + } switch (gettype($var)) { case 'boolean': return $var ? 'true' : 'false'; @@ -582,17 +569,17 @@ class JSON { } - } elseif ((($chrs{$c} == '"') || ($chrs{$c} == "'")) && - in_array($top['what'], array(JSON_SLICE, JSON_IN_ARR, JSON_IN_OBJ))) { + } elseif ((($chrs{$c} == '"') || ($chrs{$c} == "'")) && ($top['what'] != JSON_IN_STR)) { // found a quote, and we are not inside a string array_push($stk, array('what' => JSON_IN_STR, 'where' => $c, 'delim' => $chrs{$c})); //print("Found start of string at {$c}\n"); } elseif (($chrs{$c} == $top['delim']) && ($top['what'] == JSON_IN_STR) && - (($chrs{$c - 1} != "\\") || - ($chrs{$c - 1} == "\\" && $chrs{$c - 2} == "\\"))) { + ((strlen(substr($chrs, 0, $c)) - strlen(rtrim(substr($chrs, 0, $c), '\\'))) % 2 != 1)) { // found a quote, we're in a string, and it's not escaped + // we know that it's not escaped becase there is _not_ an + // odd number of backslashes at the end of the string so far array_pop($stk); //print("Found end of string at {$c}: ".substr($chrs, $top['where'], (1 + 1 + $c - $top['where']))."\n"); diff --git a/inc/Mailer.class.php b/inc/Mailer.class.php new file mode 100644 index 0000000000000000000000000000000000000000..fccf1dad93a0fe92cd717215606edcd3a435dd80 --- /dev/null +++ b/inc/Mailer.class.php @@ -0,0 +1,658 @@ +<?php +/** + * A class to build and send multi part mails (with HTML content and embedded + * attachments). All mails are assumed to be in UTF-8 encoding. + * + * Attachments are handled in memory so this shouldn't be used to send huge + * files, but then again mail shouldn't be used to send huge files either. + * + * @author Andreas Gohr <andi@splitbrain.org> + */ + +// end of line for mail lines - RFC822 says CRLF but postfix (and other MTAs?) +// think different +if(!defined('MAILHEADER_EOL')) define('MAILHEADER_EOL', "\n"); +#define('MAILHEADER_ASCIIONLY',1); + +/** + * Mail Handling + */ +class Mailer { + + protected $headers = array(); + protected $attach = array(); + protected $html = ''; + protected $text = ''; + + protected $boundary = ''; + protected $partid = ''; + protected $sendparam = null; + + /** @var EmailAddressValidator */ + protected $validator = null; + protected $allowhtml = true; + + /** + * Constructor + * + * Initializes the boundary strings and part counters + */ + public function __construct() { + global $conf; + + $server = parse_url(DOKU_URL, PHP_URL_HOST); + + $this->partid = md5(uniqid(rand(), true)).'@'.$server; + $this->boundary = '----------'.md5(uniqid(rand(), true)); + + $listid = join('.', array_reverse(explode('/', DOKU_BASE))).$server; + $listid = strtolower(trim($listid, '.')); + + $this->allowhtml = (bool)$conf['htmlmail']; + + // add some default headers for mailfiltering FS#2247 + $this->setHeader('X-Mailer', 'DokuWiki '.getVersion()); + $this->setHeader('X-DokuWiki-User', $_SERVER['REMOTE_USER']); + $this->setHeader('X-DokuWiki-Title', $conf['title']); + $this->setHeader('X-DokuWiki-Server', $server); + $this->setHeader('X-Auto-Response-Suppress', 'OOF'); + $this->setHeader('List-Id', $conf['title'].' <'.$listid.'>'); + } + + /** + * Attach a file + * + * @param string $path Path to the file to attach + * @param string $mime Mimetype of the attached file + * @param string $name The filename to use + * @param string $embed Unique key to reference this file from the HTML part + */ + public function attachFile($path, $mime, $name = '', $embed = '') { + if(!$name) { + $name = basename($path); + } + + $this->attach[] = array( + 'data' => file_get_contents($path), + 'mime' => $mime, + 'name' => $name, + 'embed' => $embed + ); + } + + /** + * Attach a file + * + * @param string $data The file contents to attach + * @param string $mime Mimetype of the attached file + * @param string $name The filename to use + * @param string $embed Unique key to reference this file from the HTML part + */ + public function attachContent($data, $mime, $name = '', $embed = '') { + if(!$name) { + list(, $ext) = explode('/', $mime); + $name = count($this->attach).".$ext"; + } + + $this->attach[] = array( + 'data' => $data, + 'mime' => $mime, + 'name' => $name, + 'embed' => $embed + ); + } + + /** + * Callback function to automatically embed images referenced in HTML templates + */ + protected function autoembed_cb($matches) { + static $embeds = 0; + $embeds++; + + // get file and mime type + $media = cleanID($matches[1]); + list(, $mime) = mimetype($media); + $file = mediaFN($media); + if(!file_exists($file)) return $matches[0]; //bad reference, keep as is + + // attach it and set placeholder + $this->attachFile($file, $mime, '', 'autoembed'.$embeds); + return '%%autoembed'.$embeds.'%%'; + } + + /** + * Add an arbitrary header to the mail + * + * If an empy value is passed, the header is removed + * + * @param string $header the header name (no trailing colon!) + * @param string $value the value of the header + * @param bool $clean remove all non-ASCII chars and line feeds? + */ + public function setHeader($header, $value, $clean = true) { + $header = str_replace(' ', '-', ucwords(strtolower(str_replace('-', ' ', $header)))); // streamline casing + if($clean) { + $header = preg_replace('/[^\w \-\.\+\@]+/', '', $header); + $value = preg_replace('/[^\w \-\.\+\@<>]+/', '', $value); + } + + // empty value deletes + $value = trim($value); + if($value === '') { + if(isset($this->headers[$header])) unset($this->headers[$header]); + } else { + $this->headers[$header] = $value; + } + } + + /** + * Set additional parameters to be passed to sendmail + * + * Whatever is set here is directly passed to PHP's mail() command as last + * parameter. Depending on the PHP setup this might break mailing alltogether + */ + public function setParameters($param) { + $this->sendparam = $param; + } + + /** + * Set the text and HTML body and apply replacements + * + * This function applies a whole bunch of default replacements in addition + * to the ones specidifed as parameters + * + * If you pass the HTML part or HTML replacements yourself you have to make + * sure you encode all HTML special chars correctly + * + * @param string $text plain text body + * @param array $textrep replacements to apply on the text part + * @param array $htmlrep replacements to apply on the HTML part, leave null to use $textrep + * @param array $html the HTML body, leave null to create it from $text + * @param bool $wrap wrap the HTML in the default header/Footer + */ + public function setBody($text, $textrep = null, $htmlrep = null, $html = null, $wrap = true) { + global $INFO; + global $conf; + $htmlrep = (array)$htmlrep; + $textrep = (array)$textrep; + + // create HTML from text if not given + if(is_null($html)) { + $html = $text; + $html = hsc($html); + $html = preg_replace('/^-----*$/m', '<hr >', $html); + $html = nl2br($html); + } + if($wrap) { + $wrap = rawLocale('mailwrap', 'html'); + $html = preg_replace('/\n-- <br \/>.*$/s', '', $html); //strip signature + $html = str_replace('@HTMLBODY@', $html, $wrap); + } + + // copy over all replacements missing for HTML (autolink URLs) + foreach($textrep as $key => $value) { + if(isset($htmlrep[$key])) continue; + if(preg_match('/^https?:\/\//i', $value)) { + $htmlrep[$key] = '<a href="'.hsc($value).'">'.hsc($value).'</a>'; + } else { + $htmlrep[$key] = hsc($value); + } + } + + // embed media from templates + $html = preg_replace_callback( + '/@MEDIA\(([^\)]+)\)@/', + array($this, 'autoembed_cb'), $html + ); + + // prepare default replacements + $ip = clientIP(); + $cip = gethostsbyaddrs($ip); + $trep = array( + 'DATE' => dformat(), + 'BROWSER' => $_SERVER['HTTP_USER_AGENT'], + 'IPADDRESS' => $ip, + 'HOSTNAME' => $cip, + 'TITLE' => $conf['title'], + 'DOKUWIKIURL' => DOKU_URL, + 'USER' => $_SERVER['REMOTE_USER'], + 'NAME' => $INFO['userinfo']['name'], + 'MAIL' => $INFO['userinfo']['mail'], + ); + $trep = array_merge($trep, (array)$textrep); + $hrep = array( + 'DATE' => '<i>'.hsc(dformat()).'</i>', + 'BROWSER' => hsc($_SERVER['HTTP_USER_AGENT']), + 'IPADDRESS' => '<code>'.hsc($ip).'</code>', + 'HOSTNAME' => '<code>'.hsc($cip).'</code>', + 'TITLE' => hsc($conf['title']), + 'DOKUWIKIURL' => '<a href="'.DOKU_URL.'">'.DOKU_URL.'</a>', + 'USER' => hsc($_SERVER['REMOTE_USER']), + 'NAME' => hsc($INFO['userinfo']['name']), + 'MAIL' => '<a href="mailto:"'.hsc($INFO['userinfo']['mail']).'">'. + hsc($INFO['userinfo']['mail']).'</a>', + ); + $hrep = array_merge($hrep, (array)$htmlrep); + + // Apply replacements + foreach($trep as $key => $substitution) { + $text = str_replace('@'.strtoupper($key).'@', $substitution, $text); + } + foreach($hrep as $key => $substitution) { + $html = str_replace('@'.strtoupper($key).'@', $substitution, $html); + } + + $this->setHTML($html); + $this->setText($text); + } + + /** + * Set the HTML part of the mail + * + * Placeholders can be used to reference embedded attachments + * + * You probably want to use setBody() instead + */ + public function setHTML($html) { + $this->html = $html; + } + + /** + * Set the plain text part of the mail + * + * You probably want to use setBody() instead + */ + public function setText($text) { + $this->text = $text; + } + + /** + * Add the To: recipients + * + * @see setAddress + * @param string $address Multiple adresses separated by commas + */ + public function to($address) { + $this->setHeader('To', $address, false); + } + + /** + * Add the Cc: recipients + * + * @see setAddress + * @param string $address Multiple adresses separated by commas + */ + public function cc($address) { + $this->setHeader('Cc', $address, false); + } + + /** + * Add the Bcc: recipients + * + * @see setAddress + * @param string $address Multiple adresses separated by commas + */ + public function bcc($address) { + $this->setHeader('Bcc', $address, false); + } + + /** + * Add the From: address + * + * This is set to $conf['mailfrom'] when not specified so you shouldn't need + * to call this function + * + * @see setAddress + * @param string $address from address + */ + public function from($address) { + $this->setHeader('From', $address, false); + } + + /** + * Add the mail's Subject: header + * + * @param string $subject the mail subject + */ + public function subject($subject) { + $this->headers['Subject'] = $subject; + } + + /** + * Sets an email address header with correct encoding + * + * Unicode characters will be deaccented and encoded base64 + * for headers. Addresses may not contain Non-ASCII data! + * + * Example: + * setAddress("föö <foo@bar.com>, me@somewhere.com","TBcc"); + * + * @param string $address Multiple adresses separated by commas + * @return bool|string the prepared header (can contain multiple lines) + */ + public function cleanAddress($address) { + // No named recipients for To: in Windows (see FS#652) + $names = (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') ? false : true; + + $address = preg_replace('/[\r\n\0]+/', ' ', $address); // remove attack vectors + + $headers = ''; + $parts = explode(',', $address); + foreach($parts as $part) { + $part = trim($part); + + // parse address + if(preg_match('#(.*?)<(.*?)>#', $part, $matches)) { + $text = trim($matches[1]); + $addr = $matches[2]; + } else { + $addr = $part; + } + // skip empty ones + if(empty($addr)) { + continue; + } + + // FIXME: is there a way to encode the localpart of a emailaddress? + if(!utf8_isASCII($addr)) { + msg(htmlspecialchars("E-Mail address <$addr> is not ASCII"), -1); + continue; + } + + if(is_null($this->validator)) { + $this->validator = new EmailAddressValidator(); + $this->validator->allowLocalAddresses = true; + } + if(!$this->validator->check_email_address($addr)) { + msg(htmlspecialchars("E-Mail address <$addr> is not valid"), -1); + continue; + } + + // text was given + if(!empty($text) && $names) { + // add address quotes + $addr = "<$addr>"; + + if(defined('MAILHEADER_ASCIIONLY')) { + $text = utf8_deaccent($text); + $text = utf8_strip($text); + } + + if(!utf8_isASCII($text)) { + $text = '=?UTF-8?B?'.base64_encode($text).'?='; + } + } else { + $text = ''; + } + + // add to header comma seperated + if($headers != '') { + $headers .= ', '; + } + $headers .= $text.' '.$addr; + } + + if(empty($headers)) return false; + + return $headers; + } + + + /** + * Prepare the mime multiparts for all attachments + * + * Replaces placeholders in the HTML with the correct CIDs + */ + protected function prepareAttachments() { + $mime = ''; + $part = 1; + // embedded attachments + foreach($this->attach as $media) { + // create content id + $cid = 'part'.$part.'.'.$this->partid; + + // replace wildcards + if($media['embed']) { + $this->html = str_replace('%%'.$media['embed'].'%%', 'cid:'.$cid, $this->html); + } + + $mime .= '--'.$this->boundary.MAILHEADER_EOL; + $mime .= 'Content-Type: '.$media['mime'].';'.MAILHEADER_EOL; + $mime .= 'Content-Transfer-Encoding: base64'.MAILHEADER_EOL; + $mime .= "Content-ID: <$cid>".MAILHEADER_EOL; + if($media['embed']) { + $mime .= 'Content-Disposition: inline; filename="'.$media['name'].'"'.MAILHEADER_EOL; + } else { + $mime .= 'Content-Disposition: attachment; filename="'.$media['name'].'"'.MAILHEADER_EOL; + } + $mime .= MAILHEADER_EOL; //end of headers + $mime .= chunk_split(base64_encode($media['data']), 74, MAILHEADER_EOL); + + $part++; + } + return $mime; + } + + /** + * Build the body and handles multi part mails + * + * Needs to be called before prepareHeaders! + * + * @return string the prepared mail body, false on errors + */ + protected function prepareBody() { + + // no HTML mails allowed? remove HTML body + if(!$this->allowhtml) { + $this->html = ''; + } + + // check for body + if(!$this->text && !$this->html) { + return false; + } + + // add general headers + $this->headers['MIME-Version'] = '1.0'; + + $body = ''; + + if(!$this->html && !count($this->attach)) { // we can send a simple single part message + $this->headers['Content-Type'] = 'text/plain; charset=UTF-8'; + $this->headers['Content-Transfer-Encoding'] = 'base64'; + $body .= chunk_split(base64_encode($this->text), 74, MAILHEADER_EOL); + } else { // multi part it is + $body .= "This is a multi-part message in MIME format.".MAILHEADER_EOL; + + // prepare the attachments + $attachments = $this->prepareAttachments(); + + // do we have alternative text content? + if($this->text && $this->html) { + $this->headers['Content-Type'] = 'multipart/alternative;'.MAILHEADER_EOL. + ' boundary="'.$this->boundary.'XX"'; + $body .= '--'.$this->boundary.'XX'.MAILHEADER_EOL; + $body .= 'Content-Type: text/plain; charset=UTF-8'.MAILHEADER_EOL; + $body .= 'Content-Transfer-Encoding: base64'.MAILHEADER_EOL; + $body .= MAILHEADER_EOL; + $body .= chunk_split(base64_encode($this->text), 74, MAILHEADER_EOL); + $body .= '--'.$this->boundary.'XX'.MAILHEADER_EOL; + $body .= 'Content-Type: multipart/related;'.MAILHEADER_EOL. + ' boundary="'.$this->boundary.'"'.MAILHEADER_EOL; + $body .= MAILHEADER_EOL; + } + + $body .= '--'.$this->boundary.MAILHEADER_EOL; + $body .= 'Content-Type: text/html; charset=UTF-8'.MAILHEADER_EOL; + $body .= 'Content-Transfer-Encoding: base64'.MAILHEADER_EOL; + $body .= MAILHEADER_EOL; + $body .= chunk_split(base64_encode($this->html), 74, MAILHEADER_EOL); + $body .= MAILHEADER_EOL; + $body .= $attachments; + $body .= '--'.$this->boundary.'--'.MAILHEADER_EOL; + + // close open multipart/alternative boundary + if($this->text && $this->html) { + $body .= '--'.$this->boundary.'XX--'.MAILHEADER_EOL; + } + } + + return $body; + } + + /** + * Cleanup and encode the headers array + */ + protected function cleanHeaders() { + global $conf; + + // clean up addresses + if(empty($this->headers['From'])) $this->from($conf['mailfrom']); + $addrs = array('To', 'From', 'Cc', 'Bcc'); + foreach($addrs as $addr) { + if(isset($this->headers[$addr])) { + $this->headers[$addr] = $this->cleanAddress($this->headers[$addr]); + } + } + + if(isset($this->headers['Subject'])) { + // add prefix to subject + if(empty($conf['mailprefix'])) { + if(utf8_strlen($conf['title']) < 20) { + $prefix = '['.$conf['title'].']'; + } else { + $prefix = '['.utf8_substr($conf['title'], 0, 20).'...]'; + } + } else { + $prefix = '['.$conf['mailprefix'].']'; + } + $len = strlen($prefix); + if(substr($this->headers['Subject'], 0, $len) != $prefix) { + $this->headers['Subject'] = $prefix.' '.$this->headers['Subject']; + } + + // encode subject + if(defined('MAILHEADER_ASCIIONLY')) { + $this->headers['Subject'] = utf8_deaccent($this->headers['Subject']); + $this->headers['Subject'] = utf8_strip($this->headers['Subject']); + } + if(!utf8_isASCII($this->headers['Subject'])) { + $this->headers['Subject'] = '=?UTF-8?B?'.base64_encode($this->headers['Subject']).'?='; + } + } + + // wrap headers + foreach($this->headers as $key => $val) { + $this->headers[$key] = wordwrap($val, 78, MAILHEADER_EOL.' '); + } + } + + /** + * Create a string from the headers array + * + * @returns string the headers + */ + protected function prepareHeaders() { + $headers = ''; + foreach($this->headers as $key => $val) { + $headers .= "$key: $val".MAILHEADER_EOL; + } + return $headers; + } + + /** + * return a full email with all headers + * + * This is mainly intended for debugging and testing but could also be + * used for MHT exports + * + * @return string the mail, false on errors + */ + public function dump() { + $this->cleanHeaders(); + $body = $this->prepareBody(); + if($body === false) return false; + $headers = $this->prepareHeaders(); + + return $headers.MAILHEADER_EOL.$body; + } + + /** + * Send the mail + * + * Call this after all data was set + * + * @triggers MAIL_MESSAGE_SEND + * @return bool true if the mail was successfully passed to the MTA + */ + public function send() { + $success = false; + + // prepare hook data + $data = array( + // pass the whole mail class to plugin + 'mail' => $this, + // pass references for backward compatibility + 'to' => &$this->headers['To'], + 'cc' => &$this->headers['Cc'], + 'bcc' => &$this->headers['Bcc'], + 'from' => &$this->headers['From'], + 'subject' => &$this->headers['Subject'], + 'body' => &$this->text, + 'params' => &$this->sendparam, + 'headers' => '', // plugins shouldn't use this + // signal if we mailed successfully to AFTER event + 'success' => &$success, + ); + + // do our thing if BEFORE hook approves + $evt = new Doku_Event('MAIL_MESSAGE_SEND', $data); + if($evt->advise_before(true)) { + // clean up before using the headers + $this->cleanHeaders(); + + // any recipients? + if(trim($this->headers['To']) === '' && + trim($this->headers['Cc']) === '' && + trim($this->headers['Bcc']) === '' + ) return false; + + // The To: header is special + if(isset($this->headers['To'])) { + $to = $this->headers['To']; + unset($this->headers['To']); + } else { + $to = ''; + } + + // so is the subject + if(isset($this->headers['Subject'])) { + $subject = $this->headers['Subject']; + unset($this->headers['Subject']); + } else { + $subject = ''; + } + + // make the body + $body = $this->prepareBody(); + if($body === false) return false; + + // cook the headers + $headers = $this->prepareHeaders(); + // add any headers set by legacy plugins + if(trim($data['headers'])) { + $headers .= MAILHEADER_EOL.trim($data['headers']); + } + + // send the thing + if(is_null($this->sendparam)) { + $success = @mail($to, $subject, $body, $headers); + } else { + $success = @mail($to, $subject, $body, $headers, $this->sendparam); + } + } + // any AFTER actions? + $evt->advise_after(); + return $success; + } +} diff --git a/inc/PassHash.class.php b/inc/PassHash.class.php index 3fb1349d224494b2eb16c97e137d20476ca1d2a1..f857667232b3763d76595a45324d56e578acec11 100644 --- a/inc/PassHash.class.php +++ b/inc/PassHash.class.php @@ -16,65 +16,67 @@ class PassHash { * match true is is returned else false * * @author Andreas Gohr <andi@splitbrain.org> + * @param $clear string Clear-Text password + * @param $hash string Hash to compare against * @return bool */ - function verify_hash($clear,$hash){ - $method=''; - $salt=''; - $magic=''; + function verify_hash($clear, $hash) { + $method = ''; + $salt = ''; + $magic = ''; //determine the used method and salt $len = strlen($hash); - if(preg_match('/^\$1\$([^\$]{0,8})\$/',$hash,$m)){ + if(preg_match('/^\$1\$([^\$]{0,8})\$/', $hash, $m)) { $method = 'smd5'; $salt = $m[1]; $magic = '1'; - }elseif(preg_match('/^\$apr1\$([^\$]{0,8})\$/',$hash,$m)){ + } elseif(preg_match('/^\$apr1\$([^\$]{0,8})\$/', $hash, $m)) { $method = 'apr1'; $salt = $m[1]; $magic = 'apr1'; - }elseif(preg_match('/^\$P\$(.{31})$/',$hash,$m)){ + } elseif(preg_match('/^\$P\$(.{31})$/', $hash, $m)) { $method = 'pmd5'; $salt = $m[1]; $magic = 'P'; - }elseif(preg_match('/^\$H\$(.{31})$/',$hash,$m)){ + } elseif(preg_match('/^\$H\$(.{31})$/', $hash, $m)) { $method = 'pmd5'; $salt = $m[1]; $magic = 'H'; - }elseif(preg_match('/^sha1\$(.{5})\$/',$hash,$m)){ + } elseif(preg_match('/^sha1\$(.{5})\$/', $hash, $m)) { $method = 'djangosha1'; $salt = $m[1]; - }elseif(preg_match('/^md5\$(.{5})\$/',$hash,$m)){ + } elseif(preg_match('/^md5\$(.{5})\$/', $hash, $m)) { $method = 'djangomd5'; $salt = $m[1]; - }elseif(preg_match('/^\$2a\$(.{2})\$/',$hash,$m)){ + } elseif(preg_match('/^\$2a\$(.{2})\$/', $hash, $m)) { $method = 'bcrypt'; $salt = $hash; - }elseif(substr($hash,0,6) == '{SSHA}'){ + } elseif(substr($hash, 0, 6) == '{SSHA}') { $method = 'ssha'; - $salt = substr(base64_decode(substr($hash, 6)),20); - }elseif(substr($hash,0,6) == '{SMD5}'){ + $salt = substr(base64_decode(substr($hash, 6)), 20); + } elseif(substr($hash, 0, 6) == '{SMD5}') { $method = 'lsmd5'; - $salt = substr(base64_decode(substr($hash, 6)),16); - }elseif($len == 32){ + $salt = substr(base64_decode(substr($hash, 6)), 16); + } elseif($len == 32) { $method = 'md5'; - }elseif($len == 40){ + } elseif($len == 40) { $method = 'sha1'; - }elseif($len == 16){ + } elseif($len == 16) { $method = 'mysql'; - }elseif($len == 41 && $hash[0] == '*'){ + } elseif($len == 41 && $hash[0] == '*') { $method = 'my411'; - }elseif($len == 34){ + } elseif($len == 34) { $method = 'kmd5'; $salt = $hash; - }else{ + } else { $method = 'crypt'; - $salt = substr($hash,0,2); + $salt = substr($hash, 0, 2); } //crypt and compare $call = 'hash_'.$method; - if($this->$call($clear,$salt,$magic) === $hash){ + if($this->$call($clear, $salt, $magic) === $hash) { return true; } return false; @@ -83,13 +85,14 @@ class PassHash { /** * Create a random salt * - * @param int $len - The length of the salt + * @param int $len The length of the salt + * @return string */ - public function gen_salt($len=32){ + public function gen_salt($len = 32) { $salt = ''; $chars = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'; - for($i=0; $i<$len; $i++){ - $salt .= $chars[mt_rand(0,61)]; + for($i = 0; $i < $len; $i++) { + $salt .= $chars[mt_rand(0, 61)]; } return $salt; } @@ -100,12 +103,12 @@ class PassHash { * If $salt is not null, the value is kept, but the lenght restriction is * applied. * - * @param stringref $salt - The salt, pass null if you want one generated - * @param int $len - The length of the salt + * @param string &$salt The salt, pass null if you want one generated + * @param int $len The length of the salt */ - public function init_salt(&$salt,$len=32){ + public function init_salt(&$salt, $len = 32) { if(is_null($salt)) $salt = $this->gen_salt($len); - if(strlen($salt) > $len) $salt = substr($salt,0,$len); + if(strlen($salt) > $len) $salt = substr($salt, 0, $len); } // Password hashing methods follow below @@ -122,36 +125,37 @@ class PassHash { * @author Andreas Gohr <andi@splitbrain.org> * @author <mikey_nich at hotmail dot com> * @link http://de.php.net/manual/en/function.crypt.php#73619 - * @param string $clear - the clear text to hash - * @param string $salt - the salt to use, null for random - * @param string $magic - the hash identifier (apr1 or 1) - * @returns string - hashed password + * @param string $clear The clear text to hash + * @param string $salt The salt to use, null for random + * @return string Hashed password */ - public function hash_smd5($clear, $salt=null){ - $this->init_salt($salt,8); + public function hash_smd5($clear, $salt = null) { + $this->init_salt($salt, 8); - if(defined('CRYPT_MD5') && CRYPT_MD5){ - return crypt($clear,'$1$'.$salt.'$'); - }else{ + if(defined('CRYPT_MD5') && CRYPT_MD5) { + return crypt($clear, '$1$'.$salt.'$'); + } else { // Fall back to PHP-only implementation return $this->hash_apr1($clear, $salt, '1'); } } - /** * Password hashing method 'lsmd5' * * Uses salted MD5 hashs. Salt is 8 bytes long. * * This is the format used by LDAP. + * + * @param string $clear The clear text to hash + * @param string $salt The salt to use, null for random + * @return string Hashed password */ - public function hash_lsmd5($clear, $salt=null){ - $this->init_salt($salt,8); + public function hash_lsmd5($clear, $salt = null) { + $this->init_salt($salt, 8); return "{SMD5}".base64_encode(md5($clear.$salt, true).$salt); } - /** * Password hashing method 'apr1' * @@ -161,17 +165,17 @@ class PassHash { * * @author <mikey_nich at hotmail dot com> * @link http://de.php.net/manual/en/function.crypt.php#73619 - * @param string $clear - the clear text to hash - * @param string $salt - the salt to use, null for random - * @param string $magic - the hash identifier (apr1 or 1) - * @returns string - hashed password + * @param string $clear The clear text to hash + * @param string $salt The salt to use, null for random + * @param string $magic The hash identifier (apr1 or 1) + * @return string Hashed password */ - public function hash_apr1($clear, $salt=null, $magic='apr1'){ - $this->init_salt($salt,8); + public function hash_apr1($clear, $salt = null, $magic = 'apr1') { + $this->init_salt($salt, 8); - $len = strlen($clear); + $len = strlen($clear); $text = $clear.'$'.$magic.'$'.$salt; - $bin = pack("H32", md5($clear.$salt.$clear)); + $bin = pack("H32", md5($clear.$salt.$clear)); for($i = $len; $i > 0; $i -= 16) { $text .= substr($bin, 0, min(16, $i)); } @@ -181,22 +185,24 @@ class PassHash { $bin = pack("H32", md5($text)); for($i = 0; $i < 1000; $i++) { $new = ($i & 1) ? $clear : $bin; - if ($i % 3) $new .= $salt; - if ($i % 7) $new .= $clear; + if($i % 3) $new .= $salt; + if($i % 7) $new .= $clear; $new .= ($i & 1) ? $bin : $clear; $bin = pack("H32", md5($new)); } $tmp = ''; - for ($i = 0; $i < 5; $i++) { + for($i = 0; $i < 5; $i++) { $k = $i + 6; $j = $i + 12; - if ($j == 16) $j = 5; + if($j == 16) $j = 5; $tmp = $bin[$i].$bin[$k].$bin[$j].$tmp; } $tmp = chr(0).chr(0).$bin[11].$tmp; - $tmp = strtr(strrev(substr(base64_encode($tmp), 2)), - "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", - "./0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"); + $tmp = strtr( + strrev(substr(base64_encode($tmp), 2)), + "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", + "./0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz" + ); return '$'.$magic.'$'.$salt.'$'.$tmp; } @@ -205,10 +211,10 @@ class PassHash { * * Uses MD5 hashs. * - * @param string $clear - the clear text to hash - * @returns string - hashed password + * @param string $clear The clear text to hash + * @return string Hashed password */ - public function hash_md5($clear){ + public function hash_md5($clear) { return md5($clear); } @@ -217,10 +223,10 @@ class PassHash { * * Uses SHA1 hashs. * - * @param string $clear - the clear text to hash - * @returns string - hashed password + * @param string $clear The clear text to hash + * @return string Hashed password */ - public function hash_sha1($clear){ + public function hash_sha1($clear) { return sha1($clear); } @@ -229,12 +235,12 @@ class PassHash { * * Uses salted SHA1 hashs. Salt is 4 bytes long. * - * @param string $clear - the clear text to hash - * @param string $salt - the salt to use, null for random - * @returns string - hashed password + * @param string $clear The clear text to hash + * @param string $salt The salt to use, null for random + * @return string Hashed password */ - public function hash_ssha($clear, $salt=null){ - $this->init_salt($salt,4); + public function hash_ssha($clear, $salt = null) { + $this->init_salt($salt, 4); return '{SSHA}'.base64_encode(pack("H*", sha1($clear.$salt)).$salt); } @@ -243,13 +249,13 @@ class PassHash { * * Uses salted crypt hashs. Salt is 2 bytes long. * - * @param string $clear - the clear text to hash - * @param string $salt - the salt to use, null for random - * @returns string - hashed password + * @param string $clear The clear text to hash + * @param string $salt The salt to use, null for random + * @return string Hashed password */ - public function hash_crypt($clear, $salt=null){ - $this->init_salt($salt,2); - return crypt($clear,$salt); + public function hash_crypt($clear, $salt = null) { + $this->init_salt($salt, 2); + return crypt($clear, $salt); } /** @@ -259,16 +265,16 @@ class PassHash { * * @link http://www.php.net/mysql * @author <soren at byu dot edu> - * @param string $clear - the clear text to hash - * @returns string - hashed password + * @param string $clear The clear text to hash + * @return string Hashed password */ - public function hash_mysql($clear){ - $nr=0x50305735; - $nr2=0x12345671; - $add=7; + public function hash_mysql($clear) { + $nr = 0x50305735; + $nr2 = 0x12345671; + $add = 7; $charArr = preg_split("//", $clear); - foreach ($charArr as $char) { - if (($char == '') || ($char == ' ') || ($char == '\t')) continue; + foreach($charArr as $char) { + if(($char == '') || ($char == ' ') || ($char == '\t')) continue; $charVal = ord($char); $nr ^= ((($nr & 63) + $add) * $charVal) + ($nr << 8); $nr2 += ($nr2 << 8) ^ $nr; @@ -282,10 +288,10 @@ class PassHash { * * Uses SHA1 hashs. This method is used by MySQL 4.11 and above * - * @param string $clear - the clear text to hash - * @returns string - hashed password + * @param string $clear The clear text to hash + * @return string Hashed password */ - public function hash_my411($clear){ + public function hash_my411($clear) { return '*'.sha1(pack("H*", sha1($clear))); } @@ -297,16 +303,16 @@ class PassHash { * Salt is 2 bytes long, but stored at position 16, so you need to pass at * least 18 bytes. You can pass the crypted hash as salt. * - * @param string $clear - the clear text to hash - * @param string $salt - the salt to use, null for random - * @returns string - hashed password + * @param string $clear The clear text to hash + * @param string $salt The salt to use, null for random + * @return string Hashed password */ - public function hash_kmd5($clear, $salt=null){ + public function hash_kmd5($clear, $salt = null) { $this->init_salt($salt); - $key = substr($salt, 16, 2); - $hash1 = strtolower(md5($key . md5($clear))); - $hash2 = substr($hash1, 0, 16) . $key . substr($hash1, 16); + $key = substr($salt, 16, 2); + $hash1 = strtolower(md5($key.md5($clear))); + $hash2 = substr($hash1, 0, 16).$key.substr($hash1, 16); return $hash2; } @@ -316,48 +322,60 @@ class PassHash { * Uses salted MD5 hashs. Salt is 1+8 bytes long, 1st byte is the * iteration count when given, for null salts $compute is used. * - * @param string $clear - the clear text to hash - * @param string $salt - the salt to use, null for random - * @param string $magic - the hash identifier (P or H) - * @param int $compute - the iteration count for new passwords - * @returns string - hashed password + * The actual iteration count is the given count squared, maximum is + * 30 (-> 1073741824). If a higher one is given, the function throws + * an exception. + * + * @link http://www.openwall.com/phpass/ + * @param string $clear The clear text to hash + * @param string $salt The salt to use, null for random + * @param string $magic The hash identifier (P or H) + * @param int $compute The iteration count for new passwords + * @throws Exception + * @return string Hashed password */ - public function hash_pmd5($clear, $salt=null, $magic='P',$compute=8){ + public function hash_pmd5($clear, $salt = null, $magic = 'P', $compute = 8) { $itoa64 = './0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz'; - if(is_null($salt)){ + if(is_null($salt)) { $this->init_salt($salt); $salt = $itoa64[$compute].$salt; // prefix iteration count } $iterc = $salt[0]; // pos 0 of salt is iteration count - $iter = strpos($itoa64,$iterc); + $iter = strpos($itoa64, $iterc); + + if($iter > 30) { + throw new Exception("Too high iteration count ($iter) in ". + __CLASS__.'::'.__FUNCTION__); + } + $iter = 1 << $iter; - $salt = substr($salt,1,8); + $salt = substr($salt, 1, 8); // iterate - $hash = md5($salt . $clear, true); + $hash = md5($salt.$clear, true); do { - $hash = md5($hash . $clear, true); - } while (--$iter); + $hash = md5($hash.$clear, true); + } while(--$iter); // encode $output = ''; - $count = 16; - $i = 0; + $count = 16; + $i = 0; do { $value = ord($hash[$i++]); $output .= $itoa64[$value & 0x3f]; - if ($i < $count) + if($i < $count) $value |= ord($hash[$i]) << 8; $output .= $itoa64[($value >> 6) & 0x3f]; - if ($i++ >= $count) + if($i++ >= $count) break; - if ($i < $count) + if($i < $count) $value |= ord($hash[$i]) << 16; $output .= $itoa64[($value >> 12) & 0x3f]; - if ($i++ >= $count) + if($i++ >= $count) break; $output .= $itoa64[($value >> 18) & 0x3f]; - } while ($i < $count); + } while($i < $count); return '$'.$magic.'$'.$iterc.$salt.$output; } @@ -365,7 +383,7 @@ class PassHash { /** * Alias for hash_pmd5 */ - public function hash_hmd5($clear, $salt=null, $magic='H', $compute=8){ + public function hash_hmd5($clear, $salt = null, $magic = 'H', $compute = 8) { return $this->hash_pmd5($clear, $salt, $magic, $compute); } @@ -376,12 +394,12 @@ class PassHash { * This is used by the Django Python framework * * @link http://docs.djangoproject.com/en/dev/topics/auth/#passwords - * @param string $clear - the clear text to hash - * @param string $salt - the salt to use, null for random - * @returns string - hashed password + * @param string $clear The clear text to hash + * @param string $salt The salt to use, null for random + * @return string Hashed password */ - public function hash_djangosha1($clear, $salt=null){ - $this->init_salt($salt,5); + public function hash_djangosha1($clear, $salt = null) { + $this->init_salt($salt, 5); return 'sha1$'.$salt.'$'.sha1($salt.$clear); } @@ -392,16 +410,15 @@ class PassHash { * This is used by the Django Python framework * * @link http://docs.djangoproject.com/en/dev/topics/auth/#passwords - * @param string $clear - the clear text to hash - * @param string $salt - the salt to use, null for random - * @returns string - hashed password + * @param string $clear The clear text to hash + * @param string $salt The salt to use, null for random + * @return string Hashed password */ - public function hash_djangomd5($clear, $salt=null){ - $this->init_salt($salt,5); + public function hash_djangomd5($clear, $salt = null) { + $this->init_salt($salt, 5); return 'md5$'.$salt.'$'.md5($salt.$clear); } - /** * Passwordhashing method 'bcrypt' * @@ -413,20 +430,21 @@ class PassHash { * will break. When no salt is given, the iteration count can be set * through the $compute variable. * - * @param string $clear - the clear text to hash - * @param string $salt - the salt to use, null for random - * @param int $compute - the iteration count (between 4 and 31) - * @returns string - hashed password + * @param string $clear The clear text to hash + * @param string $salt The salt to use, null for random + * @param int $compute The iteration count (between 4 and 31) + * @throws Exception + * @return string Hashed password */ - public function hash_bcrypt($clear, $salt=null, $compute=8){ - if(!defined('CRYPT_BLOWFISH') || CRYPT_BLOWFISH != 1){ + public function hash_bcrypt($clear, $salt = null, $compute = 8) { + if(!defined('CRYPT_BLOWFISH') || CRYPT_BLOWFISH != 1) { throw new Exception('This PHP installation has no bcrypt support'); } - if(is_null($salt)){ + if(is_null($salt)) { if($compute < 4 || $compute > 31) $compute = 8; $salt = '$2a$'.str_pad($compute, 2, '0', STR_PAD_LEFT).'$'. - $this->gen_salt(22); + $this->gen_salt(22); } return crypt($clear, $salt); diff --git a/inc/RemoteAPICore.php b/inc/RemoteAPICore.php index 5468321008be99f7a156cd87d6778013307153fa..36c5188815caf0d9430637aab438261a37458e7b 100644 --- a/inc/RemoteAPICore.php +++ b/inc/RemoteAPICore.php @@ -169,7 +169,7 @@ class RemoteAPICore { * @return page text. */ function rawPage($id,$rev=''){ - $id = cleanID($id); + $id = $this->resolvePageId($id); if(auth_quickaclcheck($id) < AUTH_READ){ throw new RemoteAccessDeniedException('You are not allowed to read this file', 111); } @@ -228,7 +228,7 @@ class RemoteAPICore { * Return a wiki page rendered to html */ function htmlPage($id,$rev=''){ - $id = cleanID($id); + $id = $this->resolvePageId($id); if(auth_quickaclcheck($id) < AUTH_READ){ throw new RemoteAccessDeniedException('You are not allowed to read this page', 111); } @@ -302,6 +302,7 @@ class RemoteAPICore { 'mtime' => filemtime($file), 'size' => filesize($file), 'snippet' => $snippet, + 'title' => useHeading('navigation') ? p_get_first_heading($id) : $id ); } return $pages; @@ -355,14 +356,14 @@ class RemoteAPICore { * Return a list of backlinks */ function listBackLinks($id){ - return ft_backlinks(cleanID($id)); + return ft_backlinks($this->resolvePageId($id)); } /** * Return some basic data about a page */ function pageInfo($id,$rev=''){ - $id = cleanID($id); + $id = $this->resolvePageId($id); if(auth_quickaclcheck($id) < AUTH_READ){ throw new RemoteAccessDeniedException('You are not allowed to read this page', 111); } @@ -393,7 +394,7 @@ class RemoteAPICore { global $TEXT; global $lang; - $id = cleanID($id); + $id = $this->resolvePageId($id); $TEXT = cleanText($text); $sum = $params['sum']; $minor = $params['minor']; @@ -506,7 +507,7 @@ class RemoteAPICore { * Returns the permissions of a given wiki page */ function aclCheck($id) { - $id = cleanID($id); + $id = $this->resolvePageId($id); return auth_quickaclcheck($id); } @@ -516,7 +517,7 @@ class RemoteAPICore { * @author Michael Klier <chi@chimeric.de> */ function listLinks($id) { - $id = cleanID($id); + $id = $this->resolvePageId($id); if(auth_quickaclcheck($id) < AUTH_READ){ throw new RemoteAccessDeniedException('You are not allowed to read this page', 111); } @@ -632,7 +633,7 @@ class RemoteAPICore { * @author Michael Klier <chi@chimeric.de> */ function pageVersions($id, $first) { - $id = cleanID($id); + $id = $this->resolvePageId($id); if(auth_quickaclcheck($id) < AUTH_READ) { throw new RemoteAccessDeniedException('You are not allowed to read this page', 111); } @@ -710,7 +711,7 @@ class RemoteAPICore { $unlockfail = array(); foreach((array) $set['lock'] as $id){ - $id = cleanID($id); + $id = $this->resolvePageId($id); if(auth_quickaclcheck($id) < AUTH_EDIT || checklock($id)){ $lockfail[] = $id; }else{ @@ -720,7 +721,7 @@ class RemoteAPICore { } foreach((array) $set['unlock'] as $id){ - $id = cleanID($id); + $id = $this->resolvePageId($id); if(auth_quickaclcheck($id) < AUTH_EDIT || !unlock($id)){ $unlockfail[] = $id; }else{ @@ -763,6 +764,14 @@ class RemoteAPICore { return $ok; } + private function resolvePageId($id) { + $id = cleanID($id); + if(empty($id)) { + global $conf; + $id = cleanID($conf['start']); + } + return $id; + } } diff --git a/inc/actions.php b/inc/actions.php index 4a2e200ae5c1822a62b5199ade7f10721017f51b..e85cbfcccb43c59c9adcf8511486dca3ad5822a4 100644 --- a/inc/actions.php +++ b/inc/actions.php @@ -380,7 +380,7 @@ function act_revert($act){ if($REV){ $text = rawWiki($ID,$REV); if(!$text) return 'show'; //something went wrong - $sum = $lang['restored']; + $sum = sprintf($lang['restored'], dformat($REV)); } // spam check @@ -498,7 +498,7 @@ function act_edit($act){ //set summary default if(!$SUM){ if($REV){ - $SUM = $lang['restored']; + $SUM = sprintf($lang['restored'], dformat($REV)); }elseif(!$INFO['exists']){ $SUM = $lang['created']; } @@ -506,7 +506,7 @@ function act_edit($act){ // Use the date of the newest revision, not of the revision we edit // This is used for conflict detection - if(!$DATE) $DATE = $INFO['meta']['date']['modified']; + if(!$DATE) $DATE = @filemtime(wikiFN($ID)); //check if locked by anyone - if not lock for my self //do not lock when the user can't edit anyway diff --git a/inc/auth.php b/inc/auth.php index 59ef1cb54decae1e7437d7de13ee921f3318a057..d0f21c825e348880febb27008d899a615285036a 100644 --- a/inc/auth.php +++ b/inc/auth.php @@ -12,13 +12,13 @@ if(!defined('DOKU_INC')) die('meh.'); // some ACL level defines -define('AUTH_NONE',0); -define('AUTH_READ',1); -define('AUTH_EDIT',2); -define('AUTH_CREATE',4); -define('AUTH_UPLOAD',8); -define('AUTH_DELETE',16); -define('AUTH_ADMIN',255); +define('AUTH_NONE', 0); +define('AUTH_READ', 1); +define('AUTH_EDIT', 2); +define('AUTH_CREATE', 4); +define('AUTH_UPLOAD', 8); +define('AUTH_DELETE', 16); +define('AUTH_ADMIN', 255); /** * Initialize the auth system. @@ -29,26 +29,30 @@ define('AUTH_ADMIN',255); * * @todo backend loading maybe should be handled by the class autoloader * @todo maybe split into multiple functions at the XXX marked positions + * @triggers AUTH_LOGIN_CHECK + * @return bool */ -function auth_setup(){ +function auth_setup() { global $conf; + /* @var auth_basic $auth */ global $auth; + /* @var Input $INPUT */ + global $INPUT; global $AUTH_ACL; global $lang; - global $config_cascade; $AUTH_ACL = array(); if(!$conf['useacl']) return false; // load the the backend auth functions and instantiate the auth object XXX - if (@file_exists(DOKU_INC.'inc/auth/'.$conf['authtype'].'.class.php')) { + if(@file_exists(DOKU_INC.'inc/auth/'.$conf['authtype'].'.class.php')) { require_once(DOKU_INC.'inc/auth/basic.class.php'); require_once(DOKU_INC.'inc/auth/'.$conf['authtype'].'.class.php'); $auth_class = "auth_".$conf['authtype']; - if (class_exists($auth_class)) { + if(class_exists($auth_class)) { $auth = new $auth_class(); - if ($auth->success == false) { + if($auth->success == false) { // degrade to unauthenticated user unset($auth); auth_logoff(); @@ -61,14 +65,11 @@ function auth_setup(){ nice_die($lang['authmodfailed']); } - if(!$auth) return; + if(!$auth) return false; // do the login either by cookie or provided credentials XXX - if (!isset($_REQUEST['u'])) $_REQUEST['u'] = ''; - if (!isset($_REQUEST['p'])) $_REQUEST['p'] = ''; - if (!isset($_REQUEST['r'])) $_REQUEST['r'] = ''; - $_REQUEST['http_credentials'] = false; - if (!$conf['rememberme']) $_REQUEST['r'] = false; + $INPUT->set('http_credentials', false); + if(!$conf['rememberme']) $INPUT->set('r', false); // handle renamed HTTP_AUTHORIZATION variable (can happen when a fix like // the one presented at @@ -77,48 +78,50 @@ function auth_setup(){ if(isset($_SERVER['REDIRECT_HTTP_AUTHORIZATION'])) $_SERVER['HTTP_AUTHORIZATION'] = $_SERVER['REDIRECT_HTTP_AUTHORIZATION']; // streamline HTTP auth credentials (IIS/rewrite -> mod_php) - if(isset($_SERVER['HTTP_AUTHORIZATION'])){ - list($_SERVER['PHP_AUTH_USER'],$_SERVER['PHP_AUTH_PW']) = + if(isset($_SERVER['HTTP_AUTHORIZATION'])) { + list($_SERVER['PHP_AUTH_USER'], $_SERVER['PHP_AUTH_PW']) = explode(':', base64_decode(substr($_SERVER['HTTP_AUTHORIZATION'], 6))); } // if no credentials were given try to use HTTP auth (for SSO) - if(empty($_REQUEST['u']) && empty($_COOKIE[DOKU_COOKIE]) && !empty($_SERVER['PHP_AUTH_USER'])){ - $_REQUEST['u'] = $_SERVER['PHP_AUTH_USER']; - $_REQUEST['p'] = $_SERVER['PHP_AUTH_PW']; - $_REQUEST['http_credentials'] = true; + if(!$INPUT->str('u') && empty($_COOKIE[DOKU_COOKIE]) && !empty($_SERVER['PHP_AUTH_USER'])) { + $INPUT->set('u', $_SERVER['PHP_AUTH_USER']); + $INPUT->set('p', $_SERVER['PHP_AUTH_PW']); + $INPUT->set('http_credentials', true); } // apply cleaning - $_REQUEST['u'] = $auth->cleanUser($_REQUEST['u']); + $INPUT->set('u', $auth->cleanUser($INPUT->str('u'))); - if(isset($_REQUEST['authtok'])){ + if($INPUT->str('authtok')) { // when an authentication token is given, trust the session - auth_validateToken($_REQUEST['authtok']); - }elseif(!is_null($auth) && $auth->canDo('external')){ + auth_validateToken($INPUT->str('authtok')); + } elseif(!is_null($auth) && $auth->canDo('external')) { // external trust mechanism in place - $auth->trustExternal($_REQUEST['u'],$_REQUEST['p'],$_REQUEST['r']); - }else{ + $auth->trustExternal($INPUT->str('u'), $INPUT->str('p'), $INPUT->bool('r')); + } else { $evdata = array( - 'user' => $_REQUEST['u'], - 'password' => $_REQUEST['p'], - 'sticky' => $_REQUEST['r'], - 'silent' => $_REQUEST['http_credentials'], - ); + 'user' => $INPUT->str('u'), + 'password' => $INPUT->str('p'), + 'sticky' => $INPUT->bool('r'), + 'silent' => $INPUT->bool('http_credentials') + ); trigger_event('AUTH_LOGIN_CHECK', $evdata, 'auth_login_wrapper'); } //load ACL into a global array XXX $AUTH_ACL = auth_loadACL(); + + return true; } /** * Loads the ACL setup and handle user wildcards * * @author Andreas Gohr <andi@splitbrain.org> - * @returns array + * @return array */ -function auth_loadACL(){ +function auth_loadACL() { global $config_cascade; if(!is_readable($config_cascade['acl']['default'])) return array(); @@ -126,24 +129,32 @@ function auth_loadACL(){ $acl = file($config_cascade['acl']['default']); //support user wildcard - if(isset($_SERVER['REMOTE_USER'])){ + if(isset($_SERVER['REMOTE_USER'])) { $len = count($acl); - for($i=0; $i<$len; $i++){ + for($i = 0; $i < $len; $i++) { if($acl[$i]{0} == '#') continue; - list($id,$rest) = preg_split('/\s+/',$acl[$i],2); - $id = str_replace('%USER%',cleanID($_SERVER['REMOTE_USER']),$id); - $rest = str_replace('%USER%',auth_nameencode($_SERVER['REMOTE_USER']),$rest); + list($id, $rest) = preg_split('/\s+/', $acl[$i], 2); + $id = str_replace('%USER%', cleanID($_SERVER['REMOTE_USER']), $id); + $rest = str_replace('%USER%', auth_nameencode($_SERVER['REMOTE_USER']), $rest); $acl[$i] = "$id\t$rest"; } } return $acl; } +/** + * Event hook callback for AUTH_LOGIN_CHECK + * + * @param $evdata + * @return bool + */ function auth_login_wrapper($evdata) { - return auth_login($evdata['user'], - $evdata['password'], - $evdata['sticky'], - $evdata['silent']); + return auth_login( + $evdata['user'], + $evdata['password'], + $evdata['sticky'], + $evdata['silent'] + ); } /** @@ -175,53 +186,56 @@ function auth_login_wrapper($evdata) { * @param bool $silent Don't show error on bad auth * @return bool true on successful auth */ -function auth_login($user,$pass,$sticky=false,$silent=false){ +function auth_login($user, $pass, $sticky = false, $silent = false) { global $USERINFO; global $conf; global $lang; + /* @var auth_basic $auth */ global $auth; + $sticky ? $sticky = true : $sticky = false; //sanity check - if (!$auth) return false; + if(!$auth) return false; - if(!empty($user)){ + if(!empty($user)) { //usual login - if ($auth->checkPass($user,$pass)){ + if($auth->checkPass($user, $pass)) { // make logininfo globally available $_SERVER['REMOTE_USER'] = $user; - $secret = auth_cookiesalt(!$sticky); //bind non-sticky to session - auth_setCookie($user,PMA_blowfish_encrypt($pass,$secret),$sticky); + $secret = auth_cookiesalt(!$sticky); //bind non-sticky to session + auth_setCookie($user, PMA_blowfish_encrypt($pass, $secret), $sticky); return true; - }else{ + } else { //invalid credentials - log off - if(!$silent) msg($lang['badlogin'],-1); + if(!$silent) msg($lang['badlogin'], -1); auth_logoff(); return false; } - }else{ + } else { // read cookie information - list($user,$sticky,$pass) = auth_getCookie(); - if($user && $pass){ + list($user, $sticky, $pass) = auth_getCookie(); + if($user && $pass) { // we got a cookie - see if we can trust it // get session info $session = $_SESSION[DOKU_COOKIE]['auth']; if(isset($session) && - $auth->useSessionCache($user) && - ($session['time'] >= time()-$conf['auth_security_timeout']) && - ($session['user'] == $user) && - ($session['pass'] == sha1($pass)) && //still crypted - ($session['buid'] == auth_browseruid()) ){ + $auth->useSessionCache($user) && + ($session['time'] >= time() - $conf['auth_security_timeout']) && + ($session['user'] == $user) && + ($session['pass'] == sha1($pass)) && //still crypted + ($session['buid'] == auth_browseruid()) + ) { // he has session, cookie and browser right - let him in $_SERVER['REMOTE_USER'] = $user; - $USERINFO = $session['info']; //FIXME move all references to session + $USERINFO = $session['info']; //FIXME move all references to session return true; } // no we don't trust it yet - recheck pass but silent $secret = auth_cookiesalt(!$sticky); //bind non-sticky to session - $pass = PMA_blowfish_decrypt($pass,$secret); - return auth_login($user,$pass,$sticky,true); + $pass = PMA_blowfish_decrypt($pass, $secret); + return auth_login($user, $pass, $sticky, true); } } //just to be sure @@ -239,8 +253,8 @@ function auth_login($user,$pass,$sticky=false,$silent=false){ * @param string $token The authentication token * @return boolean true (or will exit on failure) */ -function auth_validateToken($token){ - if(!$token || $token != $_SESSION[DOKU_COOKIE]['auth']['token']){ +function auth_validateToken($token) { + if(!$token || $token != $_SESSION[DOKU_COOKIE]['auth']['token']) { // bad token header("HTTP/1.0 401 Unauthorized"); print 'Invalid auth token - maybe the session timed out'; @@ -250,7 +264,7 @@ function auth_validateToken($token){ // still here? trust the session data global $USERINFO; $_SERVER['REMOTE_USER'] = $_SESSION[DOKU_COOKIE]['auth']['user']; - $USERINFO = $_SESSION[DOKU_COOKIE]['auth']['info']; + $USERINFO = $_SESSION[DOKU_COOKIE]['auth']['info']; return true; } @@ -262,7 +276,7 @@ function auth_validateToken($token){ * @author Andreas Gohr <andi@splitbrain.org> * @return string The auth token */ -function auth_createToken(){ +function auth_createToken() { $token = md5(mt_rand()); @session_start(); // reopen the session if needed $_SESSION[DOKU_COOKIE]['auth']['token'] = $token; @@ -281,14 +295,14 @@ function auth_createToken(){ * * @return string a MD5 sum of various browser headers */ -function auth_browseruid(){ - $ip = clientIP(true); - $uid = ''; +function auth_browseruid() { + $ip = clientIP(true); + $uid = ''; $uid .= $_SERVER['HTTP_USER_AGENT']; $uid .= $_SERVER['HTTP_ACCEPT_ENCODING']; $uid .= $_SERVER['HTTP_ACCEPT_LANGUAGE']; $uid .= $_SERVER['HTTP_ACCEPT_CHARSET']; - $uid .= substr($ip,0,strpos($ip,'.')); + $uid .= substr($ip, 0, strpos($ip, '.')); return md5($uid); } @@ -304,15 +318,15 @@ function auth_browseruid(){ * @param bool $addsession if true, the sessionid is added to the salt * @return string */ -function auth_cookiesalt($addsession=false){ +function auth_cookiesalt($addsession = false) { global $conf; $file = $conf['metadir'].'/_htcookiesalt'; $salt = io_readFile($file); - if(empty($salt)){ - $salt = uniqid(rand(),true); - io_saveFile($file,$salt); + if(empty($salt)) { + $salt = uniqid(rand(), true); + io_saveFile($file, $salt); } - if($addsession){ + if($addsession) { $salt .= session_id(); } return $salt; @@ -327,10 +341,10 @@ function auth_cookiesalt($addsession=false){ * @author Andreas Gohr <andi@splitbrain.org> * @param bool $keepbc - when true, the breadcrumb data is not cleared */ -function auth_logoff($keepbc=false){ +function auth_logoff($keepbc = false) { global $conf; global $USERINFO; - global $INFO, $ID; + /* @var auth_basic $auth */ global $auth; // make sure the session is writable (it usually is) @@ -346,13 +360,13 @@ function auth_logoff($keepbc=false){ unset($_SESSION[DOKU_COOKIE]['bc']); if(isset($_SERVER['REMOTE_USER'])) unset($_SERVER['REMOTE_USER']); - $USERINFO=null; //FIXME + $USERINFO = null; //FIXME $cookieDir = empty($conf['cookiedir']) ? DOKU_REL : $conf['cookiedir']; - if (version_compare(PHP_VERSION, '5.2.0', '>')) { - setcookie(DOKU_COOKIE,'',time()-600000,$cookieDir,'',($conf['securecookie'] && is_ssl()),true); - }else{ - setcookie(DOKU_COOKIE,'',time()-600000,$cookieDir,'',($conf['securecookie'] && is_ssl())); + if(version_compare(PHP_VERSION, '5.2.0', '>')) { + setcookie(DOKU_COOKIE, '', time() - 600000, $cookieDir, '', ($conf['securecookie'] && is_ssl()), true); + } else { + setcookie(DOKU_COOKIE, '', time() - 600000, $cookieDir, '', ($conf['securecookie'] && is_ssl())); } if($auth) $auth->logOff(); @@ -368,32 +382,34 @@ function auth_logoff($keepbc=false){ * * @author Andreas Gohr <andi@splitbrain.org> * @see auth_isadmin - * @param string user - Username - * @param array groups - List of groups the user is in - * @param bool adminonly - when true checks if user is admin + * @param string $user Username + * @param array $groups List of groups the user is in + * @param bool $adminonly when true checks if user is admin + * @return bool */ -function auth_ismanager($user=null,$groups=null,$adminonly=false){ +function auth_ismanager($user = null, $groups = null, $adminonly = false) { global $conf; global $USERINFO; + /* @var auth_basic $auth */ global $auth; - if (!$auth) return false; + if(!$auth) return false; if(is_null($user)) { - if (!isset($_SERVER['REMOTE_USER'])) { + if(!isset($_SERVER['REMOTE_USER'])) { return false; } else { $user = $_SERVER['REMOTE_USER']; } } - if(is_null($groups)){ + if(is_null($groups)) { $groups = (array) $USERINFO['grps']; } // check superuser match - if(auth_isMember($conf['superuser'],$user, $groups)) return true; + if(auth_isMember($conf['superuser'], $user, $groups)) return true; if($adminonly) return false; // check managers - if(auth_isMember($conf['manager'],$user, $groups)) return true; + if(auth_isMember($conf['manager'], $user, $groups)) return true; return false; } @@ -406,13 +422,15 @@ function auth_ismanager($user=null,$groups=null,$adminonly=false){ * The info is available through $INFO['isadmin'], too * * @author Andreas Gohr <andi@splitbrain.org> - * @see auth_ismanager + * @see auth_ismanager() + * @param string $user Username + * @param array $groups List of groups the user is in + * @return bool */ -function auth_isadmin($user=null,$groups=null){ - return auth_ismanager($user,$groups,true); +function auth_isadmin($user = null, $groups = null) { + return auth_ismanager($user, $groups, true); } - /** * Match a user and his groups against a comma separated list of * users and groups to determine membership status @@ -424,31 +442,32 @@ function auth_isadmin($user=null,$groups=null){ * @param $groups array groups the user is member of * @return bool true for membership acknowledged */ -function auth_isMember($memberlist,$user,array $groups){ +function auth_isMember($memberlist, $user, array $groups) { + /* @var auth_basic $auth */ global $auth; - if (!$auth) return false; + if(!$auth) return false; // clean user and groups - if(!$auth->isCaseSensitive()){ - $user = utf8_strtolower($user); - $groups = array_map('utf8_strtolower',$groups); + if(!$auth->isCaseSensitive()) { + $user = utf8_strtolower($user); + $groups = array_map('utf8_strtolower', $groups); } - $user = $auth->cleanUser($user); - $groups = array_map(array($auth,'cleanGroup'),$groups); + $user = $auth->cleanUser($user); + $groups = array_map(array($auth, 'cleanGroup'), $groups); // extract the memberlist - $members = explode(',',$memberlist); - $members = array_map('trim',$members); + $members = explode(',', $memberlist); + $members = array_map('trim', $members); $members = array_unique($members); $members = array_filter($members); // compare cleaned values - foreach($members as $member){ + foreach($members as $member) { if(!$auth->isCaseSensitive()) $member = utf8_strtolower($member); - if($member[0] == '@'){ - $member = $auth->cleanGroup(substr($member,1)); + if($member[0] == '@') { + $member = $auth->cleanGroup(substr($member, 1)); if(in_array($member, $groups)) return true; - }else{ + } else { $member = $auth->cleanUser($member); if($member == $user) return true; } @@ -468,12 +487,12 @@ function auth_isMember($memberlist,$user,array $groups){ * @param string $id page ID (needs to be resolved and cleaned) * @return int permission level */ -function auth_quickaclcheck($id){ +function auth_quickaclcheck($id) { global $conf; global $USERINFO; # if no ACL is used always return upload rights if(!$conf['useacl']) return AUTH_UPLOAD; - return auth_aclcheck($id,$_SERVER['REMOTE_USER'],$USERINFO['grps']); + return auth_aclcheck($id, $_SERVER['REMOTE_USER'], $USERINFO['grps']); } /** @@ -482,111 +501,115 @@ function auth_quickaclcheck($id){ * * @author Andreas Gohr <andi@splitbrain.org> * - * @param string $id page ID (needs to be resolved and cleaned) - * @param string $user Username - * @param array $groups Array of groups the user is in + * @param string $id page ID (needs to be resolved and cleaned) + * @param string $user Username + * @param array|null $groups Array of groups the user is in * @return int permission level */ -function auth_aclcheck($id,$user,$groups){ +function auth_aclcheck($id, $user, $groups) { global $conf; global $AUTH_ACL; + /* @var auth_basic $auth */ global $auth; // if no ACL is used always return upload rights if(!$conf['useacl']) return AUTH_UPLOAD; - if (!$auth) return AUTH_NONE; + if(!$auth) return AUTH_NONE; //make sure groups is an array if(!is_array($groups)) $groups = array(); //if user is superuser or in superusergroup return 255 (acl_admin) - if(auth_isadmin($user,$groups)) { return AUTH_ADMIN; } + if(auth_isadmin($user, $groups)) { + return AUTH_ADMIN; + } $ci = ''; if(!$auth->isCaseSensitive()) $ci = 'ui'; - $user = $auth->cleanUser($user); - $groups = array_map(array($auth,'cleanGroup'),(array)$groups); - $user = auth_nameencode($user); + $user = $auth->cleanUser($user); + $groups = array_map(array($auth, 'cleanGroup'), (array) $groups); + $user = auth_nameencode($user); //prepend groups with @ and nameencode $cnt = count($groups); - for($i=0; $i<$cnt; $i++){ + for($i = 0; $i < $cnt; $i++) { $groups[$i] = '@'.auth_nameencode($groups[$i]); } - $ns = getNS($id); - $perm = -1; + $ns = getNS($id); + $perm = -1; - if($user || count($groups)){ + if($user || count($groups)) { //add ALL group $groups[] = '@ALL'; //add User if($user) $groups[] = $user; - }else{ + } else { $groups[] = '@ALL'; } //check exact match first - $matches = preg_grep('/^'.preg_quote($id,'/').'\s+(\S+)\s+/'.$ci,$AUTH_ACL); - if(count($matches)){ - foreach($matches as $match){ - $match = preg_replace('/#.*$/','',$match); //ignore comments - $acl = preg_split('/\s+/',$match); - if (!in_array($acl[1], $groups)) { + $matches = preg_grep('/^'.preg_quote($id, '/').'\s+(\S+)\s+/'.$ci, $AUTH_ACL); + if(count($matches)) { + foreach($matches as $match) { + $match = preg_replace('/#.*$/', '', $match); //ignore comments + $acl = preg_split('/\s+/', $match); + if(!in_array($acl[1], $groups)) { continue; } if($acl[2] > AUTH_DELETE) $acl[2] = AUTH_DELETE; //no admins in the ACL! - if($acl[2] > $perm){ + if($acl[2] > $perm) { $perm = $acl[2]; } } - if($perm > -1){ + if($perm > -1) { //we had a match - return it return $perm; } } //still here? do the namespace checks - if($ns){ + if($ns) { $path = $ns.':*'; - }else{ + } else { $path = '*'; //root document } - do{ - $matches = preg_grep('/^'.preg_quote($path,'/').'\s+(\S+)\s+/'.$ci,$AUTH_ACL); - if(count($matches)){ - foreach($matches as $match){ - $match = preg_replace('/#.*$/','',$match); //ignore comments - $acl = preg_split('/\s+/',$match); - if (!in_array($acl[1], $groups)) { + do { + $matches = preg_grep('/^'.preg_quote($path, '/').'\s+(\S+)\s+/'.$ci, $AUTH_ACL); + if(count($matches)) { + foreach($matches as $match) { + $match = preg_replace('/#.*$/', '', $match); //ignore comments + $acl = preg_split('/\s+/', $match); + if(!in_array($acl[1], $groups)) { continue; } if($acl[2] > AUTH_DELETE) $acl[2] = AUTH_DELETE; //no admins in the ACL! - if($acl[2] > $perm){ + if($acl[2] > $perm) { $perm = $acl[2]; } } //we had a match - return it - if ($perm != -1) { + if($perm != -1) { return $perm; } } //get next higher namespace - $ns = getNS($ns); + $ns = getNS($ns); - if($path != '*'){ + if($path != '*') { $path = $ns.':*'; if($path == ':*') $path = '*'; - }else{ + } else { //we did this already //looks like there is something wrong with the ACL //break here msg('No ACL setup yet! Denying access to everyone.'); return AUTH_NONE; } - }while(1); //this should never loop endless + } while(1); //this should never loop endless + return AUTH_NONE; } /** @@ -602,7 +625,7 @@ function auth_aclcheck($id,$user,$groups){ * @author Andreas Gohr <gohr@cosmocode.de> * @see rawurldecode() */ -function auth_nameencode($name,$skip_group=false){ +function auth_nameencode($name, $skip_group = false) { global $cache_authname; $cache =& $cache_authname; $name = (string) $name; @@ -610,13 +633,17 @@ function auth_nameencode($name,$skip_group=false){ // never encode wildcard FS#1955 if($name == '%USER%') return $name; - if (!isset($cache[$name][$skip_group])) { - if($skip_group && $name{0} =='@'){ - $cache[$name][$skip_group] = '@'.preg_replace('/([\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f])/e', - "'%'.dechex(ord(substr('\\1',-1)))",substr($name,1)); - }else{ - $cache[$name][$skip_group] = preg_replace('/([\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f])/e', - "'%'.dechex(ord(substr('\\1',-1)))",$name); + if(!isset($cache[$name][$skip_group])) { + if($skip_group && $name{0} == '@') { + $cache[$name][$skip_group] = '@'.preg_replace( + '/([\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f])/e', + "'%'.dechex(ord(substr('\\1',-1)))", substr($name, 1) + ); + } else { + $cache[$name][$skip_group] = preg_replace( + '/([\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f])/e', + "'%'.dechex(ord(substr('\\1',-1)))", $name + ); } } @@ -631,20 +658,20 @@ function auth_nameencode($name,$skip_group=false){ * * @return string pronouncable password */ -function auth_pwgen(){ +function auth_pwgen() { $pw = ''; $c = 'bcdfghjklmnprstvwz'; //consonants except hard to speak ones - $v = 'aeiou'; //vowels - $a = $c.$v; //both + $v = 'aeiou'; //vowels + $a = $c.$v; //both //use two syllables... - for($i=0;$i < 2; $i++){ - $pw .= $c[rand(0, strlen($c)-1)]; - $pw .= $v[rand(0, strlen($v)-1)]; - $pw .= $a[rand(0, strlen($a)-1)]; + for($i = 0; $i < 2; $i++) { + $pw .= $c[rand(0, strlen($c) - 1)]; + $pw .= $v[rand(0, strlen($v) - 1)]; + $pw .= $a[rand(0, strlen($a) - 1)]; } //... and add a nice number - $pw .= rand(10,99); + $pw .= rand(10, 99); return $pw; } @@ -653,38 +680,33 @@ function auth_pwgen(){ * Sends a password to the given user * * @author Andreas Gohr <andi@splitbrain.org> - * + * @param string $user Login name of the user + * @param string $password The new password in clear text * @return bool true on success */ -function auth_sendPassword($user,$password){ - global $conf; +function auth_sendPassword($user, $password) { global $lang; + /* @var auth_basic $auth */ global $auth; - if (!$auth) return false; + if(!$auth) return false; - $hdrs = ''; $user = $auth->cleanUser($user); $userinfo = $auth->getUserData($user); if(!$userinfo['mail']) return false; $text = rawLocale('password'); - $text = str_replace('@DOKUWIKIURL@',DOKU_URL,$text); - $text = str_replace('@FULLNAME@',$userinfo['name'],$text); - $text = str_replace('@LOGIN@',$user,$text); - $text = str_replace('@PASSWORD@',$password,$text); - $text = str_replace('@TITLE@',$conf['title'],$text); - - if(empty($conf['mailprefix'])) { - $subject = $lang['regpwmail']; - } else { - $subject = '['.$conf['mailprefix'].'] '.$lang['regpwmail']; - } - - return mail_send($userinfo['name'].' <'.$userinfo['mail'].'>', - $subject, - $text, - $conf['mailfrom']); + $trep = array( + 'FULLNAME' => $userinfo['name'], + 'LOGIN' => $user, + 'PASSWORD' => $password + ); + + $mail = new Mailer(); + $mail->to($userinfo['name'].' <'.$userinfo['mail'].'>'); + $mail->subject($lang['regpwmail']); + $mail->setBody($text, $trep); + return $mail->send(); } /** @@ -693,12 +715,12 @@ function auth_sendPassword($user,$password){ * This registers a new user - Data is read directly from $_POST * * @author Andreas Gohr <andi@splitbrain.org> - * * @return bool true on success, false on any error */ -function register(){ +function register() { global $lang; global $conf; + /* @var auth_basic $auth */ global $auth; if(!$_POST['save']) return false; @@ -708,61 +730,63 @@ function register(){ $_POST['login'] = trim($auth->cleanUser($_POST['login'])); //clean fullname and email - $_POST['fullname'] = trim(preg_replace('/[\x00-\x1f:<>&%,;]+/','',$_POST['fullname'])); - $_POST['email'] = trim(preg_replace('/[\x00-\x1f:<>&%,;]+/','',$_POST['email'])); + $_POST['fullname'] = trim(preg_replace('/[\x00-\x1f:<>&%,;]+/', '', $_POST['fullname'])); + $_POST['email'] = trim(preg_replace('/[\x00-\x1f:<>&%,;]+/', '', $_POST['email'])); - if( empty($_POST['login']) || + if(empty($_POST['login']) || empty($_POST['fullname']) || - empty($_POST['email']) ){ - msg($lang['regmissing'],-1); + empty($_POST['email']) + ) { + msg($lang['regmissing'], -1); return false; } - if ($conf['autopasswd']) { - $pass = auth_pwgen(); // automatically generate password - } elseif (empty($_POST['pass']) || - empty($_POST['passchk'])) { - msg($lang['regmissing'], -1); // complain about missing passwords + if($conf['autopasswd']) { + $pass = auth_pwgen(); // automatically generate password + } elseif(empty($_POST['pass']) || + empty($_POST['passchk']) + ) { + msg($lang['regmissing'], -1); // complain about missing passwords return false; - } elseif ($_POST['pass'] != $_POST['passchk']) { - msg($lang['regbadpass'], -1); // complain about misspelled passwords + } elseif($_POST['pass'] != $_POST['passchk']) { + msg($lang['regbadpass'], -1); // complain about misspelled passwords return false; } else { - $pass = $_POST['pass']; // accept checked and valid password + $pass = $_POST['pass']; // accept checked and valid password } //check mail - if(!mail_isvalid($_POST['email'])){ - msg($lang['regbadmail'],-1); + if(!mail_isvalid($_POST['email'])) { + msg($lang['regbadmail'], -1); return false; } //okay try to create the user - if(!$auth->triggerUserMod('create', array($_POST['login'],$pass,$_POST['fullname'],$_POST['email']))){ - msg($lang['reguexists'],-1); + if(!$auth->triggerUserMod('create', array($_POST['login'], $pass, $_POST['fullname'], $_POST['email']))) { + msg($lang['reguexists'], -1); return false; } // create substitutions for use in notification email $substitutions = array( - 'NEWUSER' => $_POST['login'], - 'NEWNAME' => $_POST['fullname'], - 'NEWEMAIL' => $_POST['email'], - ); + 'NEWUSER' => $_POST['login'], + 'NEWNAME' => $_POST['fullname'], + 'NEWEMAIL' => $_POST['email'], + ); - if (!$conf['autopasswd']) { - msg($lang['regsuccess2'],1); + if(!$conf['autopasswd']) { + msg($lang['regsuccess2'], 1); notify('', 'register', '', $_POST['login'], false, $substitutions); return true; } // autogenerated password? then send him the password - if (auth_sendPassword($_POST['login'],$pass)){ - msg($lang['regsuccess'],1); + if(auth_sendPassword($_POST['login'], $pass)) { + msg($lang['regsuccess'], 1); notify('', 'register', '', $_POST['login'], false, $substitutions); return true; - }else{ - msg($lang['regmailfail'],-1); + } else { + msg($lang['regmailfail'], -1); return false; } } @@ -774,63 +798,78 @@ function register(){ */ function updateprofile() { global $conf; - global $INFO; global $lang; + /* @var auth_basic $auth */ global $auth; + /* @var Input $INPUT */ + global $INPUT; - if(empty($_POST['save'])) return false; + if(!$INPUT->post->bool('save')) return false; if(!checkSecurityToken()) return false; if(!actionOK('profile')) { - msg($lang['profna'],-1); + msg($lang['profna'], -1); return false; } - if ($_POST['newpass'] != $_POST['passchk']) { - msg($lang['regbadpass'], -1); // complain about misspelled passwords + $changes = array(); + $changes['pass'] = $INPUT->post->str('newpass'); + $changes['name'] = $INPUT->post->str('fullname'); + $changes['mail'] = $INPUT->post->str('email'); + + // check misspelled passwords + if($changes['pass'] != $INPUT->post->str('passchk')) { + msg($lang['regbadpass'], -1); return false; } - //clean fullname and email - $_POST['fullname'] = trim(preg_replace('/[\x00-\x1f:<>&%,;]+/','',$_POST['fullname'])); - $_POST['email'] = trim(preg_replace('/[\x00-\x1f:<>&%,;]+/','',$_POST['email'])); + // clean fullname and email + $changes['name'] = trim(preg_replace('/[\x00-\x1f:<>&%,;]+/', '', $changes['name'])); + $changes['mail'] = trim(preg_replace('/[\x00-\x1f:<>&%,;]+/', '', $changes['mail'])); - if ((empty($_POST['fullname']) && $auth->canDo('modName')) || - (empty($_POST['email']) && $auth->canDo('modMail'))) { - msg($lang['profnoempty'],-1); + // no empty name and email (except the backend doesn't support them) + if((empty($changes['name']) && $auth->canDo('modName')) || + (empty($changes['mail']) && $auth->canDo('modMail')) + ) { + msg($lang['profnoempty'], -1); return false; } - - if (!mail_isvalid($_POST['email']) && $auth->canDo('modMail')){ - msg($lang['regbadmail'],-1); + if(!mail_isvalid($changes['mail']) && $auth->canDo('modMail')) { + msg($lang['regbadmail'], -1); return false; } - if ($_POST['fullname'] != $INFO['userinfo']['name'] && $auth->canDo('modName')) $changes['name'] = $_POST['fullname']; - if ($_POST['email'] != $INFO['userinfo']['mail'] && $auth->canDo('modMail')) $changes['mail'] = $_POST['email']; - if (!empty($_POST['newpass']) && $auth->canDo('modPass')) $changes['pass'] = $_POST['newpass']; + $changes = array_filter($changes); + + // check for unavailable capabilities + if(!$auth->canDo('modName')) unset($changes['name']); + if(!$auth->canDo('modMail')) unset($changes['mail']); + if(!$auth->canDo('modPass')) unset($changes['pass']); - if (!count($changes)) { + // anything to do? + if(!count($changes)) { msg($lang['profnochange'], -1); return false; } - if ($conf['profileconfirm']) { - if (!$auth->checkPass($_SERVER['REMOTE_USER'], $_POST['oldpass'])) { - msg($lang['badlogin'],-1); + if($conf['profileconfirm']) { + if(!$auth->checkPass($_SERVER['REMOTE_USER'], $INPUT->post->str('oldpass'))) { + msg($lang['badlogin'], -1); return false; } } - if ($result = $auth->triggerUserMod('modify', array($_SERVER['REMOTE_USER'], $changes))) { + if($result = $auth->triggerUserMod('modify', array($_SERVER['REMOTE_USER'], $changes))) { // update cookie and session with the changed data - if ($changes['pass']){ - list($user,$sticky,$pass) = auth_getCookie(); - $pass = PMA_blowfish_encrypt($changes['pass'],auth_cookiesalt(!$sticky)); - auth_setCookie($_SERVER['REMOTE_USER'],$pass,(bool)$sticky); + if($changes['pass']) { + list( /*user*/, $sticky, /*pass*/) = auth_getCookie(); + $pass = PMA_blowfish_encrypt($changes['pass'], auth_cookiesalt(!$sticky)); + auth_setCookie($_SERVER['REMOTE_USER'], $pass, (bool) $sticky); } return true; } + + return false; } /** @@ -847,68 +886,73 @@ function updateprofile() { * * @return bool true on success, false on any error */ -function act_resendpwd(){ +function act_resendpwd() { global $lang; global $conf; + /* @var auth_basic $auth */ global $auth; + /* @var Input $INPUT */ + global $INPUT; if(!actionOK('resendpwd')) { - msg($lang['resendna'],-1); + msg($lang['resendna'], -1); return false; } - $token = preg_replace('/[^a-f0-9]+/','',$_REQUEST['pwauth']); + $token = preg_replace('/[^a-f0-9]+/', '', $INPUT->str('pwauth')); - if($token){ + if($token) { // we're in token phase - get user info from token $tfile = $conf['cachedir'].'/'.$token{0}.'/'.$token.'.pwauth'; - if(!@file_exists($tfile)){ - msg($lang['resendpwdbadauth'],-1); - unset($_REQUEST['pwauth']); + if(!@file_exists($tfile)) { + msg($lang['resendpwdbadauth'], -1); + $INPUT->remove('pwauth'); return false; } // token is only valid for 3 days - if( (time() - filemtime($tfile)) > (3*60*60*24) ){ - msg($lang['resendpwdbadauth'],-1); - unset($_REQUEST['pwauth']); + if((time() - filemtime($tfile)) > (3 * 60 * 60 * 24)) { + msg($lang['resendpwdbadauth'], -1); + $INPUT->remove('pwauth'); @unlink($tfile); return false; } - $user = io_readfile($tfile); + $user = io_readfile($tfile); $userinfo = $auth->getUserData($user); if(!$userinfo['mail']) { msg($lang['resendpwdnouser'], -1); return false; } - if(!$conf['autopasswd']){ // we let the user choose a password + if(!$conf['autopasswd']) { // we let the user choose a password + $pass = $INPUT->str('pass'); + // password given correctly? - if(!isset($_REQUEST['pass']) || $_REQUEST['pass'] == '') return false; - if($_REQUEST['pass'] != $_REQUEST['passchk']){ - msg($lang['regbadpass'],-1); + if(!$pass) return false; + if($pass != $INPUT->str('passchk')) { + msg($lang['regbadpass'], -1); return false; } - $pass = $_REQUEST['pass']; - if (!$auth->triggerUserMod('modify', array($user,array('pass' => $pass)))) { - msg('error modifying user data',-1); + // change it + if(!$auth->triggerUserMod('modify', array($user, array('pass' => $pass)))) { + msg('error modifying user data', -1); return false; } - }else{ // autogenerate the password and send by mail + } else { // autogenerate the password and send by mail $pass = auth_pwgen(); - if (!$auth->triggerUserMod('modify', array($user,array('pass' => $pass)))) { - msg('error modifying user data',-1); + if(!$auth->triggerUserMod('modify', array($user, array('pass' => $pass)))) { + msg('error modifying user data', -1); return false; } - if (auth_sendPassword($user,$pass)) { - msg($lang['resendpwdsuccess'],1); + if(auth_sendPassword($user, $pass)) { + msg($lang['resendpwdsuccess'], 1); } else { - msg($lang['regmailfail'],-1); + msg($lang['regmailfail'], -1); } } @@ -918,13 +962,13 @@ function act_resendpwd(){ } else { // we're in request phase - if(!$_POST['save']) return false; + if(!$INPUT->post->bool('save')) return false; - if (empty($_POST['login'])) { + if(!$INPUT->post->str('login')) { msg($lang['resendpwdmissing'], -1); return false; } else { - $user = trim($auth->cleanUser($_POST['login'])); + $user = trim($auth->cleanUser($INPUT->post->str('login'))); } $userinfo = $auth->getUserData($user); @@ -936,35 +980,29 @@ function act_resendpwd(){ // generate auth token $token = md5(auth_cookiesalt().$user); //secret but user based $tfile = $conf['cachedir'].'/'.$token{0}.'/'.$token.'.pwauth'; - $url = wl('',array('do'=>'resendpwd','pwauth'=>$token),true,'&'); + $url = wl('', array('do'=> 'resendpwd', 'pwauth'=> $token), true, '&'); - io_saveFile($tfile,$user); + io_saveFile($tfile, $user); $text = rawLocale('pwconfirm'); - $text = str_replace('@DOKUWIKIURL@',DOKU_URL,$text); - $text = str_replace('@FULLNAME@',$userinfo['name'],$text); - $text = str_replace('@LOGIN@',$user,$text); - $text = str_replace('@TITLE@',$conf['title'],$text); - $text = str_replace('@CONFIRM@',$url,$text); - - if(empty($conf['mailprefix'])) { - $subject = $lang['regpwmail']; + $trep = array( + 'FULLNAME' => $userinfo['name'], + 'LOGIN' => $user, + 'CONFIRM' => $url + ); + + $mail = new Mailer(); + $mail->to($userinfo['name'].' <'.$userinfo['mail'].'>'); + $mail->subject($lang['regpwmail']); + $mail->setBody($text, $trep); + if($mail->send()) { + msg($lang['resendpwdconfirm'], 1); } else { - $subject = '['.$conf['mailprefix'].'] '.$lang['regpwmail']; - } - - if(mail_send($userinfo['name'].' <'.$userinfo['mail'].'>', - $subject, - $text, - $conf['mailfrom'])){ - msg($lang['resendpwdconfirm'],1); - }else{ - msg($lang['regmailfail'],-1); + msg($lang['regmailfail'], -1); } return true; } - - return false; // never reached + // never reached } /** @@ -974,32 +1012,37 @@ function act_resendpwd(){ * is chosen. * * @author Andreas Gohr <andi@splitbrain.org> + * @param string $clear The clear text password + * @param string $method The hashing method + * @param string $salt A salt, null for random * @return string The crypted password */ -function auth_cryptPassword($clear,$method='',$salt=null){ +function auth_cryptPassword($clear, $method = '', $salt = null) { global $conf; if(empty($method)) $method = $conf['passcrypt']; - $pass = new PassHash(); - $call = 'hash_'.$method; + $pass = new PassHash(); + $call = 'hash_'.$method; - if(!method_exists($pass,$call)){ - msg("Unsupported crypt method $method",-1); + if(!method_exists($pass, $call)) { + msg("Unsupported crypt method $method", -1); return false; } - return $pass->$call($clear,$salt); + return $pass->$call($clear, $salt); } /** * Verifies a cleartext password against a crypted hash * - * @author Andreas Gohr <andi@splitbrain.org> - * @return bool + * @author Andreas Gohr <andi@splitbrain.org> + * @param string $clear The clear text password + * @param string $crypt The hash to compare with + * @return bool true if both match */ -function auth_verifyPassword($clear,$crypt){ +function auth_verifyPassword($clear, $crypt) { $pass = new PassHash(); - return $pass->verify_hash($clear,$crypt); + return $pass->verify_hash($clear, $crypt); } /** @@ -1008,23 +1051,25 @@ function auth_verifyPassword($clear,$crypt){ * @param string $user username * @param string $pass encrypted password * @param bool $sticky whether or not the cookie will last beyond the session + * @return bool */ -function auth_setCookie($user,$pass,$sticky) { +function auth_setCookie($user, $pass, $sticky) { global $conf; + /* @var auth_basic $auth */ global $auth; global $USERINFO; - if (!$auth) return false; + if(!$auth) return false; $USERINFO = $auth->getUserData($user); // set cookie - $cookie = base64_encode($user).'|'.((int) $sticky).'|'.base64_encode($pass); + $cookie = base64_encode($user).'|'.((int) $sticky).'|'.base64_encode($pass); $cookieDir = empty($conf['cookiedir']) ? DOKU_REL : $conf['cookiedir']; - $time = $sticky ? (time()+60*60*24*365) : 0; //one year - if (version_compare(PHP_VERSION, '5.2.0', '>')) { - setcookie(DOKU_COOKIE,$cookie,$time,$cookieDir,'',($conf['securecookie'] && is_ssl()),true); - }else{ - setcookie(DOKU_COOKIE,$cookie,$time,$cookieDir,'',($conf['securecookie'] && is_ssl())); + $time = $sticky ? (time() + 60 * 60 * 24 * 365) : 0; //one year + if(version_compare(PHP_VERSION, '5.2.0', '>')) { + setcookie(DOKU_COOKIE, $cookie, $time, $cookieDir, '', ($conf['securecookie'] && is_ssl()), true); + } else { + setcookie(DOKU_COOKIE, $cookie, $time, $cookieDir, '', ($conf['securecookie'] && is_ssl())); } // set session $_SESSION[DOKU_COOKIE]['auth']['user'] = $user; @@ -1032,6 +1077,8 @@ function auth_setCookie($user,$pass,$sticky) { $_SESSION[DOKU_COOKIE]['auth']['buid'] = auth_browseruid(); $_SESSION[DOKU_COOKIE]['auth']['info'] = $USERINFO; $_SESSION[DOKU_COOKIE]['auth']['time'] = time(); + + return true; } /** @@ -1039,15 +1086,15 @@ function auth_setCookie($user,$pass,$sticky) { * * @returns array */ -function auth_getCookie(){ - if (!isset($_COOKIE[DOKU_COOKIE])) { +function auth_getCookie() { + if(!isset($_COOKIE[DOKU_COOKIE])) { return array(null, null, null); } - list($user,$sticky,$pass) = explode('|',$_COOKIE[DOKU_COOKIE],3); + list($user, $sticky, $pass) = explode('|', $_COOKIE[DOKU_COOKIE], 3); $sticky = (bool) $sticky; $pass = base64_decode($pass); $user = base64_decode($user); - return array($user,$sticky,$pass); + return array($user, $sticky, $pass); } //Setup VIM: ex: et ts=2 : diff --git a/inc/auth/ad.class.php b/inc/auth/ad.class.php index bc41685272b7a899eda0d7f65790fdecc4323333..e161c2939c140d64676cd09fb522e2d31073f4e5 100644 --- a/inc/auth/ad.class.php +++ b/inc/auth/ad.class.php @@ -70,6 +70,9 @@ class auth_ad extends auth_basic { } // Prepare SSO + if(!utf8_check($_SERVER['REMOTE_USER'])){ + $_SERVER['REMOTE_USER'] = utf8_encode($_SERVER['REMOTE_USER']); + } if($_SERVER['REMOTE_USER'] && $this->cnf['sso']){ // remove possible NTLM domain list($dom,$usr) = explode('\\',$_SERVER['REMOTE_USER'],2); diff --git a/inc/common.php b/inc/common.php index 0a75f2eab4e8f9317759fe9bf25817c9b15274e2..768260bbfb264ac2547d711e9a969baf49f88597 100644 --- a/inc/common.php +++ b/inc/common.php @@ -11,11 +11,11 @@ if(!defined('DOKU_INC')) die('meh.'); /** * These constants are used with the recents function */ -define('RECENTS_SKIP_DELETED',2); -define('RECENTS_SKIP_MINORS',4); -define('RECENTS_SKIP_SUBSPACES',8); -define('RECENTS_MEDIA_CHANGES',16); -define('RECENTS_MEDIA_PAGES_MIXED',32); +define('RECENTS_SKIP_DELETED', 2); +define('RECENTS_SKIP_MINORS', 4); +define('RECENTS_SKIP_SUBSPACES', 8); +define('RECENTS_MEDIA_CHANGES', 16); +define('RECENTS_MEDIA_PAGES_MIXED', 32); /** * Wrapper around htmlspecialchars() @@ -23,7 +23,7 @@ define('RECENTS_MEDIA_PAGES_MIXED',32); * @author Andreas Gohr <andi@splitbrain.org> * @see htmlspecialchars() */ -function hsc($string){ +function hsc($string) { return htmlspecialchars($string, ENT_QUOTES, 'UTF-8'); } @@ -34,7 +34,7 @@ function hsc($string){ * * @author Andreas Gohr <andi@splitbrain.org> */ -function ptln($string,$indent=0){ +function ptln($string, $indent = 0) { echo str_repeat(' ', $indent)."$string\n"; } @@ -43,8 +43,8 @@ function ptln($string,$indent=0){ * * @author Andreas Gohr <andi@splitbrain.org> */ -function stripctl($string){ - return preg_replace('/[\x00-\x1F]+/s','',$string); +function stripctl($string) { + return preg_replace('/[\x00-\x1F]+/s', '', $string); } /** @@ -55,19 +55,19 @@ function stripctl($string){ * @link http://christ1an.blogspot.com/2007/04/preventing-csrf-efficiently.html * @return string */ -function getSecurityToken(){ +function getSecurityToken() { return md5(auth_cookiesalt().session_id().$_SERVER['REMOTE_USER']); } /** * Check the secret CSRF token */ -function checkSecurityToken($token=null){ +function checkSecurityToken($token = null) { if(!$_SERVER['REMOTE_USER']) return true; // no logged in user, no need for a check if(is_null($token)) $token = $_REQUEST['sectok']; - if(getSecurityToken() != $token){ - msg('Security Token did not match. Possible CSRF attack.',-1); + if(getSecurityToken() != $token) { + msg('Security Token did not match. Possible CSRF attack.', -1); return false; } return true; @@ -78,13 +78,10 @@ function checkSecurityToken($token=null){ * * @author Andreas Gohr <andi@splitbrain.org> */ -function formSecurityToken($print=true){ +function formSecurityToken($print = true) { $ret = '<div class="no"><input type="hidden" name="sectok" value="'.getSecurityToken().'" /></div>'."\n"; - if($print){ - echo $ret; - }else{ - return $ret; - } + if($print) echo $ret; + return $ret; } /** @@ -93,7 +90,7 @@ function formSecurityToken($print=true){ * * @author Andreas Gohr <andi@splitbrain.org> */ -function pageinfo(){ +function pageinfo() { global $ID; global $REV; global $RANGE; @@ -102,32 +99,32 @@ function pageinfo(){ // include ID & REV not redundant, as some parts of DokuWiki may temporarily change $ID, e.g. p_wiki_xhtml // FIXME ... perhaps it would be better to ensure the temporary changes weren't necessary - $info['id'] = $ID; + $info['id'] = $ID; $info['rev'] = $REV; // set info about manager/admin status. $info['isadmin'] = false; $info['ismanager'] = false; - if(isset($_SERVER['REMOTE_USER'])){ - $info['userinfo'] = $USERINFO; - $info['perm'] = auth_quickaclcheck($ID); - $info['subscribed'] = get_info_subscribed(); - $info['client'] = $_SERVER['REMOTE_USER']; + if(isset($_SERVER['REMOTE_USER'])) { + $info['userinfo'] = $USERINFO; + $info['perm'] = auth_quickaclcheck($ID); + $info['subscribed'] = get_info_subscribed(); + $info['client'] = $_SERVER['REMOTE_USER']; - if($info['perm'] == AUTH_ADMIN){ + if($info['perm'] == AUTH_ADMIN) { $info['isadmin'] = true; $info['ismanager'] = true; - }elseif(auth_ismanager()){ + } elseif(auth_ismanager()) { $info['ismanager'] = true; } // if some outside auth were used only REMOTE_USER is set - if(!$info['userinfo']['name']){ + if(!$info['userinfo']['name']) { $info['userinfo']['name'] = $_SERVER['REMOTE_USER']; } - }else{ - $info['perm'] = auth_aclcheck($ID,'',null); + } else { + $info['perm'] = auth_aclcheck($ID, '', null); $info['subscribed'] = false; $info['client'] = clientIP(true); } @@ -136,76 +133,76 @@ function pageinfo(){ $info['locked'] = checklock($ID); $info['filepath'] = fullpath(wikiFN($ID)); $info['exists'] = @file_exists($info['filepath']); - if($REV){ + if($REV) { //check if current revision was meant - if($info['exists'] && (@filemtime($info['filepath'])==$REV)){ + if($info['exists'] && (@filemtime($info['filepath']) == $REV)) { $REV = ''; - }elseif($RANGE){ + } elseif($RANGE) { //section editing does not work with old revisions! $REV = ''; $RANGE = ''; - msg($lang['nosecedit'],0); - }else{ + msg($lang['nosecedit'], 0); + } else { //really use old revision - $info['filepath'] = fullpath(wikiFN($ID,$REV)); + $info['filepath'] = fullpath(wikiFN($ID, $REV)); $info['exists'] = @file_exists($info['filepath']); } } $info['rev'] = $REV; - if($info['exists']){ + if($info['exists']) { $info['writable'] = (is_writable($info['filepath']) && - ($info['perm'] >= AUTH_EDIT)); - }else{ + ($info['perm'] >= AUTH_EDIT)); + } else { $info['writable'] = ($info['perm'] >= AUTH_CREATE); } - $info['editable'] = ($info['writable'] && empty($info['locked'])); - $info['lastmod'] = @filemtime($info['filepath']); + $info['editable'] = ($info['writable'] && empty($info['locked'])); + $info['lastmod'] = @filemtime($info['filepath']); //load page meta data $info['meta'] = p_get_metadata($ID); //who's the editor - if($REV){ + if($REV) { $revinfo = getRevisionInfo($ID, $REV, 1024); - }else{ - if (is_array($info['meta']['last_change'])) { + } else { + if(is_array($info['meta']['last_change'])) { $revinfo = $info['meta']['last_change']; } else { $revinfo = getRevisionInfo($ID, $info['lastmod'], 1024); // cache most recent changelog line in metadata if missing and still valid - if ($revinfo!==false) { + if($revinfo !== false) { $info['meta']['last_change'] = $revinfo; p_set_metadata($ID, array('last_change' => $revinfo)); } } } //and check for an external edit - if($revinfo!==false && $revinfo['date']!=$info['lastmod']){ + if($revinfo !== false && $revinfo['date'] != $info['lastmod']) { // cached changelog line no longer valid - $revinfo = false; + $revinfo = false; $info['meta']['last_change'] = $revinfo; p_set_metadata($ID, array('last_change' => $revinfo)); } - $info['ip'] = $revinfo['ip']; - $info['user'] = $revinfo['user']; - $info['sum'] = $revinfo['sum']; + $info['ip'] = $revinfo['ip']; + $info['user'] = $revinfo['user']; + $info['sum'] = $revinfo['sum']; // See also $INFO['meta']['last_change'] which is the most recent log line for page $ID. // Use $INFO['meta']['last_change']['type']===DOKU_CHANGE_TYPE_MINOR_EDIT in place of $info['minor']. - if($revinfo['user']){ + if($revinfo['user']) { $info['editor'] = $revinfo['user']; - }else{ + } else { $info['editor'] = $revinfo['ip']; } // draft - $draft = getCacheName($info['client'].$ID,'.draft'); - if(@file_exists($draft)){ - if(@filemtime($draft) < @filemtime(wikiFN($ID))){ + $draft = getCacheName($info['client'].$ID, '.draft'); + if(@file_exists($draft)) { + if(@filemtime($draft) < @filemtime(wikiFN($ID))) { // remove stale draft @unlink($draft); - }else{ + } else { $info['draft'] = $draft; } } @@ -221,14 +218,14 @@ function pageinfo(){ * * @author Andreas Gohr */ -function buildURLparams($params, $sep='&'){ +function buildURLparams($params, $sep = '&') { $url = ''; $amp = false; - foreach($params as $key => $val){ + foreach($params as $key => $val) { if($amp) $url .= $sep; $url .= rawurlencode($key).'='; - $url .= rawurlencode((string)$val); + $url .= rawurlencode((string) $val); $amp = true; } return $url; @@ -241,29 +238,28 @@ function buildURLparams($params, $sep='&'){ * * @author Andreas Gohr */ -function buildAttributes($params,$skipempty=false){ - $url = ''; +function buildAttributes($params, $skipempty = false) { + $url = ''; $white = false; - foreach($params as $key => $val){ + foreach($params as $key => $val) { if($key{0} == '_') continue; if($val === '' && $skipempty) continue; if($white) $url .= ' '; $url .= $key.'="'; - $url .= htmlspecialchars ($val); + $url .= htmlspecialchars($val); $url .= '"'; $white = true; } return $url; } - /** * This builds the breadcrumb trail and returns it as array * * @author Andreas Gohr <andi@splitbrain.org> */ -function breadcrumbs(){ +function breadcrumbs() { // we prepare the breadcrumbs early for quick session closing static $crumbs = null; if($crumbs != null) return $crumbs; @@ -276,30 +272,30 @@ function breadcrumbs(){ $crumbs = isset($_SESSION[DOKU_COOKIE]['bc']) ? $_SESSION[DOKU_COOKIE]['bc'] : array(); //we only save on show and existing wiki documents $file = wikiFN($ID); - if($ACT != 'show' || !@file_exists($file)){ + if($ACT != 'show' || !@file_exists($file)) { $_SESSION[DOKU_COOKIE]['bc'] = $crumbs; return $crumbs; } // page names $name = noNSorNS($ID); - if (useHeading('navigation')) { + if(useHeading('navigation')) { // get page title - $title = p_get_first_heading($ID,METADATA_RENDER_USING_SIMPLE_CACHE); - if ($title) { + $title = p_get_first_heading($ID, METADATA_RENDER_USING_SIMPLE_CACHE); + if($title) { $name = $title; } } //remove ID from array - if (isset($crumbs[$ID])) { + if(isset($crumbs[$ID])) { unset($crumbs[$ID]); } //add to array $crumbs[$ID] = $name; //reduce size - while(count($crumbs) > $conf['breadcrumbs']){ + while(count($crumbs) > $conf['breadcrumbs']) { array_shift($crumbs); } //save to session @@ -318,18 +314,19 @@ function breadcrumbs(){ * * @author Andreas Gohr <andi@splitbrain.org> */ -function idfilter($id,$ue=true){ +function idfilter($id, $ue = true) { global $conf; - if ($conf['useslash'] && $conf['userewrite']){ - $id = strtr($id,':','/'); - }elseif (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN' && - $conf['userewrite']) { - $id = strtr($id,':',';'); - } - if($ue){ + if($conf['useslash'] && $conf['userewrite']) { + $id = strtr($id, ':', '/'); + } elseif(strtoupper(substr(PHP_OS, 0, 3)) === 'WIN' && + $conf['userewrite'] + ) { + $id = strtr($id, ':', ';'); + } + if($ue) { $id = rawurlencode($id); - $id = str_replace('%3A',':',$id); //keep as colon - $id = str_replace('%2F','/',$id); //keep as slash + $id = str_replace('%3A', ':', $id); //keep as colon + $id = str_replace('%2F', '/', $id); //keep as slash } return $id; } @@ -342,33 +339,35 @@ function idfilter($id,$ue=true){ * * @author Andreas Gohr <andi@splitbrain.org> */ -function wl($id='',$more='',$abs=false,$sep='&'){ +function wl($id = '', $urlParameters = '', $absolute = false, $separator = '&') { global $conf; - if(is_array($more)){ - $more = buildURLparams($more,$sep); - }else{ - $more = str_replace(',',$sep,$more); + if(is_array($urlParameters)) { + $urlParameters = buildURLparams($urlParameters, $separator); + } else { + $urlParameters = str_replace(',', $separator, $urlParameters); } - - $id = idfilter($id); - if($abs){ + if($id === '') { + $id = $conf['start']; + } + $id = idfilter($id); + if($absolute) { $xlink = DOKU_URL; - }else{ + } else { $xlink = DOKU_BASE; } - if($conf['userewrite'] == 2){ + if($conf['userewrite'] == 2) { $xlink .= DOKU_SCRIPT.'/'.$id; - if($more) $xlink .= '?'.$more; - }elseif($conf['userewrite']){ + if($urlParameters) $xlink .= '?'.$urlParameters; + } elseif($conf['userewrite']) { $xlink .= $id; - if($more) $xlink .= '?'.$more; - }elseif($id){ + if($urlParameters) $xlink .= '?'.$urlParameters; + } elseif($id) { $xlink .= DOKU_SCRIPT.'?id='.$id; - if($more) $xlink .= $sep.$more; - }else{ + if($urlParameters) $xlink .= $separator.$urlParameters; + } else { $xlink .= DOKU_SCRIPT; - if($more) $xlink .= '?'.$more; + if($urlParameters) $xlink .= '?'.$urlParameters; } return $xlink; @@ -381,29 +380,29 @@ function wl($id='',$more='',$abs=false,$sep='&'){ * * @author Ben Coburn <btcoburn@silicodon.net> */ -function exportlink($id='',$format='raw',$more='',$abs=false,$sep='&'){ +function exportlink($id = '', $format = 'raw', $more = '', $abs = false, $sep = '&') { global $conf; - if(is_array($more)){ - $more = buildURLparams($more,$sep); - }else{ - $more = str_replace(',',$sep,$more); + if(is_array($more)) { + $more = buildURLparams($more, $sep); + } else { + $more = str_replace(',', $sep, $more); } $format = rawurlencode($format); - $id = idfilter($id); - if($abs){ + $id = idfilter($id); + if($abs) { $xlink = DOKU_URL; - }else{ + } else { $xlink = DOKU_BASE; } - if($conf['userewrite'] == 2){ + if($conf['userewrite'] == 2) { $xlink .= DOKU_SCRIPT.'/'.$id.'?do=export_'.$format; if($more) $xlink .= $sep.$more; - }elseif($conf['userewrite'] == 1){ + } elseif($conf['userewrite'] == 1) { $xlink .= '_export/'.$format.'/'.$id; if($more) $xlink .= '?'.$more; - }else{ + } else { $xlink .= DOKU_SCRIPT.'?do=export_'.$format.$sep.'id='.$id; if($more) $xlink .= $sep.$more; } @@ -419,42 +418,43 @@ function exportlink($id='',$format='raw',$more='',$abs=false,$sep='&'){ * The $more parameter should always be given as array, the function then * will strip default parameters to produce even cleaner URLs * - * @param string $id - the media file id or URL - * @param mixed $more - string or array with additional parameters - * @param boolean $direct - link to detail page if false - * @param string $sep - URL parameter separator - * @param boolean $abs - Create an absolute URL + * @param string $id the media file id or URL + * @param mixed $more string or array with additional parameters + * @param bool $direct link to detail page if false + * @param string $sep URL parameter separator + * @param bool $abs Create an absolute URL + * @return string */ -function ml($id='',$more='',$direct=true,$sep='&',$abs=false){ +function ml($id = '', $more = '', $direct = true, $sep = '&', $abs = false) { global $conf; - if(is_array($more)){ + if(is_array($more)) { // strip defaults for shorter URLs if(isset($more['cache']) && $more['cache'] == 'cache') unset($more['cache']); if(!$more['w']) unset($more['w']); if(!$more['h']) unset($more['h']); if(isset($more['id']) && $direct) unset($more['id']); - $more = buildURLparams($more,$sep); - }else{ - $more = str_replace('cache=cache','',$more); //skip default - $more = str_replace(',,',',',$more); - $more = str_replace(',',$sep,$more); + $more = buildURLparams($more, $sep); + } else { + $more = str_replace('cache=cache', '', $more); //skip default + $more = str_replace(',,', ',', $more); + $more = str_replace(',', $sep, $more); } - if($abs){ + if($abs) { $xlink = DOKU_URL; - }else{ + } else { $xlink = DOKU_BASE; } // external URLs are always direct without rewriting - if(preg_match('#^(https?|ftp)://#i',$id)){ + if(preg_match('#^(https?|ftp)://#i', $id)) { $xlink .= 'lib/exe/fetch.php'; // add hash: - $xlink .= '?hash='.substr(md5(auth_cookiesalt().$id),0,6); - if($more){ + $xlink .= '?hash='.substr(md5(auth_cookiesalt().$id), 0, 6); + if($more) { $xlink .= $sep.$more; $xlink .= $sep.'media='.rawurlencode($id); - }else{ + } else { $xlink .= $sep.'media='.rawurlencode($id); } return $xlink; @@ -463,29 +463,29 @@ function ml($id='',$more='',$direct=true,$sep='&',$abs=false){ $id = idfilter($id); // decide on scriptname - if($direct){ - if($conf['userewrite'] == 1){ + if($direct) { + if($conf['userewrite'] == 1) { $script = '_media'; - }else{ + } else { $script = 'lib/exe/fetch.php'; } - }else{ - if($conf['userewrite'] == 1){ + } else { + if($conf['userewrite'] == 1) { $script = '_detail'; - }else{ + } else { $script = 'lib/exe/detail.php'; } } // build URL based on rewrite mode - if($conf['userewrite']){ + if($conf['userewrite']) { $xlink .= $script.'/'.$id; if($more) $xlink .= '?'.$more; - }else{ - if($more){ + } else { + if($more) { $xlink .= $script.'?'.$more; $xlink .= $sep.'media='.$id; - }else{ + } else { $xlink .= $script.'?media='.$id; } } @@ -493,15 +493,13 @@ function ml($id='',$more='',$direct=true,$sep='&',$abs=false){ return $xlink; } - - /** * Just builds a link to a script * * @todo maybe obsolete * @author Andreas Gohr <andi@splitbrain.org> */ -function script($script='doku.php'){ +function script($script = 'doku.php') { return DOKU_BASE.DOKU_SCRIPT; } @@ -529,7 +527,7 @@ function script($script='doku.php'){ * @param string $text - optional text to check, if not given the globals are used * @return bool - true if a spam word was found */ -function checkwordblock($text=''){ +function checkwordblock($text = '') { global $TEXT; global $PRE; global $SUF; @@ -541,32 +539,32 @@ function checkwordblock($text=''){ if(!$text) $text = "$PRE $TEXT $SUF"; // we prepare the text a tiny bit to prevent spammers circumventing URL checks - $text = preg_replace('!(\b)(www\.[\w.:?\-;,]+?\.[\w.:?\-;,]+?[\w/\#~:.?+=&%@\!\-.:?\-;,]+?)([.:?\-;,]*[^\w/\#~:.?+=&%@\!\-.:?\-;,])!i','\1http://\2 \2\3',$text); + $text = preg_replace('!(\b)(www\.[\w.:?\-;,]+?\.[\w.:?\-;,]+?[\w/\#~:.?+=&%@\!\-.:?\-;,]+?)([.:?\-;,]*[^\w/\#~:.?+=&%@\!\-.:?\-;,])!i', '\1http://\2 \2\3', $text); $wordblocks = getWordblocks(); // how many lines to read at once (to work around some PCRE limits) - if(version_compare(phpversion(),'4.3.0','<')){ + if(version_compare(phpversion(), '4.3.0', '<')) { // old versions of PCRE define a maximum of parenthesises even if no // backreferences are used - the maximum is 99 // this is very bad performancewise and may even be too high still $chunksize = 40; - }else{ + } else { // read file in chunks of 200 - this should work around the // MAX_PATTERN_SIZE in modern PCRE $chunksize = 200; } - while($blocks = array_splice($wordblocks,0,$chunksize)){ + while($blocks = array_splice($wordblocks, 0, $chunksize)) { $re = array(); // build regexp from blocks - foreach($blocks as $block){ - $block = preg_replace('/#.*$/','',$block); + foreach($blocks as $block) { + $block = preg_replace('/#.*$/', '', $block); $block = trim($block); if(empty($block)) continue; - $re[] = $block; + $re[] = $block; } - if(count($re) && preg_match('#('.join('|',$re).')#si',$text,$matches)) { + if(count($re) && preg_match('#('.join('|', $re).')#si', $text, $matches)) { // prepare event data - $data['matches'] = $matches; + $data['matches'] = $matches; $data['userinfo']['ip'] = $_SERVER['REMOTE_ADDR']; if($_SERVER['REMOTE_USER']) { $data['userinfo']['user'] = $_SERVER['REMOTE_USER']; @@ -590,42 +588,43 @@ function checkwordblock($text=''){ * a routable public address, prefering the ones suplied in the X * headers * - * @param boolean $single If set only a single IP is returned * @author Andreas Gohr <andi@splitbrain.org> + * @param boolean $single If set only a single IP is returned + * @return string */ -function clientIP($single=false){ - $ip = array(); +function clientIP($single = false) { + $ip = array(); $ip[] = $_SERVER['REMOTE_ADDR']; if(!empty($_SERVER['HTTP_X_FORWARDED_FOR'])) - $ip = array_merge($ip,explode(',',str_replace(' ','',$_SERVER['HTTP_X_FORWARDED_FOR']))); + $ip = array_merge($ip, explode(',', str_replace(' ', '', $_SERVER['HTTP_X_FORWARDED_FOR']))); if(!empty($_SERVER['HTTP_X_REAL_IP'])) - $ip = array_merge($ip,explode(',',str_replace(' ','',$_SERVER['HTTP_X_REAL_IP']))); + $ip = array_merge($ip, explode(',', str_replace(' ', '', $_SERVER['HTTP_X_REAL_IP']))); // some IPv4/v6 regexps borrowed from Feyd // see: http://forums.devnetwork.net/viewtopic.php?f=38&t=53479 - $dec_octet = '(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|[0-9])'; - $hex_digit = '[A-Fa-f0-9]'; - $h16 = "{$hex_digit}{1,4}"; + $dec_octet = '(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|[0-9])'; + $hex_digit = '[A-Fa-f0-9]'; + $h16 = "{$hex_digit}{1,4}"; $IPv4Address = "$dec_octet\\.$dec_octet\\.$dec_octet\\.$dec_octet"; - $ls32 = "(?:$h16:$h16|$IPv4Address)"; + $ls32 = "(?:$h16:$h16|$IPv4Address)"; $IPv6Address = "(?:(?:{$IPv4Address})|(?:". - "(?:$h16:){6}$ls32" . - "|::(?:$h16:){5}$ls32" . - "|(?:$h16)?::(?:$h16:){4}$ls32" . - "|(?:(?:$h16:){0,1}$h16)?::(?:$h16:){3}$ls32" . - "|(?:(?:$h16:){0,2}$h16)?::(?:$h16:){2}$ls32" . - "|(?:(?:$h16:){0,3}$h16)?::(?:$h16:){1}$ls32" . - "|(?:(?:$h16:){0,4}$h16)?::$ls32" . - "|(?:(?:$h16:){0,5}$h16)?::$h16" . - "|(?:(?:$h16:){0,6}$h16)?::" . - ")(?:\\/(?:12[0-8]|1[0-1][0-9]|[1-9][0-9]|[0-9]))?)"; + "(?:$h16:){6}$ls32". + "|::(?:$h16:){5}$ls32". + "|(?:$h16)?::(?:$h16:){4}$ls32". + "|(?:(?:$h16:){0,1}$h16)?::(?:$h16:){3}$ls32". + "|(?:(?:$h16:){0,2}$h16)?::(?:$h16:){2}$ls32". + "|(?:(?:$h16:){0,3}$h16)?::(?:$h16:){1}$ls32". + "|(?:(?:$h16:){0,4}$h16)?::$ls32". + "|(?:(?:$h16:){0,5}$h16)?::$h16". + "|(?:(?:$h16:){0,6}$h16)?::". + ")(?:\\/(?:12[0-8]|1[0-1][0-9]|[1-9][0-9]|[0-9]))?)"; // remove any non-IP stuff - $cnt = count($ip); + $cnt = count($ip); $match = array(); - for($i=0; $i<$cnt; $i++){ - if(preg_match("/^$IPv4Address$/",$ip[$i],$match) || preg_match("/^$IPv6Address$/",$ip[$i],$match)) { + for($i = 0; $i < $cnt; $i++) { + if(preg_match("/^$IPv4Address$/", $ip[$i], $match) || preg_match("/^$IPv6Address$/", $ip[$i], $match)) { $ip[$i] = $match[0]; } else { $ip[$i] = ''; @@ -635,14 +634,14 @@ function clientIP($single=false){ $ip = array_values(array_unique($ip)); if(!$ip[0]) $ip[0] = '0.0.0.0'; // for some strange reason we don't have a IP - if(!$single) return join(',',$ip); + if(!$single) return join(',', $ip); // decide which IP to use, trying to avoid local addresses $ip = array_reverse($ip); - foreach($ip as $i){ - if(preg_match('/^(::1|[fF][eE]80:|127\.|10\.|192\.168\.|172\.((1[6-9])|(2[0-9])|(3[0-1]))\.)/',$i)){ + foreach($ip as $i) { + if(preg_match('/^(::1|[fF][eE]80:|127\.|10\.|192\.168\.|172\.((1[6-9])|(2[0-9])|(3[0-1]))\.)/', $i)) { continue; - }else{ + } else { return $i; } } @@ -657,37 +656,42 @@ function clientIP($single=false){ * * @link http://www.brainhandles.com/2007/10/15/detecting-mobile-browsers/#code */ -function clientismobile(){ +function clientismobile() { if(isset($_SERVER['HTTP_X_WAP_PROFILE'])) return true; - if(preg_match('/wap\.|\.wap/i',$_SERVER['HTTP_ACCEPT'])) return true; + if(preg_match('/wap\.|\.wap/i', $_SERVER['HTTP_ACCEPT'])) return true; if(!isset($_SERVER['HTTP_USER_AGENT'])) return false; $uamatches = 'midp|j2me|avantg|docomo|novarra|palmos|palmsource|240x320|opwv|chtml|pda|windows ce|mmp\/|blackberry|mib\/|symbian|wireless|nokia|hand|mobi|phone|cdm|up\.b|audio|SIE\-|SEC\-|samsung|HTC|mot\-|mitsu|sagem|sony|alcatel|lg|erics|vx|NEC|philips|mmm|xx|panasonic|sharp|wap|sch|rover|pocket|benq|java|pt|pg|vox|amoi|bird|compal|kg|voda|sany|kdd|dbt|sendo|sgh|gradi|jb|\d\d\di|moto'; - if(preg_match("/$uamatches/i",$_SERVER['HTTP_USER_AGENT'])) return true; + if(preg_match("/$uamatches/i", $_SERVER['HTTP_USER_AGENT'])) return true; return false; } - /** * Convert one or more comma separated IPs to hostnames * + * If $conf['dnslookups'] is disabled it simply returns the input string + * * @author Glen Harris <astfgl@iamnota.org> - * @returns a comma separated list of hostnames + * @param string $ips comma separated list of IP addresses + * @return string a comma separated list of hostnames */ -function gethostsbyaddrs($ips){ +function gethostsbyaddrs($ips) { + global $conf; + if(!$conf['dnslookups']) return $ips; + $hosts = array(); - $ips = explode(',',$ips); + $ips = explode(',', $ips); if(is_array($ips)) { - foreach($ips as $ip){ + foreach($ips as $ip) { $hosts[] = gethostbyaddr(trim($ip)); } - return join(',',$hosts); + return join(',', $hosts); } else { return gethostbyaddr(trim($ips)); } @@ -700,7 +704,7 @@ function gethostsbyaddrs($ips){ * * @author Andreas Gohr <andi@splitbrain.org> */ -function checklock($id){ +function checklock($id) { global $conf; $lock = wikiLockFN($id); @@ -708,14 +712,14 @@ function checklock($id){ if(!@file_exists($lock)) return false; //lockfile expired - if((time() - filemtime($lock)) > $conf['locktime']){ + if((time() - filemtime($lock)) > $conf['locktime']) { @unlink($lock); return false; } //my own lock - list($ip,$session) = explode("\n",io_readFile($lock)); - if($ip == $_SERVER['REMOTE_USER'] || $ip == clientIP() || $session == session_id()){ + list($ip, $session) = explode("\n", io_readFile($lock)); + if($ip == $_SERVER['REMOTE_USER'] || $ip == clientIP() || $session == session_id()) { return false; } @@ -727,18 +731,18 @@ function checklock($id){ * * @author Andreas Gohr <andi@splitbrain.org> */ -function lock($id){ +function lock($id) { global $conf; - if($conf['locktime'] == 0){ + if($conf['locktime'] == 0) { return; } $lock = wikiLockFN($id); - if($_SERVER['REMOTE_USER']){ - io_saveFile($lock,$_SERVER['REMOTE_USER']); - }else{ - io_saveFile($lock,clientIP()."\n".session_id()); + if($_SERVER['REMOTE_USER']) { + io_saveFile($lock, $_SERVER['REMOTE_USER']); + } else { + io_saveFile($lock, clientIP()."\n".session_id()); } } @@ -746,13 +750,14 @@ function lock($id){ * Unlock a page if it was locked by the user * * @author Andreas Gohr <andi@splitbrain.org> + * @param string $id page id to unlock * @return bool true if a lock was removed */ -function unlock($id){ +function unlock($id) { $lock = wikiLockFN($id); - if(@file_exists($lock)){ - list($ip,$session) = explode("\n",io_readFile($lock)); - if($ip == $_SERVER['REMOTE_USER'] || $ip == clientIP() || $session == session_id()){ + if(@file_exists($lock)) { + list($ip, $session) = explode("\n", io_readFile($lock)); + if($ip == $_SERVER['REMOTE_USER'] || $ip == clientIP() || $session == session_id()) { @unlink($lock); return true; } @@ -766,8 +771,8 @@ function unlock($id){ * @see formText() for 2crlf conversion * @author Andreas Gohr <andi@splitbrain.org> */ -function cleanText($text){ - $text = preg_replace("/(\015\012)|(\015)/","\012",$text); +function cleanText($text) { + $text = preg_replace("/(\015\012)|(\015)/", "\012", $text); return $text; } @@ -779,8 +784,8 @@ function cleanText($text){ * @see cleanText() for 2unix conversion * @author Andreas Gohr <andi@splitbrain.org> */ -function formText($text){ - $text = str_replace("\012","\015\012",$text); +function formText($text) { + $text = str_replace("\012", "\015\012", $text); return htmlspecialchars($text); } @@ -789,8 +794,8 @@ function formText($text){ * * @author Andreas Gohr <andi@splitbrain.org> */ -function rawLocale($id){ - return io_readFile(localeFN($id)); +function rawLocale($id, $ext = 'txt') { + return io_readFile(localeFN($id, $ext)); } /** @@ -798,7 +803,7 @@ function rawLocale($id){ * * @author Andreas Gohr <andi@splitbrain.org> */ -function rawWiki($id,$rev=''){ +function rawWiki($id, $rev = '') { return io_readWikiPage(wikiFN($id, $rev), $id, $rev); } @@ -808,34 +813,33 @@ function rawWiki($id,$rev=''){ * @triggers COMMON_PAGETPL_LOAD * @author Andreas Gohr <andi@splitbrain.org> */ -function pageTemplate($id){ +function pageTemplate($id) { global $conf; - if (is_array($id)) $id = $id[0]; + if(is_array($id)) $id = $id[0]; // prepare initial event data $data = array( - 'id' => $id, // the id of the page to be created - 'tpl' => '', // the text used as template - 'tplfile' => '', // the file above text was/should be loaded from - 'doreplace' => true // should wildcard replacements be done on the text? + 'id' => $id, // the id of the page to be created + 'tpl' => '', // the text used as template + 'tplfile' => '', // the file above text was/should be loaded from + 'doreplace' => true // should wildcard replacements be done on the text? ); - $evt = new Doku_Event('COMMON_PAGETPL_LOAD',$data); - if($evt->advise_before(true)){ + $evt = new Doku_Event('COMMON_PAGETPL_LOAD', $data); + if($evt->advise_before(true)) { // the before event might have loaded the content already - if(empty($data['tpl'])){ + if(empty($data['tpl'])) { // if the before event did not set a template file, try to find one - if(empty($data['tplfile'])){ + if(empty($data['tplfile'])) { $path = dirname(wikiFN($id)); - $tpl = ''; - if(@file_exists($path.'/_template.txt')){ + if(@file_exists($path.'/_template.txt')) { $data['tplfile'] = $path.'/_template.txt'; - }else{ + } else { // search upper namespaces for templates - $len = strlen(rtrim($conf['datadir'],'/')); - while (strlen($path) >= $len){ - if(@file_exists($path.'/__template.txt')){ + $len = strlen(rtrim($conf['datadir'], '/')); + while(strlen($path) >= $len) { + if(@file_exists($path.'/__template.txt')) { $data['tplfile'] = $path.'/__template.txt'; break; } @@ -861,6 +865,12 @@ function pageTemplate($id){ * @author Andreas Gohr <andi@splitbrain.org> */ function parsePageTemplate(&$data) { + /** + * @var string $id the id of the page to be created + * @var string $tpl the text used as template + * @var string $tplfile the file above text was/should be loaded from + * @var bool $doreplace should wildcard replacements be done on the text? + */ extract($data); global $USERINFO; @@ -870,39 +880,41 @@ function parsePageTemplate(&$data) { $file = noNS($id); $page = strtr($file, $conf['sepchar'], ' '); - $tpl = str_replace(array( - '@ID@', - '@NS@', - '@FILE@', - '@!FILE@', - '@!FILE!@', - '@PAGE@', - '@!PAGE@', - '@!!PAGE@', - '@!PAGE!@', - '@USER@', - '@NAME@', - '@MAIL@', - '@DATE@', - ), - array( - $id, - getNS($id), - $file, - utf8_ucfirst($file), - utf8_strtoupper($file), - $page, - utf8_ucfirst($page), - utf8_ucwords($page), - utf8_strtoupper($page), - $_SERVER['REMOTE_USER'], - $USERINFO['name'], - $USERINFO['mail'], - $conf['dformat'], - ), $tpl); + $tpl = str_replace( + array( + '@ID@', + '@NS@', + '@FILE@', + '@!FILE@', + '@!FILE!@', + '@PAGE@', + '@!PAGE@', + '@!!PAGE@', + '@!PAGE!@', + '@USER@', + '@NAME@', + '@MAIL@', + '@DATE@', + ), + array( + $id, + getNS($id), + $file, + utf8_ucfirst($file), + utf8_strtoupper($file), + $page, + utf8_ucfirst($page), + utf8_ucwords($page), + utf8_strtoupper($page), + $_SERVER['REMOTE_USER'], + $USERINFO['name'], + $USERINFO['mail'], + $conf['dformat'], + ), $tpl + ); // we need the callback to work around strftime's char limit - $tpl = preg_replace_callback('/%./',create_function('$m','return strftime($m[0]);'),$tpl); + $tpl = preg_replace_callback('/%./', create_function('$m', 'return strftime($m[0]);'), $tpl); $data['tpl'] = $tpl; return $tpl; } @@ -917,17 +929,17 @@ function parsePageTemplate(&$data) { * * @author Andreas Gohr <andi@splitbrain.org> */ -function rawWikiSlices($range,$id,$rev=''){ +function rawWikiSlices($range, $id, $rev = '') { $text = io_readWikiPage(wikiFN($id, $rev), $id, $rev); // Parse range - list($from,$to) = explode('-',$range,2); + list($from, $to) = explode('-', $range, 2); // Make range zero-based, use defaults if marker is missing $from = !$from ? 0 : ($from - 1); $to = !$to ? strlen($text) : ($to - 1); $slices[0] = substr($text, 0, $from); - $slices[1] = substr($text, $from, $to-$from); + $slices[1] = substr($text, $from, $to - $from); $slices[2] = substr($text, $to); return $slices; } @@ -941,14 +953,16 @@ function rawWikiSlices($range,$id,$rev=''){ * * @author Andreas Gohr <andi@splitbrain.org> */ -function con($pre,$text,$suf,$pretty=false){ - if($pretty){ - if ($pre !== '' && substr($pre, -1) !== "\n" && - substr($text, 0, 1) !== "\n") { +function con($pre, $text, $suf, $pretty = false) { + if($pretty) { + if($pre !== '' && substr($pre, -1) !== "\n" && + substr($text, 0, 1) !== "\n" + ) { $pre .= "\n"; } - if ($suf !== '' && substr($text, -1) !== "\n" && - substr($suf, 0, 1) !== "\n") { + if($suf !== '' && substr($text, -1) !== "\n" && + substr($suf, 0, 1) !== "\n" + ) { $text .= "\n"; } } @@ -963,7 +977,7 @@ function con($pre,$text,$suf,$pretty=false){ * @author Andreas Gohr <andi@splitbrain.org> * @author Ben Coburn <btcoburn@silicodon.net> */ -function saveWikiText($id,$text,$summary,$minor=false){ +function saveWikiText($id, $text, $summary, $minor = false) { /* Note to developers: This code is subtle and delicate. Test the behavior of the attic and changelog with dokuwiki and external edits @@ -974,31 +988,31 @@ function saveWikiText($id,$text,$summary,$minor=false){ global $lang; global $REV; // ignore if no changes were made - if($text == rawWiki($id,'')){ + if($text == rawWiki($id, '')) { return; } - $file = wikiFN($id); - $old = @filemtime($file); // from page - $wasRemoved = (trim($text) == ''); // check for empty or whitespace only - $wasCreated = !@file_exists($file); - $wasReverted = ($REV==true); - $newRev = false; - $oldRev = getRevisions($id, -1, 1, 1024); // from changelog - $oldRev = (int)(empty($oldRev)?0:$oldRev[0]); - if(!@file_exists(wikiFN($id, $old)) && @file_exists($file) && $old>=$oldRev) { + $file = wikiFN($id); + $old = @filemtime($file); // from page + $wasRemoved = (trim($text) == ''); // check for empty or whitespace only + $wasCreated = !@file_exists($file); + $wasReverted = ($REV == true); + $newRev = false; + $oldRev = getRevisions($id, -1, 1, 1024); // from changelog + $oldRev = (int) (empty($oldRev) ? 0 : $oldRev[0]); + if(!@file_exists(wikiFN($id, $old)) && @file_exists($file) && $old >= $oldRev) { // add old revision to the attic if missing saveOldRevision($id); // add a changelog entry if this edit came from outside dokuwiki - if ($old>$oldRev) { - addLogEntry($old, $id, DOKU_CHANGE_TYPE_EDIT, $lang['external_edit'], '', array('ExternalEdit'=>true)); + if($old > $oldRev) { + addLogEntry($old, $id, DOKU_CHANGE_TYPE_EDIT, $lang['external_edit'], '', array('ExternalEdit'=> true)); // remove soon to be stale instructions $cache = new cache_instructions($id, $file); $cache->removeCache(); } } - if ($wasRemoved){ + if($wasRemoved) { // Send "update" event with empty data, so plugins can react to page deletion $data = array(array($file, '', false), getNS($id), noNS($id), false); trigger_event('IO_WIKIPAGE_WRITE', $data); @@ -1017,37 +1031,40 @@ function saveWikiText($id,$text,$summary,$minor=false){ // remove empty namespaces io_sweepNS($id, 'datadir'); io_sweepNS($id, 'mediadir'); - }else{ + } else { // save file (namespace dir is created in io_writeWikiPage) io_writeWikiPage($file, $text, $id); // pre-save the revision, to keep the attic in sync $newRev = saveOldRevision($id); - $del = false; + $del = false; } // select changelog line type $extra = ''; - $type = DOKU_CHANGE_TYPE_EDIT; - if ($wasReverted) { - $type = DOKU_CHANGE_TYPE_REVERT; + $type = DOKU_CHANGE_TYPE_EDIT; + if($wasReverted) { + $type = DOKU_CHANGE_TYPE_REVERT; $extra = $REV; - } - else if ($wasCreated) { $type = DOKU_CHANGE_TYPE_CREATE; } - else if ($wasRemoved) { $type = DOKU_CHANGE_TYPE_DELETE; } - else if ($minor && $conf['useacl'] && $_SERVER['REMOTE_USER']) { $type = DOKU_CHANGE_TYPE_MINOR_EDIT; } //minor edits only for logged in users + } else if($wasCreated) { + $type = DOKU_CHANGE_TYPE_CREATE; + } else if($wasRemoved) { + $type = DOKU_CHANGE_TYPE_DELETE; + } else if($minor && $conf['useacl'] && $_SERVER['REMOTE_USER']) { + $type = DOKU_CHANGE_TYPE_MINOR_EDIT; + } //minor edits only for logged in users addLogEntry($newRev, $id, $type, $summary, $extra); // send notify mails - notify($id,'admin',$old,$summary,$minor); - notify($id,'subscribers',$old,$summary,$minor); + notify($id, 'admin', $old, $summary, $minor); + notify($id, 'subscribers', $old, $summary, $minor); // update the purgefile (timestamp of the last time anything within the wiki was changed) - io_saveFile($conf['cachedir'].'/purgefile',time()); + io_saveFile($conf['cachedir'].'/purgefile', time()); // if useheading is enabled, purge the cache of all linking pages - if(useHeading('content')){ + if(useHeading('content')) { $pages = ft_backlinks($id); - foreach ($pages as $page) { + foreach($pages as $page) { $cache = new cache_renderer($page, wikiFN($page), 'xhtml'); $cache->removeCache(); } @@ -1060,12 +1077,12 @@ function saveWikiText($id,$text,$summary,$minor=false){ * * @author Andreas Gohr <andi@splitbrain.org> */ -function saveOldRevision($id){ +function saveOldRevision($id) { global $conf; $oldf = wikiFN($id); if(!@file_exists($oldf)) return ''; $date = filemtime($oldf); - $newf = wikiFN($id,$date); + $newf = wikiFN($id, $date); io_writeWikiPage($newf, rawWiki($id), $id, $date); return $date; } @@ -1073,88 +1090,97 @@ function saveOldRevision($id){ /** * Sends a notify mail on page change or registration * - * @param string $id The changed page - * @param string $who Who to notify (admin|subscribers|register) - * @param int $rev Old page revision - * @param string $summary What changed - * @param boolean $minor Is this a minor edit? - * @param array $replace Additional string substitutions, @KEY@ to be replaced by value + * @param string $id The changed page + * @param string $who Who to notify (admin|subscribers|register) + * @param int|string $rev Old page revision + * @param string $summary What changed + * @param boolean $minor Is this a minor edit? + * @param array $replace Additional string substitutions, @KEY@ to be replaced by value * + * @return bool * @author Andreas Gohr <andi@splitbrain.org> */ -function notify($id,$who,$rev='',$summary='',$minor=false,$replace=array()){ +function notify($id, $who, $rev = '', $summary = '', $minor = false, $replace = array()) { global $lang; global $conf; global $INFO; + global $DIFF_INLINESTYLES; - // decide if there is something to do - if($who == 'admin'){ - if(empty($conf['notify'])) return; //notify enabled? + // decide if there is something to do, eg. whom to mail + if($who == 'admin') { + if(empty($conf['notify'])) return false; //notify enabled? $text = rawLocale('mailtext'); $to = $conf['notify']; $bcc = ''; - }elseif($who == 'subscribers'){ - if(!$conf['subscribers']) return; //subscribers enabled? - if($conf['useacl'] && $_SERVER['REMOTE_USER'] && $minor) return; //skip minors + } elseif($who == 'subscribers') { + if(!$conf['subscribers']) return false; //subscribers enabled? + if($conf['useacl'] && $_SERVER['REMOTE_USER'] && $minor) return false; //skip minors $data = array('id' => $id, 'addresslist' => '', 'self' => false); - trigger_event('COMMON_NOTIFY_ADDRESSLIST', $data, - 'subscription_addresslist'); + trigger_event( + 'COMMON_NOTIFY_ADDRESSLIST', $data, + 'subscription_addresslist' + ); $bcc = $data['addresslist']; - if(empty($bcc)) return; + if(empty($bcc)) return false; $to = ''; $text = rawLocale('subscr_single'); - }elseif($who == 'register'){ - if(empty($conf['registernotify'])) return; + } elseif($who == 'register') { + if(empty($conf['registernotify'])) return false; $text = rawLocale('registermail'); $to = $conf['registernotify']; $bcc = ''; - }else{ - return; //just to be safe + } else { + return false; //just to be safe } - $ip = clientIP(); - $text = str_replace('@DATE@',dformat(),$text); - $text = str_replace('@BROWSER@',$_SERVER['HTTP_USER_AGENT'],$text); - $text = str_replace('@IPADDRESS@',$ip,$text); - $text = str_replace('@HOSTNAME@',gethostsbyaddrs($ip),$text); - $text = str_replace('@NEWPAGE@',wl($id,'',true,'&'),$text); - $text = str_replace('@PAGE@',$id,$text); - $text = str_replace('@TITLE@',$conf['title'],$text); - $text = str_replace('@DOKUWIKIURL@',DOKU_URL,$text); - $text = str_replace('@SUMMARY@',$summary,$text); - $text = str_replace('@USER@',$_SERVER['REMOTE_USER'],$text); - $text = str_replace('@NAME@',$INFO['userinfo']['name'],$text); - $text = str_replace('@MAIL@',$INFO['userinfo']['mail'],$text); - - foreach ($replace as $key => $substitution) { - $text = str_replace('@'.strtoupper($key).'@',$substitution, $text); - } + // prepare replacements (keys not set in hrep will be taken from trep) + $trep = array( + 'NEWPAGE' => wl($id, '', true, '&'), + 'PAGE' => $id, + 'SUMMARY' => $summary + ); + $trep = array_merge($trep, $replace); + $hrep = array(); - if($who == 'register'){ + // prepare content + if($who == 'register') { $subject = $lang['mail_new_user'].' '.$summary; - }elseif($rev){ - $subject = $lang['mail_changed'].' '.$id; - $text = str_replace('@OLDPAGE@',wl($id,"rev=$rev",true,'&'),$text); - $df = new Diff(explode("\n",rawWiki($id,$rev)), - explode("\n",rawWiki($id))); - $dformat = new UnifiedDiffFormatter(); - $diff = $dformat->format($df); - }else{ - $subject=$lang['mail_newpage'].' '.$id; - $text = str_replace('@OLDPAGE@','none',$text); - $diff = rawWiki($id); - } - $text = str_replace('@DIFF@',$diff,$text); - if(empty($conf['mailprefix'])) { - if(utf8_strlen($conf['title']) < 20) { - $subject = '['.$conf['title'].'] '.$subject; - }else{ - $subject = '['.utf8_substr($conf['title'], 0, 20).'...] '.$subject; - } - }else{ - $subject = '['.$conf['mailprefix'].'] '.$subject; - } - mail_send($to,$subject,$text,$conf['mailfrom'],'',$bcc); + } elseif($rev) { + $subject = $lang['mail_changed'].' '.$id; + $trep['OLDPAGE'] = wl($id, "rev=$rev", true, '&'); + $df = new Diff(explode("\n", rawWiki($id, $rev)), + explode("\n", rawWiki($id))); + $dformat = new UnifiedDiffFormatter(); + $tdiff = $dformat->format($df); + + $DIFF_INLINESTYLES = true; + $dformat = new InlineDiffFormatter(); + $hdiff = $dformat->format($df); + $hdiff = '<table>'.$hdiff.'</table>'; + $DIFF_INLINESTYLES = false; + } else { + $subject = $lang['mail_newpage'].' '.$id; + $trep['OLDPAGE'] = '---'; + $tdiff = rawWiki($id); + $hdiff = nl2br(hsc($tdiff)); + } + $trep['DIFF'] = $tdiff; + $hrep['DIFF'] = $hdiff; + + // send mail + $mail = new Mailer(); + $mail->to($to); + $mail->bcc($bcc); + $mail->subject($subject); + $mail->setBody($text, $trep, $hrep); + if($who == 'subscribers') { + $mail->setHeader( + 'List-Unsubscribe', + '<'.wl($id, array('do'=> 'subscribe'), true, '&').'>', + false + ); + } + return $mail->send(); } /** @@ -1163,8 +1189,8 @@ function notify($id,$who,$rev='',$summary='',$minor=false,$replace=array()){ * @author Andreas Gohr <andi@splitbrain.org> * @author Todd Augsburger <todd@rollerorgans.com> */ -function getGoogleQuery(){ - if (!isset($_SERVER['HTTP_REFERER'])) { +function getGoogleQuery() { + if(!isset($_SERVER['HTTP_REFERER'])) { return ''; } $url = parse_url($_SERVER['HTTP_REFERER']); @@ -1174,21 +1200,21 @@ function getGoogleQuery(){ // temporary workaround against PHP bug #49733 // see http://bugs.php.net/bug.php?id=49733 if(UTF8_MBSTRING) $enc = mb_internal_encoding(); - parse_str($url['query'],$query); + parse_str($url['query'], $query); if(UTF8_MBSTRING) mb_internal_encoding($enc); $q = ''; if(isset($query['q'])) - $q = $query['q']; // google, live/msn, aol, ask, altavista, alltheweb, gigablast + $q = $query['q']; // google, live/msn, aol, ask, altavista, alltheweb, gigablast elseif(isset($query['p'])) - $q = $query['p']; // yahoo + $q = $query['p']; // yahoo elseif(isset($query['query'])) - $q = $query['query']; // lycos, netscape, clusty, hotbot - elseif(preg_match("#a9\.com#i",$url['host'])) // a9 - $q = urldecode(ltrim($url['path'],'/')); + $q = $query['query']; // lycos, netscape, clusty, hotbot + elseif(preg_match("#a9\.com#i", $url['host'])) // a9 + $q = urldecode(ltrim($url['path'], '/')); if($q === '') return ''; - $q = preg_split('/[\s\'"\\\\`()\]\[?:!\.{};,#+*<>\\/]+/',$q,-1,PREG_SPLIT_NO_EMPTY); + $q = preg_split('/[\s\'"\\\\`()\]\[?:!\.{};,#+*<>\\/]+/', $q, -1, PREG_SPLIT_NO_EMPTY); return $q; } @@ -1198,19 +1224,19 @@ function getGoogleQuery(){ * @deprecated No longer used * @author Andreas Gohr <andi@splitbrain.org> */ -function setCorrectLocale(){ +function setCorrectLocale() { global $conf; global $lang; $enc = strtoupper($lang['encoding']); - foreach ($lang['locales'] as $loc){ + foreach($lang['locales'] as $loc) { //try locale - if(@setlocale(LC_ALL,$loc)) return; + if(@setlocale(LC_ALL, $loc)) return; //try loceale with encoding - if(@setlocale(LC_ALL,"$loc.$enc")) return; + if(@setlocale(LC_ALL, "$loc.$enc")) return; } //still here? try to set from environment - @setlocale(LC_ALL,""); + @setlocale(LC_ALL, ""); } /** @@ -1222,17 +1248,17 @@ function setCorrectLocale(){ * @author Aidan Lister <aidan@php.net> * @version 1.0.0 */ -function filesize_h($size, $dec = 1){ +function filesize_h($size, $dec = 1) { $sizes = array('B', 'KB', 'MB', 'GB'); $count = count($sizes); - $i = 0; + $i = 0; - while ($size >= 1024 && ($i < $count - 1)) { + while($size >= 1024 && ($i < $count - 1)) { $size /= 1024; $i++; } - return round($size, $dec) . ' ' . $sizes[$i]; + return round($size, $dec).' '.$sizes[$i]; } /** @@ -1240,27 +1266,27 @@ function filesize_h($size, $dec = 1){ * * @author Andreas Gohr <gohr@cosmocode.de> */ -function datetime_h($dt){ +function datetime_h($dt) { global $lang; $ago = time() - $dt; - if($ago > 24*60*60*30*12*2){ - return sprintf($lang['years'], round($ago/(24*60*60*30*12))); + if($ago > 24 * 60 * 60 * 30 * 12 * 2) { + return sprintf($lang['years'], round($ago / (24 * 60 * 60 * 30 * 12))); } - if($ago > 24*60*60*30*2){ - return sprintf($lang['months'], round($ago/(24*60*60*30))); + if($ago > 24 * 60 * 60 * 30 * 2) { + return sprintf($lang['months'], round($ago / (24 * 60 * 60 * 30))); } - if($ago > 24*60*60*7*2){ - return sprintf($lang['weeks'], round($ago/(24*60*60*7))); + if($ago > 24 * 60 * 60 * 7 * 2) { + return sprintf($lang['weeks'], round($ago / (24 * 60 * 60 * 7))); } - if($ago > 24*60*60*2){ - return sprintf($lang['days'], round($ago/(24*60*60))); + if($ago > 24 * 60 * 60 * 2) { + return sprintf($lang['days'], round($ago / (24 * 60 * 60))); } - if($ago > 60*60*2){ - return sprintf($lang['hours'], round($ago/(60*60))); + if($ago > 60 * 60 * 2) { + return sprintf($lang['hours'], round($ago / (60 * 60))); } - if($ago > 60*2){ - return sprintf($lang['minutes'], round($ago/(60))); + if($ago > 60 * 2) { + return sprintf($lang['minutes'], round($ago / (60))); } return sprintf($lang['seconds'], $ago); } @@ -1274,15 +1300,15 @@ function datetime_h($dt){ * @see datetime_h * @author Andreas Gohr <gohr@cosmocode.de> */ -function dformat($dt=null,$format=''){ +function dformat($dt = null, $format = '') { global $conf; if(is_null($dt)) $dt = time(); $dt = (int) $dt; if(!$format) $format = $conf['dformat']; - $format = str_replace('%f',datetime_h($dt),$format); - return strftime($format,$dt); + $format = str_replace('%f', datetime_h($dt), $format); + return strftime($format, $dt); } /** @@ -1291,11 +1317,12 @@ function dformat($dt=null,$format=''){ * @author <ungu at terong dot com> * @link http://www.php.net/manual/en/function.date.php#54072 * @param int $int_date: current date in UNIX timestamp + * @return string */ function date_iso8601($int_date) { - $date_mod = date('Y-m-d\TH:i:s', $int_date); + $date_mod = date('Y-m-d\TH:i:s', $int_date); $pre_timezone = date('O', $int_date); - $time_zone = substr($pre_timezone, 0, 3).":".substr($pre_timezone, 3, 2); + $time_zone = substr($pre_timezone, 0, 3).":".substr($pre_timezone, 3, 2); $date_mod .= $time_zone; return $date_mod; } @@ -1309,16 +1336,16 @@ function date_iso8601($int_date) { function obfuscate($email) { global $conf; - switch ($conf['mailguard']) { + switch($conf['mailguard']) { case 'visible' : $obfuscate = array('@' => ' [at] ', '.' => ' [dot] ', '-' => ' [dash] '); return strtr($email, $obfuscate); case 'hex' : $encode = ''; - $len = strlen($email); - for ($x=0; $x < $len; $x++){ - $encode .= '&#x' . bin2hex($email{$x}).';'; + $len = strlen($email); + for($x = 0; $x < $len; $x++) { + $encode .= '&#x'.bin2hex($email{$x}).';'; } return $encode; @@ -1333,8 +1360,8 @@ function obfuscate($email) { * * @author Andreas Gohr <andi@splitbrain.org> */ -function unslash($string,$char="'"){ - return str_replace('\\'.$char,$char,$string); +function unslash($string, $char = "'") { + return str_replace('\\'.$char, $char, $string); } /** @@ -1343,10 +1370,10 @@ function unslash($string,$char="'"){ * @author <gilthans dot NO dot SPAM at gmail dot com> * @link http://de3.php.net/manual/en/ini.core.php#79564 */ -function php_to_byte($v){ - $l = substr($v, -1); +function php_to_byte($v) { + $l = substr($v, -1); $ret = substr($v, 0, -1); - switch(strtoupper($l)){ + switch(strtoupper($l)) { case 'P': $ret *= 1024; case 'T': @@ -1357,10 +1384,10 @@ function php_to_byte($v){ $ret *= 1024; case 'K': $ret *= 1024; - break; + break; default; $ret *= 10; - break; + break; } return $ret; } @@ -1368,8 +1395,8 @@ function php_to_byte($v){ /** * Wrapper around preg_quote adding the default delimiter */ -function preg_quote_cb($string){ - return preg_quote($string,'/'); +function preg_quote_cb($string) { + return preg_quote($string, '/'); } /** @@ -1385,14 +1412,15 @@ function preg_quote_cb($string){ * @param int $max maximum chars you want for the whole string * @param int $min minimum number of chars to have left for middle shortening * @param string $char the shortening character to use + * @return string */ -function shorten($keep,$short,$max,$min=9,$char='…'){ +function shorten($keep, $short, $max, $min = 9, $char = '…') { $max = $max - utf8_strlen($keep); if($max < $min) return $keep; $len = utf8_strlen($short); if($len <= $max) return $keep.$short; - $half = floor($max/2); - return $keep.utf8_substr($short,0,$half-1).$char.utf8_substr($short,$len-$half); + $half = floor($max / 2); + return $keep.utf8_substr($short, 0, $half - 1).$char.utf8_substr($short, $len - $half); } /** @@ -1401,11 +1429,11 @@ function shorten($keep,$short,$max,$min=9,$char='…'){ * * @author Andy Webber <dokuwiki AT andywebber DOT com> */ -function editorinfo($username){ +function editorinfo($username) { global $conf; global $auth; - switch($conf['showuseras']){ + switch($conf['showuseras']) { case 'username': case 'email': case 'email_link': @@ -1416,13 +1444,13 @@ function editorinfo($username){ } if(isset($info) && $info) { - switch($conf['showuseras']){ + switch($conf['showuseras']) { case 'username': return hsc($info['name']); case 'email': return obfuscate($info['mail']); case 'email_link': - $mail=obfuscate($info['mail']); + $mail = obfuscate($info['mail']); return '<a href="mailto:'.$mail.'">'.$mail.'</a>'; default: return hsc($username); @@ -1438,20 +1466,21 @@ function editorinfo($username){ * * @author Andreas Gohr <andi@splitbrain.org> * @param string $type - type of image 'badge' or 'button' + * @return string */ -function license_img($type){ +function license_img($type) { global $license; global $conf; if(!$conf['license']) return ''; if(!is_array($license[$conf['license']])) return ''; - $lic = $license[$conf['license']]; - $try = array(); + $lic = $license[$conf['license']]; + $try = array(); $try[] = 'lib/images/license/'.$type.'/'.$conf['license'].'.png'; $try[] = 'lib/images/license/'.$type.'/'.$conf['license'].'.gif'; - if(substr($conf['license'],0,3) == 'cc-'){ + if(substr($conf['license'], 0, 3) == 'cc-') { $try[] = 'lib/images/license/'.$type.'/cc.png'; } - foreach($try as $src){ + foreach($try as $src) { if(@file_exists(DOKU_INC.$src)) return $src; } return ''; @@ -1463,12 +1492,15 @@ function license_img($type){ * If the memory_get_usage() function is not available the * function just assumes $bytes of already allocated memory * - * @param int $mem Size of memory you want to allocate in bytes - * @param int $used already allocated memory (see above) * @author Filip Oscadal <webmaster@illusionsoftworks.cz> * @author Andreas Gohr <andi@splitbrain.org> + * + * @param int $mem Size of memory you want to allocate in bytes + * @param int $bytes + * @internal param int $used already allocated memory (see above) + * @return bool */ -function is_mem_available($mem,$bytes=1048576){ +function is_mem_available($mem, $bytes = 1048576) { $limit = trim(ini_get('memory_limit')); if(empty($limit)) return true; // no limit set! @@ -1476,13 +1508,13 @@ function is_mem_available($mem,$bytes=1048576){ $limit = php_to_byte($limit); // get used memory if possible - if(function_exists('memory_get_usage')){ + if(function_exists('memory_get_usage')) { $used = memory_get_usage(); - }else{ + } else { $used = $bytes; } - if($used+$mem > $limit){ + if($used + $mem > $limit) { return false; } @@ -1497,10 +1529,10 @@ function is_mem_available($mem,$bytes=1048576){ * @link http://support.microsoft.com/kb/q176113/ * @author Andreas Gohr <andi@splitbrain.org> */ -function send_redirect($url){ +function send_redirect($url) { //are there any undisplayed messages? keep them in session for display global $MSG; - if (isset($MSG) && count($MSG) && !defined('NOSESSION')){ + if(isset($MSG) && count($MSG) && !defined('NOSESSION')) { //reopen session, store data and close session again @session_start(); $_SESSION[DOKU_COOKIE]['msg'] = $MSG; @@ -1511,22 +1543,23 @@ function send_redirect($url){ // work around IE bug // http://www.ianhoar.com/2008/11/16/internet-explorer-6-and-redirected-anchor-links/ - list($url,$hash) = explode('#',$url); - if($hash){ - if(strpos($url,'?')){ + list($url, $hash) = explode('#', $url); + if($hash) { + if(strpos($url, '?')) { $url = $url.'&#'.$hash; - }else{ + } else { $url = $url.'?&#'.$hash; } } // check if running on IIS < 6 with CGI-PHP - if( isset($_SERVER['SERVER_SOFTWARE']) && isset($_SERVER['GATEWAY_INTERFACE']) && - (strpos($_SERVER['GATEWAY_INTERFACE'],'CGI') !== false) && + if(isset($_SERVER['SERVER_SOFTWARE']) && isset($_SERVER['GATEWAY_INTERFACE']) && + (strpos($_SERVER['GATEWAY_INTERFACE'], 'CGI') !== false) && (preg_match('|^Microsoft-IIS/(\d)\.\d$|', trim($_SERVER['SERVER_SOFTWARE']), $matches)) && - $matches[1] < 6 ){ + $matches[1] < 6 + ) { header('Refresh: 0;url='.$url); - }else{ + } else { header('Location: '.$url); } exit; @@ -1546,12 +1579,14 @@ function send_redirect($url){ * or $_GET) * @param string $exc The text of the raised exception * + * @throws Exception + * @return mixed * @author Adrian Lang <lang@cosmocode.de> */ function valid_input_set($param, $valid_values, $array, $exc = '') { - if (isset($array[$param]) && in_array($array[$param], $valid_values)) { + if(isset($array[$param]) && in_array($array[$param], $valid_values)) { return $array[$param]; - } elseif (isset($valid_values['default'])) { + } elseif(isset($valid_values['default'])) { return $valid_values['default']; } else { throw new Exception($exc); @@ -1562,12 +1597,12 @@ function valid_input_set($param, $valid_values, $array, $exc = '') { * Read a preference from the DokuWiki cookie */ function get_doku_pref($pref, $default) { - if (strpos($_COOKIE['DOKU_PREFS'], $pref) !== false) { + if(strpos($_COOKIE['DOKU_PREFS'], $pref) !== false) { $parts = explode('#', $_COOKIE['DOKU_PREFS']); $cnt = count($parts); - for ($i = 0; $i < $cnt; $i+=2){ - if ($parts[$i] == $pref) { - return $parts[$i+1]; + for($i = 0; $i < $cnt; $i += 2) { + if($parts[$i] == $pref) { + return $parts[$i + 1]; } } } diff --git a/inc/config_cascade.php b/inc/config_cascade.php index 79567fc56aa60d26205ea5902a9d933dadebb83e..e4a3df353bbf9c5ca6c576eb5c3ed0894bed9a57 100644 --- a/inc/config_cascade.php +++ b/inc/config_cascade.php @@ -66,6 +66,7 @@ $config_cascade = array_merge( ), 'plugins' => array( + 'default' => array(DOKU_CONF.'plugins.php'), 'local' => array(DOKU_CONF.'plugins.local.php'), 'protected' => array( DOKU_CONF.'plugins.required.php', diff --git a/inc/events.php b/inc/events.php index 621cb64c1e289e0436d38098cafc118485b8468b..4e81f85c8a0783b87bb7a51d9f86380c86ad06f1 100644 --- a/inc/events.php +++ b/inc/events.php @@ -149,8 +149,8 @@ class Doku_Event_Handler { * @param $method (function) event handler function * @param $param (mixed) data passed to the event handler */ - function register_hook($event, $advise, &$obj, $method, $param=null) { - $this->_hooks[$event.'_'.$advise][] = array(&$obj, $method, $param); + function register_hook($event, $advise, $obj, $method, $param=null) { + $this->_hooks[$event.'_'.$advise][] = array($obj, $method, $param); } function process_event(&$event,$advise='') { @@ -158,8 +158,7 @@ class Doku_Event_Handler { $evt_name = $event->name . ($advise ? '_'.$advise : '_BEFORE'); if (!empty($this->_hooks[$evt_name])) { - $hook = reset($this->_hooks[$evt_name]); - do { + foreach ($this->_hooks[$evt_name] as $hook) { // list($obj, $method, $param) = $hook; $obj =& $hook[0]; $method = $hook[1]; @@ -171,7 +170,8 @@ class Doku_Event_Handler { $obj->$method($event, $param); } - } while ($event->_continue && $hook = next($this->_hooks[$evt_name])); + if (!$event->_continue) break; + } } } } diff --git a/inc/fulltext.php b/inc/fulltext.php index 62023729679949a7c10e1cd0a4c1dc62a2871793..8f4db111d1f61a6bca6e8db3d8a4c47d67215bed 100644 --- a/inc/fulltext.php +++ b/inc/fulltext.php @@ -405,6 +405,8 @@ function ft_snippet_re_preprocess($term) { }else{ $term = $term.'\b'; } + + if($term == '\b' || $term == '\b\b') $term = ''; return $term; } diff --git a/inc/geshi.php b/inc/geshi.php index 31d2da49fc06fcb8e2b2b4aef49f1a73b37fc2a9..aedc64f84570f74628596cb7a2cd0242be2b61d2 100644 --- a/inc/geshi.php +++ b/inc/geshi.php @@ -41,7 +41,7 @@ // /** The version of this GeSHi file */ -define('GESHI_VERSION', '1.0.8.8'); +define('GESHI_VERSION', '1.0.8.10'); // Define the root directory for the GeSHi code tree if (!defined('GESHI_ROOT')) { @@ -209,12 +209,16 @@ define('GESHI_NUMBER_BIN_PREFIX_0B', 64); //0b[01]+ define('GESHI_NUMBER_OCT_PREFIX', 256); //0[0-7]+ /** Number format to highlight octal numbers with a prefix 0o (logtalk) */ define('GESHI_NUMBER_OCT_PREFIX_0O', 512); //0[0-7]+ +/** Number format to highlight octal numbers with a leading @ (Used in HiSofts Devpac series). */ +define('GESHI_NUMBER_OCT_PREFIX_AT', 1024); //@[0-7]+ /** Number format to highlight octal numbers with a suffix of o */ -define('GESHI_NUMBER_OCT_SUFFIX', 1024); //[0-7]+[oO] +define('GESHI_NUMBER_OCT_SUFFIX', 2048); //[0-7]+[oO] /** Number format to highlight hex numbers with a prefix 0x */ define('GESHI_NUMBER_HEX_PREFIX', 4096); //0x[0-9a-fA-F]+ +/** Number format to highlight hex numbers with a prefix $ */ +define('GESHI_NUMBER_HEX_PREFIX_DOLLAR', 8192); //$[0-9a-fA-F]+ /** Number format to highlight hex numbers with a suffix of h */ -define('GESHI_NUMBER_HEX_SUFFIX', 8192); //[0-9][0-9a-fA-F]*h +define('GESHI_NUMBER_HEX_SUFFIX', 16384); //[0-9][0-9a-fA-F]*h /** Number format to highlight floating-point numbers without support for scientific notation */ define('GESHI_NUMBER_FLT_NONSCI', 65536); //\d+\.\d+ /** Number format to highlight floating-point numbers without support for scientific notation */ @@ -731,6 +735,88 @@ class GeSHi { } } + /** + * Get supported langs or an associative array lang=>full_name. + * @param boolean $longnames + * @return array + */ + function get_supported_languages($full_names=false) + { + // return array + $back = array(); + + // we walk the lang root + $dir = dir($this->language_path); + + // foreach entry + while (false !== ($entry = $dir->read())) + { + $full_path = $this->language_path.$entry; + + // Skip all dirs + if (is_dir($full_path)) { + continue; + } + + // we only want lang.php files + if (!preg_match('/^([^.]+)\.php$/', $entry, $matches)) { + continue; + } + + // Raw lang name is here + $langname = $matches[1]; + + // We want the fullname too? + if ($full_names === true) + { + if (false !== ($fullname = $this->get_language_fullname($langname))) + { + $back[$langname] = $fullname; // we go associative + } + } + else + { + // just store raw langname + $back[] = $langname; + } + } + + $dir->close(); + + return $back; + } + + /** + * Get full_name for a lang or false. + * @param string $language short langname (html4strict for example) + * @return mixed + */ + function get_language_fullname($language) + { + //Clean up the language name to prevent malicious code injection + $language = preg_replace('#[^a-zA-Z0-9\-_]#', '', $language); + + $language = strtolower($language); + + // get fullpath-filename for a langname + $fullpath = $this->language_path.$language.'.php'; + + // we need to get contents :S + if (false === ($data = file_get_contents($fullpath))) { + $this->error = sprintf('Geshi::get_lang_fullname() Unknown Language: %s', $language); + return false; + } + + // match the langname + if (!preg_match('/\'LANG_NAME\'\s*=>\s*\'((?:[^\']|\\\')+)\'/', $data, $matches)) { + $this->error = sprintf('Geshi::get_lang_fullname(%s): Regex can not detect language', $language); + return false; + } + + // return fullname for langname + return stripcslashes($matches[1]); + } + /** * Sets the type of header to be used. * @@ -1353,6 +1439,10 @@ class GeSHi { function get_language_name_from_extension( $extension, $lookup = array() ) { if ( !is_array($lookup) || empty($lookup)) { $lookup = array( + '6502acme' => array( 'a', 's', 'asm', 'inc' ), + '6502tasm' => array( 'a', 's', 'asm', 'inc' ), + '6502kickass' => array( 'a', 's', 'asm', 'inc' ), + '68000devpac' => array( 'a', 's', 'asm', 'inc' ), 'abap' => array('abap'), 'actionscript' => array('as'), 'ada' => array('a', 'ada', 'adb', 'ads'), @@ -1971,7 +2061,7 @@ class GeSHi { //All this formats are matched case-insensitively! static $numbers_format = array( GESHI_NUMBER_INT_BASIC => - '(?:(?<![0-9a-z_\.%])|(?<=\.\.))(?<![\d\.]e[+\-])([1-9]\d*?|0)(?![0-9a-z]|\.(?:[eE][+\-]?)?\d)', + '(?:(?<![0-9a-z_\.%$@])|(?<=\.\.))(?<![\d\.]e[+\-])([1-9]\d*?|0)(?![0-9a-z]|\.(?:[eE][+\-]?)?\d)', GESHI_NUMBER_INT_CSTYLE => '(?<![0-9a-z_\.%])(?<![\d\.]e[+\-])([1-9]\d*?|0)l(?![0-9a-z]|\.(?:[eE][+\-]?)?\d)', GESHI_NUMBER_BIN_SUFFIX => @@ -1984,10 +2074,14 @@ class GeSHi { '(?<![0-9a-z_\.])(?<![\d\.]e[+\-])0[0-7]+?(?![0-9a-z]|\.(?:[eE][+\-]?)?\d)', GESHI_NUMBER_OCT_PREFIX_0O => '(?<![0-9a-z_\.%])(?<![\d\.]e[+\-])0o[0-7]+?(?![0-9a-z]|\.(?:[eE][+\-]?)?\d)', + GESHI_NUMBER_OCT_PREFIX_AT => + '(?<![0-9a-z_\.%])(?<![\d\.]e[+\-])\@[0-7]+?(?![0-9a-z]|\.(?:[eE][+\-]?)?\d)', GESHI_NUMBER_OCT_SUFFIX => '(?<![0-9a-z_\.])(?<![\d\.]e[+\-])[0-7]+?o(?![0-9a-z]|\.(?:[eE][+\-]?)?\d)', GESHI_NUMBER_HEX_PREFIX => '(?<![0-9a-z_\.])(?<![\d\.]e[+\-])0x[0-9a-fA-F]+?(?![0-9a-z]|\.(?:[eE][+\-]?)?\d)', + GESHI_NUMBER_HEX_PREFIX_DOLLAR => + '(?<![0-9a-z_\.])(?<![\d\.]e[+\-])\$[0-9a-fA-F]+?(?![0-9a-z]|\.(?:[eE][+\-]?)?\d)', GESHI_NUMBER_HEX_SUFFIX => '(?<![0-9a-z_\.])(?<![\d\.]e[+\-])\d[0-9a-fA-F]*?[hH](?![0-9a-z]|\.(?:[eE][+\-]?)?\d)', GESHI_NUMBER_FLT_NONSCI => @@ -2021,6 +2115,10 @@ class GeSHi { $this->language_data['NUMBERS_RXCACHE'][$key] = "/(?<!<\|\/)(?<!<\|!REG3XP)(?<!<\|\/NUM!)(?<!\d\/>)($regexp)(?!(?:<DOT>|(?>[^\<]))+>)(?![^<]*>)(?!\|>)(?!\/>)/i"; // } + + if(!isset($this->language_data['PARSER_CONTROL']['NUMBERS']['PRECHECK_RX'])) { + $this->language_data['PARSER_CONTROL']['NUMBERS']['PRECHECK_RX'] = '#\d#'; + } } $this->parse_cache_built = true; @@ -3241,7 +3339,7 @@ class GeSHi { $stuff_to_parse = ' ' . $this->hsc($stuff_to_parse); // Highlight keywords - $disallowed_before = "(?<![a-zA-Z0-9\$_\|\#;>|^&"; + $disallowed_before = "(?<![a-zA-Z0-9\$_\|\#|^&"; $disallowed_after = "(?![a-zA-Z0-9_\|%\\-&;"; if ($this->lexic_permissions['STRINGS']) { $quotemarks = preg_quote(implode($this->language_data['QUOTEMARKS']), '/'); @@ -3299,7 +3397,7 @@ class GeSHi { // Basically, we don't put the styles in yet because then the styles themselves will // get highlighted if the language has a CSS keyword in it (like CSS, for example ;)) $stuff_to_parse = preg_replace_callback( - "/$disallowed_before_local({$keywordset})(?!\<DOT\>(?:htm|php))$disallowed_after_local/$modifiers", + "/$disallowed_before_local({$keywordset})(?!\<DOT\>(?:htm|php|aspx?))$disallowed_after_local/$modifiers", array($this, 'handle_keyword_replace'), $stuff_to_parse ); @@ -3346,7 +3444,8 @@ class GeSHi { // Highlight numbers. As of 1.0.8 we support different types of numbers $numbers_found = false; - if ($this->lexic_permissions['NUMBERS'] && preg_match('#\d#', $stuff_to_parse )) { + + if ($this->lexic_permissions['NUMBERS'] && preg_match($this->language_data['PARSER_CONTROL']['NUMBERS']['PRECHECK_RX'], $stuff_to_parse )) { $numbers_found = true; //For each of the formats ... @@ -4465,7 +4564,7 @@ class GeSHi { * @access private */ function optimize_regexp_list($list, $regexp_delimiter = '/') { - $regex_chars = array('.', '\\', '+', '*', '?', '[', '^', ']', '$', + $regex_chars = array('.', '\\', '+', '-', '*', '?', '[', '^', ']', '$', '(', ')', '{', '}', '=', '!', '<', '>', '|', ':', $regexp_delimiter); sort($list); $regexp_list = array(''); diff --git a/inc/geshi/4cs.php b/inc/geshi/4cs.php index 48b671f4ae09267d32cad1030d7aa1141b924963..7b1efec9a253222c5c9e28b164c21ce0ea6a53d0 100644 --- a/inc/geshi/4cs.php +++ b/inc/geshi/4cs.php @@ -4,7 +4,7 @@ * ------ * Author: Jason Curl (jason.curl@continental-corporation.com) * Copyright: (c) 2009 Jason Curl - * Release Version: 1.0.8.8 + * Release Version: 1.0.8.10 * Date Started: 2009/09/05 * * 4CS language file for GeSHi. diff --git a/inc/geshi/6502acme.php b/inc/geshi/6502acme.php new file mode 100644 index 0000000000000000000000000000000000000000..880211d5b06ac9d018e9a7d8f7d81a8fddbfa32d --- /dev/null +++ b/inc/geshi/6502acme.php @@ -0,0 +1,230 @@ +<?php +/************************************************************************************* + * 6502acme.php + * ------- + * Author: Warren Willmey + * Copyright: (c) 2010 Warren Willmey. + * Release Version: 1.0.8.10 + * Date Started: 2010/05/26 + * + * MOS 6502 (more specifically 6510) ACME Cross Assembler 0.93 by Marco Baye language file for GeSHi. + * + * CHANGES + * ------- + * 2010/07/22 + * - First Release + * + * TODO (updated 2010/07/22) + * ------------------------- + * + ************************************************************************************* + * + * This file is part of GeSHi. + * + * GeSHi is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * GeSHi is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with GeSHi; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + ************************************************************************************/ + +$language_data = array ( + 'LANG_NAME' => 'MOS 6502 (6510) ACME Cross Assembler format', + 'COMMENT_SINGLE' => array(1 => ';'), + 'COMMENT_MULTI' => array(), + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array("'", '"'), + 'ESCAPE_CHAR' => '', + 'KEYWORDS' => array( + /* 6502/6510 Opcodes. */ + 1 => array( + 'adc', 'and', 'asl', 'bcc', 'bcs', 'beq', 'bit', 'bmi', + 'bne', 'bpl', 'brk', 'bvc', 'bvs', 'clc', 'cld', 'cli', + 'clv', 'cmp', 'cpx', 'cpy', 'dec', 'dex', 'dey', 'eor', + 'inc', 'inx', 'iny', 'jmp', 'jsr', 'lda', 'ldx', 'ldy', + 'lsr', 'nop', 'ora', 'pha', 'php', 'pla', 'plp', 'rol', + 'ror', 'rti', 'rts', 'sbc', 'sec', 'sed', 'sei', 'sta', + 'stx', 'sty', 'tax', 'tay', 'tsx', 'txa', 'txs', 'tya', + ), + /* Index Registers, yes the 6502 has other registers by they are only + * accessable by specific opcodes. The 65816 also has access to the stack pointer S. */ + 2 => array( + 'x', 'y', 's' + ), + /* Directives or "pseudo opcodes" as defined by ACME 0.93 file AllPOs.txt. */ + 3 => array( + '!8', '!08', '!by', '!byte', + '!16', '!wo', '!word', + '!24', '!32', + '!fi', '!fill', + '!align', + '!ct', '!convtab', + '!tx', '!text', + '!pet', + '!raw', + '!scrxor', + '!to', + '!source', + '!bin', '!binary', + '!zn', '!zone', + '!sl', + '!svl', + '!sal', + '!if', '!ifdef', + '!for', + '!set', + '!do', 'while', 'until', + '!eof', '!endoffile', + '!warn', '!error', '!serious', + '!macro', +// , '*=' // Not a valid keyword (uses both * and = signs) moved to symbols instead. + '!initmem', + '!pseudopc', + '!cpu', + '!al', '!as', '!rl', '!rs', + ), + + /* 6502/6510 undocumented opcodes (often referred to as illegal instructions). + * These are present in the 6502/6510 but NOT in the newer CMOS revisions of the 65C02 or 65816. + * As they are undocumented instructions there are no "official" names for them, there are also + * several more that mainly perform various forms of crash and are not supported by ACME 0.93. + */ + 4 => array( + 'anc', 'arr', 'asr', 'dcp', 'dop', 'isc', 'jam', 'lax', + 'rla', 'rra', 'sax', 'sbx', 'slo', 'sre', 'top', + ), + /* 65c02 instructions, MOS added a few (much needed) instructions in the CMOS version of the 6502, but stupidly removed the undocumented/illegal opcodes. + * ACME 0.93 does not support the rmb0-7 and smb0-7 instructions (they are currently rem'ed out). */ + 5 => array( + 'bra', 'phx', 'phy', 'plx', 'ply', 'stz', 'trb', 'tsb' + ), + /* 65816 instructions. */ + 6 => array( + 'brl', 'cop', 'jml', 'jsl', 'mvn', 'mvp', 'pea', 'pei', + 'per', 'phb', 'phd', 'phk', 'plb', 'pld', 'rep', 'rtl', + 'sep', 'tcd', 'tcs', 'tdc', 'tsc', 'txy', 'tyx', 'wdm', + 'xba', 'xce', + ), + /* Deprecated directives or "pseudo opcodes" as defined by ACME 0.93 file AllPOs.txt. */ + 7 => array( + '!cbm', + '!sz', '!subzone', + '!realpc', + ), + /* Math functions, some are aliases for the symbols. */ + 8 => array( + 'not', 'div', 'mod', 'xor', 'or', 'sin', 'cos', 'tan', + 'arcsin', 'arccos', 'arctan', 'int', 'float', + + ), + + ), + 'SYMBOLS' => array( +// '[', ']', '(', ')', '{', '}', // These are already defined by GeSHi as BRACKETS. + '*=', '#', '!', '^', '-', '*', '/', + '%', '+', '-', '<<', '>>', '>>>', + '<', '>', '^', '<=', '<', '>=', '>', '!=', + '=', '&', '|', '<>', + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => false, + 1 => false, + 2 => false, + 3 => false, + 4 => false, + 5 => false, + 6 => false, + 7 => false, + 8 => false, + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: #00f; font-weight:bold;', + 2 => 'color: #00f; font-weight:bold;', + 3 => 'color: #080; font-weight:bold;', + 4 => 'color: #f00; font-weight:bold;', + 5 => 'color: #80f; font-weight:bold;', + 6 => 'color: #f08; font-weight:bold;', + 7 => 'color: #a04; font-weight:bold; font-style: italic;', + 8 => 'color: #000;', + ), + 'COMMENTS' => array( + 1 => 'color: #999; font-style: italic;', + ), + 'ESCAPE_CHAR' => array( + 0 => 'color: #009; font-weight: bold;' + ), + 'BRACKETS' => array( + 0 => 'color: #000;' + ), + 'STRINGS' => array( + 0 => 'color: #080;' + ), + 'NUMBERS' => array( + GESHI_NUMBER_INT_BASIC => 'color: #f00;', + GESHI_NUMBER_HEX_PREFIX_DOLLAR => 'color: #f00;', + GESHI_NUMBER_HEX_PREFIX => 'color: #f00;', + GESHI_NUMBER_BIN_PREFIX_PERCENT => 'color: #f00;', + GESHI_NUMBER_FLT_NONSCI => 'color: #f00;', + ), + 'METHODS' => array( + ), + 'SYMBOLS' => array( + 0 => 'color: #080;' + ), + 'REGEXPS' => array( + 0 => 'color: #f00;' + , 1 => 'color: #933;' + ), + 'SCRIPT' => array( + ) + ), + 'URLS' => array( + 1 => '', + 2 => '', + 3 => '', + 4 => '', + 5 => '', + 6 => '', + 7 => '', + 8 => '', + ), + 'OOLANG' => false, + 'OBJECT_SPLITTERS' => array( + ), + 'NUMBERS' => + GESHI_NUMBER_INT_BASIC | + GESHI_NUMBER_FLT_NONSCI | + GESHI_NUMBER_HEX_PREFIX_DOLLAR | + GESHI_NUMBER_HEX_PREFIX | + GESHI_NUMBER_BIN_PREFIX_PERCENT, + // AMCE Octal format not support and gets picked up as Decimal unfortunately. + 'REGEXPS' => array( + //ACME .# Binary number format. e.g. %..##..##..## + 0 => '\%[\.\#]{1,64}', + //ACME Local Labels + 1 => '\.[_a-zA-Z][_a-zA-Z0-9]*', + ), + 'STRICT_MODE_APPLIES' => GESHI_NEVER, + 'SCRIPT_DELIMITERS' => array( + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + ), + 'TAB_WIDTH' => 8, + 'PARSER_CONTROL' => array( + 'NUMBERS' => array( + 'PRECHECK_RX' => '/[\da-fA-F\.\$\%]/' + ) + ) +); + +?> \ No newline at end of file diff --git a/inc/geshi/6502kickass.php b/inc/geshi/6502kickass.php new file mode 100644 index 0000000000000000000000000000000000000000..b1edcaa5bf5d36f189b4b4669efff69af7e85305 --- /dev/null +++ b/inc/geshi/6502kickass.php @@ -0,0 +1,241 @@ +<?php +/************************************************************************************* + * 6502kickass.php + * ------- + * Author: Warren Willmey + * Copyright: (c) 2010 Warren Willmey. + * Release Version: 1.0.8.10 + * Date Started: 2010/06/07 + * + * MOS 6502 (6510) Kick Assembler 3.13 language file for GeSHi. + * + * CHANGES + * ------- + * 2010/07/22 + * - First Release + * + * TODO (updated 2010/07/22) + * ------------------------- + * + ************************************************************************************* + * + * This file is part of GeSHi. + * + * GeSHi is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * GeSHi is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with GeSHi; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + ************************************************************************************/ + +$language_data = array ( + 'LANG_NAME' => 'MOS 6502 (6510) Kick Assembler format', + 'COMMENT_SINGLE' => array(1 => '//'), + 'COMMENT_MULTI' => array('/*' => '*/'), + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array("'", '"'), + 'ESCAPE_CHAR' => '', + 'KEYWORDS' => array( + /* 6502/6510 Opcodes including undocumented opcodes as Kick Assembler 3.13 does not make a distinction - they are ALL valid. */ + 1 => array( + 'adc', 'ahx', 'alr', 'anc', 'anc2', 'and', 'arr', 'asl', + 'axs', 'bcc', 'bcs', 'beq', 'bit', 'bmi', 'bne', 'bpl', + 'brk', 'bvc', 'bvs', 'clc', 'cld', 'cli', 'clv', 'cmp', + 'cpx', 'cpy', 'dcp', 'dec', 'dex', 'dey', 'eor', 'inc', + 'inx', 'iny', 'isc', 'jmp', 'jsr', 'las', 'lax', 'lda', + 'ldx', 'ldy', 'lsr', 'nop', 'ora', 'pha', 'php', 'pla', + 'plp', 'rla', 'rol', 'ror', 'rra', 'rti', 'rts', 'sax', + 'sbc', 'sbc2', 'sec', 'sed', 'sei', 'shx', 'shy', 'slo', + 'sre', 'sta', 'stx', 'sty', 'tas', 'tax', 'tay', 'tsx', + 'txa', 'txs', 'tya', 'xaa', + ), + /* DTV additional Opcodes. */ + 2 => array( + 'bra', 'sac', 'sir' + ), + /* Index Registers, yes the 6502 has other registers by they are only + * accessable by specific opcodes. */ + 3 => array( + 'x', 'y' + ), + /* Directives. */ + 4 => array( + '.pc', '.pseudopc', 'virtual', '.align', '.byte', '.word', '.text', '.fill', + '.import source', '.import binary', '.import c64', '.import text', '.import', '.print', '.printnow', + '.error', '.var', '.eval', '.const', '.eval const', '.enum', '.label', '.define', '.struct', + 'if', '.for', '.macro', '.function', '.return', '.pseudocommand', '.namespace', '.filenamespace', + '.assert', '.asserterror', + ), + /* Kick Assembler 3.13 Functions/Operators. */ + 5 => array( + 'size', 'charAt', 'substring', 'asNumber', 'asBoolean', 'toIntString', 'toBinaryString', 'toOctalString', + 'toHexString', 'lock', // String functions/operators. + 'get', 'set', 'add', 'remove', 'shuffle', // List functions. + 'put', 'keys', // Hashtable functions. + 'getType', 'getValue', 'CmdArgument', // Pseudo Commands functions. + 'asmCommandSize', // Opcode Constants functions. + 'LoadBinary', 'getSize', + 'LoadSid', 'getData', + 'LoadPicture', 'width', 'height', 'getPixel', 'getSinglecolorByte', 'getMulticolorByte', + 'createFile', 'writeln', + 'cmdLineVars', + 'getX', 'getY', 'getZ', // Vector functions. + 'RotationMatrix', 'ScaleMatrix', 'MoveMatrix', 'PerspectiveMatrix', // Matrix functions. + + ), + + /* Kick Assembler 3.13 Math Functions. */ + 6 => array( + 'abs', 'acos', 'asin', 'atan', 'atan2', 'cbrt', 'ceil', 'cos', 'cosh', + 'exp', 'expm1', 'floor', 'hypot', 'IEEEremainder', 'log', 'log10', + 'log1p', 'max', 'min', 'pow', 'mod', 'random', 'round', 'signum', + 'sin', 'sinh', 'sqrt', 'tan', 'tanh', 'toDegrees', 'toRadians', + ), + + /* Kick Assembler 3.13 Objects/Data Types. */ + 7 => array( + 'List', // List() Object. + 'Hashtable', // Hashtable() Object. + 'Vector', // Vector() Object. + 'Matrix', // Matrix() Object. + ), + + /* Kick Assembler 3.13 Constants. */ + 8 => array( + 'PI', 'E', // Math Constants. + 'AT_ABSOLUTE' , 'AT_ABSOLUTEX' , 'AT_ABSOLUTEY' , 'AT_IMMEDIATE', // Pseudo Commands Constants. + 'AT_INDIRECT' , 'AT_IZEROPAGEX' , 'AT_IZEROPAGEY' , 'AT_NONE', + 'BLACK', 'WHITE', 'RED', 'CYAN', 'PURPLE', 'GREEN', 'BLUE', // Colour Constants. + 'YELLOW', 'ORANGE', 'BROWN', 'LIGHT_RED', 'DARK_GRAY', 'GRAY', + 'LIGHT_GREEN', 'LIGHT_BLUE', 'LIGHT_GRAY', + 'C64FILE', // Template Tag names. + 'BF_C64FILE', 'BF_BITMAP_SINGLECOLOR', 'BF_KOALA' , 'BF_FLI', // Binary format constant + ), + + ), + 'SYMBOLS' => array( +// '[', ']', '(', ')', '{', '}', // These are already defined by GeSHi as BRACKETS. + '-', '+', '-', '*', '/', '>', '<', '<<', '>>', '&', '|', '^', '=', '==', + '!=', '>=', '<=', '!', '&&', '||', '#', + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => false, + 1 => false, + 2 => false, + 3 => false, + 4 => true, + 5 => true, + 6 => true, + 7 => true, + 8 => true, + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: #00f; font-weight:bold;', + 2 => 'color: #00f; font-weight:bold;', + 3 => 'color: #00f; font-weight:bold;', + 4 => 'color: #080; font-weight:bold;', + 5 => 'color: #80f; font-weight:bold;', + 6 => 'color: #f08; font-weight:bold;', + 7 => 'color: #a04; font-weight:bold; font-style: italic;', + 8 => 'color: #f08; font-weight:bold;', + ), + 'COMMENTS' => array( + 1 => 'color: #999; font-style: italic;', + ), + 'ESCAPE_CHAR' => array( + 0 => 'color: #009; font-weight: bold;' + ), + 'BRACKETS' => array( + 0 => 'color: #000;' + ), + 'STRINGS' => array( + 0 => 'color: #080;' + ), + 'NUMBERS' => array( + GESHI_NUMBER_INT_BASIC => 'color: #f00;', + GESHI_NUMBER_HEX_PREFIX_DOLLAR => 'color: #f00;', + GESHI_NUMBER_BIN_PREFIX_PERCENT => 'color: #f00;', + GESHI_NUMBER_FLT_NONSCI => 'color: #f00;', + ), + 'METHODS' => array( + ), + 'SYMBOLS' => array( + 0 => 'color: #080;' + ), + 'REGEXPS' => array( + 0 => 'color: #933;', + 1 => 'color: #933;', + 2 => 'color: #933;', + 3 => 'color: #00f; font-weight:bold;', + ), + 'SCRIPT' => array( + ) + ), + 'URLS' => array( + 1 => '', + 2 => '', + 3 => '', + 4 => '', + 5 => '', + 6 => '', + 7 => '', + 8 => '', + ), + 'OOLANG' => false, + 'OBJECT_SPLITTERS' => array( + ), + 'NUMBERS' => + GESHI_NUMBER_INT_BASIC | + GESHI_NUMBER_FLT_NONSCI | + GESHI_NUMBER_HEX_PREFIX_DOLLAR | + GESHI_NUMBER_BIN_PREFIX_PERCENT, + // AMCE Octal format not support and gets picked up as Decimal unfortunately. + 'REGEXPS' => array( + //Labels end with a collon. + 0 => '[!]{0,1}[_a-zA-Z][_a-zA-Z0-9]*\:', + //Multi Labels (local labels) references start with ! and end with + or - for forward/backward reference. + 1 => '![_a-zA-Z][_a-zA-Z0-9]*[+-]', + //Macros start with a colon :Macro. + 2 => ':[_a-zA-Z][_a-zA-Z0-9]*', + // Opcode Constants, such as LDA_IMM, STA_IZPY are basically all 6502 opcodes + // in UPPER case followed by _underscore_ and the ADDRESS MODE. + // As you might imagine that is rather a lot ( 78 supported Opcodes * 12 Addressing modes = 936 variations) + // So I thought it better and easier to maintain as a regular expression. + // NOTE: The order of the Address Modes must be maintained or it wont work properly (eg. place ZP first and find out!) + 3 => '[A-Z]{3}[2]?_(?:IMM|IND|IZPX|IZPY|ZPX|ZPY|ABSX|ABSY|REL|ABS|ZP)', + ), + 'STRICT_MODE_APPLIES' => GESHI_NEVER, + 'SCRIPT_DELIMITERS' => array( + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + ), + 'TAB_WIDTH' => 8, + 'PARSER_CONTROL' => array( + 'NUMBERS' => array( + 'PRECHECK_RX' => '/[\da-fA-F\.\$\%]/' + ), + 'KEYWORDS' => array( + 5 => array ( + 'DISALLOWED_BEFORE' => "(?<![a-zA-Z0-9\$_\|\;>|^&'\"])" + ), + 6 => array ( + 'DISALLOWED_BEFORE' => "(?<![a-zA-Z0-9\$_\|\;>|^&'\"])" + ), + 8 => array ( + 'DISALLOWED_BEFORE' => "(?<![a-zA-Z0-9\$_\|\;>|^&'\"])" + ) + ) + ), +); + +?> \ No newline at end of file diff --git a/inc/geshi/6502tasm.php b/inc/geshi/6502tasm.php new file mode 100644 index 0000000000000000000000000000000000000000..5f9f2b9be51f837720dffc2b4d738e355b6e88cf --- /dev/null +++ b/inc/geshi/6502tasm.php @@ -0,0 +1,189 @@ +<?php +/************************************************************************************* + * 6502tasm.php + * ------- + * Author: Warren Willmey + * Copyright: (c) 2010 Warren Willmey. + * Release Version: 1.0.8.10 + * Date Started: 2010/06/02 + * + * MOS 6502 (6510) TASM/64TASS (64TASS being the super set of TASM) language file for GeSHi. + * + * CHANGES + * ------- + * 2010/07/22 + * - First Release + * + * TODO (updated 2010/07/22) + * ------------------------- + * + ************************************************************************************* + * + * This file is part of GeSHi. + * + * GeSHi is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * GeSHi is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with GeSHi; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + ************************************************************************************/ + +$language_data = array ( + 'LANG_NAME' => 'MOS 6502 (6510) TASM/64TASS 1.46 Assembler format', + 'COMMENT_SINGLE' => array(1 => ';'), + 'COMMENT_MULTI' => array(), + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array("'", '"'), + 'ESCAPE_CHAR' => '', + 'KEYWORDS' => array( + /* 6502/6510 Opcodes. */ + 1 => array( + 'adc', 'and', 'asl', 'bcc', 'bcs', 'beq', 'bit', 'bmi', + 'bne', 'bpl', 'brk', 'bvc', 'bvs', 'clc', 'cld', 'cli', + 'clv', 'cmp', 'cpx', 'cpy', 'dec', 'dex', 'dey', 'eor', + 'inc', 'inx', 'iny', 'jmp', 'jsr', 'lda', 'ldx', 'ldy', + 'lsr', 'nop', 'ora', 'pha', 'php', 'pla', 'plp', 'rol', + 'ror', 'rti', 'rts', 'sbc', 'sec', 'sed', 'sei', 'sta', + 'stx', 'sty', 'tax', 'tay', 'tsx', 'txa', 'txs', 'tya', + ), + /* Index Registers, yes the 6502 has other registers by they are only + * accessable by specific opcodes. The 65816 also has access to the stack pointer S. */ + 2 => array( + 'x', 'y', 's' + ), + /* Directives. */ + 3 => array( + '.al', '.align', '.as', '.assert', '.binary', '.byte', '.cerror', '.char', + '.comment', '.cpu', '.cwarn', '.databank', '.dpage', '.else', '.elsif', + '.enc', '.endc', '.endif', '.endm', '.endp', '.error', '.fi', '.fill', + '.for', '.here', '.if', '.ifeq', '.ifmi', '.ifne', '.ifpl', + '.include', '.int', '.logical', '.long', '.macro', '.next', '.null', '.offs', + '.page', '.pend', '.proc', '.rept', '.rta', '.shift', '.text', '.warn', '.word', + '.xl', '.xs', +// , '*=' // Not a valid keyword (uses both * and = signs) moved to symbols instead. + ), + + /* 6502/6510 undocumented opcodes (often referred to as illegal instructions). + * These are present in the 6502/6510 but NOT in the newer CMOS revisions of the 65C02 or 65816. + * As they are undocumented instructions there are no "official" names for them, these are the names + * used by 64TASS V1.46. + */ + 4 => array( + 'ahx', 'alr', 'anc', 'ane', 'arr', 'asr', 'axs', 'dcm', + 'dcp', 'ins', 'isb', 'isc', 'jam', 'lae', 'las', 'lax', + 'lds', 'lxa', 'rla', 'rra', 'sax', 'sbx', 'sha', 'shs', + 'shx', 'shy', 'slo', 'sre', 'tas', 'xaa', + ), + /* 65c02 instructions, MOS added a few (much needed) instructions in the + * CMOS version of the 6502, but stupidly removed the undocumented/illegal opcodes. */ + 5 => array( + 'bra', 'dea', 'gra', 'ina', 'phx', 'phy', 'plx', 'ply', + 'stz', 'trb', 'tsb', + ), + /* 65816 instructions. */ + 6 => array( + 'brl', 'cop', 'jml', 'jsl', 'mvn', 'mvp', 'pea', 'pei', + 'per', 'phb', 'phd', 'phk', 'plb', 'pld', 'rep', 'rtl', + 'sep', 'stp', 'swa', 'tad', 'tcd', 'tcs', 'tda', + 'tdc', 'tsa', 'tsc', 'txy', 'tyx', 'wai', 'xba', 'xce', + ), + /* Deprecated directives (or yet to be implemented). */ + 7 => array( + '.global', '.check' + ), + ), + 'SYMBOLS' => array( +// '[', ']', '(', ')', '{', '}', // These are already defined by GeSHi as BRACKETS. + '*=', '#', '<', '>', '`', '=', '<', '>', + '!=', '>=', '<=', '+', '-', '*', '/', '//', '|', + '^', '&', '<<', '>>', '-', '~', '!', + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => false, + 1 => false, + 2 => false, + 3 => false, + 4 => false, + 5 => false, + 6 => false, + 7 => false, + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: #00f; font-weight:bold;', + 2 => 'color: #00f; font-weight:bold;', + 3 => 'color: #080; font-weight:bold;', + 4 => 'color: #f00; font-weight:bold;', + 5 => 'color: #80f; font-weight:bold;', + 6 => 'color: #f08; font-weight:bold;', + 7 => 'color: #a04; font-weight:bold; font-style: italic;', + ), + 'COMMENTS' => array( + 1 => 'color: #999; font-style: italic;', + ), + 'ESCAPE_CHAR' => array( + 0 => 'color: #009; font-weight: bold;' + ), + 'BRACKETS' => array( + 0 => 'color: #000;' + ), + 'STRINGS' => array( + 0 => 'color: #080;' + ), + 'NUMBERS' => array( + GESHI_NUMBER_INT_BASIC => 'color: #f00;', + GESHI_NUMBER_HEX_PREFIX_DOLLAR => 'color: #f00;', + GESHI_NUMBER_BIN_PREFIX_PERCENT => 'color: #f00;', + ), + 'METHODS' => array( + ), + 'SYMBOLS' => array( + 0 => 'color: #080;' + ), + 'REGEXPS' => array( + ), + 'SCRIPT' => array( + ) + ), + 'URLS' => array( + 1 => '', + 2 => '', + 3 => '', + 4 => '', + 5 => '', + 6 => '', + 7 => '', + ), + 'OOLANG' => false, + 'OBJECT_SPLITTERS' => array( + ), + 'NUMBERS' => + GESHI_NUMBER_INT_BASIC | + GESHI_NUMBER_HEX_PREFIX_DOLLAR | + GESHI_NUMBER_BIN_PREFIX_PERCENT, + // AMCE Octal format not support and gets picked up as Decimal unfortunately. + 'REGEXPS' => array( + ), + 'STRICT_MODE_APPLIES' => GESHI_NEVER, + 'SCRIPT_DELIMITERS' => array( + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + ), + 'TAB_WIDTH' => 8, + 'PARSER_CONTROL' => array( + 'NUMBERS' => array( + 'PRECHECK_RX' => '/[\da-fA-F\.\$\%]/' + ) + ) +); + +?> \ No newline at end of file diff --git a/inc/geshi/68000devpac.php b/inc/geshi/68000devpac.php new file mode 100644 index 0000000000000000000000000000000000000000..efd800809fee4d40fddd9854c7352c4d92517dee --- /dev/null +++ b/inc/geshi/68000devpac.php @@ -0,0 +1,168 @@ +<?php +/************************************************************************************* + * 68000devpac.php + * ------- + * Author: Warren Willmey + * Copyright: (c) 2010 Warren Willmey. + * Release Version: 1.0.8.10 + * Date Started: 2010/06/09 + * + * Motorola 68000 - HiSoft Devpac ST 2 Assembler language file for GeSHi. + * + * CHANGES + * ------- + * 2010/07/22 + * - First Release + * + * TODO (updated 2010/07/22) + * ------------------------- + * + ************************************************************************************* + * + * This file is part of GeSHi. + * + * GeSHi is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * GeSHi is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with GeSHi; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + ************************************************************************************/ + +$language_data = array ( + 'LANG_NAME' => 'Motorola 68000 - HiSoft Devpac ST 2 Assembler format', + 'COMMENT_SINGLE' => array(1 => ';'), + 'COMMENT_MULTI' => array(), + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array("'", '"'), + 'ESCAPE_CHAR' => '', + 'KEYWORDS' => array( + /* Directives. */ + 1 => array( + 'end', 'include', 'incbin', 'opt', 'even', 'cnop', 'dc.b', 'dc.w', + 'dc.l', 'ds.b', 'ds.w', 'ds.l', 'dcb.b', 'dcb.w', 'dcb.l', + 'fail', 'output', '__g2', 'rept', 'endr', 'list', 'nolist', 'plen', + 'llen', 'ttl', 'subttl', 'spc', 'page', 'listchar', 'format', + 'equ', 'equr', 'set', 'reg', 'rs.b', 'rs.w', 'rs.l', 'rsreset', + 'rsset', '__rs', 'ifeq', 'ifne', 'ifgt', 'ifge', 'iflt', 'ifle', 'endc', + 'ifd', 'ifnd', 'ifc', 'ifnc', 'elseif', 'iif', 'macro', 'endm', 'mexit', + 'narg', '\@', 'section', 'text', 'data', 'bss', 'xdef', 'xref', 'org', + 'offset', '__lk', 'comment', + ), + /* 68000 Opcodes. */ + 2 => array( + 'abcd', 'add', 'adda', 'addi', 'addq', 'addx', 'and', 'andi', + 'asl', 'asr', 'bcc', 'bchg', 'bclr', 'bcs', 'beq', 'bge', + 'bgt', 'bhi', 'ble', 'bls', 'blt', 'bmi', 'bne', 'bpl', + 'bra', 'bset', 'bsr', 'btst', 'bvc', 'bvs', 'chk', 'clr', + 'cmp', 'cmpa', 'cmpi', 'cmpm', 'dbcc', 'dbcs', 'dbeq', 'dbf', + 'dbge', 'dbgt', 'dbhi', 'dble', 'dbls', 'dblt', 'dbmi', 'dbne', + 'dbpl', 'dbra', 'dbt', 'dbvc', 'dbvs', 'divs', 'divu', 'eor', + 'eori', 'exg', 'ext','illegal','jmp', 'jsr', 'lea', 'link', + 'lsl', 'lsr', 'move','movea','movem','movep','moveq', 'muls', + 'mulu', 'nbcd', 'neg', 'negx', 'nop', 'not', 'or', 'ori', + 'pea', 'reset', 'rol', 'ror', 'roxl', 'roxr', 'rte', 'rtr', + 'rts', 'sbcd', 'scc', 'scs', 'seq', 'sf', 'sge', 'sgt', + 'shi', 'sle', 'sls', 'slt', 'smi', 'sne', 'spl', 'st', + 'stop', 'sub', 'suba', 'subi', 'subq', 'subx', 'svc', 'svs', + 'swap', 'tas', 'trap','trapv', 'tst', 'unlk', + ), + /* oprand sizes. */ + 3 => array( + 'b', 'w', 'l' , 's' + ), + /* 68000 Registers. */ + 4 => array( + 'd0', 'd1', 'd2', 'd3', 'd4', 'd5', 'd6', 'd7', + 'a0', 'a1', 'a2', 'a3', 'a4', 'a5', 'a6', 'a7', 'sp', 'usp', 'ssp', + 'pc', 'ccr', 'sr', + ), + ), + 'SYMBOLS' => array( +// '[', ']', '(', ')', '{', '}', // These are already defined by GeSHi as BRACKETS. + '+', '-', '~', '<<', '>>', '&', + '!', '^', '*', '/', '=', '<', '>', + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => false, + 1 => false, + 2 => false, + 3 => false, + 4 => false, + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: #f08; font-weight:bold;', + 2 => 'color: #00f; font-weight:bold;', + 3 => 'color: #00f; font-weight:bold;', + 4 => 'color: #080; font-weight:bold;', + ), + 'COMMENTS' => array( + 1 => 'color: #999; font-style: italic;', + ), + 'ESCAPE_CHAR' => array( + 0 => 'color: #009; font-weight: bold;' + ), + 'BRACKETS' => array( + 0 => 'color: #000;' + ), + 'STRINGS' => array( + 0 => 'color: #080;' + ), + 'NUMBERS' => array( + GESHI_NUMBER_INT_BASIC => 'color: #f00;', + GESHI_NUMBER_HEX_PREFIX_DOLLAR => 'color: #f00;', + GESHI_NUMBER_BIN_PREFIX_PERCENT => 'color: #f00;', + GESHI_NUMBER_OCT_PREFIX_AT => 'color: #f00;', + ), + 'METHODS' => array( + ), + 'SYMBOLS' => array( + 0 => 'color: #080;' + ), + 'REGEXPS' => array( + 0 => 'color: #933;' + ), + 'SCRIPT' => array( + ) + ), + 'URLS' => array( + 1 => '', + 2 => '', + 3 => '', + 4 => '', + ), + 'OOLANG' => false, + 'OBJECT_SPLITTERS' => array( + ), + 'NUMBERS' => + GESHI_NUMBER_INT_BASIC | + GESHI_NUMBER_HEX_PREFIX_DOLLAR | + GESHI_NUMBER_OCT_PREFIX_AT | + GESHI_NUMBER_BIN_PREFIX_PERCENT, + 'REGEXPS' => array( + //Labels may end in a colon. + 0 => '(?<=\A\x20|\r|\n|^)[\._a-zA-Z][\._a-zA-Z0-9]*[\:]?[\s]' + ), + 'STRICT_MODE_APPLIES' => GESHI_NEVER, + 'SCRIPT_DELIMITERS' => array( + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + ), + 'TAB_WIDTH' => 8, + 'PARSER_CONTROL' => array( + 'NUMBERS' => array( + 'PRECHECK_RX' => '/[\da-fA-F\.\$\%\@]/' + ) + ) +); + +?> \ No newline at end of file diff --git a/inc/geshi/abap.php b/inc/geshi/abap.php index 942d2397e33f14b232c202d680b9ed7dd7e32daf..6ce930c7cf3444fdba32e7a3155623166590412e 100644 --- a/inc/geshi/abap.php +++ b/inc/geshi/abap.php @@ -7,7 +7,7 @@ * - Sandra Rossi (sandra.rossi@gmail.com) * - Jacob Laursen (jlu@kmd.dk) * Copyright: (c) 2007 Andres Picazo - * Release Version: 1.0.8.8 + * Release Version: 1.0.8.10 * Date Started: 2004/06/04 * * ABAP language file for GeSHi. diff --git a/inc/geshi/actionscript.php b/inc/geshi/actionscript.php index 41d66edd2927f79bc01c0eedc3115d634e6ca533..47eec3950d1b79c88426a8205ad5d1dca1ae0445 100644 --- a/inc/geshi/actionscript.php +++ b/inc/geshi/actionscript.php @@ -4,7 +4,7 @@ * ---------------- * Author: Steffen Krause (Steffen.krause@muse.de) * Copyright: (c) 2004 Steffen Krause, Nigel McNie (http://qbnz.com/highlighter) - * Release Version: 1.0.8.8 + * Release Version: 1.0.8.10 * Date Started: 2004/06/20 * * Actionscript language file for GeSHi. diff --git a/inc/geshi/actionscript3.php b/inc/geshi/actionscript3.php index 4aab929dcffa8b1dbe57bf7802f185901ba2ff1e..ba27573ccd479aa108c2852d3c74815d28ec1c71 100644 --- a/inc/geshi/actionscript3.php +++ b/inc/geshi/actionscript3.php @@ -4,7 +4,7 @@ * ---------------- * Author: Jordi Boggiano (j.boggiano@seld.be) * Copyright: (c) 2007 Jordi Boggiano (http://www.seld.be/), Benny Baumann (http://qbnz.com/highlighter) - * Release Version: 1.0.8.8 + * Release Version: 1.0.8.10 * Date Started: 2007/11/26 * * ActionScript3 language file for GeSHi. @@ -60,7 +60,7 @@ $language_data = array ( 'COMMENT_MULTI' => array('/*' => '*/'), 'COMMENT_REGEXP' => array( //Regular expressions - 2 => "/(?<=[\\s^])(s|tr|y)\\/(?:\\\\.|(?!\n)[^\\/\\\\])+\\/(?:\\\\.|(?!\n)[^\\/\\\\])*\\/[msixpogcde]*(?=[\\s$\\.\\;])|(?<=[\\s^(=])(m|q[qrwx]?)?\\/(?:\\\\.|(?!\n)[^\\/\\\\])+\\/[msixpogc]*(?=[\\s$\\.\\,\\;\\)])/iU", + 2 => "/(?<=[\\s^])(s|tr|y)\\/(?!\s)(?:\\\\.|(?!\n)[^\\/\\\\])+(?<!\s)\\/(?!\s)(?:\\\\.|(?!\n)[^\\/\\\\])*(?<!\s)\\/[msixpogcde]*(?=[\\s$\\.\\;])|(?<=[\\s^(=])(m|q[qrwx]?)?\\/(?!\s)(?:\\\\.|(?!\n)[^\\/\\\\])+(?<!\s)\\/[msixpogc]*(?=[\\s$\\.\\,\\;\\)])/iU", ), 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, 'QUOTEMARKS' => array("'", '"'), diff --git a/inc/geshi/ada.php b/inc/geshi/ada.php index c6b0597bb4b04d07f1d0e96fa78430d2de6ab067..8f8390952a10c86b171b47f5dcf9535ed32741cc 100644 --- a/inc/geshi/ada.php +++ b/inc/geshi/ada.php @@ -4,7 +4,7 @@ * ------- * Author: Tux (tux@inmail.cz) * Copyright: (c) 2004 Tux (http://tux.a4.cz/), Nigel McNie (http://qbnz.com/highlighter) - * Release Version: 1.0.8.8 + * Release Version: 1.0.8.10 * Date Started: 2004/07/29 * * Ada language file for GeSHi. diff --git a/inc/geshi/algol68.php b/inc/geshi/algol68.php new file mode 100644 index 0000000000000000000000000000000000000000..1f79f10ebb6f70c4010827e7a6271913b8f62485 --- /dev/null +++ b/inc/geshi/algol68.php @@ -0,0 +1,329 @@ +<?php +/************************************************************************************* + * algol68.php + * -------- + * Author: Neville Dempsey (NevilleD.sourceforge@sgr-a.net) + * Copyright: (c) 2010 Neville Dempsey (https://sourceforge.net/projects/algol68/files/) + * Release Version: 1.0.8.10 + * Date Started: 2010/04/24 + * + * ALGOL 68 language file for GeSHi. + * + * CHANGES + * ------- + * 2010/04/24 (1.0.8.8.0) + * - First Release - machine generated by http://rosettacode.org/geshi/ + * 2010/05/24 (1.0.8.8.1) + * - #2324 - converted comment detection to RegEx + * 2010/06/16 (1.0.8.8.2) + * - separate symbols from keywords - quick fix + * 2010/06/16 (1.0.8.8.3) + * - reverse length order symbols + * - Add RegEx for BITS and REAL literals (INT to do) + * - recognise LONG and SHORT prefixes to literals + * 2010/07/23 (1.0.8.8.4) + * - fix errors detected by langcheck.php, eg rm tab, fix indenting, rm duplicate keywords, fix symbols as keywords etc + * - removed bulk of local variables from name space. + * - unfolded arrays + * + * TODO (updated yyyy/mm/dd) + * ------------------------- + * - Use "Parser Control" to fix KEYWORD parsing, eg: (INT minus one= -1; print(ABSminus one)) + * - Parse $FORMATS$ more fully - if possible. + * - Pull reserved words from the source of A68G and A68RS + * - Pull stdlib PROC/OP/MODE symbols from the soruce of A68G and A68RS + * - Pull PROC/OP/MODE extensions from the soruce of A68G and A68RS + * - Use RegEx to detect extended precision PROC names, eg 'long long sin' etc + * - Use RegEx to detect white space std PROC names, eg 'new line' + * - Use RegEx to detect white space ext PROC names, eg 'cgs speed of light' + * - Use RegEx to detect BOLD symbols, eg userdefined MODEs and OPs + * - Add REgEx for INT literals - Adding INT breaks formatting... + * - Adding PIPE as a key word breaks formatting of "|" symbols!! + * + ************************************************************************************* + * + * This file is part of GeSHi. + * + * GeSHi is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * GeSHi is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with GeSHi; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + ************************************************************************************/ + +if(!function_exists('geshi_langfile_algol68_vars')) { + function geshi_langfile_algol68_vars(){ + $pre='(?<![0-9a-z_\.])'; + $post='?(?![0-9a-z]|\.(?:[eE][+\-]?)?\d)'; + $post=""; # assuming the RegEx is greedy # + + $_="\s*"; + + $srad="Rr"; $rrad="[".$srad."]"; # either one digit, OR opt-space in digits # + $sbin="0-1"; $rbin="[".$sbin."]"; $_bin=$rbin."(?:[".$sbin."\s]*".$rbin."|)"; + $snib="0-3"; $rnib="[".$snib."]"; $_nib=$rnib."(?:[".$snib."\s]*".$rnib."|)"; + $soct="0-7"; $roct="[".$soct."]"; $_oct=$roct."(?:[".$soct."\s]*".$roct."|)"; + $sdec="0-9"; $rdec="[".$sdec."]"; $_dec=$rdec."(?:[".$sdec."\s]*".$rdec."|)"; + $shex="0-9A-Fa-f"; $rhex="[".$shex."]"; $_hex=$rhex."(?:[".$shex."\s]*".$rhex."|)"; + + # Define BITS: # + $prebits=$pre; $postbits=$post; + $bl="2".$_.$rrad.$_.$_bin; + $bl=$bl."|"."2".$_.$rrad.$_.$_bin; + $bl=$bl."|"."4".$_.$rrad.$_.$_nib; + $bl=$bl."|"."8".$_.$rrad.$_.$_oct; + $bl=$bl."|"."1".$_."0".$_.$rrad.$_.$_dec; + $bl=$bl."|"."1".$_."6".$_.$rrad.$_.$_hex; + + # Define INT: # + $preint=$pre; $postint=$post; + # for some reason ".0 e - 2" is not recognised, but ".0 e + 2" IS! + # work around: remove spaces between sign and digits! Maybe because + # of the Unary '-' Operator + $sign_="(?:-|\-|[-]|[\-]|\+|)"; # attempts # + + $sign_="(?:-\s*|\+\s*|)"; # n.b. sign is followed by white space # + + $_int=$sign_.$_dec; + $il= $_int; # +_9 # + + $GESHI_NUMBER_INT_BASIC='(?:(?<![0-9a-z_\.%])|(?<=\.\.))(?<![\d\.]e[+\-])([1-9]\d*?|0)(?![0-9a-z]|\.(?:[eE][+\-]?)?\d)'; + + # Define REAL: # + $prereal=$pre; $postreal=$post; + $sexp="Ee\\\\"; $_exp="(?:â¨|[".$sexp."])".$_.$_int; + $_decimal="[.]".$_.$_dec; + + # Add permitted permutations of various parts # + $rl= $_int.$_.$_decimal.$_.$_exp; # +_9_._9_e_+_9 # + $rl=$rl."|".$_int.$_."[.]".$_.$_exp; # +_9_.___e_+_9 # + $rl=$rl."|".$_int.$_.$_exp; # +_9_____e_+_9 # + $rl=$rl."|".$sign_.$_decimal.$_.$_exp; # +___._9_e_+_9 # + + $rl=$rl."|".$_int.$_.$_decimal; # +_9_._9 # + $rl=$rl."|".$sign_.$_decimal; # +___._9 # + + # The following line damaged formatting... + #$rl=$rl."|".$_int; # +_9 # + + # Apparently Algol68 does not support '2.', c.f. Algol 68G + #$rl=$rl."|".$_int.$_."[.]"; # +_9_. # + + # Literal prefixes are overridden by KEYWORDS :-( + $LONGS="(?:(?:(LONG\s+)*|(SHORT\s+))*|)"; + + return array( + "BITS" => $prebits.$LONGS."(?:".$bl.")".$postbits, + "INT" => $preint.$LONGS."(?:".$il.")".$postint, + "REAL" => $prereal.$LONGS."(?:".$rl.")".$postreal, + + "BOLD" => 'color: #b1b100; font-weight: bold;', + "ITALIC" => 'color: #b1b100;', # procedures traditionally italic # + "NONSTD" => 'color: #FF0000; font-weight: bold;', # RED # + "COMMENT" => 'color: #666666; font-style: italic;' + ); + } +} +$a68=geshi_langfile_algol68_vars(); + +$language_data = array( + 'LANG_NAME' => 'ALGOL 68', + 'COMMENT_SINGLE' => array(), + 'COMMENT_MULTI' => array( + '¢' => '¢', + '£' => '£', + '#' => '#', + ), + 'COMMENT_REGEXP' => array( + 1 => '/\bCO((?:MMENT)?)\b.*?\bCO\\1\b/i', + 2 => '/\bPR((?:AGMAT)?)\b.*?\bPR\\1\b/i', + 3 => '/\bQUOTE\b.*?\bQUOTE\b/i' + ), + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array('"'), + 'ESCAPE_CHAR' => '"', + 'NUMBERS' => GESHI_NUMBER_HEX_SUFFIX, # Warning: Feature!! # +# GESHI_NUMBER_HEX_SUFFIX, # Attempt ignore default # + 'KEYWORDS' => array( +# Extensions + 1 => array('KEEP', 'FINISH', 'USE', 'SYSPROCS', 'IOSTATE', 'USING', 'ENVIRON', 'PROGRAM', 'CONTEXT'), +# 2 => array('CASE', 'IN', 'OUSE', 'IN', 'OUT', 'ESAC', '(', '|', '|:', ')', 'FOR', 'FROM', 'TO', 'BY', 'WHILE', 'DO', 'OD', 'IF', 'THEN', 'ELIF', 'THEN', 'ELSE', 'FI', 'PAR', 'BEGIN', 'EXIT', 'END', 'GO', 'GOTO', 'FORALL', 'UPTO', 'DOWNTO', 'FOREACH', 'ASSERT'), # + 2 => array('CASE', 'IN', 'OUSE', /* 'IN',*/ 'OUT', 'ESAC', 'PAR', 'BEGIN', 'EXIT', 'END', 'GO TO', 'GOTO', 'FOR', 'FROM', 'TO', 'BY', 'WHILE', 'DO', 'OD', 'IF', 'THEN', 'ELIF', /* 'THEN',*/ 'ELSE', 'FI' ), + 3 => array('BITS', 'BOOL', 'BYTES', 'CHAR', 'COMPL', 'INT', 'REAL', 'SEMA', 'STRING', 'VOID'), + 4 => array('MODE', 'OP', 'PRIO', 'PROC', 'FLEX', 'HEAP', 'LOC', 'REF', 'LONG', 'SHORT', 'EITHER'), +# Extensions or deprecated keywords +# 'PIPE': keyword somehow interferes with the internal operation of GeSHi + 5 => array('FORALL', 'UPTO', 'DOWNTO', 'FOREACH', 'ASSERT', 'CTB', 'CT', 'CTAB', 'COMPLEX', 'VECTOR', 'SOUND' /*, 'PIPE'*/), + 6 => array('CHANNEL', 'FILE', 'FORMAT', 'STRUCT', 'UNION', 'OF'), +# '(', '|', '|:', ')', # +# 7 => array('OF', 'AT', '@', 'IS', ':=:', 'ISNT', ':/=:', ':≠:', 'CTB', 'CT', '::', 'CTAB', '::=', 'TRUE', 'FALSE', 'EMPTY', 'NIL', 'â—‹', 'SKIP', '~'), + 7 => array('AT', 'IS', 'ISNT', 'TRUE', 'FALSE', 'EMPTY', 'NIL', 'SKIP'), + 8 => array('NOT', 'UP', 'DOWN', 'LWB', 'UPB', /* '-',*/ 'ABS', 'ARG', 'BIN', 'ENTIER', 'LENG', 'LEVEL', 'ODD', 'REPR', 'ROUND', 'SHORTEN', 'CONJ', 'SIGN'), +# OPERATORS ordered roughtly by PRIORITY # +# 9 => array('¬', '↑', '↓', '⌊', '⌈', '~', '⎩', '⎧'), +# 10 => array('+*', 'I', '+×', '⊥', '!', 'â¨'), + 10 => array('I'), +# 11 => array('SHL', 'SHR', '**', 'UP', 'DOWN', 'LWB', 'UPB', '↑', '↓', '⌊', '⌈', '⎩', '⎧'), + 11 => array('SHL', 'SHR', /*'UP', 'DOWN', 'LWB', 'UPB'*/), +# 12 => array('*', '/', '%', 'OVER', '%*', 'MOD', 'ELEM', '×', '÷', '÷×', '÷*', '%×', 'â–¡', '÷:'), + 12 => array('OVER', 'MOD', 'ELEM'), +# 13 => array('-', '+'), +# 14 => array('<', 'LT', '<=', 'LE', '>=', 'GE', '>', 'GT', '≤', '≥'), + 14 => array('LT', 'LE', 'GE', 'GT'), +# 15 => array('=', 'EQ', '/=', 'NE', '≠', '~='), + 15 => array('EQ', 'NE'), +# 16 => array('&', 'AND', '∧', 'OR', '∨', '/\\', '\\/'), + 16 => array('AND', 'OR'), + 17 => array('MINUSAB', 'PLUSAB', 'TIMESAB', 'DIVAB', 'OVERAB', 'MODAB', 'PLUSTO'), +# 18 => array('-:=', '+:=', '*:=', '/:=', '%:=', '%*:=', '+=:', '×:=', '÷:=', '÷×:=', '÷*:=', '%×:=', '÷::=', 'MINUS', 'PLUS', 'DIV', 'MOD', 'PRUS'), +# Extensions or deprecated keywords + 18 => array('MINUS', 'PLUS', 'DIV', /* 'MOD',*/ 'PRUS', 'IS NOT'), +# Extensions or deprecated keywords + 19 => array('THEF', 'ANDF', 'ORF', 'ANDTH', 'OREL', 'ANDTHEN', 'ORELSE'), +# Built in procedures - from standard prelude # + 20 => array('int lengths', 'intlengths', 'int shorths', 'intshorths', 'max int', 'maxint', 'real lengths', 'reallengths', 'real shorths', 'realshorths', 'bits lengths', 'bitslengths', 'bits shorths', 'bitsshorths', 'bytes lengths', 'byteslengths', 'bytes shorths', 'bytesshorths', 'max abs char', 'maxabschar', 'int width', 'intwidth', 'long int width', 'longintwidth', 'long long int width', 'longlongintwidth', 'real width', 'realwidth', 'long real width', 'longrealwidth', 'long long real width', 'longlongrealwidth', 'exp width', 'expwidth', 'long exp width', 'longexpwidth', 'long long exp width', 'longlongexpwidth', 'bits width', 'bitswidth', 'long bits width', 'longbitswidth', 'long long bits width', 'longlongbitswidth', 'bytes width', 'byteswidth', 'long bytes width', 'longbyteswidth', 'max real', 'maxreal', 'small real', 'smallreal', 'long max int', 'longmaxint', 'long long max int', 'longlongmaxint', 'long max real', 'longmaxreal', 'long small real', 'longsmallreal', 'long long max real', 'longlongmaxreal', 'long long small real', 'longlongsmallreal', 'long max bits', 'longmaxbits', 'long long max bits', 'longlongmaxbits', 'null character', 'nullcharacter', 'blank', 'flip', 'flop', 'error char', 'errorchar', 'exp char', 'expchar', 'newline char', 'newlinechar', 'formfeed char', 'formfeedchar', 'tab char', 'tabchar'), + 21 => array('stand in channel', 'standinchannel', 'stand out channel', 'standoutchannel', 'stand back channel', 'standbackchannel', 'stand draw channel', 'standdrawchannel', 'stand error channel', 'standerrorchannel'), + 22 => array('put possible', 'putpossible', 'get possible', 'getpossible', 'bin possible', 'binpossible', 'set possible', 'setpossible', 'reset possible', 'resetpossible', 'reidf possible', 'reidfpossible', 'draw possible', 'drawpossible', 'compressible', 'on logical file end', 'onlogicalfileend', 'on physical file end', 'onphysicalfileend', 'on line end', 'onlineend', 'on page end', 'onpageend', 'on format end', 'onformatend', 'on value error', 'onvalueerror', 'on open error', 'onopenerror', 'on transput error', 'ontransputerror', 'on format error', 'onformaterror', 'open', 'establish', 'create', 'associate', 'close', 'lock', 'scratch', 'space', 'new line', 'newline', 'print', 'write f', 'writef', 'print f', 'printf', 'write bin', 'writebin', 'print bin', 'printbin', 'read f', 'readf', 'read bin', 'readbin', 'put f', 'putf', 'get f', 'getf', 'make term', 'maketerm', 'make device', 'makedevice', 'idf', 'term', 'read int', 'readint', 'read long int', 'readlongint', 'read long long int', 'readlonglongint', 'read real', 'readreal', 'read long real', 'readlongreal', 'read long long real', 'readlonglongreal', 'read complex', 'readcomplex', 'read long complex', 'readlongcomplex', 'read long long complex', 'readlonglongcomplex', 'read bool', 'readbool', 'read bits', 'readbits', 'read long bits', 'readlongbits', 'read long long bits', 'readlonglongbits', 'read char', 'readchar', 'read string', 'readstring', 'print int', 'printint', 'print long int', 'printlongint', 'print long long int', 'printlonglongint', 'print real', 'printreal', 'print long real', 'printlongreal', 'print long long real', 'printlonglongreal', 'print complex', 'printcomplex', 'print long complex', 'printlongcomplex', 'print long long complex', 'printlonglongcomplex', 'print bool', 'printbool', 'print bits', 'printbits', 'print long bits', 'printlongbits', 'print long long bits', 'printlonglongbits', 'print char', 'printchar', 'print string', 'printstring', 'whole', 'fixed', 'float'), + 23 => array('pi', 'long pi', 'longpi', 'long long pi', 'longlongpi'), + 24 => array('sqrt', 'curt', 'cbrt', 'exp', 'ln', 'log', 'sin', 'arc sin', 'arcsin', 'cos', 'arc cos', 'arccos', 'tan', 'arc tan', 'arctan', 'long sqrt', 'longsqrt', 'long curt', 'longcurt', 'long cbrt', 'longcbrt', 'long exp', 'longexp', 'long ln', 'longln', 'long log', 'longlog', 'long sin', 'longsin', 'long arc sin', 'longarcsin', 'long cos', 'longcos', 'long arc cos', 'longarccos', 'long tan', 'longtan', 'long arc tan', 'longarctan', 'long long sqrt', 'longlongsqrt', 'long long curt', 'longlongcurt', 'long long cbrt', 'longlongcbrt', 'long long exp', 'longlongexp', 'long long ln', 'longlongln', 'long long log', 'longlonglog', 'long long sin', 'longlongsin', 'long long arc sin', 'longlongarcsin', 'long long cos', 'longlongcos', 'long long arc cos', 'longlongarccos', 'long long tan', 'longlongtan', 'long long arc tan', 'longlongarctan'), + 25 => array('first random', 'firstrandom', 'next random', 'nextrandom', 'long next random', 'longnextrandom', 'long long next random', 'longlongnextrandom'), + 26 => array('real', 'bits pack', 'bitspack', 'long bits pack', 'longbitspack', 'long long bits pack', 'longlongbitspack', 'bytes pack', 'bytespack', 'long bytes pack', 'longbytespack', 'char in string', 'charinstring', 'last char in string', 'lastcharinstring', 'string in string', 'stringinstring'), + 27 => array('utc time', 'utctime', 'local time', 'localtime', 'argc', 'argv', 'get env', 'getenv', 'reset errno', 'reseterrno', 'errno', 'strerror'), + 28 => array('sinh', 'long sinh', 'longsinh', 'long long sinh', 'longlongsinh', 'arc sinh', 'arcsinh', 'long arc sinh', 'longarcsinh', 'long long arc sinh', 'longlongarcsinh', 'cosh', 'long cosh', 'longcosh', 'long long cosh', 'longlongcosh', 'arc cosh', 'arccosh', 'long arc cosh', 'longarccosh', 'long long arc cosh', 'longlongarccosh', 'tanh', 'long tanh', 'longtanh', 'long long tanh', 'longlongtanh', 'arc tanh', 'arctanh', 'long arc tanh', 'longarctanh', 'long long arc tanh', 'longlongarctanh', 'arc tan2', 'arctan2', 'long arc tan2', 'longarctan2', 'long long arc tan2', 'longlongarctan2'), + 29 => array('complex sqrt', 'complexsqrt', 'long complex sqrt', 'longcomplexsqrt', 'long long complex sqrt', 'longlongcomplexsqrt', 'complex exp', 'complexexp', 'long complex exp', 'longcomplexexp', 'long long complex exp', 'longlongcomplexexp', 'complex ln', 'complexln', 'long complex ln', 'longcomplexln', 'long long complex ln', 'longlongcomplexln', 'complex sin', 'complexsin', 'long complex sin', 'longcomplexsin', 'long long complex sin', 'longlongcomplexsin', 'complex arc sin', 'complexarcsin', 'long complex arc sin', 'longcomplexarcsin', 'long long complex arc sin', 'longlongcomplexarcsin', 'complex cos', 'complexcos', 'long complex cos', 'longcomplexcos', 'long long complex cos', 'longlongcomplexcos', 'complex arc cos', 'complexarccos', 'long complex arc cos', 'longcomplexarccos', 'long long complex arc cos', 'longlongcomplexarccos', 'complex tan', 'complextan', 'long complex tan', 'longcomplextan', 'long long complex tan', 'longlongcomplextan', 'complex arc tan', 'complexarctan', 'long complex arc tan', 'longcomplexarctan', 'long long complex arc tan', 'longlongcomplexarctan', 'complex sinh', 'complexsinh', 'complex arc sinh', 'complexarcsinh', 'complex cosh', 'complexcosh', 'complex arc cosh', 'complexarccosh', 'complex tanh', 'complextanh', 'complex arc tanh', 'complexarctanh') + ), + 'SYMBOLS' => array( + 1 => array( /* reverse length sorted... */ '÷×:=', '%×:=', ':≠:', '÷*:=', '÷::=', '%*:=', ':/=:', '×:=', '÷:=', '÷×', '%:=', '%×', '*:=', '+:=', '+=:', '+×', '-:=', '/:=', '::=', ':=:', '÷*', '÷:', '↑', '↓', '∧', '∨', '≠', '≤', '≥', '⊥', '⌈', '⌊', '⎧', '⎩', /* 'â¨', */ 'â–¡', 'â—‹', '%*', '**', '+*', '/=', '::', '/\\', '\\/', '<=', '>=', '|:', '~=', '¬', '×', '÷', '!', '%', '&', '(', ')', '*', '+', ',', '-', '/', ':', ';', '<', '=', '>', '?', '@', '[', ']', '^', '{', '|', '}', '~') + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => false, + 1 => true, + 2 => true, + 3 => true, + 4 => true, + 5 => true, + 6 => true, + 7 => true, + 8 => true, +# 9 => true, + 10 => true, + 11 => true, + 12 => true, +# 13 => true, + 14 => true, + 15 => true, + 16 => true, + 17 => true, + 18 => true, + 19 => true, + 20 => true, + 21 => true, + 22 => true, + 23 => true, + 24 => true, + 25 => true, + 26 => true, + 27 => true, + 28 => true, + 29 => true + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => $a68['NONSTD'], 2 => $a68['BOLD'], 3 => $a68['BOLD'], 4 => $a68['BOLD'], + 5 => $a68['NONSTD'], 6 => $a68['BOLD'], 7 => $a68['BOLD'], 8 => $a68['BOLD'], + /* 9 => $a68['BOLD'],*/ 10 => $a68['BOLD'], 11 => $a68['BOLD'], 12 => $a68['BOLD'], + /* 13 => $a68['BOLD'],*/ 14 => $a68['BOLD'], 15 => $a68['BOLD'], 16 => $a68['BOLD'], 17 => $a68['BOLD'], + 18 => $a68['NONSTD'], 19 => $a68['NONSTD'], + 20 => $a68['ITALIC'], 21 => $a68['ITALIC'], 22 => $a68['ITALIC'], 23 => $a68['ITALIC'], + 24 => $a68['ITALIC'], 25 => $a68['ITALIC'], 26 => $a68['ITALIC'], 27 => $a68['ITALIC'], + 28 => $a68['ITALIC'], 29 => $a68['ITALIC'] + ), + 'COMMENTS' => array( + 1 => $a68['COMMENT'], 2 => $a68['COMMENT'], 3 => $a68['COMMENT'], /* 4 => $a68['COMMENT'], + 5 => $a68['COMMENT'],*/ 'MULTI' => $a68['COMMENT'] + ), + 'ESCAPE_CHAR' => array( + 0 => 'color: #000099; font-weight: bold;' + ), + 'BRACKETS' => array( + 0 => 'color: #009900;' + ), + 'STRINGS' => array( + 0 => 'color: #0000ff;' + ), + 'NUMBERS' => array( + 0 => 'color: #cc66cc;', + ), + 'METHODS' => array( + 0 => 'color: #004000;', + 1 => 'color: #004000;' + ), + 'SYMBOLS' => array( + 0 => 'color: #339933;', + 1 => 'color: #339933;' + ), + 'REGEXPS' => array( + 0 => 'color: #cc66cc;', # BITS # + 1 => 'color: #cc66cc;', # REAL # + /* 2 => 'color: #cc66cc;', # INT # */ + ), + 'SCRIPT' => array() + ), + 'URLS' => array( + 1 => '', + 2 => '', + 3 => '', + 4 => '', + 5 => '', + 6 => '', + 7 => '', + 8 => '', +# 9 => '', + 10 => '', + 11 => '', + 12 => '', +# 13 => '', + 14 => '', + 15 => '', + 16 => '', + 17 => '', + 18 => '', + 19 => '', + 20 => '', + 21 => '', + 22 => '', + 23 => '', + 24 => '', + 25 => '', + 26 => '', + 27 => '', + 28 => '', + 29 => '' + ), + 'OOLANG' => true, + 'OBJECT_SPLITTERS' => array( + 0 => '→', + 1 => 'OF' + ), + 'REGEXPS' => array( + 0 => $a68['BITS'], + 1 => $a68['REAL'] + # 2 => $a68['INT'], # Breaks formatting for some reason # + # 2 => $GESHI_NUMBER_INT_BASIC # Also breaks formatting # + ), + 'STRICT_MODE_APPLIES' => GESHI_NEVER, + 'SCRIPT_DELIMITERS' => array(), + 'HIGHLIGHT_STRICT_BLOCK' => array() +); + +unset($a68); +?> \ No newline at end of file diff --git a/inc/geshi/apache.php b/inc/geshi/apache.php index 34704eb2234a16d9e2dafe0cf4dfe780865e5840..ace3862ef70fb9f54a23628cd186762ef825e877 100644 --- a/inc/geshi/apache.php +++ b/inc/geshi/apache.php @@ -4,7 +4,7 @@ * ---------- * Author: Tux (tux@inmail.cz) * Copyright: (c) 2004 Tux (http://tux.a4.cz/), Nigel McNie (http://qbnz.com/highlighter) - * Release Version: 1.0.8.8 + * Release Version: 1.0.8.10 * Date Started: 2004/29/07 * * Apache language file for GeSHi. @@ -344,6 +344,9 @@ $language_data = array ( //mod_unique_id.c + //mod_upload_progress + 'ReportUploads', 'TrackUploads', 'UploadProgressSharedMemorySize', + //mod_userdir.c 'UserDir', diff --git a/inc/geshi/applescript.php b/inc/geshi/applescript.php index 9e214f2e117300311d170619e94d35da4f915d00..c64a4974d6e2a483bab0c99d3d917d4e2b3547ab 100644 --- a/inc/geshi/applescript.php +++ b/inc/geshi/applescript.php @@ -4,7 +4,7 @@ * -------- * Author: Stephan Klimek (http://www.initware.org) * Copyright: Stephan Klimek (http://www.initware.org) - * Release Version: 1.0.8.8 + * Release Version: 1.0.8.10 * Date Started: 2005/07/20 * * AppleScript language file for GeSHi. diff --git a/inc/geshi/apt_sources.php b/inc/geshi/apt_sources.php index f4cf9ae3fc29a57d00dc70c257cdbdf6a558b689..9feefceaf9e8da5da9a0122a98fa82f46db9cb7f 100644 --- a/inc/geshi/apt_sources.php +++ b/inc/geshi/apt_sources.php @@ -4,7 +4,7 @@ * ---------- * Author: Milian Wolff (mail@milianw.de) * Copyright: (c) 2008 Milian Wolff (http://milianw.de) - * Release Version: 1.0.8.8 + * Release Version: 1.0.8.10 * Date Started: 2008/06/17 * * Apt sources.list language file for GeSHi. @@ -55,7 +55,7 @@ $language_data = array ( 'stable/updates', //Debian 'buzz', 'rex', 'bo', 'hamm', 'slink', 'potato', 'woody', 'sarge', - 'etch', 'lenny', 'sid', + 'etch', 'lenny', 'wheezy', 'sid', //Ubuntu 'warty', 'warty-updates', 'warty-security', 'warty-proposed', 'warty-backports', 'hoary', 'hoary-updates', 'hoary-security', 'hoary-proposed', 'hoary-backports', @@ -65,7 +65,11 @@ $language_data = array ( 'feisty', 'feisty-updates', 'feisty-security', 'feisty-proposed', 'feisty-backports', 'gutsy', 'gutsy-updates', 'gutsy-security', 'gutsy-proposed', 'gutsy-backports', 'hardy', 'hardy-updates', 'hardy-security', 'hardy-proposed', 'hardy-backports', - 'intrepid', 'intrepid-updates', 'intrepid-security', 'intrepid-proposed', 'intrepid-backports' + 'intrepid', 'intrepid-updates', 'intrepid-security', 'intrepid-proposed', 'intrepid-backports', + 'jaunty', 'jaunty-updates', 'jaunty-security', 'jaunty-proposed', 'jaunty-backports', + 'karmic', 'karmic-updates', 'karmic-security', 'karmic-proposed', 'karmic-backports', + 'lucid', 'lucid-updates', 'lucid-security', 'lucid-proposed', 'lucid-backports', + 'maverick', 'maverick-updates', 'maverick-security', 'maverick-proposed', 'maverick-backports' ), 3 => array( 'main', 'restricted', 'preview', 'contrib', 'non-free', @@ -141,4 +145,4 @@ $language_data = array ( 'TAB_WIDTH' => 4 ); -?> +?> \ No newline at end of file diff --git a/inc/geshi/asm.php b/inc/geshi/asm.php index d54e2402328cdb48bc4f8dd9538c9332a68f02fc..2093d86b8f60e8cb0a971132d130f14cd381a772 100644 --- a/inc/geshi/asm.php +++ b/inc/geshi/asm.php @@ -4,7 +4,7 @@ * ------- * Author: Tux (tux@inmail.cz) * Copyright: (c) 2004 Tux (http://tux.a4.cz/), Nigel McNie (http://qbnz.com/highlighter) - * Release Version: 1.0.8.8 + * Release Version: 1.0.8.10 * Date Started: 2004/07/27 * * x86 Assembler language file for GeSHi. @@ -99,9 +99,9 @@ $language_data = array ( 4 => array( '186','286','286c','286p','287','386','386c','386p','387','486','486p', '8086','8087','alpha','break','code','const','continue','cref','data','data?', - 'dosseg','else','elseif','endif','endw','err','err1','err2','errb', + 'dosseg','else','elseif','endif','endw','equ','err','err1','err2','errb', 'errdef','errdif','errdifi','erre','erridn','erridni','errnb','errndef', - 'errnz','exit','fardata','fardata?','if','lall','lfcond','list','listall', + 'errnz','exit','fardata','fardata?','global','if','lall','lfcond','list','listall', 'listif','listmacro','listmacroall',' model','no87','nocref','nolist', 'nolistif','nolistmacro','radix','repeat','sall','seq','sfcond','stack', 'startup','tfcond','type','until','untilcxz','while','xall','xcref', @@ -114,7 +114,7 @@ $language_data = array ( 'irp','irpc','label','le','length','lengthof','local','low','lowword','lroffset', 'macro','mask','mod','msfloat','name','ne','offset','opattr','option','org','%out', 'page','popcontext','private','proc','proto','ptr','public','purge','pushcontext','record', - 'rept','seg','segment','short','size','sizeof','sizestr','struc','struct', + 'resb','resd','resw','rept','section','seg','segment','short','size','sizeof','sizestr','struc','struct', 'substr','subtitle','subttl','textequ','this','title','typedef','union','width', '.model', '.stack', '.code', '.data' ), @@ -222,4 +222,4 @@ $language_data = array ( ) ); -?> +?> \ No newline at end of file diff --git a/inc/geshi/asp.php b/inc/geshi/asp.php index 4a9d6c8e284f1e6dd4ca877e7d569b5aa3353a1a..c011de96051cb300003da064cf29b9c46f8a3b29 100644 --- a/inc/geshi/asp.php +++ b/inc/geshi/asp.php @@ -4,7 +4,7 @@ * -------- * Author: Amit Gupta (http://blog.igeek.info/) * Copyright: (c) 2004 Amit Gupta (http://blog.igeek.info/), Nigel McNie (http://qbnz.com/highlighter) - * Release Version: 1.0.8.8 + * Release Version: 1.0.8.10 * Date Started: 2004/08/13 * * ASP language file for GeSHi. diff --git a/inc/geshi/autoconf.php b/inc/geshi/autoconf.php index 0883f9f54edbe080c94c75e3feadc6940c02ebe0..901125bdce64a7cc50a649f1f3a86f2fd2f8e90e 100644 --- a/inc/geshi/autoconf.php +++ b/inc/geshi/autoconf.php @@ -4,7 +4,7 @@ * ----- * Author: Mihai Vasilian (grayasm@gmail.com) * Copyright: (c) 2010 Mihai Vasilian - * Release Version: 1.0.8.8 + * Release Version: 1.0.8.10 * Date Started: 2010/01/25 * * autoconf language file for GeSHi. diff --git a/inc/geshi/autohotkey.php b/inc/geshi/autohotkey.php index 6a35283345bd34b0ffd2f21a55385f8f55ac359a..c162f7adea673559d038fbe3b5c55f4d3b8d6609 100644 --- a/inc/geshi/autohotkey.php +++ b/inc/geshi/autohotkey.php @@ -4,7 +4,7 @@ * -------- * Author: Naveen Garg (naveen.garg@gmail.com) * Copyright: (c) 2009 Naveen Garg and GeSHi - * Release Version: 1.0.8.8 + * Release Version: 1.0.8.10 * Date Started: 2009/06/11 * * Autohotkey language file for GeSHi. diff --git a/inc/geshi/autoit.php b/inc/geshi/autoit.php index c8ef4404bb09d7adb793aafd40f5b2c3fa768d42..7f69d2bd5a32693d17c46da10278ee07e7013fe2 100644 --- a/inc/geshi/autoit.php +++ b/inc/geshi/autoit.php @@ -4,7 +4,7 @@ * -------- * Author: big_daddy (robert.i.anthony@gmail.com) * Copyright: (c) 2006 and to GESHi ;) - * Release Version: 1.0.8.8 + * Release Version: 1.0.8.10 * Date Started: 2006/01/26 * * AutoIT language file for GeSHi. diff --git a/inc/geshi/avisynth.php b/inc/geshi/avisynth.php index f74f50c3a92bdd15549bba4521ecebb908876146..949d0ecb62258105209aec5586f54f6fb4f5b00d 100644 --- a/inc/geshi/avisynth.php +++ b/inc/geshi/avisynth.php @@ -4,7 +4,7 @@ * -------- * Author: Ryan Jones (sciguyryan@gmail.com) * Copyright: (c) 2008 Ryan Jones - * Release Version: 1.0.8.8 + * Release Version: 1.0.8.10 * Date Started: 2008/10/08 * * AviSynth language file for GeSHi. diff --git a/inc/geshi/awk.php b/inc/geshi/awk.php index 5d540315c852a13cbb32d2a61bbced3e20b12652..a1ab68ef15bc42206e8983a0b8c02cb3aec7bcef 100644 --- a/inc/geshi/awk.php +++ b/inc/geshi/awk.php @@ -4,7 +4,7 @@ * ------- * Author: George Pollard (porges@porg.es) * Copyright: (c) 2009 George Pollard - * Release Version: 1.0.8.8 + * Release Version: 1.0.8.10 * Date Started: 2009/01/28 * * Awk language file for GeSHi. diff --git a/inc/geshi/bascomavr.php b/inc/geshi/bascomavr.php new file mode 100644 index 0000000000000000000000000000000000000000..8270fb26e9997e4bf066b844ca72ed91e0d16e06 --- /dev/null +++ b/inc/geshi/bascomavr.php @@ -0,0 +1,185 @@ +<?php +/************************************************************************************* + * bascomavr.php + * --------------------------------- + * Author: aquaticus.info + * Copyright: (c) 2008 aquaticus.info + * Release Version: 1.0.8.10 + * Date Started: 2008/01/09 + * + * BASCOM AVR language file for GeSHi. + * + * You can find the BASCOM AVR Website at (www.mcselec.com/bascom-avr.htm) + * + * CHANGES + * ------- + * 2008/01/09 (1.0.8.10) + * - First Release + * + ************************************************************************************* + * + * This file is part of GeSHi. + * + * GeSHi is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * GeSHi is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with GeSHi; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + ************************************************************************************/ + +$language_data = array ( + 'LANG_NAME' => 'BASCOM AVR', + 'COMMENT_SINGLE' => array(1 => "'"), + 'COMMENT_MULTI' => array(), + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array('"'), + 'ESCAPE_CHAR' => '', + 'KEYWORDS' => array( + 1 => array( + // Navy Blue Bold Keywords + '1WRESET' , '1WREAD' , '1WWRITE' , '1WSEARCHFIRST' , '1WSEARCHNEXT' ,'1WVERIFY' , '1WIRECOUNT', + 'CONFIG' , 'ACI' , 'ADC' , 'BCCARD' , 'CLOCK' , 'COM1' , + 'COM2' , 'PS2EMU' , 'ATEMU' , 'I2CSLAVE' , + 'INPUT', 'OUTPUT', 'GRAPHLCD' , 'KEYBOARD' , 'TIMER0' , 'TIMER1' , + 'LCDBUS' , 'LCDMODE' , '1WIRE' , 'LCD' , 'SERIALOUT' , + 'SERIALIN' , 'SPI' , 'LCDPIN' , 'SDA' , 'SCL' , + 'WATCHDOG' , 'PORT' , 'COUNTER0', 'COUNTER1' , 'TCPIP' , 'TWISLAVE' , + 'X10' , 'XRAM' , 'USB', + 'BCD' , 'GRAY2BIN' , 'BIN2GRAY' , 'BIN' , 'MAKEBCD' , 'MAKEDEC' , 'MAKEINT' , 'FORMAT' , 'FUSING' , 'BINVAL' , + 'CRC8' , 'CRC16' , 'CRC16UNI' , 'CRC32' , 'HIGH' , 'HIGHW' , 'LOW', + 'DATE' , 'TIME' , 'DATE$' , 'TIME$' , 'DAYOFWEEK' , 'DAYOFYEAR' , 'SECOFDAY' , 'SECELAPSED' , 'SYSDAY' , 'SYSSEC' , 'SYSSECELAPSED', + 'WAIT' , 'WAITMS' , 'WAITUS' , 'DELAY', + 'BSAVE' , 'BLOAD' , 'GET' , 'VER' , 'DISKFREE' , 'DIR' , 'DriveReset' , 'DriveInit' , 'LINE' , 'INITFILESYSTEM' , + 'EOF' , 'WRITE' , 'FLUSH' , 'FREEFILE' , 'FILEATTR' , 'FILEDATE' , 'FILETIME' , 'FILEDATETIME' , 'FILELEN' , 'SEEK' , + 'KILL' , 'DriveGetIdentity' , 'DriveWriteSector' , 'DriveReadSector' , 'LOC' , 'LOF' , 'PUT' , 'OPEN' , 'CLOSE', + 'GLCDCMD' , 'GLCDDATA' , 'SETFONT' , 'PSET' , 'SHOWPIC' , 'SHOWPICE' , 'CIRCLE' , 'BOX', + 'I2CINIT' , 'I2CRECEIVE' , 'I2CSEND' , 'I2CSTART','I2CSTOP','I2CRBYTE','I2CWBYTE', + 'ALIAS' , 'BITWAIT' , 'TOGGLE' , 'RESET' , 'SET' , 'SHIFTIN' , 'SHIFTOUT' , 'DEBOUNCE' , 'PULSEIN' , 'PULSEOUT', + 'IDLE' , 'POWERDOWN' , 'POWERSAVE' , 'ON', 'INTERRUPT' , 'ENABLE' , 'DISABLE' , 'START' , 'VERSION' , 'CLOCKDIVISION' , 'CRYSTAL' , 'STOP', + 'ADR' , 'ADR2' , 'WRITEEEPROM' , 'CPEEK' , 'CPEEKH' , 'PEEK' , 'POKE' , 'OUT' , 'READEEPROM' , 'DATA' , 'INP' , 'READ' , 'RESTORE' , 'LOOKDOWN' , 'LOOKUP' , 'LOOKUPSTR' , 'LOAD' , 'LOADADR' , 'LOADLABEL' , 'LOADWORDADR' , 'MEMCOPY', + 'RC5SEND' , 'RC6SEND' , 'GETRC5' , 'SONYSEND', + 'BAUD' , 'BAUD1', 'BUFSPACE' , 'CLEAR', 'ECHO' , 'WAITKEY' , 'ISCHARWAITING' , 'INKEY' , 'INPUTBIN' , 'INPUTHEX' , 'PRINT', 'PRINT1','PRINT0', 'PRINTBIN' , 'SERIN' , 'SEROUT' , 'SPC' , 'MAKEMODBUS', + 'SPIIN' , 'SPIINIT' , 'SPIMOVE' , 'SPIOUT', 'SINGLE', + 'ASC' , 'UCASE' , 'LCASE' , 'TRIM' , 'SPLIT' , 'LTRIM' , 'INSTR' , 'SPACE' , 'RTRIM' , 'LEFT' , 'LEN' , 'MID' , 'RIGHT' , 'VAL' , 'STR' , 'CHR' , 'CHECKSUM' , 'HEX' , 'HEXVAL', + 'BASE64DEC' , 'BASE64ENC' , 'IP2STR' , 'UDPREAD' , 'UDPWRITE' , 'UDPWRITESTR' , 'TCPWRITE' , 'TCPWRITESTR' , 'TCPREAD' , 'GETDSTIP' , 'GETDSTPORT' , 'SOCKETSTAT' , 'SOCKETCONNECT' , 'SOCKETLISTEN' , 'GETSOCKET' , 'CLOSESOCKET' , + 'SETTCP' , 'GETTCPREGS' , 'SETTCPREGS' , 'SETIPPROTOCOL' , 'TCPCHECKSUM', + 'HOME' , 'CURSOR' , 'UPPERLINE' , 'THIRDLINE' , 'INITLCD' , 'LOWERLINE' , 'LCDAT' , 'FOURTHLINE' , 'DISPLAY' , 'LCDCONTRAST' , 'LOCATE' , 'SHIFTCURSOR' , 'DEFLCDCHAR' , 'SHIFTLCD' , 'CLS', + 'ACOS' , 'ASIN' , 'ATN' , 'ATN2' , 'EXP' , 'RAD2DEG' , 'FRAC' , 'TAN' , 'TANH' , 'COS' , 'COSH' , 'LOG' , 'LOG10' , 'ROUND' , 'ABS' , 'INT' , 'MAX' , 'MIN' , 'SQR' , 'SGN' , 'POWER' , 'SIN' , 'SINH' , 'FIX' , 'INCR' , 'DECR' , 'DEG2RAD', + 'DBG' , 'DEBUG', 'DTMFOUT' , 'ENCODER' , 'GETADC' , 'GETKBD' , 'GETATKBD' , 'GETRC' , 'VALUE' , 'POPALL' , 'PS2MOUSEXY' , 'PUSHALL' , + 'RETURN' , 'RND' , 'ROTATE' , 'SENDSCAN' , 'SENDSCANKBD' , 'SHIFT' , 'SOUND' , 'STCHECK' , 'SWAP' , 'VARPTR' , 'X10DETECT' , 'X10SEND' , 'READMAGCARD' , 'REM' , 'BITS' , 'BYVAL' , 'CALL' , 'READHITAG', + 'Buffered', 'Size', 'Dummy', 'Parity', 'None', 'Stopbits', 'Databits', 'Clockpol', 'Synchrone', 'Prescaler', 'Reference', 'int0', 'int1', 'Interrupts', + 'Auto', 'avcc', 'ack', 'nack', 'Pin', 'Db4', 'Db3', 'Db2', 'Db1', 'Db7', 'Db6', 'Db5', 'Db0', 'e', 'rs', 'twi', + ), + 2 => array( + // Red Lowercase Keywords + '$ASM' , '$BAUD' , '$BAUD1' , '$BGF' , '$BOOT' , '$CRYSTAL' , '$DATA' , '$DBG' , '$DEFAULT' , '$EEPLEAVE' , '$EEPROM' , + '$EEPROMHEX' , '$EXTERNAL' , '$HWSTACK' , '$INC' , '$INCLUDE' , '$INITMICRO' , '$LCD' , '$LCDRS' , '$LCDPUTCTRL' , + '$LCDPUTDATA' , '$LCDVFO' , '$LIB' , '$LOADER' , '$LOADERSIZE' , '$MAP' , '$NOCOMPILE' , '$NOINIT' , '$NORAMCLEAR' , + '$PROG' , '$PROGRAMMER' , '$REGFILE' , '$RESOURCE' , '$ROMSTART', '$SERIALINPUT', '$SERIALINPUT1' , '$SERIALINPUT2LCD' , + '$SERIALOUTPUT' , '$SERIALOUTPUT1' , '$SIM' , '$SWSTACK' , '$TIMEOUT' , '$TINY' , '$WAITSTATE' , '$XRAMSIZE' , '$XRAMSTART', '$XA', + '#IF' , '#ELSE' , '#ENDIF', '$framesize' + ), + 3 => array( + // Blue Lowercase Keywords + 'IF', 'THEN', 'ELSE', 'END', 'WHILE', 'WEND', 'DO', 'LOOP', 'SELECT', 'CASE', 'FOR', 'NEXT', + 'GOSUB' , 'GOTO' , 'LOCAL' , 'SUB' , 'DEFBIT', 'DEFBYTE', 'DEFINT', 'DEFWORD', 'DEFLNG', 'DEFSNG', 'DEFDBL', + 'CONST', 'DECLARE', 'FUNCTION', 'DIM', 'EXIT', 'LONG', 'INTEGER', 'BYTE', 'AS', 'STRING', 'WORD' + ), + 4 => array( + //light blue + 'PINA.0', 'PINA.1', 'PINA.2', 'PINA.3', 'PINA.4', 'PINA.5', 'PINA.6', 'PINA.7', + 'PINB.0', 'PINB.1', 'PINB.2', 'PINB.3', 'PINB.4', 'PINB.5', 'PINB.6', 'PINB.7', + 'PINC.0', 'PINC.1', 'PINC.2', 'PINC.3', 'PINC.4', 'PINC.5', 'PINC.6', 'PINC.7', + 'PIND.0', 'PIND.1', 'PIND.2', 'PIND.3', 'PIND.4', 'PIND.5', 'PIND.6', 'PIND.7', + 'PINE.0', 'PINE.1', 'PINE.2', 'PINE.3', 'PINE.4', 'PINE.5', 'PINE.6', 'PINE.7', + 'PINF.0', 'PINF.1', 'PINF.2', 'PINF.3', 'PINF.4', 'PINF.5', 'PINF.6', 'PINF.7', + + 'PORTA.0', 'PORTA.1', 'PORTA.2', 'PORTA.3', 'PORTA.4', 'PORTA.5', 'PORTA.6', 'PORTA.7', + 'PORTB.0', 'PORTB.1', 'PORTB.2', 'PORTB.3', 'PORTB.4', 'PORTB.5', 'PORTB.6', 'PORTB.7', + 'PORTC.0', 'PORTC.1', 'PORTC.2', 'PORTC.3', 'PORTC.4', 'PORTC.5', 'PORTC.6', 'PORTC.7', + 'PORTD.0', 'PORTD.1', 'PORTD.2', 'PORTD.3', 'PORTD.4', 'PORTD.5', 'PORTD.6', 'PORTD.7', + 'PORTE.0', 'PORTE.1', 'PORTE.2', 'PORTE.3', 'PORTE.4', 'PORTE.5', 'PORTE.6', 'PORTE.7', + 'PORTF.0', 'PORTF.1', 'PORTF.2', 'PORTF.3', 'PORTF.4', 'PORTF.5', 'PORTF.6', 'PORTF.7', + + 'DDRA.0', 'DDRA.1', 'DDRA.2', 'DDRA.3', 'DDRA.4', 'DDRA.5', 'DDRA.6', 'DDRA.7', + 'DDRB.0', 'DDRB.1', 'DDRB.2', 'DDRB.3', 'DDRB.4', 'DDRB.5', 'DDRB.6', 'DDRB.7', + 'DDRC.0', 'DDRC.1', 'DDRC.2', 'DDRC.3', 'DDRC.4', 'DDRC.5', 'DDRC.6', 'DDRC.7', + 'DDRD.0', 'DDRD.1', 'DDRD.2', 'DDRD.3', 'DDRD.4', 'DDRD.5', 'DDRD.6', 'DDRD.7', + 'DDRE.0', 'DDRE.1', 'DDRE.2', 'DDRE.3', 'DDRE.4', 'DDRE.5', 'DDRE.6', 'DDRE.7', + 'DDRF.0', 'DDRF.1', 'DDRF.2', 'DDRF.3', 'DDRF.4', 'DDRF.5', 'DDRF.6', 'DDRF.7', + + 'DDRA','DDRB','DDRC','DDRD','DDRE','DDRF', + 'PORTA','PORTB','PORTC','PORTD','PORTE','PORTF', + 'PINA','PINB','PINC','PIND','PINE','PINF', + ) + ), + 'SYMBOLS' => array( + '=', '<', '>', '>=', '<=', '+', '-', '*', '/', '%', '(', ')', '{', '}', '[', ']', ';', ':', '$', '&H' + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => false, + 1 => false, + 2 => false, + 3 => false, + 4 => false, + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: #000080; font-weight: bold;', + 2 => 'color: #FF0000;', + 3 => 'color: #0000FF;', + 4 => 'color: #0080FF;', + ), + 'COMMENTS' => array( + 1 => 'color: #657CC4; font-style: italic;' + ), + 'BRACKETS' => array( + 0 => 'color: #000080;' + ), + 'STRINGS' => array( + 0 => 'color: #008000;' + ), + 'NUMBERS' => array( + 0 => 'color: #000080; font-weight: bold;' + ), + 'METHODS' => array( + ), + 'SYMBOLS' => array( + 0 => 'color: #0000FF;' + ), + 'ESCAPE_CHAR' => array( + ), + 'SCRIPT' => array( + ), + 'REGEXPS' => array( + ) + ), + 'URLS' => array( + 1 => '', + 2 => '', + 3 => '', + 4 => '' + ), + 'OOLANG' => false, + 'OBJECT_SPLITTERS' => array( + ), + 'REGEXPS' => array( + ), + 'STRICT_MODE_APPLIES' => GESHI_NEVER, + 'SCRIPT_DELIMITERS' => array( + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + ), + 'TAB_WIDTH' => 4 +); + +?> \ No newline at end of file diff --git a/inc/geshi/bash.php b/inc/geshi/bash.php index dad391c8a3c70e4b24ab9ffc2b23a47eb5bf45a8..8edb3f30e2db660465bce613db14227c9e244af9 100644 --- a/inc/geshi/bash.php +++ b/inc/geshi/bash.php @@ -4,7 +4,7 @@ * -------- * Author: Andreas Gohr (andi@splitbrain.org) * Copyright: (c) 2004 Andreas Gohr, Nigel McNie (http://qbnz.com/highlighter) - * Release Version: 1.0.8.8 + * Release Version: 1.0.8.10 * Date Started: 2004/08/20 * * BASH language file for GeSHi. @@ -65,7 +65,10 @@ $language_data = array ( //BASH-style Heredoc 2 => '/<<-?\s*?(\'?)([a-zA-Z0-9]+)\1\\n.*\\n\\2(?![a-zA-Z0-9])/siU', //Escaped String Starters - 3 => "/\\\\['\"]/siU" + 3 => "/\\\\['\"]/siU", + // Single-Line Shell usage: Hide the prompt at the beginning + /* 4 => "/\A(?!#!)\s*(?>[\w:@\\/\\-\\._~]*[$#]\s?)?(?=[^\n]+\n?\Z)|^(?!#!)(\w+@)?[\w\\-\\.]+(:~?)[\w\\/\\-\\._]*?[$#]\s?/ms" */ + 4 => "/\A(?!#!)(?:(?>[\w:@\\/\\-\\._~]*)[$#]\s?)(?=(?>[^\n]+)\n?\Z)|^(?!#!)(?:\w+@)?(?>[\w\\-\\.]+)(?>:~?[\w\\/\\-\\._]*?)?[$#]\s?/sm" ), 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, 'QUOTEMARKS' => array('"'), @@ -90,10 +93,44 @@ $language_data = array ( 'if', 'in', 'select', 'set', 'then', 'until', 'while', 'time' ), 2 => array( - 'aclocal', 'aconnect', 'aplay', 'apm', 'apmsleep', 'apropos', - 'apt-cache', 'apt-file', 'apt-get', 'apt-key', 'apt-src', 'aptitude', - 'ar', 'arch', 'arecord', 'as', 'as86', 'ash', 'autoconf', - 'autoheader', 'automake', 'awk', + 'aclocal', 'aconnect', 'apachectl', 'apache2ctl', 'aplay', 'apm', + 'apmsleep', 'apropos', 'apt-cache', 'apt-cdrom', 'apt-config', + 'apt-file', 'apt-ftparchive', 'apt-get', 'apt-key', 'apt-listbugs', + 'apt-listchanges', 'apt-mark', 'apt-mirror', 'apt-sortpkgs', + 'apt-src', 'apticron', 'aptitude', 'aptsh', 'apxs', 'apxs2', 'ar', + 'arch', 'arecord', 'as', 'as86', 'ash', 'autoconf', 'autoheader', + 'automake', 'awk', + + 'apachectl start', 'apachectl stop', 'apachectl restart', + 'apachectl graceful', 'apachectl graceful-stop', + 'apachectl configtest', 'apachectl status', 'apachectl fullstatus', + 'apachectl help', 'apache2ctl start', 'apache2ctl stop', + 'apache2ctl restart', 'apache2ctl graceful', + 'apache2ctl graceful-stop', 'apache2ctl configtest', + 'apache2ctl status', 'apache2ctl fullstatus', 'apache2ctl help', + + 'apt-cache add', 'apt-cache depends', 'apt-cache dotty', + 'apt-cache dump', 'apt-cache dumpavail', 'apt-cache gencaches', + 'apt-cache pkgnames', 'apt-cache policy', 'apt-cache rdepends', + 'apt-cache search', 'apt-cache show', 'apt-cache showauto', + 'apt-cache showpkg', 'apt-cache showsrc', 'apt-cache stats', + 'apt-cache unmet', 'apt-cache xvcg', 'apt-cdrom add', + 'apt-cdrom ident', 'apt-config dump', 'apt-config shell', + 'apt-file find', 'apt-file list', 'apt-file purge', + 'apt-file search', 'apt-file shot', 'apt-file update', + 'apt-get autoclean', 'apt-get autoremove', 'apt-get build-dep', + 'apt-get check', 'apt-get clean', 'apt-get dist-upgrade', + 'apt-get dselect-upgrade', 'apt-get install', 'apt-get markauto', + 'apt-get purge', 'apt-get remove', 'apt-get source', + 'apt-get unmarkauto', 'apt-get update', 'apt-get upgrade', + 'apt-key add', 'apt-key adv', 'apt-key del', 'apt-key export', + 'apt-key exportall', 'apt-key finger', 'apt-key list', + 'apt-key net-update', 'apt-key update', 'apt-listbugs apt', + 'apt-listbugs list', 'apt-listbugs rss', 'apt-src build', + 'apt-src clean', 'apt-src import', 'apt-src install', + 'apt-src list', 'apt-src location', 'apt-src name', + 'apt-src remove', 'apt-src update', 'apt-src upgrade', + 'apt-src version', 'basename', 'bash', 'bc', 'bison', 'bunzip2', 'bzcat', 'bzcmp', 'bzdiff', 'bzegrep', 'bzfgrep', 'bzgrep', @@ -104,6 +141,14 @@ $language_data = array ( 'chown', 'chroot', 'chsh', 'chvt', 'clear', 'cmp', 'comm', 'co', 'col', 'cp', 'cpio', 'cpp', 'csh', 'cut', 'cvs', 'cvs-pserver', + 'cvs add', 'cvs admin', 'cvs annotate', 'cvs checkout', + 'cvs commit', 'cvs diff', 'cvs edit', 'cvs editors', 'cvs export', + 'cvs history', 'cvs import', 'cvs init', 'cvs log', 'cvs login', + 'cvs logout', 'cvs ls', 'cvs pserver', 'cvs rannotate', + 'cvs rdiff', 'cvs release', 'cvs remove', 'cvs rlog', 'cvs rls', + 'cvs rtag', 'cvs server', 'cvs status', 'cvs tag', 'cvs unedit', + 'cvs update', 'cvs version', 'cvs watch', 'cvs watchers', + 'dash', 'date', 'dc', 'dch', 'dcop', 'dd', 'ddate', 'ddd', 'deallocvt', 'debconf', 'defoma', 'depmod', 'df', 'dh', 'dialog', 'diff', 'diff3', 'dig', 'dir', 'dircolors', 'directomatic', @@ -120,7 +165,47 @@ $language_data = array ( 'gimptool', 'gmake', 'gocr', 'grep', 'groups', 'gs', 'gunzip', 'gzexe', 'gzip', - 'git', 'gitaction', 'git-add', 'git-add--interactive', 'git-am', + 'git', 'git add', 'git add--interactive', 'git am', 'git annotate', + 'git apply', 'git archive', 'git bisect', 'git bisect--helper', + 'git blame', 'git branch', 'git bundle', 'git cat-file', + 'git check-attr', 'git checkout', 'git checkout-index', + 'git check-ref-format', 'git cherry', 'git cherry-pick', + 'git clean', 'git clone', 'git commit', 'git commit-tree', + 'git config', 'git count-objects', 'git daemon', 'git describe', + 'git diff', 'git diff-files', 'git diff-index', 'git difftool', + 'git difftool--helper', 'git diff-tree', 'git fast-export', + 'git fast-import', 'git fetch', 'git fetch-pack', + 'git filter-branch', 'git fmt-merge-msg', 'git for-each-ref', + 'git format-patch', 'git fsck', 'git fsck-objects', 'git gc', + 'git get-tar-commit-id', 'git grep', 'git hash-object', 'git help', + 'git http-backend', 'git http-fetch', 'git http-push', + 'git imap-send', 'git index-pack', 'git init', 'git init-db', + 'git instaweb', 'git log', 'git lost-found', 'git ls-files', + 'git ls-remote', 'git ls-tree', 'git mailinfo', 'git mailsplit', + 'git merge', 'git merge-base', 'git merge-file', 'git merge-index', + 'git merge-octopus', 'git merge-one-file', 'git merge-ours', + 'git merge-recursive', 'git merge-resolve', 'git merge-subtree', + 'git mergetool', 'git merge-tree', 'git mktag', 'git mktree', + 'git mv', 'git name-rev', 'git notes', 'git pack-objects', + 'git pack-redundant', 'git pack-refs', 'git patch-id', + 'git peek-remote', 'git prune', 'git prune-packed', 'git pull', + 'git push', 'git quiltimport', 'git read-tree', 'git rebase', + 'git rebase--interactive', 'git receive-pack', 'git reflog', + 'git relink', 'git remote', 'git remote-ftp', 'git remote-ftps', + 'git remote-http', 'git remote-https', 'git remote-testgit', + 'git repack', 'git replace', 'git repo-config', 'git request-pull', + 'git rerere', 'git reset', 'git revert', 'git rev-list', + 'git rev-parse', 'git rm', 'git send-pack', 'git shell', + 'git shortlog', 'git show', 'git show-branch', 'git show-index', + 'git show-ref', 'git stage', 'git stash', 'git status', + 'git stripspace', 'git submodule', 'git symbolic-ref', 'git tag', + 'git tar-tree', 'git unpack-file', 'git unpack-objects', + 'git update-index', 'git update-ref', 'git update-server-info', + 'git upload-archive', 'git upload-pack', 'git var', + 'git verify-pack', 'git verify-tag', 'git web--browse', + 'git whatchanged', 'git write-tree', + + 'gitaction', 'git-add', 'git-add--interactive', 'git-am', 'git-annotate', 'git-apply', 'git-archive', 'git-bisect', 'git-bisect--helper', 'git-blame', 'git-branch', 'git-bundle', 'git-cat-file', 'git-check-attr', 'git-checkout', @@ -166,6 +251,9 @@ $language_data = array ( 'id', 'ifconfig', 'ifdown', 'ifup', 'igawk', 'install', + 'ip', 'ip addr', 'ip addrlabel', 'ip link', 'ip maddr', 'ip mroute', + 'ip neigh', 'ip route', 'ip rule', 'ip tunnel', 'ip xfrm', + 'join', 'kbd_mode','kbdrate', 'kdialog', 'kfile', 'kill', 'killall', @@ -200,6 +288,20 @@ $language_data = array ( 'svnadmin', 'svndumpfilter', 'svnlook', 'svnmerge', 'svnmucc', 'svnserve', 'svnshell', 'svnsync', 'svnversion', 'svnwrap', 'sync', + 'svn add', 'svn ann', 'svn annotate', 'svn blame', 'svn cat', + 'svn changelist', 'svn checkout', 'svn ci', 'svn cl', 'svn cleanup', + 'svn co', 'svn commit', 'svn copy', 'svn cp', 'svn del', + 'svn delete', 'svn di', 'svn diff', 'svn export', 'svn h', + 'svn help', 'svn import', 'svn info', 'svn list', 'svn lock', + 'svn log', 'svn ls', 'svn merge', 'svn mergeinfo', 'svn mkdir', + 'svn move', 'svn mv', 'svn pd', 'svn pdel', 'svn pe', 'svn pedit', + 'svn pg', 'svn pget', 'svn pl', 'svn plist', 'svn praise', + 'svn propdel', 'svn propedit', 'svn propget', 'svn proplist', + 'svn propset', 'svn ps', 'svn pset', 'svn remove', 'svn ren', + 'svn rename', 'svn resolve', 'svn resolved', 'svn revert', 'svn rm', + 'svn st', 'svn stat', 'svn status', 'svn sw', 'svn switch', + 'svn unlock', 'svn up', 'svn update', + 'tac', 'tail', 'tar', 'tee', 'tempfile', 'touch', 'tr', 'tree', 'true', @@ -216,7 +318,14 @@ $language_data = array ( 'xargs', 'xhost', 'xmodmap', 'xset', - 'yacc', 'yes', 'ypdomainname', + 'yacc', 'yes', 'ypdomainname', 'yum', + + 'yum check-update', 'yum clean', 'yum deplist', 'yum erase', + 'yum groupinfo', 'yum groupinstall', 'yum grouplist', + 'yum groupremove', 'yum groupupdate', 'yum info', 'yum install', + 'yum list', 'yum localinstall', 'yum localupdate', 'yum makecache', + 'yum provides', 'yum remove', 'yum resolvedep', 'yum search', + 'yum shell', 'yum update', 'yum upgrade', 'yum whatprovides', 'zcat', 'zcmp', 'zdiff', 'zdump', 'zegrep', 'zfgrep', 'zforce', 'zgrep', 'zip', 'zipgrep', 'zipinfo', 'zless', 'zmore', 'znew', @@ -252,7 +361,8 @@ $language_data = array ( 0 => 'color: #666666; font-style: italic;', 1 => 'color: #800000;', 2 => 'color: #cc0000; font-style: italic;', - 3 => 'color: #000000; font-weight: bold;' + 3 => 'color: #000000; font-weight: bold;', + 4 => 'color: #666666;' ), 'ESCAPE_CHAR' => array( 1 => 'color: #000099; font-weight: bold;', @@ -318,10 +428,13 @@ $language_data = array ( 'DISALLOWED_BEFORE' => '$' ), 'KEYWORDS' => array( - 'DISALLOWED_BEFORE' => "(?<![\.\-a-zA-Z0-9_\$\#])", - 'DISALLOWED_AFTER' => "(?![\.\-a-zA-Z0-9_%=\\/])" + 'DISALLOWED_BEFORE' => "(?<![\.\-a-zA-Z0-9_\$\#:])", + 'DISALLOWED_AFTER' => "(?![\.\-a-zA-Z0-9_%=\\/:])", + 2 => array( + 'SPACE_AS_WHITESPACE' => false + ) + ) ) - ) ); ?> \ No newline at end of file diff --git a/inc/geshi/basic4gl.php b/inc/geshi/basic4gl.php index 7ac869304745e860612e4c1e6acb16b3def41adf..ce409e8a44bd8bda4f98ca206a317fbfbae8f859 100644 --- a/inc/geshi/basic4gl.php +++ b/inc/geshi/basic4gl.php @@ -4,7 +4,7 @@ * --------------------------------- * Author: Matthew Webb (bmatthew1@blueyonder.co.uk) * Copyright: (c) 2004 Matthew Webb (http://matthew-4gl.wikispaces.com) - * Release Version: 1.0.8.8 + * Release Version: 1.0.8.10 * Date Started: 2007/09/15 * * Basic4GL language file for GeSHi. diff --git a/inc/geshi/bf.php b/inc/geshi/bf.php index ba44e6caf68600faa416a2d2de1333af87c996ae..0529ec3c55e3870dfafa3acf892dec230f602b46 100644 --- a/inc/geshi/bf.php +++ b/inc/geshi/bf.php @@ -4,7 +4,7 @@ * ---------- * Author: Benny Baumann (BenBE@geshi.org) * Copyright: (c) 2008 Benny Baumann (http://qbnz.com/highlighter/) - * Release Version: 1.0.8.8 + * Release Version: 1.0.8.10 * Date Started: 2009/10/31 * * Brainfuck language file for GeSHi. diff --git a/inc/geshi/bibtex.php b/inc/geshi/bibtex.php index e47e0665cf11f8147e0fa88d6a2bf00409a92072..13685608b8ad3c9fbc8ce924ce1dedffba89d68f 100644 --- a/inc/geshi/bibtex.php +++ b/inc/geshi/bibtex.php @@ -4,7 +4,7 @@ * ----- * Author: Quinn Taylor (quinntaylor@mac.com) * Copyright: (c) 2009 Quinn Taylor (quinntaylor@mac.com), Nigel McNie (http://qbnz.com/highlighter) - * Release Version: 1.0.8.8 + * Release Version: 1.0.8.10 * Date Started: 2009/04/29 * * BibTeX language file for GeSHi. diff --git a/inc/geshi/blitzbasic.php b/inc/geshi/blitzbasic.php index e43ec4635e9c3047111866653544e1bc7f9081a9..15f24fdbe3f31bd9a823680f9b504e6cd2ffa663 100644 --- a/inc/geshi/blitzbasic.php +++ b/inc/geshi/blitzbasic.php @@ -4,7 +4,7 @@ * -------------- * Author: P�draig O`Connel (info@moonsword.info) * Copyright: (c) 2005 P�draig O`Connel (http://moonsword.info) - * Release Version: 1.0.8.8 + * Release Version: 1.0.8.10 * Date Started: 16.10.2005 * * BlitzBasic language file for GeSHi. diff --git a/inc/geshi/bnf.php b/inc/geshi/bnf.php index f52df9cb89eac1dc7fabd65b87879b3851316cae..7cec792a909b1ecb7948495089ada06f48e8950d 100644 --- a/inc/geshi/bnf.php +++ b/inc/geshi/bnf.php @@ -4,7 +4,7 @@ * -------- * Author: Rowan Rodrik van der Molen (rowan@bigsmoke.us) * Copyright: (c) 2006 Rowan Rodrik van der Molen (http://www.bigsmoke.us/) - * Release Version: 1.0.8.8 + * Release Version: 1.0.8.10 * Date Started: 2006/09/28 * * BNF (Backus-Naur form) language file for GeSHi. diff --git a/inc/geshi/boo.php b/inc/geshi/boo.php index 09d4ee40e2f7f1444e44b79f8e5a34a847dee77a..f56afee5f8275ec6a0eeb7367e5629909f75b7df 100644 --- a/inc/geshi/boo.php +++ b/inc/geshi/boo.php @@ -4,7 +4,7 @@ * -------- * Author: Marcus Griep (neoeinstein+GeSHi@gmail.com) * Copyright: (c) 2007 Marcus Griep (http://www.xpdm.us) - * Release Version: 1.0.8.8 + * Release Version: 1.0.8.10 * Date Started: 2007/09/10 * * Boo language file for GeSHi. diff --git a/inc/geshi/c.php b/inc/geshi/c.php index b0e2987d7d717ab70dd95264bfefe463620caca8..7db6d3d50bcb004590ddccf49a10cce4851e96e0 100644 --- a/inc/geshi/c.php +++ b/inc/geshi/c.php @@ -7,7 +7,7 @@ * - Jack Lloyd (lloyd@randombit.net) * - Michael Mol (mikemol@gmail.com) * Copyright: (c) 2004 Nigel McNie (http://qbnz.com/highlighter/) - * Release Version: 1.0.8.8 + * Release Version: 1.0.8.10 * Date Started: 2004/06/04 * * C language file for GeSHi. @@ -92,7 +92,85 @@ $language_data = array ( 'null', 'false', 'break', 'true', 'function', 'enum', 'extern', 'inline' ), 3 => array( - 'printf', 'cout' + // assert.h + 'assert', + + //complex.h + 'cabs', 'cacos', 'cacosh', 'carg', 'casin', 'casinh', 'catan', + 'catanh', 'ccos', 'ccosh', 'cexp', 'cimag', 'cis', 'clog', 'conj', + 'cpow', 'cproj', 'creal', 'csin', 'csinh', 'csqrt', 'ctan', 'ctanh', + + //ctype.h + 'digittoint', 'isalnum', 'isalpha', 'isascii', 'isblank', 'iscntrl', + 'isdigit', 'isgraph', 'islower', 'isprint', 'ispunct', 'isspace', + 'isupper', 'isxdigit', 'toascii', 'tolower', 'toupper', + + //inttypes.h + 'imaxabs', 'imaxdiv', 'strtoimax', 'strtoumax', 'wcstoimax', + 'wcstoumax', + + //locale.h + 'localeconv', 'setlocale', + + //math.h + 'acos', 'asin', 'atan', 'atan2', 'ceil', 'cos', 'cosh', 'exp', + 'fabs', 'floor', 'frexp', 'ldexp', 'log', 'log10', 'modf', 'pow', + 'sin', 'sinh', 'sqrt', 'tan', 'tanh', + + //setjmp.h + 'longjmp', 'setjmp', + + //signal.h + 'raise', + + //stdarg.h + 'va_arg', 'va_copy', 'va_end', 'va_start', + + //stddef.h + 'offsetof', + + //stdio.h + 'clearerr', 'fclose', 'fdopen', 'feof', 'ferror', 'fflush', 'fgetc', + 'fgetpos', 'fgets', 'fopen', 'fprintf', 'fputc', 'fputchar', + 'fputs', 'fread', 'freopen', 'fscanf', 'fseek', 'fsetpos', 'ftell', + 'fwrite', 'getc', 'getch', 'getchar', 'gets', 'perror', 'printf', + 'putc', 'putchar', 'puts', 'remove', 'rename', 'rewind', 'scanf', + 'setbuf', 'setvbuf', 'snprintf', 'sprintf', 'sscanf', 'tmpfile', + 'tmpnam', 'ungetc', 'vfprintf', 'vfscanf', 'vprintf', 'vscanf', + 'vsprintf', 'vsscanf', + + //stdlib.h + 'abort', 'abs', 'atexit', 'atof', 'atoi', 'atol', 'bsearch', + 'calloc', 'div', 'exit', 'free', 'getenv', 'itoa', 'labs', 'ldiv', + 'ltoa', 'malloc', 'qsort', 'rand', 'realloc', 'srand', 'strtod', + 'strtol', 'strtoul', 'system', + + //string.h + 'memchr', 'memcmp', 'memcpy', 'memmove', 'memset', 'strcat', + 'strchr', 'strcmp', 'strcoll', 'strcpy', 'strcspn', 'strerror', + 'strlen', 'strncat', 'strncmp', 'strncpy', 'strpbrk', 'strrchr', + 'strspn', 'strstr', 'strtok', 'strxfrm', + + //time.h + 'asctime', 'clock', 'ctime', 'difftime', 'gmtime', 'localtime', + 'mktime', 'strftime', 'time', + + //wchar.h + 'btowc', 'fgetwc', 'fgetws', 'fputwc', 'fputws', 'fwide', + 'fwprintf', 'fwscanf', 'getwc', 'getwchar', 'mbrlen', 'mbrtowc', + 'mbsinit', 'mbsrtowcs', 'putwc', 'putwchar', 'swprintf', 'swscanf', + 'ungetwc', 'vfwprintf', 'vswprintf', 'vwprintf', 'wcrtomb', + 'wcscat', 'wcschr', 'wcscmp', 'wcscoll', 'wcscpy', 'wcscspn', + 'wcsftime', 'wcslen', 'wcsncat', 'wcsncmp', 'wcsncpy', 'wcspbrk', + 'wcsrchr', 'wcsrtombs', 'wcsspn', 'wcsstr', 'wcstod', 'wcstok', + 'wcstol', 'wcstoul', 'wcsxfrm', 'wctob', 'wmemchr', 'wmemcmp', + 'wmemcpy', 'wmemmove', 'wmemset', 'wprintf', 'wscanf', + + //wctype.h + 'iswalnum', 'iswalpha', 'iswcntrl', 'iswctype', 'iswdigit', + 'iswgraph', 'iswlower', 'iswprint', 'iswpunct', 'iswspace', + 'iswupper', 'iswxdigit', 'towctrans', 'towlower', 'towupper', + 'wctrans', 'wctype' ), 4 => array( 'auto', 'char', 'const', 'double', 'float', 'int', 'long', @@ -111,7 +189,8 @@ $language_data = array ( 'int8_t', 'int16_t', 'int32_t', 'int64_t', 'uint8_t', 'uint16_t', 'uint32_t', 'uint64_t', - 'intmax_t', 'uintmax_t', 'intptr_t', 'uintptr_t' + 'intmax_t', 'uintmax_t', 'intptr_t', 'uintptr_t', + 'size_t', 'off_t' ), ), 'SYMBOLS' => array( diff --git a/inc/geshi/c_loadrunner.php b/inc/geshi/c_loadrunner.php new file mode 100644 index 0000000000000000000000000000000000000000..4e5429cdad6baacea978c295835dca18036817a2 --- /dev/null +++ b/inc/geshi/c_loadrunner.php @@ -0,0 +1,323 @@ +<?php +/************************************************************************************* + * c_loadrunner.php + * --------------------------------- + * Author: Stuart Moncrieff (stuart at myloadtest dot com) + * Copyright: (c) 2010 Stuart Moncrieff (http://www.myloadtest.com/loadrunner-syntax-highlighter/) + * Release Version: 1.0.8.10 + * Date Started: 2010-07-25 + * + * C (for LoadRunner) language file for GeSHi. + * + * Based on LoadRunner 9.52. + * + * CHANGES + * ------- + * 2010-08-01 (1.0.8.9) + * - Added highlighting support for LoadRunner {parameters}. + * 2010-07-25 (1.0.8.8) + * - First Release. Syntax highlighting support for lr_, web_, and sapgui_ functions only. + * + * TODO (updated 2010-07-25) + * ------------------------- + * - Add support for other vuser types: MMS, FTP, etc. + * + ************************************************************************************* + * + * This file is part of GeSHi. + * + * GeSHi is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * GeSHi is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with GeSHi; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * ************************************************************************************/ + +$language_data = array ( + // The First Indices + 'LANG_NAME' => 'C (LoadRunner)', + 'COMMENT_SINGLE' => array(1 => '//'), + 'COMMENT_MULTI' => array('/*' => '*/'), + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array("'", '"'), + 'ESCAPE_CHAR' => '', + // Escape characters within strings (like \\) are not highlighted differently in LoadRunner, so + // I am using GeSHi escape characters (or regular expressions) to highlight LoadRunner {parameters}. + // LoadRunner {parameters} must begin with a letter and contain only alphanumeric characters and '_' + 'ESCAPE_REGEXP' => array( + 0 => "#\{[a-zA-Z]{1}[a-zA-Z_]{0,}\}#", + ), + + // Keywords + 'KEYWORDS' => array( + // Keywords from http://en.wikipedia.org/wiki/C_syntax + 1 => array( + 'auto', 'break', 'case', 'char', 'const', 'continue', 'default', + 'do', 'double', 'else', 'enum', 'extern', 'float', 'for', 'goto', + 'if', 'inline', 'int', 'long', 'register', 'restrict', 'return', + 'short', 'signed', 'sizeof', 'static', 'struct', 'switch', + 'typedef', 'union', 'unsigned', 'void', 'volatile', 'while', + '_Bool', '_Complex', '_Imaginary' + ), + // C preprocessor directives from http://en.wikipedia.org/wiki/C_preprocessor + 2 => array( + '#define', '#if', '#ifdef', '#ifndef', '#include', '#else', '#elif', '#endif', '#pragma', '#undef' + ), + // Functions from lrun.h + 3 => array( + 'lr_start_transaction', 'lr_start_sub_transaction', 'lr_start_transaction_instance', 'lr_end_transaction', + 'lr_end_sub_transaction', 'lr_end_transaction_instance', 'lr_stop_transaction', 'lr_stop_transaction_instance', + 'lr_resume_transaction', 'lr_resume_transaction_instance', 'lr_wasted_time', 'lr_set_transaction', 'lr_user_data_point', + 'lr_user_data_point_instance', 'lr_user_data_point_ex', 'lr_user_data_point_instance_ex', 'lr_get_transaction_duration', + 'lr_get_trans_instance_duration', 'lr_get_transaction_think_time', 'lr_get_trans_instance_think_time', + 'lr_get_transaction_wasted_time', 'lr_get_trans_instance_wasted_time', 'lr_get_transaction_status', + 'lr_get_trans_instance_status', 'lr_set_transaction_status', 'lr_set_transaction_status_by_name', + 'lr_set_transaction_instance_status', 'lr_start_timer', 'lr_end_timer', 'lr_rendezvous', 'lr_rendezvous_ex', + 'lr_get_vuser_ip', 'lr_whoami', 'lr_get_host_name', 'lr_get_master_host_name', 'lr_get_attrib_long', + 'lr_get_attrib_string', 'lr_get_attrib_double', 'lr_paramarr_idx', 'lr_paramarr_random', 'lr_paramarr_len', + 'lr_param_unique', 'lr_param_sprintf', 'lr_load_dll', 'lr_continue_on_error', 'lr_decrypt', 'lr_abort', 'lr_exit', + 'lr_peek_events', 'lr_think_time', 'lr_debug_message', 'lr_log_message', 'lr_message', 'lr_error_message', + 'lr_output_message', 'lr_vuser_status_message', 'lr_fail_trans_with_error', 'lr_next_row', 'lr_advance_param', + 'lr_eval_string', 'lr_eval_string_ext', 'lr_eval_string_ext_free', 'lr_param_increment', 'lr_save_var', + 'lr_save_string', 'lr_save_int', 'lr_save_datetime', 'lr_save_searched_string', 'lr_set_debug_message', + 'lr_get_debug_message', 'lr_enable_ip_spoofing', 'lr_disable_ip_spoofing', 'lr_convert_string_encoding' + ), + // Constants from lrun.h + 4 => array( + 'DP_FLAGS_NO_LOG', 'DP_FLAGS_STANDARD_LOG', 'DP_FLAGS_EXTENDED_LOG', 'merc_timer_handle_t', 'LR_EXIT_VUSER', + 'LR_EXIT_ACTION_AND_CONTINUE', 'LR_EXIT_ITERATION_AND_CONTINUE', 'LR_EXIT_VUSER_AFTER_ITERATION', + 'LR_EXIT_VUSER_AFTER_ACTION', 'LR_EXIT_MAIN_ITERATION_AND_CONTINUE', 'LR_MSG_CLASS_DISABLE_LOG', + 'LR_MSG_CLASS_STANDARD_LOG', 'LR_MSG_CLASS_RETURNED_DATA', 'LR_MSG_CLASS_PARAMETERS', 'LR_MSG_CLASS_ADVANCED_TRACE', + 'LR_MSG_CLASS_EXTENDED_LOG', 'LR_MSG_CLASS_SENT_DATA', 'LR_MSG_CLASS_JIT_LOG_ON_ERROR', 'LR_SWITCH_OFF', 'LR_SWITCH_ON', + 'LR_SWITCH_DEFAULT', 'ONE_DAY', 'ONE_HOUR', 'ONE_MIN', 'DATE_NOW', 'TIME_NOW', 'LR_MSG_CLASS_BRIEF_LOG', + 'LR_MSG_CLASS_RESULT_DATA', 'LR_MSG_CLASS_FULL_TRACE', 'LR_MSG_CLASS_AUTO_LOG', 'LR_MSG_OFF', 'LR_MSG_ON', + 'LR_MSG_DEFAULT' + ), + // Functions from web_api.h + 5 => array( + 'web_reg_add_cookie', 'web_report_data_point', 'web_text_link', 'web_element', 'web_image_link', 'web_static_image', + 'web_image_submit', 'web_button', 'web_edit_field', 'web_radio_group', 'web_check_box', 'web_list', 'web_text_area', + 'web_map_area', 'web_eval_java_script', 'web_reg_dialog', 'web_reg_cross_step_download', 'web_browser', + 'web_set_rts_key', 'web_save_param_length', 'web_save_timestamp_param', 'web_load_cache', 'web_dump_cache', + 'web_add_cookie_ex' + ), + // Constants from web_api.h + 6 => array( + 'DESCRIPTION', 'ACTION', 'VERIFICATION', 'LR_NOT_FOUND', 'HTTP_INFO_TOTAL_REQUEST_STAT', + 'HTTP_INFO_TOTAL_RESPONSE_STAT', 'LRW_OPT_STOP_VUSER_ON_ERROR', 'LRW_OPT_DISPLAY_IMAGE_BODY' + ), + // Functions from as_web.h + 7 => array( + 'web_add_filter', 'web_add_auto_filter', 'web_add_auto_header', 'web_add_header', 'web_add_cookie', + 'web_cleanup_auto_headers', 'web_cleanup_cookies', 'web_concurrent_end', 'web_concurrent_start', 'web_create_html_param', + 'web_create_html_param_ex', 'web_custom_request', 'web_disable_keep_alive', 'web_enable_keep_alive', 'web_find', + 'web_get_int_property', 'web_image', 'web_image_check', 'web_link', 'web_global_verification', 'web_reg_find', + 'web_reg_save_param', 'web_convert_param', 'web_remove_auto_filter', 'web_remove_auto_header', 'web_revert_auto_header', + 'web_remove_cookie', 'web_save_header', 'web_set_certificate', 'web_set_certificate_ex', 'web_set_connections_limit', + 'web_set_max_html_param_len', 'web_set_max_retries', 'web_set_proxy', 'web_set_proxy_bypass', 'web_set_secure_proxy', + 'web_set_sockets_option', 'web_set_option', 'web_set_timeout', 'web_set_user', 'web_sjis_to_euc_param', + 'web_submit_data', 'web_submit_form', 'web_url', 'web_set_proxy_bypass_local', 'web_cache_cleanup', + 'web_create_html_query', 'web_create_radio_button_param', 'web_switch_net_layer' + ), + // Constants from as_web.h + 8 => array( + 'ENDFORM', 'LAST', 'ENDITEM', 'EXTRARES', 'ITEMDATA', 'STARTHIDDENS', 'ENDHIDDENS', 'CONNECT', 'RECEIVE', 'RESOLVE', + 'STEP', 'REQUEST', 'RESPONSE', 'STARTQUERY', 'ENDQUERY', 'INPROPS', 'OUTPROPS', 'ENDPROPS', 'RAW_BODY_START', + 'RAW_BODY_END', 'HTTP_INFO_RETURN_CODE', 'HTTP_INFO_DOWNLOAD_SIZE', 'HTTP_INFO_DOWNLOAD_TIME', + 'LRW_NET_SOCKET_OPT_LOAD_VERIFY_FILE', 'LRW_NET_SOCKET_OPT_DEFAULT_VERIFY_PATH', 'LRW_NET_SOCKET_OPT_SSL_VERSION', + 'LRW_NET_SOCKET_OPT_SSL_CIPHER_LIST', 'LRW_NET_SOCKET_OPT_SO_REUSE_ADDRESS', 'LRW_NET_SOCKET_OPT_USER_IP_ADDRESS', + 'LRW_NET_SOCKET_OPT_IP_ADDRESS_BY_INDEX', 'LRW_NET_SOCKET_OPT_HELP', 'LRW_NET_SOCKET_OPT_PRINT_USER_IP_ADDRESS_LIST', + 'LRW_OPT_HTML_CHAR_REF_BACKWARD_COMPATIBILITY', 'LRW_OPT_VALUE_YES', 'LRW_OPT_VALUE_NO' + ), + // Functions from as_sapgui.h + 9 => array( + 'sapgui_open_connection', 'sapgui_open_connection_ex', 'sapgui_logon', 'sapgui_create_session', + 'sapgui_create_new_session', 'sapgui_call_method', 'sapgui_call_method_ex', 'sapgui_set_property', + 'sapgui_get_property', 'sapgui_set_collection_property', 'sapgui_active_object_from_parent_method', + 'sapgui_active_object_from_parent_property', 'sapgui_call_method_of_active_object', + 'sapgui_call_method_of_active_object_ex', 'sapgui_set_property_of_active_object', 'sapgui_get_property_of_active_object', + 'sapgui_select_active_connection', 'sapgui_select_active_session', 'sapgui_select_active_window ', + 'sapgui_status_bar_get_text', 'sapgui_status_bar_get_param', 'sapgui_status_bar_get_type', 'sapgui_get_status_bar_text', + 'sapgui_get_active_window_title', 'sapgui_is_object_available', 'sapgui_is_tab_selected', 'sapgui_is_object_changeable', + 'sapgui_set_ok_code', 'sapgui_send_vkey', 'sapgui_resize_window', 'sapgui_window_resize', 'sapgui_window_maximize', + 'sapgui_window_close', 'sapgui_window_restore', 'sapgui_window_scroll_to_row', 'sapgui_press_button', + 'sapgui_select_radio_button', 'sapgui_set_password', 'sapgui_set_text', 'sapgui_select_menu', 'sapgui_select_tab', + 'sapgui_set_checkbox', 'sapgui_set_focus', 'sapgui_select_combobox_entry', 'sapgui_get_ok_code', + 'sapgui_is_radio_button_selected', 'sapgui_get_text', 'sapgui_is_checkbox_selected', 'sapgui_table_set_focus', + 'sapgui_table_press_button', 'sapgui_table_select_radio_button', 'sapgui_table_set_password', 'sapgui_table_set_text', + 'sapgui_table_set_checkbox', 'sapgui_table_select_combobox_entry', 'sapgui_table_set_row_selected', + 'sapgui_table_set_column_selected', 'sapgui_table_set_column_width', 'sapgui_table_reorder', 'sapgui_table_fill_data', + 'sapgui_table_get_text', 'sapgui_table_is_radio_button_selected', 'sapgui_table_is_checkbox_selected', + 'sapgui_table_is_row_selected', 'sapgui_table_is_column_selected', 'sapgui_table_get_column_width', + 'sapgui_grid_clear_selection', 'sapgui_grid_select_all', 'sapgui_grid_selection_changed', + 'sapgui_grid_press_column_header', 'sapgui_grid_select_cell', 'sapgui_grid_select_rows', 'sapgui_grid_select_column', + 'sapgui_grid_deselect_column', 'sapgui_grid_select_columns', 'sapgui_grid_select_cells', 'sapgui_grid_select_cell_row', + 'sapgui_grid_select_cell_column', 'sapgui_grid_set_column_order', 'sapgui_grid_set_column_width', + 'sapgui_grid_scroll_to_row', 'sapgui_grid_double_click', 'sapgui_grid_click', 'sapgui_grid_press_button', + 'sapgui_grid_press_total_row', 'sapgui_grid_set_cell_data', 'sapgui_grid_set_checkbox', + 'sapgui_grid_double_click_current_cell', 'sapgui_grid_click_current_cell', 'sapgui_grid_press_button_current_cell', + 'sapgui_grid_press_total_row_current_cell', 'sapgui_grid_press_F1', 'sapgui_grid_press_F4', 'sapgui_grid_press_ENTER', + 'sapgui_grid_press_toolbar_button', 'sapgui_grid_press_toolbar_context_button', 'sapgui_grid_open_context_menu', + 'sapgui_grid_select_context_menu', 'sapgui_grid_select_toolbar_menu', 'sapgui_grid_fill_data', + 'sapgui_grid_get_current_cell_row', 'sapgui_grid_get_current_cell_column', 'sapgui_grid_get_rows_count', + 'sapgui_grid_get_columns_count', 'sapgui_grid_get_cell_data', 'sapgui_grid_is_checkbox_selected', + 'sapgui_tree_scroll_to_node', 'sapgui_tree_set_hierarchy_header_width', 'sapgui_tree_set_selected_node', + 'sapgui_tree_double_click_node', 'sapgui_tree_press_key', 'sapgui_tree_press_button', 'sapgui_tree_set_checkbox', + 'sapgui_tree_double_click_item', 'sapgui_tree_click_link', 'sapgui_tree_open_default_context_menu', + 'sapgui_tree_open_node_context_menu', 'sapgui_tree_open_header_context_menu', 'sapgui_tree_open_item_context_menu', + 'sapgui_tree_select_context_menu', 'sapgui_tree_select_item', 'sapgui_tree_select_node', 'sapgui_tree_unselect_node', + 'sapgui_tree_unselect_all', 'sapgui_tree_select_column', 'sapgui_tree_unselect_column', 'sapgui_tree_set_column_order', + 'sapgui_tree_collapse_node', 'sapgui_tree_expand_node', 'sapgui_tree_scroll_to_item', 'sapgui_tree_set_column_width', + 'sapgui_tree_press_header', 'sapgui_tree_is_checkbox_selected', 'sapgui_tree_get_node_text', 'sapgui_tree_get_item_text', + 'sapgui_calendar_scroll_to_date', 'sapgui_calendar_focus_date', 'sapgui_calendar_select_interval', + 'sapgui_apogrid_select_all', 'sapgui_apogrid_clear_selection', 'sapgui_apogrid_select_cell', + 'sapgui_apogrid_deselect_cell', 'sapgui_apogrid_select_row', 'sapgui_apogrid_deselect_row', + 'sapgui_apogrid_select_column', 'sapgui_apogrid_deselect_column', 'sapgui_apogrid_scroll_to_row', + 'sapgui_apogrid_scroll_to_column', 'sapgui_apogrid_double_click', 'sapgui_apogrid_set_cell_data', + 'sapgui_apogrid_get_cell_data', 'sapgui_apogrid_is_cell_changeable', 'sapgui_apogrid_get_cell_format', + 'sapgui_apogrid_get_cell_tooltip', 'sapgui_apogrid_press_ENTER', 'sapgui_apogrid_open_cell_context_menu', + 'sapgui_apogrid_select_context_menu_item', 'sapgui_text_edit_scroll_to_line', 'sapgui_text_edit_set_selection_indexes', + 'sapgui_text_edit_set_unprotected_text_part', 'sapgui_text_edit_get_first_visible_line', + 'sapgui_text_edit_get_selection_index_start', 'sapgui_text_edit_get_selection_index_end', + 'sapgui_text_edit_get_number_of_unprotected_text_parts', 'sapgui_text_edit_double_click', + 'sapgui_text_edit_single_file_dropped', 'sapgui_text_edit_multiple_files_dropped', 'sapgui_text_edit_press_F1', + 'sapgui_text_edit_press_F4', 'sapgui_text_edit_open_context_menu', 'sapgui_text_edit_select_context_menu', + 'sapgui_text_edit_modified_status_changed', 'sapgui_htmlviewer_send_event', 'sapgui_htmlviewer_dom_get_property', + 'sapgui_toolbar_press_button', 'sapgui_toolbar_press_context_button', 'sapgui_toolbar_select_menu_item', + 'sapgui_toolbar_select_menu_item_by_text', 'sapgui_toolbar_select_context_menu_item', + 'sapgui_toolbar_select_context_menu_item_by_text' + ), + // Constants from as_sapgui.h + 10 => array( + 'BEGIN_OPTIONAL', 'END_OPTIONAL', 'al-keys', 'ENTER', 'HELP', 'F2', 'BACK', 'F4', 'F5', 'F6', 'F7', 'F8', 'F9', + 'F10', 'F11', 'ESC', 'SHIFT_F1', 'SHIFT_F2', 'SHIFT_F3', 'SHIFT_F4', 'SHIFT_F5', 'SHIFT_F6', 'SHIFT_F7', 'SHIFT_F8', + 'SHIFT_F9', 'SHIFT_F10', 'SHIFT_F11', 'SHIFT_F12', 'CTRL_F1', 'CTRL_F2', 'CTRL_F3', 'CTRL_F4', 'CTRL_F5', 'CTRL_F6', + 'CTRL_F7', 'CTRL_F8', 'CTRL_F9', 'CTRL_F10', 'CTRL_F11', 'CTRL_F12', 'CTRL_SHIFT_F1', 'CTRL_SHIFT_F2', 'CTRL_SHIFT_F3', + 'CTRL_SHIFT_F4', 'CTRL_SHIFT_F5', 'CTRL_SHIFT_F6', 'CTRL_SHIFT_F7', 'CTRL_SHIFT_F8', 'CTRL_SHIFT_F9', 'CTRL_SHIFT_F10', + 'CTRL_SHIFT_F11', 'CTRL_SHIFT_F12', 'CANCEL', 'CTRL_F', 'CTRL_PAGE_UP', 'PAGE_UP', 'PAGE_DOWN', 'CTRL_PAGE_DOWN', + 'CTRL_G', 'CTRL_P' + ), + ), + + // Symbols and Case Sensitivity + // Symbols from: http://en.wikipedia.org/wiki/C_syntax + 'SYMBOLS' => array( + '(', ')', '{', '}', '[', ']', + '+', '-', '*', '/', '%', + '=', '<', '>', '!', '^', '&', '|', '?', ':', ';', ',' + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => false, + 1 => true, // Standard C reserved keywords + 2 => true, // C preprocessor directives + 3 => true, // Functions from lrun.h + 4 => true, // Constants from lrun.h + 5 => true, // Functions from web_api.h + 6 => true, // Constants from web_api.h + 7 => true, // Functions from as_web.h + 8 => true, // Constants from as_web.h + 9 => true, // Functions from as_sapgui.h + 10 => true, // Constants from as_sapgui.h + ), + + // Styles + 'STYLES' => array( + 'KEYWORDS' => array( + // Functions are brown, constants and reserved words are blue + 1 => 'color: #0000ff;', // Standard C reserved keywords + 2 => 'color: #0000ff;', // C preprocessor directives + 3 => 'color: #8a0000;', // Functions from lrun.h + 4 => 'color: #0000ff;', // Constants from lrun.h + 5 => 'color: #8a0000;', // Functions from web_api.h + 6 => 'color: #0000ff;', // Constants from web_api.h + 7 => 'color: #8a0000;', // Functions from as_web.h + 8 => 'color: #0000ff;', // Constants from as_web.h + 9 => 'color: #8a0000;', // Functions from as_sapgui.h + 10 => 'color: #0000ff;', // Constants from as_sapgui.h + ), + 'COMMENTS' => array( + // Comments are grey + 1 => 'color: #9b9b9b;', + 'MULTI' => 'color: #9b9b9b;' + ), + 'ESCAPE_CHAR' => array( + // GeSHi cannot define a separate style for ESCAPE_REGEXP. The style for ESCAPE_CHAR also applies to ESCAPE_REGEXP. + // This is used for LoadRunner {parameters} + // {parameters} are pink + 0 => 'color: #c000c0;' + ), + 'BRACKETS' => array( + 0 => 'color: #000000;' + ), + 'STRINGS' => array( + // Strings are green + 0 => 'color: #008080;' + ), + 'NUMBERS' => array( + // Numbers are green + 0 => 'color: #008080;', + GESHI_NUMBER_BIN_PREFIX_0B => 'color: #008080;', + GESHI_NUMBER_OCT_PREFIX => 'color: #008080;', + GESHI_NUMBER_HEX_PREFIX => 'color: #008080;', + GESHI_NUMBER_FLT_SCI_SHORT => 'color:#008080;', + GESHI_NUMBER_FLT_SCI_ZERO => 'color:#008080;', + GESHI_NUMBER_FLT_NONSCI_F => 'color:#008080;', + GESHI_NUMBER_FLT_NONSCI => 'color:#008080;' + ), + 'METHODS' => array( + 1 => 'color: #000000;' + ), + 'SYMBOLS' => array( + 0 => 'color: #000000;' + ), + 'REGEXPS' => array( + ), + 'SCRIPT' => array( + ) + ), + + // URLs for Functions + 'URLS' => array( + 1 => '', // Standard C reserved keywords + 2 => '', // C preprocessor directives + 3 => '', // Functions from lrun.h + 4 => '', // Constants from lrun.h + 5 => '', // Functions from web_api.h + 6 => '', // Constants from web_api.h + 7 => '', // Functions from as_web.h + 8 => '', // Constants from as_web.h + 9 => '', // Functions from as_sapgui.h + 10 => '', // Constants from as_sapgui.h + ), + + // Object Orientation + 'OOLANG' => false, + 'OBJECT_SPLITTERS' => array( + ), + + // Regular Expressions + // Note that REGEXPS are not applied within strings. + 'REGEXPS' => array( + ), + + // Contextual Highlighting and Strict Mode + 'STRICT_MODE_APPLIES' => GESHI_NEVER, + 'SCRIPT_DELIMITERS' => array( + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + ), + + // Tabs + // Note that if you are using <pre> tags for your code, then the browser chooses how many spaces your tabs will translate to. + 'TAB_WIDTH' => 4 +); + +?> \ No newline at end of file diff --git a/inc/geshi/c_mac.php b/inc/geshi/c_mac.php index 1a034ae08d58483e133328a3ac04d8d788141c1d..f80dc2ed273de4dbb8be8f5c794cf72f15dd256d 100644 --- a/inc/geshi/c_mac.php +++ b/inc/geshi/c_mac.php @@ -4,7 +4,7 @@ * --------- * Author: M. Uli Kusterer (witness.of.teachtext@gmx.net) * Copyright: (c) 2004 M. Uli Kusterer, Nigel McNie (http://qbnz.com/highlighter/) - * Release Version: 1.0.8.8 + * Release Version: 1.0.8.10 * Date Started: 2004/06/04 * * C for Macs language file for GeSHi. diff --git a/inc/geshi/caddcl.php b/inc/geshi/caddcl.php index 74310d6d9dd26bf0c915580b137e8db82362741b..6587cfed98a1524e5188040e2c90220ca0b572e0 100644 --- a/inc/geshi/caddcl.php +++ b/inc/geshi/caddcl.php @@ -4,7 +4,7 @@ * ---------- * Author: Roberto Rossi (rsoftware@altervista.org) * Copyright: (c) 2004 Roberto Rossi (http://rsoftware.altervista.org), Nigel McNie (http://qbnz.com/highlighter) - * Release Version: 1.0.8.8 + * Release Version: 1.0.8.10 * Date Started: 2004/08/30 * * CAD DCL (Dialog Control Language) language file for GeSHi. diff --git a/inc/geshi/cadlisp.php b/inc/geshi/cadlisp.php index 9277e519297223ca2a4ba41d0681950345ad87f1..00e3c6c5b33b5bc0e1b5aedd4d09697b8c9684de 100644 --- a/inc/geshi/cadlisp.php +++ b/inc/geshi/cadlisp.php @@ -4,7 +4,7 @@ * ----------- * Author: Roberto Rossi (rsoftware@altervista.org) * Copyright: (c) 2004 Roberto Rossi (http://rsoftware.altervista.org), Nigel McNie (http://qbnz.com/blog) - * Release Version: 1.0.8.8 + * Release Version: 1.0.8.10 * Date Started: 2004/08/30 * * AutoCAD/IntelliCAD Lisp language file for GeSHi. diff --git a/inc/geshi/cfdg.php b/inc/geshi/cfdg.php index ee17fdf530c36fc1075398eaae168bcdb86252e4..31d32fa45aaec746ea34292fe228bf1ca36b4ce4 100644 --- a/inc/geshi/cfdg.php +++ b/inc/geshi/cfdg.php @@ -4,7 +4,7 @@ * -------- * Author: John Horigan <john@glyphic.com> * Copyright: (c) 2006 John Horigan http://www.ozonehouse.com/john/ - * Release Version: 1.0.8.8 + * Release Version: 1.0.8.10 * Date Started: 2006/03/11 * * CFDG language file for GeSHi. diff --git a/inc/geshi/cfm.php b/inc/geshi/cfm.php index dd508eec70b655b8963f78422470b9e0d779414e..f340c39aca5e3da693326d6bb0b3594e93288416 100644 --- a/inc/geshi/cfm.php +++ b/inc/geshi/cfm.php @@ -4,7 +4,7 @@ * ------- * Author: Diego * Copyright: (c) 2006 Diego - * Release Version: 1.0.8.8 + * Release Version: 1.0.8.10 * Date Started: 2006/02/25 * * ColdFusion language file for GeSHi. diff --git a/inc/geshi/chaiscript.php b/inc/geshi/chaiscript.php index e1baad4db25277c5e6f8de0017ae5a89b9599409..dcd05dbf58e035c3cb0208df49ff92d30512641c 100644 --- a/inc/geshi/chaiscript.php +++ b/inc/geshi/chaiscript.php @@ -6,7 +6,7 @@ * Copyright: (c) 2010 Jason Turner (lefticus@gmail.com), * (c) 2009 Jonathan Turner, * (c) 2004 Ben Keen (ben.keen@gmail.com), Benny Baumann (http://qbnz.com/highlighter) - * Release Version: 1.0.8.8 + * Release Version: 1.0.8.10 * Date Started: 2009/07/03 * * ChaiScript language file for GeSHi. diff --git a/inc/geshi/cil.php b/inc/geshi/cil.php index 142c7743acd57aa5b7fe6968080f8f99d6697ed0..975572c64b0d5ed7ebb14dd8d19d4f7918a74827 100644 --- a/inc/geshi/cil.php +++ b/inc/geshi/cil.php @@ -4,7 +4,7 @@ * -------- * Author: Marcus Griep (neoeinstein+GeSHi@gmail.com) * Copyright: (c) 2007 Marcus Griep (http://www.xpdm.us) - * Release Version: 1.0.8.8 + * Release Version: 1.0.8.10 * Date Started: 2007/10/24 * * CIL (Common Intermediate Language) language file for GeSHi. diff --git a/inc/geshi/clojure.php b/inc/geshi/clojure.php index 4bcb9a3aeb1e8e6846e6e57c75c2e7f34090b9d7..bf21c7603023914569ebf24e441990abdfa8388e 100644 --- a/inc/geshi/clojure.php +++ b/inc/geshi/clojure.php @@ -4,7 +4,7 @@ * -------- * Author: Jess Johnson (jess@grok-code.com) * Copyright: (c) 2009 Jess Johnson (http://grok-code.com) - * Release Version: 1.0.8.8 + * Release Version: 1.0.8.10 * Date Started: 2009/09/20 * * Clojure language file for GeSHi. diff --git a/inc/geshi/cmake.php b/inc/geshi/cmake.php index ccd855b0b5b4593207f5ec0cfd97eda96a1ba6fb..fcf45c6919f87b820acc5251bd046df9a07ac7fe 100644 --- a/inc/geshi/cmake.php +++ b/inc/geshi/cmake.php @@ -4,7 +4,7 @@ * ------- * Author: Daniel Nelson (danieln@eng.utah.edu) * Copyright: (c) 2009 Daniel Nelson - * Release Version: 1.0.8.8 + * Release Version: 1.0.8.10 * Date Started: 2009/04/06 * * CMake language file for GeSHi. diff --git a/inc/geshi/cobol.php b/inc/geshi/cobol.php index c1220a06f5e8cc7b0135b8a04b9a0e2fafc9863c..c3ed01d4c61539ae12a7bdffaec20385bcda8391 100644 --- a/inc/geshi/cobol.php +++ b/inc/geshi/cobol.php @@ -4,7 +4,7 @@ * ---------- * Author: BenBE (BenBE@omorphia.org) * Copyright: (c) 2007-2008 BenBE (http://www.omorphia.de/) - * Release Version: 1.0.8.8 + * Release Version: 1.0.8.10 * Date Started: 2007/07/02 * * COBOL language file for GeSHi. diff --git a/inc/geshi/coffeescript.php b/inc/geshi/coffeescript.php new file mode 100644 index 0000000000000000000000000000000000000000..f85541973185c3710eed6f2162f4345fdb7e1a00 --- /dev/null +++ b/inc/geshi/coffeescript.php @@ -0,0 +1,146 @@ +<?php +/************************************************************************************* + * coffeescript.php + * ---------- + * Author: Trevor Burnham (trevorburnham@gmail.com) + * Copyright: (c) 2010 Trevor Burnham (http://iterative.ly) + * Release Version: 1.0.8.10 + * Date Started: 2010/06/08 + * + * CoffeeScript language file for GeSHi. + * + * CHANGES + * ------- + * 2010/06/08 (1.0.8.9) + * - First Release + * + ************************************************************************************* + * + * This file is part of GeSHi. + * + * GeSHi is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * GeSHi is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with GeSHi; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + ************************************************************************************/ + +$language_data = array ( + 'LANG_NAME' => 'CoffeeScript', + 'COMMENT_SINGLE' => array(1 => '#'), + 'COMMENT_MULTI' => array('###' => '###'), + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + //Longest quotemarks ALWAYS first + 'QUOTEMARKS' => array('"""', "'''", '"', "'"), + 'ESCAPE_CHAR' => '\\', + 'KEYWORDS' => array( + + /* + ** Set 1: control keywords + */ + 1 => array( + 'break', 'by', 'catch', 'continue', 'else', 'finally', 'for', 'in', 'of', 'if', + 'return', 'switch', 'then', 'throw', 'try', 'unless', 'when', 'while', 'until' + ), + + /* + ** Set 2: logic keywords + */ + 2 => array( + 'and', 'or', 'is', 'isnt', 'not' + ), + + /* + ** Set 3: other keywords + */ + 3 => array( + 'instanceof', 'new', 'delete', 'typeof', + 'class', 'super', 'this', 'extends' + ), + + /* + ** Set 4: constants + */ + 4 => array( + 'true', 'false', 'on', 'off', 'yes', 'no', + 'Infinity', 'NaN', 'undefined', 'null' + ) + ), + 'SYMBOLS' => array( + '(', ')', '[', ']', '{', '}', '*', '&', '|', '%', '!', ',', ';', '<', '>', '?', '`', + '+', '-', '*', '/', '->', '=>', '<<', '>>', '@', ':', '^' + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => false, + 1 => true, + 2 => true, + 3 => true, + 4 => true + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: #ff7700;font-weight:bold;', + 2 => 'color: #008000;', + 3 => 'color: #dc143c;', + 4 => 'color: #0000cd;' + ), + 'COMMENTS' => array( + 1 => 'color: #808080; font-style: italic;', + 'MULTI' => 'color: #808080; font-style: italic;' + ), + 'ESCAPE_CHAR' => array( + 0 => 'color: #000099; font-weight: bold;' + ), + 'BRACKETS' => array( + 0 => 'color: black;' + ), + 'STRINGS' => array( + 0 => 'color: #483d8b;' + ), + 'NUMBERS' => array( + 0 => 'color: #ff4500;' + ), + 'METHODS' => array( + 1 => 'color: black;' + ), + 'SYMBOLS' => array( + 0 => 'color: #66cc66;' + ), + 'REGEXPS' => array( + ), + 'SCRIPT' => array( + ) + ), + 'URLS' => array( + 1 => '', + 2 => '', + 3 => '', + 4 => '' + ), + 'OOLANG' => true, + 'OBJECT_SPLITTERS' => array( + 1 => '.' + ), + 'REGEXPS' => array( + ), + 'STRICT_MODE_APPLIES' => GESHI_MAYBE, + 'SCRIPT_DELIMITERS' => array( + 0 => array( + '<script type="text/coffeescript">' => '</script>' + ) + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + 0 => true + ) +); + +?> \ No newline at end of file diff --git a/inc/geshi/cpp-qt.php b/inc/geshi/cpp-qt.php index 8523d16b7efbb5566192e1295615bdbcd770af27..3f6aa3079d038995071574d69522d9638c898598 100644 --- a/inc/geshi/cpp-qt.php +++ b/inc/geshi/cpp-qt.php @@ -4,7 +4,7 @@ * ------- * Author: Iulian M * Copyright: (c) 2006 Iulian M - * Release Version: 1.0.8.8 + * Release Version: 1.0.8.10 * Date Started: 2004/09/27 * * C++ (with QT extensions) language file for GeSHi. @@ -55,7 +55,7 @@ $language_data = array ( 'ESCAPE_CHAR' => '', 'ESCAPE_REGEXP' => array( //Simple Single Char Escapes - 1 => "#\\\\[\\\\abfnrtv\'\"?\n]#i", + 1 => "#\\\\[abfnrtv\\\'\"?\n]#i", //Hexadecimal Char Specs 2 => "#\\\\x[\da-fA-F]{2}#", //Hexadecimal Char Specs diff --git a/inc/geshi/cpp.php b/inc/geshi/cpp.php index 30f5a93f26cd93c59a36653440c759792b37b238..289ab994755eb87263e28ce5ba93606a29e500a0 100644 --- a/inc/geshi/cpp.php +++ b/inc/geshi/cpp.php @@ -7,7 +7,7 @@ * - M. Uli Kusterer (witness.of.teachtext@gmx.net) * - Jack Lloyd (lloyd@randombit.net) * Copyright: (c) 2004 Dennis Bayer, Nigel McNie (http://qbnz.com/highlighter) - * Release Version: 1.0.8.8 + * Release Version: 1.0.8.10 * Date Started: 2004/09/27 * * C++ language file for GeSHi. @@ -63,7 +63,7 @@ $language_data = array ( 'ESCAPE_CHAR' => '', 'ESCAPE_REGEXP' => array( //Simple Single Char Escapes - 1 => "#\\\\[\\\\abfnrtv\'\"?\n]#i", + 1 => "#\\\\[abfnrtv\\\'\"?\n]#i", //Hexadecimal Char Specs 2 => "#\\\\x[\da-fA-F]{2}#", //Hexadecimal Char Specs diff --git a/inc/geshi/csharp.php b/inc/geshi/csharp.php index 6a9c3c2bd920c009ccdcce3ada9dad620d8402d1..e73f22d503c37766b0ca490443e44996b1b50213 100644 --- a/inc/geshi/csharp.php +++ b/inc/geshi/csharp.php @@ -5,7 +5,7 @@ * Author: Alan Juden (alan@judenware.org) * Revised by: Michael Mol (mikemol@gmail.com) * Copyright: (c) 2004 Alan Juden, Nigel McNie (http://qbnz.com/highlighter/) - * Release Version: 1.0.8.8 + * Release Version: 1.0.8.10 * Date Started: 2004/06/04 * * C# language file for GeSHi. diff --git a/inc/geshi/css.php b/inc/geshi/css.php index 51f261486b882efd7993bb886732c2ae59fac0a4..a8706bd261887c102ebed8464ea3c44569123357 100644 --- a/inc/geshi/css.php +++ b/inc/geshi/css.php @@ -4,7 +4,7 @@ * ------- * Author: Nigel McNie (nigel@geshi.org) * Copyright: (c) 2004 Nigel McNie (http://qbnz.com/highlighter/) - * Release Version: 1.0.8.8 + * Release Version: 1.0.8.10 * Date Started: 2004/06/18 * * CSS language file for GeSHi. @@ -58,7 +58,15 @@ $language_data = array ( ), 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, 'QUOTEMARKS' => array('"', "'"), - 'ESCAPE_CHAR' => '\\', + 'ESCAPE_CHAR' => '', + 'ESCAPE_REGEXP' => array( + //Simple Single Char Escapes + //1 => "#\\\\[nfrtv\$\"\n\\\\]#i", + //Hexadecimal Char Specs + 2 => "#\\\\[\da-fA-F]{1,6}\s?#i", + //Unicode Char Specs + //3 => "#\\\\u[\da-fA-F]{1,8}#i", + ), 'KEYWORDS' => array( 1 => array( 'aqua', 'azimuth', 'background-attachment', 'background-color', @@ -153,7 +161,10 @@ $language_data = array ( 'MULTI' => 'color: #808080; font-style: italic;' ), 'ESCAPE_CHAR' => array( - 0 => 'color: #000099; font-weight: bold;' + 0 => 'color: #000099; font-weight: bold;', + //1 => 'color: #000099; font-weight: bold;', + 2 => 'color: #000099; font-weight: bold;' + //3 => 'color: #000099; font-weight: bold;' ), 'BRACKETS' => array( 0 => 'color: #00AA00;' diff --git a/inc/geshi/cuesheet.php b/inc/geshi/cuesheet.php index 81c607c10d9a696195503999593352797613c569..e994a0aa3c6f56e7a5c2b1a33bd275feb4e94657 100644 --- a/inc/geshi/cuesheet.php +++ b/inc/geshi/cuesheet.php @@ -4,7 +4,7 @@ * ---------- * Author: Benny Baumann (benbe@geshi.org) * Copyright: (c) 2009 Benny Baumann (http://qbnz.com/highlighter/) - * Release Version: 1.0.8.8 + * Release Version: 1.0.8.10 * Date Started: 2009/12/21 * * Cuesheet language file for GeSHi. diff --git a/inc/geshi/d.php b/inc/geshi/d.php index 5ef349d52104ac1f2d8eb057bb96652e1041d7c3..107d07b1a76100495646d692fde8b99b194be1a1 100644 --- a/inc/geshi/d.php +++ b/inc/geshi/d.php @@ -4,7 +4,7 @@ * ----- * Author: Thomas Kuehne (thomas@kuehne.cn) * Copyright: (c) 2005 Thomas Kuehne (http://thomas.kuehne.cn/) - * Release Version: 1.0.8.8 + * Release Version: 1.0.8.10 * Date Started: 2005/04/22 * * D language file for GeSHi. diff --git a/inc/geshi/dcs.php b/inc/geshi/dcs.php index 4762ed906fea725f0b473a8997cf950bca3b9124..bac2beea8de27cab9135478b51c227ea6c0c3228 100644 --- a/inc/geshi/dcs.php +++ b/inc/geshi/dcs.php @@ -4,7 +4,7 @@ * --------------------------------- * Author: Stelio Passaris (GeSHi@stelio.net) * Copyright: (c) 2009 Stelio Passaris (http://stelio.net/stiki/GeSHi) - * Release Version: 1.0.8.8 + * Release Version: 1.0.8.10 * Date Started: 2009/01/20 * * DCS language file for GeSHi. diff --git a/inc/geshi/delphi.php b/inc/geshi/delphi.php index ff54af8f91eebb4870a5bb08795ff65b8e03d0ef..d7f19f83299d57eefc6f3535a1758181787a72ad 100644 --- a/inc/geshi/delphi.php +++ b/inc/geshi/delphi.php @@ -4,7 +4,7 @@ * ---------- * Author: J�rja Norbert (jnorbi@vipmail.hu), Benny Baumann (BenBE@omorphia.de) * Copyright: (c) 2004 J�rja Norbert, Benny Baumann (BenBE@omorphia.de), Nigel McNie (http://qbnz.com/highlighter) - * Release Version: 1.0.8.8 + * Release Version: 1.0.8.10 * Date Started: 2004/07/26 * * Delphi (Object Pascal) language file for GeSHi. diff --git a/inc/geshi/diff.php b/inc/geshi/diff.php index 5570406dac6d2568d258307f0510f64aa8dacd7f..09cc508732cc5d1d858a3d8749ab3558cdd13b2e 100644 --- a/inc/geshi/diff.php +++ b/inc/geshi/diff.php @@ -4,7 +4,7 @@ * -------- * Author: Conny Brunnkvist (conny@fuchsia.se), W. Tasin (tasin@fhm.edu) * Copyright: (c) 2004 Fuchsia Open Source Solutions (http://www.fuchsia.se/) - * Release Version: 1.0.8.8 + * Release Version: 1.0.8.10 * Date Started: 2004/12/29 * * Diff-output language file for GeSHi. diff --git a/inc/geshi/div.php b/inc/geshi/div.php index 276e9e8822afc9c2e61d809a88945f21c43f4266..e8de7a525cf63539533d5324c7d940415eb27450 100644 --- a/inc/geshi/div.php +++ b/inc/geshi/div.php @@ -4,7 +4,7 @@ * --------------------------------- * Author: Gabriel Lorenzo (ermakina@gmail.com) * Copyright: (c) 2005 Gabriel Lorenzo (http://ermakina.gazpachito.net) - * Release Version: 1.0.8.8 + * Release Version: 1.0.8.10 * Date Started: 2005/06/19 * * DIV language file for GeSHi. diff --git a/inc/geshi/dos.php b/inc/geshi/dos.php index 9484d3766fee176583b5dae6bcfd93ba86fb37c3..e84e1550ab74d90e8bf56acb485e8a2fc28be28a 100644 --- a/inc/geshi/dos.php +++ b/inc/geshi/dos.php @@ -4,7 +4,7 @@ * ------- * Author: Alessandro Staltari (staltari@geocities.com) * Copyright: (c) 2005 Alessandro Staltari (http://www.geocities.com/SiliconValley/Vista/8155/) - * Release Version: 1.0.8.8 + * Release Version: 1.0.8.10 * Date Started: 2005/07/05 * * DOS language file for GeSHi. @@ -66,7 +66,8 @@ $language_data = array ( //DOS comment lines 'COMMENT_REGEXP' => array( 1 => "/^\s*@?REM\b.*$/mi", - 2 => "/^\s*::.*$/m" + 2 => "/^\s*::.*$/m", + 3 => "/\^./" ), 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, 'QUOTEMARKS' => array(), @@ -100,7 +101,7 @@ $language_data = array ( ) ), 'SYMBOLS' => array( - '(', ')', '@', '%' + '(', ')', '@', '%', '!', '|', '<', '>', '&' ), 'CASE_SENSITIVE' => array( GESHI_COMMENTS => false, @@ -119,6 +120,7 @@ $language_data = array ( 'COMMENTS' => array( 1 => 'color: #808080; font-style: italic;', 2 => 'color: #b100b1; font-style: italic;', + 3 => 'color: #33cc33;' ), 'ESCAPE_CHAR' => array( 0 => 'color: #ff0000; font-weight: bold;' @@ -143,7 +145,8 @@ $language_data = array ( 'REGEXPS' => array( 0 => 'color: #b100b1; font-weight: bold;', 1 => 'color: #448844;', - 2 => 'color: #448888;' + 2 => 'color: #448888;', + 3 => 'color: #448888;' ) ), 'OOLANG' => false, @@ -159,7 +162,7 @@ $language_data = array ( /* Label */ 0 => array( /* GESHI_SEARCH => '((?si:[@\s]+GOTO\s+|\s+:)[\s]*)((?<!\n)[^\s\n]*)',*/ - GESHI_SEARCH => '((?si:[@\s]+GOTO\s+|\s+:)[\s]*)((?<!\n)[^\n]*)', + GESHI_SEARCH => '((?si:[@\s]+GOTO\s+|\s+:)[\s]*)((?<!\n)[^\s\n]*)', GESHI_REPLACE => '\\2', GESHI_MODIFIERS => 'si', GESHI_BEFORE => '\\1', @@ -182,6 +185,15 @@ $language_data = array ( GESHI_MODIFIERS => 'si', GESHI_BEFORE => '\\1', GESHI_AFTER => '\\3' + ), + /* Arguments or variable evaluation */ + 3 => array( +/* GESHI_SEARCH => '(%)([\d*]|[^%\s]*(?=%))((?<!%\d)%|)',*/ + GESHI_SEARCH => '(!(?:!(?=[a-z0-9]))?)([\d*]|(?:~[adfnpstxz]*(?:$\w+:)?)?[a-z0-9](?!\w)|[^!>\n]*(?=!))((?<!%\d)%|)(?!!>)', + GESHI_REPLACE => '\\2', + GESHI_MODIFIERS => 'si', + GESHI_BEFORE => '\\1', + GESHI_AFTER => '\\3' ) ), 'STRICT_MODE_APPLIES' => GESHI_NEVER, @@ -191,7 +203,20 @@ $language_data = array ( ), 'TAB_WIDTH' => 4, 'PARSER_CONTROL' => array( + 'ENABLE_FLAGS' => array( + 'BRACKETS' => GESHI_NEVER, + 'NUMBERS' => GESHI_NEVER + ), 'KEYWORDS' => array( + 1 => array( + 'DISALLOWED_BEFORE' => '(?<![\w\-])' + ), + 2 => array( + 'DISALLOWED_BEFORE' => '(?<![\w\-])' + ), + 3 => array( + 'DISALLOWED_BEFORE' => '(?<![\w\-])' + ), 4 => array( 'DISALLOWED_BEFORE' => '(?<!\w)' ) diff --git a/inc/geshi/dot.php b/inc/geshi/dot.php index 04b6792d72391a624a1939cebbac18ff1e2a9fbf..1d5036d3679a207cb3fe498a17c47ebf5653923a 100644 --- a/inc/geshi/dot.php +++ b/inc/geshi/dot.php @@ -4,7 +4,7 @@ * --------------------------------- * Author: Adrien Friggeri (adrien@friggeri.net) * Copyright: (c) 2007 Adrien Friggeri (http://www.friggeri.net) - * Release Version: 1.0.8.8 + * Release Version: 1.0.8.10 * Date Started: 2007/05/30 * * dot language file for GeSHi. diff --git a/inc/geshi/e.php b/inc/geshi/e.php new file mode 100644 index 0000000000000000000000000000000000000000..9bdbc137ba31cf76c9fc6b745af13ea209e7dcf9 --- /dev/null +++ b/inc/geshi/e.php @@ -0,0 +1,208 @@ +<?php +/************************************************************************************* + * e.php + * -------- + * Author: Kevin Reid (kpreid@switchb.org) + * Copyright: (c) 2010 Kevin Reid (http://switchb.org/kpreid/) + * Release Version: 1.0.8.10 + * Date Started: 2010/04/16 + * + * E language file for GeSHi. + * + * CHANGES + * ------- + * 2010-04-21 (1.0.8.8) + * - Fixing langcheck-reported bugs. + * 2010-04-14 (0.1) + * - First Release + * + * TODO (updated 2010-04-21) + * ------------------------- + * - Do something useful with the keyword groups. Since RC uses CSS classes named + * by the group numbers, either + * - change the numbering to match conventional uses by other languages, + * - or find or create some way to produce usefully named classes. + * + ************************************************************************************* + * + * This file is part of GeSHi. + * + * GeSHi is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * GeSHi is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with GeSHi; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + ************************************************************************************/ + +$language_data = array( + 'LANG_NAME' => 'E', + 'COMMENT_SINGLE' => array(1 => '#'), + 'COMMENT_MULTI' => array('/**' => '*/'), // Note: This is method doc, not a general comment syntax. + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + + // FIXME: The escaping inside ` is actually doubling of any interior `, $, or @ -- backslash is NOT special + 'QUOTEMARKS' => array('\'', '"', '`'), + 'ESCAPE_CHAR' => '\\', + + 'KEYWORDS' => array( + // builtin control structures + 1 => array( + 'accum', 'break', 'try', 'continue', 'if', 'while', 'for', 'switch' + ), + + // control structures subsidiary keywords + 2 => array( + 'catch', 'else', 'finally', 'in', 'exit' + ), + + // named operators + 3 => array( + 'fn', 'via' + ), + + // variable/function/object definers + 4 => array( + 'def', 'bind', 'var' + ), + + // object definition subsidiary keywords + 5 => array( + 'extends', 'as', 'implements', 'guards', 'match', 'to', 'method' + ), + + // builtin nouns in safeEnv + 6 => array( + 'null', 'false', 'true', 'throw', '__loop', '__makeList', + '__makeMap', '__makeProtocolDesc', '__makeMessageDesc', + '__makeParamDesc', 'any', 'void', 'boolean', '__makeOrderedSpace', + 'ValueGuard', '__MatchContext', 'require', '__makeVerbFacet', 'NaN', + 'Infinity', '__identityFunc', '__makeInt', '__makeFinalSlot', + '__makeVarSlot', '__makeGuardedSlot', '__makeGuard', '__makeTwine', + '__makeSourceSpan', '__auditedBy', 'Guard', 'near', 'pbc', + 'PassByCopy', 'DeepPassByCopy', 'Data', 'Persistent', 'DeepFrozen', + 'int', 'float64', 'char', 'String', 'Twine', 'TextWriter', 'List', + 'Map', 'nullOk', 'Tuple', '__Portrayal', 'notNull', 'vow', 'rcvr', + 'SturdyRef', 'simple__quasiParser', 'twine__quasiParser', + 'rx__quasiParser', 'e__quasiParser', 'epatt__quasiParser', + 'sml__quasiParser', 'term__quasiParser', 'traceln', '__equalizer', + '__comparer', 'Ref', 'E', 'promiseAllFulfilled', 'EIO', 'help', + 'safeScope', '__eval', 'resource__uriGetter', 'type__uriGetter', + 'import__uriGetter', 'elib__uriGetter', 'elang__uriGetter', + 'opaque__uriGetter' + ), + + // builtin nouns in privilegedEnv + 7 => array( + 'file__uriGetter', 'fileURL__uriGetter', 'jar__uriGetter', + 'http__uriGetter', 'ftp__uriGetter', 'gopher__uriGetter', + 'news__uriGetter', 'cap__uriGetter', 'makeCommand', 'stdout', + 'stderr', 'stdin', 'print', 'println', 'interp', 'entropy', 'timer', + 'introducer', 'identityMgr', 'makeSturdyRef', 'timeMachine', + 'unsafe__uriGetter', 'currentVat', 'rune', 'awt__uriGetter', + 'swing__uriGetter', 'JPanel__quasiParser', 'swt__uriGetter', + 'currentDisplay', 'swtGrid__quasiParser', 'swtGrid`', + 'privilegedScope' + ), + + // reserved keywords + 8 => array( + 'abstract', 'an', 'assert', 'attribute', 'be', 'begin', 'behalf', + 'belief', 'believe', 'believes', 'case', 'class', 'const', + 'constructor', 'declare', 'default', 'define', 'defmacro', + 'delicate', 'deprecated', 'dispatch', 'do', 'encapsulate', + 'encapsulated', 'encapsulates', 'end', 'ensure', 'enum', 'eventual', + 'eventually', 'export', 'facet', 'forall', 'function', 'given', + 'hidden', 'hides', 'inline', 'is', 'know', 'knows', 'lambda', 'let', + 'methods', 'module', 'namespace', 'native', 'obeys', 'octet', + 'oneway', 'operator', 'package', 'private', 'protected', 'public', + 'raises', 'reliance', 'reliant', 'relies', 'rely', 'reveal', 'sake', + 'signed', 'static', 'struct', 'suchthat', 'supports', 'suspect', + 'suspects', 'synchronized', 'this', 'transient', 'truncatable', + 'typedef', 'unsigned', 'unum', 'uses', 'using', 'utf8', 'utf16', + 'virtual', 'volatile', 'wstring' + ) + ), + 'SYMBOLS' => array( + 1 => array( + '(', ')', '{', '}', '[', ']', '+', '-', '*', '/', '%', '=', '<', '>', '!', '^', '&', '|', '?', ':', ';', ',' + ) + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => false, + 1 => true, + 2 => true, + 3 => true, + 4 => true, + 5 => true, + 6 => true, + 7 => true, + 8 => true + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: #b1b100;', + 2 => 'color: #b1b100;', + 3 => 'color: #b1b100;', + 4 => 'color: #b1b100;', + 5 => 'color: #b1b100;', + 6 => 'color: #b1b100;', + 7 => 'color: #b1b100;', + 8 => 'color: #b1b100;' + ), + 'COMMENTS' => array( + 1 => 'color: #666666; font-style: italic;', + 'MULTI' => 'color: #666666; font-style: italic;' + ), + 'ESCAPE_CHAR' => array( + 0 => 'color: #000099; font-weight: bold;' + ), + 'BRACKETS' => array( + 0 => 'color: #009900;' + ), + 'STRINGS' => array( + 0 => 'color: #0000ff;' + ), + 'NUMBERS' => array( + 0 => 'color: #cc66cc;', + ), + 'METHODS' => array( + 0 => 'color: #004000;' + ), + 'SYMBOLS' => array( + 1 => 'color: #339933;' + ), + 'REGEXPS' => array(), + 'SCRIPT' => array() + ), + 'URLS' => array( + 1 => 'http://wiki.erights.org/wiki/{FNAME}', + 2 => 'http://wiki.erights.org/wiki/{FNAME}', + 3 => 'http://wiki.erights.org/wiki/{FNAME}', + 4 => 'http://wiki.erights.org/wiki/{FNAME}', + 5 => 'http://wiki.erights.org/wiki/{FNAME}', + 6 => 'http://wiki.erights.org/wiki/{FNAME}', + 7 => 'http://wiki.erights.org/wiki/{FNAME}', + 8 => 'http://wiki.erights.org/wiki/{FNAME}' + ), + 'OOLANG' => true, + 'OBJECT_SPLITTERS' => array( + 1 => '.', + 2 => '<-', + 3 => '::' + ), + 'REGEXPS' => array(), + 'STRICT_MODE_APPLIES' => GESHI_NEVER, + 'SCRIPT_DELIMITERS' => array(), + 'HIGHLIGHT_STRICT_BLOCK' => array() +); + +?> \ No newline at end of file diff --git a/inc/geshi/ecmascript.php b/inc/geshi/ecmascript.php index 3e61b57cbfa0b536b1fc049745e3381319b5b889..e220c839bd67eb1cbc7b1445d96d75f29512316e 100644 --- a/inc/geshi/ecmascript.php +++ b/inc/geshi/ecmascript.php @@ -4,7 +4,7 @@ * -------------- * Author: Michel Mariani (http://www.tonton-pixel.com/site/) * Copyright: (c) 2010 Michel Mariani (http://www.tonton-pixel.com/site/) - * Release Version: 1.0.8.8 + * Release Version: 1.0.8.10 * Date Started: 2010/01/08 * * ECMAScript language file for GeSHi. diff --git a/inc/geshi/eiffel.php b/inc/geshi/eiffel.php index 89cef79653d18f7671c6a79fe8c28e860d9417c8..66427acc78fbd1dfc07bbb203cb01252db2bfe34 100644 --- a/inc/geshi/eiffel.php +++ b/inc/geshi/eiffel.php @@ -4,7 +4,7 @@ * ---------- * Author: Zoran Simic (zsimic@axarosenberg.com) * Copyright: (c) 2005 Zoran Simic - * Release Version: 1.0.8.8 + * Release Version: 1.0.8.10 * Date Started: 2005/06/30 * * Eiffel language file for GeSHi. diff --git a/inc/geshi/email.php b/inc/geshi/email.php index 91a1048404cf0e1395cbe430acd466adbbfabd0d..68f875499e0f40a7162b5bdce229bcbb6a99f85d 100644 --- a/inc/geshi/email.php +++ b/inc/geshi/email.php @@ -4,7 +4,7 @@ * --------------- * Author: Benny Baumann (BenBE@geshi.org) * Copyright: (c) 2008 Benny Baumann (http://qbnz.com/highlighter/) - * Release Version: 1.0.8.8 + * Release Version: 1.0.8.10 * Date Started: 2008/10/19 * * Email (mbox \ eml \ RFC format) language file for GeSHi. @@ -51,14 +51,14 @@ $language_data = array ( 'HTTP', 'SMTP', 'ASMTP', 'ESMTP' ), 2 => array( - 'Authentication-Results','Content-Description','Content-Type', + 'Authentication-Results','Comment','Content-Description','Content-Type', 'Content-Disposition','Content-Transfer-Encoding','Delivered-To', 'Dkim-Signature','Domainkey-Signature','In-Reply-To','Message-Id', 'MIME-Version','OpenPGP','Received','Received-SPF','References', - 'Resend-From','Resend-To','Return-Path','User-Agent' + 'Reply-To', 'Resend-From','Resend-To','Return-Path','User-Agent' ), 3 => array( - 'Date','From','Subject','To', + 'Date','From','Sender','Subject','To','CC' ), 4 => array( 'by', 'for', 'from', 'id', 'with' @@ -132,7 +132,7 @@ $language_data = array ( ), //Email-Adresses or Mail-IDs 2 => array( - GESHI_SEARCH => "\b[\w\.\-]+@\w+(?:(?:\.\w+)*\.\w{2,4})?", + GESHI_SEARCH => "\b(?<!\\/)(?P<q>\"?)[\w\.\-]+\k<q>@(?!-)[\w\-]+(?<!-)(?:(?:\.(?!-)[\w\-]+(?<!-))*)?", GESHI_REPLACE => "\\0", GESHI_MODIFIERS => "mi", GESHI_BEFORE => "", @@ -178,7 +178,7 @@ $language_data = array ( ), 'STRICT_MODE_APPLIES' => GESHI_ALWAYS, 'SCRIPT_DELIMITERS' => array( - 0 => "/(?P<start>^)[A-Z][a-zA-Z0-9\-]*\s*:\s*(?:.|(?=\n\s)\n)*(?P<end>$)/m" + 0 => "/(?P<start>^)[A-Za-z][a-zA-Z0-9\-]*\s*:\s*(?:.|(?=\n\s)\n)*(?P<end>$)/m" ), 'HIGHLIGHT_STRICT_BLOCK' => array( 0 => true, diff --git a/inc/geshi/epc.php b/inc/geshi/epc.php new file mode 100644 index 0000000000000000000000000000000000000000..764461fc2d2d85501e0b7a2b5865dfec398d26b3 --- /dev/null +++ b/inc/geshi/epc.php @@ -0,0 +1,154 @@ +<?php +/************************************************************************************* + * epc.php + * -------- + * Author: Thorsten Muehlfelder (muehlfelder@enertex.de) + * Copyright: (c) 2010 Enertex Bayern GmbH + * Release Version: 1.0.8.10 + * Date Started: 2010/08/26 + * + * Enerscript language file for GeSHi. + * + * CHANGES + * ------- + * 2010/08/26 (1.0.8.10) + * - First Release + * + ************************************************************************************* + * + * This file is part of GeSHi. + * + * GeSHi is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * GeSHi is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with GeSHi; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + ************************************************************************************/ + +$language_data = array ( + 'LANG_NAME' => 'EPC', + 'COMMENT_SINGLE' => array('//'), + 'COMMENT_MULTI' => array('/*' => '*/'), + 'COMMENT_REGEXP' => array( + //[Sections] + //1 => "/^\\[.*\\]/" + ), + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array( + 0 => '"', + 1 => '$' + ), + 'ESCAPE_CHAR' => '', + 'KEYWORDS' => array( + 1 => array( + 'if', 'then', 'else', 'endif', + 'and', 'or', 'xor', 'hysteresis' + ), + 2 => array( + 'read', 'write', 'event', + 'gettime', 'settime', 'getdate', 'setdate', 'gettimedate', 'settimedate', + 'hour', 'minute', 'second', 'changehour', 'changeminute', 'changesecond', + 'date', 'month', 'day', 'dayofweek', 'sun', 'azimuth', 'elevation', + 'sunrisehour', 'sunriseminute', 'sunsethour', 'sunsetminute', + 'wtime', 'htime', 'mtime', 'stime', + 'cwtime', 'chtime', 'cmtime', 'cstime', + 'delay', 'after', 'cycle', + 'readflash', 'writeflash', + 'abs', 'acos', 'asin', 'atan', 'cos', 'ceil', 'average', 'exp', 'floor', + 'log', 'max', 'min', 'mod', 'pow', 'sqrt', 'sin', 'tan', 'change', 'convert', + 'eval', 'systemstart', 'random', 'comobject', 'sleep', 'scene', 'storescene', 'callscene', + 'find', 'stringcast', 'stringset', 'stringformat', 'split', 'size', + 'readrs232'. 'sendrs232', 'address', 'readknx', + 'readudp', 'sendudp', 'connecttcp', 'closetcp', 'readtcp', 'sendtcp', + 'resolve', 'sendmail', + 'button', 'webbutton', 'chart', 'webchart', 'webdisplay', 'getslider', 'pshifter', 'mpshifter', + 'getpslider', 'mbutton', 'mbbutton', 'mchart', 'mpchart', 'mpbutton', 'pdisplay', 'pchart', + 'pbutton', 'setslider', 'setpslider', 'slider', 'pslider', 'page', 'line', 'header', + 'footer', 'none', 'plink', 'link', 'frame', 'dframe' + ) + ), + 'SYMBOLS' => array( + 0 => array( + '%', 'b01', + ), + 1 => array( + '+', '-', '==', '>=', '=<', + ), + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => false, + 1 => true, + 2 => true + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: #e63ec3;', + 2 => 'color: #e63ec3;' + ), + 'COMMENTS' => array( + 0 => 'color: #0000ff;' + //1 => 'color: #ffa500;' + ), + 'ESCAPE_CHAR' => array( + 1 => 'color: #000099;' + ), + 'BRACKETS' => array( + 0 => 'color: #000000;' + ), + 'STRINGS' => array( + 0 => 'color: #8a0808;', + 1 => 'color: #6e6e6e;' + ), + 'NUMBERS' => array( + 0 => 'color: #0b610b;' + ), + 'METHODS' => array( + ), + 'SYMBOLS' => array( + 0 => 'color: #0b610b;', + 1 => 'color: #e63ec3;' + ), + 'REGEXPS' => array( + 1 => 'color: #0b610b;' + ), + 'SCRIPT' => array( + ) + ), + 'URLS' => array( + 1 => '', + 2 => '' + ), + 'OOLANG' => false, + 'OBJECT_SPLITTERS' => array( + ), + 'REGEXPS' => array( + // Numbers, e.g. 255u08 + 1 => "[0-9]*[subf][0136][12468]" + ), + 'STRICT_MODE_APPLIES' => GESHI_NEVER, + 'SCRIPT_DELIMITERS' => array( + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + ), + 'TAB_WIDTH' => 4, + 'PARSER_CONTROL' => array( + 'COMMENTS' => array( + 'DISALLOWED_BEFORE' => '$' + ), + 'KEYWORDS' => array( + 'DISALLOWED_BEFORE' => "(?<![\.\-a-zA-Z0-9_\$\#])", + 'DISALLOWED_AFTER' => "(?![\.\-a-zA-Z0-9_%=\\/])" + ) + ) +); + +?> \ No newline at end of file diff --git a/inc/geshi/erlang.php b/inc/geshi/erlang.php index d98de2f37f065fad402c1b4fcb599865de24f8c4..ede55917cc037d4f4b55e3b35115eee9dd63a298 100644 --- a/inc/geshi/erlang.php +++ b/inc/geshi/erlang.php @@ -7,7 +7,7 @@ * - Uwe Dauernheim (uwe@dauernheim.net) * - Dan Forest-Barbier (dan@twisted.in) * Copyright: (c) 2008 Uwe Dauernheim (http://www.kreisquadratur.de/) - * Release Version: 1.0.8.8 + * Release Version: 1.0.8.10 * Date Started: 2008-09-27 * * Erlang language file for GeSHi. @@ -355,7 +355,7 @@ $language_data = array( 2 => ':' ), 'REGEXPS' => array( - // Macro definitions + //�Macro definitions 0 => array( GESHI_SEARCH => '(-define\s*\()([a-zA-Z0-9_]+)(\(|,)', GESHI_REPLACE => '\2', @@ -403,7 +403,7 @@ $language_data = array( GESHI_BEFORE => '\1', GESHI_AFTER => '' ), - // ASCII codes + // ASCII�codes 6 => '(\$[a-zA-Z0-9_])', // Records 7 => array( @@ -423,8 +423,8 @@ $language_data = array( 'PARSER_CONTROL' => array( 'KEYWORDS' => array( 3 => array( - 'DISALLOWED_BEFORE' => '', - 'DISALLOWED_AFTER' => '(?=\s*\()' + 'DISALLOWED_BEFORE' => '(?<![\w])', + 'DISALLOWED_AFTER' => ''//'(?=\s*\()' ), 5 => array( 'DISALLOWED_BEFORE' => '(?<=\'|)', diff --git a/inc/geshi/euphoria.php b/inc/geshi/euphoria.php new file mode 100644 index 0000000000000000000000000000000000000000..afd4ad7c4f67be0034d81beee0c133cdd4884b13 --- /dev/null +++ b/inc/geshi/euphoria.php @@ -0,0 +1,140 @@ +<?php +/************************************************************************************* + * euphoria.php + * --------------------------------- + * Author: Nicholas Koceja (nerketur@hotmail.com) + * Copyright: (c) 2010 Nicholas Koceja + * Release Version: 1.0.8.10 + * Date Started: 11/24/2010 + * + * Euphoria language file for GeSHi. + * + * Author's note: The colors are based off of the Euphoria Editor (ed.ex) colors. + * Also, I added comments in places so I could remember a few things about Euphoria. + * + * + * CHANGES + * ------- + * <date-of-release> (1.0.8.9) + * - First Release + * + * TODO (updated <date-of-release>) + * ------------------------- + * seperate the funtions from the procedures, and have a slight color change for each. + * + ************************************************************************************* + * + * This file is part of GeSHi. + * + * GeSHi is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * GeSHi is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with GeSHi; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + ************************************************************************************/ + +$language_data = array ( + 'LANG_NAME' => 'Euphoria', + 'COMMENT_SINGLE' => array(1 => '--'), + 'COMMENT_MULTI' => array(), //Euphoria doesn't support multi-line comments + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array("'", '"'), + 'ESCAPE_CHAR' => '\\', + 'KEYWORDS' => array( + 1 => array( // keywords + 'and', 'by', 'constant', 'do', 'else', 'elsif', 'end', 'exit', + 'for', 'function', 'global', 'if', 'include', 'not', 'or', + 'procedure', 'return', 'then', 'to', 'type', 'while', 'with', + 'without', 'xor' + ), + 2 => array( // built-ins + 'abort', 'and_bits', 'append', 'arctan', 'atom', 'c_func', 'call', + 'c_proc', 'call_func', 'call_proc', 'clear_screen', 'close', 'compare', + 'command_line', 'cos', 'date', 'equal', 'find', 'find_from', 'floor', + 'getc', 'getenv', 'gets', 'get_key', 'get_pixel', 'integer', 'length', + 'log', 'machine_func', 'machine_proc', 'match', 'match_from', + 'mem_copy', 'mem_set', 'not_bits', 'object', 'open', 'or_bits', 'peek', + 'peek4s', 'peek4u', 'pixel', 'platform', 'poke', 'poke4', 'position', + 'power', 'prepend', 'print', 'printf', 'profile', 'puts', 'rand', + 'remainder', 'repeat', 'routine_id', 'sequence', 'sin', 'sprintf', + 'sqrt', 'system', 'system_exec', 'tan', 'task_clock_stop', + 'task_clock_start', 'task_create', 'task_list', 'task_schedule', + 'task_self', 'task_status', 'task_suspend', 'task_yield', 'time', + 'trace', 'xor_bits' + ), + ), + 'SYMBOLS' => array( + 0 => array( + '(', ')', '{', '}', '[', ']' + ), + 1 => array( + '+', '-', '*', '/', '=', '&', '^' + ), + 2 => array( + '&', '?', ',' + ) + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => false, + 1 => true, + 2 => true, + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: #0000ff; font-weight: bold;', // keywords + 2 => 'color: #cc33ff; font-weight: bold;', // builtins + ), + 'COMMENTS' => array( + 1 => 'color: #ff0000; font-style: italic;', + 'MULTI' => '' // doesn't exist + ), + 'ESCAPE_CHAR' => array( + 0 => 'color: #009900; font-weight: bold;' + ), + 'BRACKETS' => array( + 0 => 'color: #999900; font-weight: bold;' + ), + 'STRINGS' => array( + 0 => 'color: #00cc00;' + ), + 'NUMBERS' => array( + 0 => 'color: #cc33cc; font-style: italic' + ), + 'METHODS' => array( // Doesn't exist in Euphoria. Everything is a function =) + 0 => '' + ), + 'SYMBOLS' => array( + 0 => 'color: #999900;', // brackets + 1 => 'color: #333333;', // operators + 2 => 'color: #333333; font-style: bold' // print+concat + ), + 'REGEXPS' => array( + ), + 'SCRIPT' => array( // Never included in scripts. + ) + ), + 'REGEXPS' => array( + ), + 'URLS' => array( + 1 => '', + 2 => '' + ), + 'OOLANG' => false, + 'OBJECT_SPLITTERS' => array(), + 'STRICT_MODE_APPLIES' => GESHI_NEVER, + 'SCRIPT_DELIMITERS' => array( + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + ) +); + +?> \ No newline at end of file diff --git a/inc/geshi/f1.php b/inc/geshi/f1.php new file mode 100644 index 0000000000000000000000000000000000000000..13056b78b40d691a3619f6a5a07a3273dd4010c4 --- /dev/null +++ b/inc/geshi/f1.php @@ -0,0 +1,151 @@ +<?php +/************************************************************************************* + * f1.php + * ------- + * Author: Juro Bystricky (juro@f1compiler.com) + * Copyright: K2 Software Corp. + * Release Version: 1.0.8.10 + * Date Started: 2010/07/06 + * + * Formula One language file for GeSHi. + * + * CHANGES + * ------- + * 2010/07/06 (1.0.8.9) + * - First Release + * + * TODO + * ------------------------- + * - Add more RTL functions with URLs + * + ************************************************************************************* + * + * This file is part of GeSHi. + * + * GeSHi is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * GeSHi is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with GeSHi; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + ************************************************************************************/ + +$language_data = array( + 'LANG_NAME' => 'Formula One', + 'COMMENT_SINGLE' => array(1 => '//'), + 'COMMENT_MULTI' => array('{' => '}'), + 'COMMENT_REGEXP' => array( + //Nested Comments + 2 => "/(\{(?:\{.*\}|[^\{])*\})/m" + ), + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array("'",'"'), + 'ESCAPE_CHAR' => '', + 'ESCAPE_REGEXP' => array( + //Simple Single Char Escapes + 1 => "#\\\\[\\\\nrt\'\"?\n]#i", + //Hexadecimal Char Specs (Utf16 codes, Unicode versions only) + 2 => "#\\\\u[\da-fA-F]{4}#", + ), + 'NUMBERS' => + GESHI_NUMBER_INT_BASIC | GESHI_NUMBER_INT_CSTYLE | + GESHI_NUMBER_BIN_PREFIX_0B | + GESHI_NUMBER_OCT_PREFIX_0O | + GESHI_NUMBER_HEX_PREFIX | + GESHI_NUMBER_FLT_NONSCI | + GESHI_NUMBER_FLT_SCI_SHORT | GESHI_NUMBER_FLT_SCI_ZERO, + 'KEYWORDS' => array( + 1 => array( + 'pred','proc','subr','else','elsif','iff','if','then','false','true', + 'case','of','use','local','mod','end','list','file','all','one','max','min','rel', + 'external','Nil','_stdcall','_cdecl','_addressof','_pred','_file','_line' + ), + 2 => array( + 'Ascii','Bin','I','L','P','R','S','U' + ), + 3 => array( + 'Append','in','Dupl','Len','Print','_AllDifferent','_AllAscending', + '_AllDescending','_Ascending','_Descending' + ) + ), + 'SYMBOLS' => array( + 0 => array('(', ')', '[', ']'), + 1 => array('<', '>','='), + 2 => array('+', '-', '*', '/'), + 3 => array('&', '|'), + 4 => array(':', ';') + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => false, + 1 => true, + 2 => true, + 3 => true, + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: #0000ff;', + 2 => 'color: #000080;', + 3 => 'color: #000080;', + ), + 'BRACKETS' => array( + 0 => 'color: #000000;' + ), + 'COMMENTS' => array( + 1 => 'color: #008000; font-style: italic;', + 2 => 'color: #008000; font-style: italic;', + 'MULTI' => 'color: #008000; font-style: italic;' + ), + 'ESCAPE_CHAR' => array( + 0 => 'color: #000099; font-weight: bold;', + 1 => 'color: #000099; font-weight: bold;', + 2 => 'color: #009999; font-weight: bold;', + ), + 'STRINGS' => array( + 0 => 'color: #ff0000;' + ), + 'NUMBERS' => array( + 0 => 'color: #800000;' + ), + 'METHODS' => array( + 1 => 'color: #202020;' + ), + 'SYMBOLS' => array( + 0 => 'color: #000000;', + 1 => 'color: #000000;', + 2 => 'color: #000000;', + 3 => 'color: #000000;', + 4 => 'color: #000000;' + ), + 'REGEXPS' => array( + ), + 'SCRIPT' => array( + ) + ), + 'URLS' => array( + 1 => '', + 2 => '', + 3 => 'http://www.f1compiler.com/f1helponline/f1_runtime_library.html#{FNAME}' + ), + 'OOLANG' => true, + 'OBJECT_SPLITTERS' => array( + 1 => '.' + ), + 'REGEXPS' => array( + ), + 'STRICT_MODE_APPLIES' => GESHI_NEVER, + 'SCRIPT_DELIMITERS' => array( + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + ), + 'TAB_WIDTH' => 4 +); + +?> \ No newline at end of file diff --git a/inc/geshi/falcon.php b/inc/geshi/falcon.php new file mode 100644 index 0000000000000000000000000000000000000000..ce75f205725c49a1172c179c8e42ff1970cab068 --- /dev/null +++ b/inc/geshi/falcon.php @@ -0,0 +1,218 @@ +<?php +/************************************************************************************* + * falcon.php + * --------------------------------- + * Author: billykater (billykater+geshi@gmail.com) + * Copyright: (c) 2010 billykater (http://falconpl.org/) + * Release Version: 1.0.8.10 + * Date Started: 2010/06/07 + * + * Falcon language file for GeSHi. + * + * CHANGES + * ------- + * <2010/8/1> (1.0.8.10) + * - First Release + * + ************************************************************************************* + * + * This file is part of GeSHi. + * + * GeSHi is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * GeSHi is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with GeSHi; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * ************************************************************************************/ + +$language_data = array ( + 'LANG_NAME' => 'Falcon', + 'COMMENT_SINGLE' => array( 1 => '//' ), + 'COMMENT_MULTI' => array( '/*' => '*/' ), + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array( "'", '"' ), + 'ESCAPE_CHAR' => '\\', + 'KEYWORDS' => array( + 1 => array( + 'break','case','catch','class','const','continue','def','default', + 'dropping','elif','else','end','enum','for','forfirst','forlast', + 'formiddle','from','function','global','if','init','innerfunc', + 'launch','loop','object','raise','return','select','state','static', + 'switch','try','while' + ), + 2 => array( + 'false','nil','true', + ), + 3 => array( + 'and','as','eq','fself','in','not','notin','or','provides','self','to' + ), + 4 => array( + 'directive','export','import','load','macro' + ), + 5 => array( + 'ArrayType','BooleanType','ClassMethodType','ClassType','DictionaryType', + 'FunctionType','MemBufType','MethodType','NilType','NumericType','ObjectType', + 'RangeType','StringType','LBindType' + ), + 6 => array( + "CurrentTime","IOStream","InputStream","MemBufFromPtr","OutputStream", + "PageDict","ParseRFC2822","abs","acos","all", + "allp","any","anyp","argd","argv", + "arrayAdd","arrayBuffer","arrayCompact","arrayDel","arrayDelAll", + "arrayFill","arrayFind","arrayHead","arrayIns","arrayMerge", + "arrayNM","arrayRemove","arrayResize","arrayScan","arraySort", + "arrayTail","asin","assert","atan","atan2", + "attributes","baseClass","beginCritical","bless","brigade", + "broadcast","cascade","ceil","choice","chr", + "className","clone","combinations","compare","consume", + "cos","deg2rad","deoob","derivedFrom","describe", + "deserialize","dictBack","dictBest","dictClear","dictFill", + "dictFind","dictFront","dictGet","dictKeys","dictMerge", + "dictRemove","dictSet","dictValues","dirChange","dirCurrent", + "dirMake","dirMakeLink","dirReadLink","dirRemove","dolist", + "endCritical","epoch","eval","exit","exp", + "factorial","fileChgroup","fileChmod","fileChown","fileCopy", + "fileExt","fileMove","fileName","fileNameMerge","filePath", + "fileRemove","fileType","fileUnit","filter","fint", + "firstOf","floop","floor","fract","getAssert", + "getEnviron","getProperty","getSlot","getSystemEncoding","getenv", + "iff","include","input","inspect","int", + "isBound","isCallable","isoob","lbind","len", + "let","lit","log","map","max", + "metaclass","min","numeric","oob","ord", + "paramCount","paramIsRef","paramSet","parameter","passvp", + "permutations","pow","print","printl","properties", + "rad2deg","random","randomChoice","randomDice","randomGrab", + "randomPick","randomSeed","randomWalk","readURI","reduce", + "retract","round","seconds","serialize","set", + "setProperty","setenv","sin","sleep","stdErr", + "stdErrRaw","stdIn","stdInRaw","stdOut","stdOutRaw", + "strBack","strBackFind","strBackTrim","strBuffer","strCmpIgnoreCase", + "strEndsWith","strEscape","strEsq","strFill","strFind", + "strFromMemBuf","strFront","strFrontTrim","strLower","strMerge", + "strReplace","strReplicate","strSplit","strSplitTrimmed","strStartsWith", + "strToMemBuf","strTrim","strUnescape","strUnesq","strUpper", + "strWildcardMatch","subscribe","systemErrorDescription","tan","times", + "toString","transcodeFrom","transcodeTo","typeOf","unsetenv", + "unsubscribe","valof","vmFalconPath","vmIsMain","vmModuleName", + "vmModuleVersionInfo","vmSearchPath","vmSystemType","vmVersionInfo","vmVersionName", + "writeURI","xmap","yield","yieldOut" + ), + 7 => array( + "AccessError","Array","BOM","Base64","Class", + "ClassMethod","CloneError","CmdlineParser","CodeError","Continuation", + "Dictionary","Directory","Error","FileStat","Format", + "Function","GarbagePointer","GenericError","Integer","InterruptedError", + "IoError","Iterator","LateBinding","List","MathError", + "MemoryBuffer","MessageError","Method","Numeric","Object", + "ParamError","ParseError","Path","Range","Semaphore", + "Sequence","Set","Stream","String","StringStream", + "SyntaxError","Table","TableError","TimeStamp","TimeZone", + "Tokenizer","TypeError","URI","VMSlot" + ), + 8 => array( + "args","scriptName","scriptPath" + ), + 9 => array( + "GC" + ), + ), + 'URLS' => array( + 1 => '', + 2 => '', + 3 => '', + 4 => '', + 5 => 'http://falconpl.org/project_docs/core/functions.html#typeOf', + 6 => 'http://falconpl.org/project_docs/core/functions.html#{FNAME}', + 7 => 'http://falconpl.org/project_docs/core/class_{FNAME}.html', + 8 => 'http://falconpl.org/project_docs/core/globals.html#{FNAME}', + 9 => 'http://falconpl.org/project_docs/core/object_{FNAME}.html)' + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => false, + 1 => true, + 2 => true, + 3 => true, + 4 => true, + 5 => true, + 6 => true, + 7 => true, + 8 => true, + 9 => true + ), + 'SYMBOLS' => array( + '(',')','$','%','&','/','{','[',']','=','}','?','+','-','#','*','@', + '<','>','|',',',':',';','\\','^' + ), + 'REGEXPS' => array( + 0 => array( + GESHI_SEARCH => '(\[)([a-zA-Z_]|\c{C})(?:[a-zA-Z0-9_]|\p{C})*(\])', + GESHI_REPLACE => '\\2', + GESHI_MODIFIERS => '', + GESHI_BEFORE => '\\1', + GESHI_AFTER => '\\3', + + ), + ), + 'STRICT_MODE_APPLIES' => GESHI_MAYBE, + 'SCRIPT_DELIMITERS' => array( + 0 => array( '<?' => '?>' ) + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + 0 => true + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: #000080;font-weight:bold;', + 2 => 'color: #800000;font-weight:bold;', + 3 => 'color: #800000;font-weight:bold;', + 4 => 'color: #000080;font-weight:bold;', + 5 => 'color: #000000;font-weight:bold;', + 6 => 'font-weight:bold;', + 7 => 'font-weight:bold;', + 8 => 'font-weight:bold;' + ), + 'COMMENTS' => array( + 1 => 'color: #29B900;', + 'MULTI' => 'color: #008080' + ), + 'STRINGS' => array( + 0 => 'color: #800000' + ), + 'BRACKETS' => array( + 0 => 'color: #000000' + ), + 'ESCAPE_CHAR' => array( + 0 => 'color: #800000' + ), + 'NUMBERS' => array( + 0 => 'color: #000000' + ), + 'METHODS' => array( + 0 => 'color: #000000' + ), + 'SYMBOLS' => array( + 0 => 'color: #8B0513' + ), + 'SCRIPT' => array( + 0 => '' + ), + 'REGEXPS' => array( + 0 => 'color: #FF00FF' + ) + ), + + 'OOLANG' => true, + 'OBJECT_SPLITTERS' => array( + '.' + ) +); +?> \ No newline at end of file diff --git a/inc/geshi/fo.php b/inc/geshi/fo.php index 3a1d24021d0b6112439d2dc9c604f4d880f3752b..e472f2271089007914b7ebfeac841905b9742f50 100644 --- a/inc/geshi/fo.php +++ b/inc/geshi/fo.php @@ -4,7 +4,7 @@ * -------- * Author: Tan-Vinh Nguyen (tvnguyen@web.de) * Copyright: (c) 2009 Tan-Vinh Nguyen - * Release Version: 1.0.8.8 + * Release Version: 1.0.8.10 * Date Started: 2009/03/23 * * fo language file for GeSHi. diff --git a/inc/geshi/fortran.php b/inc/geshi/fortran.php index 6eac52ae09a3ae4b7229009436c34868b65ed7d8..247e3e4b42493053c49c567fd38c2affbf0e5dfc 100644 --- a/inc/geshi/fortran.php +++ b/inc/geshi/fortran.php @@ -4,7 +4,7 @@ * ----------- * Author: Cedric Arrabie (cedric.arrabie@univ-pau.fr) * Copyright: (C) 2006 Cetric Arrabie - * Release Version: 1.0.8.8 + * Release Version: 1.0.8.10 * Date Started: 2006/04/22 * * Fortran language file for GeSHi. diff --git a/inc/geshi/freebasic.php b/inc/geshi/freebasic.php index 35fc8ca6f2c4105263347b71b786130f513d1174..8ac2904eb7ec3dbd3b809c0503fe6544747b1ae8 100644 --- a/inc/geshi/freebasic.php +++ b/inc/geshi/freebasic.php @@ -4,7 +4,7 @@ * ------------- * Author: Roberto Rossi * Copyright: (c) 2005 Roberto Rossi (http://rsoftware.altervista.org) - * Release Version: 1.0.8.8 + * Release Version: 1.0.8.10 * Date Started: 2005/08/19 * * FreeBasic (http://www.freebasic.net/) language file for GeSHi. diff --git a/inc/geshi/fsharp.php b/inc/geshi/fsharp.php index 56146958c957dcd679a3b37275687c07d00ae214..a900e4b60d157e9f8f78df6d246418d97e6851d4 100644 --- a/inc/geshi/fsharp.php +++ b/inc/geshi/fsharp.php @@ -4,7 +4,7 @@ * ---------- * Author: julien ortin (jo_spam-divers@yahoo.fr) * Copyright: (c) 2009 julien ortin - * Release Version: 1.0.8.8 + * Release Version: 1.0.8.10 * Date Started: 2009/09/20 * * F# language file for GeSHi. @@ -43,7 +43,8 @@ $language_data = array( 'LANG_NAME' => 'F#', 'COMMENT_SINGLE' => array(1 => '//', 2 => '#'), - 'COMMENT_MULTI' => array('(*' => '*)', '/*' => '*/'), + 'COMMENT_MULTI' => array('/*' => '*/'), + 'COMMENT_REGEXP' => array(3 => '/\(\*(?!\)).*?\*\)/'), 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, 'QUOTEMARKS' => array("'", '"'), 'HARDQUOTE' => array('@"', '"'), @@ -153,7 +154,8 @@ $language_data = array( 'COMMENTS' => array( 'MULTI' => 'color: #5d478b; font-style: italic;', /* light purple */ 1 => 'color: #5d478b; font-style: italic;', - 2 => 'color: #5d478b; font-style: italic;' /* light purple */ + 2 => 'color: #5d478b; font-style: italic;', /* light purple */ + 3 => 'color: #5d478b; font-style: italic;' /* light purple */ ), 'ESCAPE_CHAR' => array( ), diff --git a/inc/geshi/gambas.php b/inc/geshi/gambas.php index 0fc89bb59eb427a23fee2d10c6fb440bc52160e3..b89db03828343e0e73932221ec911a4036ff365b 100644 --- a/inc/geshi/gambas.php +++ b/inc/geshi/gambas.php @@ -5,7 +5,7 @@ * Author: Jesus Guardon (jguardon@telefonica.net) * Copyright: (c) 2009 Jesus Guardon (http://gambas-es.org), * Benny Baumann (http://qbnz.com/highlighter) - * Release Version: 1.0.8.8 + * Release Version: 1.0.8.10 * Date Started: 2004/08/20 * * GAMBAS language file for GeSHi. diff --git a/inc/geshi/gdb.php b/inc/geshi/gdb.php index ed7ee2ffaba0ae0afddb4c3cb717f958448cba73..284b589a0377d2202c6a3ebc5f0ba1835d4be533 100644 --- a/inc/geshi/gdb.php +++ b/inc/geshi/gdb.php @@ -4,7 +4,7 @@ * -------- * Author: Milian Wolff (mail@milianw.de) * Copyright: (c) 2009 Milian Wolff - * Release Version: 1.0.8.8 + * Release Version: 1.0.8.10 * Date Started: 2009/06/24 * * GDB language file for GeSHi. @@ -43,7 +43,7 @@ $language_data = array ( 'COMMENT_MULTI' => array(), 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, 'QUOTEMARKS' => array('"'), - 'ESCAPE_CHAR' => '', + 'ESCAPE_CHAR' => '\\', 'KEYWORDS' => array( 0 => array( 'Application', @@ -54,8 +54,7 @@ $language_data = array ( '[KCrash Handler]', ), ), - 'NUMBERS' => - GESHI_NUMBER_INT_BASIC, + 'NUMBERS' => false, 'SYMBOLS' => array( ), 'CASE_SENSITIVE' => array( @@ -79,7 +78,6 @@ $language_data = array ( 0 => 'color: #933;' ), 'NUMBERS' => array( - 0 => 'color: #cc66cc;', ), 'METHODS' => array( ), @@ -88,12 +86,14 @@ $language_data = array ( 'REGEXPS' => array( 0 => 'color: #000066; font-weight:bold;', 1 => 'color: #006600;', - 2 => 'color: #000066;', - 3 => 'color: #0066FF; text-style:italic;', - 4 => 'color: #80B5FF; text-style:italic;', - 5 => 'color: #A3007D;', - 6 => 'color: #FF00BF;', - 7 => 'font-weight: bold;' + 2 => 'color: #B07E00;', + 3 => 'color: #0057AE; text-style:italic;', + 4 => 'color: #0057AE; text-style:italic;', + 5 => 'color: #442886;', + 6 => 'color: #442886; font-weight:bold;', + 7 => 'color: #FF0000; font-weight:bold;', + 8 => 'color: #006E26;', + 9 => 'color: #555;', ), 'SCRIPT' => array( ) @@ -132,7 +132,7 @@ $language_data = array ( ), //Files with linenumbers 3 => array( - GESHI_SEARCH => '(at )(.+)(:\d+\s*)$', + GESHI_SEARCH => '(at\s+)(.+)(:\d+\s*)$', GESHI_REPLACE => '\\2', GESHI_MODIFIERS => 'm', GESHI_BEFORE => '\\1', @@ -140,16 +140,14 @@ $language_data = array ( ), //Libs without linenumbers 4 => array( - GESHI_SEARCH => '(from )(.+)(\s*)$', + GESHI_SEARCH => '(from\s+)(.+)(\s*)$', GESHI_REPLACE => '\\2', GESHI_MODIFIERS => 'm', GESHI_BEFORE => '\\1', GESHI_AFTER => '\\3' ), - //Hex mem address - 5 => '0x[a-f0-9]+', //Line numbers - 6 => array( + 5 => array( GESHI_SEARCH => '(:)(\d+)(\s*)$', GESHI_REPLACE => '\\2', GESHI_MODIFIERS => 'm', @@ -157,19 +155,44 @@ $language_data = array ( GESHI_AFTER => '\\3' ), //Location + 6 => array( + GESHI_SEARCH => '(\s+)(in\s+)?([^ 0-9][^ ]*)([ \n]+\()', + GESHI_REPLACE => '\\3', + GESHI_MODIFIERS => '', + GESHI_BEFORE => '\\1\\2', + GESHI_AFTER => '\\4' + ), + // interesting parts: abort, qFatal, assertions, null ptrs, ... 7 => array( - GESHI_SEARCH => '( in )([^ \(\)]+)( \()', - GESHI_REPLACE => '\\2', + GESHI_SEARCH => '\b((?:\*__GI_)?(?:__assert_fail|abort)|qFatal|0x0)\b([^\.]|$)', + GESHI_REPLACE => '\\1', GESHI_MODIFIERS => '', - GESHI_BEFORE => '\\1', - GESHI_AFTER => '\\3' + GESHI_BEFORE => '', + GESHI_AFTER => '\\2' + ), + // Namespace / Classes + 8 => array( + GESHI_SEARCH => '\b(\w+)(::)', + GESHI_REPLACE => '\\1', + GESHI_MODIFIERS => 'U', + GESHI_BEFORE => '', + GESHI_AFTER => '\\2' ), + // make ptr adresses and <value optimized out> uninteresting + 9 => '\b(?:0x[a-f0-9]{2,}|value\s+optimized\s+out)\b' ), 'STRICT_MODE_APPLIES' => GESHI_NEVER, 'SCRIPT_DELIMITERS' => array( ), 'HIGHLIGHT_STRICT_BLOCK' => array( + ), + 'PARSER_CONTROL' => array( + 'ENABLE_FLAGS' => array( + 'NUMBERS' => false + ), ) ); +// kate: replace-tabs on; indent-width 4; + ?> diff --git a/inc/geshi/genero.php b/inc/geshi/genero.php index a7ccf5fee330ed4d78d922a668469ceea07a71f3..1d70d752c50d0010ea5586ed2f0a5eb81f4924f1 100644 --- a/inc/geshi/genero.php +++ b/inc/geshi/genero.php @@ -4,7 +4,7 @@ * ---------- * Author: Lars Gersmann (lars.gersmann@gmail.com) * Copyright: (c) 2007 Lars Gersmann, Nigel McNie (http://qbnz.com/highlighter/) - * Release Version: 1.0.8.8 + * Release Version: 1.0.8.10 * Date Started: 2007/07/01 * * Genero (FOURJ's Genero 4GL) language file for GeSHi. diff --git a/inc/geshi/genie.php b/inc/geshi/genie.php index 66bea6dc7c2dea1f94eae8362842f101d416ac4e..898f9ef106f608ef4f526e308b4f16735923aaad 100644 --- a/inc/geshi/genie.php +++ b/inc/geshi/genie.php @@ -4,7 +4,7 @@ * ---------- * Author: Nicolas Joseph (nicolas.joseph@valaide.org) * Copyright: (c) 2009 Nicolas Joseph - * Release Version: 1.0.8.8 + * Release Version: 1.0.8.10 * Date Started: 2009/04/29 * * Genie language file for GeSHi. diff --git a/inc/geshi/gettext.php b/inc/geshi/gettext.php index e1c88e185bb291e6d911bfd210bc75732573a996..1dc8f8d24311177482539f026492498cd01561ea 100644 --- a/inc/geshi/gettext.php +++ b/inc/geshi/gettext.php @@ -4,7 +4,7 @@ * -------- * Author: Milian Wolff (mail@milianw.de) * Copyright: (c) 2008 Milian Wolff - * Release Version: 1.0.8.8 + * Release Version: 1.0.8.10 * Date Started: 2008/05/25 * * GNU Gettext .po/.pot language file for GeSHi. diff --git a/inc/geshi/glsl.php b/inc/geshi/glsl.php index f9a37ed0713a1f147076c0ee9b28f14d8c417985..d810db3f0f098f063cb50235a2f29428cb724dec 100644 --- a/inc/geshi/glsl.php +++ b/inc/geshi/glsl.php @@ -4,7 +4,7 @@ * ----- * Author: Benny Baumann (BenBE@omorphia.de) * Copyright: (c) 2008 Benny Baumann (BenBE@omorphia.de) - * Release Version: 1.0.8.8 + * Release Version: 1.0.8.10 * Date Started: 2008/03/20 * * glSlang language file for GeSHi. diff --git a/inc/geshi/gml.php b/inc/geshi/gml.php index 3f8a06c4f8656f0ffbf9733a8b77f7f0e4437b9b..57c42d4c8afccfbeb98822348e9658d67b44fd27 100644 --- a/inc/geshi/gml.php +++ b/inc/geshi/gml.php @@ -4,7 +4,7 @@ * -------- * Author: Jos� Jorge Enr�quez (jenriquez@users.sourceforge.net) * Copyright: (c) 2005 Jos� Jorge Enr�quez Rodr�guez (http://www.zonamakers.com) - * Release Version: 1.0.8.8 + * Release Version: 1.0.8.10 * Date Started: 2005/06/21 * * GML language file for GeSHi. diff --git a/inc/geshi/gnuplot.php b/inc/geshi/gnuplot.php index 980561d35d0bbe7496c67c52d837b90451f341da..59b343eb104b79c5b33b56fed3a6bec15df10a2c 100644 --- a/inc/geshi/gnuplot.php +++ b/inc/geshi/gnuplot.php @@ -4,7 +4,7 @@ * ---------- * Author: Milian Wolff (mail@milianw.de) * Copyright: (c) 2008 Milian Wolff (http://milianw.de) - * Release Version: 1.0.8.8 + * Release Version: 1.0.8.10 * Date Started: 2008/07/07 * * Gnuplot script language file for GeSHi. diff --git a/inc/geshi/go.php b/inc/geshi/go.php new file mode 100644 index 0000000000000000000000000000000000000000..a71c2515ef98f5f9b836cc35808464f175654459 --- /dev/null +++ b/inc/geshi/go.php @@ -0,0 +1,375 @@ +<?php +/************************************************************************************* + * go.php + * -------- + * Author: Markus Jarderot (mizardx at gmail dot com) + * Copyright: (c) 2010 Markus Jarderot + * Release Version: 1.0.8.10 + * Date Started: 2010/05/20 + * + * Go language file for GeSHi. + * + * CHANGES + * ------- + * 2010/05/20 (1.0.8.9) + * - First Release + * + * TODO (updated 2010/05/20) + * ------------------------- + * + ************************************************************************************* + * + * This file is part of GeSHi. + * + * GeSHi is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * GeSHi is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with GeSHi; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + ************************************************************************************/ + +$language_data = array( + 'LANG_NAME' => 'Go', + 'COMMENT_SINGLE' => array(1 => '//'), + 'COMMENT_MULTI' => array('/*' => '*/'), + 'COMMENT_REGEXP' => array( + # Raw strings (escapes and linebreaks ignored) + 2 => "#`[^`]*`#" + ), + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array('"', "'"), + 'ESCAPE_CHAR' => '', + 'ESCAPE_REGEXP' => array( + 1 => "#\\\\[abfnrtv\\\\\'\"]#", + 2 => "#\\\\[0-7]{3}#", + 3 => "#\\\\x[0-9a-fA-F]{2}#", + 4 => "#\\\\u[0-9a-fA-F]{4}#", + 5 => "#\\\\U[0-9a-fA-F]{8}#" + ), + 'NUMBERS' => array( + # integer literals (possibly imaginary) + 0 => '\b([1-9][0-9]*i?|0[0-7]*|0[xX][0-9a-f]+|0[0-9]*i)\b', + # real floating point literals + 1 => '\b((?:\d+\.\d*(?:[Ee][+-]?\d+\b)?|\.\d+(?:[Ee][+-]?\d+)?|\d+[Ee][+-]?\d+)?)\b', + # imaginary floating point literals + 2 => '\b((?:\d+\.\d*(?:[Ee][+-]?\d+)?|\.\d+(?:[Ee][+-]?\d+)?|\d+[Ee][+-]?\d+)?i)\b' + ), + 'KEYWORDS' => array( + # statements + 1 => array( + 'break', 'case', 'const', 'continue', 'default', 'defer', 'else', + 'fallthrough', 'for', 'go', 'goto', 'if', 'import', 'package', + 'range', 'return', 'select', 'switch', 'type', 'var' + ), + # literals + 2 => array( + 'nil', 'true', 'false' + ), + # built-in functions + 3 => array( + 'close', 'closed', 'len', 'cap', 'new', 'make', 'copy', 'cmplx', + 'real', 'imag', 'panic', 'recover', 'print', 'println' + ), + # built-in types + 4 => array( + 'chan', 'func', 'interface', 'map', 'struct', 'bool', 'uint8', + 'uint16', 'uint32', 'uint64', 'int8', 'int16', 'int32', 'int64', + 'float32', 'float64', 'complex64', 'complex128', 'byte', 'uint', + 'int', 'float', 'complex', 'uintptr', 'string' + ), + # library types + 5 => array( + 'aes.Cipher', 'aes.KeySizeError', 'ascii85.CorruptInputError', 'asn1.BitString', + 'asn1.RawValue', 'asn1.StructuralError', 'asn1.SyntaxError', 'ast.ChanDir', + 'ast.Comment', 'ast.CommentGroup', 'ast.Decl', 'ast.Expr', 'ast.Field', + 'ast.FieldList', 'ast.File', 'ast.Filter', 'ast.MergeMode', 'ast.Node', + 'ast.ObjKind', 'ast.Object', 'ast.Package', 'ast.Scope', 'ast.Stmt', + 'ast.Visitor', 'av.Color', 'av.Image', 'av.Window', 'base64.CorruptInputError', + 'base64.Encoding', 'big.Int', 'big.Word', 'bignum.Integer', 'bignum.Rational', + 'binary.ByteOrder', 'block.Cipher', 'block.EAXTagError', 'blowfish.Cipher', + 'blowfish.KeySizeError', 'bufio.BufSizeError', 'bufio.Error', 'bufio.ReadWriter', + 'bufio.Reader', 'bufio.Writer', 'bytes.Buffer', 'datafmt.Environment', + 'datafmt.Format', 'datafmt.Formatter', 'datafmt.FormatterMap', 'datafmt.State', + 'doc.Filter', 'doc.FuncDoc', 'doc.PackageDoc', 'doc.TypeDoc', 'doc.ValueDoc', + 'draw.Color', 'draw.Context', 'draw.Image', 'draw.Mouse', 'draw.Op', + 'draw.Point', 'draw.Rectangle', 'dwarf.AddrType', 'dwarf.ArrayType', + 'dwarf.Attr', 'dwarf.BasicType', 'dwarf.BoolType', 'dwarf.CharType', + 'dwarf.CommonType', 'dwarf.ComplexType', 'dwarf.Data', 'dwarf.DecodeError', + 'dwarf.DotDotDotType', 'dwarf.Entry', 'dwarf.EnumType', 'dwarf.EnumValue', + 'dwarf.Field', 'dwarf.FloatType', 'dwarf.FuncType', 'dwarf.IntType', + 'dwarf.Offset', 'dwarf.PtrType', 'dwarf.QualType', 'dwarf.Reader', + 'dwarf.StructField', 'dwarf.StructType', 'dwarf.Tag', 'dwarf.Type', + 'dwarf.TypedefType', 'dwarf.UcharType', 'dwarf.UintType', 'dwarf.VoidType', + 'elf.Class', 'elf.Data', 'elf.Dyn32', 'elf.Dyn64', 'elf.DynFlag', 'elf.DynTag', + 'elf.File', 'elf.FileHeader', 'elf.FormatError', 'elf.Header32', 'elf.Header64', + 'elf.Machine', 'elf.NType', 'elf.OSABI', 'elf.Prog', 'elf.Prog32', 'elf.Prog64', + 'elf.ProgFlag', 'elf.ProgHeader', 'elf.ProgType', 'elf.R_386', 'elf.R_ALPHA', + 'elf.R_ARM', 'elf.R_PPC', 'elf.R_SPARC', 'elf.R_X86_64', 'elf.Rel32', + 'elf.Rel64', 'elf.Rela32', 'elf.Rela64', 'elf.Section', 'elf.Section32', + 'elf.Section64', 'elf.SectionFlag', 'elf.SectionHeader', 'elf.SectionIndex', + 'elf.SectionType', 'elf.Sym32', 'elf.Sym64', 'elf.SymBind', 'elf.SymType', + 'elf.SymVis', 'elf.Symbol', 'elf.Type', 'elf.Version', 'eval.ArrayType', + 'eval.ArrayValue', 'eval.BoolValue', 'eval.BoundedType', 'eval.ChanType', + 'eval.Code', 'eval.Constant', 'eval.Def', 'eval.DivByZeroError', + 'eval.FloatValue', 'eval.Frame', 'eval.Func', 'eval.FuncDecl', 'eval.FuncType', + 'eval.FuncValue', 'eval.IMethod', 'eval.IdealFloatValue', 'eval.IdealIntValue', + 'eval.IndexError', 'eval.IntValue', 'eval.Interface', 'eval.InterfaceType', + 'eval.InterfaceValue', 'eval.KeyError', 'eval.Map', 'eval.MapType', + 'eval.MapValue', 'eval.Method', 'eval.MultiType', 'eval.NamedType', + 'eval.NegativeCapacityError', 'eval.NegativeLengthError', 'eval.NilPointerError', + 'eval.PtrType', 'eval.PtrValue', 'eval.RedefinitionError', 'eval.Scope', + 'eval.Slice', 'eval.SliceError', 'eval.SliceType', 'eval.SliceValue', + 'eval.StringValue', 'eval.StructField', 'eval.StructType', 'eval.StructValue', + 'eval.Thread', 'eval.Type', 'eval.UintValue', 'eval.Value', 'eval.Variable', + 'eval.World', 'exec.Cmd', 'expvar.Int', 'expvar.IntFunc', 'expvar.KeyValue', + 'expvar.Map', 'expvar.String', 'expvar.StringFunc', 'expvar.Var', 'flag.Flag', + 'flag.Value', 'flate.CorruptInputError', 'flate.InternalError', + 'flate.ReadError', 'flate.Reader', 'flate.WriteError', 'flate.WrongValueError', + 'fmt.Formatter', 'fmt.GoStringer', 'fmt.State', 'fmt.Stringer', + 'git85.CorruptInputError', 'gob.Decoder', 'gob.Encoder', 'gosym.DecodingError', + 'gosym.Func', 'gosym.LineTable', 'gosym.Obj', 'gosym.Sym', 'gosym.Table', + 'gosym.UnknownFileError', 'gosym.UnknownLineError', 'gzip.Deflater', + 'gzip.Header', 'gzip.Inflater', 'hash.Hash', 'hash.Hash32', 'hash.Hash64', + 'heap.Interface', 'hex.InvalidHexCharError', 'hex.OddLengthInputError', + 'http.ClientConn', 'http.Conn', 'http.Handler', 'http.HandlerFunc', + 'http.ProtocolError', 'http.Request', 'http.Response', 'http.ServeMux', + 'http.ServerConn', 'http.URL', 'http.URLError', 'http.URLEscapeError', + 'image.Alpha', 'image.AlphaColor', 'image.Color', 'image.ColorImage', + 'image.ColorModel', 'image.ColorModelFunc', 'image.Image', 'image.NRGBA', + 'image.NRGBA64', 'image.NRGBA64Color', 'image.NRGBAColor', 'image.Paletted', + 'image.RGBA', 'image.RGBA64', 'image.RGBA64Color', 'image.RGBAColor', + 'io.Closer', 'io.Error', 'io.PipeReader', 'io.PipeWriter', 'io.ReadByter', + 'io.ReadCloser', 'io.ReadSeeker', 'io.ReadWriteCloser', 'io.ReadWriteSeeker', + 'io.ReadWriter', 'io.Reader', 'io.ReaderAt', 'io.ReaderFrom', 'io.SectionReader', + 'io.Seeker', 'io.WriteCloser', 'io.WriteSeeker', 'io.Writer', 'io.WriterAt', + 'io.WriterTo', 'iterable.Func', 'iterable.Group', 'iterable.Grouper', + 'iterable.Injector', 'iterable.Iterable', 'jpeg.FormatError', 'jpeg.Reader', + 'jpeg.UnsupportedError', 'json.Decoder', 'json.Encoder', + 'json.InvalidUnmarshalError', 'json.Marshaler', 'json.MarshalerError', + 'json.SyntaxError', 'json.UnmarshalTypeError', 'json.Unmarshaler', + 'json.UnsupportedTypeError', 'list.Element', 'list.List', 'log.Logger', + 'macho.Cpu', 'macho.File', 'macho.FileHeader', 'macho.FormatError', 'macho.Load', + 'macho.LoadCmd', 'macho.Regs386', 'macho.RegsAMD64', 'macho.Section', + 'macho.Section32', 'macho.Section64', 'macho.SectionHeader', 'macho.Segment', + 'macho.Segment32', 'macho.Segment64', 'macho.SegmentHeader', 'macho.Thread', + 'macho.Type', 'net.Addr', 'net.AddrError', 'net.Conn', 'net.DNSConfigError', + 'net.DNSError', 'net.Error', 'net.InvalidAddrError', 'net.InvalidConnError', + 'net.Listener', 'net.OpError', 'net.PacketConn', 'net.TCPAddr', 'net.TCPConn', + 'net.TCPListener', 'net.UDPAddr', 'net.UDPConn', 'net.UnixAddr', 'net.UnixConn', + 'net.UnixListener', 'net.UnknownNetworkError', 'net.UnknownSocketError', + 'netchan.Dir', 'netchan.Exporter', 'netchan.Importer', 'nntp.Article', + 'nntp.Conn', 'nntp.Error', 'nntp.Group', 'nntp.ProtocolError', 'ogle.Arch', + 'ogle.ArchAlignedMultiple', 'ogle.ArchLSB', 'ogle.Breakpoint', 'ogle.Event', + 'ogle.EventAction', 'ogle.EventHandler', 'ogle.EventHook', 'ogle.FormatError', + 'ogle.Frame', 'ogle.Goroutine', 'ogle.GoroutineCreate', 'ogle.GoroutineExit', + 'ogle.NoCurrentGoroutine', 'ogle.NotOnStack', 'ogle.Process', + 'ogle.ProcessNotStopped', 'ogle.ReadOnlyError', 'ogle.RemoteMismatchError', + 'ogle.UnknownArchitecture', 'ogle.UnknownGoroutine', 'ogle.UsageError', + 'os.Errno', 'os.Error', 'os.ErrorString', 'os.File', 'os.FileInfo', + 'os.LinkError', 'os.PathError', 'os.SyscallError', 'os.Waitmsg', 'patch.Diff', + 'patch.File', 'patch.GitBinaryLiteral', 'patch.Op', 'patch.Set', + 'patch.SyntaxError', 'patch.TextChunk', 'patch.Verb', 'path.Visitor', + 'pdp1.HaltError', 'pdp1.LoopError', 'pdp1.Trapper', 'pdp1.UnknownInstrError', + 'pdp1.Word', 'pem.Block', 'png.FormatError', 'png.IDATDecodingError', + 'png.UnsupportedError', 'printer.Config', 'printer.HTMLTag', 'printer.Styler', + 'proc.Breakpoint', 'proc.Cause', 'proc.Process', 'proc.ProcessExited', + 'proc.Regs', 'proc.Signal', 'proc.Stopped', 'proc.Thread', 'proc.ThreadCreate', + 'proc.ThreadExit', 'proc.Word', 'quick.CheckEqualError', 'quick.CheckError', + 'quick.Config', 'quick.Generator', 'quick.SetupError', 'rand.Rand', + 'rand.Source', 'rand.Zipf', 'rc4.Cipher', 'rc4.KeySizeError', + 'reflect.ArrayOrSliceType', 'reflect.ArrayOrSliceValue', 'reflect.ArrayType', + 'reflect.ArrayValue', 'reflect.BoolType', 'reflect.BoolValue', 'reflect.ChanDir', + 'reflect.ChanType', 'reflect.ChanValue', 'reflect.Complex128Type', + 'reflect.Complex128Value', 'reflect.Complex64Type', 'reflect.Complex64Value', + 'reflect.ComplexType', 'reflect.ComplexValue', 'reflect.Float32Type', + 'reflect.Float32Value', 'reflect.Float64Type', 'reflect.Float64Value', + 'reflect.FloatType', 'reflect.FloatValue', 'reflect.FuncType', + 'reflect.FuncValue', 'reflect.Int16Type', 'reflect.Int16Value', + 'reflect.Int32Type', 'reflect.Int32Value', 'reflect.Int64Type', + 'reflect.Int64Value', 'reflect.Int8Type', 'reflect.Int8Value', 'reflect.IntType', + 'reflect.IntValue', 'reflect.InterfaceType', 'reflect.InterfaceValue', + 'reflect.MapType', 'reflect.MapValue', 'reflect.Method', 'reflect.PtrType', + 'reflect.PtrValue', 'reflect.SliceHeader', 'reflect.SliceType', + 'reflect.SliceValue', 'reflect.StringHeader', 'reflect.StringType', + 'reflect.StringValue', 'reflect.StructField', 'reflect.StructType', + 'reflect.StructValue', 'reflect.Type', 'reflect.Uint16Type', + 'reflect.Uint16Value', 'reflect.Uint32Type', 'reflect.Uint32Value', + 'reflect.Uint64Type', 'reflect.Uint64Value', 'reflect.Uint8Type', + 'reflect.Uint8Value', 'reflect.UintType', 'reflect.UintValue', + 'reflect.UintptrType', 'reflect.UintptrValue', 'reflect.UnsafePointerType', + 'reflect.UnsafePointerValue', 'reflect.Value', 'regexp.Error', 'regexp.Regexp', + 'ring.Ring', 'rpc.Call', 'rpc.Client', 'rpc.ClientCodec', 'rpc.InvalidRequest', + 'rpc.Request', 'rpc.Response', 'rpc.ServerCodec', 'rsa.DecryptionError', + 'rsa.MessageTooLongError', 'rsa.PKCS1v15Hash', 'rsa.PrivateKey', 'rsa.PublicKey', + 'rsa.VerificationError', 'runtime.ArrayType', 'runtime.BoolType', + 'runtime.ChanDir', 'runtime.ChanType', 'runtime.Complex128Type', + 'runtime.Complex64Type', 'runtime.ComplexType', 'runtime.Error', + 'runtime.Float32Type', 'runtime.Float64Type', 'runtime.FloatType', + 'runtime.Func', 'runtime.FuncType', 'runtime.Int16Type', 'runtime.Int32Type', + 'runtime.Int64Type', 'runtime.Int8Type', 'runtime.IntType', + 'runtime.InterfaceType', 'runtime.Itable', 'runtime.MapType', + 'runtime.MemProfileRecord', 'runtime.MemStatsType', 'runtime.PtrType', + 'runtime.SliceType', 'runtime.StringType', 'runtime.StructType', 'runtime.Type', + 'runtime.TypeAssertionError', 'runtime.Uint16Type', 'runtime.Uint32Type', + 'runtime.Uint64Type', 'runtime.Uint8Type', 'runtime.UintType', + 'runtime.UintptrType', 'runtime.UnsafePointerType', 'scanner.Error', + 'scanner.ErrorHandler', 'scanner.ErrorVector', 'scanner.Position', + 'scanner.Scanner', 'script.Close', 'script.Closed', 'script.Event', + 'script.ReceivedUnexpected', 'script.Recv', 'script.RecvMatch', 'script.Send', + 'script.SetupError', 'signal.Signal', 'signal.UnixSignal', 'sort.Interface', + 'srpc.Client', 'srpc.Errno', 'srpc.Handler', 'srpc.RPC', 'strconv.NumError', + 'strings.Reader', 'sync.Mutex', 'sync.RWMutex', + 'syscall.ByHandleFileInformation', 'syscall.Cmsghdr', 'syscall.Dirent', + 'syscall.EpollEvent', 'syscall.Fbootstraptransfer_t', 'syscall.FdSet', + 'syscall.Filetime', 'syscall.Flock_t', 'syscall.Fstore_t', 'syscall.Iovec', + 'syscall.Kevent_t', 'syscall.Linger', 'syscall.Log2phys_t', 'syscall.Msghdr', + 'syscall.Overlapped', 'syscall.PtraceRegs', 'syscall.Radvisory_t', + 'syscall.RawSockaddr', 'syscall.RawSockaddrAny', 'syscall.RawSockaddrInet4', + 'syscall.RawSockaddrInet6', 'syscall.RawSockaddrUnix', 'syscall.Rlimit', + 'syscall.Rusage', 'syscall.Sockaddr', 'syscall.SockaddrInet4', + 'syscall.SockaddrInet6', 'syscall.SockaddrUnix', 'syscall.Stat_t', + 'syscall.Statfs_t', 'syscall.Sysinfo_t', 'syscall.Time_t', 'syscall.Timespec', + 'syscall.Timeval', 'syscall.Timex', 'syscall.Tms', 'syscall.Ustat_t', + 'syscall.Utimbuf', 'syscall.Utsname', 'syscall.WaitStatus', + 'syscall.Win32finddata', 'syslog.Priority', 'syslog.Writer', 'tabwriter.Writer', + 'tar.Header', 'tar.Reader', 'tar.Writer', 'template.Error', + 'template.FormatterMap', 'template.Template', 'testing.Benchmark', + 'testing.Regexp', 'testing.Test', 'time.ParseError', 'time.Ticker', 'time.Time', + 'tls.CASet', 'tls.Certificate', 'tls.Config', 'tls.Conn', 'tls.ConnectionState', + 'tls.Listener', 'token.Position', 'token.Token', 'unicode.CaseRange', + 'unicode.Range', 'unsafe.ArbitraryType', 'vector.LessInterface', + 'websocket.Conn', 'websocket.Draft75Handler', 'websocket.Handler', + 'websocket.ProtocolError', 'websocket.WebSocketAddr', 'x509.Certificate', + 'x509.ConstraintViolationError', 'x509.KeyUsage', 'x509.Name', + 'x509.PublicKeyAlgorithm', 'x509.SignatureAlgorithm', + 'x509.UnhandledCriticalExtension', 'x509.UnsupportedAlgorithmError', 'xml.Attr', + 'xml.EndElement', 'xml.Name', 'xml.Parser', 'xml.ProcInst', 'xml.StartElement', + 'xml.SyntaxError', 'xml.Token', 'xml.UnmarshalError', 'xtea.Cipher', + 'xtea.KeySizeError' + ) + ), + 'SYMBOLS' => array( + # delimiters + 1 => array( + '(', ')', '{', '}', '[', ']', ',', ':', ';' + ), + # assignments + 2 => array( + '<<=', '!=', '%=', '&=', '&^=', '*=', '+=', '-=', '/=', ':=', '>>=', + '^=', '|=', '=', '++', '--' + ), + # operators + 3 => array( + '<=', '<', '==', '>', '>=', '&&', '!', '||', '&', '&^', '|', '^', + '>>', '<<', '*', '%', '+', '-', '.', '/', '<-'), + # vararg + 4 => array( + '...' + ) + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => false, + 1 => true, + 2 => true, + 3 => true, + 4 => true, + 5 => true + ), + 'STYLES' => array( + 'KEYWORDS' => array( + # statements + 1 => 'color: #b1b100; font-weight: bold;', + # literals + 2 => 'color: #000000; font-weight: bold;', + # built-in functions + 3 => 'color: #000066;', + # built-in types + 4 => 'color: #993333;', + # library types + 5 => 'color: #003399;' + ), + 'COMMENTS' => array( + # single-line comments + 1 => 'color: #666666; font-style: italic;', + # raw strings + 2 => 'color: #0000ff;', + # multi-line comments + 'MULTI' => 'color: #666666; font-style: italic;' + ), + 'ESCAPE_CHAR' => array( + # simple escape + 1 => 'color: #000099; font-weight: bold;', + # octal escape + 2 => 'color: #000099;', + # hex escape + 3 => 'color: #000099;', + # unicode escape + 4 => 'color: #000099;', + # long unicode escape + 5 => 'color: #000099;' + ), + 'BRACKETS' => array( + ), + 'STRINGS' => array( + 0 => 'color: #0000ff;', + 0 => 'color: #cc66cc;' + ), + 'NUMBERS' => array( + 0 => 'color: #cc66cc;' + ), + 'METHODS' => array( + 0 => 'color: #004000;' + ), + 'SYMBOLS' => array( + # delimiters + 1 => 'color: #339933;', + # assignments + 2 => 'color: #339933;', + # operators + 3 => 'color: #339933;', + # vararg (highlighted as a keyword) + 4 => 'color: #000000; font-weight: bold;' + ), + 'REGEXPS' => array( + # If CSS classes are enabled, these would be highlighted as numbers (nu0) + # integer literals (possibly imaginary) + //0 => 'color: #cc66cc;', + # real floating point literals + //1 => 'color: #cc66cc;', + # imaginary floating point literals + //2 => 'color: #cc66cc;' + ), + 'SCRIPT' => array( + ) + ), + 'URLS' => array( + 1 => '', + 2 => '', + 3 => '', + 4 => '', + 5 => 'http://golang.org/search?q={FNAME}' + ), + 'REGEXPS' => array( + ), + 'OOLANG' => true, + 'OBJECT_SPLITTERS' => array(1 => '.'), + 'STRICT_MODE_APPLIES' => GESHI_NEVER, + 'SCRIPT_DELIMITERS' => array(), + 'HIGHLIGHT_STRICT_BLOCK' => array(), + 'PARSER_CONTROL' => array( + 'ENABLE_FLAGS' => array( + 'BRACKETS' => GESHI_NEVER, # handled by symbols + ) + ) +); + +?> \ No newline at end of file diff --git a/inc/geshi/groovy.php b/inc/geshi/groovy.php index f2a2e9ab5c49147d2dbfbb33b8e37671c0c912ab..8a250245a4288bb5efd8ce7484a90d9856bfbb81 100644 --- a/inc/geshi/groovy.php +++ b/inc/geshi/groovy.php @@ -4,7 +4,7 @@ * ---------- * Author: Ivan F. Villanueva B. (geshi_groovy@artificialidea.com) * Copyright: (c) 2006 Ivan F. Villanueva B.(http://www.artificialidea.com) - * Release Version: 1.0.8.8 + * Release Version: 1.0.8.10 * Date Started: 2006/04/29 * * Groovy language file for GeSHi. @@ -983,15 +983,15 @@ $language_data = array ( ) ), 'URLS' => array( - 1 => 'http://www.google.de/search?q=site%3Adocs.codehaus.org/%20{FNAMEL}', - 2 => 'http://www.google.de/search?q=site%3Adocs.codehaus.org/%20{FNAMEL}', + 1 => 'http://www.google.de/search?q=site%3Agroovy.codehaus.org/%20{FNAMEL}', + 2 => 'http://www.google.de/search?q=site%3Agroovy.codehaus.org/%20{FNAMEL}', 3 => 'http://www.google.de/search?as_q={FNAME}&num=100&hl=en&as_occt=url&as_sitesearch=java.sun.com%2Fj2se%2F1%2E5%2E0%2Fdocs%2Fapi%2F', - 4 => 'http://www.google.de/search?q=site%3Adocs.codehaus.org/%20{FNAME}', - 5 => 'http://www.google.de/search?q=site%3Adocs.codehaus.org/%20{FNAME}', - 6 => 'http://www.google.de/search?q=site%3Adocs.codehaus.org/%20{FNAME}', - 7 => 'http://www.google.de/search?q=site%3Adocs.codehaus.org/%20{FNAME}', - 8 => 'http://www.google.de/search?q=site%3Adocs.codehaus.org/%20{FNAME}', - 9 => 'http://www.google.de/search?q=site%3Adocs.codehaus.org/%20{FNAME}' + 4 => 'http://www.google.de/search?q=site%3Agroovy.codehaus.org/%20{FNAME}', + 5 => 'http://www.google.de/search?q=site%3Agroovy.codehaus.org/%20{FNAME}', + 6 => 'http://www.google.de/search?q=site%3Agroovy.codehaus.org/%20{FNAME}', + 7 => 'http://www.google.de/search?q=site%3Agroovy.codehaus.org/%20{FNAME}', + 8 => 'http://www.google.de/search?q=site%3Agroovy.codehaus.org/%20{FNAME}', + 9 => 'http://www.google.de/search?q=site%3Agroovy.codehaus.org/%20{FNAME}' ), 'OOLANG' => true, 'OBJECT_SPLITTERS' => array( diff --git a/inc/geshi/gwbasic.php b/inc/geshi/gwbasic.php index 7b2385de7f1f632ba823a280301ce3d59132ca2d..e35a322a469b04b6c66bc4db2e2458edcc70162a 100644 --- a/inc/geshi/gwbasic.php +++ b/inc/geshi/gwbasic.php @@ -4,7 +4,7 @@ * ---------- * Author: José Gabriel Moya Yangüela (josemoya@gmail.com) * Copyright: (c) 2010 José Gabriel Moya Yangüela (http://doc.apagada.com) - * Release Version: 1.0.8.8 + * Release Version: 1.0.8.10 * Date Started: 2010/01/30 * * GwBasic language file for GeSHi. diff --git a/inc/geshi/haskell.php b/inc/geshi/haskell.php index 4997a26c32f4297ee876a2dbddf5e1d7238094dd..ce1b3bf69ac3f6b4ca29da9ac3729a1373aabcb4 100644 --- a/inc/geshi/haskell.php +++ b/inc/geshi/haskell.php @@ -4,7 +4,7 @@ * ---------- * Author: Jason Dagit (dagit@codersbase.com) based on ocaml.php by Flaie (fireflaie@gmail.com) * Copyright: (c) 2005 Flaie, Nigel McNie (http://qbnz.com/highlighter) - * Release Version: 1.0.8.8 + * Release Version: 1.0.8.10 * Date Started: 2005/08/27 * * Haskell language file for GeSHi. diff --git a/inc/geshi/hicest.php b/inc/geshi/hicest.php index 6cb61f87c6a3721b2c46fb8c0f121d677f62d992..67d8d114aeff46e758a2ef562eb6eac9573e82a4 100644 --- a/inc/geshi/hicest.php +++ b/inc/geshi/hicest.php @@ -4,7 +4,7 @@ * -------- * Author: Georg Petrich (spt@hicest.com) * Copyright: (c) 2010 Georg Petrich (http://www.HicEst.com) - * Release Version: 1.0.8.8 + * Release Version: 1.0.8.10 * Date Started: 2010/03/15 * * HicEst language file for GeSHi. diff --git a/inc/geshi/hq9plus.php b/inc/geshi/hq9plus.php index 50a0f80c62b11cb8bc74b7c7f98ab1d5791fb25d..2cce643dfa41c04879be40df42ad41fb9a49d145 100644 --- a/inc/geshi/hq9plus.php +++ b/inc/geshi/hq9plus.php @@ -4,7 +4,7 @@ * ---------- * Author: Benny Baumann (BenBE@geshi.org) * Copyright: (c) 2008 Benny Baumann (http://qbnz.com/highlighter/) - * Release Version: 1.0.8.8 + * Release Version: 1.0.8.10 * Date Started: 2009/10/31 * * HQ9+ language file for GeSHi. diff --git a/inc/geshi/html4strict.php b/inc/geshi/html4strict.php index 301513e4ea4246747a0c62acbb9b9b35f7e8e9c1..68ba7232862771f6cb64a940a95372415da27f20 100644 --- a/inc/geshi/html4strict.php +++ b/inc/geshi/html4strict.php @@ -4,7 +4,7 @@ * --------------- * Author: Nigel McNie (nigel@geshi.org) * Copyright: (c) 2004 Nigel McNie (http://qbnz.com/highlighter/) - * Release Version: 1.0.8.8 + * Release Version: 1.0.8.10 * Date Started: 2004/07/10 * * HTML 4.01 strict language file for GeSHi. @@ -59,41 +59,23 @@ $language_data = array ( 'KEYWORDS' => array( 2 => array( 'a', 'abbr', 'acronym', 'address', 'applet', - 'base', 'basefont', 'bdo', 'big', 'blockquote', 'body', 'br', 'button', 'b', - 'caption', 'center', 'cite', 'code', 'colgroup', 'col', - 'dd', 'del', 'dfn', 'dir', 'div', 'dl', 'dt', - 'em', - 'fieldset', 'font', 'form', 'frame', 'frameset', - 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'head', 'hr', 'html', - 'iframe', 'ilayer', 'img', 'input', 'ins', 'isindex', 'i', - 'kbd', - 'label', 'legend', 'link', 'li', - 'map', 'meta', - 'noframes', 'noscript', - 'object', 'ol', 'optgroup', 'option', - 'param', 'pre', 'p', - 'q', - 'samp', 'script', 'select', 'small', 'span', 'strike', 'strong', 'style', 'sub', 'sup', 's', - 'table', 'tbody', 'td', 'textarea', 'text', 'tfoot', 'thead', 'th', 'title', 'tr', 'tt', - 'ul', 'u', - 'var', ), 3 => array( @@ -151,6 +133,7 @@ $language_data = array ( 0 => 'color: #66cc66;' ), 'SCRIPT' => array( + -2 => 'color: #404040;', // CDATA -1 => 'color: #808080; font-style: italic;', // comments 0 => 'color: #00bbdd;', 1 => 'color: #ddbb00;', @@ -170,6 +153,9 @@ $language_data = array ( ), 'STRICT_MODE_APPLIES' => GESHI_ALWAYS, 'SCRIPT_DELIMITERS' => array( + -2 => array( + '<![CDATA[' => ']]>' + ), -1 => array( '<!--' => '-->' ), @@ -184,6 +170,7 @@ $language_data = array ( ) ), 'HIGHLIGHT_STRICT_BLOCK' => array( + -2 => false, -1 => false, 0 => false, 1 => false, @@ -200,4 +187,4 @@ $language_data = array ( ) ); -?> +?> \ No newline at end of file diff --git a/inc/geshi/html5.php b/inc/geshi/html5.php new file mode 100644 index 0000000000000000000000000000000000000000..7ffd4a05dc7642faa87f6ca5cd201e45da2fefcf --- /dev/null +++ b/inc/geshi/html5.php @@ -0,0 +1,212 @@ +<?php +/************************************************************************************* + * html5.php + * --------------- + * Author: Nigel McNie (nigel@geshi.org) + * Copyright: (c) 2004 Nigel McNie (http://qbnz.com/highlighter/) + * Release Version: 1.0.8.10 + * Date Started: 2004/07/10 + * + * HTML 4.01 strict language file for GeSHi. + * + * CHANGES + * ------- + * 2005/12/28 (1.0.4) + * - Removed escape character for strings + * 2004/11/27 (1.0.3) + * - Added support for multiple object splitters + * 2004/10/27 (1.0.2) + * - Added support for URLs + * 2004/08/05 (1.0.1) + * - Added INS and DEL + * - Removed the background colour from tags' styles + * 2004/07/14 (1.0.0) + * - First Release + * + * TODO (updated 2004/11/27) + * ------------------------- + * * Check that only HTML4 strict attributes are highlighted + * * Eliminate empty tags that aren't allowed in HTML4 strict + * * Split to several files - html4trans, xhtml1 etc + * + ************************************************************************************* + * + * This file is part of GeSHi. + * + * GeSHi is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * GeSHi is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with GeSHi; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + ************************************************************************************/ + +$language_data = array ( + 'LANG_NAME' => 'HTML', + 'COMMENT_SINGLE' => array(), + 'COMMENT_MULTI' => array(), + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array("'", '"'), + 'ESCAPE_CHAR' => '', + 'KEYWORDS' => array( + 2 => array( + 'a', 'abbr', 'address', 'article', 'aside', 'audio'. + + 'base', 'bdo', 'blockquote', 'body', 'br', 'button', 'b', + + 'caption', 'cite', 'code', 'colgroup', 'col', 'canvas', 'command', 'datalist', 'details', + + 'dd', 'del', 'dfn', 'div', 'dl', 'dt', + + 'em', 'embed', + + 'fieldset', 'form', 'figcaption', 'figure', 'footer', + + 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'head', 'hr', 'html', 'header', 'hgroup', + + 'iframe', 'ilayer', 'img', 'input', 'ins', 'isindex', 'i', + + 'kbd', 'keygen', + + 'label', 'legend', 'link', 'li', + + 'map', 'meta', 'mark', 'meter', + + 'noscript', 'nav', + + 'object', 'ol', 'optgroup', 'option', 'output', + + 'param', 'pre', 'p', 'progress', + + 'q', + + 'rp', 'rt', 'ruby', + + 'samp', 'script', 'select', 'small', 'span', 'strong', 'style', 'sub', 'sup', 's', 'section', 'source', 'summary', + + 'table', 'tbody', 'td', 'textarea', 'text', 'tfoot', 'thead', 'th', 'title', 'tr', 'time', + + 'ul', + + 'var', 'video', + + 'wbr', + ), + 3 => array( + 'abbr', 'accept-charset', 'accept', 'accesskey', 'action', 'align', 'alink', 'alt', 'archive', 'axis', 'autocomplete', 'autofocus', + 'background', 'bgcolor', 'border', + 'cellpadding', 'cellspacing', 'char', 'charoff', 'charset', 'checked', 'cite', 'class', 'classid', 'clear', 'code', 'codebase', 'codetype', 'color', 'cols', 'colspan', 'compact', 'content', 'coords', 'contenteditable', 'contextmenu', + 'data', 'datetime', 'declare', 'defer', 'dir', 'disabled', 'draggable', 'dropzone', + 'enctype', + 'face', 'for', 'frame', 'frameborder', 'form', 'formaction', 'formenctype', 'formmethod', 'formnovalidate', 'formtarget', + 'headers', 'height', 'href', 'hreflang', 'hspace', 'http-equiv', 'hidden', + 'id', 'ismap', + 'label', 'lang', 'language', 'link', 'longdesc', + 'marginheight', 'marginwidth', 'maxlength', 'media', 'method', 'multiple', 'min', 'max', + 'name', 'nohref', 'noresize', 'noshade', 'nowrap', 'novalidate', + 'object', 'onblur', 'onchange', 'onclick', 'ondblclick', 'onfocus', 'onkeydown', 'onkeypress', 'onkeyup', 'onload', 'onmousedown', 'onmousemove', 'onmouseout', 'onmouseover', 'onmouseup', 'onselect', 'onsubmit', 'onunload', 'onafterprint', 'onbeforeprint', 'onbeforeonload', 'onerror', 'onhaschange', 'onmessage', 'onoffline', 'ononline', 'onpagehide', 'onpageshow', 'onpopstate', 'onredo', 'onresize', 'onstorage', 'onundo', 'oncontextmenu', 'onformchange', 'onforminput', 'oninput', 'oninvalid', 'ondrag', 'ondragend', 'ondragenter', 'ondragleave', 'ondragover', 'ondragstart', 'ondrop', 'onmousewheel', 'onscroll', 'oncanplay', 'oncanplaythrough', 'ondurationchange', 'onemptied', 'onended', 'onloadeddata', 'onloadedmetadata', 'onloadstart', 'onpause', 'onplay', 'onplaying', 'onprogress', 'onratechange', 'onreadystatechange', 'onseeked', 'onseeking', 'onstalled', 'onsuspend', 'ontimeupdate', 'onvolumechange', 'onwaiting', + 'profile', 'prompt', 'pattern', 'placeholder', + 'readonly', 'rel', 'rev', 'rowspan', 'rows', 'rules', 'required', + 'scheme', 'scope', 'scrolling', 'selected', 'shape', 'size', 'span', 'src', 'standby', 'start', 'style', 'summary', 'spellcheck', 'step', + 'tabindex', 'target', 'text', 'title', 'type', + 'usemap', + 'valign', 'value', 'valuetype', 'version', 'vlink', 'vspace', + 'width' + ) + ), + 'SYMBOLS' => array( + '/', '=' + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => false, + 2 => false, + 3 => false, + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 2 => 'color: #000000; font-weight: bold;', + 3 => 'color: #000066;' + ), + 'COMMENTS' => array( + ), + 'ESCAPE_CHAR' => array( + 0 => 'color: #000099; font-weight: bold;' + ), + 'BRACKETS' => array( + 0 => 'color: #66cc66;' + ), + 'STRINGS' => array( + 0 => 'color: #ff0000;' + ), + 'NUMBERS' => array( + 0 => 'color: #cc66cc;' + ), + 'METHODS' => array( + ), + 'SYMBOLS' => array( + 0 => 'color: #66cc66;' + ), + 'SCRIPT' => array( + -2 => 'color: #404040;', // CDATA + -1 => 'color: #808080; font-style: italic;', // comments + 0 => 'color: #00bbdd;', + 1 => 'color: #ddbb00;', + 2 => 'color: #009900;' + ), + 'REGEXPS' => array( + ) + ), + 'URLS' => array( + 2 => 'http://december.com/html/4/element/{FNAMEL}.html', + 3 => '' + ), + 'OOLANG' => false, + 'OBJECT_SPLITTERS' => array( + ), + 'REGEXPS' => array( + ), + 'STRICT_MODE_APPLIES' => GESHI_ALWAYS, + 'SCRIPT_DELIMITERS' => array( + -2 => array( + '<![CDATA[' => ']]>' + ), + -1 => array( + '<!--' => '-->' + ), + 0 => array( + '<!DOCTYPE' => '>' + ), + 1 => array( + '&' => ';' + ), + 2 => array( + '<' => '>' + ) + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + -2 => false, + -1 => false, + 0 => false, + 1 => false, + 2 => true + ), + 'TAB_WIDTH' => 4, + 'PARSER_CONTROL' => array( + 'KEYWORDS' => array( + 2 => array( + 'DISALLOWED_BEFORE' => '(?<=<|<\/)', + 'DISALLOWED_AFTER' => '(?=\s|\/|>)', + ) + ) + ) +); + +?> \ No newline at end of file diff --git a/inc/geshi/icon.php b/inc/geshi/icon.php index 0712c21c30257ba459eef7a97de1ac40750da088..e68c2f17f7590e2f130a348a6542e25fb6fb4cf1 100644 --- a/inc/geshi/icon.php +++ b/inc/geshi/icon.php @@ -4,7 +4,7 @@ * -------- * Author: Matt Oates (mattoates@gmail.com) * Copyright: (c) 2010 Matt Oates (http://mattoates.co.uk) - * Release Version: 1.0.8.8 + * Release Version: 1.0.8.10 * Date Started: 2010/04/24 * * Icon language file for GeSHi. diff --git a/inc/geshi/idl.php b/inc/geshi/idl.php index d2d9a92fa942f6af4750d289717eb581b7b9c1fe..84e57f30ba72eb1df151d34c68a57732cc12fca7 100644 --- a/inc/geshi/idl.php +++ b/inc/geshi/idl.php @@ -4,7 +4,7 @@ * ------- * Author: Cedric Bosdonnat (cedricbosdo@openoffice.org) * Copyright: (c) 2006 Cedric Bosdonnat - * Release Version: 1.0.8.8 + * Release Version: 1.0.8.10 * Date Started: 2006/08/20 * * Unoidl language file for GeSHi. diff --git a/inc/geshi/ini.php b/inc/geshi/ini.php index e48cc045c0efa912a48b2fcd5ebce9b9f12422f6..2ca7feb0be6db982a830fb82fe4194099a7e4802 100644 --- a/inc/geshi/ini.php +++ b/inc/geshi/ini.php @@ -4,7 +4,7 @@ * -------- * Author: deguix (cevo_deguix@yahoo.com.br) * Copyright: (c) 2005 deguix - * Release Version: 1.0.8.8 + * Release Version: 1.0.8.10 * Date Started: 2005/03/27 * * INI language file for GeSHi. diff --git a/inc/geshi/inno.php b/inc/geshi/inno.php index 9ec8cdfd91b9aba319f2e1967f92bd65535a0736..b0878e2984b8fe6d64517d5f27344e7d1d33bc41 100644 --- a/inc/geshi/inno.php +++ b/inc/geshi/inno.php @@ -4,7 +4,7 @@ * ---------- * Author: Thomas Klingler (hotline@theratech.de) based on delphi.php from J�rja Norbert (jnorbi@vipmail.hu) * Copyright: (c) 2004 J�rja Norbert, Nigel McNie (http://qbnz.com/highlighter) - * Release Version: 1.0.8.8 + * Release Version: 1.0.8.10 * Date Started: 2005/07/29 * * Inno Script language inkl. Delphi (Object Pascal) language file for GeSHi. diff --git a/inc/geshi/intercal.php b/inc/geshi/intercal.php index cd800a8ebb627dbf517ccfc7b720d2e21ff64083..06fd2b41b508b468813c55fd2a1961ee4613f59b 100644 --- a/inc/geshi/intercal.php +++ b/inc/geshi/intercal.php @@ -4,7 +4,7 @@ * ---------- * Author: Benny Baumann (BenBE@geshi.org) * Copyright: (c) 2008 Benny Baumann (http://qbnz.com/highlighter/) - * Release Version: 1.0.8.8 + * Release Version: 1.0.8.10 * Date Started: 2009/10/31 * * INTERCAL language file for GeSHi. diff --git a/inc/geshi/io.php b/inc/geshi/io.php index 94c278f03906e4c2008709576846ca910990c24f..3d6341fee6960fd45ad47bb4fb2acf623811cf0c 100644 --- a/inc/geshi/io.php +++ b/inc/geshi/io.php @@ -4,7 +4,7 @@ * ------- * Author: Nigel McNie (nigel@geshi.org) * Copyright: (c) 2006 Nigel McNie (http://qbnz.com/highlighter/) - * Release Version: 1.0.8.8 + * Release Version: 1.0.8.10 * Date Started: 2006/09/23 * * Io language file for GeSHi. Thanks to Johnathan Wright for the suggestion and help diff --git a/inc/geshi/j.php b/inc/geshi/j.php index 61154c7efb7f081aea94281c3045f2887c39d7b9..5d464c92259e6ae2be4f085d4a9b771fd5b1df13 100644 --- a/inc/geshi/j.php +++ b/inc/geshi/j.php @@ -4,13 +4,15 @@ * -------- * Author: Ric Sherlock (tikkanz@gmail.com) * Copyright: (c) 2009 Ric Sherlock - * Release Version: 1.0.8.8 + * Release Version: 1.0.8.10 * Date Started: 2009/11/10 * * J language file for GeSHi. * * CHANGES * ------- + * 2010/07/18 (1.0.8.10) + * - Infinity and negative infinity recognized as numbers * 2010/03/01 (1.0.8.8) * - Add support for label_xyz. and goto_xyz. * - Fix highlighting of for_i. @@ -29,7 +31,6 @@ * 2009/11/12 (1.0.0) * - First Release * - * * TODO (updated 2010/01/27) * ------------------------- * * combine keyword categories by using conditional regex statement in PARSER CONTROL? @@ -53,7 +54,7 @@ * ************************************************************************************/ -$language_data = array ( +$language_data = array( 'LANG_NAME' => 'J', 'COMMENT_SINGLE' => array(), 'COMMENT_MULTI' => array(), @@ -69,12 +70,7 @@ $language_data = array ( 'HARDESCAPE' => array("'"), 'HARDCHAR' => "'", 'NUMBERS' => array( - //Some instances of infinity are not correctly handled by GeSHi NUMBERS currently - //There are two solutions labelled "infinity Method A" and "infinity Method B" - //infinity Method B - requires following adjustment to line 3349 of geshi.php - // preg_match('#\d#' becomes preg_match('#[\d_]#' - 0 => '\b(?:_?\d+(?:\.\d+)?(?:x|[bejprx]_?[\da-z]+(?:\.[\da-z]+)?)?)(?![\w\.\:])', //infinity Method A - //0 => '\b(?:_?\d+(?:\.\d+)?(?:x|[bejprx]_?[\da-z]+(?:\.[\da-z]+)?)?|__?)(?![\w\.\:])', //infinity Method B + 0 => '\b(?:_?\d+(?:\.\d+)?(?:x|[bejprx]_?[\da-z]+(?:\.[\da-z]+)?)?|__?)(?![\w\.\:])', ), 'KEYWORDS' => array( //Control words @@ -87,40 +83,6 @@ $language_data = array ( 2 => array( 'm', 'n', 'u', 'v', 'x', 'y' ), -/* -Commented out for now due to conflicts with Lang Check - //Primitives beginning with a symbol (except . or :) - 6 => array( - '=', '<', '<.', '<:', //verbs - '_:','>', '>.', '>:', - '+', '+.', '+:', '*', '*.', '*:', '-', '-.', '-:', '%', '%.', '%:', - '^', '^.', '$', '$.', '$:', '~.', '~:', '\|', '|.', '|:', - ',', ',.', ',:', ';', ';:', '#', '#.', '#:', '!', '/:', '\:', - '[', '[:', ']', '{', '{.', '{:', '{::', '}.', '}:', - '".', '":', '?', '?.', - '~', '\/;', '\\', '/.', '\\.', '}', //adverbs - '^:', ';.', '!.', '!:', //conj - '"', '`', '`:', '@', '@.', '@:', - '&', '&.', '&:', '&.:', - '_.', //nouns - '=.', '=:', //other - ), - //Primitives beginning with a letter or number - 7 => array( - 'A.', 'c.', 'C.', 'e.', 'E.', //verbs - 'i.', 'i:', 'I.', 'j.', 'L.', 'o.', - 'p.', 'p..', 'p:', 'q:', 'r.', 's:', 'u:', 'x:', - '_9:', '_8:', '_7:', '_6:', '_5:', '_4:', '_3:', '_2:', '_1:', - '0:', '1:', '2:', '3:', '4:', '5:', '6:', '7:', '8:', '9:', - 'b.', 'f.', 'M.', 't.', 't:', //adverbs - 'd.', 'D.', 'D:', 'H.', 'L:', 'S:', 'T.', //conj - 'a.', 'a:', //nouns - ), - //Primitives beginning with symbol . or : - 8 => array( - '..', '.:', '.', ':.', '::', ':', //conj - ), -*/ ), 'SYMBOLS' => array( //Punctuation @@ -132,17 +94,17 @@ Commented out for now due to conflicts with Lang Check GESHI_COMMENTS => false, 1 => true, 2 => true, -// 6 => true, -// 7 => true, -// 8 => true, + //6 => true, + //7 => true, + //8 => true, ), 'STYLES' => array( 'KEYWORDS' => array( 1 => 'color: #0000ff; font-weight: bold;', 2 => 'color: #0000cc; font-weight: bold;', -// 6 => 'color: #000000; font-weight: bold;', -// 7 => 'color: #000000; font-weight: bold;', -// 8 => 'color: #000000; font-weight: bold;', + //6 => 'color: #000000; font-weight: bold;', + //7 => 'color: #000000; font-weight: bold;', + //8 => 'color: #000000; font-weight: bold;', ), 'COMMENTS' => array( 1 => 'color: #666666; font-style: italic;', @@ -171,7 +133,6 @@ Commented out for now due to conflicts with Lang Check ), 'REGEXPS' => array( 0 => 'color: #0000ff; font-weight: bold;', //for_xyz. - same as kw1 - 1 => 'color: #009999; font-weight: bold;' //infinity - same as nu0 ), 'SCRIPT' => array( ) @@ -179,16 +140,15 @@ Commented out for now due to conflicts with Lang Check 'URLS' => array( 1 => '', //'http://www.jsoftware.com/help/dictionary/ctrl.htm', 2 => '', -// 6 => '', //'http://www.jsoftware.com/jwiki/Vocabulary', -// 7 => '', //'http://www.jsoftware.com/jwiki/Vocabulary', -// 8 => '', //'http://www.jsoftware.com/jwiki/Vocabulary', + //6 => '', //'http://www.jsoftware.com/jwiki/Vocabulary', + //7 => '', //'http://www.jsoftware.com/jwiki/Vocabulary', + //8 => '', //'http://www.jsoftware.com/jwiki/Vocabulary', ), 'OOLANG' => false, 'OBJECT_SPLITTERS' => array( ), 'REGEXPS' => array( 0 => '\b(for|goto|label)_[a-zA-Z]\w*\.', //for_xyz. - should be kw1 - 1 => '\b__?(?![\w\.\:])' //infinity - should be nu0 ), 'STRICT_MODE_APPLIES' => GESHI_NEVER, 'SCRIPT_DELIMITERS' => array( @@ -199,6 +159,9 @@ Commented out for now due to conflicts with Lang Check 'ENABLE_FLAGS' => array( 'BRACKETS' => GESHI_NEVER, ), + 'NUMBERS' => array( + 'PRECHECK_RX' => '#[\d_]#', // underscore is valid number + ), 'KEYWORDS' => array( //Control words 2 => array( @@ -224,4 +187,4 @@ Commented out for now due to conflicts with Lang Check ) ); -?> \ No newline at end of file +?> diff --git a/inc/geshi/java.php b/inc/geshi/java.php index 3269dffe2c532800644b3c4914819f67a50abd79..2f3d9fb969e470e6adf65329254ab0dcbe0912f2 100644 --- a/inc/geshi/java.php +++ b/inc/geshi/java.php @@ -4,7 +4,7 @@ * -------- * Author: Nigel McNie (nigel@geshi.org) * Copyright: (c) 2004 Nigel McNie (http://qbnz.com/highlighter/) - * Release Version: 1.0.8.8 + * Release Version: 1.0.8.10 * Date Started: 2004/07/10 * * Java language file for GeSHi. diff --git a/inc/geshi/java5.php b/inc/geshi/java5.php index bc9af739a0ca2db1dc189bbefc33361fffd746f2..6163995f89f8ef37d7d0d4e4eac74c9b6ad6f641 100644 --- a/inc/geshi/java5.php +++ b/inc/geshi/java5.php @@ -4,7 +4,7 @@ * -------- * Author: Nigel McNie (nigel@geshi.org) * Copyright: (c) 2004 Nigel McNie (http://qbnz.com/highlighter/) - * Release Version: 1.0.8.8 + * Release Version: 1.0.8.10 * Date Started: 2004/07/10 * * Java language file for GeSHi. diff --git a/inc/geshi/javascript.php b/inc/geshi/javascript.php index 429cdd65324627ffd226a84e56640969aa20f8ca..93997a70c8ea10154b5c2b71ee6f1e4e6ff75abf 100644 --- a/inc/geshi/javascript.php +++ b/inc/geshi/javascript.php @@ -4,7 +4,7 @@ * -------------- * Author: Ben Keen (ben.keen@gmail.com) * Copyright: (c) 2004 Ben Keen (ben.keen@gmail.com), Nigel McNie (http://qbnz.com/highlighter) - * Release Version: 1.0.8.8 + * Release Version: 1.0.8.10 * Date Started: 2004/06/20 * * JavaScript language file for GeSHi. @@ -45,8 +45,10 @@ $language_data = array ( 'LANG_NAME' => 'Javascript', 'COMMENT_SINGLE' => array(1 => '//'), 'COMMENT_MULTI' => array('/*' => '*/'), - //Regular Expressions - 'COMMENT_REGEXP' => array(2 => "/(?<=[\\s^])s\\/(?:\\\\.|(?!\n)[^\\/\\\\])+\\/(?:\\\\.|(?!\n)[^\\/\\\\])+\\/[gimsu]*(?=[\\s$\\.\\;])|(?<=[\\s^(=])m?\\/(?:\\\\.|(?!\n)[^\\/\\\\])+\\/[gimsu]*(?=[\\s$\\.\\,\\;\\)])/iU"), + 'COMMENT_REGEXP' => array( + //Regular Expressions + 2 => "/(?<=[\\s^])(s|tr|y)\\/(?!\*)(?!\s)(?:\\\\.|(?!\n)[^\\/\\\\])+(?<!\s)\\/(?!\s)(?:\\\\.|(?!\n)[^\\/\\\\])*(?<!\s)\\/[msixpogcde]*(?=[\\s$\\.\\;])|(?<=[\\s^(=])(m|q[qrwx]?)?\\/(?!\*)(?!\s)(?:\\\\.|(?!\n)[^\\/\\\\])+(?<!\s)\\/[msixpogc]*(?=[\\s$\\.\\,\\;\\)])/iU" + ), 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, 'QUOTEMARKS' => array("'", '"'), 'ESCAPE_CHAR' => '\\', @@ -147,4 +149,4 @@ $language_data = array ( ) ); -?> +?> \ No newline at end of file diff --git a/inc/geshi/jquery.php b/inc/geshi/jquery.php index 54e653ed164c68ade0b3256522685a6c7d9b993d..9374ec1ca92521b5f40994fa2f44954f6fbc5669 100644 --- a/inc/geshi/jquery.php +++ b/inc/geshi/jquery.php @@ -4,7 +4,7 @@ * -------------- * Author: Rob Loach (http://www.robloach.net) * Copyright: (c) 2009 Rob Loach (http://www.robloach.net) - * Release Version: 1.0.8.8 + * Release Version: 1.0.8.10 * Date Started: 2009/07/20 * * jQuery 1.3 language file for GeSHi. diff --git a/inc/geshi/kixtart.php b/inc/geshi/kixtart.php index 62cb5465242eafc9b2ae2bfad367f6f21718a151..f3f29e2e3d6099669c4d39a7e68899cb001d4e89 100644 --- a/inc/geshi/kixtart.php +++ b/inc/geshi/kixtart.php @@ -4,7 +4,7 @@ * -------- * Author: Riley McArdle (riley@glyff.net) * Copyright: (c) 2007 Riley McArdle (http://www.glyff.net/) - * Release Version: 1.0.8.8 + * Release Version: 1.0.8.10 * Date Started: 2007/08/31 * * PHP language file for GeSHi. diff --git a/inc/geshi/klonec.php b/inc/geshi/klonec.php index e47e597efde08d9ae7c860fdcefc864b1fa72a9e..553763d61714e2bee7254d1fee45c34917d59220 100644 --- a/inc/geshi/klonec.php +++ b/inc/geshi/klonec.php @@ -4,7 +4,7 @@ * -------- * Author: AUGER Mickael * Copyright: Synchronic - * Release Version: 1.0.8.8 + * Release Version: 1.0.8.10 * Date Started: 2008/04/16 * * KLone with C language file for GeSHi. diff --git a/inc/geshi/klonecpp.php b/inc/geshi/klonecpp.php index 1a2d2082b2b65dd083df2c9c9a605329f266fbea..6fe0df1efdeedaf184ac2ada8692f02759ebc1a0 100644 --- a/inc/geshi/klonecpp.php +++ b/inc/geshi/klonecpp.php @@ -4,7 +4,7 @@ * -------- * Author: AUGER Mickael * Copyright: Synchronic - * Release Version: 1.0.8.8 + * Release Version: 1.0.8.10 * Date Started: 2008/04/16 * * KLone with C++ language file for GeSHi. diff --git a/inc/geshi/latex.php b/inc/geshi/latex.php index 1ba3d409ea6ab17c75acc1c88bca79333fc454a1..91c03423698085f778363aa09dafc4e5c98e7709 100644 --- a/inc/geshi/latex.php +++ b/inc/geshi/latex.php @@ -4,7 +4,7 @@ * ----- * Author: efi, Matthias Pospiech (matthias@pospiech.eu) * Copyright: (c) 2006 efi, Matthias Pospiech (matthias@pospiech.eu), Nigel McNie (http://qbnz.com/highlighter) - * Release Version: 1.0.8.8 + * Release Version: 1.0.8.10 * Date Started: 2006/09/23 * * LaTeX language file for GeSHi. @@ -185,7 +185,7 @@ $language_data = array ( 8 => "\\\\(?:end|begin)(?=[^a-zA-Z])", // {parameters} 9 => array( - GESHI_SEARCH => "(?<=\\{)(?!<\|!REG3XP5!>).*(?=\\})", + GESHI_SEARCH => "(?<=\\{)(?!<\|!REG3XP5!>).*?(?=\\})", GESHI_REPLACE => '\0', GESHI_MODIFIERS => 'Us', GESHI_BEFORE => '', diff --git a/inc/geshi/lb.php b/inc/geshi/lb.php new file mode 100644 index 0000000000000000000000000000000000000000..390fe19a9e56c449a19b71f0881cfac6ca715152 --- /dev/null +++ b/inc/geshi/lb.php @@ -0,0 +1,162 @@ +<?php +/************************************************************************************* + * lb.php + * -------- + * Author: Chris Iverson (cj.no.one@gmail.com) + * Copyright: (c) 2010 Chris Iverson + * Release Version: 1.0.8.10 + * Date Started: 2010/07/18 + * + * Liberty BASIC language file for GeSHi. + * + * CHANGES + * ------- + * 2010/07/22 + * - First Release + * + * 2010/08/23 + * - Added missing default variables + * + * TODO (updated 2010/07/20) + * ------------------------- + * Prevent highlighting numbers in handle names(constants beginning with #) + * Allow number highlighting after a single period(e.g. .9 = 0.9, should be + * highlighted + * Prevent highlighting keywords within branch labels(within brackets) + * + ************************************************************************************* + * + * This file is part of GeSHi. + * + * GeSHi is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * GeSHi is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with GeSHi; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + ************************************************************************************/ + +$language_data = array( + 'LANG_NAME' => 'Liberty BASIC', + 'COMMENT_SINGLE' => array(1 => '\''), + 'COMMENT_MULTI' => array(), + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array('"'), + 'ESCAPE_CHAR' => '', + 'KEYWORDS' => array( + 1 => array( + 'and', 'append', 'as', 'beep', 'bmpbutton', 'bmpsave', 'boolean', + 'button', 'byref', 'call', 'callback', 'calldll', 'callfn', 'case', + 'checkbox', 'close', 'cls', 'colordialog', 'combobox', 'confirm', + 'cursor', 'data', 'dialog', 'dim', 'dll', 'do', 'double', 'dump', + 'dword', 'else', 'end', 'error', 'exit', 'field', 'filedialog', + 'files', 'fontdialog', 'for', 'function', 'get', 'gettrim', + 'global', 'gosub', 'goto', 'graphicbox', 'graphics', 'groupbox', + 'if', 'input', 'kill', 'let', 'line', 'listbox', 'loadbmp', + 'locate', 'long', 'loop', 'lprint', 'mainwin', 'maphandle', 'menu', + 'mod', 'name', 'next', 'nomainwin', 'none', 'notice', 'on', + 'oncomerror', 'or', 'open', 'out', 'output', 'password', 'playmidi', + 'playwave', 'popupmenu', 'print', 'printerdialog', 'prompt', 'ptr', + 'put', 'radiobutton', 'random', 'randomize', 'read', 'readjoystick', + 'redim', 'rem', 'restore', 'resume', 'return', 'run', 'scan', + 'seek', 'select', 'short', 'sort', 'statictext', 'stop', 'stopmidi', + 'struct', 'stylebits', 'sub', 'text', 'textbox', 'texteditor', + 'then', 'timer', 'titlebar', 'to', 'trace', 'ulong', 'unloadbmp', + 'until', 'ushort', 'void', 'wait', 'window', 'wend', 'while', + 'word', 'xor' + ), + 2 => array( + 'abs', 'acs', 'asc', 'asn', 'atn', 'chr$', 'cos', 'date$', + 'dechex$', 'eof', 'eval', 'eval$', 'exp', 'hbmp', 'hexdec', 'hwnd', + 'inp', 'input$', 'inputto$', 'instr', 'int', 'left$', 'len', 'lof', + 'log', 'lower$', 'max', 'midipos', 'mid$', 'min', 'mkdir', 'not', + 'right$', 'rmdir', 'rnd', 'sin', 'space$', 'sqr', 'str$', 'tab', + 'tan', 'time$', 'trim$', 'txcount', 'upper$', 'using', 'val', + 'winstring', 'word$' + ), + 3 => array( + 'BackgroundColor$', 'Com', 'ComboboxColor$', 'ComError', 'ComErrorNumber', + 'CommandLine$', 'ComPortNumber', 'DefaultDir$', + 'DisplayHeight', 'DisplayWidth', 'Drives$', 'Err', 'Err$', + 'ForegroundColor$', 'Inkey$', 'Joy1x', 'Joy1y', 'Joy1z', + 'Joy1button1', 'Joy1button2', 'Joy2x', 'Joy2y', 'Joy2z', + 'Joy2button1', 'Joy2button2', 'ListboxColor$', 'MouseX', 'MouseY', 'Platform$', + 'PrintCollate', 'PrintCopies', 'PrinterFont$', 'PrinterName$', 'StartupDir$', + 'TextboxColor$', 'TexteditorColor$', 'Version$', 'WindowHeight', + 'WindowWidth', 'UpperLeftX', 'UpperLeftY' + ) + ), + 'SYMBOLS' => array( + 1 => array( + '(', ')', '[', ']', '+', '-', '*', '/', '%', '=', '<', '>', ':', ',', '#' + ) + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => false, + 1 => false, + 2 => false, + 3 => true + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: #0000FF;', + 2 => 'color: #AD0080;', + 3 => 'color: #008080;' + ), + 'COMMENTS' => array( + 1 => 'color: #666666; font-style: italic;', + 'MULTI' => 'color: #666666; font-style: italic;' + ), + 'ESCAPE_CHAR' => array( + 0 => 'color: #000099; font-weight: bold;' + ), + 'BRACKETS' => array( + 0 => 'color: #009900;' + ), + 'STRINGS' => array( + 0 => 'color: #008000;' + ), + 'NUMBERS' => array( + 0 => 'color: #FF0000;', + ), + 'METHODS' => array( + 0 => 'color: #004000;' + ), + 'SYMBOLS' => array( + 1 => 'color: #339933;' + ), + 'REGEXPS' => array(), + 'SCRIPT' => array() + ), + 'URLS' => array( + 1 => '', + 2 => '', + 3 => '' + ), + 'OOLANG' => false, + 'OBJECT_SPLITTERS' => array(), + 'REGEXPS' => array(), + 'STRICT_MODE_APPLIES' => GESHI_NEVER, + 'SCRIPT_DELIMITERS' => array(), + 'HIGHLIGHT_STRICT_BLOCK' => array(), + 'PARSER_CONTROL' => array( + 'KEYWORDS' => array( + 2 => array( + //In LB, the second keyword list is a list of built-in functions, + //and their names should not be highlighted unless being used + //as a function name. + 'DISALLOWED_AFTER' => '(?=\s*\()' + ) + ) + ) +); + +?> \ No newline at end of file diff --git a/inc/geshi/lisp.php b/inc/geshi/lisp.php index a8f50691e700a8ecf66513d9439bba09dd352249..82aa7f69ba1f88a68881823d21082575a034c5b8 100644 --- a/inc/geshi/lisp.php +++ b/inc/geshi/lisp.php @@ -4,7 +4,7 @@ * -------- * Author: Roberto Rossi (rsoftware@altervista.org) * Copyright: (c) 2004 Roberto Rossi (http://rsoftware.altervista.org), Nigel McNie (http://qbnz.com/highlighter - * Release Version: 1.0.8.8 + * Release Version: 1.0.8.10 * Date Started: 2004/08/30 * * Generic Lisp language file for GeSHi. diff --git a/inc/geshi/llvm.php b/inc/geshi/llvm.php new file mode 100644 index 0000000000000000000000000000000000000000..f58be2da8149741d53c4fe8b9e8053ef57cd9f26 --- /dev/null +++ b/inc/geshi/llvm.php @@ -0,0 +1,385 @@ +<?php +/************************************************************************************* + * llvm.php + * -------- + * Author: Benny Baumann (BenBE@geshi.org), Azriel Fasten (azriel.fasten@gmail.com) + * Copyright: (c) 2010 Benny Baumann (http://qbnz.com/highlighter/), Azriel Fasten (azriel.fasten@gmail.com) + * Release Version: 1.0.8.10 + * Date Started: 2010/10/14 + * + * LLVM language file for GeSHi. + * + * CHANGES + * ------- + * 2010/10/14 (1.0.8.10) + * - First Release + * + * TODO (updated 2010/10/14) + * ------------------------- + * * Check if all links aren't broken + * + ************************************************************************************* + * + * This file is part of GeSHi. + * + * GeSHi is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * GeSHi is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with GeSHi; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + ************************************************************************************/ + +$language_data = array( + 'LANG_NAME' => 'LLVM Intermediate Representation', + 'COMMENT_SINGLE' => array(1 => ';'), + 'COMMENT_MULTI' => array(), + 'HARDQUOTE' => array("\"", "\""), + 'HARDESCAPE' => array("\"", "\\"), + 'HARDCHAR' => "\\", + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array('"'), + 'ESCAPE_CHAR' => '', + 'ESCAPE_REGEXP' => array( + //Simple Single Char Escapes + // 1 => "#\\\\[nfrtv\$\"\n\\\\]#i", + //Hexadecimal Char Specs + // 2 => "#\\\\x[\da-fA-F]{1,2}#i", + //Octal Char Specs + // 3 => "#\\\\[0-7]{1,3}#", + //String Parsing of Variable Names + // 4 => "#\\$[a-z0-9_]+(?:\\[[a-z0-9_]+\\]|->[a-z0-9_]+)?|(?:\\{\\$|\\$\\{)[a-z0-9_]+(?:\\[('?)[a-z0-9_]*\\1\\]|->[a-z0-9_]+)*\\}#i", + //Experimental extension supporting cascaded {${$var}} syntax + // 5 => "#\$[a-z0-9_]+(?:\[[a-z0-9_]+\]|->[a-z0-9_]+)?|(?:\{\$|\$\{)[a-z0-9_]+(?:\[('?)[a-z0-9_]*\\1\]|->[a-z0-9_]+)*\}|\{\$(?R)\}#i", + //Format String support in ""-Strings + // 6 => "#%(?:%|(?:\d+\\\\\\\$)?\\+?(?:\x20|0|'.)?-?(?:\d+|\\*)?(?:\.\d+)?[bcdefFosuxX])#" + ), + 'NUMBERS' => + GESHI_NUMBER_INT_BASIC | GESHI_NUMBER_HEX_PREFIX | GESHI_NUMBER_FLT_SCI_ZERO, + 'KEYWORDS' => array( + 0 => array( + 'to', 'nuw', 'nsw', 'align', 'inbounds', 'entry', 'return' + ), + //Terminator Instructions + 1 => array( + 'ret', 'br', 'switch', 'indirectbr', 'invoke', 'unwind', 'unreachable' + ), + //Binary Operations + 2 => array( + 'add', 'fadd', 'sub', 'fsub', 'mul', 'fmul', 'udiv', 'sdiv', 'fdiv', 'urem', 'frem', 'srem' + ), + //Bitwise Binary Operations + 3 => array( + 'shl', 'lshr', 'ashr', 'and', 'or', 'xor' + ), + //Vector Operations + 4 => array( + 'extractelement', 'insertelement', 'shufflevector' + ), + //Aggregate Operations + 5 => array( + 'extractvalue', 'insertvalue' + ), + //Memory Access and Addressing Operations + 6 => array( + 'alloca', 'load', 'store', 'getelementptr' + ), + //Conversion Operations + 7 => array( + 'trunc', 'zext', 'sext', 'fptrunc', 'fpext', 'fptoui', 'fptosi', + 'uitofp', 'sitofp', 'ptrtoint', 'inttoptr', 'bitcast' + ), + //Other Operations + 8 => array( + 'icmp', 'fcmp', 'phi', 'select', 'call', 'va_arg' + ), + //Linkage Types + 9 => array( + 'private', 'linker_private', 'linker_private_weak', 'linker_private_weak_def_auto', + 'internal', 'available_externally', 'linkonce', 'common', 'weak', 'appending', + 'extern_weak', 'linkonce_odr', 'weak_odr', 'externally visible', 'dllimport', 'dllexport', + ), + //Calling Conventions + 10 => array( + 'ccc', 'fastcc', 'coldcc', 'cc 10' + ), + //Named Types + 11 => array( + 'type' + ), + //Parameter Attributes + 12 => array( + 'zeroext', 'signext', 'inreg', 'byval', 'sret', 'noalias', 'nocapture', 'nest' + ), + //Function Attributes + 13 => array( + 'alignstack', 'alwaysinline', 'inlinehint', 'naked', 'noimplicitfloat', 'noinline', 'noredzone', 'noreturn', + 'nounwind', 'optsize', 'readnone', 'readonly', 'ssp', 'sspreq', + ), + //Module-Level Inline Assembly + 14 => array( + 'module asm' + ), + //Data Layout + 15 => array( + 'target datalayout' + ), + //Primitive Types + 16 => array( + 'x86mmx', + 'void', + 'label', + 'metadata', + 'opaque' + ), + //Floating Point Types + 17 => array( + 'float', 'double', 'fp128', 'x86_fp80', 'ppc_fp128', + ), + //Simple Constants + 18 => array( + 'false', 'true', 'null' + ), + //Global Variable and Function Addresses + 19 => array( + 'global', 'addrspace', 'constant', 'section' + ), + //Functions + 20 => array( + 'declare', 'define' + ), + //Complex Constants + 21 => array( + 'zeroinitializer' + ), + //Undefined Values + 22 => array( + 'undef' + ), + //Addresses of Basic Blocks + 23 => array( + 'blockaddress' + ), + //Visibility Styles + 24 => array( + 'default', 'hidden', 'protected' + ), + 25 => array( + 'volatile' + ), + 26 => array( + 'tail' + ), + ), + 'SYMBOLS' => array( + 0 => array( + '(', ')', '[', ']', '{', '}', + '!', '@', '%', '&', '|', '/', + '<', '>', + '=', '-', '+', '*', + '.', ':', ',', ';' + ) + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => false, + 1 => true, + 2 => true, + 3 => true, + 4 => true, + 5 => true, + 6 => true, + 7 => true, + 8 => true, + 9 => true, + 10 => true, + 11 => true, + 12 => true, + 13 => true, + 14 => true, + 15 => true, + 16 => true, + 17 => true, + 18 => true, + 19 => true, + 20 => true, + 21 => true, + 22 => true, + 23 => true, + 24 => true, + 25 => true, + 26 => true, + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 0 => 'color: #209090;', + 1 => 'color: #0000F0;', + 2 => 'color: #00F000; font-weight: bold;', + 3 => 'color: #F00000;', + 4 => 'color: #00F0F0; font-weight: bold;', + 5 => 'color: #F000F0; font-weight: bold;', + 6 => 'color: #403020; font-weight: bold;', + 7 => 'color: #909090; font-weight: bold;', + 8 => 'color: #009090; font-weight: bold;', + 9 => 'color: #900090; font-weight: bold;', + 10 => 'color: #909000; font-weight: bold;', + 11 => 'color: #000090; font-weight: bold;', + 12 => 'color: #900000; font-weight: bold;', + 13 => 'color: #009000; font-weight: bold;', + 14 => 'color: #F0F090; font-weight: bold;', + 15 => 'color: #F090F0; font-weight: bold;', + 16 => 'color: #90F0F0; font-weight: bold;', + 17 => 'color: #9090F0; font-weight: bold;', + 18 => 'color: #90F090; font-weight: bold;', + 19 => 'color: #F09090; font-weight: bold;', + 20 => 'color: #4040F0; font-weight: bold;', + 21 => 'color: #40F040; font-weight: bold;', + 22 => 'color: #F04040; font-weight: bold;', + 23 => 'color: #F0F040; font-weight: bold;', + 24 => 'color: #F040F0; font-weight: bold;', + 25 => 'color: #40F0F0; font-weight: bold;', + 26 => 'color: #904040; font-weight: bold;', + ), + 'COMMENTS' => array( + 1 => 'color: #666666; font-style: italic;', + 'MULTI' => 'color: #666666; font-style: italic;' + ), + 'ESCAPE_CHAR' => array( + 0 => 'color: #000099; font-weight: bold;', + 1 => 'color: #000099; font-weight: bold;', + 2 => 'color: #660099; font-weight: bold;', + 3 => 'color: #660099; font-weight: bold;', + 4 => 'color: #006699; font-weight: bold;', + 5 => 'color: #006699; font-weight: bold; font-style: italic;', + 6 => 'color: #009933; font-weight: bold;', + 'HARD' => 'color: #000099; font-weight: bold;' + ), + 'BRACKETS' => array( + 0 => 'color: #009900;' + ), + 'STRINGS' => array( + 0 => 'color: #0000ff;', + 'HARD' => 'color: #0000ff;' + ), + 'NUMBERS' => array( + 0 => 'color: #cc66cc;', + GESHI_NUMBER_OCT_PREFIX => 'color: #208080;', + GESHI_NUMBER_HEX_PREFIX => 'color: #208080;', + GESHI_NUMBER_FLT_SCI_ZERO => 'color:#800080;', + ), + 'METHODS' => array( + 1 => 'color: #004000;', + 2 => 'color: #004000;' + ), + 'SYMBOLS' => array( + 0 => 'color: #339933;', + ), + 'REGEXPS' => array( + 0 => 'color: #007088;', + 1 => 'color: #007088;', + // 2 => 'color: #000088;', + 3 => 'color: #700088;', + 4 => 'color: #010088;', + // 5 => 'color: #610088;', + // 6 => 'color: #616088;', + // 7 => 'color: #616988;', + // 8 => 'color: #616908;', + 9 => 'color: #6109F8;', + ), + 'SCRIPT' => array( + 0 => '', + 1 => '', + 2 => '', + 3 => '', + 4 => '', + 5 => '' + ) + ), + 'URLS' => array( + 0 => '', + 1 => 'http://llvm.org/docs/LangRef.html#i_{FNAME}', + 2 => 'http://llvm.org/docs/LangRef.html#i_{FNAME}', + 3 => 'http://llvm.org/docs/LangRef.html#i_{FNAME}', + 4 => 'http://llvm.org/docs/LangRef.html#i_{FNAME}', + 5 => 'http://llvm.org/docs/LangRef.html#i_{FNAME}', + 6 => 'http://llvm.org/docs/LangRef.html#i_{FNAME}', + 7 => 'http://llvm.org/docs/LangRef.html#i_{FNAME}', + 8 => 'http://llvm.org/docs/LangRef.html#i_{FNAME}', + 9 => 'http://llvm.org/docs/LangRef.html#linkage_{FNAME}', + 10 => 'http://llvm.org/docs/LangRef.html#callingconv', + 11 => 'http://llvm.org/docs/LangRef.html#namedtypes', + 12 => 'http://llvm.org/docs/LangRef.html#paramattrs', + 13 => 'http://llvm.org/docs/LangRef.html#fnattrs', + 14 => 'http://llvm.org/docs/LangRef.html#moduleasm', + 15 => 'http://llvm.org/docs/LangRef.html#datalayout', + 16 => 'http://llvm.org/docs/LangRef.html#t_{FNAME}', + 17 => 'http://llvm.org/docs/LangRef.html#t_floating', + 18 => 'http://llvm.org/docs/LangRef.html#simpleconstants', + 19 => 'http://llvm.org/docs/LangRef.html#globalvars', + 20 => 'http://llvm.org/docs/LangRef.html#functionstructure', + 21 => 'http://llvm.org/docs/LangRef.html#complexconstants', + 22 => 'http://llvm.org/docs/LangRef.html#undefvalues', + 23 => 'http://llvm.org/docs/LangRef.html#blockaddress', + 24 => 'http://llvm.org/docs/LangRef.html#visibility', + 25 => 'http://llvm.org/docs/LangRef.html#volatile', + 26 => 'http://llvm.org/docs/LangRef.html#i_call', + ), + 'OOLANG' => false, + 'OBJECT_SPLITTERS' => array( + ), + 'REGEXPS' => array( + //Variables + 0 => '%[-a-zA-Z$\._][-a-zA-Z$\._0-9]*', + //Labels + // 1 => '[-a-zA-Z$\._0-9]+:', + 1 => '(?<!\w)[\-\w\$\.]+:(?![^">]*<)', + //Strings + // 2 => '"[^"]+"', + //Unnamed variable slots + 3 => '%[-]?[0-9]+', + //Integer Types + 4 => array( + GESHI_SEARCH => '(?<!\w)i\d+(?!\w)', + GESHI_REPLACE => '\\0', + GESHI_MODIFIERS => '', + GESHI_BEFORE => '<a href="http://llvm.org/docs/LangRef.html#t_integer">', + GESHI_AFTER => '</a>' + ), + //Comments + // 5 => ';.*', + //Integer literals + // 6 => '\\b[-]?[0-9]+\\b', + //Floating point constants + // 7 => '\\b[-+]?[0-9]+\.[0-9]*\([eE][-+]?[0-9]+\)?\\b', + //Hex constants + // 8 => '\\b0x[0-9A-Fa-f]+\\b', + //Global variables + 9 => array( + GESHI_SEARCH => '@[-a-zA-Z$\._][-a-zA-Z$\._0-9]*', + GESHI_REPLACE => '\\0', + GESHI_MODIFIERS => '', + GESHI_BEFORE => '<a href="http://llvm.org/docs/LangRef.html#globalvars">', + GESHI_AFTER => '</a>' + ), + ), + 'STRICT_MODE_APPLIES' => GESHI_MAYBE, + 'HIGHLIGHT_STRICT_BLOCK' => array( + 0 => true, + 1 => true, + 2 => true, + 3 => true, + 4 => true, + 5 => true + ), + 'SCRIPT_DELIMITERS' => array(), + 'TAB_WIDTH' => 4 +); + +?> \ No newline at end of file diff --git a/inc/geshi/locobasic.php b/inc/geshi/locobasic.php index a3e22a7be75c28b980cd3645f14516d03e965e17..55aacc263c120292385965000ae94bd90caef085 100644 --- a/inc/geshi/locobasic.php +++ b/inc/geshi/locobasic.php @@ -4,7 +4,7 @@ * ------------- * Author: Nacho Cabanes * Copyright: (c) 2009 Nacho Cabanes (http://www.nachocabanes.com) - * Release Version: 1.0.8.8 + * Release Version: 1.0.8.10 * Date Started: 2009/03/22 * * Locomotive Basic (Amstrad CPC series) language file for GeSHi. diff --git a/inc/geshi/logtalk.php b/inc/geshi/logtalk.php index fb77bd6d3fe496c5277b47e5559b1f98ebb80ec1..b4eba764c268550f0edd3b5f1bbe53dd55b54419 100644 --- a/inc/geshi/logtalk.php +++ b/inc/geshi/logtalk.php @@ -4,14 +4,25 @@ * ----------- * * Author: Paulo Moura (pmoura@logtalk.org) - * Copyright: (c) 2009 Paulo Moura (http://logtalk.org/) - * Release Version: 1.0.8.8 + * Copyright: (c) 2009-2011 Paulo Moura (http://logtalk.org/) + * Release Version: 1.0.8.10 * Date Started: 2009/10/24 * * Logtalk language file for GeSHi. * * CHANGES * ------- + * 2011/01/18 (1.1.4) + * - Added syntax coloring of ignore/1 + * 2010/11/28 (1.1.3) + * - Added syntax coloring of conforms_to_protocol/2-3 + * 2010/09/14 (1.1.2) + * - Added syntax coloring of coinductive/1 + * 2010/06/23 (1.1.1) + * - Added syntax coloring of e/0 and pi/0 + * - Added syntax coloring of ground/1, numbervars/3, keysort/2, and sort/2 + * 2010/05/15 (1.1.0) + * - Added syntax coloring of callable/1 and compare/3 * 2009/10/28 (1.0.0) * - First Release * @@ -76,7 +87,7 @@ $language_data = array( // entity directives 'calls', 'initialization', 'op', 'uses', // predicate directives - 'alias', 'discontiguous', 'dynamic', 'mode', 'info', 'meta_predicate', 'multifile', 'synchronized', + 'alias', 'coinductive', 'discontiguous', 'dynamic', 'mode', 'info', 'meta_predicate', 'multifile', 'synchronized', // module directives 'export', 'module', 'reexport', 'use_module' ), @@ -111,7 +122,7 @@ $language_data = array( 'current_category', 'current_object', 'current_protocol', 'category_property', 'object_property', 'protocol_property', // entity relations - 'complements_object', + 'complements_object', 'conforms_to_protocol', 'extends_category', 'extends_object', 'extends_protocol', 'implements_protocol', 'imports_category', 'instantiates_class', 'specializes_class', @@ -125,7 +136,7 @@ $language_data = array( // database 'abolish', 'asserta', 'assertz', 'clause', 'retract', 'retractall', // control - 'call', 'catch', 'once', 'throw', + 'call', 'catch', 'ignore', 'once', 'throw', // all solutions predicates 'bagof', 'findall', 'forall', 'setof', // multi-threading meta-predicates @@ -139,9 +150,11 @@ $language_data = array( 'number_chars', 'number_codes', 'char_code', // term creation and decomposition - 'arg', 'copy_term', 'functor', + 'arg', 'copy_term', 'functor', 'numbervars', // term testing - 'atom', 'atomic', 'compound', 'float', 'integer', 'nonvar', 'number', 'sub_atom', 'var', + 'atom', 'atomic', 'callable', 'compound', 'float', 'ground', 'integer', 'nonvar', 'number', 'sub_atom', 'var', + // term comparison + 'compare', // stream selection and control 'current_input', 'current_output', 'set_input', 'set_output', 'open', 'close', 'flush_output', 'stream_property', @@ -156,8 +169,10 @@ $language_data = array( 'write', 'writeq', 'write_canonical', 'write_term', 'read', 'read_term', 'char_conversion', 'current_char_conversion', - // - 'halt' + // hooks + 'halt', + // sorting + 'keysort', 'sort' ), // Built-in predicates (no arguments) 5 => array( @@ -180,7 +195,7 @@ $language_data = array( ), // Evaluable functors (no arguments) 7 => array( - 'mod', 'rem' + 'e', 'pi', 'mod', 'rem' ), ), 'SYMBOLS' => array( diff --git a/inc/geshi/lolcode.php b/inc/geshi/lolcode.php index a804913cc2c4ea16753f0a4b0f8b291de3e2f8e9..bcbad11c6a80dfb67f7404543900ae306923fdee 100644 --- a/inc/geshi/lolcode.php +++ b/inc/geshi/lolcode.php @@ -4,7 +4,7 @@ * ---------- * Author: Benny Baumann (BenBE@geshi.org) * Copyright: (c) 2008 Benny Baumann (http://qbnz.com/highlighter/) - * Release Version: 1.0.8.8 + * Release Version: 1.0.8.10 * Date Started: 2009/10/31 * * LOLcode language file for GeSHi. diff --git a/inc/geshi/lotusformulas.php b/inc/geshi/lotusformulas.php index 862adbc82fcdc14a51a945acf934b4529cff333e..5b755e55ab533ba1d4768055eedc3fbdf748fa21 100644 --- a/inc/geshi/lotusformulas.php +++ b/inc/geshi/lotusformulas.php @@ -4,7 +4,7 @@ * ------------------------ * Author: Richard Civil (info@richardcivil.net) * Copyright: (c) 2008 Richard Civil (info@richardcivil.net), Nigel McNie (http://qbnz.com/highlighter) - * Release Version: 1.0.8.8 + * Release Version: 1.0.8.10 * Date Started: 2008/04/12 * * @Formula/@Command language file for GeSHi. diff --git a/inc/geshi/lotusscript.php b/inc/geshi/lotusscript.php index 1ef2f3eee19ee9a2528c7797ae0801e13c1b53cb..c2b2f45f503addc225fb30f29a53e2577d5bfd00 100644 --- a/inc/geshi/lotusscript.php +++ b/inc/geshi/lotusscript.php @@ -4,7 +4,7 @@ * ------------------------ * Author: Richard Civil (info@richardcivil.net) * Copyright: (c) 2008 Richard Civil (info@richardcivil.net), Nigel McNie (http://qbnz.com/highlighter) - * Release Version: 1.0.8.8 + * Release Version: 1.0.8.10 * Date Started: 2008/04/12 * * LotusScript language file for GeSHi. diff --git a/inc/geshi/lscript.php b/inc/geshi/lscript.php index b7e3132129a87a3533c7064518fe7b1c986faad3..51852414b292a6da6355314cd968a9074b7d1ef1 100644 --- a/inc/geshi/lscript.php +++ b/inc/geshi/lscript.php @@ -4,7 +4,7 @@ * --------- * Author: Arendedwinter (admin@arendedwinter.com) * Copyright: (c) 2008 Beau McGuigan (http://www.arendedwinter.com) - * Release Version: 1.0.8.8 + * Release Version: 1.0.8.10 * Date Started: 15/11/2008 * * Lightwave Script language file for GeSHi. diff --git a/inc/geshi/lsl2.php b/inc/geshi/lsl2.php index e5f40969b15de02b85eff0f61816a75ca7a081b4..828e2b91c5c4d623a5c8a07faae50342256679d5 100644 --- a/inc/geshi/lsl2.php +++ b/inc/geshi/lsl2.php @@ -4,7 +4,7 @@ * -------- * Author: William Fry (william.fry@nyu.edu) * Copyright: (c) 2009 William Fry - * Release Version: 1.0.8.8 + * Release Version: 1.0.8.10 * Date Started: 2009/02/04 * * Linden Scripting Language (LSL2) language file for GeSHi. diff --git a/inc/geshi/lua.php b/inc/geshi/lua.php index abeaa54ea2d6e8045bc4d5df030fa02eeb0aef4f..2ec6c0b8882634840b49987f21d1e220d7ba4bf2 100644 --- a/inc/geshi/lua.php +++ b/inc/geshi/lua.php @@ -4,7 +4,7 @@ * ------- * Author: Roberto Rossi (rsoftware@altervista.org) * Copyright: (c) 2004 Roberto Rossi (http://rsoftware.altervista.org), Nigel McNie (http://qbnz.com/highlighter) - * Release Version: 1.0.8.8 + * Release Version: 1.0.8.10 * Date Started: 2004/07/10 * * LUA language file for GeSHi. @@ -46,13 +46,29 @@ $language_data = array ( 'LANG_NAME' => 'Lua', 'COMMENT_SINGLE' => array(1 => "--"), 'COMMENT_MULTI' => array('--[[' => ']]'), + 'COMMENT_REGEXP' => array(2 => "/\[(=*)\[.*?\]\1\]/s"), 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, 'QUOTEMARKS' => array("'", '"'), - 'ESCAPE_CHAR' => '\\', + 'ESCAPE_CHAR' => '', + 'ESCAPE_REGEXP' => array( + //Simple Single Char Escapes + 1 => "#\\\\[\\\\abfnrtv\'\"]#i", + //Octal Char Specs + 2 => "#\\\\\\d{1,3}#" + ), + 'NUMBERS' => + GESHI_NUMBER_INT_BASIC | GESHI_NUMBER_INT_CSTYLE | GESHI_NUMBER_HEX_PREFIX | + GESHI_NUMBER_FLT_NONSCI | GESHI_NUMBER_FLT_NONSCI_F | + GESHI_NUMBER_FLT_SCI_SHORT | GESHI_NUMBER_FLT_SCI_ZERO, 'KEYWORDS' => array( 1 => array( - 'and','break','do','else','elseif','end','false','for','function','if', - 'in','local','nil','not','or','repeat','return','then','true','until','while', + 'break','do','else','elseif','end','for','function','if', + 'local','repeat','return','then','until','while' + ), + 2 => array( + 'and','in','not','or' + ), + 3 => array( '_VERSION','assert','collectgarbage','dofile','error','gcinfo','loadfile','loadstring', 'print','tonumber','tostring','type','unpack', '_ALERT','_ERRORMESSAGE','_INPUT','_PROMPT','_OUTPUT', @@ -79,37 +95,57 @@ $language_data = array ( 'os.clock','os.date','os.difftime','os.execute','os.exit','os.getenv','os.remove','os.rename', 'os.setlocale','os.time','os.tmpname', 'string','table','math','coroutine','io','os','debug' + ), + 4 => array( + 'nil', 'false', 'true' + ), + 5 => array( + 'Nil', 'Boolean', 'Number', 'String', 'Userdata', 'Thread', 'Table' ) ), 'SYMBOLS' => array( - '(', ')', '{', '}', '!', '@', '%', '&', '*', '|', '/', '<', '>', '=', ';' + '+', '-', '*', '/', '%', '^', '#', + '==', '~=', '<=', '>=', '<', '>', '=', + '(', ')', '{', '}', '[', ']', + ';', ':', ',', '.', '..', '...' ), 'CASE_SENSITIVE' => array( GESHI_COMMENTS => false, - 1 => true + 1 => true, + 2 => true, + 3 => true, + 4 => true, + 5 => true ), 'STYLES' => array( 'KEYWORDS' => array( - 1 => 'color: #b1b100;' + 1 => 'color: #aa9900; font-weight: bold;', + 2 => 'color: #aa9900; font-weight: bold;', + 3 => 'color: #0000aa;', + 4 => 'color: #aa9900;', + 5 => 'color: #aa9900;' ), 'COMMENTS' => array( 1 => 'color: #808080; font-style: italic;', + 2 => 'color: #ff0000;', 'MULTI' => 'color: #808080; font-style: italic;' ), 'ESCAPE_CHAR' => array( - 0 => 'color: #000099; font-weight: bold;' + 0 => 'color: #000099; font-weight: bold;', + 1 => 'color: #000099; font-weight: bold;', + 2 => 'color: #000099; font-weight: bold;' ), 'BRACKETS' => array( 0 => 'color: #66cc66;' ), 'STRINGS' => array( - 0 => 'color: #ff0000;' + 0 => 'color: #ff6666;' ), 'NUMBERS' => array( 0 => 'color: #cc66cc;' ), 'METHODS' => array( - 0 => 'color: #b1b100;' + 0 => 'color: #aa9900;' ), 'SYMBOLS' => array( 0 => 'color: #66cc66;' @@ -120,7 +156,11 @@ $language_data = array ( ) ), 'URLS' => array( - 1 => '' + 1 => '', + 2 => '', + 3 => '', + 4 => '', + 5 => '' ), 'OOLANG' => false, 'OBJECT_SPLITTERS' => array( @@ -134,4 +174,4 @@ $language_data = array ( ) ); -?> +?> \ No newline at end of file diff --git a/inc/geshi/m68k.php b/inc/geshi/m68k.php index 543b73c8bdbe2f8aa266f469e54c42d202f80545..081578158c1b77cc604c7545bac5fe1b423776f8 100644 --- a/inc/geshi/m68k.php +++ b/inc/geshi/m68k.php @@ -4,7 +4,7 @@ * -------- * Author: Benny Baumann (BenBE@omorphia.de) * Copyright: (c) 2007 Benny Baumann (http://www.omorphia.de/), Nigel McNie (http://qbnz.com/highlighter) - * Release Version: 1.0.8.8 + * Release Version: 1.0.8.10 * Date Started: 2007/02/06 * * Motorola 68000 Assembler language file for GeSHi. diff --git a/inc/geshi/magiksf.php b/inc/geshi/magiksf.php index f3da7fcf2939b4ecf7933f165970cf677ae5dd2d..b6f431ea8fba1eaef12b7457d29b1541016eed4c 100644 --- a/inc/geshi/magiksf.php +++ b/inc/geshi/magiksf.php @@ -4,7 +4,7 @@ * -------- * Author: Sjoerd van Leent (svanleent@gmail.com) * Copyright: (c) 2010 Sjoerd van Leent - * Release Version: 1.0.8.8 + * Release Version: 1.0.8.10 * Date Started: 2010/02/15 * * MagikSF language file for GeSHi. diff --git a/inc/geshi/make.php b/inc/geshi/make.php index 689552312aef93e8c83a1aaf4015ec2c12ac6955..2d5d73425bba807c1c96d695eea97c57033d0bc5 100644 --- a/inc/geshi/make.php +++ b/inc/geshi/make.php @@ -4,7 +4,7 @@ * -------- * Author: Neil Bird <phoenix@fnxweb.com> * Copyright: (c) 2008 Neil Bird - * Release Version: 1.0.8.8 + * Release Version: 1.0.8.10 * Date Started: 2008/08/26 * * make language file for GeSHi. diff --git a/inc/geshi/mapbasic.php b/inc/geshi/mapbasic.php index 0025d4e22d41286832e0b75aacf6719d9a468540..7d365263d07889341064cf70f0b61e950c8b7144 100644 --- a/inc/geshi/mapbasic.php +++ b/inc/geshi/mapbasic.php @@ -4,7 +4,7 @@ * ------ * Author: Tomasz Berus (t.berus@gisodkuchni.pl) * Copyright: (c) 2009 Tomasz Berus (http://sourceforge.net/projects/mbsyntax/) - * Release Version: 1.0.8.8 + * Release Version: 1.0.8.10 * Date Started: 2008/11/25 * * MapBasic language file for GeSHi. diff --git a/inc/geshi/matlab.php b/inc/geshi/matlab.php index 1f9c12b78d0edf6976275e2fc83d155c69d682b8..5c64a0d494c28a71d9676c89ece774ef92947c3f 100644 --- a/inc/geshi/matlab.php +++ b/inc/geshi/matlab.php @@ -4,7 +4,7 @@ * ----------- * Author: Florian Knorn (floz@gmx.de) * Copyright: (c) 2004 Florian Knorn (http://www.florian-knorn.com) - * Release Version: 1.0.8.8 + * Release Version: 1.0.8.10 * Date Started: 2005/02/09 * * Matlab M-file language file for GeSHi. diff --git a/inc/geshi/mirc.php b/inc/geshi/mirc.php index 1b7df83aa0600fcadb1a94332aa3420beeff82db..e9e0346e6c1fcf16beb5bcb0dd48fe90326ce70a 100644 --- a/inc/geshi/mirc.php +++ b/inc/geshi/mirc.php @@ -4,7 +4,7 @@ * ----- * Author: Alberto 'Birckin' de Areba (Birckin@hotmail.com) * Copyright: (c) 2006 Alberto de Areba - * Release Version: 1.0.8.8 + * Release Version: 1.0.8.10 * Date Started: 2006/05/29 * * mIRC Scripting language file for GeSHi. diff --git a/inc/geshi/mmix.php b/inc/geshi/mmix.php index 3e90dce29d94b8fc8d55f013e304b71c09f2eb0f..8e57ad7b9bb30ab54666ac24e751d61ec96089fb 100644 --- a/inc/geshi/mmix.php +++ b/inc/geshi/mmix.php @@ -4,7 +4,7 @@ * ------- * Author: Benny Baumann (BenBE@geshi.org) * Copyright: (c) 2009 Benny Baumann (http://qbnz.com/highlighter/) - * Release Version: 1.0.8.8 + * Release Version: 1.0.8.10 * Date Started: 2009/10/16 * * MMIX Assembler language file for GeSHi. diff --git a/inc/geshi/modula2.php b/inc/geshi/modula2.php index 042e7404a373a1e3967dfff3156cf9f556b56e9f..131543baaacd1a5d090f6cbce19de2cb799f1187 100644 --- a/inc/geshi/modula2.php +++ b/inc/geshi/modula2.php @@ -4,7 +4,7 @@ * ----------- * Author: Benjamin Kowarsch (benjamin@modula2.net) * Copyright: (c) 2009 Benjamin Kowarsch (benjamin@modula2.net) - * Release Version: 1.0.8.8 + * Release Version: 1.0.8.10 * Date Started: 2009/11/05 * * Modula-2 language file for GeSHi. diff --git a/inc/geshi/modula3.php b/inc/geshi/modula3.php index ad827a3e6790d45fb79104f43fda6cd88713d967..21b2e255d8565c2813e8c8661a0b6db4240c63c9 100644 --- a/inc/geshi/modula3.php +++ b/inc/geshi/modula3.php @@ -4,7 +4,7 @@ * ---------- * Author: mbishop (mbishop@esoteriq.org) * Copyright: (c) 2009 mbishop (mbishop@esoteriq.org) - * Release Version: 1.0.8.8 + * Release Version: 1.0.8.10 * Date Started: 2009/01/21 * * Modula-3 language file for GeSHi. diff --git a/inc/geshi/mpasm.php b/inc/geshi/mpasm.php index 59247ff69a87fa8dfadc01916d1c072173514455..70f12de48fb1ab5a9c9f56701495190424d17754 100644 --- a/inc/geshi/mpasm.php +++ b/inc/geshi/mpasm.php @@ -4,7 +4,7 @@ * --------- * Author: Bakalex (bakalex@gmail.com) * Copyright: (c) 2004 Bakalex, Nigel McNie (http://qbnz.com/highlighter) - * Release Version: 1.0.8.8 + * Release Version: 1.0.8.10 * Date Started: 2004/12/6 * * Microchip Assembler language file for GeSHi. diff --git a/inc/geshi/mxml.php b/inc/geshi/mxml.php index df4c9d50e1e91b2c749db360be73862a0f387e0c..72a071aae39a3824a4f0ee2c39a8da1d2bc02ee5 100644 --- a/inc/geshi/mxml.php +++ b/inc/geshi/mxml.php @@ -4,7 +4,7 @@ * ------- * Author: David Spurr * Copyright: (c) 2007 David Spurr (http://www.defusion.org.uk/) - * Release Version: 1.0.8.8 + * Release Version: 1.0.8.10 * Date Started: 2007/10/04 * * MXML language file for GeSHi. Based on the XML file by Nigel McNie diff --git a/inc/geshi/mysql.php b/inc/geshi/mysql.php index ca171733f01a6bf487bf061168eb29439d38aa75..b85377d1cf2a45505b5a4980f0352498427a616b 100644 --- a/inc/geshi/mysql.php +++ b/inc/geshi/mysql.php @@ -4,7 +4,7 @@ * --------- * Author: Marjolein Katsma (marjolein.is.back@gmail.com) * Copyright: (c) 2008 Marjolein Katsma (http://blog.marjoleinkatsma.com/) - * Release Version: 1.0.8.8 + * Release Version: 1.0.8.10 * Date Started: 2008-12-12 * * MySQL language file for GeSHi. diff --git a/inc/geshi/newlisp.php b/inc/geshi/newlisp.php index 027e86588861a88e61b1545f6d22cd6e33937a77..508f116b7f693016ecd98b7221406a34ff387adb 100644 --- a/inc/geshi/newlisp.php +++ b/inc/geshi/newlisp.php @@ -4,7 +4,7 @@ * ---------- * Author: cormullion (cormullion@mac.com) Sept 2009 * Copyright: (c) 2009 Cormullion (http://unbalanced-parentheses.nfshost.com/) - * Release Version: 1.0.8.8 + * Release Version: 1.0.8.10 * Date Started: 2009/09/30 * * newLISP language file for GeSHi. diff --git a/inc/geshi/nsis.php b/inc/geshi/nsis.php index 5631a8389416ef4a68984da0dd2483b2ec226234..ab05ed82b5a81de0fd6c7703af425f8443b866c8 100644 --- a/inc/geshi/nsis.php +++ b/inc/geshi/nsis.php @@ -4,7 +4,7 @@ * -------- * Author: deguix (cevo_deguix@yahoo.com.br), Tux (http://tux.a4.cz/) * Copyright: (c) 2005 deguix, 2004 Tux (http://tux.a4.cz/), Nigel McNie (http://qbnz.com/highlighter) - * Release Version: 1.0.8.8 + * Release Version: 1.0.8.10 * Date Started: 2005/12/03 * * Nullsoft Scriptable Install System language file for GeSHi. diff --git a/inc/geshi/oberon2.php b/inc/geshi/oberon2.php index 8339f3fb88a522f69b0e29a9b6fdf7ae62c3f841..33b828df565453ed0b8f95be4d7361b806a2adb7 100644 --- a/inc/geshi/oberon2.php +++ b/inc/geshi/oberon2.php @@ -4,7 +4,7 @@ * ---------- * Author: mbishop (mbishop@esoteriq.org) * Copyright: (c) 2009 mbishop (mbishop@esoteriq.org) - * Release Version: 1.0.8.8 + * Release Version: 1.0.8.10 * Date Started: 2009/02/10 * * Oberon-2 language file for GeSHi. diff --git a/inc/geshi/objc.php b/inc/geshi/objc.php index 5a5c5940f91c2a9122fb4bdff857d57ac0f91533..3b2c593ef0296539af652d35a110972eecc81af1 100644 --- a/inc/geshi/objc.php +++ b/inc/geshi/objc.php @@ -5,7 +5,7 @@ * Author: M. Uli Kusterer (witness.of.teachtext@gmx.net) * Contributors: Quinn Taylor (quinntaylor@mac.com) * Copyright: (c) 2008 Quinn Taylor, 2004 M. Uli Kusterer, Nigel McNie (http://qbnz.com/highlighter/) - * Release Version: 1.0.8.8 + * Release Version: 1.0.8.10 * Date Started: 2004/06/04 * * Objective-C language file for GeSHi. diff --git a/inc/geshi/objeck.php b/inc/geshi/objeck.php new file mode 100644 index 0000000000000000000000000000000000000000..5ab3642e54d46f6295d5720d869cb027ca078abd --- /dev/null +++ b/inc/geshi/objeck.php @@ -0,0 +1,116 @@ +<?php +/************************************************************************************* + * objeck.php + * -------- + * Author: Randy Hollines (objeck@gmail.com) + * Copyright: (c) 2010 Randy Hollines (http://code.google.com/p/objeck-lang/) + * Release Version: 1.0.8.10 + * Date Started: 2010/07/01 + * + * Objeck Programming Language language file for GeSHi. + * + * CHANGES + * ------- + * 2010/07/26 (1.0.8.10) + * - Added new and missing keywords and symbols: 'String', 'each', '+=', '-=', '*=' and '/='. + * 2010/07/01 (1.0.8.9) + * - First Release + * + ************************************************************************************* + * + * This file is part of GeSHi. + * + * GeSHi is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * GeSHi is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with GeSHi; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + ************************************************************************************/ + +$language_data = array( + 'LANG_NAME' => 'Objeck Programming Language', + 'COMMENT_SINGLE' => array(1 => '#'), + 'COMMENT_MULTI' => array('#~' => '~#'), + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array('"'), + 'ESCAPE_CHAR' => '\\', + 'KEYWORDS' => array( + 1 => array( + 'virtual', 'if', 'else', 'do', 'while', 'use', 'bundle', 'native', + 'static', 'public', 'private', 'class', 'function', 'method', + 'select', 'other', 'enum', 'for', 'each', 'label', 'return', 'from' + ), + 2 => array( + 'Byte', 'Int', 'Nil', 'Float', 'Char', 'Bool', 'String' + ), + 3 => array( + 'true', 'false' + ) + ), + 'SYMBOLS' => array( + 1 => array( + '(', ')', '{', '}', '[', ']', '+', '-', '*', '/', '%', '=', '<', '>', '&', '|', ':', ';', ',', '+=', '-=', '*=', '/=', + ) + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => false, + 1 => true, + 2 => true, + 3 => true + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: #b1b100;', + 2 => 'color: #b1b100;', + 3 => 'color: #b1b100;' + ), + 'COMMENTS' => array( + 1 => 'color: #666666; font-style: italic;', + 'MULTI' => 'color: #666666; font-style: italic;' + ), + 'ESCAPE_CHAR' => array( + 0 => 'color: #000099; font-weight: bold;' + ), + 'BRACKETS' => array( + 0 => 'color: #009900;' + ), + 'STRINGS' => array( + 0 => 'color: #0000ff;' + ), + 'NUMBERS' => array( + 0 => 'color: #cc66cc;', + ), + 'METHODS' => array( + 0 => 'color: #004000;' + ), + 'SYMBOLS' => array( + 1 => 'color: #339933;' + ), + 'REGEXPS' => array(), + 'SCRIPT' => array() + ), + 'URLS' => array( + 1 => '', + 2 => '', + 3 => '' + ), + 'OOLANG' => true, + 'OBJECT_SPLITTERS' => array( + 1 => '->' + ), + 'REGEXPS' => array(), + 'STRICT_MODE_APPLIES' => GESHI_NEVER, + 'SCRIPT_DELIMITERS' => array(), + 'HIGHLIGHT_STRICT_BLOCK' => array() +); + +?> \ No newline at end of file diff --git a/inc/geshi/ocaml-brief.php b/inc/geshi/ocaml-brief.php index 2e2a82fb2aefede432d4e359a08487288144b304..d988409e8dbef4e4f5a58d39346835d56a43130a 100644 --- a/inc/geshi/ocaml-brief.php +++ b/inc/geshi/ocaml-brief.php @@ -4,7 +4,7 @@ * ---------- * Author: Flaie (fireflaie@gmail.com) * Copyright: (c) 2005 Flaie, Nigel McNie (http://qbnz.com/highlighter) - * Release Version: 1.0.8.8 + * Release Version: 1.0.8.10 * Date Started: 2005/08/27 * * OCaml (Objective Caml) language file for GeSHi. diff --git a/inc/geshi/ocaml.php b/inc/geshi/ocaml.php index 46e6a22aa80aad091a2f2543609036b9ce88e7d1..4e36f3c303d51f1efefdb068721b7ab90a1762ba 100644 --- a/inc/geshi/ocaml.php +++ b/inc/geshi/ocaml.php @@ -4,7 +4,7 @@ * ---------- * Author: Flaie (fireflaie@gmail.com) * Copyright: (c) 2005 Flaie, Nigel McNie (http://qbnz.com/highlighter) - * Release Version: 1.0.8.8 + * Release Version: 1.0.8.10 * Date Started: 2005/08/27 * * OCaml (Objective Caml) language file for GeSHi. diff --git a/inc/geshi/oobas.php b/inc/geshi/oobas.php index 6f6e13fc2f3d4a04af9027aea774e7e280999216..f4e15893a5d40f0ba932297496dc85666b22e78c 100644 --- a/inc/geshi/oobas.php +++ b/inc/geshi/oobas.php @@ -4,7 +4,7 @@ * --------- * Author: Roberto Rossi (rsoftware@altervista.org) * Copyright: (c) 2004 Roberto Rossi (http://rsoftware.altervista.org), Nigel McNie (http://qbnz.com/highlighter) - * Release Version: 1.0.8.8 + * Release Version: 1.0.8.10 * Date Started: 2004/08/30 * * OpenOffice.org Basic language file for GeSHi. diff --git a/inc/geshi/oracle11.php b/inc/geshi/oracle11.php index f57c3f04443467c164c6371f372d4cd0c7f8ee40..bd3d30501ba2e91209bea75cc82ac67699e37ed2 100644 --- a/inc/geshi/oracle11.php +++ b/inc/geshi/oracle11.php @@ -6,7 +6,7 @@ * Contributions: * - Updated for 11i by Simon Redhead * Copyright: (c) 2004 Nigel McNie (http://qbnz.com/highlighter) - * Release Version: 1.0.8.8 + * Release Version: 1.0.8.10 * Date Started: 2004/06/04 * * Oracle 11i language file for GeSHi. diff --git a/inc/geshi/oracle8.php b/inc/geshi/oracle8.php index e470e0dd471288b512dd495dc4fbd65e046a68bf..bc80735c4d7196f4ed527ff56cf78cf98664741a 100644 --- a/inc/geshi/oracle8.php +++ b/inc/geshi/oracle8.php @@ -4,7 +4,7 @@ * ----------- * Author: Guy Wicks (Guy.Wicks@rbs.co.uk) * Copyright: (c) 2004 Nigel McNie (http://qbnz.com/highlighter) - * Release Version: 1.0.8.8 + * Release Version: 1.0.8.10 * Date Started: 2004/06/04 * * Oracle 8 language file for GeSHi. diff --git a/inc/geshi/oxygene.php b/inc/geshi/oxygene.php index 3af03bfc2c4932f7117607991b7e8bbbeaa066f0..cfab3d34f28ab42f0a4f43ba8a749b273d938979 100644 --- a/inc/geshi/oxygene.php +++ b/inc/geshi/oxygene.php @@ -4,7 +4,7 @@ * ---------- * Author: Carlo Kok (ck@remobjects.com), J�rja Norbert (jnorbi@vipmail.hu), Benny Baumann (BenBE@omorphia.de) * Copyright: (c) 2004 J�rja Norbert, Benny Baumann (BenBE@omorphia.de), Nigel McNie (http://qbnz.com/highlighter) - * Release Version: 1.0.8.8 + * Release Version: 1.0.8.10 * Date Started: 2010/01/11 * * Delphi Prism (Oxygene) language file for GeSHi. diff --git a/inc/geshi/oz.php b/inc/geshi/oz.php index cd594d4cafae3970e307ebf59ef64cca03c73f25..f371a6457e037e491886d0bc7b83573d1b5b035e 100644 --- a/inc/geshi/oz.php +++ b/inc/geshi/oz.php @@ -4,7 +4,7 @@ * -------- * Author: Wolfgang Meyer (Wolfgang.Meyer@gmx.net) * Copyright: (c) 2010 Wolfgang Meyer - * Release Version: 1.0.8.8 + * Release Version: 1.0.8.10 * Date Started: 2010/01/03 * * Oz language file for GeSHi. diff --git a/inc/geshi/pascal.php b/inc/geshi/pascal.php index 7ee5729a6a5a4a4c452c51ae36d4409780113dac..2252a11defecadc1b9ef5778639a4007aa331b79 100644 --- a/inc/geshi/pascal.php +++ b/inc/geshi/pascal.php @@ -4,7 +4,7 @@ * ---------- * Author: Tux (tux@inamil.cz) * Copyright: (c) 2004 Tux (http://tux.a4.cz/), Nigel McNie (http://qbnz.com/highlighter) - * Release Version: 1.0.8.8 + * Release Version: 1.0.8.10 * Date Started: 2004/07/26 * * Pascal language file for GeSHi. diff --git a/inc/geshi/pcre.php b/inc/geshi/pcre.php index a67cf2858dc3060e0c5ab45f2f861232d4c9862c..1944bfdb3bbedc53e59b1b10a5eca1799da165c6 100644 --- a/inc/geshi/pcre.php +++ b/inc/geshi/pcre.php @@ -4,7 +4,7 @@ * -------- * Author: Benny Baumann (BenBE@geshi.org) * Copyright: (c) 2010 Benny Baumann (http://qbnz.com/highlighter/) - * Release Version: 1.0.8.8 + * Release Version: 1.0.8.10 * Date Started: 2010/05/22 * * PCRE language file for GeSHi. diff --git a/inc/geshi/per.php b/inc/geshi/per.php index b656c105e669ef4f3327bbac593334c50fa9e627..9819c03f5982170028df39a1278f7d938e935dd5 100644 --- a/inc/geshi/per.php +++ b/inc/geshi/per.php @@ -4,7 +4,7 @@ * -------- * Author: Lars Gersmann (lars.gersmann@gmail.com) * Copyright: (c) 2007 Lars Gersmann - * Release Version: 1.0.8.8 + * Release Version: 1.0.8.10 * Date Started: 2007/06/03 * * Per (forms) (FOURJ's Genero 4GL) language file for GeSHi. diff --git a/inc/geshi/perl.php b/inc/geshi/perl.php index 5d1c4320bc16e5cd9079dc93e4f9bffe2f530f11..487fd0515d313bca4af04b3c7767de61faf45320 100644 --- a/inc/geshi/perl.php +++ b/inc/geshi/perl.php @@ -4,7 +4,7 @@ * -------- * Author: Andreas Gohr (andi@splitbrain.org), Ben Keen (ben.keen@gmail.com) * Copyright: (c) 2004 Andreas Gohr, Ben Keen (http://www.benjaminkeen.org/), Nigel McNie (http://qbnz.com/highlighter/) - * Release Version: 1.0.8.8 + * Release Version: 1.0.8.10 * Date Started: 2004/08/20 * * Perl language file for GeSHi. diff --git a/inc/geshi/perl6.php b/inc/geshi/perl6.php index 9ea20fc78c8220fd11dd2ba051a583d8d2634d01..701e0b59c5579faed0c3400a165e5084f0218ca7 100644 --- a/inc/geshi/perl6.php +++ b/inc/geshi/perl6.php @@ -4,7 +4,7 @@ * --------- * Author: Kodi Arfer (kodiarfer {at} warpmail {period} net); forked from perl.php 1.0.8 by Andreas Gohr (andi@splitbrain.org), Ben Keen (ben.keen@gmail.com) * Copyright: (c) 2009 Kodi Arfer, (c) 2004 Andreas Gohr, Ben Keen (http://www.benjaminkeen.org/), Nigel McNie (http://qbnz.com/highlighter/) - * Release Version: 1.0.8.8 + * Release Version: 1.0.8.10 * Date Started: 2009/11/07 * * Perl 6 language file for GeSHi. diff --git a/inc/geshi/pf.php b/inc/geshi/pf.php index d59a609d59d6c0d09983d507f596f1166e1bc3d1..a89e97ff0b5e6cbd31ebc0571af96584fc2f0c14 100644 --- a/inc/geshi/pf.php +++ b/inc/geshi/pf.php @@ -4,7 +4,7 @@ * -------- * Author: David Berard (david@nfrance.com) * Copyright: (c) 2010 Benny Baumann (http://qbnz.com/highlighter/) - * Release Version: 1.0.8.8 + * Release Version: 1.0.8.10 * Date Started: 2009/10/16 * Based on bash.php * diff --git a/inc/geshi/php-brief.php b/inc/geshi/php-brief.php index c28d985f413c9a6732e03ce676723be579356940..d47737883c003cd2c4513bb8b89d0049aeb3a278 100644 --- a/inc/geshi/php-brief.php +++ b/inc/geshi/php-brief.php @@ -4,7 +4,7 @@ * ------------- * Author: Nigel McNie (nigel@geshi.org) * Copyright: (c) 2004 Nigel McNie (http://qbnz.com/highlighter/) - * Release Version: 1.0.8.8 + * Release Version: 1.0.8.10 * Date Started: 2004/06/02 * * PHP (brief version) language file for GeSHi. diff --git a/inc/geshi/php.php b/inc/geshi/php.php index ec6981134d8b8436b4cf8cd3ee1a22e4995cf22f..b36544213fae05f99640cbf02afecf9095f9bf24 100644 --- a/inc/geshi/php.php +++ b/inc/geshi/php.php @@ -4,7 +4,7 @@ * -------- * Author: Nigel McNie (nigel@geshi.org) * Copyright: (c) 2004 Nigel McNie (http://qbnz.com/highlighter/) - * Release Version: 1.0.8.8 + * Release Version: 1.0.8.10 * Date Started: 2004/06/20 * * PHP language file for GeSHi. diff --git a/inc/geshi/pic16.php b/inc/geshi/pic16.php index 626a768b0ae777de17fbf91696093ceae48ce0d9..94e09829365078e2857db1555e5f58a267a00810 100644 --- a/inc/geshi/pic16.php +++ b/inc/geshi/pic16.php @@ -4,7 +4,7 @@ * ------- * Author: Phil Mattison (mattison@ohmikron.com) * Copyright: (c) 2008 Ohmikron Corp. (http://www.ohmikron.com/) - * Release Version: 1.0.8.8 + * Release Version: 1.0.8.10 * Date Started: 2008/07/30 * * PIC16 Assembler language file for GeSHi. diff --git a/inc/geshi/pike.php b/inc/geshi/pike.php index 2b860ccd6af2f78e06b14355b384e570404a5eae..a3de9082e0cd3acc25332c2584e6ad7cacd420ba 100644 --- a/inc/geshi/pike.php +++ b/inc/geshi/pike.php @@ -4,7 +4,7 @@ * -------- * Author: Rick E. (codeblock@eighthbit.net) * Copyright: (c) 2009 Rick E. - * Release Version: 1.0.8.8 + * Release Version: 1.0.8.10 * Date Started: 2009/12/10 * * Pike language file for GeSHi. diff --git a/inc/geshi/pixelbender.php b/inc/geshi/pixelbender.php index 82c64ae52cd3f58869b34dbe312bdd2564005277..b9fe1aff2b74d21b7913b3a248d1d93d99f2b5dd 100644 --- a/inc/geshi/pixelbender.php +++ b/inc/geshi/pixelbender.php @@ -4,7 +4,7 @@ * ---------------- * Author: Richard Olsson (r@richardolsson.se) * Copyright: (c) 2008 Richard Olsson (richardolsson.se) - * Release Version: 1.0.8.8 + * Release Version: 1.0.8.10 * Date Started: 2008/11/16 * * Pixel Bender 1.0 language file for GeSHi. diff --git a/inc/geshi/pli.php b/inc/geshi/pli.php new file mode 100644 index 0000000000000000000000000000000000000000..1d6eefd9b9c468344fddc1eaabdd7cc18031a349 --- /dev/null +++ b/inc/geshi/pli.php @@ -0,0 +1,200 @@ +<?php +/************************************************************************************* + * pli.php + * -------- + * Author: Robert AH Prins (robert@prino.org) + * Copyright: (c) 2011 Robert AH Prins (http://hitchwiki.org/en/User:Prino) + * Release Version: 1.0.8.10 + * Date Started: 2011/02/09 + * + * PL/I language file for GeSHi. + * + * CHANGES + * ------- + * 2011/02/09 (1.0.8.10) + * - First Release - machine(ish) generated by http://rosettacode.org/geshi/ + * + * TODO (updated 2011/02/09) + * ------------------------- + * + * + ************************************************************************************* + * + * This file is part of GeSHi. + * + * GeSHi is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * GeSHi is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with GeSHi; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + ************************************************************************************/ + +$language_data = array( + 'LANG_NAME' => 'PL/I', + 'COMMENT_SINGLE' => array(), + 'COMMENT_MULTI' => array('/*' => '*/'), + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array('"', '\''), + 'ESCAPE_CHAR' => '', + 'KEYWORDS' => array( + 1 => array( + 'abnormal', 'abs', 'acos', 'acosf', 'add', 'addbuff', 'addr', + 'addrdata', 'alias', 'aligned', 'all', 'alloc', 'allocate', + 'allocation', 'allocn', 'allocsize', 'any', 'anycondition', 'area', + 'ascii', 'asin', 'asinf', 'asm', 'asmtdli', 'assembler', + 'assignable', 'atan', 'atand', 'atanf', 'atanh', 'attach', + 'attention', 'attn', 'auto', 'automatic', 'availablearea', + 'backwards', 'based', 'begin', 'bigendian', 'bin', 'binary', + 'binaryvalue', 'bind', 'binvalue', 'bit', 'bitloc', 'bitlocation', + 'bkwd', 'blksize', 'bool', 'buf', 'buffered', 'buffers', 'bufnd', + 'bufni', 'bufoff', 'bufsp', 'builtin', 'bx', 'by', 'byaddr', 'byte', + 'byvalue', 'b4', 'call', 'cast', 'cds', 'ceil', 'center', + 'centerleft', 'centerright', 'centre', 'centreleft', 'centreright', + 'char', 'character', 'charg', 'chargraphic', 'charval', 'check', + 'checkstg', 'close', 'cmpat', 'cobol', 'col', 'collate', 'column', + 'comment', 'compare', 'compiledate', 'compiletime', 'completion', + 'complex', 'cond', 'condition', 'conjg', 'conn', 'connected', + 'consecutive', 'controlled', 'conv', 'conversion', 'copy', 'cos', + 'cosd', 'cosf', 'cosh', 'count', 'counter', 'cpln', 'cplx', 'cs', + 'cstg', 'ctl', 'ctlasa', 'ctl360', 'currentsize', 'currentstorage', + 'data', 'datafield', 'date', 'datetime', 'days', 'daystodate', + 'daystosecs', 'db', 'dcl', 'dec', 'decimal', 'declare', 'def', + 'default', 'define', 'defined', 'delay', 'delete', 'descriptor', + 'descriptors', 'detach', 'dft', 'dim', 'dimacross', 'dimension', + 'direct', 'display', 'divide', 'do', 'downthru', 'edit', 'else', + 'empty', 'end', 'endfile', 'endpage', 'entry', 'entryaddr', 'env', + 'environment', 'epsilon', 'erf', 'erfc', 'error', 'event', 'excl', + 'exclusive', 'exit', 'exp', 'expf', 'exponent', 'exports', 'ext', + 'external', 'fb', 'fbs', 'fetch', 'file', 'fileddint', 'fileddtest', + 'fileddword', 'fileid', 'fileopen', 'fileread', 'fileseek', + 'filetell', 'filewrite', 'finish', 'first', 'fixed', 'fixedbin', + 'fixeddec', 'fixedoverflow', 'float', 'floatbin', 'floatdec', + 'floor', 'flush', 'fofl', 'format', 'fortran', 'free', 'from', + 'fromalien', 'fs', 'gamma', 'generic', 'genkey', 'get', 'getenv', + 'go', 'goto', 'graphic', 'gx', 'handle', 'hbound', 'hex', 'hexadec', + 'heximage', 'high', 'huge', 'iand', 'ieee', 'ieor', 'if', 'ignore', + 'imag', 'in', 'index', 'indexarea', 'indexed', 'init', 'initial', + 'inline', 'inonly', 'inot', 'inout', 'input', 'int', 'inter', + 'internal', 'into', 'invalidop', 'ior', 'irred', 'irreducible', + 'isfinite', 'isigned', 'isinf', 'isll', 'ismain', 'isnan', + 'isnormal', 'isrl', 'iszero', 'iunsigned', 'key', 'keyed', + 'keyfrom', 'keylength', 'keyloc', 'keyto', 'label', 'last', + 'lbound', 'leave', 'left', 'length', 'like', 'limited', 'line', + 'lineno', 'linesize', 'linkage', 'list', 'littleendian', 'loc', + 'locate', 'location', 'log', 'logf', 'loggamma', 'log10', 'log10f', + 'log2', 'low', 'lowercase', 'lower2', 'maccol', 'maclmar', + 'macname', 'macrmar', 'main', 'max', 'maxexp', 'maxlength', + 'memconvert', 'memcu12', 'memcu14', 'memcu21', 'memcu24', 'memcu41', + 'memcu42', 'memindex', 'memsearch', 'memsearchr', 'memverify', + 'memverifyr', 'min', 'minexp', 'mod', 'mpstr', 'multiply', 'name', + 'native', 'ncp', 'new', 'nocharg', 'nochargraphic', 'nocheck', + 'nocmpat', 'noconv', 'noconversion', 'nodescriptor', 'noexecops', + 'nofixedoverflow', 'nofofl', 'noinline', 'nolock', 'nomap', + 'nomapin', 'nomapout', 'nonasgn', 'nonassignable', 'nonconnected', + 'nonnative', 'noofl', 'nooverflow', 'norescan', 'normal', 'nosize', + 'nostrg', 'nostringrange', 'nostringsize', 'nostrz', 'nosubrg', + 'nosubscriptrange', 'noufl', 'nounderflow', 'nowrite', 'nozdiv', + 'nozerodivide', 'null', 'offset', 'offsetadd', 'offsetdiff', + 'offsetsubtract', 'offsetvalue', 'ofl', 'omitted', 'on', 'onarea', + 'onchar', 'oncode', 'oncondcond', 'oncondid', 'oncount', 'onfile', + 'ongsource', 'onkey', 'online', 'onloc', 'onoffset', 'onsource', + 'onsubcode', 'onwchar', 'onwsource', 'open', 'optional', 'options', + 'order', 'ordinal', 'ordinalname', 'ordinalpred', 'ordinalsucc', + 'other', 'otherwise', 'outonly', 'output', 'overflow', 'package', + 'packagename', 'page', 'pageno', 'pagesize', 'parameter', 'parmset', + 'password', 'pending', 'pic', 'picspec', 'picture', 'places', + 'pliascii', 'plicanc', 'plickpt', 'plidelete', 'plidump', + 'pliebcdic', 'plifill', 'plifree', 'plimove', 'pliover', 'plirest', + 'pliretc', 'pliretv', 'plisaxa', 'plisaxb', 'plisaxc', 'plisaxd', + 'plisrta', 'plisrtb', 'plisrtc', 'plisrtd', 'plitdli', 'plitran11', + 'plitran12', 'plitran21', 'plitran22', 'pointer', 'pointeradd', + 'pointerdiff', 'pointersubtract', 'pointervalue', 'poly', 'pos', + 'position', 'prec', 'precision', 'pred', 'present', 'print', + 'priority', 'proc', 'procedure', 'procedurename', 'procname', + 'prod', 'ptr', 'ptradd', 'ptrdiff', 'ptrsubtract', 'ptrvalue', + 'put', 'putenv', 'quote', 'radix', 'raise2', 'random', 'range', + 'rank', 'read', 'real', 'record', 'recsize', 'recursive', 'red', + 'reducible', 'reentrant', 'refer', 'regional', 'reg12', 'release', + 'rem', 'reorder', 'repattern', 'repeat', 'replaceby2', 'reply', + 'reread', 'rescan', 'reserved', 'reserves', 'resignal', 'respec', + 'retcode', 'return', 'returns', 'reuse', 'reverse', 'revert', + 'rewrite', 'right', 'round', 'rounddec', 'samekey', 'scalarvarying', + 'scale', 'search', 'searchr', 'secs', 'secstodate', 'secstodays', + 'select', 'seql', 'sequential', 'serialize4', 'set', 'sign', + 'signal', 'signed', 'sin', 'sind', 'sinf', 'sinh', 'sis', 'size', + 'skip', 'snap', 'sourcefile', 'sourceline', 'sqrt', 'sqrtf', + 'stackaddr', 'statement', 'static', 'status', 'stg', 'stmt', 'stop', + 'storage', 'stream', 'strg', 'string', 'stringrange', 'stringsize', + 'structure', 'strz', 'subrg', 'subscriptrange', 'substr', + 'subtract', 'succ', 'sum', 'suppress', 'sysin', 'sysnull', + 'sysparm', 'sysprint', 'system', 'sysversion', 'tally', 'tan', + 'tand', 'tanf', 'tanh', 'task', 'then', 'thread', 'threadid', + 'time', 'tiny', 'title', 'to', 'total', 'tpk', 'tpm', 'transient', + 'translate', 'transmit', 'trim', 'trkofl', 'trunc', 'type', 'ufl', + 'ulength', 'ulength16', 'ulength8', 'unal', 'unaligned', + 'unallocated', 'unbuf', 'unbuffered', 'undefinedfile', 'underflow', + 'undf', 'unlock', 'unsigned', 'unspec', 'until', 'update', 'upos', + 'uppercase', 'upthru', 'usubstr', 'usurrogate', 'uvalid', 'uwidth', + 'valid', 'validdate', 'value', 'var', 'varglist', 'vargsize', + 'variable', 'varying', 'varyingz', 'vb', 'vbs', 'verify', 'verifyr', + 'vs', 'vsam', 'wait', 'wchar', 'wcharval', 'weekday', 'when', + 'whigh', 'while', 'widechar', 'wlow', 'write', 'xmlchar', 'y4date', + 'y4julian', 'y4year', 'zdiv', 'zerodivide' + ) + ), + 'SYMBOLS' => array( + 1 => array( + '+', '-', '*', '/', '=', '<', '>', '&', '^', '|', ':', '(', ')', ';', ',' + ) + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => false, + 1 => false + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: #b1b100;' + ), + 'COMMENTS' => array( + 'MULTI' => 'color: #666666; font-style: italic;' + ), + 'ESCAPE_CHAR' => array( + 0 => 'color: #000099; font-weight: bold;' + ), + 'BRACKETS' => array( + 0 => 'color: #009900;' + ), + 'STRINGS' => array( + 0 => 'color: #0000ff;' + ), + 'NUMBERS' => array( + 0 => 'color: #cc66cc;', + ), + 'METHODS' => array( + 0 => 'color: #004000;' + ), + 'SYMBOLS' => array( + 1 => 'color: #339933;' + ), + 'REGEXPS' => array(), + 'SCRIPT' => array() + ), + 'URLS' => array(1 => ''), + 'OOLANG' => true, + 'OBJECT_SPLITTERS' => array(1 => '.'), + 'REGEXPS' => array(), + 'STRICT_MODE_APPLIES' => GESHI_NEVER, + 'SCRIPT_DELIMITERS' => array(), + 'HIGHLIGHT_STRICT_BLOCK' => array() +); + +?> \ No newline at end of file diff --git a/inc/geshi/plsql.php b/inc/geshi/plsql.php index e0145362cf35f4d47a7fd0d582783cf9a473a33e..8428ff4b6745ccec06a88151d06df660b5f200cd 100644 --- a/inc/geshi/plsql.php +++ b/inc/geshi/plsql.php @@ -4,7 +4,7 @@ * ------- * Author: Victor Engmark <victor.engmark@gmail.com> * Copyright: (c) 2006 Victor Engmark (http://l0b0.net/) - * Release Version: 1.0.8.8 + * Release Version: 1.0.8.10 * Date Started: 2006/10/26 * * Oracle 9.2 PL/SQL language file for GeSHi. diff --git a/inc/geshi/postgresql.php b/inc/geshi/postgresql.php index 7f89fe2a4790851eecafb6cd1d375078bd359cf6..0245b33adf3329f2d2920dec831f48adf5966c4c 100644 --- a/inc/geshi/postgresql.php +++ b/inc/geshi/postgresql.php @@ -5,7 +5,7 @@ * Author: Christophe Chauvet (christophe_at_kryskool_dot_org) * Contributors: Leif Biberg Kristensen <leif_at_solumslekt_dot_org> 2010-05-03 * Copyright: (c) 2007 Christophe Chauvet (http://kryskool.org/), Nigel McNie (http://qbnz.com/highlighter) - * Release Version: 1.0.8.8 + * Release Version: 1.0.8.10 * Date Started: 2007/07/20 * * PostgreSQL language file for GeSHi. diff --git a/inc/geshi/povray.php b/inc/geshi/povray.php index c987a013e246964c95b98c376b4a82bbfe4220cd..eeda49f49cdb2901f27021b557322e0a90be420d 100644 --- a/inc/geshi/povray.php +++ b/inc/geshi/povray.php @@ -4,7 +4,7 @@ * -------- * Author: Carl Fürstenberg (azatoth@gmail.com) * Copyright: © 2007 Carl Fürstenberg - * Release Version: 1.0.8.8 + * Release Version: 1.0.8.10 * Date Started: 2008/07/11 * * Povray language file for GeSHi. diff --git a/inc/geshi/powerbuilder.php b/inc/geshi/powerbuilder.php index ef86c242c3828c3886cfcc9762f2bfd0eee27f62..f978f3f5ba8c6ec39aede2ca3bf3b56014c72dac 100644 --- a/inc/geshi/powerbuilder.php +++ b/inc/geshi/powerbuilder.php @@ -4,7 +4,7 @@ * ------ * Author: Doug Porter (powerbuilder.geshi@gmail.com) * Copyright: (c) 2009 Doug Porter - * Release Version: 1.0.8.8 + * Release Version: 1.0.8.10 * Date Started: 2009/07/13 * * PowerBuilder (PowerScript) language file for GeSHi. diff --git a/inc/geshi/powershell.php b/inc/geshi/powershell.php index c905388091589332f1a3653b99e7bf28cc5a6beb..1d90030305cd3bb1644253cff58c7295fef67afc 100644 --- a/inc/geshi/powershell.php +++ b/inc/geshi/powershell.php @@ -4,7 +4,7 @@ * --------------------------------- * Author: Frode Aarebrot (frode@aarebrot.net) * Copyright: (c) 2008 Frode Aarebrot (http://www.aarebrot.net) - * Release Version: 1.0.8.8 + * Release Version: 1.0.8.10 * Date Started: 2008/06/20 * * PowerShell language file for GeSHi. diff --git a/inc/geshi/proftpd.php b/inc/geshi/proftpd.php new file mode 100644 index 0000000000000000000000000000000000000000..dd57d9b0a3b0dee18fb1cd3898befc7e1339cd8b --- /dev/null +++ b/inc/geshi/proftpd.php @@ -0,0 +1,374 @@ +<?php +/************************************************************************************* + * proftpd.php + * ---------- + * Author: Benny Baumann (BenBE@geshi.org) + * Copyright: (c) 2010 Benny Baumann (http://qbnz.com/highlighter) + * Release Version: 1.0.8.10 + * Date Started: 2011/01/25 + * + * ProFTPd language file for GeSHi. + * Words are scraped from their documentation + * + * CHANGES + * ------- + * 2004/08/05 (1.0.8.10) + * - First Release + * + * TODO (updated 2011/01/25) + * ------------------------- + * + ************************************************************************************* + * + * This file is part of GeSHi. + * + * GeSHi is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * GeSHi is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with GeSHi; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + ************************************************************************************/ + +$language_data = array ( + 'LANG_NAME' => 'ProFTPd configuration', + 'COMMENT_SINGLE' => array(1 => '#'), + 'COMMENT_MULTI' => array(), + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array("'", '"'), + 'ESCAPE_CHAR' => '\\', + 'KEYWORDS' => array( + /*keywords*/ + 1 => array( + //mod_auth + 'AccessDenyMsg', 'AccessGrantMsg', 'AnonRejectePasswords', + 'AnonRequirePassword', 'AuthAliasOnly', 'AuthUsingAlias', + 'CreateHome', 'DefaultChdir', 'DefaultRoot', 'GroupPassword', + 'LoginPasswordPrompt', 'MaxClients', 'MaxClientsPerClass', + 'MaxClientsPerHost', 'MaxClientsPerUser', 'MaxConnectionsPerHost', + 'MaxHostsPerUser', 'MaxLoginAttempts', 'RequireValidShell', + 'RootLogin', 'RootRevoke', 'TimeoutLogin', 'TimeoutSession', + 'UseFtpUsers', 'UserAlias', 'UserDirRoot', 'UserPassword', + + //mod_auth_file + 'AuthGroupFile', 'AuthUserFile', + + //mod_auth_pam + 'AuthPAM', 'AuthPAMConfig', + + //mod_auth_unix + 'PersistentPasswd', + + //mod_ban + 'BanControlsACLs', 'BanEngine', 'BanLog', 'BanMessage', 'BanOnEvent', + 'BanTable', + + //mod_cap + 'CapabilitiesEngine', 'CapabilitiesSet', + + //mod_core + 'Allow', 'AllowAll', 'AllowClass', 'AllowFilter', + 'AllowForeignAddress', 'AllowGroup', 'AllowOverride', + 'AllowRetrieveRestart', 'AllowStoreRestart', 'AllowUser', + 'AnonymousGroup', 'AuthOrder', 'Bind', 'CDPath', 'Class', 'Classes', + 'CommandBufferSize', 'DebugLevel', 'DefaultAddress', + 'DefaultServer', 'DefaultTransferMode', 'DeferWelcome', 'Define', + 'Deny', 'DenyAll', 'DenyClass', 'DenyFilter', 'DenyGroup', + 'DenyUser', 'DisplayChdir', 'DisplayConnect', 'DisplayFirstChdir', + 'DisplayGoAway', 'DisplayLogin', 'DisplayQuit', 'From', 'Group', + 'GroupOwner', 'HideFiles', 'HideGroup', 'HideNoAccess', 'HideUser', + 'IdentLookups', 'IgnoreHidden', 'Include', 'MasqueradeAddress', + 'MaxConnectionRate', 'MaxInstances', 'MultilineRFC2228', 'Order', + 'PassivePorts', 'PathAllowFilter', 'PathDenyFilter', 'PidFile', + 'Port', 'RLimitCPU', 'RLimitMemory', 'RLimitOpenFiles', 'Satisfy', + 'ScoreboardFile', 'ServerAdmin', 'ServerIdent', 'ServerName', + 'ServerType', 'SetEnv', 'SocketBindTight', 'SocketOptions', + 'SyslogFacility', 'SyslogLevel', 'tcpBackLog', 'tcpNoDelay', + 'TimeoutIdle', 'TimeoutLinger', 'TimesGMT', 'TransferLog', 'Umask', + 'UnsetEnv', 'UseIPv6', 'User', 'UseReverseDNS', 'UserOwner', + 'UseUTF8', 'WtmpLog', + + //mod_ctrls_admin + 'AdminControlsACLs', 'AdminControlsEngine', + + //mod_delay + 'DelayEngine', 'DelayTable', + + //mod_dynmasq + 'DynMasqRefresh', + + //mod_exec + 'ExecBeforeCommand', 'ExecEngine', 'ExecEnviron', 'ExecLog', + 'ExecOnCommand', 'ExecOnConnect', 'ExecOnError', 'ExecOnEvent', + 'ExecOnExit', 'ExecOnRestart', 'ExecOptions', 'ExecTimeout', + + //mod_ldap + 'LDAPAliasDereference', 'LDAPAttr', 'LDAPAuthBinds', + 'LDAPDefaultAuthScheme', 'LDAPDefaultGID', 'LDAPDefaultUID', + 'LDAPDNInfo', 'LDAPDoAuth', 'LDAPDoGIDLookups', + 'LDAPDoQuotaLookups', 'LDAPDoUIDLookups', + 'LDAPForceGeneratedHomedir', 'LDAPForceHomedirOnDemand', + 'LDAPGenerateHomedir', 'LDAPGenerateHomedirPrefix', + 'LDAPGenerateHomedirPrefixNoUsername', 'LDAPHomedirOnDemand', + 'LDAPHomedirOnDemandPrefix', 'LDAPHomedirOnDemandPrefixNoUsername', + 'LDAPHomedirOnDemandSuffix', 'LDAPNegativeCache', + 'LDAPProtocolVersion', 'LDAPQueryTimeout', 'LDAPSearchScope', + 'LDAPServer', + + //mod_load + 'MaxLoad', + + //mod_log + 'AllowLogSymlinks', 'ExtendedLog', 'LogFormat', 'ServerLog', + 'SystemLog', + + //mod_ls' + 'DirFakeGroup', 'DirFakeMode', 'DirFakeUser', 'ListOptions', + 'ShowSymlinks', 'UseGlobbing', + + //mod_quotatab + 'QuotaDirectoryTally', 'QuotaDisplayUnits', 'QuotaEngine', + 'QuotaExcludeFilter', 'QuotaLimitTable', 'QuotaLock', 'QuotaLog', + 'QuotaOptions', 'QuotaShowQuotas', 'QuotaTallyTable', + + //mod_quotatab_file + + //mod_quotatab_ldap + + //mod_quotatab_sql + + //mod_radius + 'RadiusAcctServer', 'RadiusAuthServer', 'RadiusEngine', + 'RadiusGroupInfo', 'RadiusLog', 'RadiusNASIdentifier', + 'RadiusQuotaInfo', 'RadiusRealm', 'RadiusUserInfo', 'RadiusVendor', + + //mod_ratio + 'AnonRatio', 'ByteRatioErrMsg', 'CwdRatioMsg', 'FileRatioErrMsg', + 'GroupRatio', 'HostRatio', 'LeechRatioMsg', 'RatioFile', 'Ratios', + 'RatioTempFile', 'SaveRatios', 'UserRatio', + + //mod_readme + 'DisplayReadme', + + //mod_rewrite + 'RewriteCondition', 'RewriteEngine', 'RewriteLock', 'RewriteLog', + 'RewriteMap', 'RewriteRule', + + //mod_sftp + 'SFTPAcceptEnv', 'SFTPAuthMethods', 'SFTPAuthorizedHostKeys', + 'SFTPAuthorizedUserKeys', 'SFTPCiphers', 'SFTPClientMatch', + 'SFTPCompression', 'SFTPCryptoDevice', 'SFTPDHParamFile', + 'SFTPDigests', 'SFTPDisplayBanner', 'SFTPEngine', 'SFTPExtensions', + 'SFTPHostKey', 'SFTPKeyBlacklist', 'SFTPKeyExchanges', 'SFTPLog', + 'SFTPMaxChannels', 'SFTPOptions', 'SFTPPassPhraseProvider', + 'SFTPRekey', 'SFTPTrafficPolicy', + + //mod_sftp_pam + 'SFTPPAMEngine', 'SFTPPAMOptions', 'SFTPPAMServiceName', + + //mod_sftp_sql + + //mod_shaper + 'ShaperAll', 'ShaperControlsACLs', 'ShaperEngine', 'ShaperLog', + 'ShaperSession', 'ShaperTable', + + //mod_sql + 'SQLAuthenticate', 'SQLAuthTypes', 'SQLBackend', 'SQLConnectInfo', + 'SQLDefaultGID', 'SQLDefaultHomedir', 'SQLDefaultUID', 'SQLEngine', + 'SQLGroupInfo', 'SQLGroupWhereClause', 'SQLHomedirOnDemand', + 'SQLLog', 'SQLLogFile', 'SQLMinID', 'SQLMinUserGID', + 'SQLMinUserUID', 'SQLNamedQuery', 'SQLNegativeCache', 'SQLOptions', + 'SQLRatios', 'SQLRatioStats', 'SQLShowInfo', 'SQLUserInfo', + 'SQLUserWhereClause', + + //mod_sql_passwd + 'SQLPasswordEncoding', 'SQLPasswordEngine', 'SQLPasswordSaltFile', + 'SQLPasswordUserSalt', + + //mod_tls + 'TLSCACertificateFile', 'TLSCACertificatePath', + 'TLSCARevocationFile', 'TLSCARevocationPath', + 'TLSCertificateChainFile', 'TLSCipherSuite', 'TLSControlsACLs', + 'TLSCryptoDevice', 'TLSDHParamFile', 'TLSDSACertificateFile', + 'TLSDSACertificateKeyFile', 'TLSEngine', 'TLSLog', 'TLSOptions', + 'TLSPKCS12File', 'TLSPassPhraseProvider', 'TLSProtocol', + 'TLSRandomSeed', 'TLSRenegotiate', 'TLSRequired', + 'TLSRSACertificateFile', 'TLSRSACertificateKeyFile', + 'TLSSessionCache', 'TLSTimeoutHandshake', 'TLSVerifyClient', + 'TLSVerifyDepth', 'TLSVerifyOrder', + + //mod_tls_shmcache + + //mod_unique_id + 'UniqueIDEngine', + + //mod_wrap + 'TCPAccessFiles', 'TCPAccessSyslogLevels', 'TCPGroupAccessFiles', + 'TCPServiceName', 'TCPUserAccessFiles', + + //mod_wrap2 + 'WrapAllowMsg', 'WrapDenyMsg', 'WrapEngine', 'WrapGroupTables', + 'WrapLog', 'WrapServiceName', 'WrapTables', 'WrapUserTables', + + //mod_wrap2_file + + //mod_wrap2_sql + + //mod_xfer + 'AllowOverwrite', 'DeleteAbortedStores', 'DisplayFileTransfer', + 'HiddenStor', 'HiddenStores', 'MaxRetrieveFileSize', + 'MaxStoreFileSize', 'StoreUniquePrefix', 'TimeoutNoTransfer', + 'TimeoutStalled', 'TransferRate', 'UseSendfile', + + //unknown + 'ScoreboardPath', 'ScoreboardScrub' + ), + /*keywords 3*/ + 3 => array( + //mod_core + 'Anonymous', + 'Class', + 'Directory', + 'IfDefine', + 'IfModule', + 'Limit', + 'VirtualHost', + + //mod_ifsession + 'IfClass', 'IfGroup', 'IfUser', + + //mod_version + 'IfVersion' + ), + /*permissions*/ + 4 => array( + //mod_core + 'ALL', + 'CDUP', + 'CMD', + 'CWD', + 'DELE', + 'DIRS', + 'LOGIN', + 'MKD', + 'READ', + 'RETR', + 'RMD', + 'RNFR', + 'RNTO', + 'STOR', + 'WRITE', + 'XCWD', + 'XMKD', + 'XRMD', + + //mod_copy + 'SITE_CPFR', 'SITE_CPTO', + + //mod_quotatab + 'SITE_QUOTA', + + //mod_site + 'SITE_HELP', 'SITE_CHMOD', 'SITE_CHGRP', + + //mod_site_misc + 'SITE_MKDIR', 'SITE_RMDIR', 'SITE_SYMLINK', 'SITE_UTIME', + ), + /*keywords 2*/ + 2 => array( + 'all','on','off','yes','no', + 'standalone', 'inetd', + 'default', 'auth', 'write', + 'internet', 'local', 'limit', 'ip', + 'from' + ), + ), + 'SYMBOLS' => array( + '+', '-' + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => false, + 1 => false, + 2 => false, + 3 => false, + 4 => false, + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: #00007f;', + 2 => 'color: #0000ff;', + 3 => 'color: #000000; font-weight:bold;', + 4 => 'color: #000080; font-weight:bold;', + ), + 'COMMENTS' => array( + 1 => 'color: #adadad; font-style: italic;', + ), + 'ESCAPE_CHAR' => array( + 0 => 'color: #000099; font-weight: bold;' + ), + 'BRACKETS' => array( + 0 => 'color: #339933;' + ), + 'STRINGS' => array( + 0 => 'color: #7f007f;' + ), + 'NUMBERS' => array( + 0 => 'color: #ff0000;' + ), + 'METHODS' => array( + ), + 'SYMBOLS' => array( + 0 => 'color: #008000;' + ), + 'REGEXPS' => array( + ), + 'SCRIPT' => array( + ) + ), + 'URLS' => array( + 1 => 'http://www.google.com/search?hl=en&q={FNAMEL}+site:www.proftpd.org+inurl:docs&btnI=I%27m%20Feeling%20Lucky', + 2 => '', + 3 => 'http://www.google.com/search?hl=en&q={FNAMEL}+site:www.proftpd.org+inurl:docs&btnI=I%27m%20Feeling%20Lucky', + 4 => '' + ), + 'OOLANG' => false, + 'OBJECT_SPLITTERS' => array( + ), + 'REGEXPS' => array( + ), + 'STRICT_MODE_APPLIES' => GESHI_NEVER, + 'SCRIPT_DELIMITERS' => array( + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + ), + 'PARSER_CONTROL' => array( + 'ENABLE_FLAGS' => array( + 'BRACKETS' => GESHI_NEVER, + 'SYMBOLS' => GESHI_NEVER + ), + 'KEYWORDS' => array( + 2 => array( + 'DISALLOWED_BEFORE' => '(?<=\s)(?<!=)', + 'DISALLOWED_AFTER' => '(?!\+)(?!\w)', + ), + 3 => array( + 'DISALLOWED_BEFORE' => '(?<=<|<\/)', + 'DISALLOWED_AFTER' => '(?=\s|\/|>)', + ), + 4 => array( + 'DISALLOWED_BEFORE' => '(?<=\s)(?<!=)', + 'DISALLOWED_AFTER' => '(?!\+)(?=\/|(?:\s+\w+)*\s*>)', + ) + ) + ) +); + +?> \ No newline at end of file diff --git a/inc/geshi/progress.php b/inc/geshi/progress.php index 90c3bf0fae0da5e5692384888d22d2fdf313795b..affb62000a7c2348a3e8b45be36f99593f1b00f1 100644 --- a/inc/geshi/progress.php +++ b/inc/geshi/progress.php @@ -4,7 +4,7 @@ * -------- * Author: Marco Aurelio de Pasqual (marcop@hdi.com.br) * Copyright: (c) 2008 Marco Aurelio de Pasqual, Benny Baumann (http://qbnz.com/highlighter) - * Release Version: 1.0.8.8 + * Release Version: 1.0.8.10 * Date Started: 2008/07/11 * * Progress language file for GeSHi. diff --git a/inc/geshi/prolog.php b/inc/geshi/prolog.php index 4dd01ff7ebc0ef2a30c6077a394e3312620007c0..74d03374cf32fdae454947609f0508e4c8ff58d0 100644 --- a/inc/geshi/prolog.php +++ b/inc/geshi/prolog.php @@ -4,7 +4,7 @@ * -------- * Author: Benny Baumann (BenBE@geshi.org) * Copyright: (c) 2008 Benny Baumann (http://qbnz.com/highlighter/) - * Release Version: 1.0.8.8 + * Release Version: 1.0.8.10 * Date Started: 2008/10/02 * * Prolog language file for GeSHi. diff --git a/inc/geshi/properties.php b/inc/geshi/properties.php index 9fc8b8da47613075e9eeec4f5eef89b6f858208e..08ba9a4192f69dd696a408f0864da062a1adf849 100644 --- a/inc/geshi/properties.php +++ b/inc/geshi/properties.php @@ -4,7 +4,7 @@ * -------- * Author: Edy Hinzen * Copyright: (c) 2009 Edy Hinzen - * Release Version: 1.0.8.8 + * Release Version: 1.0.8.10 * Date Started: 2009/04/03 * * Property language file for GeSHi. diff --git a/inc/geshi/providex.php b/inc/geshi/providex.php index 0352ac2a14573dc90883980b197e10082ad92d73..b7232873a5986ac58ed0a622a5effa868a9e0364 100644 --- a/inc/geshi/providex.php +++ b/inc/geshi/providex.php @@ -4,7 +4,7 @@ * ---------- * Author: Jeff Wilder (jeff@coastallogix.com) * Copyright: (c) 2008 Coastal Logix (http://www.coastallogix.com) - * Release Version: 1.0.8.8 + * Release Version: 1.0.8.10 * Date Started: 2008/10/18 * * ProvideX language file for GeSHi. diff --git a/inc/geshi/purebasic.php b/inc/geshi/purebasic.php index b24986f5778e917e4fd1cd0a7fc401d4177c1d59..213868d741963984bf4911ff3e04d067af7b6853 100644 --- a/inc/geshi/purebasic.php +++ b/inc/geshi/purebasic.php @@ -4,7 +4,7 @@ * ------- * Author: GuShH * Copyright: (c) 2009 Gustavo Julio Fiorenza - * Release Version: 1.0.8.8 + * Release Version: 1.0.8.10 * Date Started: 13/06/2009 * * PureBasic language file for GeSHi. diff --git a/inc/geshi/pycon.php b/inc/geshi/pycon.php new file mode 100644 index 0000000000000000000000000000000000000000..141d521f956b2539d4f8cc5802e3e3c5e31a6535 --- /dev/null +++ b/inc/geshi/pycon.php @@ -0,0 +1,64 @@ +<?php +/************************************************************************************* + * python.php + * ---------- + * Author: Roberto Rossi (rsoftware@altervista.org) + * Copyright: (c) 2004 Roberto Rossi (http://rsoftware.altervista.org), Nigel McNie (http://qbnz.com/highlighter) + * Release Version: 1.0.8.10 + * Date Started: 2004/08/30 + * + * Python language file for GeSHi. + * + * CHANGES + * ------- + * 2008/12/18 + * - Added missing functions and keywords. Also added two new Python 3.0 types. SF#2441839 + * 2005/05/26 + * - Modifications by Tim (tim@skreak.com): added more keyword categories, tweaked colors + * 2004/11/27 (1.0.1) + * - Added support for multiple object splitters + * 2004/08/30 (1.0.0) + * - First Release + * + * TODO (updated 2004/11/27) + * ------------------------- + * + ************************************************************************************* + * + * This file is part of GeSHi. + * + * GeSHi is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * GeSHi is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with GeSHi; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + ************************************************************************************/ + +//This +require(dirname(__FILE__).'/python.php'); + +$language_data['LANG_NAME'] = 'Python (console mode)'; + +$language_data['STRICT_MODE_APPLIES'] = GESHI_ALWAYS; +$language_data['SCRIPT_DELIMITERS'][-1] = '/^(>>>).*?$(?:\n\.\.\..*?$)*($)/m'; +$language_data['HIGHLIGHT_STRICT_BLOCK'][-1] = true; + +$language_data['STYLES']['SCRIPT'][-1] = 'color: #222222;'; + +if(!isset($language_data['COMMENT_REGEXP'])) { + $language_data['COMMENT_REGEXP'] = array(); +} + +$language_data['COMMENT_REGEXP'][-1] = '/(?:^|\A\s)(?:>>>|\.\.\.)/m'; +$language_data['STYLES']['COMMENTS'][-1] = 'color: #444444;'; + +?> \ No newline at end of file diff --git a/inc/geshi/python.php b/inc/geshi/python.php index 1be7e2953c805625e7f6c378c3dfb57393114979..38d9a0b029aba2d2d4ebe93025d73a4482ebd87b 100644 --- a/inc/geshi/python.php +++ b/inc/geshi/python.php @@ -4,7 +4,7 @@ * ---------- * Author: Roberto Rossi (rsoftware@altervista.org) * Copyright: (c) 2004 Roberto Rossi (http://rsoftware.altervista.org), Nigel McNie (http://qbnz.com/highlighter) - * Release Version: 1.0.8.8 + * Release Version: 1.0.8.10 * Date Started: 2004/08/30 * * Python language file for GeSHi. @@ -49,8 +49,13 @@ $language_data = array ( 'COMMENT_MULTI' => array(), 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, //Longest quotemarks ALWAYS first - 'QUOTEMARKS' => array('"""', '"', "'"), + 'QUOTEMARKS' => array('"""', "'''", '"', "'"), 'ESCAPE_CHAR' => '\\', + 'NUMBERS' => + GESHI_NUMBER_INT_BASIC | GESHI_NUMBER_BIN_PREFIX_0B | + GESHI_NUMBER_OCT_PREFIX_0O | GESHI_NUMBER_HEX_PREFIX | + GESHI_NUMBER_FLT_NONSCI | GESHI_NUMBER_FLT_NONSCI_F | + GESHI_NUMBER_FLT_SCI_SHORT | GESHI_NUMBER_FLT_SCI_ZERO, 'KEYWORDS' => array( /* @@ -60,7 +65,7 @@ $language_data = array ( 1 => array( 'and', 'del', 'for', 'is', 'raise', 'assert', 'elif', 'from', 'lambda', 'return', 'break', 'else', 'global', 'not', 'try', 'class', 'except', 'if', 'or', 'while', 'continue', 'exec', - 'import', 'pass', 'yield', 'def', 'finally', 'in', 'print', 'with', 'as' + 'import', 'pass', 'yield', 'def', 'finally', 'in', 'print', 'with', 'as', 'nonlocal' ), /* @@ -172,7 +177,9 @@ $language_data = array ( ) ), 'SYMBOLS' => array( - '(', ')', '[', ']', '{', '}', '*', '&', '%', '!', ';', '<', '>', '?', '`' + '<', '>', '=', '!', '<=', '>=', //·comparison·operators + '~', '@', //·unary·operators + ';', ',' //·statement·separator ), 'CASE_SENSITIVE' => array( GESHI_COMMENTS => false, @@ -234,4 +241,4 @@ $language_data = array ( ) ); -?> +?> \ No newline at end of file diff --git a/inc/geshi/q.php b/inc/geshi/q.php index 9629ded4a0ab9cd7222637aa4c6affaad485aa03..e4bb92da8e575b2a59c4b9e4f52a0674e79ac394 100644 --- a/inc/geshi/q.php +++ b/inc/geshi/q.php @@ -4,7 +4,7 @@ * ----- * Author: Ian Roddis (ian.roddis@proteanmind.net) * Copyright: (c) 2008 Ian Roddis (http://proteanmind.net) - * Release Version: 1.0.8.8 + * Release Version: 1.0.8.10 * Date Started: 2009/01/21 * * q/kdb+ language file for GeSHi. diff --git a/inc/geshi/qbasic.php b/inc/geshi/qbasic.php index da4372258bcedb9aacda1167328ea3960028b6ad..ff61449d0e54007505ae80f4cdd3c1b87623705a 100644 --- a/inc/geshi/qbasic.php +++ b/inc/geshi/qbasic.php @@ -4,7 +4,7 @@ * ---------- * Author: Nigel McNie (nigel@geshi.org) * Copyright: (c) 2004 Nigel McNie (http://qbnz.com/highlighter/) - * Release Version: 1.0.8.8 + * Release Version: 1.0.8.10 * Date Started: 2004/06/20 * * QBasic/QuickBASIC language file for GeSHi. diff --git a/inc/geshi/rails.php b/inc/geshi/rails.php index 64d83ea160f5186ec61f09a54396773ae393d9fe..0e825040e3c664ea4ae57a9469c3e4a85c3a6ea5 100644 --- a/inc/geshi/rails.php +++ b/inc/geshi/rails.php @@ -4,7 +4,7 @@ * --------- * Author: Moises Deniz * Copyright: (c) 2005 Moises Deniz - * Release Version: 1.0.8.8 + * Release Version: 1.0.8.10 * Date Started: 2007/03/21 * * Ruby (with Ruby on Rails Framework) language file for GeSHi. diff --git a/inc/geshi/rebol.php b/inc/geshi/rebol.php index a3889eec9bf40f5b04165f5fa485246fdae6400e..1e5dff626e0d80588fd2ac4f81298b824f7b7d39 100644 --- a/inc/geshi/rebol.php +++ b/inc/geshi/rebol.php @@ -4,7 +4,7 @@ * -------- * Author: Lecanu Guillaume (Guillaume@LyA.fr) * Copyright: (c) 2004-2005 Lecanu Guillaume (Guillaume@LyA.fr) - * Release Version: 1.0.8.8 + * Release Version: 1.0.8.10 * Date Started: 2004/12/22 * * Rebol language file for GeSHi. diff --git a/inc/geshi/reg.php b/inc/geshi/reg.php index bb2e845f30d19235b4877641702529702566aee5..9878f42f6524d961b3f282c12622162933117928 100644 --- a/inc/geshi/reg.php +++ b/inc/geshi/reg.php @@ -4,7 +4,7 @@ * ------- * Author: Sean Hanna (smokingrope@gmail.com) * Copyright: (c) 2006 Sean Hanna - * Release Version: 1.0.8.8 + * Release Version: 1.0.8.10 * Date Started: 03/15/2006 * * Microsoft Registry Editor language file for GeSHi. diff --git a/inc/geshi/robots.php b/inc/geshi/robots.php index baf286b7fd36aace3ac971069fa643fc9541ec41..c0713a64c7c20680ad066bd438bc245ad1de9e03 100644 --- a/inc/geshi/robots.php +++ b/inc/geshi/robots.php @@ -4,7 +4,7 @@ * -------- * Author: Christian Lescuyer (cl@goelette.net) * Copyright: (c) 2006 Christian Lescuyer http://xtian.goelette.info - * Release Version: 1.0.8.8 + * Release Version: 1.0.8.10 * Date Started: 2006/02/17 * * robots.txt language file for GeSHi. diff --git a/inc/geshi/rpmspec.php b/inc/geshi/rpmspec.php index 96dc9556fc79f613402202ed5400047544a2b4cd..243df94c77ff9f4d9c603819d5eb0af48f7ae7c4 100644 --- a/inc/geshi/rpmspec.php +++ b/inc/geshi/rpmspec.php @@ -4,7 +4,7 @@ * --------------------------------- * Author: Paul Grinberg (gri6507 TA unity-linux TOD org) * Copyright: (c) 2010 Paul Grinberg - * Release Version: 1.0.8.8 + * Release Version: 1.0.8.10 * Date Started: 2010/04/27 * * RPM Spec language file for GeSHi. diff --git a/inc/geshi/rsplus.php b/inc/geshi/rsplus.php index b73f5ea77373f8f8e509ffdfb3ceecdf9e650970..41cdd158b133af3ff212572e9a0f119986e75210 100644 --- a/inc/geshi/rsplus.php +++ b/inc/geshi/rsplus.php @@ -6,7 +6,7 @@ * Contributors: * - Benilton Carvalho (beniltoncarvalho@gmail.com) * Copyright: (c) 2009 Ron Fredericks (http://www.LectureMaker.com) - * Release Version: 1.0.8.8 + * Release Version: 1.0.8.10 * Date Started: 2009/03/28 * * R language file for GeSHi. diff --git a/inc/geshi/ruby.php b/inc/geshi/ruby.php index 47ecbb2e2f55ab43a270e00113649a899f735086..c38d5a218e322134905f56272cff64df6092946b 100644 --- a/inc/geshi/ruby.php +++ b/inc/geshi/ruby.php @@ -4,7 +4,7 @@ * -------- * Author: Moises Deniz * Copyright: (c) 2007 Moises Deniz - * Release Version: 1.0.8.8 + * Release Version: 1.0.8.10 * Date Started: 2007/03/21 * * Ruby language file for GeSHi. diff --git a/inc/geshi/sas.php b/inc/geshi/sas.php index c4d426fa0c5b994c3d46b954936c33cc5c7682b1..6f4ce285eb0148402efec5fffa907beb4a402866 100644 --- a/inc/geshi/sas.php +++ b/inc/geshi/sas.php @@ -4,7 +4,7 @@ * ------- * Author: Galen Johnson (solitaryr@gmail.com) * Copyright: (c) 2004 Nigel McNie (http://qbnz.com/highlighter/) - * Release Version: 1.0.8.8 + * Release Version: 1.0.8.10 * Date Started: 2005/12/27 * * SAS language file for GeSHi. Based on the sas vim file. @@ -44,7 +44,7 @@ $language_data = array ( 'LANG_NAME' => 'SAS', 'COMMENT_SINGLE' => array(), - 'COMMENT_MULTI' => array('/*' => '*/'), + 'COMMENT_MULTI' => array('/*' => '*/', '*' => ';'), 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, 'QUOTEMARKS' => array("'", '"'), 'ESCAPE_CHAR' => '\\', @@ -287,4 +287,4 @@ $language_data = array ( ) ); -?> +?> \ No newline at end of file diff --git a/inc/geshi/scala.php b/inc/geshi/scala.php index 202c06c83e49df244fbe5f39011d448e2cc491d4..12462cf3b96cf6d9eb534f8e7458014fca6bd979 100644 --- a/inc/geshi/scala.php +++ b/inc/geshi/scala.php @@ -4,7 +4,7 @@ * ---------- * Author: Franco Lombardo (franco@francolombardo.net) * Copyright: (c) 2008 Franco Lombardo, Benny Baumann - * Release Version: 1.0.8.8 + * Release Version: 1.0.8.10 * Date Started: 2008/02/08 * * Scala language file for GeSHi. diff --git a/inc/geshi/scheme.php b/inc/geshi/scheme.php index 2e2430bff08687f63a813535dccf65eb6c6f4a6b..f687e79a7cc02ae2f7a4b096f129639efd471cb5 100644 --- a/inc/geshi/scheme.php +++ b/inc/geshi/scheme.php @@ -4,7 +4,7 @@ * ---------- * Author: Jon Raphaelson (jonraphaelson@gmail.com) * Copyright: (c) 2005 Jon Raphaelson, Nigel McNie (http://qbnz.com/highlighter) - * Release Version: 1.0.8.8 + * Release Version: 1.0.8.10 * Date Started: 2004/08/30 * * Scheme language file for GeSHi. diff --git a/inc/geshi/scilab.php b/inc/geshi/scilab.php index d1ff6fc1621ee78b046cf3466c1582f65554a866..cd1ca70f18546095ef4161466e3e80f8e6b26fc6 100644 --- a/inc/geshi/scilab.php +++ b/inc/geshi/scilab.php @@ -4,7 +4,7 @@ * -------- * Author: Christophe David (geshi@christophedavid.org) * Copyright: (c) 2008 Christophe David (geshi@christophedavid.org) - * Release Version: 1.0.8.8 + * Release Version: 1.0.8.10 * Date Started: 2008/08/04 * * SciLab language file for GeSHi. diff --git a/inc/geshi/sdlbasic.php b/inc/geshi/sdlbasic.php index 876dc09a6a680df7b5dd4f479e6ed0fbc61ff000..27aaf522b473426020dc30ae57108e1267296878 100644 --- a/inc/geshi/sdlbasic.php +++ b/inc/geshi/sdlbasic.php @@ -4,7 +4,7 @@ * ------------ * Author: Roberto Rossi * Copyright: (c) 2005 Roberto Rossi (http://rsoftware.altervista.org) - * Release Version: 1.0.8.8 + * Release Version: 1.0.8.10 * Date Started: 2005/08/19 * * sdlBasic (http://sdlbasic.sf.net) language file for GeSHi. diff --git a/inc/geshi/smalltalk.php b/inc/geshi/smalltalk.php index b475ad711260350fe9e9edfd972deff8cfa7851b..008bfcd1de89e6a94e90fd77247dd94f681bddd7 100644 --- a/inc/geshi/smalltalk.php +++ b/inc/geshi/smalltalk.php @@ -4,7 +4,7 @@ * -------- * Author: Bananeweizen (Bananeweizen@gmx.de) * Copyright: (c) 2005 Bananeweizen (www.bananeweizen.de) - * Release Version: 1.0.8.8 + * Release Version: 1.0.8.10 * Date Started: 2005/03/27 * * Smalltalk language file for GeSHi. diff --git a/inc/geshi/smarty.php b/inc/geshi/smarty.php index 7f4489289cba8566a106795da5ae31e022d83ad4..1d819993683eabcbbe9c60c3d50ff2c8d4287403 100644 --- a/inc/geshi/smarty.php +++ b/inc/geshi/smarty.php @@ -4,7 +4,7 @@ * ---------- * Author: Alan Juden (alan@judenware.org) * Copyright: (c) 2004 Alan Juden, Nigel McNie (http://qbnz.com/highlighter/) - * Release Version: 1.0.8.8 + * Release Version: 1.0.8.10 * Date Started: 2004/07/10 * * Smarty template language file for GeSHi. diff --git a/inc/geshi/sql.php b/inc/geshi/sql.php index 9e45e850d82a245902e12129918132eb08327a6e..6f787019658f47fdb714c0c8e619a52c02072807 100644 --- a/inc/geshi/sql.php +++ b/inc/geshi/sql.php @@ -3,14 +3,18 @@ * sql.php * ------- * Author: Nigel McNie (nigel@geshi.org) + * Contributors: + * - Jürgen Thomas (Juergen.Thomas@vs-polis.de) * Copyright: (c) 2004 Nigel McNie (http://qbnz.com/highlighter) - * Release Version: 1.0.8.8 + * Release Version: 1.0.8.10 * Date Started: 2004/06/04 * * SQL language file for GeSHi. * * CHANGES * ------- + * 2010/07/19 (1.0.8.9) + * - Added many more keywords * 2008/05/23 (1.0.7.22) * - Added additional symbols for highlighting * 2004/11/27 (1.0.3) @@ -58,30 +62,51 @@ $language_data = array ( 'ESCAPE_CHAR' => '\\', 'KEYWORDS' => array( 1 => array( - 'ADD', 'ALL', 'ALTER', 'AND', 'AS', 'ASC', - 'AUTO_INCREMENT', 'BETWEEN', 'BINARY', 'BOOLEAN', - 'BOTH', 'BY', 'CHANGE', 'CHECK', 'COLUMN', 'COLUMNS', - 'CREATE', 'CROSS', 'DATA', 'DATABASE', 'DATABASES', - 'DEFAULT', 'DELAYED', 'DELETE', 'DESC', 'DESCRIBE', - 'DISTINCT', 'DROP', 'ENCLOSED', 'ESCAPED', 'EXISTS', - 'EXPLAIN', 'FIELD', 'FIELDS', 'FLUSH', 'FOR', - 'FOREIGN', 'FROM', 'FULL', 'FUNCTION', 'GRANT', - 'GROUP', 'HAVING', 'IDENTIFIED', 'IF', 'IGNORE', - 'IN', 'INDEX', 'INFILE', 'INNER', 'INSERT', 'INTO', - 'IS', 'JOIN', 'KEY', 'KEYS', 'KILL', 'LANGUAGE', - 'LEADING', 'LEFT', 'LIKE', 'LIMIT', 'LINES', 'LOAD', - 'LOCAL', 'LOCK', 'LOW_PRIORITY', 'MODIFY', 'NATURAL', - 'NEXTVAL', 'NOT', 'NULL', 'ON', 'OPTIMIZE', 'OPTION', - 'OPTIONALLY', 'OR', 'ORDER', 'OUTER', 'OUTFILE', - 'PRIMARY', 'PROCEDURAL', 'PROCEEDURE', 'READ', - 'REFERENCES', 'REGEXP', 'RENAME', 'REPLACE', - 'RETURN', 'REVOKE', 'RIGHT', 'RLIKE', 'SELECT', - 'SET', 'SETVAL', 'SHOW', 'SONAME', 'STATUS', - 'STRAIGHT_JOIN', 'TABLE', 'TABLES', 'TEMINATED', - 'TEMPORARY', 'TO', 'TRAILING', 'TRIGGER', 'TRUNCATE', - 'TRUSTED', 'UNION', 'UNIQUE', 'UNLOCK', 'UNSIGNED', - 'UPDATE', 'USE', 'USING', 'VALUES', 'VARIABLES', - 'VIEW', 'WHERE', 'WITH', 'WRITE', 'XOR', 'ZEROFILL' + 'ADD', 'ALL', 'ALTER', 'AND', 'AS', 'ASC', 'AUTO_INCREMENT', + 'BEFORE', 'BEGIN', 'BETWEEN', 'BIGINT', 'BINARY', 'BLOB', 'BOOLEAN', 'BOTH', 'BY', + 'CALL', 'CASE', 'CAST', 'CEIL', 'CEILING', 'CHANGE', 'CHAR', 'CHAR_LENGTH', 'CHARACTER', + 'CHARACTER_LENGTH', 'CHECK', 'CLOB', 'COALESCE', 'COLLATE', 'COLUMN', 'COLUMNS', + 'CONNECT', 'CONSTRAINT', 'CONVERT', 'COUNT', 'CREATE', 'CROSS', 'CURRENT', + 'CURRENT_DATE', 'CURRENT_TIME', 'CURRENT_TIMESTAMP', 'CURRENT_USER', + 'DATA', 'DATABASE', 'DATABASES', 'DATE', 'DAY', 'DEC', 'DECIMAL', 'DECLARE', + 'DEFAULT', 'DELAYED', 'DELETE', 'DESC', 'DESCRIBE', 'DISTINCT', 'DOUBLE', + 'DOMAIN', 'DROP', + 'ELSE', 'ENCLOSED', 'END', 'ESCAPED', 'EXCEPT', 'EXEC', 'EXECUTE', 'EXISTS', 'EXP', + 'EXPLAIN', 'EXTRACT', + 'FALSE', 'FIELD', 'FIELDS', 'FILTER', 'FIRST', 'FLOAT', 'FLOOR', 'FLUSH', 'FOR', + 'FOREIGN', 'FROM', 'FULL', 'FUNCTION', + 'GET', 'GROUP', 'GROUPING', 'GO', 'GOTO', 'GRANT', 'GRANTED', + 'HAVING', 'HOUR', + 'IDENTIFIED', 'IDENTITY', 'IF', 'IGNORE', 'IN', 'INCREMENT', 'INDEX', 'INFILE', 'INNER', + 'INOUT', 'INPUT', 'INSERT', 'INT', 'INTEGER', 'INTERSECT', 'INTERSECTION', 'INTERVAL', + 'INTO', 'IS', + 'JOIN', + 'KEY', 'KEYS', 'KILL', + 'LANGUAGE', 'LARGE', 'LAST', 'LEADING', 'LEFT', 'LENGTH', 'LIKE', 'LIMIT', 'LINES', 'LOAD', + 'LOCAL', 'LOCK', 'LOW_PRIORITY', 'LOWER', + 'MATCH', 'MAX', 'MERGE', 'MIN', 'MINUTE', 'MOD', 'MODIFIES', 'MODIFY', 'MONTH', + 'NATIONAL', 'NATURAL', 'NCHAR', 'NEW', 'NEXT', 'NEXTVAL', 'NONE', 'NOT', + 'NULL', 'NULLABLE', 'NULLIF', 'NULLS', 'NUMBER', 'NUMERIC', + 'OF', 'OLD', 'ON', 'ONLY', 'OPEN', 'OPTIMIZE', 'OPTION', + 'OPTIONALLY', 'OR', 'ORDER', 'OUT', 'OUTER', 'OUTFILE', 'OVER', + 'POSITION', 'POWER', 'PRECISION', 'PREPARE', 'PRIMARY', 'PROCEDURAL', 'PROCEDURE', + 'READ', 'REAL', 'REF', 'REFERENCES', 'REFERENCING', 'REGEXP', 'RENAME', 'REPLACE', + 'RESULT', 'RETURN', 'RETURNS', 'REVOKE', 'RIGHT', 'RLIKE', 'ROLLBACK', 'ROW', + 'ROW_NUMBER', 'ROWS', 'RESTRICT', 'ROLE', 'ROUTINE', 'ROW_COUNT', + 'SAVEPOINT', 'SEARCH', 'SECOND', 'SECTION', 'SELECT', 'SELF', 'SEQUENCE', + 'SESSION', 'SET', 'SETVAL', 'SHOW', 'SIMILAR', 'SIZE', 'SMALLINT', 'SOME', + 'SONAME', 'SOURCE', 'SPACE', 'SQL', 'SQRT', 'START', 'STATUS', + 'STRAIGHT_JOIN', 'STRUCTURE', 'STYLE', 'SUBSTRING', 'SUM', + 'TABLE', 'TABLE_NAME', 'TABLES', 'TERMINATED', 'TEMPORARY', 'THEN', 'TIME', + 'TIMESTAMP', 'TO', 'TRAILING', 'TRANSACTION', 'TRIGGER', 'TRIM', 'TRUE', 'TRUNCATE', + 'TRUSTED', 'TYPE', + 'UNDER', 'UNION', 'UNIQUE', 'UNKNOWN', 'UNLOCK', 'UNSIGNED', + 'UPDATE', 'UPPER', 'USE', 'USER', 'USING', + 'VALUE', 'VALUES', 'VARCHAR', 'VARIABLES', 'VARYING', 'VIEW', + 'WHEN', 'WHERE', 'WITH', 'WITHIN', 'WITHOUT', 'WORK', 'WRITE', + 'XOR', + 'YEAR', + 'ZEROFILL' ) ), 'SYMBOLS' => array( diff --git a/inc/geshi/systemverilog.php b/inc/geshi/systemverilog.php index 19405c097c1b75262696c8d8bdf846dda89869e9..142fd117b98b369f6c9469362a935da4e5212218 100644 --- a/inc/geshi/systemverilog.php +++ b/inc/geshi/systemverilog.php @@ -4,7 +4,7 @@ * ------- * Author: Sean O'Boyle * Copyright: (C) 2008 IntelligentDV - * Release Version: 1.0.8.8 + * Release Version: 1.0.8.10 * Date Started: 2008/06/25 * * SystemVerilog IEEE 1800-2009(draft8) language file for GeSHi. @@ -52,9 +52,9 @@ * Project: SyntaxFiles * * File: systemverilog.php - * $LastChangedBy: seanoboyle $ - * $LastChangedDate: 2009-07-22 22:20:25 -0700 (Wed, 22 Jul 2009) $ - * $LastChangedRevision: 17 $ + * $LastChangedBy: benbe $ + * $LastChangedDate: 2011-02-11 20:31:50 +0100 (Fr, 11. Feb 2011) $ + * $LastChangedRevision: 2430 $ * ************************************************************************/ diff --git a/inc/geshi/tcl.php b/inc/geshi/tcl.php index 2a07ccd46fd790c9b86b52f58288076942d1d3c0..c948ff261c9fb1cb0ff3692800acfbd608fe2e88 100644 --- a/inc/geshi/tcl.php +++ b/inc/geshi/tcl.php @@ -4,7 +4,7 @@ * --------------------------------- * Author: Reid van Melle (rvanmelle@gmail.com) * Copyright: (c) 2004 Reid van Melle (sorry@nowhere) - * Release Version: 1.0.8.8 + * Release Version: 1.0.8.10 * Date Started: 2006/05/05 * * TCL/iTCL language file for GeSHi. diff --git a/inc/geshi/teraterm.php b/inc/geshi/teraterm.php index 443bf7b4c2a2f34b4c7b6fe1f79e14e846481db5..510ad04c4304700ddde18f2879a12d142979bfea 100644 --- a/inc/geshi/teraterm.php +++ b/inc/geshi/teraterm.php @@ -4,23 +4,29 @@ * -------- * Author: Boris Maisuradze (boris at logmett.com) * Copyright: (c) 2008 Boris Maisuradze (http://logmett.com) - * Release Version: 1.0.8.8 + * Release Version: 1.0.8.10 * Date Started: 2008/09/26 * * Tera Term Macro language file for GeSHi. * * - * This version of ttl.php was created for Tera Term 4.60 and LogMeTT 2.9.4. + * This version of teraterm.php was created for Tera Term 4.62 and LogMeTT 2.9.4. * Newer versions of these application can contain additional Macro commands - * and/or keywords that are not listed here. The latest release of ttl.php + * and/or keywords that are not listed here. The latest release of teraterm.php * can be downloaded from Download section of LogMeTT.com * * CHANGES * ------- - * 2008/09/26 (1.0.8) + * 2008/09/26 (1.0.0) * - First Release for Tera Term 4.60 and below. + * 2009/03/22 (1.1.0) + * - First Release for Tera Term 4.62 and below. + * 2009/04/25 (1.1.1) + * - Second Release for Tera Term 4.62 and below. + * 2010/09/12 (1.1.2) + * - Second Release for Tera Term 4.67, LogMeTT 2.97, TTLEditor 1.2.1 and below. * - * TODO (updated 2008/09/26) + * TODO (updated 2010/09/12) * ------------------------- * * * @@ -57,27 +63,29 @@ $language_data = array ( 'Beep', 'BplusRecv', 'BplusSend', - 'Break', // (version 4.53 or later) + 'Break', 'Call', - 'CallMenu', // (version 4.56 or later) + 'CallMenu', 'ChangeDir', 'ClearScreen', - 'Clipb2Var', //(version 4.46 or later) + 'Clipb2Var', 'ClosesBox', 'CloseTT', 'Code2Str', 'Connect', - 'CRC32', // (version 4.60 or later) - 'CRC32File', // (version 4.60 or later) - 'CygConnect', // (version 4.57 or later) + 'CRC32', + 'CRC32File', + 'CygConnect', 'DelPassword', 'Disconnect', - 'Do', // (version 4.56 or later) + 'DispStr', + 'Do', 'Else', + 'ElseIf', 'EnableKeyb', 'End', 'EndIf', - 'EndUntil', // (version 4.56 or later) + 'EndUntil', 'EndWhile', 'Exec', 'ExecCmnd', @@ -88,32 +96,37 @@ $language_data = array ( 'FileCreate', 'FileDelete', 'FileMarkPtr', - 'FilenameBox', //(version 4.54 or later) + 'FileNameBox', 'FileOpen', 'FileRead', - 'FileReadln', // (version 4.48 or later) + 'FileReadln', 'FileRename', 'FileSearch', 'FileSeek', 'FileSeekBack', + 'FileStat', 'FileStrSeek', 'FileStrSeek2', + 'FileTruncate', 'FileWrite', - 'FileWriteln', - 'FindOperations', + 'FileWriteLn', + 'FindClose', + 'FindFirst', + 'FindNext', 'FlushRecv', - 'ForNext', + 'For', 'GetDate', - 'GetDir', //(version 4.46 or later) + 'GetDir', 'GetEnv', + 'GetHostname', 'GetPassword', 'GetTime', 'GetTitle', - 'GetVer', //(version 4.58 or later) + 'GetTTDir', + 'Getver', 'GoTo', 'If', - 'IfDefined', // (version 4.46 or later) - 'IfThenElseIf', + 'IfDefined', 'Include', 'InputBox', 'Int2Str', @@ -121,73 +134,91 @@ $language_data = array ( 'KmtGet', 'KmtRecv', 'KmtSend', - 'LoadKeyMap', + 'LoadKeymap', 'LogClose', 'LogOpen', 'LogPause', 'LogStart', 'LogWrite', - 'Loop', // (version 4.56 or later) + 'Loop', 'MakePath', 'MessageBox', - 'MPause', // (version 4.27 or later) + 'MPause', + 'Next', 'PasswordBox', 'Pause', - 'QuickvanRecv', - 'QuickvanSend', - 'Random', //(version 4.27 or later) - 'Recvln', + 'QuickVANRecv', + 'QuickVANSend', + 'Random', + 'RecvLn', 'RestoreSetup', 'Return', - 'RotateLeft', //(version 4.54 or later) - 'RotateRight', //(version 4.54 or later) - 'ScpRecv', // (version 4.57 or later) - 'ScpSend', // (version 4.57 or later) + 'RotateLeft', + 'RotateRight', + 'ScpRecv', + 'ScpSend', 'Send', 'SendBreak', + 'SendBroadcast', 'SendFile', - 'SendKcode', - 'Sendln', - 'SetBaud', // (version 4.58 or later) + 'SendKCode', + 'SendLn', + 'SendLnBroadcast', + 'SendMulticast', + 'SetBaud', 'SetDate', + 'SetDebug', 'SetDir', 'SetDlgPos', - 'SetDTR', // (version 4.59 or later) - 'SetRTS', // (version 4.59 or later) - 'SetEnv', // (version 4.54 or later) + 'SetDTR', 'SetEcho', + 'SetEnv', 'SetExitCode', + 'SetMulticastName', + 'SetRTS', 'SetSync', 'SetTime', 'SetTitle', 'Show', 'ShowTT', - 'Sprintf', // (version 4.52 or later) + 'SPrintF', + 'SPrintF2', 'StatusBox', 'Str2Code', 'Str2Int', 'StrCompare', 'StrConcat', 'StrCopy', + 'StrInsert', + 'StrJoin', 'StrLen', - 'StrMatch', // (version 4.59 or later) + 'StrMatch', + 'StrRemove', + 'StrReplace', 'StrScan', - 'Testlink', + 'StrSpecial', + 'StrSplit', + 'StrTrim', + 'TestLink', 'Then', - 'ToLower', //(version 4.53 or later) - 'ToUpper', //(version 4.53 or later) - 'Unlink', - 'Until', // (version 4.56 or later) - 'Var2Clipb', //(version 4.46 or later) + 'ToLower', + 'ToUpper', + 'UnLink', + 'Until', + 'Var2Clipb', 'Wait', + 'Wait4All', 'WaitEvent', - 'Waitln', + 'WaitLn', + 'WaitN', 'WaitRecv', - 'WaitRegex', // (version 4.21 or later) + 'WaitRegEx', 'While', 'XmodemRecv', 'XmodemSend', 'YesNoBox', + 'YmodemRecv', + 'YmodemSend', 'ZmodemRecv', 'ZmodemSend' ), @@ -204,6 +235,7 @@ $language_data = array ( 'groupmatchstr9', 'inputstr', 'matchstr', + 'mtimeout', 'param2', 'param3', 'param4', @@ -225,11 +257,14 @@ $language_data = array ( '$[6]', '$[7]', '$[8]', + '$[9]', + '$branch$', + '$computername$', '$connection$', '$email$', '$logdir$', '$logfilename$', - '$logit$', + '$lttfilename$', '$mobile$', '$name$', '$pager$', @@ -239,7 +274,7 @@ $language_data = array ( '$ttdir$', '$user$', '$windir$', - ), + ), /* Keyword Symbols */ 4 => array( 'and', @@ -249,9 +284,11 @@ $language_data = array ( ) ), 'SYMBOLS' => array( - '(', ')', '[', ']', - '~', '!', '+', '-', '*', '/', '%', '>>', '<<', '<<<', '>>>', '&', '^', '|', - '<>', '<=', '>=', '=', '==', '<>', '!=', '&&', '||' + '(', ')', '[', ']', '{', '}', + '+', '-', '*', '/', '%', + '!', '&', '|', '^', + '<', '>', '=', + '?', ':', ';', ), 'CASE_SENSITIVE' => array( GESHI_COMMENTS => false, @@ -314,4 +351,4 @@ $language_data = array ( 'TAB_WIDTH' => 4 ); -?> +?> \ No newline at end of file diff --git a/inc/geshi/text.php b/inc/geshi/text.php index 66f45929352216d5764cccc99174476b8b7b05db..dd219f5993bc0125497abb41a1c0c28028563180 100644 --- a/inc/geshi/text.php +++ b/inc/geshi/text.php @@ -4,7 +4,7 @@ * -------- * Author: Sean Hanna (smokingrope@gmail.com) * Copyright: (c) 2006 Sean Hanna - * Release Version: 1.0.8.8 + * Release Version: 1.0.8.10 * Date Started: 04/23/2006 * * Standard Text File (No Syntax Highlighting). diff --git a/inc/geshi/thinbasic.php b/inc/geshi/thinbasic.php index 693c698d6401bc8f600d52cf232a906f811f79dc..c496cea6f2a97bff60520f259bb1e6ecb1d0b011 100644 --- a/inc/geshi/thinbasic.php +++ b/inc/geshi/thinbasic.php @@ -4,7 +4,7 @@ * ------ * Author: Eros Olmi (eros.olmi@thinbasic.com) * Copyright: (c) 2006 Eros Olmi (http://www.thinbasic.com), Nigel McNie (http://qbnz.com/highlighter) - * Release Version: 1.0.8.8 + * Release Version: 1.0.8.10 * Date Started: 2006/05/12 * * thinBasic language file for GeSHi. diff --git a/inc/geshi/tsql.php b/inc/geshi/tsql.php index b915b087dc29f42ce3939f115c7dd95fd7340eb2..dddf51934c8e6ffd6f68aa2c221a10cd1681f13a 100644 --- a/inc/geshi/tsql.php +++ b/inc/geshi/tsql.php @@ -4,7 +4,7 @@ * -------- * Author: Duncan Lock (dunc@dflock.co.uk) * Copyright: (c) 2006 Duncan Lock (http://dflock.co.uk/), Nigel McNie (http://qbnz.com/highlighter) - * Release Version: 1.0.8.8 + * Release Version: 1.0.8.10 * Date Started: 2005/11/22 * * T-SQL language file for GeSHi. diff --git a/inc/geshi/typoscript.php b/inc/geshi/typoscript.php index 525271428bd3fbc2201f0d907e800d4913de3a79..c1e3806897835ed07617d9b231cf53557cf4b2e1 100644 --- a/inc/geshi/typoscript.php +++ b/inc/geshi/typoscript.php @@ -4,7 +4,7 @@ * -------- * Author: Jan-Philipp Halle (typo3@jphalle.de) * Copyright: (c) 2005 Jan-Philipp Halle (http://www.jphalle.de/) - * Release Version: 1.0.8.8 + * Release Version: 1.0.8.9 * Date Started: 2005/07/29 * * TypoScript language file for GeSHi. diff --git a/inc/geshi/unicon.php b/inc/geshi/unicon.php index edad62df30cb201656bd1434a89e45f6211aeac0..42fffc886d7790fb648590079a47b9702e172a83 100644 --- a/inc/geshi/unicon.php +++ b/inc/geshi/unicon.php @@ -4,7 +4,7 @@ * -------- * Author: Matt Oates (mattoates@gmail.com) * Copyright: (c) 2010 Matt Oates (http://mattoates.co.uk) - * Release Version: 1.0.8.8 + * Release Version: 1.0.8.10 * Date Started: 2010/04/20 * * Unicon the Unified Extended Dialect of Icon language file for GeSHi. diff --git a/inc/geshi/uscript.php b/inc/geshi/uscript.php new file mode 100644 index 0000000000000000000000000000000000000000..e06aa8ca7dd143c26e35a70aba214d7ba81934eb --- /dev/null +++ b/inc/geshi/uscript.php @@ -0,0 +1,299 @@ +<?php +/************************************************************************************* + * uscript.php + * --------------------------------- + * Author: pospi (pospi@spadgos.com) + * Copyright: (c) 2007 pospi (http://pospi.spadgos.com) + * Release Version: 1.0.8.10 + * Date Started: 2007/05/21 + * + * UnrealScript language file for GeSHi. + * + * Comments: + * * Main purpose at this time is for Unreal Engine 2 / 2.5 + * * Mostly taken from UltraEdit unrealScript wordfile. + * + * CHANGES + * ------- + * 2007/05/21 (1.0.8.10) + * - First Release + * + * TODO (updated 2007/05/21) + * ------------------------- + * * Update to feature any UE3 classes / keywords when UT3 comes out + * + ************************************************************************************* + * + * This file is part of GeSHi. + * + * GeSHi is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * GeSHi is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with GeSHi; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + ************************************************************************************/ + +$language_data = array ( + 'LANG_NAME' => 'Unreal Script', + 'COMMENT_SINGLE' => array( + 1 => '//', + 2 => '#' + ), + 'COMMENT_MULTI' => array('/*' => '*/'), + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array("'", '"'), + 'ESCAPE_CHAR' => '\\', + 'KEYWORDS' => array( + 1 => array( //declaration keywords + 'simulated', 'state', 'class', 'function', 'event', 'var', 'local', + 'ignores', 'globalconfig', 'config', 'abstract', 'nativereplication', 'native', + 'auto', 'coerce', 'const', 'default', + 'defaultproperties', + 'enum', 'extends', 'expands', 'final', 'guid', 'latent', 'localized', + 'new', 'noexport', 'operator', 'preoperator', 'optional', 'out', + 'private', 'public', 'protected', 'reliable', 'replication', + 'singular', 'static', 'struct', 'transient', 'unreliable', + 'hidedropdown', 'cacheexempt', 'exec', 'delegate', 'import', 'placeable', 'exportstructs' + ), + 2 => array( //control flow keywords + 'for', 'while', 'do', 'if', 'else', 'switch', 'case', 'return', 'break', 'continue', + 'begin', 'loop', 'assert', + 'foreach', 'AllActors', 'DynamicActors', 'ChildActors', 'BasedActors', 'TouchingActors', + 'TraceActors', 'RadiusActors', 'VisibleActors', 'CollidingActors', 'VisibleCollidingActors' + ), + 3 => array( //global (object) functions + 'log', 'warn', 'rot', 'vect', 'Rand', 'Min', 'Max', 'Clamp', 'Abs', 'Sin', 'ASin', + 'Cos', 'ACos', 'Tan', 'ATan', 'Exp', 'Loge', 'Sqrt', 'Square', 'FRand', 'FMin', 'FMax', 'FClamp', + 'Lerp', 'Smerp', 'Ceil', 'Round', 'VSize', 'Normal', 'Invert', 'VRand', 'MirrorVectorByNormal', + 'GetAxes', 'GetUnAxes', 'RotRand', 'OrthoRotation', 'Normalize', 'ClockwiseFrom', + 'Len', 'InStr', 'Mid', 'Left', 'Right', 'Caps', 'Chr', 'Asc', 'Locs', + 'Divide', 'Split', 'StrCmp', 'Repl', 'Eval', + 'InterpCurveEval', 'InterpCurveGetOutputRange', 'InterpCurveGetInputDomain', + 'QuatProduct', 'QuatInvert', 'QuatRotateVector', 'QuatFindBetween', 'QuatFromAxisAndAngle', + 'QuatFromRotator', 'QuatToRotator', 'QuatSlerp', + 'Localize', 'GotoState', 'IsInState', 'GetStateName', + 'ClassIsChildOf', 'IsA', 'Enable', 'Disable', + 'GetPropertyText', 'SetPropertyText', 'GetEnum', 'DynamicLoadObject', 'FindObject', + 'SaveConfig', 'ClearConfig', 'StaticSaveConfig', 'ResetConfig', 'StaticClearConfig', + 'GetPerObjectNames', 'RandRange', 'StopWatch', 'IsOnConsole', 'IsSoaking', + 'PlatformIsMacOS', 'PlatformIsUnix', 'PlatformIsWindows', 'PlatformIs64Bit', + 'BeginState', 'EndState', 'Created', 'AllObjects', 'GetReferencers', 'GetItemName', + 'ReplaceText', 'EatStr' + ), + 4 => array( //common almost-global (actor) functions + 'ClientMessage', 'ConsoleCommand', 'CopyObjectToClipboard', 'TextToSpeech', + 'Error', 'Sleep', 'SetCollision', 'SetCollisionSize', 'SetDrawScale', 'SetDrawScale3D', + 'SetStaticMesh', 'SetDrawType', 'Move', 'SetLocation', 'SetRotation', + 'SetRelativeLocation', 'SetRelativeRotation', 'MoveSmooth', 'AutonomousPhysics', + 'SetBase', 'SetOwner', 'IsJoinedTo', 'GetMeshName', 'PlayAnim', 'LoopAnim', 'TweenAnim', + 'IsAnimating', 'FinishAnim', 'HasAnim', 'StopAnimating', 'FreezeFrameAt', 'SetAnimFrame', + 'IsTweening', 'AnimStopLooping', 'AnimEnd', 'LinkSkelAnim', 'LinkMesh', 'BoneRefresh', + 'GetBoneCoords', 'GetBoneRotation', 'GetRootLocation', 'GetRootRotation', 'AttachToBone', + 'DetachFromBone', 'SetBoneScale', 'UpdateURL', 'GetURLOption', 'SetPhysics', 'KAddImpulse', + 'KImpact', 'KApplyForce', 'Clock', 'UnClock', 'Destroyed', 'GainedChild', 'LostChild', + 'Tick', 'PostNetReceive', 'ClientTrigger', 'Trigger', 'UnTrigger', 'BeginEvent', 'EndEvent', + 'Timer', 'HitWall', 'Falling', 'Landed', 'ZoneChange', 'PhysicsVolumeChange', 'Touch', + 'PostTouch', 'UnTouch', 'Bump', 'BaseChange', 'Attach', 'Detach', 'SpecialHandling', + 'EncroachingOn', 'EncroachedBy', 'RanInto', 'FinishedInterpolation', 'EndedRotation', + 'UsedBy', 'FellOutOfWorld', 'KilledBy', 'TakeDamage', 'HealDamage', 'Trace', 'FastTrace', + 'TraceThisActor', 'spawn', 'Destroy', 'TornOff', 'SetTimer', 'PlaySound', 'PlayOwnedSound', + 'GetSoundDuration', 'MakeNoise', 'BeginPlay', 'GetAllInt', 'RenderOverlays', 'RenderTexture', + 'PreBeginPlay', 'PostBeginPlay', 'PostNetBeginPlay', 'HurtRadius', 'Reset', 'Crash' + ), + 5 => array( //data types + 'none', 'null', + 'float', 'int', 'bool', 'byte', 'char', 'double', 'iterator', 'name', 'string', //primitive + 'plane', 'rotator', 'vector', 'spline', 'coords', 'Quat', 'Range', 'RangeVector', //structs + 'Scale', 'Color', 'Box', 'IntBox', 'FloatBox', 'BoundingVolume', 'Matrix', 'InterpCurvePoint', + 'InterpCurve', 'CompressedPosition', 'TMultiMap', 'PointRegion', + 'KRigidBodyState', 'KSimParams', 'AnimRep', 'FireProperties', + 'lodmesh', 'skeletalmesh', 'mesh', 'StaticMesh', 'MeshInstance', //3d resources + 'sound', //sound resources + 'material', 'texture', 'combiner', 'modifier', 'ColorModifier', 'FinalBlend', //2d resources + 'MaterialSequence', 'MaterialSwitch', 'OpacityModifier', 'TexModifier', 'TexEnvMap', + 'TexCoordSource', 'TexMatrix', 'TexOscillator', 'TexPanner', 'TexRotator', 'TexScaler', + 'RenderedMaterial', 'BitmapMaterial', 'ScriptedTexture', 'ShadowBitmapMaterial', 'Cubemap', + 'FractalTexture', 'FireTexture', 'IceTexture', 'WaterTexture', 'FluidTexture', 'WaveTexture', + 'WetTexture', 'ConstantMaterial', 'ConstantColor', 'FadeColor', 'ParticleMaterial', + 'ProjectorMaterial', 'Shader', 'TerrainMaterial', 'VertexColor' + ), + 6 => array( //misc keywords + 'false', 'true', 'self', 'super', 'MaxInt', 'Pi' + ), + 7 => array( //common actor enums & variables + 'DT_None', 'DT_Sprite', 'DT_Mesh', 'DT_Brush', 'DT_RopeSprite', + 'DT_VerticalSprite', 'DT_TerraForm', 'DT_SpriteAnimOnce', 'DT_StaticMesh', 'DT_DrawType', + 'DT_Particle', 'DT_AntiPortal', 'DT_FluidSurface', + 'PHYS_None', 'PHYS_Walking', 'PHYS_Falling', 'PHYS_Swimming', 'PHYS_Flying', + 'PHYS_Rotating', 'PHYS_Projectile', 'PHYS_Interpolating', 'PHYS_MovingBrush', 'PHYS_Spider', + 'PHYS_Trailer', 'PHYS_Ladder', 'PHYS_RootMotion', 'PHYS_Karma', 'PHYS_KarmaRagDoll', + 'PHYS_Hovering', 'PHYS_CinMotion', + 'ROLE_None', 'ROLE_DumbProxy', 'ROLE_SimulatedProxy', + 'ROLE_AutonomousProxy', 'ROLE_Authority', + 'STY_None', 'STY_Normal', 'STY_Masked', 'STY_Translucent', 'STY_Modulated', 'STY_Alpha', + 'STY_Additive', 'STY_Subtractive', 'STY_Particle', 'STY_AlphaZ', + 'OCCLUSION_None', 'OCCLUSION_BSP', 'OCCLUSION_Default', 'OCCLUSION_StaticMeshes', + 'SLOT_None', 'SLOT_Misc', 'SLOT_Pain', 'SLOT_Interact', 'SLOT_Ambient', 'SLOT_Talk', + 'SLOT_Interface', 'MTRAN_None', 'MTRAN_Instant', 'MTRAN_Segue', 'MTRAN_Fade', + 'MTRAN_FastFade', 'MTRAN_SlowFade', + + 'DrawType', 'Physics', 'Owner', 'Base', 'Level', 'Game', 'Instigator', 'RemoteRole', 'Role', + 'LifeSpan', 'Tag', 'Event', 'Location', 'Rotation', 'Velocity', 'Acceleration', + 'RelativeLocation', 'RelativeRotation', 'DrawScale', 'DrawScale3D', 'Skins', 'Style', + 'SoundVolume', 'SoundPitch', 'SoundRadius', 'TransientSoundVolume', 'TransientSoundRadius', + 'CollisionRadius', 'CollisionHeight', 'Mass', 'Buoyancy', 'RotationRate', 'DesiredRotation' + ), + 8 => array( //common non-actor uscript classes + 'Object', + 'CacheManager', 'CameraEffect', 'Canvas', 'CheatManager', 'Commandlet', 'DecoText', 'GUI', + 'InteractionMaster', 'Interactions', 'Interaction', 'KarmaParamsCollision', 'KarmaParamsRBFull', + 'KarmaParamsSkel', 'KarmaParams', 'LevelSummary', 'Locale', 'Manifest', 'MaterialFactory', + 'MeshObject', 'ObjectPool', 'Pallete', + 'ParticleEmitter', 'MeshEmitter', 'BeamEmitter', 'SpriteEmitter', 'SparkEmitter', 'TrailEmitter', + 'Player', 'PlayerInput', 'PlayInfo', 'ReachSpec', 'Resource', 'LatentScriptedAction', 'ScriptedAction', + 'speciesType', 'StreamBase', 'Stream', 'EditorEngine', 'Engine', 'Time', 'WeaponFire', + 'WebApplication', 'WebRequest', 'WebResponse', 'WebSkin', 'xPawnGibGroup', 'xPawnSoundGroup', + 'xUtil' + ), + 9 => array( //common actor-based uscript classes + 'Actor', + 'Controller', 'AIController', 'ScriptedController', 'Bot', 'xBot', + 'PlayerController', 'UnrealPlayer', 'xPlayer', + 'DamageType', 'WeaponDamageType', 'Effects', 'Emitter', 'NetworkEmitter', + 'Gib', 'HUD', 'HudBase', 'Info', 'FluidSurfaceInfo', 'Combo', + 'GameInfo', 'UnrealMPGameInfo', 'DeathMatch', 'TeamGame', 'CTFGame', + 'xCTFGame', 'xBombingRun', 'xDoubleDom', 'xTeamGame', + 'ASGameInfo', 'Invasion', 'ONSOnslaughtGame', 'xDeathmatch', + 'Mutator', 'Inventory', 'Ammunition', 'KeyInventory', 'Powerups', 'Armor', 'Weapon', + 'InventoryAttachment', 'WeaponAttachment', + 'KActor', 'KConstraint', 'KBSJoint', 'KCarWheelJoint', 'KConeLimit', 'KHinge', 'KTire', + 'KVehicleFactory', 'Keypoint', 'AIScript', 'ScriptedSequence', 'ScriptedTrigger', + 'AmbientSound', 'Light', 'SpotLight', 'SunLight', 'TriggerLight', + 'MeshEffect', 'NavigationPoint', 'GameObjective', 'DestroyableObjective', + 'PathNode', 'FlyingPathNode', 'RoadPathNode', 'InventorySpot', 'PlayerStart', + 'Pawn', 'Vehicle', 'UnrealPawn', 'xPawn', 'Monster', 'ASVehicle', 'KVehicle', 'KCar', + 'ONSWeaponPawn', 'SVehicle', 'ONSVehicle', 'ONSChopperCraft', 'ONSHoverCraft', + 'ONSPlaneCraft', 'ONSTreadCraft', 'ONSWheeledCraft', + 'Pickup', 'Ammo', 'UTAmmoPickup', 'ArmorPickup', 'KeyPickup', 'TournamentPickup', + 'Projectile', 'Projector', 'DynamicProjector', 'ShadowProjector', 'xScorch', + 'xEmitter', 'xPickupBase', 'xProcMesh', 'xWeatherEffect', 'PhysicsVolume', 'Volume' + ), + 10 => array( //symbol-like operators + 'dot','cross' + ) + ), + 'SYMBOLS' => array( + '+','-','=','/','*','-','%','>','<','&','^','!','|','`','(',')','[',']','{','}', + '<<','>>','$','@' + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => false, + 1 => false, + 2 => false, + 3 => false, + 4 => false, + 5 => false, + 6 => false, + 7 => false, + 8 => false, + 9 => false, + 10 => false, + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: #0000FF;', + 2 => 'color: #0000FF;', + 3 => 'color: #0066AA;', + 4 => 'color: #0088FF;', + 5 => 'color: #E000E0;', + 6 => 'color: #900000;', + 7 => 'color: #888800;', + 8 => 'color: #AA6600;', + 9 => 'color: #FF8800;', + 10 => 'color: #0000FF;' + ), + 'COMMENTS' => array( + 1 => 'color: #008080; font-style: italic;', + 2 => 'color: #000000; font-weight: bold;', + 'MULTI' => 'color: #008080; font-style: italic;' + ), + 'ESCAPE_CHAR' => array( + 0 => '' + ), + 'BRACKETS' => array( + 0 => 'color: #000000;' + ), + 'STRINGS' => array( + 0 => 'color: #999999;' + ), + 'NUMBERS' => array( + 0 => 'color: #FF0000;' + ), + 'METHODS' => array( + 0 => 'color: #006600;' + ), + 'SYMBOLS' => array( + 0 => 'color: #669966;' + ), + 'REGEXPS' => array( + 0 => 'color: #E000E0;', + 1 => 'color: #E000E0;' + ), + 'SCRIPT' => array( + 0 => '' + ) + ), + 'URLS' => array( + 1 => '', + 2 => '', + 3 => '', + 4 => '', + 5 => '', + 6 => '', + 7 => '', + 8 => 'http://wiki.beyondunreal.com/wiki?search={FNAME}', + 9 => 'http://wiki.beyondunreal.com/wiki?search={FNAME}', + 10 => '' + ), + 'OOLANG' => true, + 'OBJECT_SPLITTERS' => array('.'), + 'REGEXPS' => array( //handle template-style variable definitions + 0 => array( + GESHI_SEARCH => '(class\s*)<(\s*(\w+)\s*)>', + GESHI_REPLACE => "\${1}", + GESHI_MODIFIERS => 'i', + GESHI_BEFORE => '', + GESHI_AFTER => "< \${3} >" + ), + 1 => array( + GESHI_SEARCH => '(array\s*)<(\s*(\w+)\s*)>', + GESHI_REPLACE => "\${1}", + GESHI_MODIFIERS => 'i', + GESHI_BEFORE => '', + GESHI_AFTER => "< \${3} >" + ) + ), + 'STRICT_MODE_APPLIES' => GESHI_NEVER, + 'SCRIPT_DELIMITERS' => array( + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + ), + 'PARSER_CONTROL' => array( + 'KEYWORDS' => array( + 10 => array( + 'DISALLOWED_BEFORE' => '(?<!<)(?=DOT>)' + ) + ) + ) +); + +?> diff --git a/inc/geshi/vala.php b/inc/geshi/vala.php index 334398a871cdccee996da2270bbdb37d12ef6f28..a9d6b0745d04aff6ee8ceca9a53900d2e402e4aa 100644 --- a/inc/geshi/vala.php +++ b/inc/geshi/vala.php @@ -4,7 +4,7 @@ * ---------- * Author: Nicolas Joseph (nicolas.joseph@valaide.org) * Copyright: (c) 2009 Nicolas Joseph - * Release Version: 1.0.8.8 + * Release Version: 1.0.8.10 * Date Started: 2009/04/29 * * Vala language file for GeSHi. diff --git a/inc/geshi/vb.php b/inc/geshi/vb.php index f24d865059fcead293075b1d7834a4ac6734a845..dd6545eb551c0680ab54765571fc4afd549fdbc8 100644 --- a/inc/geshi/vb.php +++ b/inc/geshi/vb.php @@ -5,7 +5,7 @@ * Author: Roberto Rossi (rsoftware@altervista.org) * Copyright: (c) 2004 Roberto Rossi (http://rsoftware.altervista.org), * Nigel McNie (http://qbnz.com/highlighter) - * Release Version: 1.0.8.8 + * Release Version: 1.0.8.10 * Date Started: 2004/08/30 * * Visual Basic language file for GeSHi. diff --git a/inc/geshi/vbnet.php b/inc/geshi/vbnet.php index f74775214b35c0adc188061c852e31518809ee5f..563bb993acd11ef938acff843c9e8c51c7d4bd85 100644 --- a/inc/geshi/vbnet.php +++ b/inc/geshi/vbnet.php @@ -4,7 +4,7 @@ * --------- * Author: Alan Juden (alan@judenware.org) * Copyright: (c) 2004 Alan Juden, Nigel McNie (http://qbnz.com/highlighter) - * Release Version: 1.0.8.8 + * Release Version: 1.0.8.10 * Date Started: 2004/06/04 * * VB.NET language file for GeSHi. diff --git a/inc/geshi/verilog.php b/inc/geshi/verilog.php index 14c1d7172a5e0830983c189b6b847d0d53707335..9e4211eb9cbcc8902fd78d76ecfae3d586b7e7f7 100644 --- a/inc/geshi/verilog.php +++ b/inc/geshi/verilog.php @@ -4,7 +4,7 @@ * ----------- * Author: G�nter Dannoritzer <dannoritzer@web.de> * Copyright: (C) 2008 Guenter Dannoritzer - * Release Version: 1.0.8.8 + * Release Version: 1.0.8.10 * Date Started: 2008/05/28 * * Verilog language file for GeSHi. diff --git a/inc/geshi/vhdl.php b/inc/geshi/vhdl.php index 6856933c7b02412cdbbb917fa94f07e5ff1316b1..f6ce941d4cc254c993ccae477d6ac1d4cbca5b47 100644 --- a/inc/geshi/vhdl.php +++ b/inc/geshi/vhdl.php @@ -4,7 +4,7 @@ * -------- * Author: Alexander 'E-Razor' Krause (admin@erazor-zone.de) * Copyright: (c) 2005 Alexander Krause - * Release Version: 1.0.8.8 + * Release Version: 1.0.8.10 * Date Started: 2005/06/15 * * VHDL (VHSICADL, very high speed integrated circuit HDL) language file for GeSHi. diff --git a/inc/geshi/vim.php b/inc/geshi/vim.php index f4f93ad2ed155f25275d00a7e6ae01ab169e4348..68abc272ef1c9d9b42756d7e30d53ad40013590f 100644 --- a/inc/geshi/vim.php +++ b/inc/geshi/vim.php @@ -6,7 +6,7 @@ * Contributors: * - Laurent Peuch (psycojoker@gmail.com) * Copyright: (c) 2008 Swaroop C H (http://www.swaroopch.com) - * Release Version: 1.0.8.8 + * Release Version: 1.0.8.10 * Date Started: 2008/10/19 * * Vim scripting language file for GeSHi. diff --git a/inc/geshi/visualfoxpro.php b/inc/geshi/visualfoxpro.php index 7d804257f18fb272dfecde5331fbb9fd742b60f8..322f34baef742787b130ba8755db4b1524fc2418 100644 --- a/inc/geshi/visualfoxpro.php +++ b/inc/geshi/visualfoxpro.php @@ -4,7 +4,7 @@ * ---------------- * Author: Roberto Armellin (r.armellin@tin.it) * Copyright: (c) 2004 Roberto Armellin, Nigel McNie (http://qbnz.com/highlighter/) - * Release Version: 1.0.8.8 + * Release Version: 1.0.8.10 * Date Started: 2004/09/17 * * Visual FoxPro language file for GeSHi. diff --git a/inc/geshi/visualprolog.php b/inc/geshi/visualprolog.php index 5afd7de8ddaf589017a537e58d95ed2996f7967d..a51466dcd4b1769261c45956c7fdfa14012e3b6b 100644 --- a/inc/geshi/visualprolog.php +++ b/inc/geshi/visualprolog.php @@ -4,7 +4,7 @@ * ---------- * Author: Thomas Linder Puls (puls@pdc.dk) * Copyright: (c) 2008 Thomas Linder Puls (puls@pdc.dk) - * Release Version: 1.0.8.8 + * Release Version: 1.0.8.10 * Date Started: 2008/11/20 * * Visual Prolog language file for GeSHi. diff --git a/inc/geshi/whitespace.php b/inc/geshi/whitespace.php index c47775d44a7f7b6ea0971ef7d32a30ec9fcb94a0..3e19b60ce2b36cdb1f6102a5403be91e2f697e52 100644 --- a/inc/geshi/whitespace.php +++ b/inc/geshi/whitespace.php @@ -4,7 +4,7 @@ * ---------- * Author: Benny Baumann (BenBE@geshi.org) * Copyright: (c) 2008 Benny Baumann (http://qbnz.com/highlighter/) - * Release Version: 1.0.8.8 + * Release Version: 1.0.8.10 * Date Started: 2009/10/31 * * Whitespace language file for GeSHi. diff --git a/inc/geshi/whois.php b/inc/geshi/whois.php index 9b4b241793cdd2237a96867395c3fb16f5486e4a..ae851cd08ca35fc3ef3b5baae4b510ab8d08240d 100644 --- a/inc/geshi/whois.php +++ b/inc/geshi/whois.php @@ -4,7 +4,7 @@ * -------- * Author: Benny Baumann (BenBE@geshi.org) * Copyright: (c) 2008 Benny Baumann (http://qbnz.com/highlighter/) - * Release Version: 1.0.8.8 + * Release Version: 1.0.8.10 * Date Started: 2008/09/14 * * Whois response (RPSL format) language file for GeSHi. diff --git a/inc/geshi/winbatch.php b/inc/geshi/winbatch.php index 949e61c142990c40571f6d4e701d959550ecaf21..d27fe070f671a8358b5d022098298328328eac0f 100644 --- a/inc/geshi/winbatch.php +++ b/inc/geshi/winbatch.php @@ -4,7 +4,7 @@ * ------------ * Author: Craig Storey (storey.craig@gmail.com) * Copyright: (c) 2004 Craig Storey (craig.xcottawa.ca) - * Release Version: 1.0.8.8 + * Release Version: 1.0.8.10 * Date Started: 2006/05/19 * * WinBatch language file for GeSHi. diff --git a/inc/geshi/xbasic.php b/inc/geshi/xbasic.php index a2d85a6df69e5c0518958794dc06456222d97efa..94a2debf1829c6e45bc89df3f070b17e447358e7 100644 --- a/inc/geshi/xbasic.php +++ b/inc/geshi/xbasic.php @@ -4,9 +4,8 @@ * ---------- * Author: José Gabriel Moya Yangüela (josemoya@gmail.com) * Copyright: (c) 2005 José Gabriel Moya Yangüela (http://aprenderadesaprender.6te.net) - * Release Version: 1.0.8.8 + * Release Version: 1.0.8.10 * Date Started: 2005/11/23 - * Last Modified: $Date: 2010/01/30 00:42:00 $ * * XBasic language file for GeSHi. * diff --git a/inc/geshi/xml.php b/inc/geshi/xml.php index efd3e6c332d272ab06944c234036c684d8822dfb..4a420d1b733aa0ca4a0104ded777adce89f7d491 100644 --- a/inc/geshi/xml.php +++ b/inc/geshi/xml.php @@ -4,7 +4,7 @@ * ------- * Author: Nigel McNie (nigel@geshi.org) * Copyright: (c) 2004 Nigel McNie (http://qbnz.com/highlighter/) - * Release Version: 1.0.8.8 + * Release Version: 1.0.8.10 * Date Started: 2004/09/01 * * XML language file for GeSHi. Based on the idea/file by Christian Weiske diff --git a/inc/geshi/xorg_conf.php b/inc/geshi/xorg_conf.php index 5cde8e171318997937775602b7e375561a9599cd..e1fff61b5977bada1351f87a52ccca0bbab8e2a4 100644 --- a/inc/geshi/xorg_conf.php +++ b/inc/geshi/xorg_conf.php @@ -4,7 +4,7 @@ * ---------- * Author: Milian Wolff (mail@milianw.de) * Copyright: (c) 2008 Milian Wolff (http://milianw.de) - * Release Version: 1.0.8.8 + * Release Version: 1.0.8.10 * Date Started: 2008/06/18 * * xorg.conf language file for GeSHi. diff --git a/inc/geshi/xpp.php b/inc/geshi/xpp.php index 216c46eaf335f1758e10fd78ca05ad67295e461c..d4d7b457d47af38fc3b7c916e346b81a4332204d 100644 --- a/inc/geshi/xpp.php +++ b/inc/geshi/xpp.php @@ -4,7 +4,7 @@ * ------- * Author: Simon Butcher (simon@butcher.name) * Copyright: (c) 2007 Simon Butcher (http://simon.butcher.name/) - * Release Version: 1.0.8.8 + * Release Version: 1.0.8.10 * Date Started: 2007/02/27 * * Axapta/Dynamics Ax X++ language file for GeSHi. diff --git a/inc/geshi/yaml.php b/inc/geshi/yaml.php new file mode 100644 index 0000000000000000000000000000000000000000..1b3ce96f2dbd5298de41c60d1affc91526ccb6e6 --- /dev/null +++ b/inc/geshi/yaml.php @@ -0,0 +1,150 @@ +<?php +/************************************************************************************* + * yaml.php + * -------- + * Author: Josh Ventura (JoshV10@gmail.com) + * Copyright: (c) 2010 Josh Ventura + * Release Version: 1.0.8.10 + * Date Started: 2010/12/14 + * + * YAML language file for GeSHi. + * + * YAML gets hairy sometimes. If anything needs fixed, drop me an email and + * I'll probably spit up on it. This is, in general, not a long format. + * + * CHANGES + * --------- + * 2010/12/14 + * - Started project in rage over GML support but not YAML support. WTFH? + * 2010/12/15 + * - Submitted to Ben. + * + * TODO (not updated since release) + * ---------------------------------- + * - Field testing and necessary corrections: this grammar file is usable, but not + * completely accurate. There are, in fact, multiple cases in which it will mess + * up, and some of it may need moved around. It is the most temperamental parser + * I have ever associated my name with. Points of interest follow: + * * Improvised support for | and >: since PHP offers no variable-width lookbehind, + * these blocks will still be highlighted even when commented out. As it happens, + * any line ending with | or > could result in the unintentional highlighting of + * all remaining lines in the file, just because I couldn't check for this regex + * as a lookbehind: '/:(\s+)(!!(\w+)(\s+))?/' + * If there is a workaround for that, it needs implemented. + * * I may be missing some operators. I deliberately omitted inline array notation + * as, in general, it's ugly and tends to conflict with plain-text. Ensuring all + * highlighted list delimiters are not plain text would be as simple as checking + * that they follow a colon directly. Alas, without variable-length lookbehinds, + * if there is a way to do so in GeSHi I am unaware of it. + * * I kind of whored the comment regexp array. It seemed like a safe bet, so it's + * where I crammed everything. Some of it may need moved elsewhere for neatness. + * * The !!typename highlight needs not to interfere with ": |" and ": >": Pairing + * key: !!type | value is perfectly legal, but again due to lookbehind issues, I + * can't add a case for that. Also, it is likely that multiple spaces can be put + * between the colon and pipe symbol, which would also break it. + * + ************************************************************************************* + * + * This file is part of GeSHi. + * + * GeSHi is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * GeSHi is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with GeSHi; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + ************************************************************************************/ + +$language_data = array ( + 'LANG_NAME' => 'YAML', + 'COMMENT_SINGLE' => array(), + 'COMMENT_MULTI' => array(), + //Keys + 'COMMENT_REGEXP' => array( // ENTRY ZERO SHOULD CHECK FOR (\n(\s*)([^#%]+?):(\s+)(!!(\w+)(\s+))?) AS A LOOKBEHIND, BUT IT CAN'T. + 0 => '/(?<=\s[\|>]\n)(\s+)(.*)((?=[\n$])(([\n^](\1(.*)|(?=[\n$])))*)|$)/', // Pipe blocks and > blocks. + 1 => '/#(.*)/', // Blue # comments + 2 => '/%(.*)/', // Red % comments + 3 => '/(^|\n)([^#%^\n]+?)(?=: )/', // Key-value names + 4 => '/(^|\n)([^#%^\n]+?)(?=:\n)/',// Key-group names + 5 => '/(?<=^---)(\s*)!(\S+)/', // Comments after --- + 6 => '/(?<=: )(\s*)\&(\S+)/', // References + 7 => '/(?<=: )(\s*)\*(\S+)/', // Dereferences + 8 => '/!!(\w+)/', // Types + //9 => '/(?<=\n)(\s*)-(?!-)/', // List items: This needs to search within comments 3 and 4, but I don't know how. + ), + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array('"'), + 'ESCAPE_CHAR' => '', + 'KEYWORDS' => array( + 1 => array( + 'all','any','none', "yes", "no" + ), + ), + 'SYMBOLS' => array( + 1 => array('---', '...'), + 2 => array(': ', ">\n", "|\n", '<<:', ":\n") // It'd be nice if I could specify that the colon must + // follow comment 3 or 4 to be considered, and the > and | + // must follow such a colon. + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => false, + 1 => false, + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'font-weight: bold;' + ), + 'COMMENTS' => array( + 0 => 'color: #303050;background-color: #F5F5F5', + 1 => 'color: blue;', + 2 => 'font-weight: bold; color: red;', + 3 => 'color: green;', + 4 => 'color: #007F45;', + 5 => 'color: #7f7fFF;', + 6 => 'color: #FF7000;', + 7 => 'color: #FF45C0;', + 8 => 'font-weight: bold; color: #005F5F;', + //9 => 'font-weight: bold; color: #000000;', + ), + 'ESCAPE_CHAR' => array( + ), + 'BRACKETS' => array( + ), + 'STRINGS' => array( + 0 => 'color: #CF00CF;' + ), + 'NUMBERS' => array( + // 0 => 'color: #33f;' // Don't highlight numbers, really... + ), + 'METHODS' => array( + 1 => '', + 2 => '' + ), + 'SYMBOLS' => array( + 1 => 'color: cyan;', + 2 => 'font-weight: bold; color: brown;' + ), + 'REGEXPS' => array( + ), + 'SCRIPT' => array( + 0 => '' + ) + ), + 'URLS' => array(1 => ''), + 'OOLANG' => false, + 'OBJECT_SPLITTERS' => array( ), + 'REGEXPS' => array( ), + 'STRICT_MODE_APPLIES' => GESHI_NEVER, + 'SCRIPT_DELIMITERS' => array( ), + 'HIGHLIGHT_STRICT_BLOCK' => array( ) +); + +?> \ No newline at end of file diff --git a/inc/geshi/z80.php b/inc/geshi/z80.php index f28593cd25dcb3d90f8909dd48e839cd607505dd..cb92e96920f583bfafbfcb4db5c59f5528e8d32d 100644 --- a/inc/geshi/z80.php +++ b/inc/geshi/z80.php @@ -4,7 +4,7 @@ * ------- * Author: Benny Baumann (BenBE@omorphia.de) * Copyright: (c) 2007-2008 Benny Baumann (http://www.omorphia.de/) - * Release Version: 1.0.8.8 + * Release Version: 1.0.8.10 * Date Started: 2007/02/06 * * ZiLOG Z80 Assembler language file for GeSHi. diff --git a/inc/geshi/zxbasic.php b/inc/geshi/zxbasic.php new file mode 100644 index 0000000000000000000000000000000000000000..b32b8950a5fb8387c8b2acb1f2687147d769fae8 --- /dev/null +++ b/inc/geshi/zxbasic.php @@ -0,0 +1,150 @@ +<?php +/************************************************************************************* + * zxbasic.php + * ------------- + * Author: Jose Rodriguez (a.k.a. Boriel) + * Based on Copyright: (c) 2005 Roberto Rossi (http://rsoftware.altervista.org) Freebasic template + * Release Version: 1.0.8.10 + * Date Started: 2010/06/19 + * + * ZXBasic language file for GeSHi. + * + * More details at http://www.zxbasic.net/ + * + * CHANGES + * ------- + * 2010/06/19 (1.0.0) + * - First Release + * + * TODO (updated 2007/02/06) + * ------------------------- + * + ************************************************************************************* + * + * This file is part of GeSHi. + * + * GeSHi is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * GeSHi is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with GeSHi; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + ************************************************************************************/ + +$language_data = array ( + 'LANG_NAME' => 'ZXBasic', + 'COMMENT_SINGLE' => array( + 1 => "'", + 2 => '#', + 3 => 'REM' + ), + 'COMMENT_MULTI' => array("/'" => "'/"), + 'CASE_KEYWORDS' => GESHI_CAPS_UPPER, //GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array('"'), + 'ESCAPE_CHAR' => '\\', + 'KEYWORDS' => array( + 1 => array( + "ASM", "BEEP", "BOLD", "BORDER", "BRIGHT", "ByRef", "ByVal", "CAST", + "CIRCLE", "CLS", "CONST", "CONTINUE", "DECLARE", "DIM", "DO", + "DRAW", "ELSE", "ELSEIF", "END", "EXIT", "FastCall", "FLASH", "FOR", + "FUNCTION", "GOTO", "GOSUB", "GO", "IF", "INK", "INVERSE", "ITALIC", + "LET", "LOAD", "LOOP", "NEXT", "OVER", "PAPER", "PAUSE", "PI", + "PLOT", "POKE", "PRINT", "RANDOMIZE", "REM", "RETURN", "SAVE", + "StdCall", "Sub", "THEN", "TO", "UNTIL", "VERIFY", "WEND", "WHILE", + ), + + // types + 2 => array( + 'byte', 'ubyte', 'integer', 'uinteger', 'long', 'ulong', 'fixed', + 'float', 'string' + ), + + // Functions + 3 => array( + "ABS", "ACS", "ASN", "ATN", "CHR", "CODE", "COS", "CSRLIN", "EXP", + "HEX", "HEX16", "INKEY", "INT", "LEN", "LN", "PEEK", "POS", "RND", + "SCREEN$", "SGN", "SIN", "SQR", "STR", "TAN", "VAL", + ), + + // Operators and modifiers + 4 => array( + "AT", "AS", "AND", "MOD", "NOT", "OR", "SHL", "SHR", "STEP", "XOR" + ) + ), + 'SYMBOLS' => array( + '(', ')' + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => false, + 1 => false, + 2 => false, + 3 => false, + 4 => false + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: #000080; font-weight: bold;', // Commands + 2 => 'color: #800080; font-weight: bold;', // Types + 3 => 'color: #006000; font-weight: bold;', // Functions + 4 => 'color: #801010; font-weight: bold;' // Operators and Modifiers + ), + 'COMMENTS' => array( + 1 => 'color: #808080; font-style: italic;', + 2 => 'color: #339933;', + 3 => 'color: #808080; font-style: italic;', + 'MULTI' => 'color: #808080; font-style: italic;' + ), + 'BRACKETS' => array( + //0 => 'color: #66cc66;' + 0 => 'color: #007676;' + ), + 'STRINGS' => array( + //0 => 'color: #ff0000;' + 0 => 'color: #A00000; font-style: italic;' + ), + 'NUMBERS' => array( + //0 => 'color: #cc66cc;' + 0 => 'color: #b05103;'// font-weight: bold;' + ), + 'METHODS' => array( + 0 => 'color: #66cc66;' + ), + 'SYMBOLS' => array( + 0 => 'color: #66cc66;' + ), + 'ESCAPE_CHAR' => array( + 0 => 'color: #000099;' + ), + 'SCRIPT' => array( + ), + 'REGEXPS' => array( + ) + ), + 'URLS' => array( + 1 => '', + 2 => '', + 3 => '', + 4 => '' + ), + 'OOLANG' => true, + 'OBJECT_SPLITTERS' => array( + 1 => '.' + ), + 'REGEXPS' => array( + ), + 'STRICT_MODE_APPLIES' => GESHI_NEVER, + 'SCRIPT_DELIMITERS' => array( + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + ) +); + +?> \ No newline at end of file diff --git a/inc/html.php b/inc/html.php index 0b297a347a0038658e2f2a13006158d0d9ed0126..a20ee5c3970cc7e4bf480abec0ee14adc311343f 100644 --- a/inc/html.php +++ b/inc/html.php @@ -280,8 +280,11 @@ function html_draft(){ * @author Harry Fuecks <hfuecks@gmail.com> */ function html_hilight($html,$phrases){ - $phrases = array_filter((array) $phrases); - $regex = join('|',array_map('ft_snippet_re_preprocess', array_map('preg_quote_cb',$phrases))); + $phrases = (array) $phrases; + $phrases = array_map('preg_quote_cb', $phrases); + $phrases = array_map('ft_snippet_re_preprocess', $phrases); + $phrases = array_filter($phrases); + $regex = join('|',$phrases); if ($regex === '') return $html; if (!utf8_check($regex)) return $html; @@ -1441,7 +1444,7 @@ function html_edit_form($param) { global $TEXT; if ($param['target'] !== 'section') { - msg('No editor for edit target ' . $param['target'] . ' found.', -1); + msg('No editor for edit target ' . hsc($param['target']) . ' found.', -1); } $attr = array('tabindex'=>'1'); diff --git a/inc/infoutils.php b/inc/infoutils.php index 2b84869065e16a7eeee34a757a46b9524f173136..ff752cd0f841bfb4ea346c772f3427a19e850d63 100644 --- a/inc/infoutils.php +++ b/inc/infoutils.php @@ -25,11 +25,14 @@ function checkUpdateMessages(){ // check if new messages needs to be fetched if($lm < time()-(60*60*24) || $lm < @filemtime(DOKU_INC.DOKU_SCRIPT)){ + dbglog("checkUpdatesMessages(): downloading messages.txt"); $http = new DokuHTTPClient(); $http->timeout = 8; $data = $http->get(DOKU_MESSAGEURL.$updateVersion); io_saveFile($cf,$data); + @touch($cf); }else{ + dbglog("checkUpdatesMessages(): messages.txt up to date"); $data = io_readFile($cf); } diff --git a/inc/init.php b/inc/init.php index d57e12d7b30a5188b1d727d684c9ffe9b10b6758..a280507366547b27a91eb13b862ef604ceeaf33d 100644 --- a/inc/init.php +++ b/inc/init.php @@ -3,7 +3,9 @@ * Initialize some defaults needed for DokuWiki */ -// start timing Dokuwiki execution +/** + * timing Dokuwiki execution + */ function delta_time($start=0) { return microtime(true)-((float)$start); } @@ -197,6 +199,10 @@ if (empty($plugin_controller_class)) $plugin_controller_class = 'Doku_Plugin_Con // load libraries require_once(DOKU_INC.'inc/load.php'); +// input handle class +global $INPUT; +$INPUT = new Input(); + // initialize plugin controller $plugin_controller = new $plugin_controller_class(); @@ -233,10 +239,11 @@ function init_paths(){ 'lockdir' => 'locks', 'tmpdir' => 'tmp'); - foreach($paths as $c => $p){ - if(empty($conf[$c])) $conf[$c] = $conf['savedir'].'/'.$p; - $conf[$c] = init_path($conf[$c]); - if(empty($conf[$c])) nice_die("The $c ('$p') does not exist, isn't accessible or writable. + foreach($paths as $c => $p) { + $path = empty($conf[$c]) ? $conf['savedir'].'/'.$p : $conf[$c]; + $conf[$c] = init_path($path); + if(empty($conf[$c])) + nice_die("The $c ('$p') at $path is not found, isn't accessible or writable. You should check your config and permission settings. Or maybe you want to <a href=\"install.php\">run the installer</a>?"); @@ -265,7 +272,7 @@ function init_lang($langCode) { } /** - * Checks the existance of certain files and creates them if missing. + * Checks the existence of certain files and creates them if missing. */ function init_files(){ global $conf; @@ -307,12 +314,12 @@ function init_files(){ * Returns absolute path * * This tries the given path first, then checks in DOKU_INC. - * Check for accessability on directories as well. + * Check for accessibility on directories as well. * * @author Andreas Gohr <andi@splitbrain.org> */ function init_path($path){ - // check existance + // check existence $p = fullpath($path); if(!@file_exists($p)){ $p = fullpath(DOKU_INC.$path); @@ -560,7 +567,7 @@ function fullpath($path,$exists=false){ } $finalpath = $root.implode('/', $newpath); - // check for existance when needed (except when unit testing) + // check for existence when needed (except when unit testing) if($exists && !defined('DOKU_UNITTEST') && !@file_exists($finalpath)) { return false; } diff --git a/inc/lang/ar/lang.php b/inc/lang/ar/lang.php index af92243c97e0c2573a578d38dde6aa4f09564846..350e26695ec75fcaf868153a234b00de8f2e7ea4 100644 --- a/inc/lang/ar/lang.php +++ b/inc/lang/ar/lang.php @@ -42,11 +42,14 @@ $lang['btn_backtomedia'] = 'ارجع إلى اختيار مل٠الوسا $lang['btn_subscribe'] = 'ادر الاشتراكات'; $lang['btn_profile'] = 'ØØ¯Ø« المل٠الشخصي'; $lang['btn_reset'] = 'صÙّر'; +$lang['btn_resendpwd'] = 'اضبط كلمة سر جديدة'; $lang['btn_draft'] = 'ØØ±Ø± المسودة'; $lang['btn_recover'] = 'استرجع المسودة'; $lang['btn_draftdel'] = 'Ø§ØØ°Ù المسوّدة'; $lang['btn_revert'] = 'استعد'; $lang['btn_register'] = 'سجّل'; +$lang['btn_apply'] = 'طبق'; +$lang['btn_media'] = 'مدير الوسائط'; $lang['loggedinas'] = 'داخل باسم'; $lang['user'] = 'اسم المستخدم'; $lang['pass'] = 'كلمة السر'; @@ -76,6 +79,7 @@ $lang['profnoempty'] = 'غير Ù…Ø³Ù…ÙˆØ Ø¨Ø§Ø³Ù… مستخدم أو $lang['profchanged'] = 'ØÙدث المل٠الشخصي للمستخدم بنجاØ.'; $lang['pwdforget'] = 'أنسيت كلمة السر؟ Ø§ØØµÙ„ على ÙˆØ§ØØ¯Ø© جديدة'; $lang['resendna'] = 'هذه الويكي لا تدعم إعادة إرسال كلمة المرور.'; +$lang['resendpwd'] = 'اضبط كلمة سر جديدة لـ'; $lang['resendpwdmissing'] = 'عذراّ، يجب أن تملأ كل الØÙ‚ول.'; $lang['resendpwdnouser'] = 'عذراً، لم نجد المستخدم هذا ÙÙŠ قاعدة بياناتنا.'; $lang['resendpwdbadauth'] = 'عذراً، رمز Ø§Ù„ØªÙØ¹ÙŠÙ„ هذا غير صØÙŠØ. نأكد من استخدامك كامل وصلة التأكيد.'; @@ -90,7 +94,7 @@ $lang['txt_filename'] = 'Ø±ÙØ¹ كـ (اختياري)'; $lang['txt_overwrt'] = 'اكتب على مل٠موجود'; $lang['lockedby'] = 'مقÙلة ØØ§Ù„يا لـ'; $lang['lockexpire'] = 'ينتهي القÙÙ„ ÙÙŠ'; -$lang['js']['willexpire'] = 'سينتهي Ù‚ÙÙ„ ØªØØ±ÙŠØ± هذه Ø§Ù„ØµÙØÙ‡ خلال دقيقة.\nلتجنب التعارض استخدم زر المعاينة لتصÙير مؤقت القÙÙ„.'; +$lang['js']['willexpire'] = 'سينتهي Ù‚ÙÙ„ ØªØØ±ÙŠØ± هذه Ø§Ù„ØµÙØÙ‡ خلال دقيقة.\nلتجنب التعارض استخدم زر المعاينة لتصÙير مؤقت القÙÙ„.'; $lang['js']['notsavedyet'] = 'التعديلات غير المØÙوظة ستÙقد.'; $lang['js']['searchmedia'] = 'Ø§Ø¨ØØ« عن Ù…Ù„ÙØ§Øª'; $lang['js']['keepopen'] = 'أبقي Ø§Ù„Ù†Ø§ÙØ°Ø© Ù…ÙØªÙˆØØ© أثناء الاختيار'; @@ -121,6 +125,17 @@ $lang['js']['nosmblinks'] = 'الروابط لمجلدات مشاركة Ùˆ $lang['js']['linkwiz'] = 'مرشد الروابط'; $lang['js']['linkto'] = 'الرابط إلى :'; $lang['js']['del_confirm'] = 'هل ØÙ‚اً تريد ØØ°Ù البنود المختارة؟'; +$lang['js']['restore_confirm'] = 'أمتأكد من استرجاع هذه النسخة؟'; +$lang['js']['media_diff'] = 'عرض Ø§Ù„ÙØ±ÙˆÙ‚:'; +$lang['js']['media_diff_both'] = 'جنبا إلى جنب'; +$lang['js']['media_diff_opacity'] = 'Shine-through'; +$lang['js']['media_diff_portions'] = 'Swipe'; +$lang['js']['media_select'] = 'اختر Ù…Ù„ÙØ§...'; +$lang['js']['media_upload_btn'] = 'Ø§Ø±ÙØ¹'; +$lang['js']['media_done_btn'] = 'تم'; +$lang['js']['media_drop'] = 'اسقط المل٠هنا Ù„Ø±ÙØ¹Ù‡'; +$lang['js']['media_cancel'] = 'أزل'; +$lang['js']['media_overwrt'] = 'أكتب Ùوق Ø§Ù„Ù…Ù„ÙØ§Øª الموجودة'; $lang['rssfailed'] = 'خطأ ما ØØ¯Ø« أثناء جلب مل٠التغذية:'; $lang['nothingfound'] = 'لا يوجد شيء'; $lang['mediaselect'] = 'Ù…Ù„ÙØ§Øª الوسائط'; @@ -170,11 +185,20 @@ $lang['external_edit'] = 'ØªØØ±ÙŠØ± خارجي'; $lang['summary'] = 'ملخص Ø§Ù„ØªØØ±ÙŠØ±'; $lang['noflash'] = 'ØªØØªØ§Ø¬ إلى<a href="http://www.adobe.com/products/flashplayer/">ملØÙ‚ Ùلاش أدوبي</a> لعرض هذا Ø§Ù„Ù…ØØªÙˆÙ‰.'; $lang['download'] = 'نزل Snippet'; +$lang['tools'] = 'أدوات'; +$lang['user_tools'] = 'أدوات المستخدم'; +$lang['site_tools'] = 'أدوات الموقع'; +$lang['page_tools'] = 'أدوات Ø§Ù„ØµÙØØ©'; +$lang['skip_to_content'] = 'تجاوز إلى Ø§Ù„Ù…ØØªÙˆÙ‰'; $lang['mail_newpage'] = 'Ø¥Ø¶Ø§ÙØ© ØµÙØØ©:'; $lang['mail_changed'] = 'تعديل ØµÙØØ©:'; $lang['mail_subscribe_list'] = 'ØµÙØØ§Øª غيرت ÙÙŠ النطاق:'; $lang['mail_new_user'] = 'مشترك جديد:'; $lang['mail_upload'] = 'Ø±ÙØ¹ ملÙ:'; +$lang['changes_type'] = 'أظهر تغييرات الـ'; +$lang['pages_changes'] = 'ØµÙØØ§Øª'; +$lang['media_changes'] = 'Ù…Ù„ÙØ§Øª الوسائط'; +$lang['both_changes'] = 'كلا من Ø§Ù„ØµÙØØ§Øª ÙˆÙ…Ù„ÙØ§Øª الوسائط'; $lang['qb_bold'] = 'نص عريض'; $lang['qb_italic'] = 'نص مائل'; $lang['qb_underl'] = 'نص مسطر'; @@ -215,6 +239,9 @@ $lang['img_copyr'] = 'ØÙ‚وق النسخ'; $lang['img_format'] = 'الهيئة'; $lang['img_camera'] = 'الكمرا'; $lang['img_keywords'] = 'كلمات Ù…ÙØªØ§ØÙŠØ©'; +$lang['img_width'] = 'العرض'; +$lang['img_height'] = 'Ø§Ù„Ø¥Ø±ØªÙØ§Ø¹'; +$lang['img_manager'] = 'اعرض ÙÙŠ مدير الوسائط'; $lang['subscr_subscribe_success'] = 'اضي٠%s لقائمة اشتراك %s'; $lang['subscr_subscribe_error'] = 'خطأ ÙÙŠ Ø¥Ø¶Ø§ÙØ© %s لقائمة اشتراك %s'; $lang['subscr_subscribe_noaddress'] = 'ليس هناك عنوان مرتبط بولوجك، لا يمكن Ø§Ø¶Ø§ÙØªÙƒ لقائمة الاشتراك'; @@ -233,6 +260,7 @@ $lang['subscr_style_digest'] = 'بريد ملخص عن تغييرات كل ص $lang['subscr_style_list'] = 'قائمة Ø¨Ø§Ù„ØµÙØØ§Øª المتغيرة منذ آخر بريد'; $lang['authmodfailed'] = 'إعدادات ØªØµØ±ÙŠØ ÙØ§Ø³Ø¯Ø©ØŒ يرجى مراسلة المدير.'; $lang['authtempfail'] = 'ØªØµØ±ÙŠØ Ø§Ù„Ù…Ø´ØªØ±Ùƒ غير Ù…ØªÙˆÙØ± مؤقتاً، إن استمرت هذه Ø§Ù„ØØ§Ù„Ø© يرجى مراسلة المدير'; +$lang['authpwdexpire'] = 'ستنتهي صلاØÙŠØ© كلمة السر ÙÙŠ %d . عليك بتغييرها سريعا.'; $lang['i_chooselang'] = 'اختر لغتك'; $lang['i_installer'] = 'برنامج تنصيب دوكو ويكي'; $lang['i_wikiname'] = 'اسم الويكي'; @@ -273,3 +301,27 @@ $lang['hours'] = '%d ساعة مضت'; $lang['minutes'] = '%d دقيقة مضت'; $lang['seconds'] = '%d ثانية مضت'; $lang['wordblock'] = 'لم تØÙظ تغييراتك Ù„Ø§ØØªÙˆØ§Ø¦Ù‡Ø§ على نص ممنوع )غثاء('; +$lang['media_uploadtab'] = 'Ø§Ø±ÙØ¹'; +$lang['media_searchtab'] = 'Ø§Ø¨ØØ«'; +$lang['media_file'] = 'ملÙ'; +$lang['media_viewtab'] = 'عرض'; +$lang['media_edittab'] = 'ØªØØ±ÙŠØ±'; +$lang['media_historytab'] = 'التاريخ'; +$lang['media_list_thumbs'] = 'المصغرات'; +$lang['media_list_rows'] = 'صÙÙˆÙ'; +$lang['media_sort_name'] = 'الاسم'; +$lang['media_sort_date'] = 'التاريخ'; +$lang['media_namespaces'] = 'اختر نطاقا'; +$lang['media_files'] = 'Ø§Ù„Ù…Ù„ÙØ§Øª ÙÙŠ %s'; +$lang['media_upload'] = 'Ø§Ø±ÙØ¹ إلى %s'; +$lang['media_search'] = 'Ø§Ø¨ØØ« ÙÙŠ %s'; +$lang['media_view'] = '%s'; +$lang['media_viewold'] = '%s ÙÙŠ %s'; +$lang['media_edit'] = 'ØØ±Ø± %s'; +$lang['media_history'] = 'تاريخ %s'; +$lang['media_meta_edited'] = 'Ø¹ÙØ¯Ù„ت الميتاداتا'; +$lang['media_perm_read'] = 'عÙوا، لست مخولا بقراءة Ø§Ù„Ù…Ù„ÙØ§Øª.'; +$lang['media_perm_upload'] = 'عÙوا، لست مخولا Ø¨Ø±ÙØ¹ Ø§Ù„Ù…Ù„ÙØ§Øª.'; +$lang['media_update'] = 'Ø§Ø±ÙØ¹ إصدارا Ø£ØØ¯Ø«'; +$lang['media_restore'] = 'استرجع هذه النسخة'; +$lang['plugin_install_err'] = 'ثبتت Ø§Ù„Ø¥Ø¶Ø§ÙØ© بشكل خاطئ. أعد تسمية دليل Ø§Ù„Ø¥Ø¶Ø§ÙØ© \'%s\' إلى \'%s\'.'; diff --git a/inc/lang/ar/resetpwd.txt b/inc/lang/ar/resetpwd.txt new file mode 100644 index 0000000000000000000000000000000000000000..2bbd4a21a58570ba68a9f65947c196e5f9aaa86e --- /dev/null +++ b/inc/lang/ar/resetpwd.txt @@ -0,0 +1,3 @@ +====== اضبط كلمة سر جديدة ====== + +أدخل كلمة سر جديدة Ù„ØØ³Ø§Ø¨Ùƒ ÙÙŠ هذه الويكي. diff --git a/inc/lang/cs/subscr_digest.txt b/inc/lang/cs/subscr_digest.txt index 57b7240c522cef7309f91bac78a65ab5cba109d2..1b177096557a8ebfdf13f503717a66ae2cf0c527 100644 --- a/inc/lang/cs/subscr_digest.txt +++ b/inc/lang/cs/subscr_digest.txt @@ -12,7 +12,7 @@ Nová revize: @NEWPAGE@ Pro odhlášenà z odebÃránà zmÄ›n na této webové stránce se prosÃm pÅ™ÃhlaÅ¡te do wiki na adrese -@DOKUWIKIURL@,pak navÅ¡tivte +@DOKUWIKIURL@, pak navÅ¡tivte @SUBSCRIBE@ a odhlaÅ¡tÄ› se z odebÃránà zmÄ›n na stránce Äi ve jmenném prostoru. diff --git a/inc/lang/cs/subscr_list.txt b/inc/lang/cs/subscr_list.txt index 82683c57f34d750ef081a43008f2e9b386ceac13..f85be8a9f5ffb9f9dc5e2fa52800c7c30f28f718 100644 --- a/inc/lang/cs/subscr_list.txt +++ b/inc/lang/cs/subscr_list.txt @@ -9,7 +9,7 @@ Zde jsou: Pro odhlášenà z odebÃránà zmÄ›n se prosÃm pÅ™ÃhlaÅ¡te do wiki na adrese -@DOKUWIKIURL@,pak navÅ¡tivte +@DOKUWIKIURL@, pak navÅ¡tivte @SUBSCRIBE@ a odhlaÅ¡tÄ› se z odebÃránà zmÄ›n na stránce Äi ve jmenném prostoru. diff --git a/inc/lang/cs/subscr_single.txt b/inc/lang/cs/subscr_single.txt index c0089c1b75757a0aa1800631dbcbc5adb3894531..1ee33da0918999b8cf21aade88d8e4d5d2b652da 100644 --- a/inc/lang/cs/subscr_single.txt +++ b/inc/lang/cs/subscr_single.txt @@ -15,7 +15,7 @@ Nová revize: @NEWPAGE@ Pro odhlášenà z odebÃránà zmÄ›n na této webové stránce se prosÃm pÅ™ÃhlaÅ¡te do wiki na adrese -@DOKUWIKIURL@,pak navÅ¡tivte +@DOKUWIKIURL@, pak navÅ¡tivte @SUBSCRIBE@ a odhlaÅ¡tÄ› se z odebÃránà zmÄ›n na stránce Äi ve jmenném prostoru. diff --git a/inc/lang/de-informal/lang.php b/inc/lang/de-informal/lang.php index 093125aa696b8892fcdf40c5c48577e9c3c0ed39..61e5ef3d85b7d2ffecd5c20d7fb34ae4f8e2d65c 100644 --- a/inc/lang/de-informal/lang.php +++ b/inc/lang/de-informal/lang.php @@ -191,7 +191,7 @@ $lang['lastmod'] = 'Zuletzt geändert'; $lang['by'] = 'von'; $lang['deleted'] = 'gelöscht'; $lang['created'] = 'angelegt'; -$lang['restored'] = 'alte Version wiederhergestellt'; +$lang['restored'] = 'alte Version wiederhergestellt (%s)'; $lang['external_edit'] = 'Externe Bearbeitung'; $lang['summary'] = 'Zusammenfassung'; $lang['noflash'] = 'Das <a href="http://www.adobe.com/products/flashplayer/">Adobe Flash Plugin</a> wird benötigt, um diesen Inhalt anzuzeigen.'; diff --git a/inc/lang/de/lang.php b/inc/lang/de/lang.php index 63ffd3008a6a5b92a0efcb07bbe6edb326415aba..cfbe0439647683053870c0386e3c3bd26bdf73c1 100644 --- a/inc/lang/de/lang.php +++ b/inc/lang/de/lang.php @@ -193,7 +193,7 @@ $lang['lastmod'] = 'Zuletzt geändert'; $lang['by'] = 'von'; $lang['deleted'] = 'gelöscht'; $lang['created'] = 'angelegt'; -$lang['restored'] = 'alte Version wieder hergestellt'; +$lang['restored'] = 'alte Version wieder hergestellt (%s)'; $lang['external_edit'] = 'Externe Bearbeitung'; $lang['summary'] = 'Zusammenfassung'; $lang['noflash'] = 'Das <a href="http://www.adobe.com/products/flashplayer/">Adobe Flash Plugin</a> wird benötigt, um diesen Inhalt anzuzeigen.'; diff --git a/inc/lang/en/lang.php b/inc/lang/en/lang.php index 2ba220e6408ce63a22a01f5cef1e8f75d3ff73a0..7f0bf05e9e95e1b1309b7cf1a5e72e1f2f0f76fd 100644 --- a/inc/lang/en/lang.php +++ b/inc/lang/en/lang.php @@ -99,6 +99,7 @@ $lang['searchmedia_in'] = 'Search in %s'; $lang['txt_upload'] = 'Select file to upload'; $lang['txt_filename'] = 'Upload as (optional)'; $lang['txt_overwrt'] = 'Overwrite existing file'; +$lang['maxuploadsize'] = 'Upload max. %s per file.'; $lang['lockedby'] = 'Currently locked by'; $lang['lockexpire'] = 'Lock expires at'; @@ -190,7 +191,7 @@ $lang['lastmod'] = 'Last modified'; $lang['by'] = 'by'; $lang['deleted'] = 'removed'; $lang['created'] = 'created'; -$lang['restored'] = 'old revision restored'; +$lang['restored'] = 'old revision restored (%s)'; $lang['external_edit'] = 'external edit'; $lang['summary'] = 'Edit summary'; $lang['noflash'] = 'The <a href="http://www.adobe.com/products/flashplayer/">Adobe Flash Plugin</a> is needed to display this content.'; diff --git a/inc/lang/en/mailwrap.html b/inc/lang/en/mailwrap.html new file mode 100644 index 0000000000000000000000000000000000000000..f9f80fd8083dff21e22b828a0d79463d58c0c68e --- /dev/null +++ b/inc/lang/en/mailwrap.html @@ -0,0 +1,13 @@ +<html> +<head> + <title>@TITLE@</title> + <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> +</head> +<body> + +@HTMLBODY@ + +<br /><hr /> +<small>This mail was generated by DokuWiki at @DOKUWIKIURL@.</small> +</body> +</html> diff --git a/inc/lang/en/subscr_digest.txt b/inc/lang/en/subscr_digest.txt index fac8564bd84a110a8024f82b037693113f1ee3ec..35011b6e61d76b5341a8a73ea5484099dd26b7a6 100644 --- a/inc/lang/en/subscr_digest.txt +++ b/inc/lang/en/subscr_digest.txt @@ -15,6 +15,6 @@ To cancel the page notifications, log into the wiki at @SUBSCRIBE@ and unsubscribe page and/or namespace changes. --- +-- This mail was generated by DokuWiki at @DOKUWIKIURL@ diff --git a/inc/lang/en/subscr_list.txt b/inc/lang/en/subscr_list.txt index efe27d866ec0f758a63cf513d78471e5d323b551..4c38b9326e467f6e1b2bca46711f99034b07d70c 100644 --- a/inc/lang/en/subscr_list.txt +++ b/inc/lang/en/subscr_list.txt @@ -12,6 +12,6 @@ To cancel the page notifications, log into the wiki at @SUBSCRIBE@ and unsubscribe page and/or namespace changes. --- +-- This mail was generated by DokuWiki at @DOKUWIKIURL@ diff --git a/inc/lang/en/subscr_single.txt b/inc/lang/en/subscr_single.txt index f2abe6d77e608508cbdfb3ce53bae4846380e30e..673c4c32adbad55f475f056c2cd385fb3c998c6c 100644 --- a/inc/lang/en/subscr_single.txt +++ b/inc/lang/en/subscr_single.txt @@ -18,6 +18,6 @@ To cancel the page notifications, log into the wiki at @NEWPAGE@ and unsubscribe page and/or namespace changes. --- +-- This mail was generated by DokuWiki at @DOKUWIKIURL@ diff --git a/inc/lang/eo/conflict.txt b/inc/lang/eo/conflict.txt index 603af39e1bb105e9d87a77399e67c51873f56ce2..cd01929428d8ca62e89844c3640ad2cdee5b8ab0 100644 --- a/inc/lang/eo/conflict.txt +++ b/inc/lang/eo/conflict.txt @@ -1,5 +1,5 @@ ====== Pli nova versio ekzistas ====== -Ekzistas pli nova versio de la dokumento. Tio okazas kiam iu alia uzanto ÅanÄigis enhavon de la dokumento dum vi redaktis Äin. +Ekzistas pli nova versio de la dokumento. Tio okazas kiam iu alia uzanto ÅanÄis enhavon de la dokumento dum vi redaktis Äin. -Atente esploru distingojn kaj decidu kiun version vi tenigos. Se vi premos '"Konservi'", do via versio estos konservita. Presonte butonon '"Rezigni" vi tenos la kurantan version. +Atente esploru distingojn kaj decidu kiun version vi tenos. Se vi premos '"Konservi'", do via versio estos konservita. Presonte butonon '"Rezigni" vi tenos la kurantan version. diff --git a/inc/lang/eo/denied.txt b/inc/lang/eo/denied.txt index b35fe0412a2a587da82ad3cd2752c410b1fe7804..3cd6c76bf35ab8fd273f17b51ed5bf8ddfc26227 100644 --- a/inc/lang/eo/denied.txt +++ b/inc/lang/eo/denied.txt @@ -1,4 +1,4 @@ ====== Aliro malpermesita ====== -Vi ne havas sufiĉe da rajtoj por rigardi ĉi tiujn paÄojn. Eble vi forgesis identiÄi. +Vi ne havas sufiĉajn rajtojn rigardi ĉi tiujn paÄojn. Eble vi forgesis identiÄi. diff --git a/inc/lang/eo/diff.txt b/inc/lang/eo/diff.txt index ac5474ef1149489fe096c11e3291916be378d16b..5829a7db1572ee1f953898d2935e52193513cb5b 100644 --- a/inc/lang/eo/diff.txt +++ b/inc/lang/eo/diff.txt @@ -1,4 +1,4 @@ ====== Diferencoj ====== -Ĉi tie vi povas ekvidi diferencojn inter la aktuala versio kaj la elektita revizio de la paÄo. +Ĉi tie vi povas vidi diferencojn inter la aktuala versio kaj la elektita revizio de la paÄo. diff --git a/inc/lang/eo/draft.txt b/inc/lang/eo/draft.txt index fa43ecb74f9bbb73b945f7ee5db840250f4f5c50..32ddc83f6cbed78ee818b635788158c54c389348 100644 --- a/inc/lang/eo/draft.txt +++ b/inc/lang/eo/draft.txt @@ -1,5 +1,5 @@ -====== Skiza dosiero estis trovata ====== +====== Skiza dosiero troviÄis ====== -Via lasta sekcio de redakto en tiu ĉi paÄo ne estis korekte kompletita. DokuWiki aÅtomate konservis skizon dum vi laboris, kiun vi nun povas uzi por daÅrigi vian redaktadon. Sube vi povas vidi la datenaron, kiu estis konservata el via lasta sekcio. +Via lasta sekcio de redakto en tiu ĉi paÄo ne korekte kompletiÄis. DokuWiki aÅtomate konservis skizon dum vi laboris, kiun vi nun povas uzi por daÅrigi vian redaktadon. Sube vi povas vidi la datumaron, kiu konserviÄis el via lasta sekcio. Bonvolu decidi ĉu vi volas //restarigi// vian perditan redakton, //forigi// la aÅtomate konservitan skizon aÅ //rezigni// pri la redakta procezo. diff --git a/inc/lang/eo/edit.txt b/inc/lang/eo/edit.txt index 9239c7fe623a827d9ecd69aa73f2169462838fec..29b3382c5265599c0f6686e3336260ea7e1f7278 100644 --- a/inc/lang/eo/edit.txt +++ b/inc/lang/eo/edit.txt @@ -1 +1 @@ -Redaktu paÄon kaj poste premu butonon titolitan '"Konservi'". Bonvolu tralegi la [[vikio:sintakso|vikian sintakson]] por kompreni kiel vi povas krei paÄojn. Bonvolu redakti nur se vi planas **plibonigi** la enhavon de la paÄo. Se vi volas nur testi ion, do bonvolu uzi specialan paÄon: [[vikio:ludejo|ludejo]]. +Redaktu paÄon kaj poste premu butonon titolitan '"Konservi'". Bonvolu tralegi la [[wiki:syntax|vikian sintakson]] por kompreni kiel vi povas krei paÄojn. Bonvolu redakti nur se vi planas **plibonigi** la enhavon de la paÄo. Se vi volas nur testi ion, bonvolu uzi specialan paÄon: [[wiki:playground|ludejo]]. diff --git a/inc/lang/eo/editrev.txt b/inc/lang/eo/editrev.txt index 4bab50b93ccdea7c160cec0e7ba3250ee8033d72..1640baa91d24fa0d62af0a2b7de8b6cbcf9f5c81 100644 --- a/inc/lang/eo/editrev.txt +++ b/inc/lang/eo/editrev.txt @@ -1,2 +1,2 @@ -**Vi laboras kun malnova revizio de la dokumento!** Se vi konservos Äin, tiel kreiÄos nova kuranta versio kun la sama enhavo. +**Vi laboras kun malnova revizio de la dokumento!** Se vi konservos Äin, kreiÄos nova kuranta versio kun la sama enhavo. ---- diff --git a/inc/lang/eo/index.txt b/inc/lang/eo/index.txt index 4ef720cb235f79a6d0e2708b2b96b107789524a1..ac1f32cba41ef40ac840f04ed4ffb33f18576cc8 100644 --- a/inc/lang/eo/index.txt +++ b/inc/lang/eo/index.txt @@ -1,3 +1,3 @@ ====== Enhavo ====== -Tio ĉi estas indekso pri ĉiuj disponeblaj paÄoj ordigitaj laÅ [[doku>namespaces|nomspacoj]]. \ No newline at end of file +Tio ĉi estas indekso pri ĉiuj disponeblaj paÄoj ordigitaj laÅ [[doku>namespaces|nomspacoj]]. diff --git a/inc/lang/eo/install.html b/inc/lang/eo/install.html index 9f43ae82e91dee2da9479830a06679202373d7ed..2e741e7c26e02f1fe53b83edf55e86441032b0c0 100644 --- a/inc/lang/eo/install.html +++ b/inc/lang/eo/install.html @@ -1,9 +1,9 @@ -<p>Tiu ĉi paÄo helpas en la unua instalo kaj agordado de <a href="http://dokuwiki.org">DokuWiki</a>. Pli da informo pri tiu instalilo estas disponebla en Äia propra <a href="http://dokuwiki.org/installer">dokumentada paÄo</a>.</p> +<p>Tiu ĉi paÄo helpas en la unua instalo kaj agordado de <a href="http://dokuwiki.org">DokuWiki</a>. Pli da informo pri tiu instalilo disponeblas en Äia propra <a href="http://dokuwiki.org/installer">dokumentada paÄo</a>.</p> -<p>DokuWiki uzas ordinarajn dosierojn por konservi vikiajn paÄojn kaj aliajn informojn asociitaj al tiuj paÄoj (ekz. bildoj, serĉindeksoj, malnovaj revizioj, ktp). Por bone funkcii, DokuWiki <strong>devas</strong> havi registran rajton sur la subdosierujoj, kiuj entenas tiujn dosierojn. Tiu ĉi instalilo ne kapablas difini permes-atributojn de dosierujoj. Ordinare, tio devas esti senpere farita de iu komando en konzolo aÅ, se vi abonas retprovizanton, per FTP aÅ kontrola panelo de tiu retprovidanto (ekz. cPanel).</p> +<p>DokuWiki uzas ordinarajn dosierojn por konservi vikiajn paÄojn kaj aliajn informojn asociitaj al tiuj paÄoj (ekz. bildoj, serĉindeksoj, malnovaj revizioj, ktp). Por bone funkcii, DokuWiki <strong>devas</strong> havi registran rajton sur la subdosierujoj, kiuj entenas tiujn dosierojn. Tiu ĉi instalilo ne kapablas difini permes-atributojn de dosierujoj. Ordinare, tio devas esti senpere farita de iu komando en konzolo aÅ, se vi abonas retprovizanton, per FTP aÅ kontrola panelo de tiu retprovidanto (ekz. cPanel).</p> -<p>Tiu ĉi instalilo difinos vian DokuWiki-an agordadon por <acronym title="alir-kontrola listo">ACL</acronym>, kiu ebligas al administranto identiÄi kaj aliri taÅgan interfacon por instali kromaĵojn, administri uzantojn kaj alireblon al vikipaÄoj, kaj difini agordojn Äeneralajn. -Äœi ne estas nepra por ke DokuWiki funkciu, tamen Äi multe faciligos administradon.</p> +<p>Tiu ĉi instalilo difinos vian DokuWiki-an agordadon por <acronym title="alir-kontrola listo">ACL</acronym>, kiu ebligas al administranto identiÄi kaj aliri taÅgan interfacon por instali kromaĵojn, administri uzantojn kaj alireblon al vikipaÄoj, kaj difini agordojn Äeneralajn. +Äœi ne estas nepra por ke DokuWiki funkciu, tamen Äi multe faciligos administradon.</p> -<p>Spertuloj aÅ uzantoj kiuj bezonas specialajn agordrimedojn devus uzi tiujn ligilojn por havi pli detalojn pri <a href="http://dokuwiki.org/install">instaladaj instrukcioj</a> -kaj <a href="http://dokuwiki.org/config">agordadaj difinoj</a>.</p> \ No newline at end of file +<p>Spertuloj aÅ uzantoj kiuj bezonas specialajn agordrimedojn uzu tiujn ligilojn por havi pli detalojn pri <a href="http://dokuwiki.org/install">instaladaj instrukcioj</a> +kaj <a href="http://dokuwiki.org/config">agordadaj difinoj</a>.</p> diff --git a/inc/lang/eo/lang.php b/inc/lang/eo/lang.php index 41c6b80d124911abe2953f7b35f5aae3f0c84187..b2c64b2a6a9864a292d10a532ce64aaeeeb38e3f 100644 --- a/inc/lang/eo/lang.php +++ b/inc/lang/eo/lang.php @@ -9,7 +9,7 @@ * @author Felipe Castro <fefcas@gmail.com> * @author Robert Bogenschneider <robog@gmx.de> * @author Erik Pedersen <erik.pedersen@shaw.ca> - * @author Robert BOGENSCHNEIDER <bogi@UEA.org> + * @author Robert Bogenschneider <bogi@uea.org> */ $lang['encoding'] = 'utf-8'; $lang['direction'] = 'ltr'; @@ -45,6 +45,7 @@ $lang['btn_backtomedia'] = 'Retroiri al elekto de dosiero'; $lang['btn_subscribe'] = 'AliÄi al paÄaj modifoj'; $lang['btn_profile'] = 'Äœisdatigi profilon'; $lang['btn_reset'] = 'Rekomenci'; +$lang['btn_resendpwd'] = 'Sendi novan pasvorton'; $lang['btn_draft'] = 'Redakti skizon'; $lang['btn_recover'] = 'Restarigi skizon'; $lang['btn_draftdel'] = 'Forigi skizon'; @@ -68,38 +69,39 @@ $lang['draftdate'] = 'Lasta konservo de la skizo:'; $lang['nosecedit'] = 'La paÄo ÅanÄiÄis intertempe, sekcio-informo estis malÄisdata, tial la tuta paÄo estas reÅargita.'; $lang['regmissing'] = 'Pardonu, vi devas plenigi ĉiujn kampojn.'; $lang['reguexists'] = 'Pardonu, ĉi tiu uzanto-nomo jam ekzistas.'; -$lang['regsuccess'] = 'La uzanto estas kreita kaj la pasvorto estis elsendita per retpoÅto.'; -$lang['regsuccess2'] = 'La uzanto estas kreita.'; +$lang['regsuccess'] = 'La uzanto kreiÄis kaj la pasvorto sendiÄis per retpoÅto.'; +$lang['regsuccess2'] = 'La uzanto kreiÄis.'; $lang['regmailfail'] = 'Åœajne okazis eraro dum elsendo de la pasvorto. Bonvolu informi administranton pri tio!'; -$lang['regbadmail'] = 'Entajpita retpoÅta adreso ne Åajnas valida. Se vi pensas, ke tio estas eraro, kontaktu la administranton.'; +$lang['regbadmail'] = 'Entajpita retpoÅta adreso Åajnas ne valida. Se vi pensas, ke tio estas eraro, kontaktu la administranton.'; $lang['regbadpass'] = 'La du pasvortoj ne samas, bonvolu provi refoje.'; $lang['regpwmail'] = 'Via DokuWiki-pasvorto'; $lang['reghere'] = 'Se vi ne havas konton, vi povas akiri Äin'; $lang['profna'] = 'Tiu ĉi vikio ne ebligas modifon en la profiloj.'; $lang['profnochange'] = 'Neniu ÅanÄo, nenio farinda.'; -$lang['profnoempty'] = 'Malplena nomo aÅ retadreso ne estas permesataj.'; -$lang['profchanged'] = 'La profilo de la uzanto estas sukcese Äisdatigita.'; +$lang['profnoempty'] = 'Malplena nomo aÅ retadreso ne estas permesata.'; +$lang['profchanged'] = 'La profilo de la uzanto sukcese ÄisdatiÄis.'; $lang['pwdforget'] = 'Ĉu vi forgesis vian pasvorton? Prenu novan'; $lang['resendna'] = 'Tiu ĉi vikio ne ebligas resendon de la pasvortoj.'; +$lang['resendpwd'] = 'Sendi novan pasvorton al'; $lang['resendpwdmissing'] = 'Pardonu, vi devas plenigi ĉiujn kampojn.'; -$lang['resendpwdnouser'] = 'Pardonu, ni ne trovas tiun uzanton en nia datenbazo.'; +$lang['resendpwdnouser'] = 'Pardonu, tiu uzanto ne troveblas en nia datumbazo.'; $lang['resendpwdbadauth'] = 'Pardonu, tiu aÅtentiga kodo ne validas. CertiÄu, ke vi uzis la kompletan konfirmigan ligilon.'; -$lang['resendpwdconfirm'] = 'Konfirmiga ligilo estas sendita per retpoÅto.'; -$lang['resendpwdsuccess'] = 'Via nova pasvorto estas sendita per retpoÅto.'; +$lang['resendpwdconfirm'] = 'Konfirmiga ligilo sendiÄis per retpoÅto.'; +$lang['resendpwdsuccess'] = 'Via nova pasvorto sendiÄis per retpoÅto.'; $lang['license'] = 'Krom kie rekte indikite, enhavo de tiu ĉi vikio estas publikigita laÅ la jena permesilo:'; $lang['licenseok'] = 'Rimarku: redaktante tiun ĉi paÄon vi konsentas publikigi vian enhavon laÅ la jena permesilo:'; $lang['searchmedia'] = 'Serĉi dosiernomon:'; $lang['searchmedia_in'] = 'Serĉi en %s'; -$lang['txt_upload'] = 'Elektu dosieron por alÅuto'; +$lang['txt_upload'] = 'Elektu dosieron por alÅuti'; $lang['txt_filename'] = 'AlÅuti kiel (laÅvole)'; $lang['txt_overwrt'] = 'AnstataÅigi ekzistantan dosieron'; $lang['lockedby'] = 'Nune Ålosita de'; $lang['lockexpire'] = 'Åœlosado ĉesos en'; -$lang['js']['willexpire'] = 'Vi povos redakti ĉi tiun paÄon post unu minuto.\nSe vi volas nuligi tempkontrolon de la Ålosado, do premu butonon "AntaÅrigardi".'; +$lang['js']['willexpire'] = 'Vi povos redakti ĉi tiun paÄon post unu minuto.\nSe vi volas nuligi tempokontrolon de la Ålosado, premu la butonon "AntaÅrigardi".'; $lang['js']['notsavedyet'] = 'Ne konservitaj modifoj perdiÄos. Ĉu vi certe volas daÅrigi la procezon?'; $lang['js']['searchmedia'] = 'Serĉi dosierojn'; -$lang['js']['keepopen'] = 'Tenu la fenestron malfermata dum elekto'; +$lang['js']['keepopen'] = 'Tenu la fenestron malferma dum elekto'; $lang['js']['hidedetails'] = 'KaÅi detalojn'; $lang['js']['mediatitle'] = 'Ligilaj agordoj'; $lang['js']['mediadisplay'] = 'Ligila tipo'; @@ -122,10 +124,10 @@ $lang['js']['medialeft'] = 'Meti la bildon maldekstren.'; $lang['js']['mediaright'] = 'Meti la bildon dekstren.'; $lang['js']['mediacenter'] = 'Meti la bildon mezen.'; $lang['js']['medianoalign'] = 'Ne uzi poziciigon.'; -$lang['js']['nosmblinks'] = 'Tio ĉi nur funkcias en la Vindozaĉa "Microsoft Internet Explorer".\nVi ankoraÅ povas kopii kaj almeti la ligilon.'; +$lang['js']['nosmblinks'] = 'Tio ĉi nur funkcias en "Microsoft Internet Explorer".\nVi ankoraÅ povas kopii kaj almeti la ligilon.'; $lang['js']['linkwiz'] = 'Ligil-Asistanto'; $lang['js']['linkto'] = 'Ligilo al:'; -$lang['js']['del_confirm'] = 'Ĉu vere forigi elektitajn ero(j)n?'; +$lang['js']['del_confirm'] = 'Ĉu vere forigi elektita(j)n ero(j)n?'; $lang['js']['restore_confirm'] = 'Ĉu vere restarigi ĉi tiun version?'; $lang['js']['media_diff'] = 'Rigardu la diferencojn:'; $lang['js']['media_diff_both'] = 'Flankon apud flanko'; @@ -141,27 +143,27 @@ $lang['rssfailed'] = 'Okazis eraro dum ricevado de la novaĵ-fluo: ' $lang['nothingfound'] = 'AnkoraÅ nenio troviÄas tie ĉi.'; $lang['mediaselect'] = 'Elekto de aÅdvidaĵa dosiero'; $lang['fileupload'] = 'AlÅuto de aÅdvidaĵa dosiero'; -$lang['uploadsucc'] = 'AlÅuto estis sukcesa'; -$lang['uploadfail'] = 'AlÅuto estis malsukcesa. Eble ĉu estas problemoj pro permes-atributoj?'; +$lang['uploadsucc'] = 'AlÅuto sukcesis'; +$lang['uploadfail'] = 'AlÅuto malsukcesis. Ĉu eble estas problemoj pro permes-atributoj?'; $lang['uploadwrong'] = 'Rifuzita alÅuto. Tiu ĉi dosiersufikso estas malpermesata!'; $lang['uploadexist'] = 'La dosiero jam ekzistas. Nenio estas farita.'; $lang['uploadbadcontent'] = 'La alÅutita enhavo ne kongruas al la sufikso %s.'; -$lang['uploadspam'] = 'La alÅutaĵo estis blokita de kontraÅspama vortlisto.'; -$lang['uploadxss'] = 'La alÅutajo estis blokita pro ebla malica enhavo.'; +$lang['uploadspam'] = 'La alÅutaĵo blokiÄis de kontraÅspama vortlisto.'; +$lang['uploadxss'] = 'La alÅutajo blokiÄis pro ebla malica enhavo.'; $lang['uploadsize'] = 'La alÅutita dosiero estis tro granda. (maks. %s)'; -$lang['deletesucc'] = 'La dosiero "%s" estas forigita.'; +$lang['deletesucc'] = 'La dosiero "%s" forigiÄis.'; $lang['deletefail'] = '"%s" ne povis esti forigita - kontrolu permes-atributojn.'; -$lang['mediainuse'] = 'La dosiero "%s" ne estis forigita - Äi ankoraÅ estas uzata.'; +$lang['mediainuse'] = 'La dosiero "%s" ne forigiÄis - Äi ankoraÅ estas uzata.'; $lang['namespaces'] = 'Nomspacoj'; $lang['mediafiles'] = 'Disponeblaj dosieroj'; $lang['accessdenied'] = 'Vi ne rajtas vidi tiun paÄon.'; -$lang['mediausage'] = 'Uzu la jenan sintakson por referenci tiun ĉi dosieron:'; +$lang['mediausage'] = 'Uzu jenan sintakson por referenci tiun ĉi dosieron:'; $lang['mediaview'] = 'Rigardi originalan dosieron'; $lang['mediaroot'] = 'ĉefo (root)'; -$lang['mediaupload'] = 'AlÅutu dosieron al la kuranta nomspaco tien ĉi. Por krei subnomspacojn, antaÅmetu ilin al via "AlÅuti kiel" dosiernomo, apartigante per dupunktoj (:).'; +$lang['mediaupload'] = 'AlÅutu dosieron al la kuranta nomspaco tien ĉi. Por krei subnomspacojn, antaÅmetu ilin al via "AlÅuti kiel" dosiernomo, disigigante per dupunktoj (:).'; $lang['mediaextchange'] = 'La dosiersufikso ÅanÄis de .%s al .%s!'; $lang['reference'] = 'Referencoj por'; -$lang['ref_inuse'] = 'La dosiero ne povas esti forigita, ĉar Äi ankoraÅ estas uzata de la jenaj paÄoj:'; +$lang['ref_inuse'] = 'La dosiero ne povas esti forigita, ĉar Äi ankoraÅ estas uzata de jenaj paÄoj:'; $lang['ref_hidden'] = 'Kelkaj referencoj estas en paÄoj, kiujn vi ne rajtas legi'; $lang['hits'] = 'Trafoj'; $lang['quickhits'] = 'Trafoj trovitaj en paÄnomoj'; @@ -184,8 +186,13 @@ $lang['created'] = 'kreita'; $lang['restored'] = 'malnova revizio restarigita'; $lang['external_edit'] = 'ekstera redakto'; $lang['summary'] = 'Bulteno de ÅanÄoj'; -$lang['noflash'] = 'La <a href="http://www.adobe.com/products/flashplayer/">Adobe Flash Plugin</a> estas bezonata por montrigi tiun ĉi enhavon.'; +$lang['noflash'] = 'La <a href="http://www.adobe.com/products/flashplayer/">Adobe Flash Plugin</a> necesas por montri tiun ĉi enhavon.'; $lang['download'] = 'ElÅuti eltiraĵon'; +$lang['tools'] = 'Iloj'; +$lang['user_tools'] = 'Uzantaj iloj'; +$lang['site_tools'] = 'Retejaj iloj'; +$lang['page_tools'] = 'PaÄaj iloj'; +$lang['skip_to_content'] = 'al la enhavo'; $lang['mail_newpage'] = 'paÄo aldonita:'; $lang['mail_changed'] = 'paÄo modifita:'; $lang['mail_subscribe_list'] = 'ÅanÄitaj paÄoj en nomspaco:'; @@ -221,10 +228,10 @@ $lang['qb_smileys'] = 'Ridetuloj'; $lang['qb_chars'] = 'Specialaj signaĵoj'; $lang['upperns'] = 'saltu al la parenca nomspaco'; $lang['admin_register'] = 'Aldoni novan uzanton'; -$lang['metaedit'] = 'Redakti metadatenaron'; -$lang['metasaveerr'] = 'La konservo de metadatenaro malsukcesis'; -$lang['metasaveok'] = 'La metadatenaro estis konservita'; -$lang['img_backto'] = 'Retroiri al'; +$lang['metaedit'] = 'Redakti metadatumaron'; +$lang['metasaveerr'] = 'La konservo de metadatumaro malsukcesis'; +$lang['metasaveok'] = 'La metadatumaro konserviÄis'; +$lang['img_backto'] = 'Iri reen al'; $lang['img_title'] = 'Titolo'; $lang['img_caption'] = 'Priskribo'; $lang['img_date'] = 'Dato'; @@ -237,7 +244,7 @@ $lang['img_camera'] = 'Kamerao'; $lang['img_keywords'] = 'Åœlosilvortoj'; $lang['img_width'] = 'LarÄeco'; $lang['img_height'] = 'Alteco'; -$lang['img_manager'] = 'Rigardi en media-administrilo'; +$lang['img_manager'] = 'Rigardi en aÅdvidaĵ-administrilo'; $lang['subscr_subscribe_success'] = 'Aldonis %s al la abonlisto por %s'; $lang['subscr_subscribe_error'] = 'Eraro dum aldono de %s al la abonlisto por %s'; $lang['subscr_subscribe_noaddress'] = 'Ne estas adreso ligita al via ensaluto, ne eblas aldoni vin al la abonlisto'; @@ -271,7 +278,7 @@ $lang['i_confexists'] = '<code>%s</code> jam ekzistas'; $lang['i_writeerr'] = 'Ne eblas krei "<code>%s</code>". Vi bezonas kontroli la permesojn de la dosier(uj)oj kaj mem krej la dosieron.'; $lang['i_badhash'] = 'dokuwiki.php ne estas rekonebla aÅ Äi estas modifita (hash=<code>%s</code>)'; $lang['i_badval'] = '<code>%s</code> - malvalida aÅ malplena valoro'; -$lang['i_success'] = 'La agordado estas sukcese kompletita. Vi povas forigi la dosieron nun. Pluiru al <a href="doku.php">via nova DokuWiki</a>.'; +$lang['i_success'] = 'La agordado sukcese kompletiÄis. Vi povas forigi la dosieron nun. Pluiru al <a href="doku.php">via nova DokuWiki</a>.'; $lang['i_failure'] = 'Kelkaj eraroj okazis dum la konservo de la agordaj dosieroj. Vi devas senpere korekti ilin antaÅ ol vi povos uzi <a href="doku.php">vian novan DokuWiki-on</a>. '; $lang['i_policy'] = 'Komenca ACL-a agordo'; $lang['i_pol0'] = 'Malferma Vikio (legi, skribi, alÅuti povas ĉiuj)'; @@ -287,7 +294,7 @@ $lang['days'] = 'antaÅ %d tagoj'; $lang['hours'] = 'antaÅ %d horoj'; $lang['minutes'] = 'antaÅ %d minutoj'; $lang['seconds'] = 'antaÅ %d sekundoj'; -$lang['wordblock'] = 'Via ÅanÄo ne estis savita, ĉar Äi enhavas blokitan tekston (spamon).'; +$lang['wordblock'] = 'Via ÅanÄo ne konserviÄis, ĉar Äi enhavas blokitan tekston (spamon).'; $lang['media_uploadtab'] = 'AlÅuto'; $lang['media_searchtab'] = 'Serĉo'; $lang['media_file'] = 'Dosiero'; diff --git a/inc/lang/eo/locked.txt b/inc/lang/eo/locked.txt index 68963da758af28b2870ee79cc67cb7c822c11b51..abdc05916c1671fa6deff67d0860dfc274f52267 100644 --- a/inc/lang/eo/locked.txt +++ b/inc/lang/eo/locked.txt @@ -1,3 +1,3 @@ ====== La paÄo estas Ålosita ====== -Tiu ĉi paÄo nun estas blokita pro redaktado de iu alia uzanto. Bonvole atendu ke Åi/li finu redakti aÅ ke la Ålosada tempolimo finiÄu. +Tiu ĉi paÄo nun blokiÄis pro redaktado de iu alia uzanto. Bonvolu atendi ke Åi/li finu redakti aÅ ke la Ålosada tempolimo finiÄu. diff --git a/inc/lang/eo/mailtext.txt b/inc/lang/eo/mailtext.txt index b2cb3b49dcd8aae4dace2822091c01238081caad..2765301ea0ba2fa005d22ab893f54d0f58f75f08 100644 --- a/inc/lang/eo/mailtext.txt +++ b/inc/lang/eo/mailtext.txt @@ -1,4 +1,4 @@ -PaÄo en via DokuVikio estis ÅanÄita aÅ aldonita. Jen detaloj: +PaÄo en via DokuVikio ÅanÄiÄis aÅ aldoniÄis. Jen detaloj: Dato: @DATE@ Foliumilo: @BROWSER@ @@ -7,10 +7,9 @@ RetNodo: @HOSTNAME@ AntaÅa revizio: @OLDPAGE@ Nova revizio: @NEWPAGE@ Bulteno de ÅanÄoj: @SUMMARY@ -Uzulo: @USER@ +Uzanto: @USER@ @DIFF@ -- -Tiu ĉi mesaÄo estis kreita de DokuWiki, kiu lokiÄas tie: -@DOKUWIKIURL@ \ No newline at end of file +Tiu ĉi mesaÄo kreiÄis de DokuWiki, kiu lokiÄas ĉe @DOKUWIKIURL@ diff --git a/inc/lang/eo/newpage.txt b/inc/lang/eo/newpage.txt index 486f61f5af0f175cc81d383f23f2cfa2208a1fb8..53ab6209df5f8bc0f14f01f3df7a6e954473ba2d 100644 --- a/inc/lang/eo/newpage.txt +++ b/inc/lang/eo/newpage.txt @@ -1,4 +1,4 @@ ====== Ĉi tiu paÄo ankoraÅ ne ekzistas ====== -Vi sekvis ligilon, kiu kondukas al artikolo ankoraÅ ne ekzistanta. Se vi rajtas, tiel vi povas krei tiun ĉi paÄon ekpremante la butonon "Krei paÄon". +Vi sekvis ligilon, kiu kondukas al artikolo ankoraÅ ne ekzistanta. Se vi rajtas, tiam vi povas krei tiun ĉi paÄon premante la butonon "Krei paÄon". diff --git a/inc/lang/eo/norev.txt b/inc/lang/eo/norev.txt index dc44d194bc7a2359c7b8f1dc0e67bafb95845a79..e951a551b9288aa0803d0a708453951c3ce773fa 100644 --- a/inc/lang/eo/norev.txt +++ b/inc/lang/eo/norev.txt @@ -1,3 +1,3 @@ ====== Tiu revizio ne ekzistas ====== -La elektita revizio ne ekzistas. Premu butonon "Malnovaj revizioj" por vidi liston de malnovaj revizioj de la dokumento. \ No newline at end of file +La elektita revizio ne ekzistas. Premu butonon "Malnovaj revizioj" por vidi liston de malnovaj revizioj de la dokumento. diff --git a/inc/lang/eo/password.txt b/inc/lang/eo/password.txt index ef744059e9390235b427ebfcd02548412a9b49cb..6dc42a9de8705b01d124aa31ec317e85f46c79ac 100644 --- a/inc/lang/eo/password.txt +++ b/inc/lang/eo/password.txt @@ -1,10 +1,9 @@ -Saluton @FULLNAME@! +Saluton, @FULLNAME@! -Jen via uzantodatenoj por @TITLE@ ĉe @DOKUWIKIURL@ +Jen viaj uzantodatumoj por @TITLE@ ĉe @DOKUWIKIURL@ Ensalutnomo: @LOGIN@ Pasvorto: @PASSWORD@ -- -Tiu ĉi mesaÄo estis kreita de DokuWiki ĉe -@DOKUWIKIURL@ +Tiu ĉi mesaÄo kreiÄis de DokuWiki ĉe @DOKUWIKIURL@ diff --git a/inc/lang/eo/preview.txt b/inc/lang/eo/preview.txt index ac2e75d00f86fd9c9d571121f72e289820ae4062..b3faef69e56e617fe6dd82b63c1bb6476e62a120 100644 --- a/inc/lang/eo/preview.txt +++ b/inc/lang/eo/preview.txt @@ -1,3 +1,3 @@ ====== AntaÅrigardo ====== -Tiu ĉi estas antaÅrigardo de redaktita teksto. Memoru: Äi ankoraÅ **ne estas konservita**! \ No newline at end of file +Tiu ĉi estas antaÅrigardo de redaktita teksto. Memoru: Äi ankoraÅ **ne konserviÄis**! diff --git a/inc/lang/eo/pwconfirm.txt b/inc/lang/eo/pwconfirm.txt index f227752b156b477b28b6cbeeab376c4ad6c1cb7f..5abc3d13ee8384ef9f45ae4d386c30bca749abe0 100644 --- a/inc/lang/eo/pwconfirm.txt +++ b/inc/lang/eo/pwconfirm.txt @@ -1,14 +1,13 @@ -Saluton @FULLNAME@! +Saluton, @FULLNAME@! Iu petis novan pasvorton por via @TITLE@ ensalutnomo ĉe @DOKUWIKIURL@ -Se ne estas vi, kiu petis tion, do preterlasu tiun ĉi mesaÄon. +Se ne vi petis tion, ignoru tiun ĉi mesaÄon. -Por konfirmi, ke la peto estis vere via, bonvolu musklaki la jenan ligilon. +Por konfirmi, ke la peto estis vere via, bonvolu musklaki jenan ligilon: @CONFIRM@ -- -Tiu ĉi mesaÄo estis kreita de DokuWiki ĉe -@DOKUWIKIURL@ \ No newline at end of file +Tiu ĉi mesaÄo kreiÄis de DokuWiki ĉe @DOKUWIKIURL@ diff --git a/inc/lang/eo/read.txt b/inc/lang/eo/read.txt index 734eb165455f4ab6871dbbb956df1aeab8529149..b8c642f4386a3b21a392a0896a3a81b8bfe413e6 100644 --- a/inc/lang/eo/read.txt +++ b/inc/lang/eo/read.txt @@ -1,2 +1,2 @@ -Tiu ĉi paÄo estas disponigata nur por legado (vi ne povas redakti Äin). Sciigu administranton, se vi opinias ke tio estas ne Äusta malpermeso. +Tiu ĉi paÄo disponiÄas nur por legado (vi ne povas redakti Äin). Sciigu administranton, se vi opinias ke tio estas falsa malpermeso. diff --git a/inc/lang/eo/recent.txt b/inc/lang/eo/recent.txt index ffd9936e23f9e81dd4188c1250d418b2c85ad89e..2454ea630ad07f855671e3635a02ce668d2dfc43 100644 --- a/inc/lang/eo/recent.txt +++ b/inc/lang/eo/recent.txt @@ -1,3 +1,3 @@ ====== FreÅaj ÅœanÄoj ====== -La jenaj paÄoj estis ÅanÄitaj antaÅ nelonga tempo. \ No newline at end of file +Jenaj paÄoj ÅanÄiÄis antaÅ nelonge: diff --git a/inc/lang/eo/register.txt b/inc/lang/eo/register.txt index 57d5ca1f42219516e601381b700707f1a7796f03..10b303d3b4e2648a8517fdce561621ae53c87825 100644 --- a/inc/lang/eo/register.txt +++ b/inc/lang/eo/register.txt @@ -1,4 +1,4 @@ ====== RegistriÄi ====== -Entajpu necesajn informojn por enregistriÄi. CertiÄu ke via retpoÅta adreso estas vera ĉar ni sendos al Äi vian pasvorton. +Entajpu necesajn informojn por enregistriÄi. CertiÄu ke via retpoÅta adreso estas vera, ĉar ni sendos al Äi vian pasvorton. diff --git a/inc/lang/eo/registermail.txt b/inc/lang/eo/registermail.txt index 8b9ea85016b552c8d592f0591fbfadc5c8846082..9ef6013c06be6c874067993abdf66ee9acbb6d95 100644 --- a/inc/lang/eo/registermail.txt +++ b/inc/lang/eo/registermail.txt @@ -1,4 +1,4 @@ -Nova uzanto estis registrata. Jen la detaloj: +Nova uzanto registriÄis. Jen la detaloj: Uzantonomo: @NEWUSER@ Kompleta nomo: @NEWNAME@ @@ -10,5 +10,4 @@ IP-Adreso: @IPADDRESS@ Provizanto: @HOSTNAME@ -- -Tiu ĉi mesaÄo estis kreita de DokuWiki ĉe -@DOKUWIKIURL@ \ No newline at end of file +Tiu ĉi mesaÄo kreiÄis de DokuWiki ĉe @DOKUWIKIURL@ diff --git a/inc/lang/eo/resendpwd.txt b/inc/lang/eo/resendpwd.txt index 57b4b04089a954e5782aacace97a709777d28b51..556477a079ec7478581d086fcd4a0aab94289374 100644 --- a/inc/lang/eo/resendpwd.txt +++ b/inc/lang/eo/resendpwd.txt @@ -1,3 +1,3 @@ ====== Sendi novan pasvorton ====== -Bonvolu meti vian uzantonomon en la suban formularon petante novan pasvorton por via aliÄo en tiu ĉi vikio. Konfirma ligilo estos sendata al via registrita retadreso. +Bonvolu meti vian uzantonomon en la suban formularon petante novan pasvorton por via aliÄo en tiu ĉi vikio. Konfirma ligilo sendaiÄos al via registrita retadreso. diff --git a/inc/lang/eo/showrev.txt b/inc/lang/eo/showrev.txt index e3a8a174773e5ec306ab15c225c00f13649ad50a..3ece4f2fbb53b081994e9868ba23d3deb9090f8b 100644 --- a/inc/lang/eo/showrev.txt +++ b/inc/lang/eo/showrev.txt @@ -1,2 +1,2 @@ -**Tiu estas malnova revizio de la dokumento**. Klaku sur titolo por ricevi kurantan version. +**Tiu estas malnova revizio de la dokumento**. Klaku sur titolon por ricevi kurantan version. ---- diff --git a/inc/lang/eo/stopwords.txt b/inc/lang/eo/stopwords.txt index 38757ae04d6faaa649ff04a3a8a7c115caec5909..d27c569a2e541287c51809c0346878b096ff7e47 100644 --- a/inc/lang/eo/stopwords.txt +++ b/inc/lang/eo/stopwords.txt @@ -1,6 +1,6 @@ # Jen listo de vortoj, kiujn la indeksilo ignoras, unu vorton po linio # Kiam vi modifas la dosieron, estu certa ke vi uzas UNIX-stilajn linifinaĵojn (unuopa novlinio) -# Ne enmetu vortojn malpli longajn ol 3 literoj - tiuj ĉiukaze estas ignorataj +# Ne enmetu vortojn malpli longajn ol 3 literoj - tiuj ĉiukaze ignoriÄas pri estas kaj @@ -17,4 +17,4 @@ kio kiam kie kiu -www \ No newline at end of file +www diff --git a/inc/lang/eo/subscr_digest.txt b/inc/lang/eo/subscr_digest.txt index d6bc698873d8751b592bb0a1ac9397ff72a3acd4..42fc79ad128439ac1e6d0be2345ff6360c39ba35 100644 --- a/inc/lang/eo/subscr_digest.txt +++ b/inc/lang/eo/subscr_digest.txt @@ -16,5 +16,4 @@ Por nuligi la paÄinformojn, ensalutu la vikion ĉe kaj malabonu la paÄajn kaj/aÅ nomspacajn ÅanÄojn. -- -Tiu retpoÅtaĵo kreiÄis de DokuWiki ĉe -@DOKUWIKIURL@ \ No newline at end of file +Tiu retpoÅtaĵo kreiÄis de DokuWiki ĉe @DOKUWIKIURL@ diff --git a/inc/lang/eo/subscr_list.txt b/inc/lang/eo/subscr_list.txt index 175e3f3d204d2d0ac1559dcc2f8be5ce96fc65fa..1957e85e076c014f85720de85a92f3bd775ca624 100644 --- a/inc/lang/eo/subscr_list.txt +++ b/inc/lang/eo/subscr_list.txt @@ -13,5 +13,4 @@ Por nuligi la paÄinformojn, ensalutu la vikion ĉe kaj malabonu la paÄajn kaj/aÅ nomspacajn ÅanÄojn. -- -Tiu retpoÅtaĵo kreiÄis de DokuWiki ĉe -@DOKUWIKIURL@ \ No newline at end of file +Tiu retpoÅtaĵo kreiÄis de DokuWiki ĉe @DOKUWIKIURL@ diff --git a/inc/lang/eo/subscr_single.txt b/inc/lang/eo/subscr_single.txt index d51c5ca15a6d1645139ada04940286263635a1c9..431fd02511be534bb17aa909b7c56d7e8516caa5 100644 --- a/inc/lang/eo/subscr_single.txt +++ b/inc/lang/eo/subscr_single.txt @@ -19,5 +19,4 @@ Por nuligi la paÄinformojn, ensalutu la vikion ĉe kaj malabonu la paÄajn kaj/aÅ nomspacajn ÅanÄojn. -- -Tiu retpoÅtaĵo kreiÄis de DokuWiki ĉe -@DOKUWIKIURL@ \ No newline at end of file +Tiu retpoÅtaĵo kreiÄis de DokuWiki ĉe @DOKUWIKIURL@ diff --git a/inc/lang/eo/updateprofile.txt b/inc/lang/eo/updateprofile.txt index a3de0c8406f8e9a56c0c5b2df210040938c813ee..4b52ff20aacc645cfe1dfd3169e0a7e885159fc4 100644 --- a/inc/lang/eo/updateprofile.txt +++ b/inc/lang/eo/updateprofile.txt @@ -1,3 +1,3 @@ ====== Äœisdatigi vian profilon ====== -Vi nur bezonas kompletigi tiujn kampojn, kiujn vi deziras ÅanÄi. Vi ne povas ÅanÄi vian uzantonomon. \ No newline at end of file +Vi nur kompletigu tiujn kampojn, kiujn vi deziras ÅanÄi. Vi ne povas ÅanÄi vian uzantonomon. diff --git a/inc/lang/eo/uploadmail.txt b/inc/lang/eo/uploadmail.txt index e7c327a60d12ac2953903a99f450ae476f6cfe89..1cb48ade6eb333068ed88200d84e8a787996c994 100644 --- a/inc/lang/eo/uploadmail.txt +++ b/inc/lang/eo/uploadmail.txt @@ -1,4 +1,4 @@ -Dosiero estis alÅutita al via DokuVikio. Jen detaloj: +Dosiero alÅutiÄis al via DokuVikio. Jen detaloj: Dosiero: @MEDIA@ Dato: @DATE@ @@ -10,5 +10,4 @@ Dosier-tipo: @MIME@ Uzanto: @USER@ -- -Tiu ĉi mesaÄo estis kreita de DokuWiki ĉe -@DOKUWIKIURL@ \ No newline at end of file +Tiu ĉi mesaÄo kreiÄis de DokuWiki ĉe @DOKUWIKIURL@ diff --git a/inc/lang/fr/lang.php b/inc/lang/fr/lang.php index 140c584c375be0665560a69c227de8b4e599fa77..a77be6965cd80bc4fe3d73fc64634db8133180ed 100644 --- a/inc/lang/fr/lang.php +++ b/inc/lang/fr/lang.php @@ -23,6 +23,7 @@ * @author Johan Guilbaud <guilbaud.johan@gmail.com> * @author schplurtz@laposte.net * @author skimpax@gmail.com + * @author Yannick Aure <yannick.aure@gmail.com> */ $lang['encoding'] = 'utf-8'; $lang['direction'] = 'ltr'; @@ -58,6 +59,7 @@ $lang['btn_backtomedia'] = 'Retour à la sélection du fichier média'; $lang['btn_subscribe'] = 'S\'abonner à la page'; $lang['btn_profile'] = 'Mettre à jour le profil'; $lang['btn_reset'] = 'Réinitialiser'; +$lang['btn_resendpwd'] = 'Définir un nouveau mot de passe'; $lang['btn_draft'] = 'Modifier le brouillon'; $lang['btn_recover'] = 'Récupérer le brouillon'; $lang['btn_draftdel'] = 'Effacer le brouillon'; @@ -94,6 +96,7 @@ $lang['profnoempty'] = 'Un nom ou une adresse de courriel vide n\'est $lang['profchanged'] = 'Mise à jour du profil réussie.'; $lang['pwdforget'] = 'Mot de passe oublié ? Faites-vous envoyer votre mot de passe '; $lang['resendna'] = 'Ce wiki ne permet pas le renvoi de mot de passe.'; +$lang['resendpwd'] = 'Définir un nouveau mot de passe pour'; $lang['resendpwdmissing'] = 'Désolé, vous devez remplir tous les champs.'; $lang['resendpwdnouser'] = 'Désolé, cet utilisateur est introuvable dans notre base.'; $lang['resendpwdbadauth'] = 'Désolé, ce code d\'authentification est invalide. Assurez-vous d\'avoir utilisé le lien de confirmation.'; @@ -198,6 +201,11 @@ $lang['external_edit'] = 'modification externe'; $lang['summary'] = 'Résumé'; $lang['noflash'] = 'Le greffon <a href="http://www.adobe.com/products/flashplayer/">Adobe Flash</a> est nécessaire pour afficher ce contenu.'; $lang['download'] = 'Télécharger un extrait'; +$lang['tools'] = 'Outils'; +$lang['user_tools'] = 'Outils d\'utilisateurs'; +$lang['site_tools'] = 'Outils du Site'; +$lang['page_tools'] = 'Outils de la Page'; +$lang['skip_to_content'] = 'Aller au contenu'; $lang['mail_newpage'] = 'page ajoutée :'; $lang['mail_changed'] = 'page modifiée :'; $lang['mail_subscribe_list'] = 'pages modifiées dans la catégorie :'; @@ -268,6 +276,7 @@ $lang['subscr_style_digest'] = 'Courriel, tous les %.2f jours, résumant les m $lang['subscr_style_list'] = 'Liste des pages modifiées depuis le dernier courriel (tous les %.2f jours)'; $lang['authmodfailed'] = 'Mauvais paramétrage de l\'authentification. Merci d\'informer l\'administrateur du Wiki.'; $lang['authtempfail'] = 'L\'authentification est temporairement indisponible. Si cela perdure, merci d\'informer l\'administrateur du Wiki.'; +$lang['authpwdexpire'] = 'Votre mot de passe expirera dans %d jours, vous devriez le changer bientôt.'; $lang['i_chooselang'] = 'Choisissez votre langue'; $lang['i_installer'] = 'Installeur DokuWiki'; $lang['i_wikiname'] = 'Nom du wiki'; diff --git a/inc/lang/fr/resetpwd.txt b/inc/lang/fr/resetpwd.txt new file mode 100644 index 0000000000000000000000000000000000000000..7b1990ca042d12267e542baf60a4f8dc6a47063a --- /dev/null +++ b/inc/lang/fr/resetpwd.txt @@ -0,0 +1,3 @@ +====== Définir un nouveau mot de passe ====== + +Merci d'entrer un nouveau mot de passe pour votre compte sur ce wiki. \ No newline at end of file diff --git a/inc/lang/it/lang.php b/inc/lang/it/lang.php index eda33898bbccdb661bcabe0aba2890a958003aa6..70082caae27639120b5170a0728a1c71be43941e 100644 --- a/inc/lang/it/lang.php +++ b/inc/lang/it/lang.php @@ -13,6 +13,7 @@ * @author Matteo Carnevali <rekstorm@gmail.com> * @author Osman Tekin <osman.tekin93@hotmail.it> * @author Jacopo Corbetta <jacopo.corbetta@gmail.com> + * @author Matteo Pasotti <matteo@xquiet.eu> */ $lang['encoding'] = 'utf-8'; $lang['direction'] = 'ltr'; @@ -48,11 +49,14 @@ $lang['btn_backtomedia'] = 'Torna alla selezione file'; $lang['btn_subscribe'] = 'Sottoscrivi modifiche'; $lang['btn_profile'] = 'Aggiorna profilo'; $lang['btn_reset'] = 'Annulla'; +$lang['btn_resendpwd'] = 'Imposta nuova password'; $lang['btn_draft'] = 'Modifica bozza'; $lang['btn_recover'] = 'Ripristina bozza'; $lang['btn_draftdel'] = 'Elimina bozza'; $lang['btn_revert'] = 'Ripristina'; $lang['btn_register'] = 'Registrazione'; +$lang['btn_apply'] = 'Applica'; +$lang['btn_media'] = 'Gestore Media'; $lang['loggedinas'] = 'Collegato come'; $lang['user'] = 'Nome utente'; $lang['pass'] = 'Password'; @@ -82,6 +86,7 @@ $lang['profnoempty'] = 'Nome o indirizzo email vuoti non sono consenti $lang['profchanged'] = 'Aggiornamento del profilo utente riuscito.'; $lang['pwdforget'] = 'Hai dimenticato la password? Richiedine una nuova'; $lang['resendna'] = 'Questo wiki non supporta l\'invio di nuove password.'; +$lang['resendpwd'] = 'Imposta nuova password per'; $lang['resendpwdmissing'] = 'Devi riempire tutti i campi.'; $lang['resendpwdnouser'] = 'Impossibile trovare questo utente nel database.'; $lang['resendpwdbadauth'] = 'Spiacenti, questo codice di autorizzazione non è valido. Assicurati di aver usato il link completo di conferma.'; @@ -94,9 +99,10 @@ $lang['searchmedia_in'] = 'Cerca in %s'; $lang['txt_upload'] = 'Seleziona un file da caricare'; $lang['txt_filename'] = 'Carica come (opzionale)'; $lang['txt_overwrt'] = 'Sovrascrivi file esistente'; +$lang['maxuploadsize'] = 'Upload max. %s per ogni file.'; $lang['lockedby'] = 'Attualmente bloccato da'; $lang['lockexpire'] = 'Il blocco scade alle'; -$lang['js']['willexpire'] = 'Il tuo blocco su questa pagina scadrà tra circa un minuto.\nPer evitare incongruenze usa il pulsante di anteprima per prolungare il periodo di blocco.'; +$lang['js']['willexpire'] = 'Il tuo blocco su questa pagina scadrà tra circa un minuto.\nPer evitare incongruenze usa il pulsante di anteprima per prolungare il periodo di blocco.'; $lang['js']['notsavedyet'] = 'Le modifiche non salvate andranno perse.'; $lang['js']['searchmedia'] = 'Cerca file'; $lang['js']['keepopen'] = 'Tieni la finestra aperta durante la selezione'; @@ -127,6 +133,15 @@ $lang['js']['nosmblinks'] = 'I collegamenti con le risorse condivise di Win $lang['js']['linkwiz'] = 'Collegamento guidato'; $lang['js']['linkto'] = 'Collega a:'; $lang['js']['del_confirm'] = 'Eliminare veramente questa voce?'; +$lang['js']['restore_confirm'] = 'Vuoi davvero ripristinare questa versione?'; +$lang['js']['media_diff'] = 'Guarda le differenze:'; +$lang['js']['media_diff_both'] = 'Fianco a Fianco'; +$lang['js']['media_select'] = 'Seleziona files..'; +$lang['js']['media_upload_btn'] = 'Upload'; +$lang['js']['media_done_btn'] = 'Fatto'; +$lang['js']['media_drop'] = 'Sgancia i files qui per caricarli'; +$lang['js']['media_cancel'] = 'rimuovi'; +$lang['js']['media_overwrt'] = 'Sovrascrivi i file esistenti'; $lang['rssfailed'] = 'Si è verificato un errore cercando questo feed: '; $lang['nothingfound'] = 'Nessun risultato trovato.'; $lang['mediaselect'] = 'Selezione dei file'; @@ -161,6 +176,8 @@ $lang['yours'] = 'la tua versione'; $lang['diff'] = 'differenze con la versione attuale'; $lang['diff2'] = 'differenze tra le versioni selezionate'; $lang['difflink'] = 'Link a questa pagina di confronto'; +$lang['diff_type'] = 'Guarda le differenze:'; +$lang['diff_side'] = 'Fianco a Fianco'; $lang['line'] = 'Linea'; $lang['breadcrumb'] = 'Traccia'; $lang['youarehere'] = 'Ti trovi qui'; @@ -173,11 +190,19 @@ $lang['external_edit'] = 'modifica esterna'; $lang['summary'] = 'Oggetto della modifica'; $lang['noflash'] = 'E\' necessario <a href="http://www.adobe.com/products/flashplayer/">il plugin Adobe Flash</a> per visualizzare questo contenuto.'; $lang['download'] = 'Scarica lo "snippet"'; +$lang['tools'] = 'Strumenti'; +$lang['user_tools'] = 'Strumenti Utente'; +$lang['site_tools'] = 'Strumenti Sito'; +$lang['page_tools'] = 'Strumenti Pagina'; +$lang['skip_to_content'] = 'salta al contenuto'; $lang['mail_newpage'] = 'pagina aggiunta:'; $lang['mail_changed'] = 'pagina modificata:'; $lang['mail_subscribe_list'] = 'pagine modificate nella categoria:'; $lang['mail_new_user'] = 'nuovo utente:'; $lang['mail_upload'] = 'file caricato:'; +$lang['changes_type'] = 'Guarda cambiamenti di'; +$lang['pages_changes'] = 'Pagine'; +$lang['both_changes'] = 'Sia pagine che media files'; $lang['qb_bold'] = 'Grassetto'; $lang['qb_italic'] = 'Corsivo'; $lang['qb_underl'] = 'Sottolineato'; @@ -218,6 +243,9 @@ $lang['img_copyr'] = 'Copyright'; $lang['img_format'] = 'Formato'; $lang['img_camera'] = 'Camera'; $lang['img_keywords'] = 'Parole chiave'; +$lang['img_width'] = 'Larghezza'; +$lang['img_height'] = 'Altezza'; +$lang['img_manager'] = 'Guarda nel gestore media'; $lang['subscr_subscribe_success'] = 'Aggiunto %s alla lista di sottoscrizioni %s'; $lang['subscr_subscribe_error'] = 'Impossibile aggiungere %s alla lista di sottoscrizioni %s'; $lang['subscr_subscribe_noaddress'] = 'Non esiste alcun indirizzo associato al tuo account, non puoi essere aggiunto alla lista di sottoscrizioni'; @@ -236,6 +264,7 @@ $lang['subscr_style_digest'] = 'email riassuntiva delle modifiche di ogni pagi $lang['subscr_style_list'] = 'elenco delle pagine modificate dall\'ultima email'; $lang['authmodfailed'] = 'La configurazione dell\'autenticazione non è corretta. Informa l\'amministratore di questo wiki.'; $lang['authtempfail'] = 'L\'autenticazione è temporaneamente non disponibile. Se questa situazione persiste, informa l\'amministratore di questo wiki.'; +$lang['authpwdexpire'] = 'La tua password scadrà in %d giorni, dovresti cambiarla quanto prima.'; $lang['i_chooselang'] = 'Scegli la lingua'; $lang['i_installer'] = 'Installazione di DokuWiki'; $lang['i_wikiname'] = 'Nome Wiki'; @@ -269,3 +298,20 @@ $lang['hours'] = '%d ore fa'; $lang['minutes'] = '%d minuti fa'; $lang['seconds'] = '%d secondi fa'; $lang['wordblock'] = 'La modifica non è stata salvata perché contiene testo bloccato (spam).'; +$lang['media_searchtab'] = 'Cerca'; +$lang['media_viewtab'] = 'Guarda'; +$lang['media_edittab'] = 'Modifica'; +$lang['media_historytab'] = 'Storia'; +$lang['media_list_rows'] = 'Righe'; +$lang['media_sort_name'] = 'Nome'; +$lang['media_sort_date'] = 'Data'; +$lang['media_namespaces'] = 'Scegli il namespace'; +$lang['media_files'] = 'File in %s'; +$lang['media_search'] = 'Cerca in %s'; +$lang['media_edit'] = 'Modifica %s'; +$lang['media_history'] = 'Storia di %s'; +$lang['media_perm_read'] = 'Spiacente, non hai abbastanza privilegi per leggere i files.'; +$lang['media_perm_upload'] = 'Spiacente, non hai abbastanza privilegi per caricare files.'; +$lang['media_update'] = 'Carica nuova versione'; +$lang['media_restore'] = 'Ripristina questa versione'; +$lang['plugin_install_err'] = 'Plugin installato non correttamente. Rinomino la cartella del plugin \'%s\' in \'%s\'.'; diff --git a/inc/lang/it/mailwrap.html b/inc/lang/it/mailwrap.html new file mode 100644 index 0000000000000000000000000000000000000000..24a2bc8a96d4510a7bc7af7138ebe24c5aa23b42 --- /dev/null +++ b/inc/lang/it/mailwrap.html @@ -0,0 +1,13 @@ +<html> +<head> +<title>@TITLE@</title> +<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> +</head> +<body> + +@HTMLBODY@ + +<br /><hr /> +<small>Questa email è stata generata da DokuWiki presso @DOKUWIKIURL@.</small> +</body> +</html> \ No newline at end of file diff --git a/inc/lang/it/resetpwd.txt b/inc/lang/it/resetpwd.txt new file mode 100644 index 0000000000000000000000000000000000000000..450dd83015141abf715da86a1e1ba6bc5b1ea43e --- /dev/null +++ b/inc/lang/it/resetpwd.txt @@ -0,0 +1 @@ +Inserisci perfavore una nuova password per il tuo account su questo wiki. \ No newline at end of file diff --git a/inc/lang/ja/lang.php b/inc/lang/ja/lang.php index 057fa5a5486e5fda949502e6ef9caeb4a379108b..490c84cc9e46cbad177ba818facf87fcd27106c8 100644 --- a/inc/lang/ja/lang.php +++ b/inc/lang/ja/lang.php @@ -261,6 +261,7 @@ $lang['subscr_style_digest'] = 'ãれãžã‚Œã®ãƒšãƒ¼ã‚¸ã¸ã®å¤‰æ›´ã®è¦ç´„ $lang['subscr_style_list'] = 'å‰å›žã®ãƒ¡ãƒ¼ãƒ«ã‹ã‚‰å¤‰æ›´ã•れãŸãƒšãƒ¼ã‚¸ã‚’リスト(%.2f 日毎)'; $lang['authmodfailed'] = 'ユーザーèªè¨¼ã®è¨å®šãŒæ£ã—ãã‚りã¾ã›ã‚“。Wikiã®ç®¡ç†è€…ã«é€£çµ¡ã—ã¦ä¸‹ã•ã„。'; $lang['authtempfail'] = 'ユーザーèªè¨¼ãŒä¸€æ™‚çš„ã«ä½¿ç”¨ã§ããªããªã£ã¦ã„ã¾ã™ã€‚ã“ã®çŠ¶æ…‹ãŒç¶šã„ã¦ã„るよã†ã§ã‚れã°ã€Wikiã®ç®¡ç†è€…ã«é€£çµ¡ã—ã¦ä¸‹ã•ã„。'; +$lang['authpwdexpire'] = 'ã‚ãªãŸã®ãƒ‘スワードã¯ã€ã‚ã¨%dæ—¥ã§æœ‰åŠ¹æœŸé™ãŒåˆ‡ã‚Œã¾ã™ã€‚パスワードを変更ã—ã¦ãã ã•ã„。'; $lang['i_chooselang'] = 'ä½¿ç”¨è¨€èªžã‚’é¸æŠžã—ã¦ãã ã•ã„'; $lang['i_installer'] = 'DokuWiki インストーラー'; $lang['i_wikiname'] = 'Wikiå'; diff --git a/inc/lang/ko/admin.txt b/inc/lang/ko/admin.txt index 7dd0f58b390ba65ab7e5accb32ae10fa9649130b..c61db1a42dc9376ea07036a042c119567b0ed2e1 100644 --- a/inc/lang/ko/admin.txt +++ b/inc/lang/ko/admin.txt @@ -1,4 +1,3 @@ ====== 관리 작업 ====== -DokuWikiì—서 사용가능한 관리 작업 목ë¡ì„ 아래ì—서 ì°¾ì„ ìˆ˜ 있습니다. - +DokuWikiì—서 사용 가능한 관리 작업 목ë¡ì„ 아래ì—서 ì°¾ì„ ìˆ˜ 있습니다. \ No newline at end of file diff --git a/inc/lang/ko/backlinks.txt b/inc/lang/ko/backlinks.txt index 1711945e408bba0a011361a68c91d92ac42d8231..ce77ca5a75d66e45f92f746c4820e92f813f4bba 100644 --- a/inc/lang/ko/backlinks.txt +++ b/inc/lang/ko/backlinks.txt @@ -1,4 +1,3 @@ -====== ë°±ë§í¬ ====== - -현재 페ì´ì§€ë¡œ ë°±ë§í¬ë˜ëŠ” 페ì´ì§€ 목ë¡ìž…니다. +====== 가리키는 ë§í¬ ====== +현재 문서를 가리키는 ë§í¬ê°€ 있는 문서 목ë¡ìž…니다. diff --git a/inc/lang/ko/conflict.txt b/inc/lang/ko/conflict.txt index 52929635960ab1025cbd348c8351a597799ff717..43988a62b92e313c73947e2d44fa9cda0546fde6 100644 --- a/inc/lang/ko/conflict.txt +++ b/inc/lang/ko/conflict.txt @@ -1,6 +1,5 @@ ====== 새 ë²„ì „ ìžˆìŒ ====== -íŽ¸ì§‘í•˜ì‹ ë¬¸ì„œì˜ ìƒˆ ë²„ì „ì´ ìžˆìŠµë‹ˆë‹¤. ë‹¹ì‹ ì´ íŽ¸ì§‘í•˜ê³ ìžˆëŠ” ë™ì•ˆ 다른 ì‚¬ëžŒì´ ë™ì¼í•œ 파ì¼ì„ íŽ¸ì§‘í•˜ì˜€ì„ ê²½ìš° ì´ëŸ° ì¼ì´ ìƒê¸¸ 수 있습니다. - -ì•„ëž˜ì˜ ì°¨ì´ì ì„ ë©´ë°€ížˆ ê²€í† í•˜ì‹œê³ , ì–´ë–¤ ë²„ì „ì„ ì €ìž¥í•˜ì‹¤ì§€ ê²°ì •í•˜ì‹ì‹œì˜¤. **ì €ìž¥**ì„ ì„ íƒí•˜ì‹œë©´, ë‹¹ì‹ ì˜ ë²„ì „ì´ ì €ìž¥ë©ë‹ˆë‹¤. **취소** 를 ì„ íƒí•˜ì‹œë©´ 현재 ë²„ì „ì´ ìœ ì§€ë©ë‹ˆë‹¤. +편집한 ë¬¸ì„œì˜ ìƒˆ ë²„ì „ì´ ìžˆìŠµë‹ˆë‹¤. ë‹¹ì‹ ì´ íŽ¸ì§‘í•˜ê³ ìžˆëŠ” ë™ì•ˆ 다른 ì‚¬ëžŒì´ ê°™ì€ íŒŒì¼ì„ íŽ¸ì§‘í•˜ì˜€ì„ ê²½ìš° ì´ëŸ° ì¼ì´ ìƒê¸¸ 수 있습니다. +ì•„ëž˜ì˜ ì°¨ì´ë¥¼ ì² ì €í•˜ê²Œ ê²€í† í•˜ê³ ì–´ë–¤ ë²„ì „ì„ ì €ìž¥í•˜ì‹¤ì§€ ê²°ì •í•˜ì‹ì‹œì˜¤. **ì €ìž¥**ì„ ì„ íƒí•˜ë©´, ë‹¹ì‹ ì˜ ë²„ì „ì´ ì €ìž¥ë©ë‹ˆë‹¤. **취소**를 ì„ íƒí•˜ë©´ 현재 ë²„ì „ì´ ìœ ì§€ë©ë‹ˆë‹¤. \ No newline at end of file diff --git a/inc/lang/ko/denied.txt b/inc/lang/ko/denied.txt index 316a660c09afd1dac2d040c25f728765dc233fc6..f384a0a8c161c8306635671611f583609f2e6f7a 100644 --- a/inc/lang/ko/denied.txt +++ b/inc/lang/ko/denied.txt @@ -1,4 +1,3 @@ ====== 권한 ê±°ì ˆ ====== -계ì†í• 수 있는 ê¶Œí•œì´ ì—†ìŠµë‹ˆë‹¤. 로그ì¸í•˜ì‹ì‹œì˜¤. - +계ì†í• 수 있는 ê¶Œí•œì´ ì—†ìŠµë‹ˆë‹¤. 로그ì¸í•˜ì‹ì‹œì˜¤. \ No newline at end of file diff --git a/inc/lang/ko/diff.txt b/inc/lang/ko/diff.txt index 8cfb1da43e4d13e77955443aa080f9b69730eaaf..76b488d90c5feb7e9bfbc1dcdb4df28c6ceed596 100644 --- a/inc/lang/ko/diff.txt +++ b/inc/lang/ko/diff.txt @@ -1,5 +1,3 @@ -====== ì°¨ì´ì ====== - -ì´ íŽ˜ì´ì§€ì˜ ì„ íƒí•œ ì´ì „ ë²„ì „ê³¼ 현재 ë²„ì „ 사ì´ì˜ ì°¨ì´ì ì„ ë³´ì—¬ì¤ë‹ˆë‹¤. - +====== ì°¨ì´ ====== +ì´ ë¬¸ì„œì˜ ì„ íƒí•œ ì´ì „ ë²„ì „ê³¼ 현재 ë²„ì „ 사ì´ì˜ ì°¨ì´ë¥¼ ë³´ì—¬ì¤ë‹ˆë‹¤. \ No newline at end of file diff --git a/inc/lang/ko/draft.txt b/inc/lang/ko/draft.txt index 3df8a5e868f6b91f95d05d50af5910d05a78b632..861834e5d49d70e22ffd105d7510ddd2f1cb8470 100644 --- a/inc/lang/ko/draft.txt +++ b/inc/lang/ko/draft.txt @@ -1,6 +1,5 @@ -====== 문서 ì´ˆì•ˆì´ ìžˆìŠµë‹ˆë‹¤. ====== +====== 문서 초안 ìžˆìŒ ====== -ì´ íŽ˜ì´ì§€ì˜ 마지막 편집 ì„¸ì…˜ì€ ì •ìƒì 으로 ë나지 않았습니다. DokuWiki는 작업 ë„중 ìžë™ìœ¼ë¡œ ì €ìž¥ëœ ë¬¸ì„œ ì´ˆì•ˆì„ ì‚¬ìš©í•˜ì—¬ íŽ¸ì§‘ì„ ê³„ì† í• ìˆ˜ 있습니다. 마지막 세션ë™ì•ˆ ì €ìž¥ëœ ë¬¸ì„œ ì´ˆì•ˆì„ ì•„ëž˜ì—서 ë³¼ 수 있습니다. - -확실하게 ë¹„ì •ìƒì 으로 ì¢…ë£Œëœ ì„¸ì…˜ì„ //복구//í• ì§€ 여부를 ê²°ì •í•˜ê³ , ìžë™ìœ¼ë¡œ ì €ìž¥ë˜ì—ˆë˜ ì´ˆì•ˆì„ //ì‚ì œ//하거나 편집 ê³¼ì •ì„ ì·¨ì†Œí•˜ê¸° ë°”ëžë‹ˆë‹¤. +ì´ ë¬¸ì„œì˜ ë§ˆì§€ë§‰ 편집 ì„¸ì…˜ì€ ì •ìƒì 으로 ë나지 않았습니다. DokuWiki는 작업 ë„중 ìžë™ìœ¼ë¡œ ì €ìž¥ëœ ë¬¸ì„œ ì´ˆì•ˆì„ ì‚¬ìš©í•˜ì—¬ íŽ¸ì§‘ì„ ê³„ì† í• ìˆ˜ 있습니다. 마지막 세션 ë™ì•ˆ ì €ìž¥ëœ ë¬¸ì„œ ì´ˆì•ˆì„ ì•„ëž˜ì—서 ë³¼ 수 있습니다. +ë¹„ì •ìƒì 으로 ë난 편집 ì„¸ì…˜ì„ **복구**í• ì§€ 여부를 ê²°ì •í•˜ê³ , ìžë™ìœ¼ë¡œ ì €ìž¥ë˜ì—ˆë˜ ì´ˆì•ˆì„ **ì‚ì œ**하거나 편집 ê³¼ì •ì„ **취소**하기 ë°”ëžë‹ˆë‹¤. \ No newline at end of file diff --git a/inc/lang/ko/edit.txt b/inc/lang/ko/edit.txt index 9b59524f72c5719fea85e91a97211cdc33ef8e30..f52326a337735c1210b4b1f93e94b59810b8e66f 100644 --- a/inc/lang/ko/edit.txt +++ b/inc/lang/ko/edit.txt @@ -1,2 +1 @@ -페ì´ì§€ë¥¼ íŽ¸ì§‘í•˜ê³ **ì €ìž¥**ì„ ëˆ„ë¥´ì‹ì‹œì˜¤. 위키 êµ¬ë¬¸ì€ [[wiki:syntax]] í˜¹ì€ [[wiki:ko_syntax|(한글) 구문]]ì„ ì°¸ê³ í•˜ì‹ì‹œì˜¤. ì´ íŽ˜ì´ì§€ë¥¼ **ë” ë‚«ê²Œ 만들 ìžì‹ ì´ ìžˆì„** 때ì—ë§Œ 편집하ì‹ì‹œì˜¤. ì‹¤í—˜ì„ í•˜ê³ ì‹¶ì„ ë•Œì—는, ë¨¼ì € [[playground:playground|연습장]] ì— ê°€ì„œ 연습해 ë³´ì‹ì‹œì˜¤. - +문서를 íŽ¸ì§‘í•˜ê³ **ì €ìž¥**ì„ ëˆ„ë¥´ì„¸ìš”. 위키 êµ¬ë¬¸ì€ [[wiki:syntax]] ë˜ëŠ” [[wiki:ko_syntax|(한êµì–´) 구문]]ì„ ì°¸ê³ í•˜ì„¸ìš”. ì´ ë¬¸ì„œë¥¼ **ë” ì¢‹ê²Œ 만들 ìžì‹ ì´ ìžˆì„ ë•Œ**ì—ë§Œ 편집하세요. ì—°ìŠµì„ í•˜ê³ ì‹¶ë‹¤ë©´ ë¨¼ì € [[playground:playground|연습장]]ì— ê°€ì„œ 연습하세요. diff --git a/inc/lang/ko/editrev.txt b/inc/lang/ko/editrev.txt index 2715448d39b3288d481f5adf503f16c4aae745d8..136eef733b6d7722e720a315659699bee2185dd3 100644 --- a/inc/lang/ko/editrev.txt +++ b/inc/lang/ko/editrev.txt @@ -1,2 +1,2 @@ -**ë¬¸ì„œì˜ ì´ì „ ë²„ì „ì„ ì„ íƒí•˜ì˜€ìŠµë‹ˆë‹¤!** ì €ìž¥í• ê²½ìš° ì´ ìžë£Œì˜ 새 ë²„ì „ì„ ë§Œë“니다. +**ë¬¸ì„œì˜ ì´ì „ ë²„ì „ì„ ì„ íƒí•˜ì˜€ìŠµë‹ˆë‹¤!** ì €ìž¥í• ê²½ìš° ì´ ë°ì´í„°ë¡œ 새 ë²„ì „ì„ ë§Œë“니다. ---- \ No newline at end of file diff --git a/inc/lang/ko/index.txt b/inc/lang/ko/index.txt index 7ca9488e05e738b9254211ddf7c0cf92dc248112..24eb9450c69b1f2602777ac10cce8ae6255c83eb 100644 --- a/inc/lang/ko/index.txt +++ b/inc/lang/ko/index.txt @@ -1,4 +1,3 @@ -====== Index ====== - -ì´ íŽ˜ì´ì§€ëŠ” [[doku>namespaces|네임스페ì´ìФ]] ì—서 ì •ë ¬í•œ ëª¨ë“ íŽ˜ì´ì§€ì˜ 목ë¡ìž…니다. +====== 사ì´íŠ¸ë§µ ====== +ì´ íŽ˜ì´ì§€ëŠ” [[doku>namespaces|ì´ë¦„공간]]ì—서 ì •ë ¬í•œ ëª¨ë“ ë¬¸ì„œì˜ ëª©ë¡ìž…니다. \ No newline at end of file diff --git a/inc/lang/ko/install.html b/inc/lang/ko/install.html index 6b1bfaf751292f82575ed6d19336aec1271303e3..f73b91294cffac255005e2039ca850b5efa7f101 100644 --- a/inc/lang/ko/install.html +++ b/inc/lang/ko/install.html @@ -1,17 +1,15 @@ <p>ì´ íŽ˜ì´ì§€ëŠ” <a href="http://dokuwiki.org">Dokuwiki</a> 설치와 환경 ì„¤ì •ì„ ë„와ì¤ë‹ˆë‹¤. -. 설치 ê³¼ì •ì— ëŒ€í•œ ë” ìžì„¸í•œ ì •ë³´ëŠ” <a href="http://dokuwiki.org/ko:install">한글 설치문서</a>와 -<a href="http://dokuwiki.org/install">ì˜ë¬¸ 설치문서</a>를 ì°¸ê³ í•˜ê¸° ë°”ëžë‹ˆë‹¤. -</p> +설치 ê³¼ì •ì— ëŒ€í•œ ë” ìžì„¸í•œ ì •ë³´ëŠ” <a href="http://dokuwiki.org/ko:install">(한êµì–´) 설치 문서</a>와 +<a href="http://dokuwiki.org/install">(ì˜ì–´) 설치 문서</a>를 ì°¸ê³ í•˜ê¸° ë°”ëžë‹ˆë‹¤.</p> -<p>DokuWiki는 위키 페ì´ì§€ì™€ 페ì´ì§€ì™€ ê´€ë ¨ëœ ì •ë³´(그림,색ì¸, ì´ì „ ë²„ì „ 문서 등등)를 ì €ìž¥í•˜ê¸° 위해 ì¼ë°˜ì ì¸ í…스트 파ì¼ë“¤ì„ 사용합니다. ì •ìƒì 으로 DokuWiki를 ì‚¬ìš©í•˜ë ¤ë©´ ì´ íŒŒì¼ë“¤ì„ ë‹´ê³ ìžˆëŠ” ë””ë ‰í† ë¦¬ë“¤ì— ëŒ€í•œ 쓰기 ê¶Œí•œì„ ê°€ì§€ê³ ìžˆì–´ì•¼ 합니다. -현재 설치 ê³¼ì • 중ì—는 ë””ë ‰í† ë¦¬ 권한 ì„¤ì •ì´ ë¶ˆê°€ëŠ¥í•©ë‹ˆë‹¤. 보통 ì§ì ‘ 쉘 ëª…ë ¹ì–´ë¥¼ 사용하거나, í˜¸ìŠ¤íŒ…ì„ ì‚¬ìš©í•œë‹¤ë©´ FTP나 호스팅 ì œì–´íŒ(예. CPanel)ì„ ì‚¬ìš©í•´ì„œ ì„¤ì •í•´ì•¼ 합니다.</p> +<p>DokuWiki는 위키 문서와 문서와 ê´€ë ¨ëœ ì •ë³´(예를 들어 그림, 검색 색ì¸, ì´ì „ ë²„ì „ 문서)를 ì €ìž¥í•˜ê¸° 위해 ì¼ë°˜ì ì¸ í…스트 파ì¼ì„ 사용합니다. ì •ìƒì 으로 DokuWiki를 ì‚¬ìš©í•˜ë ¤ë©´ ì´ íŒŒì¼ì„ ë‹´ê³ ìžˆëŠ” ë””ë ‰í† ë¦¬ì— ëŒ€í•œ 쓰기 ê¶Œí•œì„ ê°€ì§€ê³ ìžˆì–´ì•¼ 합니다. +현재 설치 ê³¼ì • 중ì—는 ë””ë ‰í† ë¦¬ 권한 ì„¤ì •ì´ ë¶ˆê°€ëŠ¥í•©ë‹ˆë‹¤. 보통 ì§ì ‘ 쉘 ëª…ë ¹ì–´ë¥¼ 사용하거나, í˜¸ìŠ¤íŒ…ì„ ì‚¬ìš©í•œë‹¤ë©´ FTP나 호스팅 ì œì–´íŒ(예를 들어 CPanel)ì„ ì‚¬ìš©í•´ì„œ ì„¤ì •í•´ì•¼ 합니다.</p> -<p>현재 설치 ê³¼ì •ì¤‘ì— ê´€ë¦¬ìžë¡œ ë¡œê·¸ì¸ í›„ DokuWikiì˜ ê´€ë¦¬ 메뉴(í”ŒëŸ¬ê·¸ì¸ ì„¤ì¹˜, ì‚¬ìš©ìž ê´€ë¦¬, 위키 페ì´ì§€ ì ‘ê·¼ 권한 관리, 옵션 ì„¤ì •)를 가능하게 <acronym title="ì ‘ê·¼ ì œì–´ 목ë¡">ACL</acronym>ì— ëŒ€í•œ 환경 ì„¤ì •ì„ ìˆ˜í–‰í•©ë‹ˆë‹¤. -ì´ ê²ƒì€ DokuWikiê°€ ë™ìž‘í•˜ëŠ”ë° í•„ìš”í•œ 사í•ì€ ì•„ë‹ˆì§€ë§Œ, ì–´ì°Œë˜ì—ˆë“ ë” ì‰½ê²Œ 관리ìžê°€ ê´€ë¦¬í• ìˆ˜ 있ë„ë¡ í•´ì¤ë‹ˆë‹¤.</p> +<p>현재 설치 ê³¼ì •ì¤‘ì— ê´€ë¦¬ìžë¡œ ë¡œê·¸ì¸ í›„ DokuWikiì˜ ê´€ë¦¬ 메뉴(í”ŒëŸ¬ê·¸ì¸ ì„¤ì¹˜, ì‚¬ìš©ìž ê´€ë¦¬, 위키 문서 ì ‘ê·¼ 권한 관리, 옵션 ì„¤ì •)를 가능하게 <acronym title="ì ‘ê·¼ ì œì–´ 목ë¡">ACL</acronym>ì— ëŒ€í•œ 환경 ì„¤ì •ì„ ìˆ˜í–‰í•©ë‹ˆë‹¤. +ì´ ê²ƒì€ DokuWikiê°€ ë™ìž‘í•˜ëŠ”ë° í•„ìš”í•œ 사í•ì€ ì•„ë‹ˆì§€ë§Œ, ì–´ì¨Œë“ ë” ì‰½ê²Œ 관리ìžê°€ ê´€ë¦¬í• ìˆ˜ 있ë„ë¡ í•´ì¤ë‹ˆë‹¤.</p> -<p>ìˆ™ë ¨ëœ ì‚¬ìš©ìžë“¤ì´ë‚˜ 특별한 설치 ê³¼ì •ì´ í•„ìš”í•œ ê²½ìš°ì— ë‹¤ìŒ ë§í¬ë“¤ì„ 참조하기 ë°”ëžë‹ˆë‹¤: -<a href="http://dokuwiki.org/ko:install">설치 ê³¼ì •(한글)</a> -ê³¼ <a href="http://dokuwiki.org/ko:config">환경 ì„¤ì •(한글),</a> -<a href="http://dokuwiki.org/install">설치 ê³¼ì •(ì˜ë¬¸)</a> -ê³¼ <a href="http://dokuwiki.org/config">환경 ì„¤ì •(ì˜ë¬¸)</a> -</p> +<p>ìˆ™ë ¨ëœ ì‚¬ìš©ìžë‚˜ 특별한 설치 ê³¼ì •ì´ í•„ìš”í•œ ê²½ìš°ì— ë‹¤ìŒ ë§í¬ë¥¼ ì°¸ê³ í•˜ê¸° ë°”ëžë‹ˆë‹¤: +<a href="http://dokuwiki.org/ko:install">설치 ê³¼ì • (한êµì–´)</a> +ê³¼ <a href="http://dokuwiki.org/ko:config">환경 ì„¤ì • (한êµì–´),</a> +<a href="http://dokuwiki.org/install">설치 ê³¼ì • (ì˜ì–´)</a> +ê³¼ <a href="http://dokuwiki.org/config">환경 ì„¤ì • (ì˜ì–´)</a></p> diff --git a/inc/lang/ko/lang.php b/inc/lang/ko/lang.php index 84fdb3c481c44b7019b9867db2d88f3484f3af2a..7b4e30a4917023aa225138eee85d33ced9b35e9c 100644 --- a/inc/lang/ko/lang.php +++ b/inc/lang/ko/lang.php @@ -9,6 +9,7 @@ * @author Song Younghwan <purluno@gmail.com> * @author Seung-Chul Yoo <dryoo@live.com> * @author erial2@gmail.com + * @author Myeongjin <aranet100@gmail.com> */ $lang['encoding'] = 'utf-8'; $lang['direction'] = 'ltr'; @@ -17,21 +18,21 @@ $lang['doublequoteclosing'] = 'â€'; $lang['singlequoteopening'] = '‘'; $lang['singlequoteclosing'] = '’'; $lang['apostrophe'] = '’'; -$lang['btn_edit'] = '페ì´ì§€ 편집'; -$lang['btn_source'] = '소스 보기'; -$lang['btn_show'] = '페ì´ì§€ 보기'; -$lang['btn_create'] = '페ì´ì§€ 만들기'; +$lang['btn_edit'] = '문서 편집'; +$lang['btn_source'] = 'ë‚´ìš© 보기'; +$lang['btn_show'] = '문서 보기'; +$lang['btn_create'] = '문서 만들기'; $lang['btn_search'] = '찾기'; $lang['btn_save'] = 'ì €ìž¥'; -$lang['btn_preview'] = '미리보기'; -$lang['btn_top'] = '맨위로'; +$lang['btn_preview'] = '미리 보기'; +$lang['btn_top'] = '맨 위로'; $lang['btn_newer'] = '<< 최근'; $lang['btn_older'] = 'ì´ì „ >>'; -$lang['btn_revs'] = 'ì´ì „ ë²„ì „ë“¤'; -$lang['btn_recent'] = '최근 변경 목ë¡'; -$lang['btn_upload'] = '업로드'; +$lang['btn_revs'] = 'ì´ì „ ë²„ì „'; +$lang['btn_recent'] = '최근 바뀜'; +$lang['btn_upload'] = '올리기'; $lang['btn_cancel'] = '취소'; -$lang['btn_index'] = '색ì¸'; +$lang['btn_index'] = '사ì´íŠ¸ë§µ'; $lang['btn_secedit'] = '편집'; $lang['btn_login'] = '로그ì¸'; $lang['btn_logout'] = '로그아웃'; @@ -39,69 +40,69 @@ $lang['btn_admin'] = '관리'; $lang['btn_update'] = '변경'; $lang['btn_delete'] = 'ì‚ì œ'; $lang['btn_back'] = '뒤로'; -$lang['btn_backlink'] = 'ì´ì „ ë§í¬'; +$lang['btn_backlink'] = '가리키는 ë§í¬'; $lang['btn_backtomedia'] = '미디어 íŒŒì¼ ì„ íƒìœ¼ë¡œ ëŒì•„가기'; -$lang['btn_subscribe'] = 'êµ¬ë… ì‹ ì²'; -$lang['btn_profile'] = 'ê°œì¸ì •ë³´ 변경'; +$lang['btn_subscribe'] = 'êµ¬ë… ê´€ë¦¬'; +$lang['btn_profile'] = 'ê°œì¸ ì •ë³´ 변경'; $lang['btn_reset'] = '초기화'; -$lang['btn_resendpwd'] = '새 암호 ì„¤ì •'; -$lang['btn_draft'] = '문서초안 편집'; -$lang['btn_recover'] = '문서초안 복구'; -$lang['btn_draftdel'] = '문서초안 ì‚ì œ'; +$lang['btn_resendpwd'] = '새 비밀번호 ì„¤ì •'; +$lang['btn_draft'] = '문서 초안 편집'; +$lang['btn_recover'] = '문서 초안 복구'; +$lang['btn_draftdel'] = '문서 초안 ì‚ì œ'; $lang['btn_revert'] = 'ë³µì›'; $lang['btn_register'] = '등ë¡'; $lang['btn_apply'] = 'ì ìš©'; $lang['btn_media'] = '미디어 관리'; $lang['loggedinas'] = '다른 사용ìžë¡œ 로그ì¸'; -$lang['user'] = '사용ìž'; -$lang['pass'] = '패스워드'; -$lang['newpass'] = '새로운 패스워드'; -$lang['oldpass'] = '현재 패스워드 확ì¸'; -$lang['passchk'] = '패스워드 다시 확ì¸'; +$lang['user'] = 'ì‚¬ìš©ìž ì´ë¦„'; +$lang['pass'] = '비밀번호'; +$lang['newpass'] = '새 비밀번호'; +$lang['oldpass'] = '현재 비밀번호 확ì¸'; +$lang['passchk'] = '비밀번호 다시 확ì¸'; $lang['remember'] = '기억하기'; $lang['fullname'] = 'ì‹¤ì œ ì´ë¦„'; $lang['email'] = 'ì´ë©”ì¼'; $lang['profile'] = 'ê°œì¸ ì •ë³´'; -$lang['badlogin'] = 'ìž˜ëª»ëœ ì‚¬ìš©ìž ì´ë¦„ì´ê±°ë‚˜ 패스워드입니다.'; -$lang['minoredit'] = 'ì¼ë¶€ ë‚´ìš© 변경'; -$lang['draftdate'] = '문서 초안 ìžë™ì €ìž¥ 시간'; -$lang['nosecedit'] = '페ì´ì§€ê°€ ìˆ˜ì •ë˜ì–´ ì„¹ì…˜ì •ë³´ê°€ 달ë¼ì ¸ 페ì´ì§€ ì „ë¶€ë¥¼ 다시 ì½ìŠµë‹ˆë‹¤.'; +$lang['badlogin'] = 'ìž˜ëª»ëœ ì‚¬ìš©ìž ì´ë¦„ì´ê±°ë‚˜ 비밀번호입니다.'; +$lang['minoredit'] = '사소한 바뀜'; +$lang['draftdate'] = '문서 초안 ìžë™ ì €ìž¥ 시간'; +$lang['nosecedit'] = '문서가 ìˆ˜ì •ë˜ì–´ 세션 ì •ë³´ì˜ ìœ íš¨ ì‹œê°„ì´ ì§€ë‚˜ 문서 ì „ë¶€ë¥¼ 다시 ì½ìŠµë‹ˆë‹¤.'; $lang['regmissing'] = 'ëª¨ë“ í•ëª©ì„ ìž…ë ¥í•´ì•¼ 합니다.'; $lang['reguexists'] = 'ê°™ì€ ì´ë¦„ì„ ì‚¬ìš©í•˜ëŠ” 사용ìžê°€ 있습니다.'; -$lang['regsuccess'] = '사용ìžë¥¼ 만들었습니다. 패스워드는 ì´ë©”ì¼ë¡œ 보냈습니다.'; +$lang['regsuccess'] = '사용ìžë¥¼ 만들었으며 비밀번호는 ì´ë©”ì¼ë¡œ 보냈습니다.'; $lang['regsuccess2'] = '사용ìžë¥¼ 만들었습니다.'; -$lang['regmailfail'] = '패스워드를 ì´ë©”ì¼ë¡œ ì „ì†¡í• ë•Œ 오류가 ë°œìƒí–ˆìŠµë‹ˆë‹¤. 관리ìžì—게 문ì˜í•˜ê¸° ë°”ëžë‹ˆë‹¤!'; -$lang['regbadmail'] = 'ì´ë©”ì¼ ì£¼ì†Œê°€ í‹€ë ¸ìŠµë‹ˆë‹¤. - 오류ë¼ê³ ìƒê°ë˜ë©´ 관리ìžì—게 문ì˜í•˜ê¸° ë°”ëžë‹ˆë‹¤.'; -$lang['regbadpass'] = '새로운 íŒ¨ìŠ¤ì›Œë“œë“¤ì´ ì¼ì¹˜í•˜ì§€ 않습니다. 다시 ìž…ë ¥í•˜ê¸° ë°”ëžë‹ˆë‹¤.'; -$lang['regpwmail'] = 'DokuWiki 패스워드'; -$lang['reghere'] = 'ì•„ì§ ë“±ë¡í•˜ì§€ 않았다면 등ë¡í•˜ê¸° ë°”ëžë‹ˆë‹¤.'; -$lang['profna'] = 'ì´ ìœ„í‚¤ëŠ” ê°œì¸ ì •ë³´ ìˆ˜ì •ì„ í—ˆìš©í•˜ì§€ 않습니다.'; -$lang['profnochange'] = '변경사í•ì´ ì—†ìŠµë‹ˆë‹¤.'; +$lang['regmailfail'] = '비밀번호를 ì´ë©”ì¼ë¡œ ì „ì†¡í• ë•Œ 오류가 ë°œìƒí–ˆìŠµë‹ˆë‹¤. 관리ìžì—게 문ì˜í•˜ê¸° ë°”ëžë‹ˆë‹¤!'; +$lang['regbadmail'] = 'ì´ë©”ì¼ ì£¼ì†Œê°€ 잘못ë습니다 - 오류ë¼ê³ ìƒê°í•˜ë©´ 관리ìžì—게 문ì˜í•˜ê¸° ë°”ëžë‹ˆë‹¤.'; +$lang['regbadpass'] = '새 비밀번호가 ì¼ì¹˜í•˜ì§€ 않습니다. 다시 ìž…ë ¥í•˜ê¸° ë°”ëžë‹ˆë‹¤.'; +$lang['regpwmail'] = 'DokuWiki 비밀번호'; +$lang['reghere'] = 'ê³„ì •ì´ ì—†ë‚˜ìš”? ê³„ì •ì„ ë“±ë¡í• 수 있습니다'; +$lang['profna'] = 'ì´ ìœ„í‚¤ëŠ” ê°œì¸ ì •ë³´ ìˆ˜ì •ì„ í—ˆìš©í•˜ì§€ 않습니다'; +$lang['profnochange'] = 'ë°”ë€ ì‚¬í•ì´ ì—†ìŠµë‹ˆë‹¤.'; $lang['profnoempty'] = 'ì´ë¦„ì´ë‚˜ ì´ë©”ì¼ ì£¼ì†Œê°€ 비었습니다.'; -$lang['profchanged'] = 'ê°œì¸ì •ë³´ ë³€ê²½ì´ ì„±ê³µí–ˆìŠµë‹ˆë‹¤.'; -$lang['pwdforget'] = '패스워드를 잊어버린 경우 새로 ë°œê¸‰ë°›ì„ ìˆ˜ 있습니다.'; -$lang['resendna'] = 'ì´ ìœ„í‚¤ëŠ” 패스워드 ìž¬ë°œê¸‰ì„ ì§€ì›í•˜ì§€ 않습니다.'; -$lang['resendpwd'] = '새 암호 다ìŒìœ¼ë¡œ ì „ì†¡ : '; -$lang['resendpwdmissing'] = '새로운 패스워드를 ìž…ë ¥í•´ì•¼í–¡ë‹ˆë‹¤.'; -$lang['resendpwdnouser'] = '등ë¡ëœ 사용ìžê°€ 아닙니다. 다시 í™•ì¸ ë°”ëžë‹ˆë‹¤.'; -$lang['resendpwdbadauth'] = 'ì¸ì¦ 코드가 틀립니다. ìž˜ëª»ëœ ë§í¬ì¸ì§€ í™•ì¸ ë°”ëžë‹ˆë‹¤.'; +$lang['profchanged'] = 'ê°œì¸ ì •ë³´ê°€ 성공ì 으로 바뀌었습니다.'; +$lang['pwdforget'] = '비밀번호를 잊으셨나요? 새로 ë°œê¸‰ë°›ì„ ìˆ˜ 있습니다'; +$lang['resendna'] = 'ì´ ìœ„í‚¤ëŠ” 비밀번호 ìž¬ë°œê¸‰ì„ ì§€ì›í•˜ì§€ 않습니다.'; +$lang['resendpwd'] = '다ìŒìœ¼ë¡œ 새 비밀번호 ì „ì†¡'; +$lang['resendpwdmissing'] = 'ëª¨ë“ ë¹„ë°€ë²ˆí˜¸ë¥¼ ìž…ë ¥í•´ì•¼ 합니다.'; +$lang['resendpwdnouser'] = '등ë¡ëœ 사용ìžê°€ 아닙니다.'; +$lang['resendpwdbadauth'] = 'ì¸ì¦ 코드가 잘못ë습니다. ìž˜ëª»ëœ ë§í¬ì¸ì§€ í™•ì¸ ë°”ëžë‹ˆë‹¤.'; $lang['resendpwdconfirm'] = 'í™•ì¸ ë§í¬ë¥¼ ì´ë©”ì¼ë¡œ 보냈습니다.'; -$lang['resendpwdsuccess'] = '새로운 패스워드는 ì´ë©”ì¼ë¡œ 보내드립니다.'; -$lang['license'] = 'ì´ ìœ„í‚¤ì˜ ë‚´ìš©ì€ ë‹¤ìŒì˜ ë¼ì´ì„¼ìŠ¤ì— ë”°ë¦…ë‹ˆë‹¤ :'; -$lang['licenseok'] = 'ì£¼ì˜ : ì´ íŽ˜ì´ì§€ë¥¼ ìˆ˜ì •í•œë‹¤ëŠ” 다ìŒì˜ ë¼ì´ì„¼ìŠ¤ì— ë™ì˜í•¨ì„ ì˜ë¯¸í•©ë‹ˆë‹¤ :'; -$lang['searchmedia'] = '파ì¼ì´ë¦„ 찾기:'; -$lang['searchmedia_in'] = ' %sì—서 검색'; -$lang['txt_upload'] = '업로드 파ì¼ì„ ì„ íƒí•©ë‹ˆë‹¤.'; -$lang['txt_filename'] = '업로드 íŒŒì¼ ì´ë¦„ì„ ìž…ë ¥í•©ë‹ˆë‹¤.(ì„ íƒ ì‚¬í•)'; -$lang['txt_overwrt'] = '새로운 파ì¼ë¡œ ì´ì „ 파ì¼ì„ êµì²´í•©ë‹ˆë‹¤.'; -$lang['lockedby'] = '현재 ìž ê¸ˆ 사용ìž'; +$lang['resendpwdsuccess'] = '새로운 비밀번호를 ì´ë©”ì¼ë¡œ 보냈습니다.'; +$lang['license'] = '별ë„로 ë¼ì´ì„ 스를 알리지 ì•Šì„ ê²½ìš°, ì´ ìœ„í‚¤ì˜ ë‚´ìš©ì€ ë‹¤ìŒì˜ ë¼ì´ì„ ìŠ¤ì— ë”°ë¦…ë‹ˆë‹¤:'; +$lang['licenseok'] = 'ì°¸ê³ : ì´ ë¬¸ì„œë¥¼ íŽ¸ì§‘í• ê²½ìš° 다ìŒì˜ ë¼ì´ì„ ìŠ¤ì— ë™ì˜í•¨ì„ ì˜ë¯¸í•©ë‹ˆë‹¤:'; +$lang['searchmedia'] = 'íŒŒì¼ ì´ë¦„ 찾기:'; +$lang['searchmedia_in'] = '%sì—서 찾기'; +$lang['txt_upload'] = '올릴 íŒŒì¼ ì„ íƒ'; +$lang['txt_filename'] = '올릴 íŒŒì¼ ì´ë¦„ ìž…ë ¥ (ì„ íƒ ì‚¬í•)'; +$lang['txt_overwrt'] = 'ì´ì „ 파ì¼ì„ 새로운 파ì¼ë¡œ ë®ì–´ì“°ê¸°'; +$lang['maxuploadsize'] = '최대 올리기 용량. 파ì¼ë‹¹ %s'; +$lang['lockedby'] = '현재 ìž ê²¨ì§„ 사용ìž'; $lang['lockexpire'] = 'ìž ê¸ˆ í•´ì œ 시간'; -$lang['js']['willexpire'] = 'ìž ì‹œ 후 편집 ìž ê¸ˆì´ í•´ì œë©ë‹ˆë‹¤.\n편집 ì¶©ëŒì„ í”¼í•˜ë ¤ë©´ 미리보기를 눌러 ìž ê¸ˆ ì‹œê°„ì„ ë‹¤ì‹œ ì„¤ì •í•˜ê¸° ë°”ëžë‹ˆë‹¤.'; -$lang['js']['notsavedyet'] = 'ì €ìž¥í•˜ì§€ ì•Šì€ ë³€ê²½ì€ ì§€ì›Œì§‘ë‹ˆë‹¤. -계ì†í•˜ì‹œê² 습니까?'; +$lang['js']['willexpire'] = 'ìž ì‹œ 후 편집 ìž ê¸ˆì´ í•´ì œë©ë‹ˆë‹¤.\n편집 ì¶©ëŒì„ í”¼í•˜ë ¤ë©´ 미리 보기를 눌러 ìž ê¸ˆ ì‹œê°„ì„ ë‹¤ì‹œ ì„¤ì •í•˜ê¸° ë°”ëžë‹ˆë‹¤.'; +$lang['js']['notsavedyet'] = 'ì €ìž¥í•˜ì§€ ì•Šì€ ë°”ë€œì´ ì§€ì›Œì§‘ë‹ˆë‹¤.'; $lang['js']['searchmedia'] = 'íŒŒì¼ ì°¾ê¸°'; -$lang['js']['keepopen'] = 'ì„ íƒí• 때 윈ë„우를 열어놓으시기 ë°”ëžë‹ˆë‹¤.'; -$lang['js']['hidedetails'] = 'ìžì„¸í•œ ì •ë³´ ê°ì¶”기'; +$lang['js']['keepopen'] = 'ì„ íƒí• 때 ì°½ì„ ì—´ì–´ë†“ê¸°'; +$lang['js']['hidedetails'] = 'ìžì„¸í•œ ì •ë³´ 숨기기'; $lang['js']['mediatitle'] = 'ë§í¬ ì„¤ì •'; $lang['js']['mediadisplay'] = 'ë§í¬ 형태'; $lang['js']['mediaalign'] = '배치'; @@ -109,73 +110,72 @@ $lang['js']['mediasize'] = '그림 í¬ê¸°'; $lang['js']['mediatarget'] = 'ë§í¬ 목표'; $lang['js']['mediaclose'] = '닫기'; $lang['js']['mediainsert'] = '삽입'; -$lang['js']['mediadisplayimg'] = '그림보기'; +$lang['js']['mediadisplayimg'] = 'ê·¸ë¦¼ì„ ë³´ì—¬ì¤ë‹ˆë‹¤.'; $lang['js']['mediadisplaylnk'] = 'ë§í¬ë§Œ ë³´ì—¬ì¤ë‹ˆë‹¤.'; $lang['js']['mediasmall'] = '작게'; $lang['js']['mediamedium'] = '중간'; $lang['js']['medialarge'] = 'í¬ê²Œ'; $lang['js']['mediaoriginal'] = 'ì›ë³¸'; -$lang['js']['medialnk'] = 'ì„¸ë¶€ì •ë³´íŽ˜ì´ì§€ë¡œ ë§í¬'; +$lang['js']['medialnk'] = 'ìžì„¸í•œ ì •ë³´ 문서로 ë§í¬'; $lang['js']['mediadirect'] = 'ì›ë³¸ìœ¼ë¡œ ì§ì ‘ ë§í¬'; -$lang['js']['medianolnk'] = 'ë§í¬ 없슴'; +$lang['js']['medianolnk'] = 'ë§í¬ ì—†ìŒ'; $lang['js']['medianolink'] = 'ê·¸ë¦¼ì„ ë§í¬í•˜ì§€ 않ìŒ'; $lang['js']['medialeft'] = '왼쪽 배치'; $lang['js']['mediaright'] = '오른쪽 배치'; -$lang['js']['mediacenter'] = '중앙 배치'; -$lang['js']['medianoalign'] = '배치 없슴'; -$lang['js']['nosmblinks'] = '윈ë„ìš° ê³µìœ íŒŒì¼ê³¼ì˜ ì—°ê²°ì€ MS ì¸í„°ë„· ìµìŠ¤í”Œë¡œëŸ¬ì—서만 ë™ìž‘합니다. -그러나 ë§í¬ë¥¼ 복사하거나 붙여넣기를 í• ìˆ˜ 있습니다.'; +$lang['js']['mediacenter'] = 'ê°€ìš´ë° ë°°ì¹˜'; +$lang['js']['medianoalign'] = '배치 ì—†ìŒ'; +$lang['js']['nosmblinks'] = '윈ë„ìš° ê³µìœ íŒŒì¼ê³¼ì˜ ì—°ê²°ì€ ë§ˆì´í¬ë¡œì†Œí”„트 ì¸í„°ë„· ìµìŠ¤í”Œë¡œëŸ¬ì—서만 ë™ìž‘합니다.\n그러나 ë§í¬ë¥¼ 복사하거나 붙여넣기를 í• ìˆ˜ 있습니다.'; $lang['js']['linkwiz'] = 'ë§í¬ 마법사'; $lang['js']['linkto'] = '다ìŒìœ¼ë¡œ ì—°ê²°:'; -$lang['js']['del_confirm'] = 'ì •ë§ë¡œ ì„ íƒëœ í•목(들)ì„ ì‚ì œí•˜ì‹œê² ìŠµë‹ˆê¹Œ?'; -$lang['js']['restore_confirm'] = 'ì •ë§ ì´ ë²„ì „ìœ¼ë¡œ ë˜ëŒë¦¬ì‹œê² 습니까?'; -$lang['js']['media_diff'] = 'ì°¨ì´ì 보기 :'; +$lang['js']['del_confirm'] = 'ì •ë§ ì„ íƒëœ í•ëª©ì„ ì‚ì œí•˜ê² ìŠµë‹ˆê¹Œ?'; +$lang['js']['restore_confirm'] = 'ì •ë§ ì´ ë²„ì „ìœ¼ë¡œ ë˜ëŒë¦¬ê² 습니까?'; +$lang['js']['media_diff'] = 'ì°¨ì´ ë³´ê¸°:'; $lang['js']['media_diff_both'] = '나란히 보기'; $lang['js']['media_diff_opacity'] = 'ê²¹ì³ ë³´ê¸°'; $lang['js']['media_diff_portions'] = '쪼개 보기'; -$lang['js']['media_select'] = 'íŒŒì¼ ì„ íƒ'; -$lang['js']['media_upload_btn'] = '업로드'; +$lang['js']['media_select'] = 'íŒŒì¼ ì„ íƒâ€¦'; +$lang['js']['media_upload_btn'] = '올리기'; $lang['js']['media_done_btn'] = '완료'; -$lang['js']['media_drop'] = 'ì—…ë¡œë“œí• íŒŒì¼ì„ ëŒì–´ë„£ìœ¼ì„¸ìš”'; +$lang['js']['media_drop'] = '올릴 파ì¼ì„ ëŒì–´ë„£ìœ¼ì„¸ìš”'; $lang['js']['media_cancel'] = 'ì‚ì œ'; -$lang['js']['media_overwrt'] = 'ì´ë¯¸ìžˆëŠ” íŒŒì¼ ë®ì–´ì“°ê¸°'; -$lang['rssfailed'] = 'feed ê°€ì ¸ì˜¤ê¸° 실패: '; +$lang['js']['media_overwrt'] = 'ì´ë¯¸ 있는 íŒŒì¼ ë®ì–´ì“°ê¸°'; +$lang['rssfailed'] = 'ì´ í”¼ë“œë¥¼ ê°€ì ¸ì˜¤ëŠ” ë™ì•ˆ 오류 ë°œìƒ:'; $lang['nothingfound'] = '아무 ê²ƒë„ ì—†ìŠµë‹ˆë‹¤.'; $lang['mediaselect'] = '미디어 íŒŒì¼ ì„ íƒ'; -$lang['fileupload'] = '미디어 íŒŒì¼ ì—…ë¡œë“œ'; -$lang['uploadsucc'] = '업로드 성공'; -$lang['uploadfail'] = '업로드 실패. ìž˜ëª»ëœ ê¶Œí•œ 때문ì¼ì§€ë„ 모릅니다.'; -$lang['uploadwrong'] = '업로드 ê±°ë¶€. ê¸ˆì§€ëœ í™•ìž¥ìžìž…니다!'; -$lang['uploadexist'] = 'ì´ë¯¸ 파ì¼ì´ 존재합니다.'; -$lang['uploadbadcontent'] = 'ì—…ë¡œë“œëœ íŒŒì¼ì´ íŒŒì¼ í™•ìž¥ìž %s와 ì¼ì¹˜í•˜ì§€ 않습니다.'; -$lang['uploadspam'] = '스팸 차단기가 업로드를 취소하였습니다.'; -$lang['uploadxss'] = '악성 ì½”ë“œì˜ ê°€ëŠ¥ì„±ì´ ìžˆì–´ 업로드를 취소하였습니다.'; -$lang['uploadsize'] = '업로드한 파ì¼ì´ 너무 í½ë‹ˆë‹¤. (최대 %s)'; +$lang['fileupload'] = '미디어 íŒŒì¼ ì˜¬ë¦¬ê¸°'; +$lang['uploadsucc'] = '올리기 성공'; +$lang['uploadfail'] = '올리기 실패. ìž˜ëª»ëœ ê¶Œí•œ 때문ì¼ì§€ë„ 모릅니다.'; +$lang['uploadwrong'] = '올리기 ê±°ë¶€. ê¸ˆì§€ëœ í™•ìž¥ìžìž…니다!'; +$lang['uploadexist'] = '파ì¼ì´ ì´ë¯¸ 존재합니다.'; +$lang['uploadbadcontent'] = '올린 파ì¼ì´ %s íŒŒì¼ í™•ìž¥ìžì™€ ì¼ì¹˜í•˜ì§€ 않습니다.'; +$lang['uploadspam'] = '스팸 차단 목ë¡ì´ 올리기를 취소했습니다.'; +$lang['uploadxss'] = '악성 ì½”ë“œì˜ ê°€ëŠ¥ì„±ì´ ìžˆì–´ 올리기를 취소했습니다.'; +$lang['uploadsize'] = '올린 파ì¼ì´ 너무 í½ë‹ˆë‹¤. (최대 %s)'; $lang['deletesucc'] = '"%s" 파ì¼ì´ ì‚ì œë˜ì—ˆìŠµë‹ˆë‹¤.'; -$lang['deletefail'] = '"%s" 파ì¼ì„ ì‚ì œí• ìˆ˜ 없습니다. - ì‚ì œ ê¶Œí•œì´ ìžˆëŠ”ì§€ 확ì¸í•˜ê¸° ë°”ëžë‹ˆë‹¤.'; -$lang['mediainuse'] = '"%s" 파ì¼ì„ ì‚ì œí• ìˆ˜ 없습니다. - ì•„ì§ ì‚¬ìš© 중입니다.'; -$lang['namespaces'] = '네임스페ì´ìФ'; +$lang['deletefail'] = '"%s" 파ì¼ì„ ì‚ì œí• ìˆ˜ 없습니다 - ì‚ì œ ê¶Œí•œì´ ìžˆëŠ”ì§€ 확ì¸í•˜ê¸° ë°”ëžë‹ˆë‹¤.'; +$lang['mediainuse'] = '"%s" 파ì¼ì„ ì‚ì œí• ìˆ˜ 없습니다 - ì•„ì§ ì‚¬ìš© 중입니다.'; +$lang['namespaces'] = 'ì´ë¦„공간'; $lang['mediafiles'] = '사용 가능한 íŒŒì¼ ëª©ë¡'; -$lang['accessdenied'] = 'ì´ íŽ˜ì´ì§€ë¥¼ ë³¼ ê¶Œí•œì´ ì—†ìŠµë‹ˆë‹¤.'; -$lang['mediausage'] = 'ì´ íŒŒì¼ì„ ì°¸ì¡°í•˜ë ¤ë©´ ë‹¤ìŒ ë¬¸ë²•ì„ ì‚¬ìš©í•˜ê¸° ë°”ëžë‹ˆë‹¤:'; +$lang['accessdenied'] = 'ì´ ë¬¸ì„œë¥¼ ë³¼ ê¶Œí•œì´ ì—†ìŠµë‹ˆë‹¤.'; +$lang['mediausage'] = 'ì´ íŒŒì¼ì„ ì°¸ê³ í•˜ë ¤ë©´ ë‹¤ìŒ ë¬¸ë²•ì„ ì‚¬ìš©í•˜ê¸° ë°”ëžë‹ˆë‹¤:'; $lang['mediaview'] = 'ì›ë³¸ íŒŒì¼ ë³´ê¸°'; -$lang['mediaroot'] = '루트(root)'; -$lang['mediaupload'] = '파ì¼ì„ 현재 네임스페ì´ìŠ¤ë¡œ 업로드합니다. 하위 네임스페ì´ìŠ¤ë¥¼ ë§Œë“¤ë ¤ë©´ íŒŒì¼ ì´ë¦„ ì•žì— ì½œë¡ (:)으로 구분ë˜ëŠ” ì´ë¦„ì„ ë¶™ì´ë©´ ë©ë‹ˆë‹¤.'; -$lang['mediaextchange'] = 'íŒŒì¼ í™•ìž¥ìžê°€ .%sì—서 .%s으로 변경ë습니다!'; -$lang['reference'] = '참조'; -$lang['ref_inuse'] = 'ë‹¤ìŒ íŽ˜ì´ì§€ë“¤ì—서 ì•„ì§ ì‚¬ìš© 중ì´ë¯€ë¡œ 파ì¼ì„ ì‚ì œí• ìˆ˜ 없습니다:'; -$lang['ref_hidden'] = '페ì´ì§€ë“¤ì˜ 몇몇 참조는 ì½ì„ 수 있는 ê¶Œí•œì´ ì—†ìŠµë‹ˆë‹¤.'; -$lang['hits'] = '히트 수'; -$lang['quickhits'] = 'ì¼ì¹˜í•˜ëŠ” 페ì´ì§€ ì´ë¦„'; +$lang['mediaroot'] = '루트 (root)'; +$lang['mediaupload'] = '파ì¼ì„ 현재 ì´ë¦„공간으로 올립니다. 하위 ì´ë¦„공간으로 ë§Œë“¤ë ¤ë©´ ì„ íƒí•œ íŒŒì¼ ì´ë¦„ ì•žì— ì½œë¡ (:)으로 구분ë˜ëŠ” ì´ë¦„ì„ ë¶™ì´ë©´ ë©ë‹ˆë‹¤. 파ì¼ì„ 드래그 앤 드ë¡í•˜ì—¬ ì„ íƒí• 수 있습니다.'; +$lang['mediaextchange'] = 'íŒŒì¼ í™•ìž¥ìžê°€ .%sì—서 .%s(으)로 바뀌었습니다!'; +$lang['reference'] = 'ì°¸ê³ '; +$lang['ref_inuse'] = 'ë‹¤ìŒ ë¬¸ì„œì—서 ì•„ì§ ì‚¬ìš© 중ì´ë¯€ë¡œ 파ì¼ì„ ì‚ì œí• ìˆ˜ 없습니다:'; +$lang['ref_hidden'] = 'ë¬¸ì„œì˜ ì¼ë¶€ ì°¸ê³ ëŠ” ì½ì„ 수 있는 ê¶Œí•œì´ ì—†ìŠµë‹ˆë‹¤'; +$lang['hits'] = '조회 수'; +$lang['quickhits'] = 'ì¼ì¹˜í•˜ëŠ” 문서 ì´ë¦„'; $lang['toc'] = '목차'; $lang['current'] = '현재'; $lang['yours'] = 'ë²„ì „'; $lang['diff'] = '현재 ë²„ì „ê³¼ì˜ ì°¨ì´ ë³´ê¸°'; -$lang['diff2'] = 'ì„ íƒëœ ë²„ì „ë“¤ ê°„ ì°¨ì´ ë³´ê¸°'; +$lang['diff2'] = 'ì„ íƒí•œ ë²„ì „ ê°„ ì°¨ì´ ë³´ê¸°'; $lang['difflink'] = 'ì°¨ì´ ë³´ê¸°ë¡œ ì—°ê²°'; -$lang['diff_type'] = 'ë²„ì „ê°„ ì°¨ì´ í‘œì‹œ:'; +$lang['diff_type'] = 'ë²„ì „ê°„ ì°¨ì´ ë³´ê¸°:'; $lang['diff_inline'] = 'ì¸ë¼ì¸ ë°©ì‹'; -$lang['diff_side'] = '다중창 ë°©ì‹'; +$lang['diff_side'] = '다중 ì°½ ë°©ì‹'; $lang['line'] = '줄'; $lang['breadcrumb'] = 'ì¶”ì '; $lang['youarehere'] = '현재 위치'; @@ -183,54 +183,54 @@ $lang['lastmod'] = '마지막 ìˆ˜ì •'; $lang['by'] = '작성ìž'; $lang['deleted'] = 'ì‚ì œ'; $lang['created'] = '새로 만듦'; -$lang['restored'] = '옛 ë²„ì „ 복구'; +$lang['restored'] = 'ì´ì „ ë²„ì „ 복구 (%s)'; $lang['external_edit'] = '외부 편집기'; $lang['summary'] = '편집 요약'; -$lang['noflash'] = 'ì´ ì»¨í…ì¸ ë¥¼ 표시하기 위해서 <a href="http://www.adobe.com/products/flashplayer/">Adobe Flash Plugin</a>ì´ í•„ìš”í•©ë‹ˆë‹¤.'; +$lang['noflash'] = 'ì´ ì½˜í…ì¸ ë¥¼ 표시하기 위해서 <a href="http://www.adobe.com/products/flashplayer/">Adobe Flash 플러그ì¸</a>ì´ í•„ìš”í•©ë‹ˆë‹¤.'; $lang['download'] = 'ì¡°ê° ë‹¤ìš´ë¡œë“œ'; $lang['tools'] = 'ë„구'; $lang['user_tools'] = 'ì‚¬ìš©ìž ë„구'; $lang['site_tools'] = '사ì´íЏ ë„구'; -$lang['page_tools'] = '페ì´ì§€ ë„구'; -$lang['skip_to_content'] = '컨í…ì¸ ë„˜ê¸°ê¸°'; -$lang['mail_newpage'] = '페ì´ì§€ 추가:'; -$lang['mail_changed'] = '페ì´ì§€ 변경:'; -$lang['mail_subscribe_list'] = '네임스페ì´ìФì—서 ë³€ê²½ëœ íŽ˜ì´ì§€:'; +$lang['page_tools'] = '문서 ë„구'; +$lang['skip_to_content'] = '콘í…ì¸ ë„˜ê¸°ê¸°'; +$lang['mail_newpage'] = '문서 추가:'; +$lang['mail_changed'] = '문서 바뀜:'; +$lang['mail_subscribe_list'] = 'ì´ë¦„공간ì—서 ë°”ë€ ë¬¸ì„œ:'; $lang['mail_new_user'] = '새로운 사용ìž:'; $lang['mail_upload'] = 'íŒŒì¼ ì²¨ë¶€:'; -$lang['changes_type'] = 'ì°¨ì´ì 보기'; -$lang['pages_changes'] = '페ì´ì§€'; +$lang['changes_type'] = 'ì°¨ì´ ë³´ê¸°'; +$lang['pages_changes'] = '문서'; $lang['media_changes'] = '미디어 파ì¼'; -$lang['both_changes'] = '미디어 파ì¼ê³¼ 페ì´ì§€ 양쪽'; -$lang['qb_bold'] = 'êµµì€ ê¸€'; -$lang['qb_italic'] = 'ì´íƒ¤ë¦ì²´ 글'; -$lang['qb_underl'] = '밑줄 그어진 글'; -$lang['qb_code'] = '코드로 í‘œì‹œëœ ê¸€'; -$lang['qb_strike'] = '취소 í‘œì‹œëœ ê¸€'; -$lang['qb_h1'] = '1단계 헤드ë¼ì¸'; -$lang['qb_h2'] = '2단계 헤드ë¼ì¸'; -$lang['qb_h3'] = '3단계 헤드ë¼ì¸'; -$lang['qb_h4'] = '4단계 헤드ë¼ì¸'; -$lang['qb_h5'] = '5단계 헤드ë¼ì¸'; -$lang['qb_h'] = 'í‘œì œ'; -$lang['qb_hs'] = 'í‘œì œ ì„ íƒ'; -$lang['qb_hplus'] = 'ìƒìœ„ í‘œì œ'; -$lang['qb_hminus'] = '하위 í‘œì œ'; -$lang['qb_hequal'] = 'ë™ê¸‰ í‘œì œ'; +$lang['both_changes'] = '미디어 파ì¼ê³¼ 문서 모ë‘'; +$lang['qb_bold'] = 'êµµì€ ê¸€ì”¨'; +$lang['qb_italic'] = 'ê¸°ìš¸ì¸ ê¸€ì”¨'; +$lang['qb_underl'] = '밑줄 그어진 글씨'; +$lang['qb_code'] = '코드 글씨'; +$lang['qb_strike'] = 'ì·¨ì†Œì„ ê¸€ì”¨'; +$lang['qb_h1'] = '1단계 문단 ì œëª©'; +$lang['qb_h2'] = '2단계 문단 ì œëª©'; +$lang['qb_h3'] = '3단계 문단 ì œëª©'; +$lang['qb_h4'] = '4단계 문단 ì œëª©'; +$lang['qb_h5'] = '5단계 문단 ì œëª©'; +$lang['qb_h'] = '문단 ì œëª©'; +$lang['qb_hs'] = '문단 ì œëª© ì„ íƒ'; +$lang['qb_hplus'] = 'ìƒìœ„ 문단 ì œëª©'; +$lang['qb_hminus'] = '하위 문단 ì œëª©'; +$lang['qb_hequal'] = 'ë™ê¸‰ 문단 ì œëª©'; $lang['qb_link'] = 'ë‚´ë¶€ ë§í¬'; $lang['qb_extlink'] = '외부 ë§í¬'; -$lang['qb_hr'] = '수í‰ì„ '; -$lang['qb_ol'] = 'ìˆ«ìž ëª©ë¡'; -$lang['qb_ul'] = '목ë¡'; -$lang['qb_media'] = 'ì´ë¯¸ì§€ì™€ 기타 íŒŒì¼ ì¶”ê°€'; -$lang['qb_sig'] = '서명 추가'; +$lang['qb_hr'] = '가로줄'; +$lang['qb_ol'] = '순서 있는 목ë¡'; +$lang['qb_ul'] = '순서 없는 목ë¡'; +$lang['qb_media'] = '그림과 기타 íŒŒì¼ ì¶”ê°€'; +$lang['qb_sig'] = '서명 넣기'; $lang['qb_smileys'] = 'ì´ëª¨í‹°ì½˜'; -$lang['qb_chars'] = '특수문ìž'; -$lang['upperns'] = 'ìƒìœ„ 네임스페ì´ìŠ¤ë¡œ ì´ë™'; -$lang['admin_register'] = '새로운 ì‚¬ìš©ìž ì¶”ê°€'; -$lang['metaedit'] = '메타 ë°ì´íƒ€ë¥¼ 편집합니다.'; -$lang['metasaveerr'] = '메타 ë°ì´íƒ€ 쓰기가 실패했습니다.'; -$lang['metasaveok'] = '메타 ë°ì´íƒ€ê°€ ì €ìž¥ë˜ì—ˆìŠµë‹ˆë‹¤.'; +$lang['qb_chars'] = '특수 문ìž'; +$lang['upperns'] = 'ìƒìœ„ ì´ë¦„공간으로 ì´ë™'; +$lang['admin_register'] = '새 ì‚¬ìš©ìž ì¶”ê°€'; +$lang['metaedit'] = '메타 ë°ì´í„° 편집'; +$lang['metasaveerr'] = '메타 ë°ì´í„° 쓰기 실패'; +$lang['metasaveok'] = '메타 ë°ì´íƒ€ ì €ìž¥ë¨'; $lang['img_backto'] = '뒤로'; $lang['img_title'] = 'ì´ë¦„'; $lang['img_caption'] = '설명'; @@ -245,80 +245,78 @@ $lang['img_keywords'] = '키워드'; $lang['img_width'] = '너비'; $lang['img_height'] = '높ì´'; $lang['img_manager'] = '미디어 관리ìžì—서 보기'; -$lang['subscr_subscribe_success'] = '%sì„(를) 구ë…ëª©ë¡ %sì— ì¶”ê°€í•˜ì˜€ìŠµë‹ˆë‹¤'; -$lang['subscr_subscribe_error'] = '%sì„(를) 구ë…ëª©ë¡ %sì— ì¶”ê°€í•˜ëŠ”ë° ì‹¤íŒ¨í–ˆìŠµë‹ˆë‹¤'; -$lang['subscr_subscribe_noaddress'] = '등ë¡ëœ 주소가 없기 ë•Œë¬¸ì— êµ¬ë…목ë¡ì— 등ë¡ë˜ì§€ 않았습니다'; -$lang['subscr_unsubscribe_success'] = '%sì„(를) 구ë…ëª©ë¡ %sì—서 ì œê±°í•˜ì˜€ìŠµë‹ˆë‹¤'; -$lang['subscr_unsubscribe_error'] = '%sì„(를) 구ë…ëª©ë¡ %sì—서 ì œê±°í•˜ëŠ”ë° ì‹¤íŒ¨í–ˆìŠµë‹ˆë‹¤'; +$lang['subscr_subscribe_success'] = '%sì„(를) êµ¬ë… ëª©ë¡ %sì— ì¶”ê°€í•˜ì˜€ìŠµë‹ˆë‹¤'; +$lang['subscr_subscribe_error'] = '%sì„(를) êµ¬ë… ëª©ë¡ %sì— ì¶”ê°€í•˜ëŠ”ë° ì‹¤íŒ¨í–ˆìŠµë‹ˆë‹¤'; +$lang['subscr_subscribe_noaddress'] = '등ë¡ëœ 주소가 없기 ë•Œë¬¸ì— êµ¬ë… ëª©ë¡ì— 등ë¡ë˜ì§€ 않았습니다'; +$lang['subscr_unsubscribe_success'] = '%sì„(를) êµ¬ë… ëª©ë¡ %sì—서 ì‚ì œí•˜ì˜€ìŠµë‹ˆë‹¤'; +$lang['subscr_unsubscribe_error'] = '%sì„(를) êµ¬ë… ëª©ë¡ %sì—서 ì‚ì œí•˜ëŠ”ë° ì‹¤íŒ¨í–ˆìŠµë‹ˆë‹¤'; $lang['subscr_already_subscribed'] = '%sì€(는) ì´ë¯¸ %sì— êµ¬ë…ë˜ê³ 있습니다'; $lang['subscr_not_subscribed'] = '%sì€(는) ì´ë¯¸ %sì— êµ¬ë…ë˜ì–´ 있지 않습니다'; -$lang['subscr_m_not_subscribed'] = 'í˜„ìž¬ì˜ íŽ˜ì´ì§€ë‚˜ 네임스페ì´ìŠ¤ì— êµ¬ë…등ë¡ì´ ë˜ì–´ìžˆì§€ 않습니다.'; +$lang['subscr_m_not_subscribed'] = 'í˜„ìž¬ì˜ ë¬¸ì„œë‚˜ ì´ë¦„ê³µê°„ì— êµ¬ë… ë“±ë¡ì´ ë˜ì–´ìžˆì§€ 않습니다.'; $lang['subscr_m_new_header'] = 'êµ¬ë… ì¶”ê°€'; -$lang['subscr_m_current_header'] = '현재 구ë…ì¤‘ì¸ ê²ƒë“¤'; +$lang['subscr_m_current_header'] = '현재 êµ¬ë… ì¤‘ì¸ ê²ƒ'; $lang['subscr_m_unsubscribe'] = 'êµ¬ë… ì·¨ì†Œ'; $lang['subscr_m_subscribe'] = '구ë…'; $lang['subscr_m_receive'] = '받기'; -$lang['subscr_style_every'] = 'ëª¨ë“ ë³€í™”ë¥¼ ì´ë©”ì¼ë¡œ 받기'; -$lang['subscr_style_digest'] = 'ê° íŽ˜ì´ì§€ì˜ 변화를 요약 (매 %.2f ì¼ ë§ˆë‹¤)'; -$lang['subscr_style_list'] = '마지막 ì´ë©”ì¼ ì´í›„ ë³€í™”ëœ íŽ˜ì´ì§€ì˜ ëª©ë¡ (매 %.2f ì¼ ë§ˆë‹¤)'; +$lang['subscr_style_every'] = 'ëª¨ë“ ë°”ë€œì„ ì´ë©”ì¼ë¡œ 받기'; +$lang['subscr_style_digest'] = 'ê° ë¬¸ì„œì˜ ë°”ë€œì„ ìš”ì•½ (매 %.2fì¼ ë§ˆë‹¤)'; +$lang['subscr_style_list'] = '마지막 ì´ë©”ì¼ ì´í›„ ë°”ë€ ë¬¸ì„œì˜ ëª©ë¡ (매 %.2fì¼ ë§ˆë‹¤)'; $lang['authmodfailed'] = 'ìž˜ëª»ëœ ì‚¬ìš©ìž ì¸ì¦ ì„¤ì •ìž…ë‹ˆë‹¤. 관리ìžì—게 문ì˜í•˜ê¸° ë°”ëžë‹ˆë‹¤.'; $lang['authtempfail'] = 'ì‚¬ìš©ìž ì¸ì¦ì´ ì¼ì‹œì 으로 불가능합니다. ë§Œì¼ ê³„ì†í•´ì„œ ë¬¸ì œê°€ ë°œìƒí•˜ë©´ 관리ìžì—게 문ì˜í•˜ê¸° ë°”ëžë‹ˆë‹¤.'; -$lang['authpwdexpire'] = '현재 암호를 ì„¤ì •í•˜ì‹ ì§€ %d ì¼ì´ 지났습니다. 새로 ì„¤ì •í•´ì£¼ì‹œê¸° ë°”ëžë‹ˆë‹¤.'; -$lang['i_chooselang'] = '사용하는 언어를 ì„ íƒí•©ë‹ˆë‹¤.'; +$lang['authpwdexpire'] = '현재 비밀번호를 ì„¤ì •í•œì§€ %dì¼ì´ 지났습니다. 새로 ì„¤ì •í•´ì£¼ì‹œê¸° ë°”ëžë‹ˆë‹¤.'; +$lang['i_chooselang'] = 'ì‚¬ìš©í• ì–¸ì–´ë¥¼ ì„ íƒí•˜ì„¸ìš”'; $lang['i_installer'] = 'DokuWiki 설치'; $lang['i_wikiname'] = '위키 ì´ë¦„'; -$lang['i_enableacl'] = 'ACL기능 사용(권장 사í•)'; +$lang['i_enableacl'] = 'ACL 기능 사용 (권장)'; $lang['i_superuser'] = 'ìŠˆí¼ ìœ ì €'; $lang['i_problems'] = '설치 중 아래와 ê°™ì€ ë¬¸ì œê°€ ë°œìƒí–ˆìŠµë‹ˆë‹¤. ë¬¸ì œë¥¼ 해결한 후 설치를 계ì†í•˜ê¸° ë°”ëžë‹ˆë‹¤.'; -$lang['i_modified'] = '보안 ìƒì˜ ì´ìœ 로 아래 스í¬ë¦½íŠ¸ëŠ” ìˆ˜ì •ë˜ì§€ ì•Šì€ ìƒˆ Dokuwiki설치ì—서만 ë™ìž‘ë©ë‹ˆë‹¤. -ë‹¤ìš´ë¡œë“œëœ ì••ì¶• 패키지를 다시 설치하거나 <a href="http://dokuwiki.org/install"> DokuWiki 설치 ê³¼ì •</a>ì„ ì°¸ê³ í•´ì„œ 설치하기 ë°”ëžë‹ˆë‹¤.'; -$lang['i_funcna'] = 'PHP함수 <code>%s</code> ì‚¬ìš©ì´ ë¶ˆê°€ëŠ¥í•©ë‹ˆë‹¤. 호스트 ì œê³µìžê°€ ì–´ë–¤ ì´ìœ ì—서ì¸ì§€ 막아 놓았ì„ì§€ 모릅니다.'; -$lang['i_phpver'] = 'PHP <code>%s</code>ë²„ì „ì€ í•„ìš”í•œ <code>%s</code>ë²„ì „ë³´ë‹¤ 오래ë˜ì—ˆìŠµë‹ˆë‹¤.PHP를 ì—…ê·¸ë ˆì´ë“œí• 필요가 있습니다.'; +$lang['i_modified'] = '보안 ìƒì˜ ì´ìœ 로 ì´ ìŠ¤í¬ë¦½íŠ¸ëŠ” ìˆ˜ì •ë˜ì§€ ì•Šì€ ìƒˆ Dokuwiki 설치ì—서만 ë™ìž‘ë©ë‹ˆë‹¤. +다운로드한 ì••ì¶• 패키지를 다시 설치하거나 <a href="http://dokuwiki.org/install">DokuWiki 설치 ê³¼ì •</a>ì„ ì°¸ê³ í•´ì„œ 설치하기 ë°”ëžë‹ˆë‹¤.'; +$lang['i_funcna'] = '<code>%s</code> PHP í•¨ìˆ˜ì˜ ì‚¬ìš©ì´ ë¶ˆê°€ëŠ¥í•©ë‹ˆë‹¤. 호스트 ì œê³µìžê°€ ì–´ë–¤ ì´ìœ ì—서ì¸ì§€ 막아 놓았ì„ì§€ 모릅니다.'; +$lang['i_phpver'] = 'PHP <code>%s</code> ë²„ì „ì€ í•„ìš”í•œ <code>%s</code> ë²„ì „ë³´ë‹¤ 오래ë˜ì—ˆìŠµë‹ˆë‹¤. PHP를 ì—…ê·¸ë ˆì´ë“œí• 필요가 있습니다.'; $lang['i_permfail'] = 'DokuWiki는 <code>%s</code>ì— ì“°ê¸° 가능 ê¶Œí•œì´ ì—†ìŠµë‹ˆë‹¤. ë¨¼ì € ì´ ë””ë ‰í† ë¦¬ì— ì“°ê¸° ê¶Œí•œì´ ì„¤ì •ë˜ì–´ì•¼ 합니다!'; -$lang['i_confexists'] = '<code>%s</code>는 ì´ë¯¸ 존재합니다.'; -$lang['i_writeerr'] = '<code>%s</code>ì„ ë§Œë“¤ 수 없습니다. ë¨¼ì € ë””ë ‰í† ë¦¬/íŒŒì¼ ê¶Œí•œì„ í™•ì¸í•˜ê³ 파ì¼ì„ 수ë™ìœ¼ë¡œ 만들기 ë°”ëžë‹ˆë‹¤.'; -$lang['i_badhash'] = 'dokuwiki.php를 ì¸ì‹í• 수 없거나 ì›ë³¸ 파ì¼ì´ 아닙니다. (hash=<code>%s</code>)'; +$lang['i_confexists'] = '<code>%s</code>(ì€)는 ì´ë¯¸ 존재합니다.'; +$lang['i_writeerr'] = '<code>%s</code>(ì„)를 만들 수 없습니다. ë¨¼ì € ë””ë ‰í† ë¦¬/íŒŒì¼ ê¶Œí•œì„ í™•ì¸í•˜ê³ 파ì¼ì„ 수ë™ìœ¼ë¡œ 만들기 ë°”ëžë‹ˆë‹¤.'; +$lang['i_badhash'] = 'dokuwiki.php를 ì¸ì‹í• 수 없거나 ì›ë³¸ 파ì¼ì´ 아닙니다. (해시=<code>%s</code>)'; $lang['i_badval'] = '<code>%s</code> - ìœ íš¨í•˜ì§€ 않거나 빈 값입니다.'; -$lang['i_success'] = '환경 ì„¤ì •ì´ ì„±ê³µì 으로 ë났습니다. install.php를 ì§€ì›Œë„ ìƒê´€ì—†ìŠµë‹ˆë‹¤. - <a href="doku.php">새로운 DokuWiki</a>.'; -$lang['i_failure'] = '환경 ì„¤ì • 파ì¼ì— 쓰는 ë„중 ì—러가 ë°œìƒí–ˆìŠµë‹ˆë‹¤. -새로운 <a href="doku.php"> DokuWiki</a>를 사용하기 ì „ì— ìˆ˜ë™ìœ¼ë¡œ ë¬¸ì œë¥¼ í•´ê²°í• í•„ìš”ê°€ 있습니다.'; +$lang['i_success'] = '환경 ì„¤ì •ì´ ì„±ê³µì 으로 ë났습니다. 지금 install.php를 ì§€ì›Œë„ ìƒê´€ì—†ìŠµë‹ˆë‹¤. <a href="doku.php">새 DokuWiki</a>로 들어갑니다.'; +$lang['i_failure'] = '환경 ì„¤ì • 파ì¼ì— 쓰는 ë„ì¤‘ì— ì˜¤ë¥˜ê°€ ë°œìƒí–ˆìŠµë‹ˆë‹¤. <a href="doku.php">새 DokuWiki</a>를 사용하기 ì „ì— ìˆ˜ë™ìœ¼ë¡œ ë¬¸ì œë¥¼ í•´ê²°í• í•„ìš”ê°€ 있습니다.'; $lang['i_policy'] = '초기 ACL ì •ì±…'; -$lang['i_pol0'] = '개방형 위키 (누구나 ì½ê¸°/쓰기/업로드가 가능합니다.)'; -$lang['i_pol1'] = '공개형 위키 (누구나 ì½ì„ 수 있지만, 등ë¡ëœ 사용ìžë§Œ 쓰기/업로드가 가능합니다.)'; -$lang['i_pol2'] = 'í쇄형 위키 (등ë¡ëœ 사용ìžë§Œ ì½ê¸°/쓰기/업로드가 가능합니다.)'; +$lang['i_pol0'] = '열린 위키 (누구나 ì½ê¸°, 쓰기, 올리기가 가능합니다.)'; +$lang['i_pol1'] = '공개 위키 (누구나 ì½ì„ 수 있지만, 등ë¡ëœ 사용ìžë§Œ 쓰기와 올리기가 가능합니다.)'; +$lang['i_pol2'] = '닫힌 위키 (등ë¡ëœ 사용ìžë§Œ ì½ê¸°, 쓰기, 업로드가 가능합니다.)'; $lang['i_retry'] = '다시 시ë„'; -$lang['i_license'] = 'ë‚´ìš©ì˜ ë°°í¬ë¥¼ 위한 ë¼ì´ì„¼ìŠ¤ë¥¼ ì„ íƒí•˜ì„¸ìš”.'; -$lang['recent_global'] = '<b>%s</b> 네임스페ì´ìŠ¤ë¥¼ 구ë…중입니다. <a href="%s">ì „ì²´ìœ„í‚¤ ë³€ê²½ì‚¬í• </a>ë„ ë³´ì‹¤ìˆ˜ 있습니다.'; -$lang['years'] = '%d ë…„ ì „'; -$lang['months'] = '%d 개월 ì „'; -$lang['weeks'] = '%d 주 ì „'; -$lang['days'] = '%d ì¼ ì „'; -$lang['hours'] = '%d 시간 ì „'; -$lang['minutes'] = '%d ë¶„ ì „'; -$lang['seconds'] = '%d ì´ˆ ì „'; +$lang['i_license'] = 'ë‚´ìš©ì„ ë°°í¬í•˜ê¸° 위한 ë¼ì´ì„ 스를 ì„ íƒí•˜ì„¸ìš”:'; +$lang['recent_global'] = '<b>%s</b> ì´ë¦„ê³µê°„ì„ êµ¬ë… ì¤‘ìž…ë‹ˆë‹¤. <a href="%s">ì „ì²´ ìœ„í‚¤ì˜ ìµœê·¼ ë°”ë€œë„ ë³¼ 수</a> 있습니다.'; +$lang['years'] = '%dë…„ ì „'; +$lang['months'] = '%d개월 ì „'; +$lang['weeks'] = '%d주 ì „'; +$lang['days'] = '%dì¼ ì „'; +$lang['hours'] = '%d시간 ì „'; +$lang['minutes'] = '%dë¶„ ì „'; +$lang['seconds'] = '%dì´ˆ ì „'; $lang['wordblock'] = '스팸 문구를 í¬í•¨í•˜ê³ 있어서 ì €ìž¥ë˜ì§€ 않았습니다.'; -$lang['media_uploadtab'] = '업로드'; -$lang['media_searchtab'] = '검색'; +$lang['media_uploadtab'] = '올리기'; +$lang['media_searchtab'] = '찾기'; $lang['media_file'] = '파ì¼'; $lang['media_viewtab'] = '보기'; $lang['media_edittab'] = 'ìˆ˜ì •'; -$lang['media_historytab'] = '변경사í•'; -$lang['media_list_thumbs'] = 'ì¸ë„¤ì¼'; +$lang['media_historytab'] = 'ì—사'; +$lang['media_list_thumbs'] = '섬네ì¼'; $lang['media_list_rows'] = '목ë¡'; $lang['media_sort_name'] = 'ì´ë¦„'; $lang['media_sort_date'] = 'ë‚ ì§œ'; -$lang['media_namespaces'] = '네임스페ì´ìФ ì„ íƒ'; -$lang['media_files'] = '%s ì˜ íŒŒì¼'; -$lang['media_upload'] = '%s ì— ì—…ë¡œë“œ'; -$lang['media_search'] = '%s 를 검색'; +$lang['media_namespaces'] = 'ì´ë¦„공간 ì„ íƒ'; +$lang['media_files'] = '%sì˜ íŒŒì¼'; +$lang['media_upload'] = '%sì— ì˜¬ë¦¬ê¸°'; +$lang['media_search'] = '%s 찾기'; $lang['media_view'] = '%s'; -$lang['media_viewold'] = '%s ì˜ %s'; +$lang['media_viewold'] = '%sì˜ %s'; $lang['media_edit'] = '%s ìˆ˜ì •'; -$lang['media_history'] = '%s 변경사í•'; -$lang['media_meta_edited'] = '메타ë°ì´í„° ìˆ˜ì •ë¨'; -$lang['media_perm_read'] = '죄송합니다, ì´ íŒŒì¼ì„ ì½ì„ ê¶Œí•œì´ ì—†ìŠµë‹ˆë‹¤.'; -$lang['media_perm_upload'] = '죄송합니다. 파ì¼ì„ ì—…ë¡œë“œí• ê¶Œí•œì´ ì—†ìŠµë‹ˆë‹¤.'; +$lang['media_history'] = '%s 변경 ë‚´ë ¥'; +$lang['media_meta_edited'] = '메타ë°ì´í„°ê°€ ìˆ˜ì •ë¨'; +$lang['media_perm_read'] = 'ì´ íŒŒì¼ì„ ì½ì„ ê¶Œí•œì´ ì—†ìŠµë‹ˆë‹¤.'; +$lang['media_perm_upload'] = '파ì¼ì„ 올릴 ê¶Œí•œì´ ì—†ìŠµë‹ˆë‹¤.'; $lang['media_update'] = '새 ë²„ì „ 올리기'; $lang['media_restore'] = 'ì´ ë²„ì „ìœ¼ë¡œ ë˜ëŒë¦¬ê¸°'; -$lang['plugin_install_err'] = 'í”ŒëŸ¬ê·¸ì¸ ì„¤ì¹˜ê°€ ë¹„ì •ìƒì 으로 ì´ë¤„졌습니다. í”ŒëŸ¬ê·¸ì¸ ë””ë ‰í† ë¦¬ \'%s\'를 \'%s\'로 변경하ì‹ì‹œì˜¤.'; +$lang['plugin_install_err'] = 'í”ŒëŸ¬ê·¸ì¸ ì„¤ì¹˜ê°€ 잘못ë˜ì—ˆìŠµë‹ˆë‹¤. í”ŒëŸ¬ê·¸ì¸ ë””ë ‰í† ë¦¬ \'%s\'(ì„)를 \'%s\'(으)로 바꾸ì‹ì‹œì˜¤.'; diff --git a/inc/lang/ko/locked.txt b/inc/lang/ko/locked.txt index 24525fc46521dbca8f44a8ba5023eb5d9e94b893..176a792d6861c674860a1160eae1a1cd50293a61 100644 --- a/inc/lang/ko/locked.txt +++ b/inc/lang/ko/locked.txt @@ -1,3 +1,3 @@ -====== 페ì´ì§€ ìž ê¸ˆ ====== +====== 문서 ìž ê¸ˆ ====== -다른 사용ìžê°€ ì´ íŽ˜ì´ì§€ íŽ¸ì§‘ì„ ìœ„í•´ ìž ê¸ˆì„ ì‹¤í–‰í•˜ì˜€ìŠµë‹ˆë‹¤. 해당 사용ìžê°€ íŽ¸ì§‘ì„ ë내거나 ìž ê¸ˆì´ í•´ì œë 때까지 기다리ì‹ì‹œì˜¤. +다른 사용ìžê°€ ì´ ë¬¸ì„œë¥¼ 편집하기 위해 ìž ê¸ˆì„ ì‹¤í–‰í•˜ì˜€ìŠµë‹ˆë‹¤. 해당 사용ìžê°€ íŽ¸ì§‘ì„ ë내거나 ìž ê¸ˆì´ í•´ì œë 때까지 기다리ì‹ì‹œì˜¤. \ No newline at end of file diff --git a/inc/lang/ko/login.txt b/inc/lang/ko/login.txt index 1aae449df8d02700047810da40b9de31cbe80d6d..160b899d34295c8737ceb13a08df3fb93eacfa19 100644 --- a/inc/lang/ko/login.txt +++ b/inc/lang/ko/login.txt @@ -1,4 +1,3 @@ ====== ë¡œê·¸ì¸ ====== -로그ì¸í•˜ì§€ 않았습니다! 아래ì—서 로그ì¸í•˜ì‹ì‹œì˜¤. 로그ì¸í•˜ë ¤ë©´ ì¿ í‚¤ë¥¼ ë°›ë„ë¡ ì„¤ì •í•˜ì—¬ì•¼ 합니다. - +로그ì¸í•˜ì§€ 않았습니다! 아래ì—서 로그ì¸í•˜ì„¸ìš”. 로그ì¸í•˜ë ¤ë©´ ì¿ í‚¤ë¥¼ ë°›ë„ë¡ ì„¤ì •í•˜ì—¬ì•¼ 합니다. \ No newline at end of file diff --git a/inc/lang/ko/mailtext.txt b/inc/lang/ko/mailtext.txt index 5c496435eb778f28a429cc0115c31cb40da4014f..219fe6e0bd64eb8e4cc4ec902f8d2713e4197702 100644 --- a/inc/lang/ko/mailtext.txt +++ b/inc/lang/ko/mailtext.txt @@ -1,17 +1,16 @@ -DokuWiki 페ì´ì§€ê°€ ìˆ˜ì • í˜¹ì€ ì¶”ê°€ë˜ì—ˆìŠµë‹ˆë‹¤. ìƒì„¸í•œ ì •ë³´ëŠ” 다ìŒê³¼ 같습니다. +DokuWiki 문서가 추가 ë˜ëŠ” 변경ë˜ì—ˆìŠµë‹ˆë‹¤. ìžì„¸í•œ ì •ë³´ëŠ” 다ìŒê³¼ 같습니다: -ë‚ ì§œ : @DATE@ -브ë¼ìš°ì € : @BROWSER@ -IP 주소 : @IPADDRESS@ -호스트명 : @HOSTNAME@ -ì˜›ë‚ ë²„ì „ : @OLDPAGE@ -ìƒˆë²„ì „ : @NEWPAGE@ -편집 요약 : @SUMMARY@ -ì‚¬ìš©ìž : @USER@ +ë‚ ì§œ : @DATE@ +브ë¼ìš°ì € : @BROWSER@ +IP 주소 : @IPADDRESS@ +호스트 ì´ë¦„ : @HOSTNAME@ +ì´ì „ ë²„ì „ : @OLDPAGE@ +새 ë²„ì „ : @NEWPAGE@ +편집 요약 : @SUMMARY@ +ì‚¬ìš©ìž : @USER@ @DIFF@ --- -ì´ ë©”ì¼ì€ @DOKUWIKIURL@ ì˜ DokuWiki ê°€ ìƒì„±í•œ -ì´ë©”ì¼ìž…니다. +-- +@DOKUWIKIURL@ì˜ DokuWikiê°€ ìžë™ìœ¼ë¡œ 만들어낸 ë©”ì¼ìž…니다. \ No newline at end of file diff --git a/inc/lang/ko/mailwrap.html b/inc/lang/ko/mailwrap.html new file mode 100644 index 0000000000000000000000000000000000000000..8857304289081855eb174de8f099dccafcb0c18a --- /dev/null +++ b/inc/lang/ko/mailwrap.html @@ -0,0 +1,13 @@ +<html> + <head> + <title>@TITLE@</title> + <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> + </head> + <body> + + @HTMLBODY@ + + <br /><hr /> + <small>@DOKUWIKIURL@ì˜ DokuWikiê°€ ìžë™ìœ¼ë¡œ 만들어낸 ë©”ì¼ìž…니다.</small> + </body> + </html> \ No newline at end of file diff --git a/inc/lang/ko/newpage.txt b/inc/lang/ko/newpage.txt index f8380bd84282b364704efe37356984243952c088..87ac969d2d92fa2af35a75bd63aa245a6bd8ff61 100644 --- a/inc/lang/ko/newpage.txt +++ b/inc/lang/ko/newpage.txt @@ -1,3 +1,3 @@ -====== ì´ í† í”½ì€ ì•„ì§ ì—†ìŠµë‹ˆë‹¤ ====== +====== ì´ ì£¼ì œëŠ” ì•„ì§ ì—†ìŠµë‹ˆë‹¤ ====== -ì•„ì§ ì—†ëŠ” í† í”½ ë§í¬ë¥¼ ë”°ë¼ì˜¤ì…¨ìŠµë‹ˆë‹¤. **페ì´ì§€ 만들기** ë²„íŠ¼ì„ ì´ìš©í•˜ì—¬ 새로 만들 수 있습니다. +ì•„ì§ ì—†ëŠ” ì£¼ì œì— ëŒ€í•œ ë§í¬ë¥¼ ë”°ë¼ì™”습니다. **문서 만들기** ë²„íŠ¼ì„ ì´ìš©í•˜ì—¬ 새로 만들 수 있습니다. \ No newline at end of file diff --git a/inc/lang/ko/norev.txt b/inc/lang/ko/norev.txt index e1b4093b45c7b12b054f7dd5ff289d21a199b47a..6758ce4ec8b857a2e512fc951cf0218e2b8fda42 100644 --- a/inc/lang/ko/norev.txt +++ b/inc/lang/ko/norev.txt @@ -1,3 +1,3 @@ ====== ì§€ì •í•œ ë²„ì „ ì—†ìŒ ====== -ì§€ì •í•œ ë²„ì „ì´ ì—†ìŠµë‹ˆë‹¤. **과거 ë²„ì „** ë²„íŠ¼ì„ ì‚¬ìš©í•˜ì—¬ ì´ ë¬¸ì„œì˜ ë²„ì „ 목ë¡ì„ ë³´ì‹ì‹œì˜¤. +ì§€ì •í•œ ë²„ì „ì´ ì¡´ìž¬í•˜ì§€ 않습니다. **ì´ì „ ë²„ì „** ë²„íŠ¼ì„ ì‚¬ìš©í•˜ì—¬ ì´ ë¬¸ì„œì˜ ì´ì „ ë²„ì „ 목ë¡ì„ 보세요. \ No newline at end of file diff --git a/inc/lang/ko/password.txt b/inc/lang/ko/password.txt index e0a22c59a90f5e86ccf402f5214d1f2ce1cfa9fa..02b23d17c83ed3cf25b119e573cf551e630709ca 100644 --- a/inc/lang/ko/password.txt +++ b/inc/lang/ko/password.txt @@ -1,10 +1,9 @@ -안녕하세요, @FULLNAME@! +@FULLNAME@ 안녕하세요! -@DOKUWIKIURL@ ì˜ @TITLE@ ì˜ ì‚¬ìš©ìž ì •ë³´ìž…ë‹ˆë‹¤. +@DOKUWIKIURL@ì˜ @TITLE@ì˜ ì‚¬ìš©ìž ì •ë³´ìž…ë‹ˆë‹¤. -사용ìžëª… : @LOGIN@ -패스워드 : @PASSWORD@ +ì‚¬ìš©ìž ì´ë¦„ : @LOGIN@ +비밀번호 : @PASSWORD@ -- -ì´ ì´ë©”ì¼ì€ @DOKUWIKIURL@ ì˜ DokuWiki ê°€ -ìƒì„±í•œ 것입니다. +@DOKUWIKIURL@ì˜ DokuWikiê°€ ìžë™ìœ¼ë¡œ 만들어낸 ë©”ì¼ìž…니다. \ No newline at end of file diff --git a/inc/lang/ko/preview.txt b/inc/lang/ko/preview.txt index 8bcc6a1eba5c6aaced7800eed5f4f3d043930a0f..6563874ee6c8b0d64eb03a0c465918f606d59a45 100644 --- a/inc/lang/ko/preview.txt +++ b/inc/lang/ko/preview.txt @@ -1,4 +1,3 @@ -====== 미리보기 ====== - -ì´ê²ƒì€ ìž…ë ¥í•˜ì‹ ë‚´ìš©ì´ ì–´ë–»ê²Œ ë³´ì¼ì§€ 미리보기하는 곳입니다. ì•„ì§ì€ **ì €ìž¥ë˜ì§€ 않았다**는 ì ì„ ê¸°ì–µí•˜ì‹ì‹œì˜¤. +====== 미리 보기 ====== +ì´ê²ƒì€ ìž…ë ¥í•œ ë‚´ìš©ì´ ì–´ë–»ê²Œ ë³´ì¼ì§€ 미리 ë³´ì—¬ì¤ë‹ˆë‹¤. ì•„ì§ **ì €ìž¥ë˜ì§€ 않았다**는 ì ì„ ê¸°ì–µí•´ë‘ì‹ì‹œì˜¤! \ No newline at end of file diff --git a/inc/lang/ko/pwconfirm.txt b/inc/lang/ko/pwconfirm.txt index c022a52a9b78244ad3086679699542cb3be2caad..1920f4a20f19c15ccf3d20f7702208a353c1861e 100644 --- a/inc/lang/ko/pwconfirm.txt +++ b/inc/lang/ko/pwconfirm.txt @@ -1,11 +1,13 @@ -안녕하세요. @FULLNAME@! +@FULLNAME@ 안녕하세요! -@DOKUWIKIURL@ì— ìž‘ì„±í•˜ì‹ @TITLE@ì„ ë³´ë ¤ë©´ 새 패스워드가 필요하다는 ìš”ì²ì„ 누군가 ë°›ì•˜ë‹¤ê³ í•©ë‹ˆë‹¤. +누군가가 @DOKUWIKIURL@ì— @TITLE@ì— ëŒ€í•´ +새 비밀번호가 í•„ìš”í•˜ë‹¤ê³ ìš”ì²í–ˆìŠµë‹ˆë‹¤. -새로운 패스워드를 ìš”ì²í•œ ì ì´ ì—†ë‹¤ë©´ ì´ ì´ë©”ì¼ì„ 무시해버리세요. +새로운 비밀번호 ìš”ì²í•œ ì ì´ ì—†ë‹¤ë©´ ì´ ì´ë©”ì¼ì„ 무시해버리세요. -@CONFIRM@ì—서 ì •ë§ë¡œ 본ì¸ì´ 그런 ìš”ì²ì„ 했었는지 확ì¸í•´ 보기 ë°”ëžë‹ˆë‹¤. +ì •ë§ë¡œ ë‹¹ì‹ ì´ ê·¸ëŸ¬í•œ ìš”ì²ì„ 했는지 ë‹¤ìŒ ë§í¬ì—서 확ì¸í•˜ê¸° ë°”ëžë‹ˆë‹¤. --- +@CONFIRM@ -@DOKUWIKIURL@ì˜ DokuWikiê°€ ìžë™ìœ¼ë¡œ 만들어낸 ë©”ì¼ìž…니다. +-- +@DOKUWIKIURL@ì˜ DokuWikiê°€ ìžë™ìœ¼ë¡œ 만들어낸 ë©”ì¼ìž…니다. \ No newline at end of file diff --git a/inc/lang/ko/read.txt b/inc/lang/ko/read.txt index 6b5d7b3db5d90774d06c04f3a12b23a5deef0b22..9b2ec822fd9d1868f9e99d7a2d50d5b7a4a91856 100644 --- a/inc/lang/ko/read.txt +++ b/inc/lang/ko/read.txt @@ -1,2 +1,2 @@ -ì´ íŽ˜ì´ì§€ëŠ” ì½ê¸° ì „ìš©ìž…ë‹ˆë‹¤. 소스를 ë³¼ 수는 있지만, ìˆ˜ì •í• ìˆ˜ëŠ” 없습니다. ì—°ìŠµì€ [[public:playground|연습장]]ì—서 하ì‹ì‹œì˜¤. ë¬¸ì œê°€ ìžˆë‹¤ê³ ìƒê°í•˜ì‹œë©´ 관리ìžì—게 문ì˜í•˜ì‹ì‹œì˜¤. +ì´ ë¬¸ì„œëŠ” ì½ê¸° ì „ìš©ìž…ë‹ˆë‹¤. ë‚´ìš©ì„ ë³¼ 수는 있지만, ìˆ˜ì •í• ìˆ˜ëŠ” 없습니다. ë¬¸ì œê°€ ìžˆë‹¤ê³ ìƒê°í•˜ë©´ 관리ìžì—게 문ì˜í•˜ì‹ì‹œì˜¤. diff --git a/inc/lang/ko/recent.txt b/inc/lang/ko/recent.txt index f693c4bf181ba139fc38b863b821a9b1d0889efd..f2ffb8c6fe4c7b47002edf3b76a00718ac317ec0 100644 --- a/inc/lang/ko/recent.txt +++ b/inc/lang/ko/recent.txt @@ -1,5 +1,3 @@ -====== 최근 변경 ====== - -ì•„ëž˜ì˜ íŽ˜ì´ì§€ëŠ” ìµœê·¼ì— ë³€ê²½ëœ ê²ƒìž…ë‹ˆë‹¤. - +====== 최근 바뀜 ====== +ì•„ëž˜ì˜ ë¬¸ì„œëŠ” ìµœê·¼ì— ë°”ë€ ê²ƒìž…ë‹ˆë‹¤. \ No newline at end of file diff --git a/inc/lang/ko/register.txt b/inc/lang/ko/register.txt index 24105efebc36cfe6967d7b9ba709060acb32063c..6509bed91d858a888975b21f5bd03d63bc317c85 100644 --- a/inc/lang/ko/register.txt +++ b/inc/lang/ko/register.txt @@ -1,4 +1,3 @@ ====== 새 ì‚¬ìš©ìž ë“±ë¡ ====== -ì´ ìœ„í‚¤ì— ìƒˆ ê³„ì •ì„ ë§Œë“¤ë ¤ë©´ ì•„ëž˜ì˜ ëª¨ë“ ë‚´ìš©ì„ ìž…ë ¥í•˜ì„¸ìš”. **ì œëŒ€ë¡œ ëœ ì´ë©”ì¼ ì£¼ì†Œ**를 사용하세요. 암호를 ìž…ë ¥í•˜ëŠ” ê³³ì´ ì—†ë‹¤ë©´ 암호는 ì´ ì´ë©”ì¼ë¡œ 보내집니다. 사용ìžëª…ì€ ì˜¬ë°”ë¥¸ [[doku>pagename|pagename]] ì´ì–´ì•¼ 합니다. - +ì´ ìœ„í‚¤ì— ìƒˆ ê³„ì •ì„ ë§Œë“œë ¤ë©´ ì•„ëž˜ì˜ ëª¨ë“ ë‚´ìš©ì„ ìž…ë ¥í•˜ì„¸ìš”. **올바른 ì´ë©”ì¼ ì£¼ì†Œ**를 사용하세요. 비밀번호를 ìž…ë ¥í•˜ëŠ” ê³³ì´ ì—†ë‹¤ë©´ 비밀번호는 ì´ ì´ë©”ì¼ë¡œ 보내집니다. ì‚¬ìš©ìž ì´ë¦„ì€ ì˜¬ë°”ë¥¸ [[doku>pagename|pagename]]ì´ì–´ì•¼ 합니다. \ No newline at end of file diff --git a/inc/lang/ko/registermail.txt b/inc/lang/ko/registermail.txt index 4b1aa20a5dbe4e9b44cb049ed5a7ce6ed5cfac49..d06f93047b2434ad71b38c6d8aca2befb0511897 100644 --- a/inc/lang/ko/registermail.txt +++ b/inc/lang/ko/registermail.txt @@ -1,14 +1,13 @@ -새로운 사용ìžê°€ 등ë¡ë˜ì—ˆìŠµë‹ˆë‹¤: +새 사용ìžê°€ 등ë¡ë˜ì—ˆìŠµë‹ˆë‹¤: -ì‚¬ìš©ìž ì´ë¦„ : @NEWUSER@ +ì‚¬ìš©ìž ì´ë¦„ : @NEWUSER@ ì‚¬ìš©ìž ì‹¤ì œ ì´ë¦„ : @NEWNAME@ -ì´ë©”ì¼ : @NEWEMAIL@ +ì´ë©”ì¼ : @NEWEMAIL@ -ë‚ ì§œ : @DATE@ -브ë¼ìš°ì € : @BROWSER@ -IP주소 : @IPADDRESS@ -호스트 ì´ë¦„ : @HOSTNAME@ +ë‚ ì§œ : @DATE@ +브ë¼ìš°ì € : @BROWSER@ +IP 주소 : @IPADDRESS@ +호스트 ì´ë¦„ : @HOSTNAME@ -- - @DOKUWIKIURL@ì˜ DokuWikiê°€ ìžë™ìœ¼ë¡œ 만들어낸 ë©”ì¼ìž…니다. diff --git a/inc/lang/ko/resendpwd.txt b/inc/lang/ko/resendpwd.txt index b06163e9271058100223f02b94495104cf61a63c..0ad46eb1e0d9173bf099aa1d8b39cbefd5a63f82 100644 --- a/inc/lang/ko/resendpwd.txt +++ b/inc/lang/ko/resendpwd.txt @@ -1,4 +1,3 @@ -====== 새로운 패스워드 ì „ì†¡ ====== - -ì´ ìœ„í‚¤ ê³„ì •ì— ëŒ€í•œ 새 패스워드를 요구하기 위해 아래 í¼ì—서 ì‚¬ìš©ìž ì´ë¦„ì„ ìž…ë ¥í•˜ì„¸ìš”. í™•ì¸ ë§í¬ëŠ” 새로 등ë¡ëœ ì´ë©”ì¼ ì£¼ì†Œë¡œ 발송ë©ë‹ˆë‹¤. +====== 새로운 비밀번호 ì „ì†¡ ====== +ì´ ìœ„í‚¤ ê³„ì •ì— ëŒ€í•œ 새 비밀번호를 요구하기 위해 아래 ì–‘ì‹ì—서 ì‚¬ìš©ìž ì´ë¦„ì„ ìž…ë ¥í•˜ì„¸ìš”. í™•ì¸ ë§í¬ëŠ” 새로 등ë¡í•œ ì´ë©”ì¼ ì£¼ì†Œë¡œ 발송ë©ë‹ˆë‹¤. \ No newline at end of file diff --git a/inc/lang/ko/resetpwd.txt b/inc/lang/ko/resetpwd.txt index b84674b82eedc6c27f012bd38b56f961e50f9f4b..ed909456f8db606d0ac04945e9b3087dd37c3dd7 100644 --- a/inc/lang/ko/resetpwd.txt +++ b/inc/lang/ko/resetpwd.txt @@ -1,3 +1,3 @@ -====== 새 암호 ì„¤ì • ====== +====== 새 비밀번호 ì„¤ì • ====== -ì´ ìœ„í‚¤ì˜ ê³„ì •ì˜ ìƒˆ 암호를 ìž…ë ¥í•´ì£¼ì„¸ìš”. \ No newline at end of file +ì´ ìœ„í‚¤ ê³„ì •ì˜ ìƒˆ 비밀번호를 ìž…ë ¥í•˜ì„¸ìš”. \ No newline at end of file diff --git a/inc/lang/ko/revisions.txt b/inc/lang/ko/revisions.txt index 12d11894d235d95688a3bf6c8d7642d63159a73d..64733d86daf5e1cfa0f859bd5d15846ead79c349 100644 --- a/inc/lang/ko/revisions.txt +++ b/inc/lang/ko/revisions.txt @@ -1,4 +1,3 @@ ====== ì´ì „ ë²„ì „ ====== -ì´ ë¬¸ì„œì˜ ì˜›ë‚ ë²„ì „ì€ ë‹¤ìŒê³¼ 같습니다. ì´ì „ ë²„ì „ìœ¼ë¡œ ëŒì•„ê°€ë ¤ë©´, 아래ì—서 ì„ íƒí•œ 다ìŒ, **페ì´ì§€ 편집**ì„ í´ë¦í•œ 아후 ì €ìž¥í•˜ì‹ì‹œì˜¤. - +ì´ ë¬¸ì„œì˜ ì´ì „ ë²„ì „ì€ ë‹¤ìŒê³¼ 같습니다. ì´ì „ ë²„ì „ìœ¼ë¡œ ëŒì•„ê°€ë ¤ë©´, 아래ì—서 ì„ íƒí•œ ë‹¤ìŒ **문서 편집**ì„ í´ë¦í•˜ê³ 나서 ì €ìž¥í•˜ì„¸ìš”. \ No newline at end of file diff --git a/inc/lang/ko/searchpage.txt b/inc/lang/ko/searchpage.txt index 198d9a4281f04af03195cb5fe3eacf4a7059ea7c..2e8502b13e1866ffcbe91711063639e9ecfd59d8 100644 --- a/inc/lang/ko/searchpage.txt +++ b/inc/lang/ko/searchpage.txt @@ -1,5 +1,5 @@ ====== 찾기 ====== -찾기 결과를 아래ì—서 ë³¼ 수 있습니다. ë§Œì¼ ì›í•˜ëŠ” ê²ƒì„ ì°¾ì§€ 못하였다면, **페ì´ì§€ 편집** ë²„íŠ¼ì„ ì´ìš©í•˜ì—¬ ì§ˆì˜ ë‚´ìš©ê³¼ ê°™ì€ ì´ë¦„ì˜ íŽ˜ì´ì§€ë¥¼ 만들 수 있습니다. +아래ì—서 찾기 결과를 ë³¼ 수 있습니다. ë§Œì¼ ì›í•˜ëŠ” ê²ƒì„ ì°¾ì§€ 못하였다면, **문서 만들기**나 **문서 편집** ë²„íŠ¼ì„ ì‚¬ìš©í•˜ì—¬ 쿼리 내용과 ê°™ì€ ì´ë¦„ì˜ ë¬¸ì„œë¥¼ 만들거나 íŽ¸ì§‘í• ìˆ˜ 있습니다. -===== ê²°ê³¼ ===== +===== ê²°ê³¼ ===== \ No newline at end of file diff --git a/inc/lang/ko/stopwords.txt b/inc/lang/ko/stopwords.txt index bdb41debaa6baada2c57b8ed4a73d96eb08f36c4..4b5551ce5d53893b884650a3ff7a3fd610e6e180 100644 --- a/inc/lang/ko/stopwords.txt +++ b/inc/lang/ko/stopwords.txt @@ -1,9 +1,11 @@ -# 색ì¸ì´ 만들어 지지 않는 단어 목ë¡ìž…니다.(í•œì¤„ì— í•œë‹¨ì–´) -# ì´ íŒŒì¼ì„ 편집한다면 UNIX줄 종료문ìžë¥¼ 사용해야합니다.(ë‹¨ì¼ ê°œí–‰ë¬¸ìž) -# 3문ìžì´í•˜ 단어는 ìžë™ìœ¼ë¡œ 무시ë˜ë¯€ë¡œ 3문ìžë³´ë‹¤ ì§§ì€ ë‹¨ì–´ëŠ” í¬í•¨ì‹œí‚¬ 필요가 없습니다. +# 색ì¸ì´ 만들어지지 않는 단어 목ë¡ìž…니다. (í•œì¤„ì— í•œ 단어) +# ì´ íŒŒì¼ì„ 편집한다면 UNIX 줄 종료 문ìžë¥¼ 사용해야합니다.(ë‹¨ì¼ ê°œí–‰ 문ìž) +# 3ë¬¸ìž ì´í•˜ 단어는 ìžë™ìœ¼ë¡œ 무시ë˜ë¯€ë¡œ 3문ìžë³´ë‹¤ ì§§ì€ ë‹¨ì–´ëŠ” í¬í•¨ì‹œí‚¬ 필요가 없습니다. # http://www.ranks.nl/stopwords/ì„ ê¸°ì¤€ìœ¼ë¡œ 만들어진 목ë¡ìž…니다. about are +as +an and you your @@ -13,10 +15,18 @@ com for from into +if +in +is +it how +of +on +or that the this +to was what when @@ -26,4 +36,4 @@ will with und the -www +www \ No newline at end of file diff --git a/inc/lang/ko/subscr_digest.txt b/inc/lang/ko/subscr_digest.txt index 2e9c87848de7c38770bca65358c8d046ad64ccc0..13459428fbabc739bdfae76dcbc0b9f580a14221 100644 --- a/inc/lang/ko/subscr_digest.txt +++ b/inc/lang/ko/subscr_digest.txt @@ -1,18 +1,18 @@ 안녕하세요! -@TITLE@ ë¼ëŠ” ì œëª©ì˜ íŽ˜ì´ì§€ @PAGE@ ê°€ 변경ë˜ì—ˆìŠµë‹ˆë‹¤. - -변경사í•ì€ ë‹¤ìŒê³¼ 같습니다: +@TITLE@ ìœ„í‚¤ì˜ @PAGE@ 문서가 바뀌었습니다. +ë°”ë€ ì ì€ ë‹¤ìŒê³¼ 같습니다: -------------------------------------------------------- @DIFF@ -------------------------------------------------------- -ì˜›ë‚ ê²ƒ: @OLDPAGE@ -새 것: @NEWPAGE@ +ì´ì „ ë²„ì „ : @OLDPAGE@ +새 ë²„ì „ : @NEWPAGE@ + -ì´ íŽ˜ì´ì§€ ë³€ê²½ì•Œë¦¼ì˜ ì„¤ì •ì„ ë°”êµ¬ë ¤ë©´, @DOKUWIKIURL@ì— ë¡œê·¸ì¸í•œ ë’¤ -@SUBSCRIBE@ 를 방문하여 페ì´ì§€ë‚˜ ì´ë¦„ê³µê°„ì˜ êµ¬ë…ì„ ì·¨ì†Œí•˜ì„¸ìš”. +ì´ ë¬¸ì„œì˜ ì•Œë¦¼ì„ ì·¨ì†Œí•˜ë ¤ë©´, @DOKUWIKIURL@ì— ë¡œê·¸ì¸í•œ ë’¤ +@SUBSCRIBE@ 문서를 방문하여 문서나 ì´ë¦„ê³µê°„ì˜ êµ¬ë…ì„ ì·¨ì†Œí•˜ì„¸ìš”. -- @DOKUWIKIURL@ì˜ DokuWikiê°€ ìžë™ìœ¼ë¡œ 만들어낸 ë©”ì¼ìž…니다. \ No newline at end of file diff --git a/inc/lang/ko/subscr_form.txt b/inc/lang/ko/subscr_form.txt index 31470f3723f1192809b2cd809f8a68811b465606..ed380cceee4f16f29863c9b516ab7f1138b10048 100644 --- a/inc/lang/ko/subscr_form.txt +++ b/inc/lang/ko/subscr_form.txt @@ -1,3 +1,3 @@ ====== êµ¬ë… ê´€ë¦¬ ====== -ì´ íŽ˜ì´ì§€ëŠ” í˜„ìž¬ì˜ íŽ˜ì´ì§€ì™€ 네임스페ì´ìŠ¤ì˜ êµ¬ë…ì„ ê´€ë¦¬í• ìˆ˜ìžˆë„ë¡ í•´ì¤ë‹ˆë‹¤. \ No newline at end of file +ì´ íŽ˜ì´ì§€ëŠ” í˜„ìž¬ì˜ ë¬¸ì„œì™€ ì´ë¦„ê³µê°„ì˜ êµ¬ë…ì„ ê´€ë¦¬í• ìˆ˜ 있ë„ë¡ í•´ì¤ë‹ˆë‹¤. \ No newline at end of file diff --git a/inc/lang/ko/subscr_list.txt b/inc/lang/ko/subscr_list.txt index 2661a6a15ca8730cd3bd527f04b58562db9c7810..68adf0de9ed4c9eedce35dc6fa66050b56c60fe5 100644 --- a/inc/lang/ko/subscr_list.txt +++ b/inc/lang/ko/subscr_list.txt @@ -1,15 +1,14 @@ 안녕하세요! -@TITLE@ ë¼ëŠ” ì œëª©ì˜ íŽ˜ì´ì§€ @PAGE@ ê°€ 변경ë˜ì—ˆìŠµë‹ˆë‹¤. - -변경사í•ì€ ë‹¤ìŒê³¼ 같습니다: +@TITLE@ ìœ„í‚¤ì˜ @PAGE@ 문서가 바뀌었습니다. +ë°”ë€ ì ì€ ë‹¤ìŒê³¼ 같습니다: -------------------------------------------------------- @DIFF@ -------------------------------------------------------- -ì´ íŽ˜ì´ì§€ ë³€ê²½ì•Œë¦¼ì˜ ì„¤ì •ì„ ë°”êµ¬ë ¤ë©´, @DOKUWIKIURL@ì— ë¡œê·¸ì¸í•œ ë’¤ -@SUBSCRIBE@ 를 방문하여 페ì´ì§€ë‚˜ ì´ë¦„ê³µê°„ì˜ êµ¬ë…ì„ ì·¨ì†Œí•˜ì„¸ìš”. +ì´ ë¬¸ì„œì˜ ì•Œë¦¼ì„ ì·¨ì†Œí•˜ë ¤ë©´, @DOKUWIKIURL@ì— ë¡œê·¸ì¸í•œ ë’¤ +@SUBSCRIBE@ 문서를 방문하여 문서나 ì´ë¦„ê³µê°„ì˜ êµ¬ë…ì„ ì·¨ì†Œí•˜ì„¸ìš”. -- @DOKUWIKIURL@ì˜ DokuWikiê°€ ìžë™ìœ¼ë¡œ 만들어낸 ë©”ì¼ìž…니다. \ No newline at end of file diff --git a/inc/lang/ko/subscr_single.txt b/inc/lang/ko/subscr_single.txt index 1aa4d7efa6d80e704feae445953bb41faf1c4d34..6bd1885e6332b0fed0b56ff65fb3683036018472 100644 --- a/inc/lang/ko/subscr_single.txt +++ b/inc/lang/ko/subscr_single.txt @@ -1,8 +1,7 @@ 안녕하세요! -@TITLE@ ë¼ëŠ” ì œëª©ì˜ íŽ˜ì´ì§€ @PAGE@ ê°€ 변경ë˜ì—ˆìŠµë‹ˆë‹¤. - -변경사í•ì€ ë‹¤ìŒê³¼ 같습니다: +@TITLE@ ìœ„í‚¤ì˜ @PAGE@ 문서가 바뀌었습니다. +ë°”ë€ ì ì€ ë‹¤ìŒê³¼ 같습니다: -------------------------------------------------------- @DIFF@ @@ -11,11 +10,11 @@ ë‚ ì§œ : @DATE@ ì‚¬ìš©ìž : @USER@ 편집 요약 : @SUMMARY@ -구 ë²„ì „ : @OLDPAGE@ +ì´ì „ ë²„ì „ : @OLDPAGE@ 새 ë²„ì „ : @NEWPAGE@ -ì´ íŽ˜ì´ì§€ ë³€ê²½ì•Œë¦¼ì˜ ì„¤ì •ì„ ë°”êµ¬ë ¤ë©´, @DOKUWIKIURL@ì— ë¡œê·¸ì¸í•œ ë’¤ t -@NEWPAGE@ 를 방문하여 페ì´ì§€ë‚˜ ì´ë¦„ê³µê°„ì˜ êµ¬ë…ì„ ì·¨ì†Œí•˜ì„¸ìš”. +ì´ ë¬¸ì„œì˜ ì•Œë¦¼ì„ ì·¨ì†Œí•˜ë ¤ë©´, @DOKUWIKIURL@ì— ë¡œê·¸ì¸í•œ ë’¤ +@NEWPAGE@ 문서를 방문하여 문서나 ì´ë¦„ê³µê°„ì˜ êµ¬ë…ì„ ì·¨ì†Œí•˜ì„¸ìš”. -- @DOKUWIKIURL@ì˜ DokuWikiê°€ ìžë™ìœ¼ë¡œ 만들어낸 ë©”ì¼ìž…니다. \ No newline at end of file diff --git a/inc/lang/ko/updateprofile.txt b/inc/lang/ko/updateprofile.txt index 5ea331c050458e1a4dd377cd7751264a86b013e5..ebf19d8ab7c8ef91f08e56eba8b0d3cd6cede1e3 100644 --- a/inc/lang/ko/updateprofile.txt +++ b/inc/lang/ko/updateprofile.txt @@ -1,5 +1,3 @@ ====== ê°œì¸ ì •ë³´ ìˆ˜ì • ====== -ë³€ê²½í•˜ê³ ì‹¶ì€ í•ëª©ì„ ìž…ë ¥í•˜ê¸° ë°”ëžë‹ˆë‹¤. ì‚¬ìš©ìž ì´ë¦„ì€ ë°”ê¾¸ê³ ì‹¶ì§€ ì•Šê² ì§€ìš”? - - +ë°”ê¾¸ê³ ì‹¶ì€ í•ëª©ì„ ìž…ë ¥í•˜ê¸° ë°”ëžë‹ˆë‹¤. ì‚¬ìš©ìž ì´ë¦„ì€ ë°”ê¿€ 수 없습니다. \ No newline at end of file diff --git a/inc/lang/ko/uploadmail.txt b/inc/lang/ko/uploadmail.txt index 46c66a66bdb0f1cbc192876978f92060bbbfe7e6..675c0bd3f646abf7e4bd169e0ea653583410679f 100644 --- a/inc/lang/ko/uploadmail.txt +++ b/inc/lang/ko/uploadmail.txt @@ -1,15 +1,14 @@ -DokuWikiê°€ 파ì¼ì„ 업로드하였습니다. +DokuWikiê°€ 파ì¼ì„ ì˜¬ë ¸ìŠµë‹ˆë‹¤. ìžì„¸í•œ ì •ë³´ëŠ” 다ìŒê³¼ 같습니다: -ìžì„¸í•œ ì •ë³´: - -íŒŒì¼ : @MEDIA@ -ë‚ ì§œ : @DATE@ -웹 브ë¼ìš°ì € : @BROWSER@ -IP 주소 : @IPADDRESS@ -호스트명 : @HOSTNAME@ -í¬ê¸° : @SIZE@ -íŒŒì¼ ì¢…ë¥˜ : @MIME@ -ì‚¬ìš©ìž : @USER@ +íŒŒì¼ : @MEDIA@ +ì´ì „ ë²„ì „ : @OLD@ +ë‚ ì§œ : @DATE@ +브ë¼ìš°ì € : @BROWSER@ +IP 주소 : @IPADDRESS@ +호스트 ì´ë¦„ : @HOSTNAME@ +í¬ê¸° : @SIZE@ +MIME 종류 : @MIME@ +ì‚¬ìš©ìž : @USER@ -- -ì´ ë©”ì¼ì€ @DOKUWIKIURL@ì˜ DokuWikiê°€ ìƒì„±í•œ ë©”ì¼ìž…니다. \ No newline at end of file +@DOKUWIKIURL@ì˜ DokuWikiê°€ ìžë™ìœ¼ë¡œ 만들어낸 ë©”ì¼ìž…니다. \ No newline at end of file diff --git a/inc/lang/mr/lang.php b/inc/lang/mr/lang.php index 96323394d7d2894b6ca72e4a6f4672609bd13a55..32781e6d461f02da28f856107c536f6279170d73 100644 --- a/inc/lang/mr/lang.php +++ b/inc/lang/mr/lang.php @@ -44,13 +44,16 @@ $lang['btn_back'] = 'मागॆ'; $lang['btn_backlink'] = 'येथे काय जोडले आहे'; $lang['btn_backtomedia'] = 'परत माधà¥à¤¯à¤® फाइल निवडीकड़े'; $lang['btn_subscribe'] = 'पृषà¥à¤ ाचà¥à¤¯à¤¾ बदलांची पà¥à¤°à¤µà¤£à¥€ (फीड) लावा '; -$lang['btn_unsubscribe'] = 'पृषà¥à¤ ाचà¥à¤¯à¤¾ बदलांची पà¥à¤°à¤µà¤£à¥€ (फीड) बंद करा'; $lang['btn_profile'] = 'पà¥à¤°à¥‹à¤«à¤¾à¤‡à¤² अदà¥à¤¯à¤¯à¤¾à¤µà¤¤ करा'; $lang['btn_reset'] = 'रिसेट'; +$lang['btn_resendpwd'] = 'नवीन पासवरà¥à¤¡'; $lang['btn_draft'] = 'पà¥à¤°à¤¤ संपादन'; $lang['btn_recover'] = 'पà¥à¤°à¤¤ परत मिळवा'; $lang['btn_draftdel'] = 'पà¥à¤°à¤¤ रदà¥à¤¦'; +$lang['btn_revert'] = 'पà¥à¤¨à¤°à¥à¤¸à¥à¤¥à¤¾à¤ªà¤¨'; $lang['btn_register'] = 'नोंदणी'; +$lang['btn_apply'] = 'लागू'; +$lang['btn_media'] = 'मिडिया वà¥à¤¯à¤µà¤¸à¥à¤¥à¤¾à¤ªà¤•'; $lang['loggedinas'] = 'लॉगिन नाव'; $lang['user'] = 'वापरकरà¥à¤¤à¤¾'; $lang['pass'] = 'परवलीचा शबà¥à¤¦'; @@ -81,19 +84,58 @@ $lang['profchanged'] = 'सदसà¥à¤¯à¤¾à¤šà¥€ पà¥à¤°à¥‹à¤«à¤¾à¤‡ $lang['pwdforget'] = 'परवलीचा शबà¥à¤¦ विसरला आहे का? नविन मागवा.'; $lang['resendna'] = 'हà¥à¤¯à¤¾ विकी मधे परवलीचा शबà¥à¤¦ परत पाथावà¥à¤¨à¥à¤¯à¤¾à¤šà¥€ सà¥à¤µà¤¿à¤§à¤¾ नाही.'; $lang['resendpwd'] = 'नविन परवली इचà¥à¤›à¥à¤•'; +$lang['resendpwdmissing'] = 'माफ करा, पण सरà¥à¤µ जागा à¤à¤°à¤²à¥à¤¯à¤¾ पाहिजेत.'; $lang['resendpwdnouser'] = 'माफ़ करा, हा सदसà¥à¤¯ आमचà¥à¤¯à¤¾ माहितिसंगà¥à¤°à¤¹à¤¾à¤¤ सापडला नाही.'; $lang['resendpwdbadauth'] = 'माफ़ करा, हा अधिकार कोड बरोबर नाही. कृपया आपण पूरà¥à¤£ शिकामोरà¥à¤¤à¤¬à¤¾à¤šà¥€ लिंक वापरलà¥à¤¯à¤¾à¤šà¥€ खातà¥à¤°à¥€ करा.'; $lang['resendpwdconfirm'] = 'शिकà¥à¤•ामोरà¥à¤¤à¤¬à¤¾à¤šà¥€ लिंक ईमेल दà¥à¤µà¤¾à¤°à¤¾ पाठवली आहे.'; $lang['resendpwdsuccess'] = 'शिकà¥à¤•ामोरà¥à¤¤à¤¬à¤¾à¤šà¥€ लिंक ईमेल दà¥à¤µà¤¾à¤°à¤¾ पाठवली आहे.'; $lang['license'] = 'विशिषà¥à¤ नोंद केलि नसलà¥à¤¯à¤¾à¤¸ हà¥à¤¯à¤¾ विकी वरील सरà¥à¤µ मजकूर खालील लायसनà¥à¤¸ मधे मोडतो : '; $lang['licenseok'] = 'नोंद : हे पृषà¥à¤ संपादित केलà¥à¤¯à¤¾à¤¸ तà¥à¤®à¥à¤¹à¥€ तà¥à¤®à¤šà¥‡ योगदान खालील लायसनà¥à¤¸ अंतरà¥à¤—त येइल : '; +$lang['searchmedia'] = 'फाईल शोधा:'; +$lang['searchmedia_in'] = '%s मधे शोधा'; $lang['txt_upload'] = 'अपलोड करणà¥à¤¯à¤¾à¤šà¥€ फाइल निवडा'; $lang['txt_filename'] = 'अपलोड उरà¥à¥ž ( वैकलà¥à¤ªà¤¿à¤• )'; $lang['txt_overwrt'] = 'असà¥à¤¤à¤¿à¤¤à¥à¤µà¤¾à¤¤ असलेलà¥à¤¯à¤¾ फाइलवरच सà¥à¤°à¤•à¥à¤·à¤¿à¤¤ करा.'; $lang['lockedby'] = 'सधà¥à¤¯à¤¾ लॉक करणारा :'; $lang['lockexpire'] = 'सधà¥à¤¯à¤¾ लॉक करणारा :'; -$lang['js']['willexpire'] = 'हे पृषà¥à¤ संपादित करणà¥à¤¯à¤¾à¤¸à¤¾à¤ ी मिळालेले लॉक à¤à¤–ादà¥à¤¯à¤¾ मिनिटात संपणार आहे.\n चà¥à¤•ा होऊ नयेत मà¥à¤¹à¤£à¥à¤¨ कृपया पà¥à¤°à¥€à¤µà¥à¤¯à¥‚ बटन दाबà¥à¤¨ लॉक ची वेळ पà¥à¤¨à¥à¤¹à¤¾ चालू करा.'; -$lang['js']['notsavedyet'] = "सà¥à¤°à¤•à¥à¤·à¤¿à¤¤ न केलेले बदल नषà¥à¤Ÿ होतील. नकà¥à¤•ी करू का ?"; +$lang['js']['willexpire'] = 'हे पृषà¥à¤ संपादित करणà¥à¤¯à¤¾à¤¸à¤¾à¤ ी मिळालेले लॉक à¤à¤–ादà¥à¤¯à¤¾ मिनिटात संपणार आहे.\n चà¥à¤•ा होऊ नयेत मà¥à¤¹à¤£à¥à¤¨ कृपया पà¥à¤°à¥€à¤µà¥à¤¯à¥‚ बटन दाबà¥à¤¨ लॉक ची वेळ पà¥à¤¨à¥à¤¹à¤¾ चालू करा.'; +$lang['js']['notsavedyet'] = 'सà¥à¤°à¤•à¥à¤·à¤¿à¤¤ न केलेले बदल नषà¥à¤Ÿ होतील. नकà¥à¤•ी करू का ?'; +$lang['js']['searchmedia'] = 'फाईलà¥à¤¸à¤¸à¤¾à¤ ी शोधा'; +$lang['js']['keepopen'] = 'निवड केलà¥à¤¯à¤¾à¤µà¤° विणà¥à¤¡à¥‹ उघडी ठेवा'; +$lang['js']['hidedetails'] = 'सविसà¥à¤¤à¤° मजकूर लपवा'; +$lang['js']['mediatitle'] = 'लिंक सेटिंग'; +$lang['js']['mediadisplay'] = 'लिंकचा पà¥à¤°à¤•ार'; +$lang['js']['mediaalign'] = 'जà¥à¤³à¤µà¤£à¥€'; +$lang['js']['mediasize'] = 'पà¥à¤°à¤¤à¤¿à¤®à¥‡à¤šà¤¾ आकार'; +$lang['js']['mediatarget'] = 'लिंकचे लकà¥à¤·à¥à¤¯'; +$lang['js']['mediaclose'] = 'बंद'; +$lang['js']['mediadisplayimg'] = 'पà¥à¤°à¤¤à¤¿à¤®à¤¾ दाखवा.'; +$lang['js']['mediadisplaylnk'] = 'फकà¥à¤¤ लिंक दाखवा.'; +$lang['js']['mediasmall'] = 'लहान आवृतà¥à¤¤à¥€'; +$lang['js']['mediamedium'] = 'माधà¥à¤¯à¤® आवृतà¥à¤¤à¥€'; +$lang['js']['medialarge'] = 'मोठी आवृतà¥à¤¤à¥€'; +$lang['js']['mediaoriginal'] = 'मूळ आवृतà¥à¤¤à¥€'; +$lang['js']['medialnk'] = 'सविसà¥à¤¤à¤° माहितीकडेची लिंक'; +$lang['js']['mediadirect'] = 'मूळ मजकà¥à¤°à¤¾à¤•डे थेट लिंक'; +$lang['js']['medianolnk'] = 'लिंक नको'; +$lang['js']['medianolink'] = 'पà¥à¤°à¤¤à¤¿à¤®à¤¾ लिंक करू नका'; +$lang['js']['medialeft'] = 'पà¥à¤°à¤¤à¤¿à¤®à¤¾ डावà¥à¤¯à¤¾ बाजूला जà¥à¤³à¤µà¥‚न घà¥à¤¯à¤¾.'; +$lang['js']['mediaright'] = 'पà¥à¤°à¤¤à¤¿à¤®à¤¾ उजवà¥à¤¯à¤¾ बाजूला जà¥à¤³à¤µà¥‚न घà¥à¤¯à¤¾.'; +$lang['js']['mediacenter'] = 'पà¥à¤°à¤¤à¤¿à¤®à¤¾ मधà¥à¤¯à¤à¤¾à¤—ी जà¥à¤³à¤µà¥‚न घà¥à¤¯à¤¾.'; +$lang['js']['medianoalign'] = 'जà¥à¤³à¤µà¤¾à¤œà¥à¤³à¤µ वापरू नका.'; +$lang['js']['nosmblinks'] = 'विनà¥à¤¡à¥‹à¤œà¤¼ शेअर ला लिंक केलà¥à¤¯à¤¾à¤¸ ते फकà¥à¤¤ मायकà¥à¤°à¥‹à¤¸à¥‰à¥žà¥à¤Ÿ इनà¥à¤Ÿà¤°à¤¨à¥‡à¤Ÿ à¤à¤•à¥à¤¸à¥à¤ªà¥à¤²à¥‹à¤°à¤° वरच चालते. तरी तà¥à¤®à¥à¤¹à¥€ लिंक कॉपी करू शकता.'; +$lang['js']['linkwiz'] = 'लिंक जादूगार'; +$lang['js']['linkto'] = 'याला लिंक करा:'; +$lang['js']['del_confirm'] = 'निवडलेलà¥à¤¯à¤¾ गोषà¥à¤Ÿà¥€ नकà¥à¤•ी नषà¥à¤Ÿ करू का ?'; +$lang['js']['restore_confirm'] = 'हि आवृतà¥à¤¤à¥€ खरोखर पà¥à¤¨à¤°à¥à¤¸à¥à¤¥à¤¾à¤ªà¤¿à¤¤ करू का?'; +$lang['js']['media_diff'] = 'फरक बघू:'; +$lang['js']['media_diff_both'] = 'बाजूबाजूला'; +$lang['js']['media_diff_portions'] = 'सà¥à¤µà¤¾à¤ˆà¤ª'; +$lang['js']['media_select'] = 'फाईल निवड...'; +$lang['js']['media_upload_btn'] = 'अपलोड'; +$lang['js']['media_done_btn'] = 'à¤à¤¾à¤²à¤‚'; +$lang['js']['media_drop'] = 'अपलोड करणà¥à¤¯à¤¾à¤¸à¤¾à¤ ी इथे फाईल टाका'; +$lang['js']['media_cancel'] = 'काढा'; $lang['rssfailed'] = 'ही पà¥à¤°à¤µà¤£à¥€ आणणà¥à¤¯à¤¾à¤¤ काही चूक à¤à¤¾à¤²à¥€:'; $lang['nothingfound'] = 'काही सापडला नाही.'; $lang['mediaselect'] = 'दृकशà¥à¤°à¤¾à¤µà¥à¤¯ फाइल'; @@ -111,9 +153,7 @@ $lang['deletefail'] = '%s ही फाइल नषà¥à¤Ÿ करू $lang['mediainuse'] = '%s ही फाइल नषà¥à¤Ÿ केली नाही - ती अजà¥à¤¨ वापरात आहे.'; $lang['namespaces'] = 'नेमसà¥à¤ªà¥‡à¤¸'; $lang['mediafiles'] = 'मधà¥à¤¯à¥‡ उपलबà¥à¤§ असलेलà¥à¤¯à¤¾ फाइल'; -$lang['js']['keepopen'] = 'निवड केलà¥à¤¯à¤¾à¤µà¤° विणà¥à¤¡à¥‹ उघडी ठेवा'; -$lang['js']['hidedetails'] = 'सविसà¥à¤¤à¤° मजकूर लपवा'; -$lang['js']['nosmblinks'] = 'विनà¥à¤¡à¥‹à¤œà¤¼ शेअर ला लिंक केलà¥à¤¯à¤¾à¤¸ ते फकà¥à¤¤ मायकà¥à¤°à¥‹à¤¸à¥‰à¥žà¥à¤Ÿ इनà¥à¤Ÿà¤°à¤¨à¥‡à¤Ÿ à¤à¤•à¥à¤¸à¥à¤ªà¥à¤²à¥‹à¤°à¤° वरच चालते. तरी तà¥à¤®à¥à¤¹à¥€ लिंक कॉपी करू शकता.'; +$lang['accessdenied'] = 'तà¥à¤®à¥à¤¹à¤¾à¤²à¤¾ हे पान बघायची परवानगी नाही.'; $lang['mediausage'] = 'हà¥à¤¯à¤¾ फाइलचा संदरà¥à¤ देणà¥à¤¯à¤¾à¤¸à¤¾à¤ ी खालील सिनà¥à¤Ÿà¥…कà¥à¤¸ वापरा :'; $lang['mediaview'] = 'मूळ फाइल बघू '; $lang['mediaroot'] = 'रूट'; @@ -129,6 +169,10 @@ $lang['current'] = 'चालू'; $lang['yours'] = 'तà¥à¤®à¤šà¥€ आवृतà¥à¤¤à¤¿'; $lang['diff'] = 'सधà¥à¤¯à¤¾à¤šà¥à¤¯à¤¾ आवृतà¥à¤¤à¤¿à¤‚शी फरक दाखवा'; $lang['diff2'] = 'निवडलेलà¥à¤¯à¤¾ आवृतà¥à¤¤à¤¿à¤‚मधील फरक दाखवा'; +$lang['difflink'] = 'हà¥à¤¯à¤¾ तà¥à¤²à¤¨à¤¾ दृषà¥à¤Ÿà¥€à¤•ोनाला लिंक करा'; +$lang['diff_type'] = 'फरक बघू:'; +$lang['diff_inline'] = 'à¤à¤•ा ओळीत'; +$lang['diff_side'] = 'बाजूबाजूला'; $lang['line'] = 'ओळ'; $lang['breadcrumb'] = 'मागमूस'; $lang['youarehere'] = 'तà¥à¤®à¥à¤¹à¥€ इथे आहात'; @@ -140,10 +184,21 @@ $lang['restored'] = 'जà¥à¤¨à¥€ आवृतà¥à¤¤à¤¿ पà¥à¤¨ $lang['external_edit'] = 'बाहेरून संपादित'; $lang['summary'] = 'सारांश बदला'; $lang['noflash'] = 'ही माहिती दाखवणà¥à¤¯à¤¾à¤¸à¤¾à¤ ी <a href="http://www.adobe.com/products/flashplayer/">अडोब फà¥à¤²à¥…श पà¥à¤²à¥‡à¤…र</a> ची गरज आहे.'; +$lang['download'] = 'तà¥à¤•डा डाउनलोड करा'; +$lang['tools'] = 'साधने'; +$lang['user_tools'] = 'यà¥à¤œà¤°à¤šà¥€ साधने'; +$lang['site_tools'] = 'साईटची साधने'; +$lang['page_tools'] = 'पानाची साधने'; +$lang['skip_to_content'] = 'सरळ मजकà¥à¤°à¤¾à¤•डे '; $lang['mail_newpage'] = 'पृषà¥à¤ जोडले : '; $lang['mail_changed'] = 'पृषà¥à¤ बदलले : '; +$lang['mail_subscribe_list'] = 'हà¥à¤¯à¤¾ नेमसà¥à¤ªà¥‡à¤¸ नाढे बदललेली पाने:'; $lang['mail_new_user'] = 'नवीन सदसà¥à¤¯ : '; $lang['mail_upload'] = 'फाइल अपलोड केली : '; +$lang['changes_type'] = 'हà¥à¤¯à¤¾à¤šà¥‡ बदल बघू'; +$lang['pages_changes'] = 'पाने'; +$lang['media_changes'] = 'मिडिया फाईल'; +$lang['both_changes'] = 'पाने आणि मिडिया फाईल दोनà¥à¤¹à¥€'; $lang['qb_bold'] = 'ठळक मजकूर'; $lang['qb_italic'] = 'तिरका मजकूर'; $lang['qb_underl'] = 'अधोरेखित मजकूर'; @@ -154,6 +209,11 @@ $lang['qb_h2'] = 'दà¥à¤¸à¤°à¥à¤¯à¤¾ पातळीचे $lang['qb_h3'] = 'तिसरà¥à¤¯à¤¾ पातळीचे शीरà¥à¤·à¤•'; $lang['qb_h4'] = 'चवथà¥à¤¯à¤¾ पातळीचे शीरà¥à¤·à¤•'; $lang['qb_h5'] = 'पाचवà¥à¤¯à¤¾ पातळीचे शीरà¥à¤·à¤•'; +$lang['qb_h'] = 'शीरà¥à¤·à¤•'; +$lang['qb_hs'] = 'शीरà¥à¤·à¤• निवड'; +$lang['qb_hplus'] = 'उंच शीरà¥à¤·à¤•'; +$lang['qb_hminus'] = 'खालचं शीरà¥à¤·à¤•'; +$lang['qb_hequal'] = 'समान लेवलचे शीरà¥à¤·à¤•'; $lang['qb_link'] = 'अंतरà¥à¤—त लिंक'; $lang['qb_extlink'] = 'बाहà¥à¤¯ लिंक'; $lang['qb_hr'] = 'आडवी पटà¥à¤Ÿà¥€'; @@ -163,7 +223,7 @@ $lang['qb_media'] = 'पà¥à¤°à¤¤à¤¿à¤®à¤¾ आणि इतर फ $lang['qb_sig'] = 'सà¥à¤µà¤¾à¤•à¥à¤·à¤°à¥€ टाका'; $lang['qb_smileys'] = 'सà¥à¤®à¤¾à¤‡à¤²à¥€'; $lang['qb_chars'] = 'ख़ास चिनà¥à¤¹'; -$lang['js']['del_confirm'] = 'निवडलेलà¥à¤¯à¤¾ गोषà¥à¤Ÿà¥€ नकà¥à¤•ी नषà¥à¤Ÿ करू का ?'; +$lang['upperns'] = 'हà¥à¤¯à¤¾à¤µà¤°à¤šà¥à¤¯à¤¾ नेमसà¥à¤ªà¥‡à¤¸à¤•डे उडी मारा'; $lang['admin_register'] = 'नवीन सदसà¥à¤¯'; $lang['metaedit'] = 'मेटाडेटा बदला'; $lang['metasaveerr'] = 'मेटाडेटा सà¥à¤°à¤•à¥à¤·à¤¿à¤¤ à¤à¤¾à¤²à¤¾ नाही'; @@ -179,11 +239,9 @@ $lang['img_copyr'] = 'कॉपीराइट'; $lang['img_format'] = 'पà¥à¤°à¤•ार'; $lang['img_camera'] = 'कॅमेरा'; $lang['img_keywords'] = 'मà¥à¤–à¥à¤¯ शबà¥à¤¦'; -$lang['subscribe_success'] = '%s ला %s चà¥à¤¯à¤¾ पà¥à¤°à¤µà¤£à¤¿à¤¸à¤¾à¤ ि नोंदवले'; -$lang['subscribe_error'] = '%s ला %s चà¥à¤¯à¤¾ पà¥à¤°à¤µà¤£à¤¿à¤¸à¤¾à¤ ि नोंदवताना चूक à¤à¤¾à¤²à¥€'; -$lang['subscribe_noaddress'] = 'तà¥à¤®à¤šà¥à¤¯à¤¾ लॉगिनशी समà¥à¤¬à¤‚धित कà¥à¤ लाही पतà¥à¤¤à¤¾ नाही , तà¥à¤¯à¤¾à¤®à¥à¤³à¥‡ पà¥à¤°à¤µà¤£à¤¿à¤¸à¤¾à¤ ि नोंद केली जाऊ शकत नाही'; -$lang['unsubscribe_success'] = '%s ला %s चà¥à¤¯à¤¾ पà¥à¤°à¤µà¤£à¥€ यादी मधून काढून टाकले'; -$lang['unsubscribe_error'] = '%s ला %s चà¥à¤¯à¤¾ पà¥à¤°à¤µà¤£à¥€ यादी मधून काढून टाकणà¥à¤¯à¤¾à¤¤ चूक à¤à¤¾à¤²à¥€'; +$lang['img_width'] = 'रà¥à¤‚दी'; +$lang['img_height'] = 'उंची'; +$lang['img_manager'] = 'मिडिया वà¥à¤¯à¤µà¤¸à¥à¤¥à¤¾à¤ªà¤•ात बघू'; $lang['authmodfailed'] = 'सदसà¥à¤¯ अधिकृत करणà¥à¤¯à¤¾à¤šà¥€ वà¥à¤¯à¤µà¤¸à¥à¤¥à¤¾ चà¥à¤•ीची आहे. कृपया तà¥à¤®à¤šà¥à¤¯à¤¾ विकीचà¥à¤¯à¤¾ वà¥à¤¯à¤µà¤¸à¥à¤¥à¤¾à¤ªà¤•ाशी समà¥à¤ªà¤°à¥à¤• साधा.'; $lang['authtempfail'] = 'सदसà¥à¤¯ अधिकृत करणà¥à¤¯à¤¾à¤šà¥€ सà¥à¤µà¤¿à¤§à¤¾ सधà¥à¤¯à¤¾ चालू नाही. सतत हा मजकूर दिसलà¥à¤¯à¤¾à¤¸ कृपया तà¥à¤®à¤šà¥à¤¯à¤¾ विकीचà¥à¤¯à¤¾ वà¥à¤¯à¤µà¤¸à¥à¤¥à¤¾à¤ªà¤•ाशी समà¥à¤ªà¤°à¥à¤• साधा.'; $lang['i_chooselang'] = 'तà¥à¤®à¤šà¥€ à¤à¤¾à¤·à¤¾ निवडा'; diff --git a/inc/lang/nl/edit.txt b/inc/lang/nl/edit.txt index e539050bc9aa05bb750c11b4fe38acf5cd3b5f95..9718d09001f5575cb8ccc7d4dbc4e526be0cf681 100644 --- a/inc/lang/nl/edit.txt +++ b/inc/lang/nl/edit.txt @@ -1 +1 @@ -Pas de pagina aan en klik op ''Opslaan''. Zie [[wiki:syntax]] voor de Wiki syntax. Pas de pagina allen aan als hij **verbeterd** kan worden. Als je iets wilt uitproberen kun je spelen in de [[playground:playground|zandbak]]. +Pas de pagina aan en klik op ''Opslaan''. Zie [[wiki:syntax]] voor de Wiki-syntax. Pas de pagina allen aan als hij **verbeterd** kan worden. Als je iets wilt uitproberen kun je spelen in de [[playground:playground|zandbak]]. diff --git a/inc/lang/nl/lang.php b/inc/lang/nl/lang.php index 4644f5e5d501d3c669ce2a5dfacf7559828f0333..911ffdc106dd84d945d6257bc719bce072206d8d 100644 --- a/inc/lang/nl/lang.php +++ b/inc/lang/nl/lang.php @@ -51,6 +51,7 @@ $lang['btn_backtomedia'] = 'Terug naar Bestandsselectie'; $lang['btn_subscribe'] = 'Inschrijven wijzigingen'; $lang['btn_profile'] = 'Profiel aanpassen'; $lang['btn_reset'] = 'Wissen'; +$lang['btn_resendpwd'] = 'Nieuw wachtwoord bepalen'; $lang['btn_draft'] = 'Bewerk concept'; $lang['btn_recover'] = 'Herstel concept'; $lang['btn_draftdel'] = 'Verwijder concept'; @@ -87,6 +88,7 @@ $lang['profnoempty'] = 'Een lege gebruikersnaam of e-mailadres is niet $lang['profchanged'] = 'Gebruikersprofiel succesvol aangepast'; $lang['pwdforget'] = 'Je wachtwoord vergeten? Vraag een nieuw wachtwoord aan'; $lang['resendna'] = 'Deze wiki ondersteunt het verzenden van wachtwoorden niet'; +$lang['resendpwd'] = 'Nieuw wachtwoord bepalen voor'; $lang['resendpwdmissing'] = 'Sorry, je moet alle velden invullen.'; $lang['resendpwdnouser'] = 'Sorry, we kunnen deze gebruikersnaam niet vinden in onze database.'; $lang['resendpwdbadauth'] = 'Sorry, deze authentiecatiecode is niet geldig. Controleer of je de volledige bevestigings-link hebt gebruikt.'; @@ -99,6 +101,7 @@ $lang['searchmedia_in'] = 'Zoek in %s'; $lang['txt_upload'] = 'Selecteer een bestand om te uploaden'; $lang['txt_filename'] = 'Vul nieuwe naam in (optioneel)'; $lang['txt_overwrt'] = 'Overschrijf bestaand bestand'; +$lang['maxuploadsize'] = 'Max %s per bestand'; $lang['lockedby'] = 'Momenteel in gebruik door'; $lang['lockexpire'] = 'Exclusief gebruiksrecht vervalt op'; $lang['js']['willexpire'] = 'Je exclusieve gebruiksrecht voor het aanpassen van deze pagina verloopt over een minuut.\nKlik op de Voorbeeld-knop om het exclusieve gebruiksrecht te verlengen.'; @@ -193,6 +196,11 @@ $lang['external_edit'] = 'Externe bewerking'; $lang['summary'] = 'Samenvatting wijziging'; $lang['noflash'] = 'De <a href="http://www.adobe.com/products/flashplayer/">Adobe Flash Plugin</a> is vereist om de pagina te kunnen weergeven.'; $lang['download'] = 'Download fragment'; +$lang['tools'] = 'Hulpmiddelen'; +$lang['user_tools'] = 'Gebruikershulpmiddelen'; +$lang['site_tools'] = 'Site-hulpmiddelen'; +$lang['page_tools'] = 'Paginahulpmiddelen'; +$lang['skip_to_content'] = 'spring naar tekst'; $lang['mail_newpage'] = 'pagina toegevoegd:'; $lang['mail_changed'] = 'pagina aangepast:'; $lang['mail_subscribe_list'] = 'Pagina\'s veranderd in namespace:'; @@ -200,8 +208,8 @@ $lang['mail_new_user'] = 'nieuwe gebruiker:'; $lang['mail_upload'] = 'bestand geüpload:'; $lang['changes_type'] = 'Bekijk wijzigingen van'; $lang['pages_changes'] = 'Pagina\'s'; -$lang['media_changes'] = 'Media bestanden'; -$lang['both_changes'] = 'Zowel pagina\'s als media bestanden'; +$lang['media_changes'] = 'Mediabestanden'; +$lang['both_changes'] = 'Zowel pagina\'s als mediabestanden'; $lang['qb_bold'] = 'Vette tekst'; $lang['qb_italic'] = 'Cursieve tekst'; $lang['qb_underl'] = 'Onderstreepte tekst'; @@ -244,7 +252,7 @@ $lang['img_camera'] = 'Camera'; $lang['img_keywords'] = 'Trefwoorden'; $lang['img_width'] = 'Breedte'; $lang['img_height'] = 'Hoogte'; -$lang['img_manager'] = 'In media beheerder bekijken'; +$lang['img_manager'] = 'In mediabeheerder bekijken'; $lang['subscr_subscribe_success'] = '%s is ingeschreven voor %s'; $lang['subscr_subscribe_error'] = 'Fout bij inschrijven van %s voor %s'; $lang['subscr_subscribe_noaddress'] = 'Er is geen emailadres geassocieerd met uw account, u kunt daardoor niet worden ingeschreven.'; @@ -263,6 +271,7 @@ $lang['subscr_style_digest'] = 'Samenvattings-email met wijzigingen per pagina $lang['subscr_style_list'] = 'Lijst van veranderde pagina\'s sinds laatste email (elke %.2f dagen)'; $lang['authmodfailed'] = 'Ongeldige gebruikersauthenticatie-configuratie. Informeer de wikibeheerder.'; $lang['authtempfail'] = 'Gebruikersauthenticatie is tijdelijk niet beschikbaar. Als deze situatie zich blijft voordoen, informeer dan de wikibeheerder.'; +$lang['authpwdexpire'] = 'Je wachtwoord verloopt in %d dagen, je moet het binnenkort veranderen'; $lang['i_chooselang'] = 'Kies je taal'; $lang['i_installer'] = 'DokuWiki Installer'; $lang['i_wikiname'] = 'Wikinaam'; @@ -304,7 +313,7 @@ $lang['media_list_thumbs'] = 'Miniatuurweergaven'; $lang['media_list_rows'] = 'Regels'; $lang['media_sort_name'] = 'Naam'; $lang['media_sort_date'] = 'Datum'; -$lang['media_namespaces'] = 'Kies naamruimte'; +$lang['media_namespaces'] = 'Kies namespace'; $lang['media_files'] = 'Bestanden in %s'; $lang['media_upload'] = 'Upload naar %s'; $lang['media_search'] = 'Zoeken in %s'; diff --git a/inc/lang/nl/mailwrap.html b/inc/lang/nl/mailwrap.html new file mode 100644 index 0000000000000000000000000000000000000000..2ffe19a88b839c8984ae84b27830249e9c5133a2 --- /dev/null +++ b/inc/lang/nl/mailwrap.html @@ -0,0 +1,13 @@ +<html> + <head> + <title>@TITLE@</title> + <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> + </head> + <body> + + @HTMLBODY@ + + <br /><hr /> + <small>Deze mail is gegenereerd door DokuWiki op @DOKUWIKIURL@.</small> + </body> + </html> \ No newline at end of file diff --git a/inc/lang/pl/lang.php b/inc/lang/pl/lang.php index 3bde240d9e84e881e4daef008704dd297b8b6bf1..79d18bbf555f9203770d168e076b497d6362b3e9 100644 --- a/inc/lang/pl/lang.php +++ b/inc/lang/pl/lang.php @@ -13,6 +13,7 @@ * @author Grzegorz WidÅ‚a <dzesdzes@gmail.com> * @author Åukasz Chmaj <teachmeter@gmail.com> * @author Begina Felicysym <begina.felicysym@wp.eu> + * @author Aoi Karasu <aoikarasu@gmail.com> */ $lang['encoding'] = 'utf-8'; $lang['direction'] = 'ltr'; @@ -48,6 +49,7 @@ $lang['btn_backtomedia'] = 'Powrót do wyboru pliku'; $lang['btn_subscribe'] = 'Subskrybuj zmiany'; $lang['btn_profile'] = 'Aktualizuj profil'; $lang['btn_reset'] = 'Resetuj'; +$lang['btn_resendpwd'] = 'Podaj nowe hasÅ‚o'; $lang['btn_draft'] = 'Edytuj szkic'; $lang['btn_recover'] = 'Przywróć szkic'; $lang['btn_draftdel'] = 'UsuÅ„ szkic'; @@ -84,6 +86,7 @@ $lang['profnoempty'] = 'Pusta nazwa lub adres e-mail nie dozwolone.'; $lang['profchanged'] = 'Zaktualizowano profil użytkownika.'; $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'; $lang['resendpwdmissing'] = 'WypeÅ‚nij wszystkie pola.'; $lang['resendpwdnouser'] = 'Nie można znaleźć tego użytkownika w bazie danych.'; $lang['resendpwdbadauth'] = 'Błędny kod autoryzacji! Upewnij siÄ™, że użyÅ‚eÅ›(aÅ›) wÅ‚aÅ›ciwego odnoÅ›nika.'; @@ -96,6 +99,7 @@ $lang['searchmedia_in'] = 'Szukaj w %s'; $lang['txt_upload'] = 'Wybierz plik do wysÅ‚ania'; $lang['txt_filename'] = 'Nazwa pliku (opcjonalnie)'; $lang['txt_overwrt'] = 'Nadpisać istniejÄ…cy plik?'; +$lang['maxuploadsize'] = 'Maksymalny rozmiar wysyÅ‚anych danych wynosi %s dla jednego pliku.'; $lang['lockedby'] = 'Aktualnie zablokowane przez'; $lang['lockexpire'] = 'Blokada wygasa'; $lang['js']['willexpire'] = 'Twoja blokada edycji tej strony wygaÅ›nie w ciÄ…gu minuty. \nW celu unikniÄ™cia konfliktów użyj przycisku podglÄ…du aby odnowić blokadÄ™.'; @@ -265,6 +269,7 @@ $lang['subscr_style_digest'] = 'email ze streszczeniem zmian dla każdej ze st $lang['subscr_style_list'] = 'lista zmienionych stron od czasu ostatniego emaila'; $lang['authmodfailed'] = 'Błąd uwierzytelnienia. Powiadom administratora tego wiki.'; $lang['authtempfail'] = 'Uwierzytelnienie użytkownika jest w tej chwili niemożliwe. JeÅ›li ta sytuacja siÄ™ powtórzy, powiadom administratora tego wiki.'; +$lang['authpwdexpire'] = 'Twoje hasÅ‚o wygaÅ›nie za %d dni. Należy je zmienić w krótkim czasie.'; $lang['i_chooselang'] = 'Wybierz jÄ™zyk'; $lang['i_installer'] = 'Instalator DokuWiki'; $lang['i_wikiname'] = 'Nazwa Wiki'; diff --git a/inc/lang/pl/mailwrap.html b/inc/lang/pl/mailwrap.html new file mode 100644 index 0000000000000000000000000000000000000000..61772866e122d38a2c3eefcb5c88907e019327ab --- /dev/null +++ b/inc/lang/pl/mailwrap.html @@ -0,0 +1,13 @@ +<html> +<head> +<title>@TITLE@</title> +<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> +</head> +<body> + +@HTMLBODY@ + +<br /><hr /> +<small>Ta wiadomość zostaÅ‚a wygenerowana przez DokuWiki na @DOKUWIKIURL@.</small> +</body> +</html> \ No newline at end of file diff --git a/inc/lang/pl/resetpwd.txt b/inc/lang/pl/resetpwd.txt new file mode 100644 index 0000000000000000000000000000000000000000..64d2d7d47ef78b0545332ce6db69ce09a657aa0d --- /dev/null +++ b/inc/lang/pl/resetpwd.txt @@ -0,0 +1,3 @@ +====== Ustalenie nowego hasÅ‚a ====== + +Podaj, proszÄ™, nowe hasÅ‚o do Twojego konta w tym wiki. \ No newline at end of file diff --git a/inc/lang/ro/lang.php b/inc/lang/ro/lang.php index 21a6ecef4b5a9db44d0d0acad04790938545f4b9..41727e52125a16e73df8ee36d52388e318dc4d06 100644 --- a/inc/lang/ro/lang.php +++ b/inc/lang/ro/lang.php @@ -9,6 +9,7 @@ * @author Emanuel-Emeric AndraÅŸi <em.andrasi@mandrivausers.ro> * @author Marius OLAR <olarmariusalex@gmail.com> * @author Marius Olar <olarmariusalex@yahoo.com> + * @author Emanuel-Emeric AndraÈ™i <em.andrasi@mandrivausers.ro> */ $lang['encoding'] = 'utf-8'; $lang['direction'] = 'ltr'; @@ -44,6 +45,7 @@ $lang['btn_backtomedia'] = 'ÃŽnapoi la SelecÅ£ia Mediafile'; $lang['btn_subscribe'] = 'Subscrie Modificarea Paginii'; $lang['btn_profile'] = 'Actualizează Profil'; $lang['btn_reset'] = 'Resetează'; +$lang['btn_resendpwd'] = 'Setează o parolă nouă'; $lang['btn_draft'] = 'Editează schiţă'; $lang['btn_recover'] = 'Recuperează schiţă'; $lang['btn_draftdel'] = 'Åžterge schiţă'; @@ -80,6 +82,7 @@ $lang['profnoempty'] = 'Nu sunt admise numele sau adresa de email neco $lang['profchanged'] = 'Profilul de utilizator a fost actualizat succes.'; $lang['pwdforget'] = 'Parola uitată? LuaÅ£i una nouă'; $lang['resendna'] = 'Această wiki nu suportă retrimiterea parolei.'; +$lang['resendpwd'] = 'Setează o parolă nouă pentru'; $lang['resendpwdmissing'] = 'Ne pare rău, trebuie completate toate câmpurile.'; $lang['resendpwdnouser'] = 'Ne pare rău, acest utilizator nu poate fi găsit în baza de date.'; $lang['resendpwdbadauth'] = 'Ne pare rău, acest cod de autorizare nu este corect. VerificaÅ£i dacă aÅ£i folosit tot link-ul de confirmare.'; @@ -186,6 +189,11 @@ $lang['external_edit'] = 'editare externă'; $lang['summary'] = 'Editează sumarul'; $lang['noflash'] = 'Plugin-ul <a href="http://www.adobe.com/products/flashplayer/">Adobe Flash Plugin</a> este necesar pentru afiÅŸarea corectă a conÅ£inutului.'; $lang['download'] = 'Bloc descărcări'; +$lang['tools'] = 'Unelte'; +$lang['user_tools'] = 'Unelte utilizator'; +$lang['site_tools'] = 'Unelte Site'; +$lang['page_tools'] = 'Unelte Pagină'; +$lang['skip_to_content'] = 'sari la conÈ›inut'; $lang['mail_newpage'] = 'pagina adăugată:'; $lang['mail_changed'] = 'page schimbată:'; $lang['mail_subscribe_list'] = 'pagini modificate în spaÅ£iul de nume:'; @@ -256,6 +264,7 @@ $lang['subscr_style_digest'] = 'digerează email la schimbări pentru fiecare $lang['subscr_style_list'] = 'lista paginilor schimbate de la ultimul email (la fiecare %.2f zile)'; $lang['authmodfailed'] = 'ConfiguraÅ£ia autentificării utilizatorului este eronată. AnunÅ£aÅ£i Wiki Admin-ul.'; $lang['authtempfail'] = 'Autentificarea utilizatorului este temporar indisponibilă. AnunÅ£aÅ£i Wiki Admin-ul.'; +$lang['authpwdexpire'] = 'Parola vă va expira în %d zile, ar trebui să o schimbaÈ›i curând.'; $lang['i_chooselang'] = 'AlegeÅ£i limba'; $lang['i_installer'] = 'DokuWiki Installer'; $lang['i_wikiname'] = 'Numele Wiki'; diff --git a/inc/lang/ro/resetpwd.txt b/inc/lang/ro/resetpwd.txt new file mode 100644 index 0000000000000000000000000000000000000000..2eb8052f145b01f9159e19d8f1727b5c760effba --- /dev/null +++ b/inc/lang/ro/resetpwd.txt @@ -0,0 +1,3 @@ +====== Setează parolă nouă ====== + +Vă rugăm să introduceÈ›i o nouă parolă pentru contul dvs. pe acest wiki. \ No newline at end of file diff --git a/inc/lang/uk/install.html b/inc/lang/uk/install.html index 084da8662cebed6bc0f92ddf78f5c7946fa48d87..0c4a3254438e5c7afc896e0ec24128b0f5c70111 100644 --- a/inc/lang/uk/install.html +++ b/inc/lang/uk/install.html @@ -1,4 +1,4 @@ -<p>Ð¦Ñ Ñторінка допомагає при першій уÑтановці та наÑтройці <a href="http://dokuwiki.org">ДокуВікі</a>. +<p>Ð¦Ñ Ñторінка допомагає при першій уÑтановці та налаштуванні <a href="http://dokuwiki.org">ДокуВікі</a>. Більше інформації про програму уÑтановки можна знайти на <a href="http://dokuwiki.org/installer">Ñторінці документації</a>.</p> <p>ДокуВікі викориÑтовую звичайні файли Ð´Ð»Ñ Ð·Ð±ÐµÑ€Ñ–Ð³Ð°Ð½Ð½Ñ Ñторінок вікі та іншої інформації, diff --git a/inc/lang/uk/lang.php b/inc/lang/uk/lang.php index 28756e2a1597d3ee5a25f1e949d12ffeaa6022ab..b06cb91583bd2195fb19cc5fe50e675f0fb7d279 100644 --- a/inc/lang/uk/lang.php +++ b/inc/lang/uk/lang.php @@ -28,7 +28,7 @@ $lang['btn_top'] = 'ПовернутиÑÑ Ð½Ð°Ð²ÐµÑ€Ñ…'; $lang['btn_newer'] = '<< більш нові'; $lang['btn_older'] = 'більш Ñтарі >>'; $lang['btn_revs'] = 'Старі ревізії'; -$lang['btn_recent'] = 'Ðедавні зміни'; +$lang['btn_recent'] = 'ОÑтанні зміни'; $lang['btn_upload'] = 'Завантажити'; $lang['btn_cancel'] = 'СкаÑувати'; $lang['btn_index'] = 'ЗміÑÑ‚'; @@ -37,7 +37,7 @@ $lang['btn_login'] = 'Увійти'; $lang['btn_logout'] = 'Вийти'; $lang['btn_admin'] = 'КеруваннÑ'; $lang['btn_update'] = 'Оновити'; -$lang['btn_delete'] = 'Знищити'; +$lang['btn_delete'] = 'Видалити'; $lang['btn_back'] = 'Ðазад'; $lang['btn_backlink'] = 'ПоÑÐ¸Ð»Ð°Ð½Ð½Ñ Ñюди'; $lang['btn_backtomedia'] = 'Ðазад до вибору медіа-файлу'; @@ -49,6 +49,7 @@ $lang['btn_recover'] = 'Відновити чернетку'; $lang['btn_draftdel'] = 'Знищити чернетку'; $lang['btn_revert'] = 'Відновити'; $lang['btn_register'] = 'РеєÑтраціÑ'; +$lang['btn_apply'] = 'ЗаÑтоÑувати'; $lang['loggedinas'] = 'Ви'; $lang['user'] = 'КориÑтувач'; $lang['pass'] = 'Пароль'; @@ -92,7 +93,7 @@ $lang['txt_filename'] = 'Завантажити Ñк (не обов\'Ñ $lang['txt_overwrt'] = 'ПерезапиÑати Ñ–Ñнуючий файл'; $lang['lockedby'] = 'Заблоковано'; $lang['lockexpire'] = 'Ð‘Ð»Ð¾ÐºÑƒÐ²Ð°Ð½Ð½Ñ Ð·Ð°Ð²ÐµÑ€ÑˆÑƒÑ”Ñ‚ÑŒÑÑ Ð²'; -$lang['js']['willexpire'] = 'Ð‘Ð»Ð¾ÐºÑƒÐ²Ð°Ð½Ð½Ñ Ñ€ÐµÐ´Ð°Ð³ÑƒÐ²Ð°Ð½Ð½Ñ Ñ†Ñ–Ñ”Ñ— Ñторінки закінчуєтьÑÑ Ñ‡ÐµÑ€ÐµÐ· хвилину.\n Щоб уникнути конфліктів викориÑтовуйте кнопку переглÑду Ð´Ð»Ñ Ð¿Ñ€Ð¾Ð´Ð¾Ð²Ð¶ÐµÐ½Ð½Ñ Ð±Ð»Ð¾ÐºÑƒÐ²Ð°Ð½Ð½Ñ.'; +$lang['js']['willexpire'] = 'Ð‘Ð»Ð¾ÐºÑƒÐ²Ð°Ð½Ð½Ñ Ñ€ÐµÐ´Ð°Ð³ÑƒÐ²Ð°Ð½Ð½Ñ Ñ†Ñ–Ñ”Ñ— Ñторінки закінчуєтьÑÑ Ñ‡ÐµÑ€ÐµÐ· хвилину.\n Щоб уникнути конфліктів викориÑтовуйте кнопку переглÑду Ð´Ð»Ñ Ð¿Ñ€Ð¾Ð´Ð¾Ð²Ð¶ÐµÐ½Ð½Ñ Ð±Ð»Ð¾ÐºÑƒÐ²Ð°Ð½Ð½Ñ.'; $lang['js']['notsavedyet'] = 'Ðезбережені зміни будуть втрачені. ДійÑно продовжити?'; $lang['js']['searchmedia'] = 'Шукати файли'; @@ -234,7 +235,7 @@ $lang['subscr_m_receive'] = 'Отримувати'; $lang['subscr_style_every'] = 'повідомлÑти на пошту про кожну зміну'; $lang['subscr_style_digest'] = 'лиÑÑ‚ з дайджеÑтом Ð´Ð»Ñ Ð·Ð¼Ñ–Ð½Ð¸ кожної Ñторінки (кожні %.2f днів)'; $lang['subscr_style_list'] = 'ÑпиÑок змінених Ñторінок від чаÑу Ð¾Ñ‚Ñ€Ð¸Ð¼Ð°Ð½Ð½Ñ Ð¾Ñтаннього лиÑта (кожні %.2f днів)'; -$lang['authmodfailed'] = 'Ðеправильна наÑтройка автентифікації кориÑтувача. Будь лаÑка, повідомте про це адмініÑтратора.'; +$lang['authmodfailed'] = 'Ðеправильні Ð½Ð°Ð»Ð°ÑˆÑ‚ÑƒÐ²Ð°Ð½Ð½Ñ Ð°Ð²Ñ‚ÐµÐ½Ñ‚Ð¸Ñ„Ñ–ÐºÐ°Ñ†Ñ–Ñ— кориÑтувача. Будь лаÑка, повідомте про це адмініÑтратора.'; $lang['authtempfail'] = 'ÐÐ²Ñ‚ÐµÐ½Ñ‚Ð¸Ñ„Ñ–ÐºÐ°Ñ†Ñ–Ñ ÐºÐ¾Ñ€Ð¸Ñтувача тимчаÑово не доÑтупна. Якщо це буде продовжуватиÑÑŒ, будь лаÑка, повідомте адмініÑтратора.'; $lang['i_chooselang'] = 'Виберіть мову'; $lang['i_installer'] = 'Програма уÑтановки ДокуВікі'; @@ -251,7 +252,7 @@ $lang['i_confexists'] = '<code>%s</code> вже Ñ–Ñнує'; $lang['i_writeerr'] = 'Ðеможливо Ñтворити <code>%s</code>. Ðеобхідно перевірити права доÑтупа Ð´Ð»Ñ Ñ„Ð°Ð¹Ð»Ñƒ/папки та Ñтворити файл вручну.'; $lang['i_badhash'] = 'Ðевпізнаний або модифікований dokuwiki.php (hash=<code>%s</code>)'; $lang['i_badval'] = '<code>%s</code> - невірне або пуÑте значеннÑ.'; -$lang['i_success'] = 'ÐаÑтройку завершено. Ми можете знищити файл install.php. +$lang['i_success'] = 'ÐÐ°Ð»Ð°ÑˆÑ‚ÑƒÐ²Ð°Ð½Ð½Ñ Ð·Ð°Ð²ÐµÑ€ÑˆÐµÐ½Ð¾. Ви можете знищити файл install.php. Перейдіть до <a href="doku.php">вашої нової ДокуВікі</a>'; $lang['i_failure'] = 'При збереженні файлу конфігурації виникли помилки. Можливо вам доведетьÑÑ Ð²Ð¸Ð¿Ñ€Ð°Ð²Ð¸Ñ‚Ð¸ Ñ—Ñ… ÑамоÑтійно до початку викориÑÑ‚Ð°Ð½Ð½Ñ <a href="doku.php">вашої нової ДокуВікі</a>.'; diff --git a/inc/lang/vi/backlinks.txt b/inc/lang/vi/backlinks.txt index 231ab5d8c43ff92ceeb2692e635406c9a93b7d20..eee624d964c5670191843d3fffd982934b45497e 100644 --- a/inc/lang/vi/backlinks.txt +++ b/inc/lang/vi/backlinks.txt @@ -1,3 +1,3 @@ -====== Nối vá» trước ====== +====== Liên kết đến trang vừa xem ====== -Äây là danh sách các trang hình như đã nối và o trang nà y. +Äây là danh sách các trang có liên kết đến trang vừa xem. diff --git a/inc/lang/vi/conflict.txt b/inc/lang/vi/conflict.txt index 0df1ddbe4015290c43577060d5fc8657fa7a1c75..646dcbc4526b06d93f4f18325490cf60ae84c3c6 100644 --- a/inc/lang/vi/conflict.txt +++ b/inc/lang/vi/conflict.txt @@ -2,4 +2,4 @@ Trang bạn Ä‘ang biên soạn có má»™t phiên bản má»›i hÆ¡n. Việc nà y xảy ra khi má»™t bạn đổi trang ấy khi bạn Ä‘ang biên soạn trang nà y. -Xem kỹ những thay đổi dưới đây, rồi quyết định giữ phiên bản nà o. Nếu chá»n ''bảo lưu'', phiên bản cá»§a bạn được giữ lại. Bấm ''huá»·'' để giữ phiên bản kia. +Xem kỹ những thay đổi dưới đây, rồi quyết định giữ phiên bản nà o. Nếu chá»n ''Lưu'', phiên bản cá»§a bạn được giữ lại. Bấm ''huá»·'' để giữ phiên bản kia. diff --git a/inc/lang/vi/denied.txt b/inc/lang/vi/denied.txt index e70ed5d5f79c93a191e45683e056e7f158a91655..35acaeb62a36a6d456067a11bd9bee74c80c6467 100644 --- a/inc/lang/vi/denied.txt +++ b/inc/lang/vi/denied.txt @@ -1,3 +1,3 @@ ====== Không được phép và o ====== -Rất tiếc là bạn không được phép để tiếp tục. Bạn quen đăng nháºp hay sao? +Rất tiếc là bạn không được phép để tiếp tục. Bạn quên đăng nháºp hay sao? diff --git a/inc/lang/vi/edit.txt b/inc/lang/vi/edit.txt index b00316a7cb8a6a28db7af37230b9bdb6a626bd6f..1c16f903c91a1b8d5a59735314f1c94027939404 100644 --- a/inc/lang/vi/edit.txt +++ b/inc/lang/vi/edit.txt @@ -1 +1 @@ -Biên soạn trang nà y và bấm ''Bảo lưu''. Xem [[wiki:syntax]] vá» cú pháp cá»§a Wiki. Xin bạn biên soạn trang nà y nếu bạn có thể **cải tiến** nó. Nếu bạn muốn thà nghiệm, bạn có thể táºp những bước đầu ở [[playground:playground]]. +Biên soạn trang nà y và bấm ''Lưu''. Xem [[wiki:syntax:vi|cú pháp cá»§a Wiki]] để biết cách soạn thảo. Xin bạn biên soạn trang nà y nếu bạn có thể **cải tiến** nó. Nếu bạn muốn thá» nghiệm, bạn có thể thỠở [[playground:playground| chá»— thá»]]. diff --git a/inc/lang/vi/editrev.txt b/inc/lang/vi/editrev.txt index 076466c0617e9c1a875cda6807bc476341e89c48..8a2031c4dfd67b0cad94f8f37de699beb5ea8a22 100644 --- a/inc/lang/vi/editrev.txt +++ b/inc/lang/vi/editrev.txt @@ -1,2 +1,2 @@ -**Bạn đã nạp má»™t phiên bản cÅ© cá»§a văn kiện!** Nếu bảo lưu, bạn sẽ tạo phiên bản vá»›i dữ kiện nà y. +**Bạn đã nạp má»™t phiên bản cÅ© cá»§a văn bản!** Nếu lưu nó, bạn sẽ tạo phiên bản má»›i vá»›i dữ kiện nà y. ---- diff --git a/inc/lang/vi/lang.php b/inc/lang/vi/lang.php index 361e51e84cde00bca9b46de33aebbd6e17f82cb5..c9179f6b3fcfcc03356d533a6f750bbab4c74509 100644 --- a/inc/lang/vi/lang.php +++ b/inc/lang/vi/lang.php @@ -5,8 +5,16 @@ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * @author James Do <jdo@myrealbox.com> */ -$lang['encoding'] = 'utf-8'; -$lang['direction'] = 'ltr'; + + + +$lang['encoding'] = 'utf-8'; +$lang['direction'] = 'ltr'; +$lang['doublequoteopening'] = '“'; //“ +$lang['doublequoteclosing'] = 'â€'; //” +$lang['singlequoteopening'] = '‘'; //‘ +$lang['singlequoteclosing'] = '’'; //’ +$lang['apostrophe'] = '’'; //’ $lang['btn_edit'] = 'Biên soạn trang nà y'; $lang['btn_source'] = 'Xem mã nguồn'; @@ -16,6 +24,8 @@ $lang['btn_search'] = 'Tìm'; $lang['btn_save'] = 'Lưu'; $lang['btn_preview']= 'Duyệt trước'; $lang['btn_top'] = 'Trở lên trên'; +$lang['btn_newer'] = '<< má»›i hÆ¡n'; +$lang['btn_older'] = 'cÅ© hÆ¡n >>'; $lang['btn_revs'] = 'Các phiên bản cÅ©'; $lang['btn_recent'] = 'Thay đổi gần đây'; $lang['btn_upload'] = 'Tải lên'; @@ -27,41 +37,126 @@ $lang['btn_logout'] = 'Thoát'; $lang['btn_admin'] = 'Quản lý'; $lang['btn_update'] = 'Cáºp nháºt'; $lang['btn_delete'] = 'Xoá'; +$lang['btn_back'] = 'Quay lại'; +$lang['btn_backlink'] = "Liên kết tá»›i đây"; +$lang['btn_profile'] = 'Cáºp nháºt hồ sÆ¡'; +$lang['btn_reset'] = 'Là m lại'; +$lang['btn_resendpwd'] = 'Gá»i máºt khẩu má»›i'; +$lang['btn_draft'] = 'Sá»a bản nháp'; +$lang['btn_recover'] = 'Phục hồi bản nháp'; +$lang['btn_draftdel'] = 'Xóa bản nháp'; +$lang['btn_revert'] = 'Phục hồi'; $lang['btn_register'] = 'Äăng ký'; +$lang['btn_apply'] = 'Chấp nháºn'; +$lang['btn_media'] = 'Quản lý tệp tin'; $lang['loggedinas'] = 'Username Ä‘ang dùng'; $lang['user'] = 'Username'; -$lang['pass'] = 'Password'; +$lang['pass'] = 'Máºt khẩu'; +$lang['newpass'] = 'Máºt khẩu má»›i'; +$lang['oldpass'] = 'Nháºp lại máºt khẩu hiện tại'; +$lang['passchk'] = 'lần nữa'; $lang['remember'] = 'Lưu username/password lại'; $lang['fullname'] = 'Há» và tên'; $lang['email'] = 'E-Mail'; +$lang['profile'] = 'Hồ sÆ¡ thà nh viên'; $lang['badlogin'] = 'Username hoặc password không đúng.'; +$lang['minoredit'] = 'Minor Changes'; +$lang['draftdate'] = 'Bản nháp được tá»± động lưu lúc'; // full dformat date will be added +$lang['nosecedit'] = 'Các trang web đã được thay đổi trong khi chỠđợi, phần thông tin quá hạn đã được thay thế bằng trang đầy đủ.'; $lang['regmissing'] = 'Bạn cần Ä‘iá»n và o tất cả các trưá»ng'; $lang['reguexists'] = 'Bạn khác đã dùng username nà y rồi.'; $lang['regsuccess'] = 'Äã tạo username, và đã gởi password.'; +$lang['regsuccess2'] = 'Thà nh viên vừa được tạo.'; $lang['regmailfail']= 'Không gởi password được. Xin bạn liên hệ vá»›i ngưá»i quản lý.'; $lang['regbadmail'] = 'Email hình như không đúng. Xin bạn liên hệ vá»›i ngưá»i quản lý.'; +$lang['regbadpass'] = 'Hai máºt khẩu đưa ra là không giống nhau, xin vui lòng thá» lại.'; $lang['regpwmail'] = 'Password DokuWiki cá»§a bạn là '; -$lang['reghere'] = 'Xin bạn đăng ký username nếu chưa có.'; +$lang['reghere'] = 'Xin bạn đăng ký username nếu chưa có'; + +$lang['profna'] = 'Wiki nà y không há»— trợ sá»a đổi hồ sÆ¡ cá nhân'; +$lang['profnochange'] = 'Không có thay đổi, không có gì để là m.'; +$lang['profnoempty'] = 'Không được để trống tên hoặc địa chỉ email.'; +$lang['profchanged'] = 'Cáºp nháºt hồ sÆ¡ thà nh viên thà nh công.'; +$lang['pwdforget'] = 'Bạn quên máºt khẩu? Tạo lại máºt khẩu má»›i'; +$lang['resendna'] = 'Wiki nà y không há»— trợ gá»i lại máºt khẩu.'; +$lang['resendpwd'] = 'Gá»i máºt khẩu má»›i cho'; +$lang['resendpwdmissing'] = 'Xin lá»—i, bạn phải Ä‘iá»n và o tất cả các trưá»ng.'; +$lang['resendpwdnouser'] = 'Xin lá»—i, chúng tôi không thể tìm thấy thà nh viên nà y trong cÆ¡ sở dữ liệu cá»§a chúng tôi.'; +$lang['resendpwdbadauth'] = 'Xin lá»—i, mã nà y xác thá»±c không hợp lệ. Hãy chắc chắn rằng bạn sá» dụng liên kết xác nháºn đầy đủ.'; +$lang['resendpwdconfirm'] = 'Má»™t liên kết xác nháºn đã được gá»i bằng email.'; +$lang['resendpwdsuccess'] = 'Máºt khẩu má»›i cá»§a bạn đã được gá»i bằng email.'; + +$lang['license'] = 'Trừ khi có ghi chú khác, ná»™i dung trên wiki nà y được cấp phép theo giấy phép sau đây:'; +$lang['licenseok'] = 'Lưu ý: Bằng cách chỉnh sá»a trang nà y, bạn đồng ý cấp giấy phép ná»™i dung cá»§a bạn theo giấy phép sau:'; + +$lang['searchmedia'] = 'Tìm tên file:'; +$lang['searchmedia_in'] = 'Tìm ở %s'; $lang['txt_upload'] = 'Chá»n tệp để tải lên'; $lang['txt_filename'] = 'Äiá»n wikiname (tuỳ ý)'; +$lang['txt_overwrt'] = 'Ghi đè file trùng'; $lang['lockedby'] = 'Äang khoá bởi'; -$lang['lockexpire'] = 'Khoá sẽ hết hạn và o lúc'; -$lang['js']['willexpire'] = 'Khoá cá»§a bạn để biên soạn trang nà y sẽ hết hạn trong vòng 1 phút.\nÄể tránh xung đột, bạn nên bấm nút xem trước để láºp lại thá»i gian khoá'; +$lang['lockexpire'] = 'Sẽ được mở khóa và o lúc'; +$lang['js']['willexpire'] = 'Trong má»™t phút nữa bà i viết sẽ được mở khóa để cho phép ngưá»i khác chỉnh sá»a.\nÄể tránh xung đột, bạn nên bấm nút Duyệt trước để láºp lại thá»i gian khoá bà i'; $lang['js']['notsavedyet'] = "Hiện có những thay đổi chưa được bảo lưu, và sẽ mất.\nBạn tháºt sá»± muốn tiếp tục?"; -$lang['rssfailed'] = 'Rút nguồn nà y gặp phải lá»—i'; +$lang['js']['searchmedia'] = 'Tìm kiếm táºp tin'; +$lang['js']['keepopen'] = 'Giữ cá»a sổ Ä‘ang mở trên lá»±a chá»n'; +$lang['js']['hidedetails'] = 'Ẩn thông tin chi tiết'; +$lang['js']['mediatitle'] = 'Thiết láºp liên kết'; +$lang['js']['mediadisplay'] = 'Kiểu liên kết'; +$lang['js']['mediaalign'] = 'Sắp hà ng'; +$lang['js']['mediasize'] = 'Cỡ ảnh'; +$lang['js']['mediatarget'] = 'ÄÃch cá»§a liên kết'; +$lang['js']['mediaclose'] = 'Äóng'; +$lang['js']['mediainsert'] = 'Chèn'; +$lang['js']['mediadisplayimg'] = 'Hiển thị ảnh.'; +$lang['js']['mediadisplaylnk'] = 'Chỉ hiển thị liên kết.'; +$lang['js']['mediasmall'] = 'Nhá»'; +$lang['js']['mediamedium'] = 'Vừa'; +$lang['js']['medialarge'] = 'To'; +$lang['js']['mediaoriginal'] = 'KÃch cỡ gốc'; +$lang['js']['medialnk'] = 'Liên kết tá»›i trang chi tiết'; +$lang['js']['mediadirect'] = 'Liên kết trá»±c tiếp tá»›i ảnh gốc'; +$lang['js']['medianolnk'] = 'Không liên kết'; +$lang['js']['medianolink'] = 'Không liên kết tá»›i ảnh'; +$lang['js']['medialeft'] = 'Căn ảnh sang trái.'; +$lang['js']['mediaright'] = 'Căn ảnh sang phải.'; +$lang['js']['mediacenter'] = 'Cản ảnh ra giữa.'; +$lang['js']['medianoalign'] = 'Không căn.'; +$lang['js']['nosmblinks'] = "Nối vá»›i các Windows shares chỉ có hiệu lá»±c vá»›i Microsoft Internet Explorer.\nBạn vẫn có thể sao và chép các mốc nối."; +$lang['js']['linkwiz'] = 'Há»™p thoại liên kết'; +$lang['js']['linkto'] = 'Liên kết tá»›i:'; +$lang['js']['del_confirm']= 'Xoá mục nà y?'; +$lang['js']['restore_confirm'] = 'Sẵn sà ng phục hồi phiên bản nà y?'; +$lang['js']['media_diff'] = 'So sánh:'; +$lang['js']['media_select'] = 'Chá»n nhiá»u file…'; +$lang['js']['media_upload_btn'] = 'Tải lên'; +$lang['js']['media_done_btn'] = 'Xong'; +$lang['js']['media_drop'] = 'Kéo các file và o đây để tải lên'; +$lang['js']['media_overwrt'] = 'Ghi đè các file trùng'; + +$lang['rssfailed'] = 'Nguồn nà y gặp phải lá»—i'; $lang['nothingfound']= 'Không tìm được gì'; -$lang['mediaselect'] = 'Chá»n tệp media'; +$lang['mediaselect'] = 'Xem'; $lang['fileupload'] = 'Tải lên tệp media'; $lang['uploadsucc'] = 'Tải lên thà nh công'; -$lang['uploadfail'] = 'Tải lên thất bại. Có thể vì không đủ phép?'; +$lang['uploadfail'] = 'Tải lên thất bại. Có thể vì không đủ quyá»n?'; $lang['uploadwrong'] = 'Tải lên bị từ chối. Cấm tải loại tệp nà y'; -$lang['namespaces'] = 'Äá» tà i'; +$lang['uploadexist'] = 'Tệp tin bị trùng. Chưa có gì xảy ra.'; +$lang['namespaces'] = 'Thư mục'; $lang['mediafiles'] = 'Tệp có sẵn ở'; +$lang['accessdenied'] = 'Bạn không được phép xem trang nà y.'; +$lang['mediausage'] = 'Sá» dụng cú pháp sau đây để dẫn đến táºp tin nà y:'; +$lang['mediaview'] = 'Xem tệp gốc'; +$lang['mediaroot'] = 'thư mục gốc'; +$lang['mediaupload'] = 'Tải má»™t táºp tin lên thư mục hiện tại ở đây. Äể tạo thư mục con, thêm nó và o trước tên táºp tin cá»§a bạn, phân cách bằng dấu hai chấm sau khi bạn chá»n các táºp tin. File còn có thể được lá»±a chá»n bằng cách kéo và thả.'; +$lang['mediaextchange'] = 'Phần mở rá»™ng thay đổi từ .%s thà nh .%s!'; +$lang['ref_inuse'] = 'Không thể xóa táºp tin vì nó Ä‘ang được sá» dụng cho các trang sau:'; +$lang['ref_hidden'] = 'Má»™t số tà i liệu sá» dụng cho trang nà y bạn không được cấp phép truy cáºp.'; $lang['hits'] = 'Trùng'; $lang['quickhits'] = 'Trang trùng hợp'; @@ -69,24 +164,36 @@ $lang['toc'] = 'Ná»™i dung'; $lang['current'] = 'hiện tại'; $lang['yours'] = 'Phiên bản hiện tại'; $lang['diff'] = 'cho xem khác biệt vá»›i phiên bản hiện tại'; +$lang['diff2'] = 'Sá»± khác biệt giữa các bản được lá»±a chá»n'; +$lang['difflink'] = 'Liên kết để xem bản so sánh nà y'; +$lang['diff_type'] = 'Xem sá»± khác biệt:'; +$lang['diff_inline'] = 'Ná»™i tuyến'; +$lang['diff_side'] = 'Xếp cạnh nhau'; $lang['line'] = 'Dòng'; $lang['breadcrumb'] = 'Trang đã xem'; +$lang['youarehere'] = 'Bạn Ä‘ang ở đây'; $lang['lastmod'] = 'Thá»i Ä‘iểm thay đổi'; $lang['by'] = 'do'; $lang['deleted'] = 'bị xoá'; $lang['created'] = 'được tạo ra'; $lang['restored'] = 'phiên bản cÅ© đã được khôi phục'; +$lang['external_edit'] = 'external edit'; $lang['summary'] = 'Tóm tắt biên soạn'; +$lang['noflash'] = '<a href="http://www.adobe.com/products/flashplayer/">Adobe Flash Plugin</a> cần được cà i để có thể xem ná»™i dung nà y.'; $lang['mail_newpage'] = 'Trang được thêm:'; $lang['mail_changed'] = 'Trang thay đổi:'; -$lang['js']['nosmblinks'] = "Nối vá»›i các Windows shares chỉ có hiệu lá»±c vá»›i Microsoft Internet Explorer.\nBạn vẫn có thể sao và chép các mốc nối."; +$lang['changes_type'] = 'Xem thay đổi cá»§a'; +$lang['pages_changes'] = 'Trang'; +$lang['media_changes'] = 'Tệp media'; +$lang['both_changes'] = 'Cả trang và các táºp tin media'; $lang['qb_bold'] = 'Chữ Ä‘áºm'; $lang['qb_italic'] = 'Chữ nghiêng'; $lang['qb_underl'] = 'Chữ gạch dưới'; $lang['qb_code'] = 'Chữ mã nguồn'; +$lang['qb_strike'] = 'Strike-through Text'; $lang['qb_h1'] = 'Äầu đỠcấp 1'; $lang['qb_h2'] = 'Äầu đỠcấp 2'; $lang['qb_h3'] = 'Äầu đỠcấp 3'; @@ -100,7 +207,62 @@ $lang['qb_ul'] = 'Äiểm trong danh sách không đánh số'; $lang['qb_media'] = 'Thêm ảnh và tệp khác'; $lang['qb_sig'] = 'Äặt chữ ký'; -$lang['js']['del_confirm']= 'Xoá mục nà y?'; +$lang['metaedit'] = 'Sá»a Metadata'; +$lang['metasaveerr'] = 'Thất bại khi viết metadata'; +$lang['metasaveok'] = 'Metadata đã được lưu'; +$lang['img_backto'] = 'Quay lại'; +$lang['img_title'] = 'Tiêu Ä‘á»'; +$lang['img_caption'] = 'Ghi chú'; +$lang['img_date'] = 'Ngà y'; +$lang['img_fname'] = 'Tên file'; +$lang['img_fsize'] = 'KÃch cỡ'; +$lang['img_artist'] = 'Ngưá»i chụp'; +$lang['img_copyr'] = 'Bản quyá»n'; +$lang['img_format'] = 'Äịnh dạng'; +$lang['img_camera'] = 'Camera'; +$lang['img_keywords'] = 'Từ khóa'; +$lang['img_width'] = 'Rá»™ng'; +$lang['img_height'] = 'Cao'; +$lang['img_manager'] = 'Xem trong trình quản lý tệp media'; + +/* installer strings */ +$lang['i_chooselang'] = 'Chá»n ngôn ngữ'; +$lang['i_retry'] = 'Thá» lại'; + +$lang['years'] = 'cách đây %d năm'; +$lang['months'] = 'cách đây %d tháng'; +$lang['weeks'] = 'cách đây %d tuần'; +$lang['days'] = 'cách đây %d ngà y'; +$lang['hours'] = 'cách đây %d giá»'; +$lang['minutes'] = 'cách đây %d phút'; +$lang['seconds'] = 'cách đây %d giây'; + +$lang['wordblock'] = 'Thay đổi cá»§a bạn đã không được lưu lại bởi vì nó có chứa văn bản bị chặn (spam).'; + +$lang['media_uploadtab'] = 'Tải lên'; +$lang['media_searchtab'] = 'Tìm'; +$lang['media_file'] = 'Tệp'; +$lang['media_viewtab'] = 'Xem'; +$lang['media_edittab'] = 'Sá»a'; +$lang['media_historytab'] = 'Lịch sá»'; +$lang['media_list_thumbs'] = 'Ảnh thu nhá»'; +$lang['media_list_rows'] = 'Dòng'; +$lang['media_sort_name'] = 'Tên'; +$lang['media_sort_date'] = 'Ngà y'; +$lang['media_namespaces'] = 'Chá»n thư mục'; +$lang['media_files'] = 'Các tệp trong %s'; +$lang['media_upload'] = 'Tải lên %s'; +$lang['media_search'] = 'Tìm ở %s'; +$lang['media_view'] = '%s'; +$lang['media_viewold'] = '%s ở %s'; +$lang['media_edit'] = 'Sá»a %s'; +$lang['media_history'] = 'Lịch sá» cá»§a %s'; +$lang['media_meta_edited'] = 'đã sá»a metadata'; +$lang['media_perm_read'] = 'Sorry, bạn không đủ quyá»n truy cáºp.'; +$lang['media_perm_upload'] = 'Xin lá»—i, bạn không đủ quyá»n để upload file lên.'; +$lang['media_update'] = 'Tải lên phiên bản má»›i'; +$lang['media_restore'] = 'Phục hồi phiên bản nà y'; +$lang['plugin_install_err'] = "Plugin không được cà i đặt chÃnh xác.Äổi tên thư mục plugin '%s' thà nh '%s'."; //Setup VIM: ex: et ts=2 : diff --git a/inc/lang/vi/login.txt b/inc/lang/vi/login.txt index 4265a79dfa65a4e09a81a674d230a11af4375d20..71a8b1a01e6a0bc539d2c813af691899dc08e8c5 100644 --- a/inc/lang/vi/login.txt +++ b/inc/lang/vi/login.txt @@ -1,3 +1,3 @@ ====== Äăng nháºp ====== -Hiện bạn chưa đăng nháºp! Äiá»n và o những chi tiết chứng minh ở phÃa dưới. Máy cá»§a bạn cần đặt chế độ nháºn cookies để đăng nháºp. +Hiện bạn chưa đăng nháºp! Hãy khai báo thông tin đăng nháºp và o ô ở phÃa dưới. Máy cá»§a bạn cần đặt chế độ nháºn cookies để đăng nháºp. diff --git a/inc/lang/vi/mailtext.txt b/inc/lang/vi/mailtext.txt index 3fcdf5595ff67863a2981beae57f68f45b9c2a33..836e02d24cfe7d623d51f3805489ebab5c9bc955 100644 --- a/inc/lang/vi/mailtext.txt +++ b/inc/lang/vi/mailtext.txt @@ -12,5 +12,5 @@ User : @USER@ @DIFF@ -- -This mail was generated by DokuWiki at +Äiện thư nà y tạo bởi DokuWiki ở @DOKUWIKIURL@ diff --git a/inc/lang/vi/newpage.txt b/inc/lang/vi/newpage.txt index b03bb522432260ef8bb7228aa1d7018eea292725..93f474b18c8d15b8947fcd78c1f67f9f351fae73 100644 --- a/inc/lang/vi/newpage.txt +++ b/inc/lang/vi/newpage.txt @@ -1,3 +1,3 @@ ====== Chưa có đỠtà i nà y ====== -Bạn vừa nối và o má»™t đỠtà i chưa có. Bạn có tạo đỠtà i nà y bằng cách bấm và o nút ''Tạo trang nà y''. +Bạn kết nối và o má»™t đỠtà i chưa có. Bạn có tạo đỠtà i nà y bằng cách bấm và o nút ''Tạo trang nà y'' ở góc trên, bên trái cá»a sổ nà y. Nếu bạn không thấy nút nà y, thay và o đó là nút ''Xem mã nguồn'' chứng tá» bạn không có quyá»n biên táºp trang nà y, hãy đăng nháºp thá» xem bạn có quyá»n biên táºp trang không. Nếu bạn nghÄ© đây là má»™t lá»—i, hãy báo cho ngưá»i quản trị. diff --git a/inc/lang/vi/norev.txt b/inc/lang/vi/norev.txt index 0fa27d8986da17b499d0621df8a01e7d6657f784..224bd1db0eab9811ca6db33e555a7a7d7d912925 100644 --- a/inc/lang/vi/norev.txt +++ b/inc/lang/vi/norev.txt @@ -1,3 +1,3 @@ ====== Phiên bản chưa có ====== -Chưa có phiên bản được chỉ định. Xin bấm nút ''Phiên bản cÅ©'' để xem danh sách các phiên bản cá»§a văn kiện nà y. +Chưa có phiên bản được chỉ định. Xin bấm nút ''Phiên bản cÅ©'' để xem danh sách các phiên bản cá»§a văn bản nà y. diff --git a/inc/lang/vi/password.txt b/inc/lang/vi/password.txt index 589bbf0677f9044b46da29230140f2098e331038..798a20d3307628e93194d85548938da7920bf67e 100644 --- a/inc/lang/vi/password.txt +++ b/inc/lang/vi/password.txt @@ -6,4 +6,4 @@ Username: @LOGIN@ Password: @PASSWORD@ -- -Äiện thư nà y xuất phát từ DokuWiki tại @DOKUWIKIURL@. +Äiện thư nà y xuất phát từ @DOKUWIKIURL@. diff --git a/inc/lang/vi/preview.txt b/inc/lang/vi/preview.txt index 81069a2c438c4a2c03cfe663c68e1fd24fed2dc1..f02a25142369ab4d3ad1ce8d2d9da4f3c2a989dc 100644 --- a/inc/lang/vi/preview.txt +++ b/inc/lang/vi/preview.txt @@ -1,3 +1,3 @@ ====== Xem trước ====== -Văn kiện cá»§a bạn sẽ thể hiện như sau. Nên nhá»›: Văn kiện nà y **chưa được bảo lưu**! +Văn bản cá»§a bạn sẽ thể hiện như sau. Nên nhá»›: Văn bản nà y **chưa được lưu**! diff --git a/inc/lang/vi/read.txt b/inc/lang/vi/read.txt index ffeffc7bf5b983801100d2d8b55142a608a7e868..eec69966b278a0fc70b8cd4ed7ecf50f8b15fb4e 100644 --- a/inc/lang/vi/read.txt +++ b/inc/lang/vi/read.txt @@ -1 +1 @@ -Trang nà y chỉ được Ä‘á»c thôi. Bạn có thể xem mã nguồn, nhưng không được thay đổi. Xin bạn há»i ngưá»i quản lý nếu không đúng. +Trang nà y chỉ được Ä‘á»c thôi. Bạn có thể xem mã nguồn, nhưng không được thay đổi. Hãy báo lại ngưá»i quản lý nếu hệ thống hoạt động không đúng. diff --git a/inc/lang/vi/revisions.txt b/inc/lang/vi/revisions.txt index 943e3fff1804f0b53a64eb2da6ed67ba3fe564ff..b9e9779ee8009b5d4e7d43f75e4937f196da8bc5 100644 --- a/inc/lang/vi/revisions.txt +++ b/inc/lang/vi/revisions.txt @@ -1,3 +1,3 @@ ====== Phiên bản cÅ© ====== -Sau đây là các phiên bản cÅ© cá»§a văn kiện nà y. Äể quây vá» má»™t phiên bản cÅ©, chá»n ở phÃa dưới, bấm và o ''Biên soạn trang nà y'' để bảo lưu. +Sau đây là các phiên bản cÅ© cá»§a văn bản nà y. Äể quay vá» má»™t phiên bản cÅ©, bạn hãy chá»n nó từ danh sách dưới đây, sau đó bấm và o nút ''Phục hồi'' hoặc nhấp nút ''Biên soạn trang nà y'' và lưu nó lại. diff --git a/inc/lang/vi/searchpage.txt b/inc/lang/vi/searchpage.txt index 821ca9f7b005dc90fae02ce278633015fdd32c7c..7ded7a808c430a9937ccee76c11075b38defd47f 100644 --- a/inc/lang/vi/searchpage.txt +++ b/inc/lang/vi/searchpage.txt @@ -1,5 +1,5 @@ ====== Tìm ====== -Sau đây là kết quả cá»§a câu há»i cá»§a bạn. Nếu bạn không thấy được những gì bạn Ä‘ang tìm, bạn có thể má»™t trang má»›i, cùng tên câu há»i cá»§a bạn, bằng cách bấm và o nút ''Biên soạn trang nà y''. +Sau đây là kết quả mà bạn đã tìm. Nếu bạn không thấy được những gì bạn Ä‘ang tìm, bạn có thể tạo má»™t trang má»›i bằng cách bấm và o nút ''Biên soạn trang nà y'', khi đó bạn sẽ có 1 trang má»›i vá»›i tên trang chÃnh là tuwfw khóa bạn đã tìm kiếm. ===== Kết quả ===== diff --git a/inc/lang/zh/lang.php b/inc/lang/zh/lang.php index 9d125ce44322066ee915377893313507d5caf774..9ea0f5e7f6379b62a6a1a33a5dd8599e1999527f 100644 --- a/inc/lang/zh/lang.php +++ b/inc/lang/zh/lang.php @@ -50,6 +50,7 @@ $lang['btn_backtomedia'] = '返回到媒体文件选择工具'; $lang['btn_subscribe'] = '订阅本页更改'; $lang['btn_profile'] = '更新个人信æ¯'; $lang['btn_reset'] = 'é‡è®¾'; +$lang['btn_resendpwd'] = '设置新密ç '; $lang['btn_draft'] = '编辑è‰ç¨¿'; $lang['btn_recover'] = 'æ¢å¤è‰ç¨¿'; $lang['btn_draftdel'] = 'åˆ é™¤è‰ç¨¿'; @@ -86,6 +87,7 @@ $lang['profnoempty'] = 'ä¸å…è®¸ä½¿ç”¨ç©ºçš„ç”¨æˆ·åæˆ–é‚®ä»¶åœ°å€ $lang['profchanged'] = 'ç”¨æˆ·ä¿¡æ¯æ›´æ–°æˆåŠŸã€‚'; $lang['pwdforget'] = '忘记密ç ?立å³èŽ·å–æ–°å¯†ç '; $lang['resendna'] = 'æœ¬ç»´åŸºä¸æ”¯æŒäºŒæ¬¡å‘é€å¯†ç 。'; +$lang['resendpwd'] = '设置新密ç 用于'; $lang['resendpwdmissing'] = '对ä¸èµ·ï¼Œæ‚¨å¿…须填写所有的区域。'; $lang['resendpwdnouser'] = '对ä¸èµ·ï¼Œåœ¨æˆ‘们的用户数æ®ä¸æ‰¾ä¸åˆ°è¯¥ç”¨æˆ·ã€‚'; $lang['resendpwdbadauth'] = '对ä¸èµ·ï¼Œè¯¥è®¤è¯ç 错误。请使用完整的确认链接。'; @@ -98,6 +100,7 @@ $lang['searchmedia_in'] = '在%s䏿Ÿ¥æ‰¾'; $lang['txt_upload'] = '选择è¦ä¸Šä¼ 的文件'; $lang['txt_filename'] = 'ä¸Šä¼ å¹¶é‡å‘½å为(å¯é€‰ï¼‰'; $lang['txt_overwrt'] = '覆盖已å˜åœ¨çš„åŒå文件'; +$lang['maxuploadsize'] = 'ä¸Šä¼ é™åˆ¶ã€‚æ¯ä¸ªæ–‡ä»¶ %s'; $lang['lockedby'] = 'ç›®å‰å·²è¢«ä¸‹åˆ—人员é”定'; $lang['lockexpire'] = '预计é”定解除于'; $lang['js']['willexpire'] = '您对本页的独有编辑æƒå°†äºŽä¸€åˆ†é’Ÿä¹‹åŽè§£é™¤ã€‚\n为了防æ¢ä¸Žå…¶ä»–人的编辑冲çªï¼Œè¯·ä½¿ç”¨é¢„览按钮é‡è®¾è®¡æ—¶å™¨ã€‚'; @@ -192,6 +195,11 @@ $lang['external_edit'] = '外部编辑'; $lang['summary'] = '编辑摘è¦'; $lang['noflash'] = 'éœ€è¦ <a href="http://www.adobe.com/products/flashplayer/">Adobe Flash æ’ä»¶</a> æ¥æ’放本内容。 '; $lang['download'] = '下载片段'; +$lang['tools'] = '工具'; +$lang['user_tools'] = '用户工具'; +$lang['site_tools'] = '站点工具'; +$lang['page_tools'] = '页é¢å·¥å…·'; +$lang['skip_to_content'] = '跳至内容'; $lang['mail_newpage'] = 'æ·»åŠ é¡µé¢ï¼š'; $lang['mail_changed'] = '更改页é¢ï¼š'; $lang['mail_subscribe_list'] = '命åç©ºé—´ä¸æ”¹å˜çš„页é¢ï¼š'; @@ -262,6 +270,7 @@ $lang['subscr_style_digest'] = '对æ¯ä¸ªé¡µé¢å‘逿›´æ”¹çš„æ‘˜è¦é‚®ä»¶ï¼ˆ $lang['subscr_style_list'] = '自上å°é‚®ä»¶ä»¥æ¥æ›´æ”¹çš„页é¢çš„åˆ—è¡¨ï¼ˆæ¯ %.2f 天)'; $lang['authmodfailed'] = '错误的用户认è¯è®¾ç½®ã€‚请通知维基管ç†å‘˜ã€‚'; $lang['authtempfail'] = 'ç”¨æˆ·è®¤è¯æš‚æ—¶æ— 法使用。如果该状æ€ä¸€ç›´å˜åœ¨ï¼Œè¯·é€šçŸ¥ç»´åŸºç®¡ç†å‘˜ã€‚'; +$lang['authpwdexpire'] = '您的密ç 将在 %d 天内过期,请尽快更改'; $lang['i_chooselang'] = '选择您的è¯è¨€'; $lang['i_installer'] = 'DokuWiki 安装工具'; $lang['i_wikiname'] = '维基åç§°'; @@ -288,7 +297,6 @@ $lang['i_pol1'] = '公共的维基(任何人都有读的æƒé™ $lang['i_pol2'] = 'å…³é—çš„ç»´åŸºï¼ˆåªæœ‰æ³¨å†Œç”¨æˆ·æ‰æœ‰è¯»ã€å†™ã€ä¸Šä¼ çš„æƒé™ï¼‰'; $lang['i_retry'] = 'é‡è¯•'; $lang['i_license'] = '请选择您希望的内容å‘布许å¯å议:'; - $lang['recent_global'] = '您当å‰çœ‹åˆ°çš„æ˜¯<b>%s</b> å称空间的å˜åŠ¨ã€‚ä½ è¿˜å¯ä»¥åœ¨<a href="%s">查看整个维基的近期å˜åЍ</a>。'; $lang['years'] = '%då¹´å‰'; $lang['months'] = '%d月å‰'; @@ -312,8 +320,8 @@ $lang['media_namespaces'] = '选择命å空间'; $lang['media_files'] = '在 %s ä¸çš„æ–‡ä»¶'; $lang['media_upload'] = 'ä¸Šä¼ åˆ° <strong>%s</strong> 命å空间。'; $lang['media_search'] = '在 <strong>%s</strong> 命åç©ºé—´ä¸æœç´¢ã€‚'; -$lang['media_view'] = '%s 在 %s'; -$lang['media_viewold'] = '%s '; +$lang['media_view'] = '%s'; +$lang['media_viewold'] = '%s 在 %s'; $lang['media_edit'] = '编辑 %s'; $lang['media_history'] = '%s 的历å²çºªå½•'; $lang['media_meta_edited'] = '元数æ®å·²ç¼–辑'; diff --git a/inc/lang/zh/mailwrap.html b/inc/lang/zh/mailwrap.html new file mode 100644 index 0000000000000000000000000000000000000000..0f00d95b1f22f20309c01f7038e002bdeda07cdf --- /dev/null +++ b/inc/lang/zh/mailwrap.html @@ -0,0 +1,13 @@ +<html> +<head> +<title>@TITLE@</title> +<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> +</head> +<body> + +@HTMLBODY@ + +<br /><hr /> +<small>本邮件由ä½äºŽ @DOKUWIKIURL@ çš„ Dokuwiki 自动创建。</small> +</body> +</html> \ No newline at end of file diff --git a/inc/lang/zh/resetpwd.txt b/inc/lang/zh/resetpwd.txt new file mode 100644 index 0000000000000000000000000000000000000000..a9d59fdd319f657dcafbd4defb51e1f73f590fee --- /dev/null +++ b/inc/lang/zh/resetpwd.txt @@ -0,0 +1,3 @@ +====== 设置新密ç ====== + +请为您在本维基上的账户设置一个新密ç 。 \ No newline at end of file diff --git a/inc/load.php b/inc/load.php index f3ab5bcdd8ab03fe527588da9c15fd0689529e1e..b676518e73574dec305b0bc885577843d0a9b059 100644 --- a/inc/load.php +++ b/inc/load.php @@ -49,6 +49,7 @@ function load_autoload($name){ static $classes = null; if(is_null($classes)) $classes = array( 'DokuHTTPClient' => DOKU_INC.'inc/HTTPClient.php', + 'HTTPClient' => DOKU_INC.'inc/HTTPClient.php', 'JSON' => DOKU_INC.'inc/JSON.php', 'adLDAP' => DOKU_INC.'inc/adLDAP.php', 'Diff' => DOKU_INC.'inc/DifferenceEngine.php', @@ -61,6 +62,7 @@ function load_autoload($name){ 'Doku_Event' => DOKU_INC.'inc/events.php', 'Doku_Event_Handler' => DOKU_INC.'inc/events.php', 'EmailAddressValidator' => DOKU_INC.'inc/EmailAddressValidator.php', + 'Input' => DOKU_INC.'inc/Input.class.php', 'JpegMeta' => DOKU_INC.'inc/JpegMeta.php', 'SimplePie' => DOKU_INC.'inc/SimplePie.php', 'FeedParser' => DOKU_INC.'inc/FeedParser.php', @@ -76,8 +78,9 @@ function load_autoload($name){ 'SafeFN' => DOKU_INC.'inc/SafeFN.class.php', 'Sitemapper' => DOKU_INC.'inc/Sitemapper.php', 'PassHash' => DOKU_INC.'inc/PassHash.class.php', + 'Mailer' => DOKU_INC.'inc/Mailer.class.php', 'RemoteAPI' => DOKU_INC.'inc/remote.php', - 'RemoteAPICore' => DOKU_INC.'inc/RemoteAPICore.php', + 'RemoteAPICore' => DOKU_INC.'inc/RemoteAPICore.php', 'DokuWiki_Action_Plugin' => DOKU_PLUGIN.'action.php', 'DokuWiki_Admin_Plugin' => DOKU_PLUGIN.'admin.php', @@ -94,11 +97,12 @@ function load_autoload($name){ // Plugin loading if(preg_match('/^(helper|syntax|action|admin|renderer|remote)_plugin_([^_]+)(?:_([^_]+))?$/', $name, $m)) { - //try to load the wanted plugin file - // include, but be silent. Maybe some other autoloader has an idea - // how to load this class. + // try to load the wanted plugin file $c = ((count($m) === 4) ? "/{$m[3]}" : ''); - @include DOKU_PLUGIN . "{$m[2]}/{$m[1]}$c.php"; + $plg = DOKU_PLUGIN . "{$m[2]}/{$m[1]}$c.php"; + if(@file_exists($plg)){ + include DOKU_PLUGIN . "{$m[2]}/{$m[1]}$c.php"; + } return; } } diff --git a/inc/media.php b/inc/media.php index dd0193fa07a9ecd91cb9b2b355a3c5f9601c91bd..2462a1debfbedd158a3b3943cdb6602b05daaf28 100644 --- a/inc/media.php +++ b/inc/media.php @@ -420,7 +420,7 @@ function media_upload_finish($fn_tmp, $fn, $id, $imime, $overwrite, $move = 'mov media_notify($id,$fn,$imime,$old); // add a log entry to the media changelog if ($REV){ - addMediaLogEntry($new, $id, DOKU_CHANGE_TYPE_REVERT, $lang['restored'], $REV); + addMediaLogEntry($new, $id, DOKU_CHANGE_TYPE_REVERT, sprintf($lang['restored'], dformat($REV)), $REV); } elseif ($overwrite) { addMediaLogEntry($new, $id, DOKU_CHANGE_TYPE_EDIT); } else { @@ -516,6 +516,7 @@ function media_contentcheck($file,$mime){ * Send a notify mail on uploads * * @author Andreas Gohr <andi@splitbrain.org> + * @fixme this should embed thumbnails of images in HTML version */ function media_notify($id,$file,$mime,$old_rev=false){ global $lang; @@ -523,31 +524,24 @@ function media_notify($id,$file,$mime,$old_rev=false){ global $INFO; if(empty($conf['notify'])) return; //notify enabled? - $ip = clientIP(); - $text = rawLocale('uploadmail'); - $text = str_replace('@DATE@',dformat(),$text); - $text = str_replace('@BROWSER@',$_SERVER['HTTP_USER_AGENT'],$text); - $text = str_replace('@IPADDRESS@',$ip,$text); - $text = str_replace('@HOSTNAME@',gethostsbyaddrs($ip),$text); - $text = str_replace('@DOKUWIKIURL@',DOKU_URL,$text); - $text = str_replace('@USER@',$_SERVER['REMOTE_USER'],$text); - $text = str_replace('@MIME@',$mime,$text); - $text = str_replace('@MEDIA@',ml($id,'',true,'&',true),$text); - $text = str_replace('@SIZE@',filesize_h(filesize($file)),$text); - if ($old_rev && $conf['mediarevisions']) { - $text = str_replace('@OLD@', ml($id, "rev=$old_rev", true, '&', true), $text); - } else { - $text = str_replace('@OLD@', '', $text); - } + $trep = array( + 'MIME' => $mime, + 'MEDIA' => ml($id,'',true,'&',true), + 'SIZE' => filesize_h(filesize($file)), + ); - if(empty($conf['mailprefix'])) { - $subject = '['.$conf['title'].'] '.$lang['mail_upload'].' '.$id; + if ($old_rev && $conf['mediarevisions']) { + $trep['OLD'] = ml($id, "rev=$old_rev", true, '&', true); } else { - $subject = '['.$conf['mailprefix'].'] '.$lang['mail_upload'].' '.$id; + $trep['OLD'] = '---'; } - mail_send($conf['notify'],$subject,$text,$conf['mailfrom']); + $mail = new Mailer(); + $mail->to($conf['notify']); + $mail->subject($lang['mail_upload'].' '.$id); + $mail->setBody($text,$trep); + return $mail->send(); } /** @@ -1608,7 +1602,35 @@ function media_uploadform($ns, $auth, $fullscreen = false){ echo NL.'<div id="mediamanager__uploader">'.NL; html_form('upload', $form); + echo '</div>'.NL; + + echo '<p class="maxsize">'; + printf($lang['maxuploadsize'],filesize_h(media_getuploadsize())); + echo '</p>'.NL; + +} + +/** + * Returns the size uploaded files may have + * + * This uses a conservative approach using the lowest number found + * in any of the limiting ini settings + * + * @returns int size in bytes + */ +function media_getuploadsize(){ + $okay = 0; + + $post = (int) php_to_byte(@ini_get('post_max_size')); + $suho = (int) php_to_byte(@ini_get('suhosin.post.max_value_length')); + $upld = (int) php_to_byte(@ini_get('upload_max_filesize')); + + if($post && ($post < $okay || $okay == 0)) $okay = $post; + if($suho && ($suho < $okay || $okay == 0)) $okay = $suho; + if($upld && ($upld < $okay || $okay == 0)) $okay = $upld; + + return $okay; } /** diff --git a/inc/pageutils.php b/inc/pageutils.php index db00258e2dc3f1122ee44f69d8960abc1508b87b..c94d14624857c7d0fe3166fbc43640b4ad01e22a 100644 --- a/inc/pageutils.php +++ b/inc/pageutils.php @@ -355,19 +355,21 @@ function mediaFN($id, $rev=''){ } /** - * Returns the full filepath to a localized textfile if local + * Returns the full filepath to a localized file if local * version isn't found the english one is returned * + * @param string $id The id of the local file + * @param string $ext The file extension (usually txt) * @author Andreas Gohr <andi@splitbrain.org> */ -function localeFN($id){ +function localeFN($id,$ext='txt'){ global $conf; - $file = DOKU_CONF.'/lang/'.$conf['lang'].'/'.$id.'.txt'; + $file = DOKU_CONF.'/lang/'.$conf['lang'].'/'.$id.'.'.$ext; if(!@file_exists($file)){ - $file = DOKU_INC.'inc/lang/'.$conf['lang'].'/'.$id.'.txt'; + $file = DOKU_INC.'inc/lang/'.$conf['lang'].'/'.$id.'.'.$ext; if(!@file_exists($file)){ //fall back to english - $file = DOKU_INC.'inc/lang/en/'.$id.'.txt'; + $file = DOKU_INC.'inc/lang/en/'.$id.'.'.$ext; } } return $file; diff --git a/inc/parserutils.php b/inc/parserutils.php index 9384929bfb7fad133e396e6bbfde1f9c79b7ed61..25d7cf131d727835b147c54a7611f04812ef6771 100644 --- a/inc/parserutils.php +++ b/inc/parserutils.php @@ -739,7 +739,7 @@ function p_get_first_heading($id, $render=METADATA_RENDER_USING_SIMPLE_CACHE){ * @author Andreas Gohr <andi@splitbrain.org> */ function p_xhtml_cached_geshi($code, $language, $wrapper='pre') { - global $conf, $config_cascade; + global $conf, $config_cascade, $INPUT; $language = strtolower($language); // remove any leading or trailing blank lines @@ -747,7 +747,7 @@ function p_xhtml_cached_geshi($code, $language, $wrapper='pre') { $cache = getCacheName($language.$code,".code"); $ctime = @filemtime($cache); - if($ctime && !$_REQUEST['purge'] && + if($ctime && !$INPUT->bool('purge') && $ctime > filemtime(DOKU_INC.'inc/geshi.php') && // geshi changed $ctime > @filemtime(DOKU_INC.'inc/geshi/'.$language.'.php') && // language syntax definition changed $ctime > filemtime(reset($config_cascade['main']['default']))){ // dokuwiki changed diff --git a/inc/plugincontroller.class.php b/inc/plugincontroller.class.php index 208d7dae958d3a80391958a9eeca8752f0cef64c..11636fb9155cdb89ae0b5dad0db85c50a7a8bae3 100644 --- a/inc/plugincontroller.class.php +++ b/inc/plugincontroller.class.php @@ -169,7 +169,7 @@ class Doku_Plugin_Controller { $plugins = array(); foreach($files as $file) { if(file_exists($file)) { - @include_once($file); + include_once($file); } } return $plugins; diff --git a/inc/subscription.php b/inc/subscription.php index c94f17ad0e57954379240e2382b06d371402663a..d1ee0397adc6b67c9cfe499f65cb19f9b24f45ef 100644 --- a/inc/subscription.php +++ b/inc/subscription.php @@ -377,18 +377,20 @@ function subscription_send_list($subscriber_mail, $ids, $ns_id) { */ function subscription_send($subscriber_mail, $replaces, $subject, $id, $template) { global $conf; + global $lang; $text = rawLocale($template); - $replaces = array_merge($replaces, array('TITLE' => $conf['title'], - 'DOKUWIKIURL' => DOKU_URL, - 'PAGE' => $id)); - - foreach ($replaces as $key => $substitution) { - $text = str_replace('@'.strtoupper($key).'@', $substitution, $text); - } + $trep = array_merge($replaces, array('PAGE' => $id)); - global $lang; $subject = $lang['mail_' . $subject] . ' ' . $id; - mail_send('', '['.$conf['title'].'] '. $subject, $text, - $conf['mailfrom'], '', $subscriber_mail); + $mail = new Mailer(); + $mail->bcc($subscriber_mail); + $mail->subject($subject); + $mail->setBody($text,$trep); + $mail->setHeader( + 'List-Unsubscribe', + '<'.wl($id,array('do'=>'subscribe'),true,'&').'>', + false + ); + return $mail->send(); } diff --git a/inc/template.php b/inc/template.php index 131f340208ffbc32493a639598d93cf6059ba2af..a18d7151f66a35dcf8956f209424b47869656cca 100644 --- a/inc/template.php +++ b/inc/template.php @@ -576,7 +576,7 @@ function tpl_get_action($type) { $accesskey = 'v'; } }else{ - $params = ''; + $params = array(); $type = 'show'; $accesskey = 'v'; } @@ -593,7 +593,7 @@ function tpl_get_action($type) { break; case 'top': $accesskey = 'x'; - $params = ''; + $params = array(); $id = '#dokuwiki__top'; break; case 'back': @@ -602,7 +602,7 @@ function tpl_get_action($type) { return false; } $id = $parent; - $params = ''; + $params = array(); $accesskey = 'b'; break; case 'login': diff --git a/inc/utf8.php b/inc/utf8.php index 54986e14e160348214f1ca98775ad3e084121a34..7b7c19c6b3be3d157b1b641262db0ab36ccd2045 100644 --- a/inc/utf8.php +++ b/inc/utf8.php @@ -103,9 +103,9 @@ if(!function_exists('utf8_substr')){ * * @author Harry Fuecks <hfuecks@gmail.com> * @author Chris Smith <chris@jalakai.co.uk> - * @param string - * @param integer number of UTF-8 characters offset (from left) - * @param integer (optional) length in UTF-8 characters from offset + * @param string $str + * @param int $offset number of UTF-8 characters offset (from left) + * @param int $length (optional) length in UTF-8 characters from offset * @return mixed string or false if failure */ function utf8_substr($str, $offset, $length = null) { @@ -221,6 +221,8 @@ if(!function_exists('utf8_ltrim')){ * * @author Andreas Gohr <andi@splitbrain.org> * @see ltrim() + * @param string $str + * @param string $charlist * @return string */ function utf8_ltrim($str,$charlist=''){ @@ -239,6 +241,8 @@ if(!function_exists('utf8_rtrim')){ * * @author Andreas Gohr <andi@splitbrain.org> * @see rtrim() + * @param string $str + * @param string $charlist * @return string */ function utf8_rtrim($str,$charlist=''){ @@ -257,6 +261,8 @@ if(!function_exists('utf8_trim')){ * * @author Andreas Gohr <andi@splitbrain.org> * @see trim() + * @param string $str + * @param string $charlist * @return string */ function utf8_trim($str,$charlist='') { @@ -348,7 +354,7 @@ if(!function_exists('utf8_ucwords')){ * You don't need to call this yourself * * @author Harry Fuecks - * @param array of matches corresponding to a single word + * @param array $matches matches corresponding to a single word * @return string with first char of the word in uppercase * @see utf8_ucwords * @see utf8_strtoupper @@ -408,9 +414,9 @@ if(!function_exists('utf8_stripspecials')){ * @param string $string The UTF8 string to strip of special chars * @param string $repl Replace special with this string * @param string $additional Additional chars to strip (used in regexp char class) + * @return string */ function utf8_stripspecials($string,$repl='',$additional=''){ - global $UTF8_SPECIAL_CHARS; global $UTF8_SPECIAL_CHARS2; static $specials = null; @@ -493,7 +499,7 @@ if(!function_exists('utf8_unhtml')){ * @author Tom N Harris <tnharris@whoopdedo.org> * @param string $str UTF-8 encoded string * @param boolean $entities Flag controlling decoding of named entities. - * @return UTF-8 encoded string with numeric (and named) entities replaced. + * @return string UTF-8 encoded string with numeric (and named) entities replaced. */ function utf8_unhtml($str, $entities=null) { static $decoder = null; @@ -509,6 +515,12 @@ if(!function_exists('utf8_unhtml')){ } if(!function_exists('utf8_decode_numeric')){ + /** + * Decodes numeric HTML entities to their correct UTF-8 characters + * + * @param $ent string A numeric entity + * @return string + */ function utf8_decode_numeric($ent) { switch ($ent[2]) { case 'X': @@ -524,16 +536,37 @@ if(!function_exists('utf8_decode_numeric')){ } if(!class_exists('utf8_entity_decoder')){ + /** + * Encapsulate HTML entity decoding tables + */ class utf8_entity_decoder { var $table; + + /** + * Initializes the decoding tables + */ function __construct() { $table = get_html_translation_table(HTML_ENTITIES); $table = array_flip($table); $this->table = array_map(array(&$this,'makeutf8'), $table); } + + /** + * Wrapper aorund unicode_to_utf8() + * + * @param $c string + * @return mixed + */ function makeutf8($c) { return unicode_to_utf8(array(ord($c))); } + + /** + * Decodes any HTML entity to it's correct UTF-8 char equivalent + * + * @param $ent string An entity + * @return string + */ function decode($ent) { if ($ent[1] == '#') { return utf8_decode_numeric($ent); @@ -562,8 +595,8 @@ if(!function_exists('utf8_to_unicode')){ * * @author <hsivonen@iki.fi> * @author Harry Fuecks <hfuecks@gmail.com> - * @param string UTF-8 encoded string - * @param boolean Check for invalid sequences? + * @param string $str UTF-8 encoded string + * @param boolean $strict Check for invalid sequences? * @return mixed array of unicode code points or false if UTF-8 invalid * @see unicode_to_utf8 * @link http://hsivonen.iki.fi/php-utf8/ @@ -735,8 +768,8 @@ if(!function_exists('unicode_to_utf8')){ * output buffering to concatenate the UTF-8 string (faster) as well as * reference the array by it's keys * - * @param array of unicode code points representing a string - * @param boolean Check for invalid sequences? + * @param array $arr of unicode code points representing a string + * @param boolean $strict Check for invalid sequences? * @return mixed UTF-8 string or false if array contains invalid code points * @author <hsivonen@iki.fi> * @author Harry Fuecks <hfuecks@gmail.com> @@ -855,8 +888,8 @@ if(!function_exists('utf8_bad_replace')){ * * @author Harry Fuecks <hfuecks@gmail.com> * @see http://www.w3.org/International/questions/qa-forms-utf-8 - * @param string to search - * @param string to replace bad bytes with (defaults to '?') - use ASCII + * @param string $str to search + * @param string $replace to replace bad bytes with (defaults to '?') - use ASCII * @return string */ function utf8_bad_replace($str, $replace = '') { @@ -1000,7 +1033,7 @@ if(!UTF8_MBSTRING){ /** * UTF-8 Case lookup table * - * This lookuptable defines the lower case letters to their correspponding + * This lookuptable defines the lower case letters to their corresponding * upper case letter in UTF-8 * * @author Andreas Gohr <andi@splitbrain.org> diff --git a/install.php b/install.php index 61db2be9f83f42e976a8d178ed9abca98e810d41..a1d406209ae3dd423ec7cf4e94461d55cefd2d3c 100644 --- a/install.php +++ b/install.php @@ -9,6 +9,8 @@ if(!defined('DOKU_INC')) define('DOKU_INC',dirname(__FILE__).'/'); if(!defined('DOKU_CONF')) define('DOKU_CONF',DOKU_INC.'conf/'); if(!defined('DOKU_LOCAL')) define('DOKU_LOCAL',DOKU_INC.'conf/'); +require_once(DOKU_INC.'inc/PassHash.class.php'); + // check for error reporting override or set error reporting to sane values if (!defined('DOKU_E_LEVEL')) { error_reporting(E_ALL ^ E_NOTICE); } else { error_reporting(DOKU_E_LEVEL); } @@ -27,8 +29,10 @@ if (get_magic_quotes_gpc() && !defined('MAGIC_QUOTES_STRIPPED')) { // language strings require_once(DOKU_INC.'inc/lang/en/lang.php'); -$LC = preg_replace('/[^a-z\-]+/','',$_REQUEST['l']); -if(!$LC) $LC = 'en'; +if(isset($_REQUEST['l']) && !is_array($_REQUEST['l'])) { + $LC = preg_replace('/[^a-z\-]+/','',$_REQUEST['l']); +} +if(empty($LC)) $LC = 'en'; if($LC && $LC != 'en' ) { require_once(DOKU_INC.'inc/lang/'.$LC.'/lang.php'); } @@ -50,10 +54,10 @@ $dokuwiki_hash = array( '2011-05-25' => '4241865472edb6fa14a1227721008072', '2011-11-10' => 'b46ff19a7587966ac4df61cbab1b8b31', '2012-01-25' => '72c083c73608fc43c586901fd5dabb74', + 'devel' => 'eb0b3fc90056fbc12bac6f49f7764df3' ); - // begin output header('Content-Type: text/html; charset=utf-8'); ?> @@ -128,17 +132,16 @@ header('Content-Type: text/html; charset=utf-8'); }elseif(!check_configs()){ echo '<p>'.$lang['i_modified'].'</p>'; print_errors(); - }elseif($_REQUEST['submit']){ - if(!check_data($_REQUEST['d'])){ - print_errors(); - print_form($_REQUEST['d']); - }elseif(!store_data($_REQUEST['d'])){ + }elseif(check_data($_REQUEST['d'])){ + // check_data has sanitized all input parameters + if(!store_data($_REQUEST['d'])){ echo '<p>'.$lang['i_failure'].'</p>'; print_errors(); }else{ echo '<p>'.$lang['i_success'].'</p>'; } }else{ + print_errors(); print_form($_REQUEST['d']); } ?> @@ -210,7 +213,7 @@ function print_form($d){ <p><?php echo $lang['i_license']?></p> <?php array_unshift($license,array('name' => 'None', 'url'=>'')); - if(!isset($d['license'])) $d['license'] = 'cc-by-sa'; + if(empty($d['license'])) $d['license'] = 'cc-by-sa'; foreach($license as $key => $lic){ echo '<label for="lic_'.$key.'">'; echo '<input type="radio" name="d[license]" value="'.htmlspecialchars($key).'" id="lic_'.$key.'"'. @@ -249,41 +252,65 @@ function print_retry() { * @author Andreas Gohr */ function check_data(&$d){ + static $form_default = array( + 'title' => '', + 'acl' => '1', + 'superuser' => '', + 'fullname' => '', + 'email' => '', + 'password' => '', + 'confirm' => '', + 'policy' => '0', + 'license' => 'cc-by-sa' + ); global $lang; global $error; + if(!is_array($d)) $d = array(); + foreach($d as $k => $v) { + if(is_array($v)) + unset($d[$k]); + else + $d[$k] = (string)$v; + } + //autolowercase the username - $d['superuser'] = strtolower($d['superuser']); + $d['superuser'] = isset($d['superuser']) ? strtolower($d['superuser']) : ""; - $ok = true; + $ok = false; - // check input - if(empty($d['title'])){ - $error[] = sprintf($lang['i_badval'],$lang['i_wikiname']); - $ok = false; - } - if($d['acl']){ - if(!preg_match('/^[a-z0-9_]+$/',$d['superuser'])){ - $error[] = sprintf($lang['i_badval'],$lang['i_superuser']); - $ok = false; - } - if(empty($d['password'])){ - $error[] = sprintf($lang['i_badval'],$lang['pass']); - $ok = false; - } - if($d['confirm'] != $d['password']){ - $error[] = sprintf($lang['i_badval'],$lang['passchk']); - $ok = false; - } - if(empty($d['fullname']) || strstr($d['fullname'],':')){ - $error[] = sprintf($lang['i_badval'],$lang['fullname']); + if(isset($_REQUEST['submit'])) { + $ok = true; + + // check input + if(empty($d['title'])){ + $error[] = sprintf($lang['i_badval'],$lang['i_wikiname']); $ok = false; } - if(empty($d['email']) || strstr($d['email'],':') || !strstr($d['email'],'@')){ - $error[] = sprintf($lang['i_badval'],$lang['email']); - $ok = false; + if(isset($d['acl'])){ + if(!preg_match('/^[a-z0-9_]+$/',$d['superuser'])){ + $error[] = sprintf($lang['i_badval'],$lang['i_superuser']); + $ok = false; + } + if(empty($d['password'])){ + $error[] = sprintf($lang['i_badval'],$lang['pass']); + $ok = false; + } + elseif(!isset($d['confirm']) || $d['confirm'] != $d['password']){ + $error[] = sprintf($lang['i_badval'],$lang['passchk']); + $ok = false; + } + if(empty($d['fullname']) || strstr($d['fullname'],':')){ + $error[] = sprintf($lang['i_badval'],$lang['fullname']); + $ok = false; + } + if(empty($d['email']) || strstr($d['email'],':') || !strstr($d['email'],'@')){ + $error[] = sprintf($lang['i_badval'],$lang['email']); + $ok = false; + } } } + $d = array_merge($form_default, $d); return $ok; } @@ -318,9 +345,13 @@ EOT; $ok = $ok && fileWrite(DOKU_LOCAL.'local.php',$output); if ($d['acl']) { + // hash the password + $phash = new PassHash(); + $pass = $phash->hash_smd5($d['password']); + // create users.auth.php - // --- user:MD5password:Real Name:email:groups,comma,seperated - $output = join(":",array($d['superuser'], md5($d['password']), $d['fullname'], $d['email'], 'admin,user')); + // --- user:SMD5password:Real Name:email:groups,comma,seperated + $output = join(":",array($d['superuser'], $pass, $d['fullname'], $d['email'], 'admin,user')); $output = @file_get_contents(DOKU_CONF.'users.auth.php.dist')."\n$output\n"; $ok = $ok && fileWrite(DOKU_LOCAL.'users.auth.php', $output); @@ -466,7 +497,7 @@ function check_functions(){ 'ob_start opendir parse_ini_file readfile realpath '. 'rename rmdir serialize session_start unlink usleep '. 'preg_replace file_get_contents htmlspecialchars_decode '. - 'spl_autoload_register'); + 'spl_autoload_register stream_select fsockopen'); if (!function_exists('mb_substr')) { $funcs[] = 'utf8_encode'; @@ -524,11 +555,13 @@ function langsel(){ */ function print_errors(){ global $error; - echo '<ul>'; - foreach ($error as $err){ - echo "<li>$err</li>"; + if(!empty($error)) { + echo '<ul>'; + foreach ($error as $err){ + echo "<li>$err</li>"; + } + echo '</ul>'; } - echo '</ul>'; } /** diff --git a/lib/exe/indexer.php b/lib/exe/indexer.php index 95e2af05ba10e10d164b4e603595411be5eeb78f..738a2950390f51fe014c2d40761f42a39beb2a79 100644 --- a/lib/exe/indexer.php +++ b/lib/exe/indexer.php @@ -55,6 +55,8 @@ exit; function runTrimRecentChanges($media_changes = false) { global $conf; + echo "runTrimRecentChanges($media_changes): started".NL; + $fn = ($media_changes ? $conf['media_changelog'] : $conf['changelog']); // Trim the Recent Changes @@ -70,6 +72,7 @@ function runTrimRecentChanges($media_changes = false) { if (count($lines)<=$conf['recent']) { // nothing to trim io_unlock($fn); + echo "runTrimRecentChanges($media_changes): finished".NL; return false; } @@ -91,6 +94,7 @@ function runTrimRecentChanges($media_changes = false) { // nothing to trim @unlink($fn.'_tmp'); io_unlock($fn); + echo "runTrimRecentChanges($media_changes): finished".NL; return false; } @@ -114,10 +118,12 @@ function runTrimRecentChanges($media_changes = false) { } else { io_unlock($fn); } + echo "runTrimRecentChanges($media_changes): finished".NL; return true; } // nothing done + echo "runTrimRecentChanges($media_changes): finished".NL; return false; } @@ -160,11 +166,12 @@ function runSitemapper(){ * @author Adrian Lang <lang@cosmocode.de> */ function sendDigest() { - echo 'sendDigest(): start'.NL; + echo 'sendDigest(): started'.NL; global $ID; global $conf; if (!$conf['subscribers']) { - return; + echo 'sendDigest(): disabled'.NL; + return false; } $subscriptions = subscription_find($ID, array('style' => '(digest|list)', 'escaped' => true)); @@ -243,6 +250,8 @@ function sendDigest() { // restore current user info $USERINFO = $olduinfo; $_SERVER['REMOTE_USER'] = $olduser; + echo 'sendDigest(): finished'.NL; + return true; } /** diff --git a/lib/exe/js.php b/lib/exe/js.php index 4b72014b2f13fc7b7d8940d7658ff31b959cba12..7c54f3e2e7bc043539229716da27a8759f6e1106 100644 --- a/lib/exe/js.php +++ b/lib/exe/js.php @@ -307,7 +307,10 @@ function js_compress($s){ $j += 1; } } - $result .= substr($s,$i,$j+1); + $string = substr($s,$i,$j+1); + // remove multiline markers: + $string = str_replace("\\\n",'',$string); + $result .= $string; $i = $i + $j + 1; continue; } @@ -322,7 +325,10 @@ function js_compress($s){ $j += 1; } } - $result .= substr($s,$i,$j+1); + $string = substr($s,$i,$j+1); + // remove multiline markers: + $string = str_replace("\\\n",'',$string); + $result .= $string; $i = $i + $j + 1; continue; } diff --git a/lib/exe/xmlrpc.php b/lib/exe/xmlrpc.php index cf3682f11b6f3c7e506bff7dc8144001d00b5055..5e6c197d03769b15723733b133251dffe6c71379 100644 --- a/lib/exe/xmlrpc.php +++ b/lib/exe/xmlrpc.php @@ -30,10 +30,11 @@ class dokuwiki_xmlrpc_server extends IXR_Server { } catch (RemoteAccessDeniedException $e) { if (!isset($_SERVER['REMOTE_USER'])) { header('HTTP/1.1 401 Unauthorized'); + return new IXR_Error(-32603, "server error. not authorized to call method $methodname"); } else { header('HTTP/1.1 403 Forbidden'); + return new IXR_Error(-32604, "server error. forbidden to call the method $methodname"); } - return new IXR_Error(-32603, "server error. not authorized to call method $methodname"); } catch (RemoteException $e) { return new IXR_Error($e->getCode(), $e->getMessage()); } diff --git a/lib/images/fileicons/ico.png b/lib/images/fileicons/ico.png new file mode 100644 index 0000000000000000000000000000000000000000..1d9dd562a4b27328ef9ca0ca516361d2d8da2e29 Binary files /dev/null and b/lib/images/fileicons/ico.png differ diff --git a/lib/plugins/acl/lang/eo/help.txt b/lib/plugins/acl/lang/eo/help.txt index cc3f63e5ad90eb477c956502940ea45f385c696e..488e84a1bcd3d090785a4b7189da98132bc8ca1b 100644 --- a/lib/plugins/acl/lang/eo/help.txt +++ b/lib/plugins/acl/lang/eo/help.txt @@ -6,6 +6,6 @@ La maldekstra panelo montras ĉiujn disponeblajn nomspacojn kaj paÄojn. La suba agordilo permesas al vi rigardi kaj modifi la rajtojn de elektita uzanto aÅ grupo. -En la suba tabelo ĉiuj aktuale difinitaj alirkontrolaj reguloj estas montritaj. Vi povas uzi Äin por rapide forigi aÅ ÅanÄi multoblajn regulojn. +En la suba tabelo ĉiuj aktuale difinitaj alirkontrolaj reguloj estas montrataj. Vi povas uzi Äin por rapide forigi aÅ ÅanÄi multoblajn regulojn. -Legado de la [[doku>acl|oficiala dokumentaro pri ACL]] povus helpi vin bone kompreni kiel alirkontrolo funkcias en DokuWiki. \ No newline at end of file +Legi la [[doku>acl|oficialan dokumentaron pri ACL]] povus helpi vin bone kompreni kiel alirkontrolo funkcias en DokuWiki. diff --git a/lib/plugins/acl/lang/eo/lang.php b/lib/plugins/acl/lang/eo/lang.php index 72ce576eeeca269cf25e9e9c17269d42bcbfb431..de75c2dd7c39856794f0cd56bebe2dd3ca7e3eb0 100644 --- a/lib/plugins/acl/lang/eo/lang.php +++ b/lib/plugins/acl/lang/eo/lang.php @@ -1,6 +1,6 @@ <?php /** - * Esperantolanguage file + * Esperanto language file * * @author Felipe Castro <fefcas@uol.com.br> * @author Felipo Kastro <fefcas@gmail.com> @@ -8,9 +8,7 @@ * @author Robert Bogenschneider <robog@gmx.de> * @author Erik Pedersen <erik pedersen@shaw.ca> * @author Erik Pedersen <erik.pedersen@shaw.ca> - * @author Robert Bogenschneider <robog@GMX.de> - * @author Robert BOGENSCHNEIDER <robog@gmx.de> - * @author Robert BOGENSCHNEIDER <bogi@UEA.org> + * @author Robert Bogenschneider <bogi@uea.org> */ $lang['admin_acl'] = 'Administrado de Alirkontrola Listo (ACL)'; $lang['acl_group'] = 'Grupo'; @@ -19,13 +17,13 @@ $lang['acl_perms'] = 'Rajtoj por'; $lang['page'] = 'PaÄo'; $lang['namespace'] = 'Nomspaco'; $lang['btn_select'] = 'Elekti'; -$lang['p_user_id'] = 'Uzanto <b class="acluser">%s</b> aktuale havas la jenajn rajtojn en la paÄo <b class="aclpage">%s</b>: <i>%s</i>.'; -$lang['p_user_ns'] = 'Uzanto <b class="acluser">%s</b> aktuale havas la jenajn rajtojn en la nomspaco <b class="aclns">%s</b>: <i>%s</i>.'; -$lang['p_group_id'] = 'Anoj de la grupo <b class="aclgroup">%s</b> aktuale havas la jenajn rajtojn en la paÄo <b class="aclpage">%s</b>: <i>%s</i>.'; -$lang['p_group_ns'] = 'Anoj de la grupo <b class="aclgroup">%s</b> aktuale havas la jenajn rajtojn en la nomspaco <b class="aclns">%s</b>: <i>%s</i>.'; -$lang['p_choose_id'] = 'Bonvolu <b>enmeti uzanton aÅ grupon</b> en la suba agordilo por rigardi aÅ redakti la aron da rajtoj por la paÄo <b class="aclpage">%s</b>.'; -$lang['p_choose_ns'] = 'Bonvolu <b>enmeti uzanton aÅ grupon</b> en la suba agordilo por rigardi aÅ redakti la aron da rajtoj por la nomspaco <b class="aclns">%s</b>.'; -$lang['p_inherited'] = 'Rimarko: tiuj rajtoj ne estis rekte difinitaj, sed ili estis hereditaj el aliaj pli superaj grupoj aÅ nomspacoj.'; +$lang['p_user_id'] = 'Uzanto <b class="acluser">%s</b> aktuale havas la jenajn rajtojn en la paÄo <b class="aclpage">%s</b>: <i>%s</i>.'; +$lang['p_user_ns'] = 'Uzanto <b class="acluser">%s</b> aktuale havas la jenajn rajtojn en la nomspaco <b class="aclns">%s</b>: <i>%s</i>.'; +$lang['p_group_id'] = 'Anoj de la grupo <b class="aclgroup">%s</b> aktuale havas la jenajn rajtojn en la paÄo <b class="aclpage">%s</b>: <i>%s</i>.'; +$lang['p_group_ns'] = 'Anoj de la grupo <b class="aclgroup">%s</b> aktuale havas la jenajn rajtojn en la nomspaco <b class="aclns">%s</b>: <i>%s</i>.'; +$lang['p_choose_id'] = 'Bonvolu <b>enmeti uzanton aÅ grupon</b> en la suban agordilon por rigardi aÅ redakti la aron da rajtoj por la paÄo <b class="aclpage">%s</b>.'; +$lang['p_choose_ns'] = 'Bonvolu <b>enmeti uzanton aÅ grupon</b> en la suban agordilon por rigardi aÅ redakti la aron da rajtoj por la nomspaco <b class="aclns">%s</b>.'; +$lang['p_inherited'] = 'Rimarko: tiuj rajtoj ne estas rekte difinitaj, sed ili herediÄas el aliaj pli supraj grupoj aÅ nomspacoj.'; $lang['p_isadmin'] = 'Rimarko: la elektita grupo aÅ uzanto ĉiam havas plenan rajtaron ĉar Äi estas difinita kiel superuzanto.'; $lang['p_include'] = 'Plialtaj permesoj inkluzivas malpli altajn. La permesoj por Krei, AlÅuti kaj Forigi nur aplikeblas al nomspacoj, ne al paÄoj.'; $lang['current'] = 'Aktuala regularo ACL'; @@ -38,5 +36,5 @@ $lang['acl_perm2'] = 'Redakti'; $lang['acl_perm4'] = 'Krei'; $lang['acl_perm8'] = 'AlÅuti'; $lang['acl_perm16'] = 'Forigi'; -$lang['acl_new'] = 'Aldoni novan Enmetaĵon'; -$lang['acl_mod'] = 'Modifi Enmetaĵon'; +$lang['acl_new'] = 'Aldoni novan enmetaĵon'; +$lang['acl_mod'] = 'Modifi enmetaĵon'; diff --git a/lib/plugins/acl/lang/fr/lang.php b/lib/plugins/acl/lang/fr/lang.php index a33a52bf045f1b2d18c1f139f5dd16794b4030dd..7db8ae4ac0ee0c175317f6efa36e32343cdce6d5 100644 --- a/lib/plugins/acl/lang/fr/lang.php +++ b/lib/plugins/acl/lang/fr/lang.php @@ -22,6 +22,7 @@ * @author Johan Guilbaud <guilbaud.johan@gmail.com> * @author schplurtz@laposte.net * @author skimpax@gmail.com + * @author Yannick Aure <yannick.aure@gmail.com> */ $lang['admin_acl'] = 'Gestion de la liste des contrôles d\'accès (ACL)'; $lang['acl_group'] = 'Groupe'; diff --git a/lib/plugins/acl/lang/it/lang.php b/lib/plugins/acl/lang/it/lang.php index f789b979ff7a398ee5ab947bf0b0c0b8af893f2e..a55a2c0f371b9677edc3436a658184ad536eedde 100644 --- a/lib/plugins/acl/lang/it/lang.php +++ b/lib/plugins/acl/lang/it/lang.php @@ -13,6 +13,7 @@ * @author robocap <robocap1@gmail.com> * @author Osman Tekin osman.tekin93@hotmail.it * @author Jacopo Corbetta <jacopo.corbetta@gmail.com> + * @author Matteo Pasotti <matteo@xquiet.eu> */ $lang['admin_acl'] = 'Gestione Lista Controllo Accessi (ACL)'; $lang['acl_group'] = 'Gruppo'; diff --git a/lib/plugins/acl/lang/ko/help.txt b/lib/plugins/acl/lang/ko/help.txt index 516198ee517ce8ee55c5a44d73a73dabd65e26a9..377636682a5b25861969a3215f91a82d2a6937cb 100644 --- a/lib/plugins/acl/lang/ko/help.txt +++ b/lib/plugins/acl/lang/ko/help.txt @@ -1,11 +1,11 @@ === ë„움ë§: === -현재 페ì´ì§€ì—서 위키 네임스페ì´ìŠ¤ì™€ 페ì´ì§€ì— 대한 ì ‘ê·¼ ê¶Œí•œì„ ì¶”ê°€í•˜ê±°ë‚˜ ì‚ì œí• ìˆ˜ 있습니다. +현재 문서ì—서 위키 ì´ë¦„공간과 ë¬¸ì„œì— ëŒ€í•œ ì ‘ê·¼ ê¶Œí•œì„ ì¶”ê°€í•˜ê±°ë‚˜ ì‚ì œí• ìˆ˜ 있습니다. -왼쪽 ì˜ì—ì„ ì„ íƒê°€ëŠ¥í•œ 네임스페ì´ìŠ¤ë“¤ê³¼ 페ì´ì§€ 목ë¡ì„ ë³´ì—¬ì¤ë‹ˆë‹¤. +왼쪽 ì˜ì—ì—는 ì„ íƒ ê°€ëŠ¥í•œ ì´ë¦„공간과 문서 목ë¡ì„ ë³´ì—¬ì¤ë‹ˆë‹¤. -위쪽 ìž…ë ¥ ì–‘ì‹ì—서 ì„ íƒëœ 사용ìžì™€ ê·¸ë£¹ì˜ ì ‘ê·¼ ê¶Œí•œì„ ë³´ê±°ë‚˜ ë³€ê²½í• ìˆ˜ 있습니다. +위쪽 ìž…ë ¥ ì–‘ì‹ì—서 ì„ íƒëœ 사용ìžì™€ ê·¸ë£¹ì˜ ì ‘ê·¼ ê¶Œí•œì„ ë³´ê±°ë‚˜ 바꿀 수 있습니다. -아래 í…Œì´ë¸”ì—서 현재 ì„¤ì •ëœ ëª¨ë“ ì ‘ê·¼ ì œì–´ ê·œì¹™ë“¤ì„ ë³¼ 수 있으며, 즉시 여러 ê·œì¹™ë“¤ì„ ì‚ì œí•˜ê±°ë‚˜ ë³€ê²½í• ìˆ˜ 있습니다. +아래 í…Œì´ë¸”ì—서 현재 ì„¤ì •ëœ ëª¨ë“ ì ‘ê·¼ ì œì–´ ê·œì¹™ì„ ë³¼ 수 있으며, 즉시 여러 ê·œì¹™ì„ ì‚ì œí•˜ê±°ë‚˜ 바꿀 수 있습니다. -DokuWikiì—서 ì ‘ê·¼ ì œì–´ê°€ 어떻게 ë™ìž‘ë˜ëŠ”ì§€ ì•Œë ¤ë©´ [[doku>acl|official documentation on ACL]] ì½ê¸° ë°”ëžë‹ˆë‹¤. \ No newline at end of file +DokuWikiì—서 ì ‘ê·¼ ì œì–´ê°€ 어떻게 ë™ìž‘ë˜ëŠ”ì§€ ì•Œì•„ë³´ë ¤ë©´ [[doku>acl|ACL ê³µì‹ ë¬¸ì„œ]]를 ì½ì–´ë³´ê¸° ë°”ëžë‹ˆë‹¤. \ No newline at end of file diff --git a/lib/plugins/acl/lang/ko/lang.php b/lib/plugins/acl/lang/ko/lang.php index 6b1e77cf8a21aa8acc2b390f6e5c1afe7397ce39..c8e1ce5cc6d8bce5ac1466928be5fc7d924e6055 100644 --- a/lib/plugins/acl/lang/ko/lang.php +++ b/lib/plugins/acl/lang/ko/lang.php @@ -12,32 +12,33 @@ * @author SONG Younghwan <purluno@gmail.com> * @author Seung-Chul Yoo <dryoo@live.com> * @author erial2@gmail.com + * @author Myeongjin <aranet100@gmail.com> */ $lang['admin_acl'] = 'ì ‘ê·¼ ì œì–´ ëª©ë¡ ê´€ë¦¬'; $lang['acl_group'] = '그룹'; $lang['acl_user'] = '사용ìž'; $lang['acl_perms'] = '권한'; -$lang['page'] = '페ì´ì§€'; -$lang['namespace'] = '네임스페ì´ìФ'; +$lang['page'] = '문서'; +$lang['namespace'] = 'ì´ë¦„공간'; $lang['btn_select'] = 'ì„ íƒ'; -$lang['p_user_id'] = 'ì‚¬ìš©ìž <b class="acluser">%s</b>는 현재 <b class="aclpage">%s</b>: <i>%s</i> 페ì´ì§€ ì ‘ê·¼ì´ ê°€ëŠ¥í•©ë‹ˆë‹¤.'; -$lang['p_user_ns'] = 'ì‚¬ìš©ìž <b class="acluser">%s</b>는 현재 <b class="aclns">%s</b>: <i>%s</i> 네임스페ì´ìФ ì ‘ê·¼ì´ ê°€ëŠ¥í•©ë‹ˆë‹¤.'; -$lang['p_group_id'] = '그룹 <b class="aclgroup">%s</b> 사용ìžëŠ” 현재 <b class="aclpage">%s</b>: <i>%s</i> 페ì´ì§€ ì ‘ê·¼ì´ ê°€ëŠ¥í•©ë‹ˆë‹¤.'; -$lang['p_group_ns'] = '그룹 <b class="aclgroup">%s</b> 사용ìžëŠ” 현재 <b class="aclns">%s</b>: <i>%s</i> 네임스페ì´ìФ ì ‘ê·¼ì´ ê°€ëŠ¥í•©ë‹ˆë‹¤.'; -$lang['p_choose_id'] = '<b class="aclpage">%s</b> 페ì´ì§€ ì ‘ê·¼ ê¶Œí•œì„ ë³´ê±°ë‚˜ ë³€ê²½í•˜ë ¤ë©´ <b>사용ìž</b>나 <b>그룹</b>ì„ ìœ„ ì–‘ì‹ì— ìž…ë ¥í•˜ê¸° ë°”ëžë‹ˆë‹¤.'; -$lang['p_choose_ns'] = '<b class="aclns">%s</b> 네임스페ì´ìФ ì ‘ê·¼ ê¶Œí•œì„ ë³´ê±°ë‚˜ ë³€ê²½í•˜ë ¤ë©´ <b>사용ìž</b>나 <b>그룹</b>ì„ ìœ„ ì–‘ì‹ì— ìž…ë ¥í•˜ê¸° ë°”ëžë‹ˆë‹¤.'; -$lang['p_inherited'] = '주ì˜: ê¶Œí•œì´ ëª…ì‹œì 으로 ì„¤ì •ë˜ì§€ 않았으므로 다른 그룹들ì´ë‚˜ ìƒìœ„ 네임스페ì´ìŠ¤ë¡œ 부터 ê°€ì ¸ì™”ìŠµë‹ˆë‹¤.'; -$lang['p_isadmin'] = '주ì˜: 슈í¼ìœ ì €ë¡œ ì„¤ì •ë˜ì–´ 있으므로 ì„ íƒëœ 그룹ì´ë‚˜ 사용ìžëŠ” ì–¸ì œë‚˜ ëª¨ë“ ì ‘ê·¼ ê¶Œí•œì„ ê°€ì§‘ë‹ˆë‹¤.'; -$lang['p_include'] = 'ë” ë†’ì€ ì ‘ê·¼ê¶Œí•œì€ í•˜ìœ„ë¥¼ í¬í•¨í•©ë‹ˆë‹¤. 페ì´ì§€ê°€ 아닌 네임스페ì´ìФì—는 ìƒì„±, 업로드, ì‚ì œ 권한만 ì ìš©ë©ë‹ˆë‹¤.'; -$lang['current'] = '현 ACL 규칙'; -$lang['where'] = '페ì´ì§€/네임스페ì´ìФ'; +$lang['p_user_id'] = '<b class="acluser">%s</b> 사용ìžëŠ” 현재 <b class="aclpage">%s</b>: <i>%s</i> 문서 ì ‘ê·¼ì´ ê°€ëŠ¥í•©ë‹ˆë‹¤.'; +$lang['p_user_ns'] = '<b class="acluser">%s</b> 사용ìžëŠ” 현재 <b class="aclns">%s</b>: <i>%s</i> ì´ë¦„공간 ì ‘ê·¼ì´ ê°€ëŠ¥í•©ë‹ˆë‹¤.'; +$lang['p_group_id'] = '<b class="aclgroup">%s</b> 그룹 구성ì›ì€ 현재 <b class="aclpage">%s</b>: <i>%s</i> 문서 ì ‘ê·¼ì´ ê°€ëŠ¥í•©ë‹ˆë‹¤.'; +$lang['p_group_ns'] = '<b class="aclgroup">%s</b> 그룹 구성ì›ì€ 현재 <b class="aclns">%s</b>: <i>%s</i> ì´ë¦„공간 ì ‘ê·¼ì´ ê°€ëŠ¥í•©ë‹ˆë‹¤.'; +$lang['p_choose_id'] = '<b class="aclpage">%s</b> 문서 ì ‘ê·¼ ê¶Œí•œì„ ë³´ê±°ë‚˜ ë°”ê¾¸ë ¤ë©´ <b>사용ìž</b>나 <b>그룹</b>ì„ ìœ„ ì–‘ì‹ì— ìž…ë ¥í•˜ê¸° ë°”ëžë‹ˆë‹¤.'; +$lang['p_choose_ns'] = '<b class="aclns">%s</b> ì´ë¦„공간 ì ‘ê·¼ ê¶Œí•œì„ ë³´ê±°ë‚˜ ë°”ê¾¸ë ¤ë©´ <b>사용ìž</b>나 <b>그룹</b>ì„ ìœ„ ì–‘ì‹ì— ìž…ë ¥í•˜ê¸° ë°”ëžë‹ˆë‹¤.'; +$lang['p_inherited'] = 'ì°¸ê³ : ê¶Œí•œì´ ëª…ì‹œì 으로 ì„¤ì •ë˜ì§€ 않았으므로 다른 그룹ì´ë‚˜ ìƒìœ„ ì´ë¦„공간으로부터 ê°€ì ¸ì™”ìŠµë‹ˆë‹¤.'; +$lang['p_isadmin'] = 'ì°¸ê³ : 슈í¼ìœ ì €ë¡œ ì„¤ì •ë˜ì–´ 있으므로 ì„ íƒëœ 그룹ì´ë‚˜ 사용ìžëŠ” ì–¸ì œë‚˜ ëª¨ë“ ì ‘ê·¼ ê¶Œí•œì„ ê°€ì§‘ë‹ˆë‹¤.'; +$lang['p_include'] = 'ë” ë†’ì€ ì ‘ê·¼ ê¶Œí•œì€ í•˜ìœ„ë¥¼ í¬í•¨í•©ë‹ˆë‹¤. 문서가 아닌 ì´ë¦„공간ì—는 만들기, 올리기, ì‚ì œ 권한만 ì ìš©ë©ë‹ˆë‹¤.'; +$lang['current'] = '현재 ACL 규칙'; +$lang['where'] = '문서/ì´ë¦„공간'; $lang['who'] = '사용ìž/그룹'; $lang['perm'] = 'ì ‘ê·¼ 권한'; $lang['acl_perm0'] = 'ì—†ìŒ'; $lang['acl_perm1'] = 'ì½ê¸°'; -$lang['acl_perm2'] = 'ìˆ˜ì •'; -$lang['acl_perm4'] = 'ìƒì„±'; -$lang['acl_perm8'] = '업로드'; +$lang['acl_perm2'] = '편집'; +$lang['acl_perm4'] = '만들기'; +$lang['acl_perm8'] = '올리기'; $lang['acl_perm16'] = 'ì‚ì œ'; $lang['acl_new'] = '새 í•목 추가'; $lang['acl_mod'] = 'ì„ íƒ í•목 변경'; diff --git a/lib/plugins/acl/lang/pl/lang.php b/lib/plugins/acl/lang/pl/lang.php index 1b10b52326ca15afb2f4662bf2fc79fa1c028e74..bef2d261597f7d9497f3bd6e200e29ba4d7e2873 100644 --- a/lib/plugins/acl/lang/pl/lang.php +++ b/lib/plugins/acl/lang/pl/lang.php @@ -13,6 +13,7 @@ * @author Grzegorz WidÅ‚a <dzesdzes@gmail.com> * @author Åukasz Chmaj <teachmeter@gmail.com> * @author Begina Felicysym <begina.felicysym@wp.eu> + * @author Aoi Karasu <aoikarasu@gmail.com> */ $lang['admin_acl'] = 'ZarzÄ…dzanie uprawnieniami'; $lang['acl_group'] = 'Grupa'; diff --git a/lib/plugins/acl/lang/ro/lang.php b/lib/plugins/acl/lang/ro/lang.php index c278c918e826c630f05911065c7e94a848420cbf..4d093216bc5ddfde6b3334e98cbc87dd3d67b4d2 100644 --- a/lib/plugins/acl/lang/ro/lang.php +++ b/lib/plugins/acl/lang/ro/lang.php @@ -10,6 +10,7 @@ * @author Emanuel-Emeric Andrasi <em.andrasi@mandrivausers.ro> * @author Marius OLAR <olarmariusalex@gmail.com> * @author Marius Olar <olarmariusalex@yahoo.com> + * @author Emanuel-Emeric AndraÈ™i <em.andrasi@mandrivausers.ro> */ $lang['admin_acl'] = 'Managementul Listei de Control a Accesului'; $lang['acl_group'] = 'Grup'; diff --git a/lib/plugins/acl/lang/vi/help.txt b/lib/plugins/acl/lang/vi/help.txt new file mode 100644 index 0000000000000000000000000000000000000000..23e258678a7c89d7e77b024a86c41357d47af41b --- /dev/null +++ b/lib/plugins/acl/lang/vi/help.txt @@ -0,0 +1,12 @@ +=== Trợ giúp nhanh: === + +Trang nà y giúp bạn thêm hoặc xóa quyá»n được cấp cho 1 thư mục hoặc trang wiki cá»§a bạn. + +Cá»§a sổ bên trái hiển thị tất cả các thư mục và trang văn bản. + +Khung trên đây cho phép bạn xem và sá»a quyá»n cá»§a má»™t nhóm hoặc thà nh viên đã chá»n. + +Bảng bên dưới hiển thị tất cả các quyá»n được cấp. Bạn có thể sá»a hoặc hóa các quyá»n đó má»™t cách nhanh chóng. + +Äá»c [[doku>acl|tà i liệu chÃnh thức vá» ACL]] sẽ giúp bạn hiểu hÆ¡n vá» cách phân quyá»n ở DokuWiki. + diff --git a/lib/plugins/acl/lang/vi/lang.php b/lib/plugins/acl/lang/vi/lang.php index 6237f79ba6221e8cd7a7c03769bd0557c1827a5e..ddf764dcab910c594a8fa1cd2cfe228756251e6c 100644 --- a/lib/plugins/acl/lang/vi/lang.php +++ b/lib/plugins/acl/lang/vi/lang.php @@ -3,19 +3,42 @@ * vietnamese language file * * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * @author James Do <jdo@myrealbox.com> + * @author NukeViet <admin@nukeviet.vn> */ -$lang['admin_acl'] = 'Quản lý phép truy nháºt {Access Control List}'; +$lang['admin_acl'] = 'Quản lý danh sách quyá»n truy cáºp'; $lang['acl_group'] = 'Nhóm'; -$lang['acl_user'] = 'Ngưá»i'; -$lang['acl_perms'] = 'Phép truy nháºp cho'; +$lang['acl_user'] = 'Thà nh viên'; +$lang['acl_perms'] = 'Cấp phép cho'; $lang['page'] = 'Trang'; -$lang['namespace'] = 'Không gian tên'; +$lang['namespace'] = 'Thư mục'; +$lang['btn_select'] = 'Chá»n'; + +$lang['p_user_id'] = 'Thà nh viên <b class="acluser">%s</b> hiện tại được cấp phép cho trang <b class="aclpage">%s</b>: <i>%s</i>.'; +$lang['p_user_ns'] = 'Thà nh viên <b class="acluser">%s</b> hiện tại được cấp phép cho thư mục <b class="aclns">%s</b>: <i>%s</i>.'; +$lang['p_group_id'] = 'Thà nh viên trong nhóm <b class="aclgroup">%s</b> hiện tại được cấp phép cho trang <b class="aclpage">%s</b>: <i>%s</i>.'; +$lang['p_group_ns'] = 'Thà nh viên trong nhóm <b class="aclgroup">%s</b> hiện tại được cấp phép cho thư mục <b class="aclns">%s</b>: <i>%s</i>.'; + +$lang['p_choose_id'] = 'Hãy <b>nháºp tên thà nh viên hoặc nhóm</b> và o ô trên đây để xem hoặc sá»a quyá»n đã thiết đặt cho trang <b class="aclpage">%s</b>.'; +$lang['p_choose_ns'] = 'Hãy <b>nháºp tên thà nh viên hoặc nhóm</b> và o ô trên đây để xem hoặc sá»a quyá»n đã thiết đặt cho thư mục <b class="aclns">%s</b>.'; + + +$lang['p_inherited'] = 'Ghi chú: Có những quyá»n không được thể hiện ở đây nhưng nó được cấp phép từ những nhóm hoặc thư mục cấp cao.'; +$lang['p_isadmin'] = 'Ghi chú: Nhóm hoặc thà nh viên nà y luôn được cấp đủ quyá»n vì há» là Quản trị tối cao'; +$lang['p_include'] = 'Má»™t số quyá»n thấp được thể hiện ở mức cao hÆ¡n. Quyá»n tạo, tải lên và xóa chỉ dà nh cho thư mục, không dà nh cho trang.'; + +$lang['current'] = 'Danh sách quyá»n truy cáºp hiện tại'; +$lang['where'] = 'Trang/Thư mục'; +$lang['who'] = 'Thà nh viên/Nhóm'; +$lang['perm'] = 'Quyá»n'; + +$lang['acl_perm0'] = 'Không'; $lang['acl_perm1'] = 'Äá»c'; -$lang['acl_perm2'] = 'Biên soạn'; +$lang['acl_perm2'] = 'Sá»a'; $lang['acl_perm4'] = 'Tạo'; $lang['acl_perm8'] = 'Tải lên'; +$lang['acl_perm16'] = 'Xóa'; $lang['acl_new'] = 'Thêm mục má»›i'; +$lang['acl_mod'] = 'Sá»a'; //Setup VIM: ex: et ts=2 : diff --git a/lib/plugins/acl/rtl.css b/lib/plugins/acl/rtl.css deleted file mode 100644 index e79abe596765afb128b277e6494cdce51ebe4fab..0000000000000000000000000000000000000000 --- a/lib/plugins/acl/rtl.css +++ /dev/null @@ -1,40 +0,0 @@ -div#acl_manager div#acl__tree { - float: right; - text-align: right; -} - -div#acl_manager div#acl__tree li { - padding-left: 0em; - padding-right: 1em; -} - -div#acl_manager div#acl__tree ul img { - margin-left: 0.25em; - margin-right: 0em; -} - - -div#acl_manager div#acl__detail { - float: left; -} - -div#acl_manager .aclgroup { - background: transparent url(pix/group.png) right 1px no-repeat; - padding: 1px 18px 1px 0px; -} - -div#acl_manager .acluser { - background: transparent url(pix/user.png) right 1px no-repeat; - padding: 1px 18px 1px 0px; -} - -div#acl_manager .aclpage { - background: transparent url(pix/page.png) right 1px no-repeat; - padding: 1px 18px 1px 0px; -} - -div#acl_manager .aclns { - background: transparent url(pix/ns.png) right 1px no-repeat; - padding: 1px 18px 1px 0px; -} - diff --git a/lib/plugins/acl/style.css b/lib/plugins/acl/style.css index b7154aa786175f84ecb91f116afd2acca7e3509a..2eee4f41c3e382e5e5205cf89575cebbb1d4d02b 100644 --- a/lib/plugins/acl/style.css +++ b/lib/plugins/acl/style.css @@ -8,6 +8,10 @@ div#acl_manager div#acl__tree { border: 1px solid __border__; text-align: left; } +[dir=rtl] div#acl_manager div#acl__tree { + float: right; + text-align: right; +} div#acl_manager div#acl__tree a.cur { background-color: __highlight__; @@ -24,11 +28,19 @@ div#acl_manager div#acl__tree li { padding-left: 1em; list-style-image: none; } +[dir=rtl] div#acl_manager div#acl__tree li { + padding-left: 0em; + padding-right: 1em; +} div#acl_manager div#acl__tree ul img { margin-right: 0.25em; cursor: pointer; } +[dir=rtl] div#acl_manager div#acl__tree ul img { + margin-left: 0.25em; + margin-right: 0em; +} div#acl_manager div#acl__detail { width: 73%; @@ -36,6 +48,9 @@ div#acl_manager div#acl__detail { float: right; overflow: auto; } +[dir=rtl] div#acl_manager div#acl__detail { + float: left; +} div#acl_manager div#acl__detail fieldset { width: 90%; @@ -56,21 +71,37 @@ div#acl_manager .aclgroup { background: transparent url(pix/group.png) 0px 1px no-repeat; padding: 1px 0px 1px 18px; } +[dir=rtl] div#acl_manager .aclgroup { + background: transparent url(pix/group.png) right 1px no-repeat; + padding: 1px 18px 1px 0px; +} div#acl_manager .acluser { background: transparent url(pix/user.png) 0px 1px no-repeat; padding: 1px 0px 1px 18px; } +[dir=rtl] div#acl_manager .acluser { + background: transparent url(pix/user.png) right 1px no-repeat; + padding: 1px 18px 1px 0px; +} div#acl_manager .aclpage { background: transparent url(pix/page.png) 0px 1px no-repeat; padding: 1px 0px 1px 18px; } +[dir=rtl] div#acl_manager .aclpage { + background: transparent url(pix/page.png) right 1px no-repeat; + padding: 1px 18px 1px 0px; +} div#acl_manager .aclns { background: transparent url(pix/ns.png) 0px 1px no-repeat; padding: 1px 0px 1px 18px; } +[dir=rtl] div#acl_manager .aclns { + background: transparent url(pix/ns.png) right 1px no-repeat; + padding: 1px 18px 1px 0px; +} div#acl_manager label.disabled { color: __text_neu__!important; diff --git a/lib/plugins/config/lang/ar/lang.php b/lib/plugins/config/lang/ar/lang.php index 3855f4ac12ae81e8503f4e1930444f664365feb5..2e55446ec736198e6751820971276eefb5438ff1 100644 --- a/lib/plugins/config/lang/ar/lang.php +++ b/lib/plugins/config/lang/ar/lang.php @@ -41,9 +41,13 @@ $lang['lang'] = 'لغة الواجهة'; $lang['basedir'] = 'مسار الخادوم (مثال. <code>/dokuwiki/</code>) اترك ÙØ§Ø±ØºØ§ للاكتشا٠التلقائي.'; $lang['baseurl'] = 'عنوان الخادوم (مثال. <code>http://www.yourserver.com</code>). اترك ÙØ§Ø±ØºØ§ للاكتشا٠التلقائي.'; $lang['savedir'] = 'دليل ØÙظ البيانات'; +$lang['cookiedir'] = 'مسار الكعكات. اترك ÙØ§Ø±ØºØ§ لاستخدام baseurl.'; $lang['start'] = 'اسم ØµÙØØ© البداية'; $lang['title'] = 'عنوان الويكي'; $lang['template'] = 'القالب'; +$lang['tagline'] = 'Tagline (ÙÙŠ ØØ§Ù„ دعم القالب له) +'; +$lang['sidebar'] = 'اسم ØµÙØØ© الشريط الجانبي (ÙÙŠ ØØ§Ù„ دعم القالب له). تركه ÙØ§Ø±ØºØ§ يعطل الشريط الجانبي.'; $lang['license'] = 'ØªØØª أي رخصة تريد اصدار Ø§Ù„Ù…ØØªÙˆÙ‰ØŸ'; $lang['fullpath'] = 'اظهر Ø§Ù„Ù…ØØªÙˆÙ‰ الكامل Ù„Ù„ØµÙØØ§Øª ÙÙŠ '; $lang['recent'] = 'Ø£ØØ¯Ø« التغييرات'; @@ -64,6 +68,7 @@ $lang['useheading'] = 'استخدم اول ترويسة كأسم لل $lang['refcheck'] = 'التØÙ‚Ù‚ من مرجع الوسائط'; $lang['refshow'] = 'عدد مراجع الوسائط لتعرض'; $lang['allowdebug'] = 'مكّن Ø§Ù„ØªÙ†Ù‚ÙŠØ <b>عطّلها إن لم تكن Ø¨ØØ§Ø¬Ù„Ø© لها!</b>'; +$lang['mediarevisions'] = 'ØªÙØ¹ÙŠÙ„ إصدارات الوسائط؟'; $lang['usewordblock'] = 'Ø§ØØ¬Ø² الغثاء بناء على قائمة كلمات'; $lang['indexdelay'] = 'التأخير قبل الÙهرسة (ثوان)'; $lang['relnofollow'] = 'استخدم rel="nofollow" للروابط الخارجية'; @@ -86,6 +91,8 @@ $lang['disableactions_other'] = 'اجراءات أخرى (Ù…ÙØµÙˆÙ„Ø© بال٠$lang['sneaky_index'] = 'Ø§ÙØªØ±Ø§Ø¶ÙŠØ§ØŒ ستعرض دوكو ويكي كل اسماء النطاقات ÙÙŠ عرض الÙهرس. ØªÙØ¹ÙŠÙ„ هذا الخيار سيخÙÙŠ مالا يملك المستخدم صلاØÙŠØ© قراءته. قد يؤدي هذا إلى Ø§Ø®ÙØ§Ø¡ نطاقات ÙØ±Ø¹ÙŠØ© Ù…ØªØ§ØØ©. وقد يؤدي لجعل ØµÙØØ© الÙهرس معطلة ÙÙŠ بعض اعدادات ACL.'; $lang['auth_security_timeout'] = 'زمن انتهاء أمان المواثقة (ثوان)'; $lang['securecookie'] = 'هل ÙŠÙØ±Ø¶ على كعكات Ø§Ù„ØªØµÙØ المعدة عبر HTTPS ان ترسل Ùقط عبر HTTPS من قبل Ø§Ù„Ù…ØªØµÙØØŸ عطل هذا إن كان الولوج للويكي مؤمنا Ùقط عبر SSL لكن ØªØµÙØ الويكي غير مؤمن.'; +$lang['remote'] = 'مكّن نظام API البعيد. ÙŠØ³Ù…Ø Ù‡Ø°Ø§ لبرامج أخرى بالوصول للويكي عبر XML-RPC أو آليات أخرى.'; +$lang['remoteuser'] = 'Ø§ØØµØ± الوصول البعيد Ù„ API لمستخدمين ومجموعات ÙŠÙØµÙ„ بينها Ø¨Ø§Ù„ÙØ§ØµÙ„Ø© هنا. اترك ÙØ§Ø±ØºØ§ لتمكين الجميع.'; $lang['updatecheck'] = 'تØÙ‚Ù‚ من Ø§Ù„ØªØØ¯ÙŠØ«Ø§Øª Ùˆ تنبيهات الأمان؟ دوكو ويكي Ø³ØªØØªØ§Ø¬ للاتصال ب update.dokuwiki.org لأجل ذلك'; $lang['userewrite'] = 'استعمل عناوين URLs جميلة'; $lang['useslash'] = 'استخدم الشرطة ÙƒÙØ§ØµÙ„ النطاق ÙÙŠ العناوين'; @@ -109,10 +116,13 @@ $lang['jpg_quality'] = 'دقة ضغط JPG (0-100)'; $lang['subscribers'] = 'مكن دعم اشتراك Ø§Ù„ØµÙØØ©'; $lang['subscribe_time'] = 'المهلة بعد ارسال قوائم الاشتراكات والملخصات (ثوان); هذا يجب أن يكون أقل من الوقت المخصص ÙÙŠ أيام Ø£ØØ¯Ø« التغييرات.'; $lang['compress'] = 'Ø±ÙØµ مخرجات CSS Ùˆ Ø¬Ø§ÙØ§ سكربت'; +$lang['cssdatauri'] = 'Ø§Ù„ØØ¬Ù… بالبايتات للصور المذكورة ÙÙŠ CSS التي Ø³ØªÙØ¶Ù…Ù† ÙÙŠ ØµÙØØ©-التنسيق Ù„Ø®ÙØ¶ طلبات HTTP. لن تعمل هذه التقنية ÙÙŠ IE 7 أو أقل! <code>400</code> إلى <code>600</code> بايت تعد قيمة جيدة. اضبط إلى <code>0</code> لتعطلها.'; $lang['hidepages'] = 'Ø£Ø®Ù Ø§Ù„ØµÙØØ§Øª المنطبق عليها (تعابير شرطية)'; $lang['send404'] = 'ارسل "HTTP 404/Page Not Found" Ù„Ù„ØµÙØØ§Øª غير الموجودة'; $lang['sitemap'] = 'ولد خرائط موقع جوجل (أيام)'; +$lang['broken_iua'] = 'هل Ø§Ù„ÙˆØ¸ÙŠÙØ© ignore_user_abort معطلة على جهازك؟ قد يؤدي ذلك لتعطيل Ùهرسة Ø§Ù„Ø¨ØØ«. IIS+PHP/CGI تعر٠بأنها لاتعمل. أنظر <a href="http://bugs.splitbrain.org/?do=details&task_id=852">العلة 852</a> لمزيد من المعلومات.'; $lang['xsendfile'] = 'استخدم ترويسة X-Sendfile لتمكين خادم الوب من تقديم Ù…Ù„ÙØ§Øª ثابتة؟ يجب أن يكون خادم الوب داعما له.'; +$lang['renderer_xhtml'] = 'Ø§Ù„Ù…ØØ±Ùƒ ليستخدم لمخرجات الويكي الأساسية ÙˆÙÙ‚ (xhtml).'; $lang['renderer__core'] = '%s (نواة دوكو ويكي)'; $lang['renderer__plugin'] = '%s (ملØÙ‚)'; $lang['rememberme'] = 'Ø§Ø³Ù…Ø Ø¨ÙƒØ¹ÙƒØ§Øª الدخول الدائم (تذكرني)'; @@ -122,6 +132,7 @@ $lang['rss_content'] = 'مالذي يعرض ÙÙŠ عناصر تلقيم $lang['rss_update'] = 'ØªØØ¯ÙŠØ« تلقيم XML (ثوان)'; $lang['recent_days'] = 'مدة إبقاء Ø£ØØ¯Ø« التغييرات (ايام)'; $lang['rss_show_summary'] = 'تلقيم XML يظهر ملخصا ÙÙŠ العنوان'; +$lang['rss_media'] = 'مانوع التغييرات التي ستدرج ÙÙŠ تغذية XMLØŸ'; $lang['target____wiki'] = 'Ø§Ù„Ù†Ø§ÙØ°Ø© الهد٠للروابط الداخلية'; $lang['target____interwiki'] = 'Ø§Ù„Ù†Ø§ÙØ°Ø© الهد٠للروابط الممرة interwiki'; $lang['target____extern'] = 'Ø§Ù„Ù†Ø§ÙØ°Ø© الهد٠للروابط الخارجية'; diff --git a/lib/plugins/config/lang/en/lang.php b/lib/plugins/config/lang/en/lang.php index 2151d7543c823d3c341f9ee356a197cf5f250972..83c843b3a497e68a396676c3345773af6390eabf 100644 --- a/lib/plugins/config/lang/en/lang.php +++ b/lib/plugins/config/lang/en/lang.php @@ -36,6 +36,8 @@ $lang['_anti_spam'] = 'Anti-Spam Settings'; $lang['_editing'] = 'Editing Settings'; $lang['_links'] = 'Link Settings'; $lang['_media'] = 'Media Settings'; +$lang['_notifications'] = 'Notification Settings'; +$lang['_syndication'] = 'Syndication Settings'; $lang['_advanced'] = 'Advanced Settings'; $lang['_network'] = 'Network Settings'; // The settings group name for plugins and templates can be set with @@ -52,116 +54,131 @@ $lang['_msg_setting_no_default'] = 'No default value.'; /* -------------------- Config Options --------------------------- */ -$lang['fmode'] = 'File creation mode'; -$lang['dmode'] = 'Directory creation mode'; +/* Basic Settings */ +$lang['title'] = 'Wiki title aka. your wiki\'s name'; +$lang['start'] = 'Page name to use as the starting point for each namespace'; $lang['lang'] = 'Interface language'; -$lang['basedir'] = 'Server path (eg. <code>/dokuwiki/</code>). Leave blank for autodetection.'; -$lang['baseurl'] = 'Server URL (eg. <code>http://www.yourserver.com</code>). Leave blank for autodetection.'; -$lang['savedir'] = 'Directory for saving data'; -$lang['cookiedir'] = 'Cookie path. Leave blank for using baseurl.'; -$lang['start'] = 'Start page name'; -$lang['title'] = 'Wiki title'; -$lang['template'] = 'Template'; +$lang['template'] = 'Template aka. the design of the wiki.'; $lang['tagline'] = 'Tagline (if template supports it)'; $lang['sidebar'] = 'Sidebar page name (if template supports it), empty field disables the sidebar'; $lang['license'] = 'Under which license should your content be released?'; +$lang['savedir'] = 'Directory for saving data'; +$lang['basedir'] = 'Server path (eg. <code>/dokuwiki/</code>). Leave blank for autodetection.'; +$lang['baseurl'] = 'Server URL (eg. <code>http://www.yourserver.com</code>). Leave blank for autodetection.'; +$lang['cookiedir'] = 'Cookie path. Leave blank for using baseurl.'; +$lang['dmode'] = 'Directory creation mode'; +$lang['fmode'] = 'File creation mode'; +$lang['allowdebug'] = 'Allow debug <b>disable if not needed!</b>'; + +/* Display Settings */ +$lang['recent'] = 'Number of entries per page in the recent changes'; +$lang['recent_days'] = 'How many recent changes to keep (days)'; +$lang['breadcrumbs'] = 'Number of "trace" breadcrumbs. Set to 0 to disable.'; +$lang['youarehere'] = 'Use hierarchical breadcrumbs (you probably want to disable the above option then)'; $lang['fullpath'] = 'Reveal full path of pages in the footer'; -$lang['recent'] = 'Recent changes'; -$lang['breadcrumbs'] = 'Number of breadcrumbs'; -$lang['youarehere'] = 'Hierarchical breadcrumbs'; $lang['typography'] = 'Do typographical replacements'; -$lang['htmlok'] = 'Allow embedded HTML'; -$lang['phpok'] = 'Allow embedded PHP'; $lang['dformat'] = 'Date format (see PHP\'s <a href="http://www.php.net/strftime">strftime</a> function)'; -$lang['signature'] = 'Signature'; +$lang['signature'] = 'What to insert with the signature button in the editor'; +$lang['showuseras'] = 'What to display when showing the user that last edited a page'; $lang['toptoclevel'] = 'Top level for table of contents'; $lang['tocminheads'] = 'Minimum amount of headlines that determines whether the TOC is built'; $lang['maxtoclevel'] = 'Maximum level for table of contents'; $lang['maxseclevel'] = 'Maximum section edit level'; $lang['camelcase'] = 'Use CamelCase for links'; -$lang['deaccent'] = 'Clean pagenames'; +$lang['deaccent'] = 'How to clean pagenames'; $lang['useheading'] = 'Use first heading for pagenames'; -$lang['refcheck'] = 'Media reference check'; -$lang['refshow'] = 'Number of media references to show'; -$lang['allowdebug'] = 'Allow debug <b>disable if not needed!</b>'; -$lang['mediarevisions'] = 'Enable Mediarevisions?'; +$lang['sneaky_index'] = 'By default, DokuWiki will show all namespaces in the sitemap. Enabling this option will hide those where the user doesn\'t have read permissions. This might result in hiding of accessable subnamespaces which may make the index unusable with certain ACL setups.'; +$lang['hidepages'] = 'Hide pages matching this regular expressions from search, the sitemap and other automatic indexes'; -$lang['usewordblock']= 'Block spam based on wordlist'; -$lang['indexdelay'] = 'Time delay before indexing (sec)'; -$lang['relnofollow'] = 'Use rel="nofollow" on external links'; -$lang['mailguard'] = 'Obfuscate email addresses'; -$lang['iexssprotect']= 'Check uploaded files for possibly malicious JavaScript or HTML code'; -$lang['showuseras'] = 'What to display when showing the user that last edited a page'; - -/* Authentication Options */ +/* Authentication Settings */ $lang['useacl'] = 'Use access control lists'; $lang['autopasswd'] = 'Autogenerate passwords'; $lang['authtype'] = 'Authentication backend'; $lang['passcrypt'] = 'Password encryption method'; -$lang['defaultgroup']= 'Default group'; +$lang['defaultgroup']= 'Default group, all new users will be placed in this group'; $lang['superuser'] = 'Superuser - group, user or comma separated list user1,@group1,user2 with full access to all pages and functions regardless of the ACL settings'; $lang['manager'] = 'Manager - group, user or comma separated list user1,@group1,user2 with access to certain management functions'; $lang['profileconfirm'] = 'Confirm profile changes with password'; +$lang['rememberme'] = 'Allow permanent login cookies (remember me)'; $lang['disableactions'] = 'Disable DokuWiki actions'; $lang['disableactions_check'] = 'Check'; $lang['disableactions_subscription'] = 'Subscribe/Unsubscribe'; $lang['disableactions_wikicode'] = 'View source/Export Raw'; $lang['disableactions_other'] = 'Other actions (comma separated)'; -$lang['sneaky_index'] = 'By default, DokuWiki will show all namespaces in the index view. Enabling this option will hide those where the user doesn\'t have read permissions. This might result in hiding of accessable subnamespaces. This may make the index unusable with certain ACL setups.'; $lang['auth_security_timeout'] = 'Authentication Security Timeout (seconds)'; $lang['securecookie'] = 'Should cookies set via HTTPS only be sent via HTTPS by the browser? Disable this option when only the login of your wiki is secured with SSL but browsing the wiki is done unsecured.'; $lang['remote'] = 'Enable the remote API system. This allows other applications to access the wiki via XML-RPC or other mechanisms.'; $lang['remoteuser'] = 'Restrict remote API access to the comma separated groups or users given here. Leave empty to give access to everyone.'; +/* Anti-Spam Settings */ +$lang['usewordblock']= 'Block spam based on wordlist'; +$lang['relnofollow'] = 'Use rel="nofollow" on external links'; +$lang['indexdelay'] = 'Time delay before indexing (sec)'; +$lang['mailguard'] = 'Obfuscate email addresses'; +$lang['iexssprotect']= 'Check uploaded files for possibly malicious JavaScript or HTML code'; + +/* Editing Settings */ +$lang['usedraft'] = 'Automatically save a draft while editing'; +$lang['htmlok'] = 'Allow embedded HTML'; +$lang['phpok'] = 'Allow embedded PHP'; +$lang['locktime'] = 'Maximum age for lock files (sec)'; +$lang['cachetime'] = 'Maximum age for cache (sec)'; + +/* Link settings */ +$lang['target____wiki'] = 'Target window for internal links'; +$lang['target____interwiki'] = 'Target window for interwiki links'; +$lang['target____extern'] = 'Target window for external links'; +$lang['target____media'] = 'Target window for media links'; +$lang['target____windows'] = 'Target window for windows links'; + +/* Media Settings */ +$lang['mediarevisions'] = 'Enable Mediarevisions?'; +$lang['refcheck'] = 'Check if a media file is still in use before deleting it'; +$lang['refshow'] = 'Number of media references to show when the above setting is enabled'; +$lang['gdlib'] = 'GD Lib version'; +$lang['im_convert'] = 'Path to ImageMagick\'s convert tool'; +$lang['jpg_quality'] = 'JPG compression quality (0-100)'; +$lang['fetchsize'] = 'Maximum size (bytes) fetch.php may download from external URLs, eg. to cache and resize external images.'; + +/* Notification Settings */ +$lang['subscribers'] = 'Allow users to subscribe to page changes by email'; +$lang['subscribe_time'] = 'Time after which subscription lists and digests are sent (sec); This should be smaller than the time specified in recent_days.'; +$lang['notify'] = 'Always send change notifications to this email address'; +$lang['registernotify'] = 'Always send info on newly registered users to this email address'; +$lang['mailfrom'] = 'Sender email address to use for automatic mails'; +$lang['mailprefix'] = 'Email subject prefix to use for automatic mails. Leave blank to use the wiki title'; +$lang['htmlmail'] = 'Send better looking, but larger in size HTML multipart emails. Disable for plain text only mails.'; + +/* Syndication Settings */ +$lang['sitemap'] = 'Generate Google sitemap this often (in days). 0 to disable'; +$lang['rss_type'] = 'XML feed type'; +$lang['rss_linkto'] = 'XML feed links to'; +$lang['rss_content'] = 'What to display in the XML feed items?'; +$lang['rss_update'] = 'XML feed update interval (sec)'; +$lang['rss_show_summary'] = 'XML feed show summary in title'; +$lang['rss_media'] = 'What kind of changes should be listed in the XML feed?'; + /* Advanced Options */ $lang['updatecheck'] = 'Check for updates and security warnings? DokuWiki needs to contact update.dokuwiki.org for this feature.'; $lang['userewrite'] = 'Use nice URLs'; $lang['useslash'] = 'Use slash as namespace separator in URLs'; -$lang['usedraft'] = 'Automatically save a draft while editing'; $lang['sepchar'] = 'Page name word separator'; $lang['canonical'] = 'Use fully canonical URLs'; $lang['fnencode'] = 'Method for encoding non-ASCII filenames.'; $lang['autoplural'] = 'Check for plural forms in links'; $lang['compression'] = 'Compression method for attic files'; -$lang['cachetime'] = 'Maximum age for cache (sec)'; -$lang['locktime'] = 'Maximum age for lock files (sec)'; -$lang['fetchsize'] = 'Maximum size (bytes) fetch.php may download from extern'; -$lang['notify'] = 'Send change notifications to this email address'; -$lang['registernotify'] = 'Send info on newly registered users to this email address'; -$lang['mailfrom'] = 'Email address to use for automatic mails'; -$lang['mailprefix'] = 'Email subject prefix to use for automatic mails'; $lang['gzip_output'] = 'Use gzip Content-Encoding for xhtml'; -$lang['gdlib'] = 'GD Lib version'; -$lang['im_convert'] = 'Path to ImageMagick\'s convert tool'; -$lang['jpg_quality'] = 'JPG compression quality (0-100)'; -$lang['subscribers'] = 'Enable page subscription support'; -$lang['subscribe_time'] = 'Time after which subscription lists and digests are sent (sec); This should be smaller than the time specified in recent_days.'; $lang['compress'] = 'Compact CSS and javascript output'; $lang['cssdatauri'] = 'Size in bytes up to which images referenced in CSS files should be embedded right into the stylesheet to reduce HTTP request header overhead. This technique won\'t work in IE 7 and below! <code>400</code> to <code>600</code> bytes is a good value. Set <code>0</code> to disable.'; -$lang['hidepages'] = 'Hide matching pages (regular expressions)'; $lang['send404'] = 'Send "HTTP 404/Page Not Found" for non existing pages'; -$lang['sitemap'] = 'Generate Google sitemap (days)'; -$lang['broken_iua'] = 'Is the ignore_user_abort function broken on your system? This could cause a non working search index. IIS+PHP/CGI is known to be broken. See <a href="http://bugs.splitbrain.org/?do=details&task_id=852">Bug 852</a> for more info.'; +$lang['broken_iua'] = 'Is the ignore_user_abort function broken on your system? This could cause a non working search index. IIS+PHP/CGI is known to be broken. See <a href="http://bugs.dokuwiki.org/?do=details&task_id=852">Bug 852</a> for more info.'; $lang['xsendfile'] = 'Use the X-Sendfile header to let the webserver deliver static files? Your webserver needs to support this.'; $lang['renderer_xhtml'] = 'Renderer to use for main (xhtml) wiki output'; $lang['renderer__core'] = '%s (dokuwiki core)'; $lang['renderer__plugin'] = '%s (plugin)'; -$lang['rememberme'] = 'Allow permanent login cookies (remember me)'; - -$lang['rss_type'] = 'XML feed type'; -$lang['rss_linkto'] = 'XML feed links to'; -$lang['rss_content'] = 'What to display in the XML feed items?'; -$lang['rss_update'] = 'XML feed update interval (sec)'; -$lang['recent_days'] = 'How many recent changes to keep (days)'; -$lang['rss_show_summary'] = 'XML feed show summary in title'; -$lang['rss_media'] = 'What kind of changes should be listed in the XML feed?'; -/* Target options */ -$lang['target____wiki'] = 'Target window for internal links'; -$lang['target____interwiki'] = 'Target window for interwiki links'; -$lang['target____extern'] = 'Target window for external links'; -$lang['target____media'] = 'Target window for media links'; -$lang['target____windows'] = 'Target window for windows links'; +/* Network Options */ +$lang['dnslookups'] = 'DokuWiki will lookup hostnames for remote IP addresses of users editing pages. If you have a slow or non working DNS server or don\'t want this feature, disable this option'; /* Proxy Options */ $lang['proxy____host'] = 'Proxy servername'; @@ -179,6 +196,7 @@ $lang['ftp____user'] = 'FTP user name for safemode hack'; $lang['ftp____pass'] = 'FTP password for safemode hack'; $lang['ftp____root'] = 'FTP root directory for safemode hack'; +/* License Options */ $lang['license_o_'] = 'None chosen'; /* typography options */ diff --git a/lib/plugins/config/lang/eo/intro.txt b/lib/plugins/config/lang/eo/intro.txt index c717d9a4d260b6d64261c5b96cad3e5b754012b1..5ed2f0ecb7c50061929de4624b0327849657df71 100644 --- a/lib/plugins/config/lang/eo/intro.txt +++ b/lib/plugins/config/lang/eo/intro.txt @@ -1,7 +1,7 @@ ====== Administrilo de Agordoj ====== -Uzu tiun ĉi paÄon por kontroli la difinojn de via DokuWiki-instalo. Por helpo pri specifaj difinoj aliru al [[doku>config]]. Por pli detaloj pri tiu ĉi kromaĵo, vidu [[doku>plugin:config]]. +Uzu tiun ĉi paÄon por kontroli la difinojn de via DokuWiki-instalo. Por helpo pri specifaj difinoj aliru al [[doku>config]]. Por pli detaloj pri tiu ĉi kromaĵo, vidu [[doku>plugin:config]]. -Difinoj montrataj kun hela ruÄa fono estas protektitaj kaj ne povas esti modifataj per tiu ĉi kromaĵo. Difinoj kun blua fono estas aprioraj valoroj kaj difinoj montrataj kun blanka fono estis iam difinataj por tiu ĉi specifa instalo. AmbaÅ blua kaj blanka difinoj povas esti modifataj. +Difinoj montrataj kun helruÄa fono estas protektitaj kaj ne povas esti modifataj per tiu ĉi kromaĵo. Difinoj kun blua fono estas aprioraj valoroj kaj difinoj montrataj kun blanka fono iam difiniÄis por tiu ĉi specifa instalo. AmbaÅ blua kaj blanka difinoj povas esti modifataj. Memoru premi la butonon **Registri** antaÅ ol eliri tiun ĉi paÄon, male viaj modifoj perdiÄus. diff --git a/lib/plugins/config/lang/eo/lang.php b/lib/plugins/config/lang/eo/lang.php index 3acb0054534617b51b7e95f97c91379e9696418e..de3c95bb5b2e984708e931e990f785a1aa2865e0 100644 --- a/lib/plugins/config/lang/eo/lang.php +++ b/lib/plugins/config/lang/eo/lang.php @@ -9,17 +9,15 @@ * @author Robert Bogenschneider <robog@gmx.de> * @author Erik Pedersen <erik pedersen@shaw.ca> * @author Erik Pedersen <erik.pedersen@shaw.ca> - * @author Robert Bogenschneider <robog@GMX.de> - * @author Robert BOGENSCHNEIDER <robog@gmx.de> - * @author Robert BOGENSCHNEIDER <bogi@UEA.org> + * @author Robert Bogenschneider <bogi@uea.org> */ $lang['menu'] = 'Agordaj Difinoj'; $lang['error'] = 'La difinoj ne estas Äisdatigitaj pro malvalida valoro: bonvolu revizii viajn ÅanÄojn kaj resubmeti ilin. -<br />La malkorekta(j) valoro(j) estas ĉirkaÅita(j) de ruÄa kadro.'; -$lang['updated'] = 'La difinoj estis sukcese Äisdatigitaj.'; +<br />La malkorekta(j) valoro(j) estas ĉirkaÅita(j) de ruÄa kadro.'; +$lang['updated'] = 'La difinoj sukcese ÄisdatiÄis.'; $lang['nochoice'] = '(neniu alia elekto disponeblas)'; -$lang['locked'] = 'La difin-dosiero ne povas esti Äisdatigita; se tio ne estas intenca, <br /> certiÄu, ke la dosieroj de lokaj difinoj havas korektajn nomojn kaj permesojn.'; -$lang['danger'] = 'DanÄero: ÅanÄo tiun opcion povus igi vian vikion kaj la agordan menuon neatingebla.'; +$lang['locked'] = 'La difin-dosiero ne povas esti Äisdatigita; se tio ne estas intenca, <br /> certiÄu, ke la dosieroj de lokaj difinoj havas korektajn nomojn kaj permesojn.'; +$lang['danger'] = 'DanÄero: ÅanÄi tiun opcion povus igi vian vikion kaj la agordan menuon neatingebla.'; $lang['warning'] = 'Averto: ÅanÄi tiun opcion povus rezulti en neatendita konduto.'; $lang['security'] = 'Sekureca averto: ÅanÄi tiun opcion povus krei sekurecan riskon.'; $lang['_configuration_manager'] = 'Administrilo de agordoj'; @@ -38,7 +36,7 @@ $lang['_advanced'] = 'Fakaj difinoj'; $lang['_network'] = 'Difinoj por reto'; $lang['_plugin_sufix'] = 'Difinoj por kromaĵoj'; $lang['_template_sufix'] = 'Difinoj por Åablonoj'; -$lang['_msg_setting_undefined'] = 'Neniu difinanta metadatenaro.'; +$lang['_msg_setting_undefined'] = 'Neniu difinanta metadatumaro.'; $lang['_msg_setting_no_class'] = 'Neniu difinanta klaso.'; $lang['_msg_setting_no_default'] = 'Neniu apriora valoro.'; $lang['fmode'] = 'ReÄimo de dosiero-kreado'; @@ -46,11 +44,13 @@ $lang['dmode'] = 'ReÄimo de dosierujo-kreado'; $lang['lang'] = 'Lingvo'; $lang['basedir'] = 'Baza dosierujo'; $lang['baseurl'] = 'Baza URL'; -$lang['savedir'] = 'Dosierujo por konservi datenaron'; +$lang['savedir'] = 'Dosierujo por konservi datumaron'; $lang['cookiedir'] = 'Kuketopado. Lasu malplena por uzi baseurl.'; $lang['start'] = 'Nomo de la hejmpaÄo'; $lang['title'] = 'Titolo de la vikio'; $lang['template'] = 'Åœablono'; +$lang['tagline'] = 'Moto (se la Åablono antaûvidas tion)'; +$lang['sidebar'] = 'Nomo de la flanka paÄo (se la Åablono antaûvidas tion), malplena kampo malebligas la flankan paÄon'; $lang['license'] = 'LaÅ kiu permesilo via enhavo devus esti publikigita?'; $lang['fullpath'] = 'Montri la kompletan padon de la paÄoj en la piedlinio'; $lang['recent'] = 'FreÅaj ÅanÄoj'; @@ -59,10 +59,10 @@ $lang['youarehere'] = 'Hierarkiaj paderoj'; $lang['typography'] = 'Fari tipografiajn anstataÅigojn'; $lang['htmlok'] = 'Ebligi enmeton de HTML-aĵoj'; $lang['phpok'] = 'Ebligi enmeton de PHP-aĵoj'; -$lang['dformat'] = 'Formato de datoj (vidu la PHP-an funkcion <a href="http://www.php.net/strftime">strftime</a>)'; +$lang['dformat'] = 'Formato de datoj (vidu la PHP-an funkcion <a href="http://www.php.net/strftime">strftime</a>)'; $lang['signature'] = 'Subskribo'; $lang['toptoclevel'] = 'Supera nivelo por la enhavtabelo'; -$lang['tocminheads'] = 'Minimuma kvanto da ĉeftitoloj, kiu difinas ĉu la TOC estas kreita.'; +$lang['tocminheads'] = 'Minimuma kvanto da ĉeftitoloj, kiu difinas ĉu la TOC estas kreata.'; $lang['maxtoclevel'] = 'Maksimuma nivelo por la enhavtabelo'; $lang['maxseclevel'] = 'Maksimuma nivelo por redakti sekciojn'; $lang['camelcase'] = 'Uzi KamelUsklecon por ligiloj'; @@ -70,34 +70,37 @@ $lang['deaccent'] = 'Netaj paÄnomoj'; $lang['useheading'] = 'Uzi unuan titolon por paÄnomoj'; $lang['refcheck'] = 'Kontrolo por referencoj al aÅdvidaĵoj'; $lang['refshow'] = 'Nombro da referencoj al aÅdvidaĵoj por montri'; -$lang['allowdebug'] = 'Ebligi kodumpurigadon <b>malebligu se ne necese!</b>'; +$lang['allowdebug'] = 'Ebligi kodumpurigadon <b>malebligu se ne necese!<;/b>'; +$lang['mediarevisions'] = 'Ĉu ebligi reviziadon de aÅdvidaĵoj?'; $lang['usewordblock'] = 'Bloki spamon surbaze de vortlisto'; $lang['indexdelay'] = 'Prokrasto antaÅ ol indeksi (en sekundoj)'; -$lang['relnofollow'] = 'Uzi rel="nofollow" kun eksteraj ligiloj'; +$lang['relnofollow'] = 'Uzi rel="nofollow" kun eksteraj ligiloj'; $lang['mailguard'] = 'Nebuligi retadresojn'; $lang['iexssprotect'] = 'Ekzameni elÅutaĵojn kontraÅ eblaj malicaj Ä´avaSkripto aÅ HTML-a kodumaĵo'; -$lang['showuseras'] = 'Kion montrigi dum indiko al la uzanto kiu laste redaktis paÄon.'; +$lang['showuseras'] = 'Kiel indiki la lastan redaktinton'; $lang['useacl'] = 'Uzi alirkontrolajn listojn'; $lang['autopasswd'] = 'AÅtomate krei pasvortojn'; $lang['authtype'] = 'Tipo de identiÄo'; $lang['passcrypt'] = 'Metodo por ĉifri pasvortojn'; $lang['defaultgroup'] = 'AntaÅdifinita grupo'; -$lang['superuser'] = 'Superanto - grupo, uzanto aÅ listo (apartite per komoj), kiu plene alireblas al ĉiuj paÄoj kaj funkcioj, sendepende de la reguloj ACL'; +$lang['superuser'] = 'Superanto - grupo, uzanto aÅ listo (disigita per komoj), kiu plene alireblas al ĉiuj paÄoj kaj funkcioj, sendepende de la reguloj ACL'; $lang['manager'] = 'Administranto - grupo, uzanto aÅ listo (apartite per komoj), kiu havas alirpermeson al kelkaj administraj funkcioj'; $lang['profileconfirm'] = 'Konfirmi ÅanÄojn en la trajtaro per pasvorto'; $lang['disableactions'] = 'Malebligi DokuWiki-ajn agojn'; $lang['disableactions_check'] = 'Kontroli'; $lang['disableactions_subscription'] = 'AliÄi/MalaliÄi'; -$lang['disableactions_wikicode'] = 'Rigardi vikitekston/Eksporti krudaĵon'; -$lang['disableactions_other'] = 'Aliaj agoj (apartite per komoj)'; -$lang['sneaky_index'] = 'Apriore, DokuWiki montras ĉiujn nomspacojn en la indeksa modo. Ebligi tiun ĉi elekteblon kaÅus tion, kion la uzanto ne rajtas legi laÅ ACL. Tio povus rezulti ankaÅan kaÅon de alireblaj subnomspacoj. Kaj tiel la indekso estus neuzebla por kelkaj agordoj de ACL.'; -$lang['auth_security_timeout'] = 'Sekureca Templimo por aÅtentigo (sekundoj)'; -$lang['securecookie'] = 'Ĉu kuketoj difinitaj per HTTPS nur estu senditaj de la foliumilo per HTTPS? Malebligu tiun ĉi opcion kiam nur la ensaluto al via vikio estas sekurigita per SSL, sed foliumado de la vikio estas farita malsekure.'; +$lang['disableactions_wikicode'] = 'Rigardi vikitekston/Eksporti fontotekston'; +$lang['disableactions_other'] = 'Aliaj agoj (disigita per komoj)'; +$lang['sneaky_index'] = 'Apriore, DokuWiki montras ĉiujn nomspacojn en la indeksa modo. Ebligi tiun ĉi elekteblon kaÅus tion, kion la uzanto ne rajtas legi laÅ ACL. Tio povus rezulti ankaÅan kaÅon de alireblaj subnomspacoj. Tiel la indekso estus neuzebla por kelkaj agordoj de ACL.'; +$lang['auth_security_timeout'] = 'Sekureca tempolimo por aÅtentigo (sekundoj)'; +$lang['securecookie'] = 'Ĉu kuketoj difinitaj per HTTPS sendiÄu de la foliumilo nur per HTTPS? Malebligu tiun ĉi opcion kiam nur la ensaluto al via vikio estas sekurigita per SSL, sed foliumado de la vikio estas farita malsekure.'; +$lang['xmlrpc'] = 'Ebligi/malebligi la interfacon XML-RPC.'; +$lang['xmlrpcuser'] = 'Permesi XML-RPC-an aliron al certaj grupoj aÅ uzantoj, bonvolu meti iliajn komodisigitajn nomojn tien ĉi. Lasu Äin malplena, se ĉiu povu aliri.'; $lang['updatecheck'] = 'Ĉu kontroli aktualigojn kaj sekurecajn avizojn? DokuWiki bezonas kontakti update.dokuwiki.org por tiu ĉi trajto.'; $lang['userewrite'] = 'Uzi netajn URL-ojn'; -$lang['useslash'] = 'Uzi frakcistrekon kiel apartigsignaĵo por nomspacoj en URL-oj'; +$lang['useslash'] = 'Uzi frakcistrekon kiel disigsignaĵon por nomspacoj en URL-oj'; $lang['usedraft'] = 'AÅtomate konservi skizon dum redaktado'; -$lang['sepchar'] = 'Apartigsignaĵo de vortoj en paÄnomoj'; +$lang['sepchar'] = 'Disigsignaĵo de vortoj en paÄnomoj'; $lang['canonical'] = 'Uzi tute evidentajn URL-ojn'; $lang['fnencode'] = 'Kodiga metodo por ne-ASCII-aj dosiernomoj.'; $lang['autoplural'] = 'Kontroli pluralajn formojn en ligiloj'; @@ -116,13 +119,13 @@ $lang['jpg_quality'] = 'Kompaktiga kvalito de JPG (0-100)'; $lang['subscribers'] = 'Ebligi subtenon de avizoj pri ÅanÄoj sur paÄoj'; $lang['subscribe_time'] = 'Tempo, post kiu abonlistoj kaj kolektaĵoj sendiÄas (sek); Tio estu pli malgranda ol la tempo indikita en recent_days.'; $lang['compress'] = 'Kompaktigi CSS-ajn kaj ĵavaskriptajn elmetojn'; -$lang['cssdatauri'] = 'Grandeco en bitokoj, Äis kiom en CSS-dosieroj referencitaj bildoj estu enmetataj rekte en la stilfolion por malgrandigi vanan HTTP-kapan trafikon. Tiu tekniko ne funkcias en IE 7 aÅ pli frua! -<code>400</code> Äis <code>600</code> bitokoj estas bona grandeco. Indiku <code>0</code> por malebligi enmeton.'; +$lang['cssdatauri'] = 'Grandeco en bitokoj, Äis kiom en CSS-dosieroj referencitaj bildoj enmetiÄu rekte en la stilfolion por malgrandigi vanan HTTP-kapan trafikon. Tiu tekniko ne funkcias en IE 7 aÅ pli frua! +<code>400</code> Äis <code>600</code> bitokoj estas bona grandeco. Indiku <code>0</code> por malebligi enmeton.'; $lang['hidepages'] = 'KaÅi kongruantajn paÄojn (laÅ regulaj esprimoj)'; -$lang['send404'] = 'Sendi la mesaÄon "HTTP 404/PaÄo ne trovita" por ne ekzistantaj paÄoj'; -$lang['sitemap'] = 'Krei Guglan paÄarmapon "sitemap" (po kiom tagoj)'; -$lang['broken_iua'] = 'Ĉu la funkcio "ignore_user_abort" difektas en via sistemo? Tio povus misfunkciigi la serĉindekson. IIS+PHP/CGI estas konata kiel fuÅaĵo. Vidu <a href="http://bugs.splitbrain.org/?do=details&task_id=852">Cimon 852</a> por pli da informoj.'; -$lang['xsendfile'] = 'Ĉu uzi la kaplinion X-Sendfile por ebligi al la retservilo liveri fiksajn dosierojn? Via retservilo bezonus subteni tion.'; +$lang['send404'] = 'Sendi la mesaÄon "HTTP 404/PaÄo ne trovita" por ne ekzistantaj paÄoj'; +$lang['sitemap'] = 'Krei Guglan paÄarmapon "sitemap" (po kiom tagoj)'; +$lang['broken_iua'] = 'Ĉu la funkcio "ignore_user_abort" difektas en via sistemo? Tio povus misfunkciigi la serĉindekson. IIS+PHP/CGI estas konata kiel fuÅaĵo. Vidu <a href="http://bugs.splitbrain.org/?do=details&task_id=852&">Cimon 852</a> por pli da informoj.'; +$lang['xsendfile'] = 'Ĉu uzi la kaplinion X-Sendfile por ebligi al la retservilo liveri fiksajn dosierojn? Via retservilo subtenu tion.'; $lang['renderer_xhtml'] = 'Prezentilo por la ĉefa vikia rezulto (xhtml)'; $lang['renderer__core'] = '%s (DokuWiki-a kerno)'; $lang['renderer__plugin'] = '%s (kromaĵo)'; @@ -133,16 +136,16 @@ $lang['rss_content'] = 'Kion montri en la XML-aj novaĵ-flueroj?'; $lang['rss_update'] = 'Intertempo por Äisdatigi XML-an novaĵ-fluon (sek.)'; $lang['recent_days'] = 'Kiom da freÅaj ÅanÄoj por teni (tagoj)'; $lang['rss_show_summary'] = 'XML-a novaĵ-fluo montras resumon en la titolo'; -$lang['target____wiki'] = 'Parametro "target" (celo) por internaj ligiloj'; -$lang['target____interwiki'] = 'Parametro "target" (celo) por intervikiaj ligiloj'; -$lang['target____extern'] = 'Parametro "target" (celo) por eksteraj ligiloj'; -$lang['target____media'] = 'Parametro "target" (celo) por aÅdvidaĵaj ligiloj'; -$lang['target____windows'] = 'Parametro "target" (celo) por Vindozaj ligiloj'; -$lang['proxy____host'] = 'Retservilnomo de la "Proxy"'; -$lang['proxy____port'] = 'Pordo ĉe la "Proxy"'; -$lang['proxy____user'] = 'Uzantonomo ĉe la "Proxy"'; -$lang['proxy____pass'] = 'Pasvorto ĉe la "Proxy"'; -$lang['proxy____ssl'] = 'Uzi SSL por konekti al la "Proxy"'; +$lang['target____wiki'] = 'Parametro "target" (celo) por internaj ligiloj'; +$lang['target____interwiki'] = 'Parametro "target" (celo) por intervikiaj ligiloj'; +$lang['target____extern'] = 'Parametro "target" (celo) por eksteraj ligiloj'; +$lang['target____media'] = 'Parametro "target" (celo) por aÅdvidaĵaj ligiloj'; +$lang['target____windows'] = 'Parametro "target" (celo) por Vindozaj ligiloj'; +$lang['proxy____host'] = 'Retservilnomo de la "Proxy"'; +$lang['proxy____port'] = 'Pordo ĉe la "Proxy"'; +$lang['proxy____user'] = 'Uzantonomo ĉe la "Proxy"'; +$lang['proxy____pass'] = 'Pasvorto ĉe la "Proxy"'; +$lang['proxy____ssl'] = 'Uzi SSL por konekti al la "Proxy"'; $lang['proxy____except'] = 'Regula esprimo por URL-oj, kiujn la servilo preterrigardu.'; $lang['safemodehack'] = 'Ebligi sekuran modon'; $lang['ftp____host'] = 'FTP-a servilo por sekura modo'; @@ -150,7 +153,7 @@ $lang['ftp____port'] = 'FTP-a pordo por sekura modo'; $lang['ftp____user'] = 'FTP-a uzantonomo por sekura modo'; $lang['ftp____pass'] = 'FTP-a pasvorto por sekura modo'; $lang['ftp____root'] = 'FTP-a superuzanta (root) subdosierujo por sekura modo'; -$lang['license_o_'] = 'Nenio elektite'; +$lang['license_o_'] = 'Nenio elektita'; $lang['typography_o_0'] = 'nenio'; $lang['typography_o_1'] = 'Nur duoblaj citiloj'; $lang['typography_o_2'] = 'Ĉiaj citiloj (eble ne ĉiam funkcios)'; @@ -169,8 +172,8 @@ $lang['rss_type_o_rss2'] = 'RSS 2.0'; $lang['rss_type_o_atom'] = 'Atom 0.3'; $lang['rss_type_o_atom1'] = 'Atom 1.0'; $lang['rss_content_o_abstract'] = 'Resumo'; -$lang['rss_content_o_diff'] = 'Unuigita "Diff"'; -$lang['rss_content_o_htmldiff'] = '"Diff"-tabelo formatita laÅ HTML'; +$lang['rss_content_o_diff'] = 'Unuigita "Diff"'; +$lang['rss_content_o_htmldiff'] = '"Diff"-tabelo formatita laÅ HTML'; $lang['rss_content_o_html'] = 'Enhavo laÅ kompleta HTML-paÄo'; $lang['rss_linkto_o_diff'] = 'diferenca rigardo'; $lang['rss_linkto_o_page'] = 'la reviziita paÄo'; @@ -180,12 +183,12 @@ $lang['compression_o_0'] = 'nenio'; $lang['compression_o_gz'] = 'gzip'; $lang['compression_o_bz2'] = 'bz2'; $lang['xsendfile_o_0'] = 'ne uzi'; -$lang['xsendfile_o_1'] = 'Propra kaplinio "lighttpd" (antaÅ versio 1.5)'; +$lang['xsendfile_o_1'] = 'Propra kaplinio "lighttpd" (antaÅ versio 1.5)'; $lang['xsendfile_o_2'] = 'Ordinara kaplinio X-Sendfile'; $lang['xsendfile_o_3'] = 'Propra kaplinio Nginx X-Accel-Redirect'; $lang['showuseras_o_loginname'] = 'Ensalut-nomo'; $lang['showuseras_o_username'] = 'Kompleta nomo de uzanto'; -$lang['showuseras_o_email'] = 'Retadreso de uzanto (sekur-montrita laÅ agordo de mailguard)'; +$lang['showuseras_o_email'] = 'Retadreso de uzanto (sekur-montrita laÅ agordo de nebuligo)'; $lang['showuseras_o_email_link'] = 'Retadreso de uzanto kiel mailto:-ligilo'; $lang['useheading_o_0'] = 'Neniam'; $lang['useheading_o_navigation'] = 'Nur foliumado'; diff --git a/lib/plugins/config/lang/fr/lang.php b/lib/plugins/config/lang/fr/lang.php index 4a67a0fc8f0b0fed58fdf5c2000ea89c5f20b43f..591e9f2fba3440be4b709ed585153b52e75b4067 100644 --- a/lib/plugins/config/lang/fr/lang.php +++ b/lib/plugins/config/lang/fr/lang.php @@ -17,6 +17,7 @@ * @author Johan Guilbaud <guilbaud.johan@gmail.com> * @author schplurtz@laposte.net * @author skimpax@gmail.com + * @author Yannick Aure <yannick.aure@gmail.com> */ $lang['menu'] = 'Paramètres de configuration'; $lang['error'] = 'Paramètres non modifiés en raison d\'une valeur non valide, vérifiez vos réglages et réessayez. <br />Les valeurs erronées sont entourées d\'une bordure rouge.'; @@ -38,6 +39,8 @@ $lang['_anti_spam'] = 'Paramètres anti-spam'; $lang['_editing'] = 'Paramètres d\'édition'; $lang['_links'] = 'Paramètres des liens'; $lang['_media'] = 'Paramètres média'; +$lang['_notifications'] = 'Paramètres de Notification'; +$lang['_syndication'] = 'Paramètres de Syndication'; $lang['_advanced'] = 'Paramètres avancés'; $lang['_network'] = 'Paramètres réseaux'; $lang['_plugin_sufix'] = 'Paramètres de module'; @@ -45,26 +48,27 @@ $lang['_template_sufix'] = 'Paramètres de modèle'; $lang['_msg_setting_undefined'] = 'Pas de métadonnée de paramètres.'; $lang['_msg_setting_no_class'] = 'Pas de classe de paramètres.'; $lang['_msg_setting_no_default'] = 'Pas de valeur par défaut.'; -$lang['fmode'] = 'Mode de création des fichiers'; -$lang['dmode'] = 'Mode de création des répertoires'; +$lang['title'] = 'Titre du wiki'; +$lang['start'] = 'Nom de la page d\'accueil'; $lang['lang'] = 'Langue'; +$lang['template'] = 'Modèle'; +$lang['license'] = 'Sous quelle licence doit être placé le contenu ?'; +$lang['savedir'] = 'Répertoire de stockage'; $lang['basedir'] = 'Répertoire de base (ex. : <code>/dokuwiki/</code>). Laisser vide pour une détection automatique.'; $lang['baseurl'] = 'URL de base. Laisser vide pour une détection automatique.'; -$lang['savedir'] = 'Répertoire de stockage'; $lang['cookiedir'] = 'Chemin des cookies. Laissez vide pour utiliser l\'URL de base.'; -$lang['start'] = 'Nom de la page d\'accueil'; -$lang['title'] = 'Titre du wiki'; -$lang['template'] = 'Modèle'; -$lang['license'] = 'Sous quelle licence doit être placé le contenu ?'; -$lang['fullpath'] = 'Utiliser le chemin complet dans le pied de page'; +$lang['dmode'] = 'Mode de création des répertoires'; +$lang['fmode'] = 'Mode de création des fichiers'; +$lang['allowdebug'] = 'Debug (<strong>Ne l\'activez que si vous en avez besoin !</strong>)'; $lang['recent'] = 'Nombre de derniers changements à afficher'; +$lang['recent_days'] = 'Signaler les pages modifiées depuis (en jours)'; $lang['breadcrumbs'] = 'Nombre de traces à afficher'; $lang['youarehere'] = 'Traces hiérarchiques'; +$lang['fullpath'] = 'Utiliser le chemin complet dans le pied de page'; $lang['typography'] = 'Effectuer des améliorations typographiques'; -$lang['htmlok'] = 'Permettre HTML dans les pages'; -$lang['phpok'] = 'Permettre PHP dans les pages'; $lang['dformat'] = 'Format de date (cf. fonction <a href="http://fr.php.net/strftime">strftime</a> de PHP)'; $lang['signature'] = 'Signature'; +$lang['showuseras'] = 'Qu\'afficher en montrant les utilisateurs qui ont récemment modifié la page'; $lang['toptoclevel'] = 'Niveau le plus haut à afficher dans la table des matières'; $lang['tocminheads'] = 'Nombre minimum de titres pour qu\'une table des matières soit construite'; $lang['maxtoclevel'] = 'Niveau maximum pour figurer dans la table des matières'; @@ -72,16 +76,8 @@ $lang['maxseclevel'] = 'Niveau maximum pour modifier des sections'; $lang['camelcase'] = 'Utiliser CamelCase pour les liens'; $lang['deaccent'] = 'Retirer les accents dans les noms de pages'; $lang['useheading'] = 'Utiliser le titre de premier niveau'; -$lang['refcheck'] = 'Vérifier les références de média'; -$lang['refshow'] = 'Nombre de références de média à montrer'; -$lang['allowdebug'] = 'Debug (<strong>Ne l\'activez que si vous en avez besoin !</strong>)'; -$lang['mediarevisions'] = 'Activer les révisions (gestion de versions) des médias'; -$lang['usewordblock'] = 'Bloquer le spam selon les mots utilisés'; -$lang['indexdelay'] = 'Délai avant l\'indexation (en secondes)'; -$lang['relnofollow'] = 'Utiliser rel="nofollow" sur les liens extérieurs'; -$lang['mailguard'] = 'Brouiller les adresses de courriel'; -$lang['iexssprotect'] = 'Vérifier la présence de code JavaScript ou HTML malveillant dans les fichiers envoyés'; -$lang['showuseras'] = 'Qu\'afficher en montrant les utilisateurs qui ont récemment modifié la page'; +$lang['sneaky_index'] = 'Par défaut, DokuWiki affichera toutes les catégories dans la vue par index. Activer cette option permet de cacher celles pour lesquelles l\'utilisateur n\'a pas la permission de lecture. Il peut en résulter le masquage de sous-catégories accessibles. Ceci peut rendre l\'index inutilisable avec certaines ACL.'; +$lang['hidepages'] = 'Cacher les pages correspondant à (expression régulière)'; $lang['useacl'] = 'Utiliser les listes de contrôle d\'accès (ACL)'; $lang['autopasswd'] = 'Auto-générer les mots de passe'; $lang['authtype'] = 'Mécanisme d\'authentification'; @@ -90,59 +86,68 @@ $lang['defaultgroup'] = 'Groupe par défaut'; $lang['superuser'] = 'Superuser - groupe, utilisateur ou liste séparée par des virgules user1,@group1,user2 ayant un accès complet à toutes les pages quelque soit le paramétrage des ACL'; $lang['manager'] = 'Manager - groupe, utilisateur ou liste séparée par des virgules user1,@group1,user2 ayant accès à certaines fonctions de gestion'; $lang['profileconfirm'] = 'Confirmer par mot de passe les modifications de profil'; +$lang['rememberme'] = 'Permettre de conserver de manière permanente les cookies de connexion (mémoriser)'; $lang['disableactions'] = 'Actions à désactiver dans DokuWiki'; $lang['disableactions_check'] = 'Vérifier'; $lang['disableactions_subscription'] = 'Abonnement aux pages'; $lang['disableactions_wikicode'] = 'Afficher le texte source'; $lang['disableactions_other'] = 'Autres actions (séparées par des virgules)'; -$lang['sneaky_index'] = 'Par défaut, DokuWiki affichera toutes les catégories dans la vue par index. Activer cette option permet de cacher celles pour lesquelles l\'utilisateur n\'a pas la permission de lecture. Il peut en résulter le masquage de sous-catégories accessibles. Ceci peut rendre l\'index inutilisable avec certaines ACL.'; $lang['auth_security_timeout'] = 'Délai d\'expiration de sécurité (secondes)'; $lang['securecookie'] = 'Les cookies mis via HTTPS doivent-ils n\'être envoyé par le navigateur que via HTTPS ? Ne désactivez cette option que si la connexion à votre wiki est sécurisée avec SSL mais que la navigation sur le wiki n\'est pas sécurisée.'; +$lang['remote'] = 'Active l\'API système distante. Ceci autorise d\'autres applications à accéder au wiki via XML-RPC ou d\'autres mécanismes.'; +$lang['usewordblock'] = 'Bloquer le spam selon les mots utilisés'; +$lang['relnofollow'] = 'Utiliser rel="nofollow" sur les liens extérieurs'; +$lang['indexdelay'] = 'Délai avant l\'indexation (en secondes)'; +$lang['mailguard'] = 'Brouiller les adresses de courriel'; +$lang['iexssprotect'] = 'Vérifier la présence de code JavaScript ou HTML malveillant dans les fichiers envoyés'; +$lang['usedraft'] = 'Enregistrer automatiquement un brouillon pendant l\'édition'; +$lang['htmlok'] = 'Permettre HTML dans les pages'; +$lang['phpok'] = 'Permettre PHP dans les pages'; +$lang['locktime'] = 'Âge maximum des fichiers verrous (en secondes)'; +$lang['cachetime'] = 'Âge maximum d\'un fichier en cache (en secondes)'; +$lang['target____wiki'] = 'Cible pour liens internes'; +$lang['target____interwiki'] = 'Cible pour liens interwiki'; +$lang['target____extern'] = 'Cible pour liens externes'; +$lang['target____media'] = 'Cible pour liens média'; +$lang['target____windows'] = 'Cible pour liens vers partages Windows'; +$lang['mediarevisions'] = 'Activer les révisions (gestion de versions) des médias'; +$lang['refcheck'] = 'Vérifier les références de média'; +$lang['refshow'] = 'Nombre de références de média à montrer'; +$lang['gdlib'] = 'Version de GD Lib'; +$lang['im_convert'] = 'Chemin vers l\'outil de conversion d\'ImageMagick'; +$lang['jpg_quality'] = 'Qualité de la compression JPEG (0-100)'; +$lang['fetchsize'] = 'Taille maximale (en octets) du fichier que fetch.php peut télécharger'; +$lang['subscribers'] = 'Activer l\'abonnement aux pages'; +$lang['subscribe_time'] = 'Délai après lequel les listes d\'abonnement et résumés sont envoyés (en secondes). Devrait être plus petit que le délai précisé dans recent_days.'; +$lang['notify'] = 'Notifier les modifications à cette adresse de courriel'; +$lang['registernotify'] = 'Envoyer un courriel annonçant les nouveaux utilisateurs enregistrés à cette adresse'; +$lang['mailfrom'] = 'Expéditeur des notifications par courriel du wiki'; +$lang['mailprefix'] = 'Préfixe à utiliser dans les objets des courriels automatiques'; +$lang['sitemap'] = 'Fréquence de génération une carte Google du site (en jours)'; +$lang['rss_type'] = 'Type de flux RSS'; +$lang['rss_linkto'] = 'Lien du flux RSS vers'; +$lang['rss_content'] = 'Quel contenu afficher dans le flux RSS ?'; +$lang['rss_update'] = 'Fréquence de mise à jour du flux RSS (en secondes)'; +$lang['rss_show_summary'] = 'Le flux XML affiche le résumé dans le titre'; +$lang['rss_media'] = 'Quels types de changements devraient être listés dans le flux XML?'; $lang['updatecheck'] = 'Vérifier les mises à jour ? DokuWiki doit pouvoir contacter update.dokuwiki.org.'; $lang['userewrite'] = 'URL esthétiques'; $lang['useslash'] = 'Utiliser « / » comme séparateur de catégorie dans les URL'; -$lang['usedraft'] = 'Enregistrer automatiquement un brouillon pendant l\'édition'; $lang['sepchar'] = 'Séparateur de mots dans les noms de page'; $lang['canonical'] = 'Utiliser des URL canoniques'; $lang['fnencode'] = 'Méthode pour l\'encodage des fichiers non-ASCII'; $lang['autoplural'] = 'Rechercher les formes plurielles dans les liens'; $lang['compression'] = 'Méthode de compression pour les fichiers dans attic'; -$lang['cachetime'] = 'Âge maximum d\'un fichier en cache (en secondes)'; -$lang['locktime'] = 'Âge maximum des fichiers verrous (en secondes)'; -$lang['fetchsize'] = 'Taille maximale (en octets) du fichier que fetch.php peut télécharger'; -$lang['notify'] = 'Notifier les modifications à cette adresse de courriel'; -$lang['registernotify'] = 'Envoyer un courriel annonçant les nouveaux utilisateurs enregistrés à cette adresse'; -$lang['mailfrom'] = 'Expéditeur des notifications par courriel du wiki'; -$lang['mailprefix'] = 'Préfixe à utiliser dans les objets des courriels automatiques'; $lang['gzip_output'] = 'Utiliser Content-Encoding gzip pour XHTML'; -$lang['gdlib'] = 'Version de GD Lib'; -$lang['im_convert'] = 'Chemin vers l\'outil de conversion d\'ImageMagick'; -$lang['jpg_quality'] = 'Qualité de la compression JPEG (0-100)'; -$lang['subscribers'] = 'Activer l\'abonnement aux pages'; -$lang['subscribe_time'] = 'Délai après lequel les listes d\'abonnement et résumés sont envoyés (en secondes). Devrait être plus petit que le délai précisé dans recent_days.'; $lang['compress'] = 'Compresser CSS et JavaScript'; $lang['cssdatauri'] = 'Taille maximale en octets pour inclure dans les feuilles de styles CSS, les images qui y sont référencées. Cette technique minimise les requêtes HTTP. Pour IE, ceci ne fonctionne qu\'à partir de la version 8 ! Valeurs correctes entre <code>400</code> et <code>600</code>. <code>0</code> pour désactiver.'; -$lang['hidepages'] = 'Cacher les pages correspondant à (expression régulière)'; $lang['send404'] = 'Renvoyer "HTTP 404/Page Non Trouvée" pour les pages introuvables'; -$lang['sitemap'] = 'Fréquence de génération une carte Google du site (en jours)'; $lang['broken_iua'] = 'La fonction ignore_user_abort est-elle opérationnelle sur votre système ? Ceci peut empêcher le fonctionnement de l\'index de recherche. IIS+PHP/ CGI dysfonctionne. Voir le <a href="http://bugs.splitbrain.org/?do=details&task_id=852">bug 852</a> pour plus d\'info.'; $lang['xsendfile'] = 'Utiliser l\'en-tête X-Sendfile pour permettre au serveur Web de délivrer des fichiers statiques ? Votre serveur Web doit supporter cette fonctionnalité.'; $lang['renderer_xhtml'] = 'Moteur de rendu du format de sortie principal (XHTML)'; $lang['renderer__core'] = '%s (cÅ“ur de dokuwiki)'; $lang['renderer__plugin'] = '%s (module externe)'; -$lang['rememberme'] = 'Permettre de conserver de manière permanente les cookies de connexion (mémoriser)'; -$lang['rss_type'] = 'Type de flux RSS'; -$lang['rss_linkto'] = 'Lien du flux RSS vers'; -$lang['rss_content'] = 'Quel contenu afficher dans le flux RSS ?'; -$lang['rss_update'] = 'Fréquence de mise à jour du flux RSS (en secondes)'; -$lang['recent_days'] = 'Signaler les pages modifiées depuis (en jours)'; -$lang['rss_show_summary'] = 'Le flux XML affiche le résumé dans le titre'; -$lang['target____wiki'] = 'Cible pour liens internes'; -$lang['target____interwiki'] = 'Cible pour liens interwiki'; -$lang['target____extern'] = 'Cible pour liens externes'; -$lang['target____media'] = 'Cible pour liens média'; -$lang['target____windows'] = 'Cible pour liens vers partages Windows'; $lang['proxy____host'] = 'Proxy - Serveur hôte'; $lang['proxy____port'] = 'Proxy - Numéro de port'; $lang['proxy____user'] = 'Proxy - Identifiant'; diff --git a/lib/plugins/config/lang/it/lang.php b/lib/plugins/config/lang/it/lang.php index 9c348dcee1b634bf5d56f93b165251c4160743f0..91c92bd85ab637625ca8a7a9d1d93c27892b15b0 100644 --- a/lib/plugins/config/lang/it/lang.php +++ b/lib/plugins/config/lang/it/lang.php @@ -13,6 +13,7 @@ * @author robocap <robocap1@gmail.com> * @author Osman Tekin osman.tekin93@hotmail.it * @author Jacopo Corbetta <jacopo.corbetta@gmail.com> + * @author Matteo Pasotti <matteo@xquiet.eu> */ $lang['menu'] = 'Configurazione Wiki'; $lang['error'] = 'Impostazioni non aggiornate a causa di un valore non corretto, controlla le modifiche apportate e salva di nuovo. @@ -36,6 +37,7 @@ $lang['_anti_spam'] = 'Impostazioni Anti-Spam'; $lang['_editing'] = 'Impostazioni Modifica'; $lang['_links'] = 'Impostazioni Collegamenti'; $lang['_media'] = 'Impostazioni File'; +$lang['_notifications'] = 'Impostazioni di notifica'; $lang['_advanced'] = 'Impostazioni Avanzate'; $lang['_network'] = 'Impostazioni Rete'; $lang['_plugin_sufix'] = 'Impostazioni Plugin'; @@ -43,25 +45,28 @@ $lang['_template_sufix'] = 'Impostazioni Modello'; $lang['_msg_setting_undefined'] = 'Nessun metadato definito.'; $lang['_msg_setting_no_class'] = 'Nessuna classe definita.'; $lang['_msg_setting_no_default'] = 'Nessun valore predefinito.'; -$lang['fmode'] = 'Permessi per i nuovi file'; -$lang['dmode'] = 'Permessi per le nuove directory'; -$lang['lang'] = 'Lingua'; -$lang['basedir'] = 'Directory di base'; -$lang['baseurl'] = 'URL di base'; -$lang['savedir'] = 'Directory per il salvataggio dei dati'; -$lang['start'] = 'Nome della pagina iniziale'; $lang['title'] = 'Titolo del wiki'; +$lang['start'] = 'Nome della pagina iniziale'; +$lang['lang'] = 'Lingua'; $lang['template'] = 'Modello'; +$lang['sidebar'] = 'Nome pagina in barra laterale (se il template lo supporta), il campo vuoto disabilita la barra laterale'; $lang['license'] = 'Sotto quale licenza vorresti rilasciare il tuo contenuto?'; -$lang['fullpath'] = 'Mostra il percorso completo delle pagine'; +$lang['savedir'] = 'Directory per il salvataggio dei dati'; +$lang['basedir'] = 'Directory di base'; +$lang['baseurl'] = 'URL di base'; +$lang['cookiedir'] = 'Percorso cookie. Lascia in bianco per usare baseurl.'; +$lang['dmode'] = 'Permessi per le nuove directory'; +$lang['fmode'] = 'Permessi per i nuovi file'; +$lang['allowdebug'] = 'Abilita il debug <b>(disabilitare se non serve!)</b>'; $lang['recent'] = 'Ultime modifiche'; +$lang['recent_days'] = 'Quante modifiche recenti tenere (giorni)'; $lang['breadcrumbs'] = 'Numero di breadcrumb'; $lang['youarehere'] = 'Breadcrumb gerarchici'; +$lang['fullpath'] = 'Mostra il percorso completo delle pagine'; $lang['typography'] = 'Abilita la sostituzione tipografica'; -$lang['htmlok'] = 'Consenti HTML incorporato'; -$lang['phpok'] = 'Consenti PHP incorporato'; $lang['dformat'] = 'Formato delle date (vedi la funzione <a href="http://www.php.net/strftime">strftime</a> di PHP)'; $lang['signature'] = 'Firma'; +$lang['showuseras'] = 'Cosa visualizzare quando si mostra l\'ultimo utente che ha modificato una pagina'; $lang['toptoclevel'] = 'Livello superiore per l\'indice'; $lang['tocminheads'] = 'Ammontare minimo di intestazioni che determinano la creazione del TOC'; $lang['maxtoclevel'] = 'Numero massimo di livelli per l\'indice'; @@ -69,15 +74,8 @@ $lang['maxseclevel'] = 'Livello massimo per le sezioni modificabili'; $lang['camelcase'] = 'Usa CamelCase per i collegamenti'; $lang['deaccent'] = 'Pulizia dei nomi di pagina'; $lang['useheading'] = 'Usa la prima intestazione come nome di pagina'; -$lang['refcheck'] = 'Controlla i riferimenti ai file'; -$lang['refshow'] = 'Numero di riferimenti da visualizzare'; -$lang['allowdebug'] = 'Abilita il debug <b>(disabilitare se non serve!)</b>'; -$lang['usewordblock'] = 'Blocca lo spam in base alla blacklist'; -$lang['indexdelay'] = 'Intervallo di tempo prima dell\'indicizzazione'; -$lang['relnofollow'] = 'Usa rel="nofollow" nei collegamenti esterni'; -$lang['mailguard'] = 'Oscuramento indirizzi email'; -$lang['iexssprotect'] = 'Controlla i file caricati in cerca di possibile codice JavaScript o HTML maligno.'; -$lang['showuseras'] = 'Cosa visualizzare quando si mostra l\'ultimo utente che ha modificato una pagina'; +$lang['sneaky_index'] = 'Normalmente, DokuWiki mostra tutte le categorie nella vista indice. Abilitando questa opzione, saranno nascoste quelle per cui l\'utente non ha il permesso in lettura. Questo potrebbe far sì che alcune sottocategorie accessibili siano nascoste. La pagina indice potrebbe quindi diventare inutilizzabile con alcune configurazioni dell\'ACL.'; +$lang['hidepages'] = 'Nascondi le pagine che soddisfano la condizione (inserire un\'espressione regolare)'; $lang['useacl'] = 'Usa lista di controllo accessi (ACL)'; $lang['autopasswd'] = 'Genera password in automatico'; $lang['authtype'] = 'Sistema di autenticazione'; @@ -86,57 +84,69 @@ $lang['defaultgroup'] = 'Gruppo predefinito'; $lang['superuser'] = 'Amministratore - gruppo, utente o elenco di utenti separati da virgole (user1,@group1,user2) con accesso completo a tutte le pagine e le funzioni che riguardano le impostazioni ACL'; $lang['manager'] = 'Gestore - gruppo, utente o elenco di utenti separati da virgole (user1,@group1,user2) con accesso a determinate funzioni di gestione'; $lang['profileconfirm'] = 'Richiedi la password per modifiche al profilo'; +$lang['rememberme'] = 'Permetti i cookies di accesso permanenti (ricordami)'; $lang['disableactions'] = 'Disabilita azioni DokuWiki'; $lang['disableactions_check'] = 'Controlla'; $lang['disableactions_subscription'] = 'Sottoscrivi/Rimuovi sottoscrizione'; $lang['disableactions_wikicode'] = 'Mostra sorgente/Esporta Raw'; $lang['disableactions_other'] = 'Altre azioni (separate da virgola)'; -$lang['sneaky_index'] = 'Normalmente, DokuWiki mostra tutte le categorie nella vista indice. Abilitando questa opzione, saranno nascoste quelle per cui l\'utente non ha il permesso in lettura. Questo potrebbe far sì che alcune sottocategorie accessibili siano nascoste. La pagina indice potrebbe quindi diventare inutilizzabile con alcune configurazioni dell\'ACL.'; $lang['auth_security_timeout'] = 'Tempo di sicurezza per l\'autenticazione (secondi)'; $lang['securecookie'] = 'Devono i cookies impostati tramite HTTPS essere inviati al browser solo tramite HTTPS? Disattiva questa opzione solo quando l\'accesso al tuo wiki viene effettuato con il protocollo SSL ma la navigazione del wiki non risulta sicura.'; +$lang['remote'] = 'Abilita il sistema di API remoto. Questo permette ad altre applicazioni di accedere al wiki tramite XML-RPC o altri meccanismi.'; +$lang['remoteuser'] = 'Restringi l\'accesso dell\'aPI remota ai gruppi o utenti qui specificati separati da virgola. Lascia vuoto per dare accesso a chiunque.'; +$lang['usewordblock'] = 'Blocca lo spam in base alla blacklist'; +$lang['relnofollow'] = 'Usa rel="nofollow" nei collegamenti esterni'; +$lang['indexdelay'] = 'Intervallo di tempo prima dell\'indicizzazione'; +$lang['mailguard'] = 'Oscuramento indirizzi email'; +$lang['iexssprotect'] = 'Controlla i file caricati in cerca di possibile codice JavaScript o HTML maligno.'; +$lang['usedraft'] = 'Salva una bozza in automatico in fase di modifica'; +$lang['htmlok'] = 'Consenti HTML incorporato'; +$lang['phpok'] = 'Consenti PHP incorporato'; +$lang['locktime'] = 'Durata dei file di lock (sec)'; +$lang['cachetime'] = 'Durata della cache (sec)'; +$lang['target____wiki'] = 'Finestra di destinazione per i collegamenti interni'; +$lang['target____interwiki'] = 'Finestra di destinazione per i collegamenti interwiki'; +$lang['target____extern'] = 'Finestra di destinazione per i collegamenti esterni'; +$lang['target____media'] = 'Finestra di destinazione per i collegamenti ai file'; +$lang['target____windows'] = 'Finestra di destinazione per i collegamenti alle risorse condivise'; +$lang['mediarevisions'] = 'Abilita Mediarevisions?'; +$lang['refcheck'] = 'Controlla i riferimenti ai file'; +$lang['refshow'] = 'Numero di riferimenti da visualizzare'; +$lang['gdlib'] = 'Versione GD Lib '; +$lang['im_convert'] = 'Percorso per il convertitore di ImageMagick'; +$lang['jpg_quality'] = 'Qualità di compressione JPG (0-100)'; +$lang['fetchsize'] = 'Dimensione massima (bytes) scaricabile da fetch.php da extern'; +$lang['subscribers'] = 'Abilita la sottoscrizione alle pagine'; +$lang['subscribe_time'] = 'Tempo dopo il quale le liste di sottoscrizione e i riassunti vengono inviati (sec); Dovrebbe essere inferiore al tempo specificato in recent_days.'; +$lang['notify'] = 'Invia notifiche sulle modifiche a questo indirizzo'; +$lang['registernotify'] = 'Invia informazioni sui nuovi utenti registrati a questo indirizzo email'; +$lang['mailfrom'] = 'Mittente per le mail automatiche'; +$lang['mailprefix'] = 'Prefisso da inserire nell\'oggetto delle mail automatiche'; +$lang['htmlmail'] = 'Invia email HTML multipart più gradevoli ma più ingombranti in dimensione. Disabilita per mail in puro testo.'; +$lang['sitemap'] = 'Genera una sitemap Google (giorni)'; +$lang['rss_type'] = 'Tipo di feed XML'; +$lang['rss_linkto'] = 'Collega i feed XML a'; +$lang['rss_content'] = 'Cosa mostrare negli elementi dei feed XML?'; +$lang['rss_update'] = 'Intervallo di aggiornamento dei feed XML (sec)'; +$lang['rss_show_summary'] = 'I feed XML riportano un sommario nel titolo'; +$lang['rss_media'] = 'Quale tipo di cambiamento dovrebbe essere elencato nel feed XML?'; $lang['updatecheck'] = 'Controllare aggiornamenti e avvisi di sicurezza? DokuWiki deve contattare update.dokuwiki.org per questa funzione.'; $lang['userewrite'] = 'Usa il rewrite delle URL'; $lang['useslash'] = 'Usa la barra rovescia (slash) come separatore nelle URL'; -$lang['usedraft'] = 'Salva una bozza in automatico in fase di modifica'; $lang['sepchar'] = 'Separatore di parole nei nomi di pagina'; $lang['canonical'] = 'Usa URL canoniche'; $lang['fnencode'] = 'Metodo per codificare i filenames non-ASCII.'; $lang['autoplural'] = 'Controlla il plurale nei collegamenti'; $lang['compression'] = 'Usa la compressione per i file dell\'archivio'; -$lang['cachetime'] = 'Durata della cache (sec)'; -$lang['locktime'] = 'Durata dei file di lock (sec)'; -$lang['fetchsize'] = 'Dimensione massima (bytes) scaricabile da fetch.php da extern'; -$lang['notify'] = 'Invia notifiche sulle modifiche a questo indirizzo'; -$lang['registernotify'] = 'Invia informazioni sui nuovi utenti registrati a questo indirizzo email'; -$lang['mailfrom'] = 'Mittente per le mail automatiche'; -$lang['mailprefix'] = 'Prefisso da inserire nell\'oggetto delle mail automatiche'; $lang['gzip_output'] = 'Usa il Content-Encoding gzip per xhtml'; -$lang['gdlib'] = 'Versione GD Lib '; -$lang['im_convert'] = 'Percorso per il convertitore di ImageMagick'; -$lang['jpg_quality'] = 'Qualità di compressione JPG (0-100)'; -$lang['subscribers'] = 'Abilita la sottoscrizione alle pagine'; -$lang['subscribe_time'] = 'Tempo dopo il quale le liste di sottoscrizione e i riassunti vengono inviati (sec); Dovrebbe essere inferiore al tempo specificato in recent_days.'; $lang['compress'] = 'Comprimi i file CSS e javascript'; -$lang['hidepages'] = 'Nascondi le pagine che soddisfano la condizione (inserire un\'espressione regolare)'; $lang['send404'] = 'Invia "HTTP 404/Pagina non trovata" per le pagine inesistenti'; -$lang['sitemap'] = 'Genera una sitemap Google (giorni)'; $lang['broken_iua'] = 'La funzione ignore_user_abort non funziona sul tuo sistema? Questo potrebbe far sì che l\'indice di ricerca sia inutilizzabile. È noto che nella configurazione IIS+PHP/CGI non funziona. Vedi il<a href="http://bugs.splitbrain.org/?do=details&task_id=852">Bug 852</a> per maggiori informazioni.'; $lang['xsendfile'] = 'Usare l\'header X-Sendfile per permettere al webserver di fornire file statici? Questa funzione deve essere supportata dal tuo webserver.'; $lang['renderer_xhtml'] = 'Renderer da usare per la visualizzazione del wiki (xhtml)'; $lang['renderer__core'] = '%s (dokuwiki)'; $lang['renderer__plugin'] = '%s (plugin)'; -$lang['rememberme'] = 'Permetti i cookies di accesso permanenti (ricordami)'; -$lang['rss_type'] = 'Tipo di feed XML'; -$lang['rss_linkto'] = 'Collega i feed XML a'; -$lang['rss_content'] = 'Cosa mostrare negli elementi dei feed XML?'; -$lang['rss_update'] = 'Intervallo di aggiornamento dei feed XML (sec)'; -$lang['recent_days'] = 'Quante modifiche recenti tenere (giorni)'; -$lang['rss_show_summary'] = 'I feed XML riportano un sommario nel titolo'; -$lang['target____wiki'] = 'Finestra di destinazione per i collegamenti interni'; -$lang['target____interwiki'] = 'Finestra di destinazione per i collegamenti interwiki'; -$lang['target____extern'] = 'Finestra di destinazione per i collegamenti esterni'; -$lang['target____media'] = 'Finestra di destinazione per i collegamenti ai file'; -$lang['target____windows'] = 'Finestra di destinazione per i collegamenti alle risorse condivise'; +$lang['dnslookups'] = 'Dokuwiki farà il lookup dei nomi host per ricavare l\'indirizzo IP remoto degli utenti che modificano le pagine. Se hai un DNS lento o non funzionante o se non vuoi questa funzione, disabilita l\'opzione'; $lang['proxy____host'] = 'Nome server proxy'; $lang['proxy____port'] = 'Porta proxy'; $lang['proxy____user'] = 'Nome utente proxy'; diff --git a/lib/plugins/config/lang/ja/lang.php b/lib/plugins/config/lang/ja/lang.php index fb263fe00ed5e14501a5ec7022039600f4162843..a89123f8ccfdf7095f8aff0d1dbc265a398da6ab 100644 --- a/lib/plugins/config/lang/ja/lang.php +++ b/lib/plugins/config/lang/ja/lang.php @@ -32,6 +32,8 @@ $lang['_anti_spam'] = 'スパム対ç–'; $lang['_editing'] = '編集'; $lang['_links'] = 'リンク'; $lang['_media'] = 'メディア'; +$lang['_notifications'] = '通知è¨å®š'; +$lang['_syndication'] = 'RSSé…ä¿¡è¨å®š'; $lang['_advanced'] = '高度ãªè¨å®š'; $lang['_network'] = 'ãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯'; $lang['_plugin_sufix'] = 'プラグインè¨å®š'; @@ -39,28 +41,29 @@ $lang['_template_sufix'] = 'テンプレートè¨å®š'; $lang['_msg_setting_undefined'] = 'è¨å®šã®ãŸã‚ã®ãƒ¡ã‚¿ãƒ‡ãƒ¼ã‚¿ãŒã‚りã¾ã›ã‚“。'; $lang['_msg_setting_no_class'] = 'è¨å®šã‚¯ãƒ©ã‚¹ãŒã‚りã¾ã›ã‚“。'; $lang['_msg_setting_no_default'] = 'åˆæœŸå€¤ãŒè¨å®šã•れã¦ã„ã¾ã›ã‚“。'; -$lang['fmode'] = 'ファイル作æˆãƒžã‚¹ã‚¯'; -$lang['dmode'] = 'フォルダ作æˆãƒžã‚¹ã‚¯'; -$lang['lang'] = '使用言語'; -$lang['basedir'] = 'サーãƒã®ãƒ‘ス (例: <code>/dokuwiki/</code>)。空欄ã«ã™ã‚‹ã¨è‡ªå‹•çš„ã«æ¤œå‡ºã—ã¾ã™ã€‚'; -$lang['baseurl'] = 'サーãƒã® URL (例: <code>http://www.yourserver.com</code>)。空欄ã«ã™ã‚‹ã¨è‡ªå‹•çš„ã«æ¤œå‡ºã—ã¾ã™ã€‚'; -$lang['savedir'] = 'ä¿å˜ãƒ‡ã‚£ãƒ¬ã‚¯ãƒˆãƒª'; -$lang['cookiedir'] = 'Cookie ã®ãƒ‘ス。空欄ã«ã™ã‚‹ã¨ baseurl を使用ã—ã¾ã™ã€‚'; -$lang['start'] = 'スタートページå'; $lang['title'] = 'WIKIタイトル'; +$lang['start'] = 'スタートページå'; +$lang['lang'] = '使用言語'; $lang['template'] = 'テンプレート'; $lang['tagline'] = 'ã‚ャッãƒãƒ•レーズ (テンプレートãŒå¯¾å¿œã—ã¦ã„れã°)'; $lang['sidebar'] = 'サイドãƒãƒ¼ç”¨ãƒšãƒ¼ã‚¸å (テンプレートãŒå¯¾å¿œã—ã¦ã„れã°)。空欄ã§ã‚µã‚¤ãƒ‰ãƒãƒ¼ç„¡åŠ¹ã€‚'; $lang['license'] = '作æˆã—ãŸå†…容をã©ã®ãƒ©ã‚¤ã‚»ãƒ³ã‚¹ã§ãƒªãƒªãƒ¼ã‚¹ã—ã¾ã™ã‹ï¼Ÿ'; -$lang['fullpath'] = 'ページã®ãƒ•ッターã«çµ¶å¯¾ãƒ‘スを表示'; +$lang['savedir'] = 'ä¿å˜ãƒ‡ã‚£ãƒ¬ã‚¯ãƒˆãƒª'; +$lang['basedir'] = 'サーãƒã®ãƒ‘ス (例: <code>/dokuwiki/</code>)。空欄ã«ã™ã‚‹ã¨è‡ªå‹•çš„ã«æ¤œå‡ºã—ã¾ã™ã€‚'; +$lang['baseurl'] = 'サーãƒã® URL (例: <code>http://www.yourserver.com</code>)。空欄ã«ã™ã‚‹ã¨è‡ªå‹•çš„ã«æ¤œå‡ºã—ã¾ã™ã€‚'; +$lang['cookiedir'] = 'Cookie ã®ãƒ‘ス。空欄ã«ã™ã‚‹ã¨ baseurl を使用ã—ã¾ã™ã€‚'; +$lang['dmode'] = 'フォルダ作æˆãƒžã‚¹ã‚¯'; +$lang['fmode'] = 'ファイル作æˆãƒžã‚¹ã‚¯'; +$lang['allowdebug'] = 'デãƒãƒƒã‚°ãƒ¢ãƒ¼ãƒ‰ï¼ˆ<b>å¿…è¦ã§ç„¡ã„ã¨ãã¯ç„¡åйã«ã—ã¦ãã ã•ã„</b>)'; $lang['recent'] = '最近ã®å¤‰æ›´è¡¨ç¤ºæ•°'; +$lang['recent_days'] = '最近ã®å¤‰æ›´ã¨ã™ã‚‹æœŸé–“(日数)'; $lang['breadcrumbs'] = 'トレース(パンããšï¼‰è¡¨ç¤ºæ•°'; $lang['youarehere'] = 'ç¾åœ¨ä½ç½®ã‚’表示'; +$lang['fullpath'] = 'ページã®ãƒ•ッターã«çµ¶å¯¾ãƒ‘スを表示'; $lang['typography'] = 'タイãƒã‚°ãƒ©ãƒ•ィー変æ›'; -$lang['htmlok'] = 'HTML埋ã‚è¾¼ã¿'; -$lang['phpok'] = 'PHP埋ã‚è¾¼ã¿'; $lang['dformat'] = '日付フォーマット(PHPã®<a href="http://www.php.net/strftime">strftime</a>関数をå‚照)'; $lang['signature'] = 'ç½²å'; +$lang['showuseras'] = 'æœ€çµ‚ç·¨é›†è€…ã®æƒ…å ±ã¨ã—ã¦è¡¨ç¤ºã™ã‚‹å†…容'; $lang['toptoclevel'] = '目次 トップレベル見出ã—'; $lang['tocminheads'] = '目次を生æˆã™ã‚‹ãŸã‚ã®æœ€å°è¦‹å‡ºã—æ•°'; $lang['maxtoclevel'] = '目次 表示é™åº¦è¦‹å‡ºã—'; @@ -68,16 +71,8 @@ $lang['maxseclevel'] = '編集å¯èƒ½è¦‹å‡ºã—'; $lang['camelcase'] = 'ã‚ャメルケースリンク'; $lang['deaccent'] = 'ページåアクセント'; $lang['useheading'] = '最åˆã®è¦‹å‡ºã—をページåã¨ã™ã‚‹'; -$lang['refcheck'] = 'メディアå‚ç…§å…ƒãƒã‚§ãƒƒã‚¯'; -$lang['refshow'] = 'メディアå‚照元表示数'; -$lang['allowdebug'] = 'デãƒãƒƒã‚°ãƒ¢ãƒ¼ãƒ‰ï¼ˆ<b>å¿…è¦ã§ç„¡ã„ã¨ãã¯ç„¡åйã«ã—ã¦ãã ã•ã„</b>)'; -$lang['mediarevisions'] = 'メディアファイルã®å±¥æ´ã‚’有効ã«ã—ã¾ã™ã‹?'; -$lang['usewordblock'] = 'å˜èªžãƒªã‚¹ãƒˆã«åŸºã¥ãスパムブãƒãƒƒã‚¯'; -$lang['indexdelay'] = 'インデックスを許å¯ï¼ˆä½•秒後)'; -$lang['relnofollow'] = 'rel="nofollow"ã‚’ä»˜åŠ '; -$lang['mailguard'] = 'メールアドレスä¿è·'; -$lang['iexssprotect'] = 'アップãƒãƒ¼ãƒ‰ãƒ•ã‚¡ã‚¤ãƒ«ã«æ‚ªæ„ã®ã‚ã‚‹JavaScriptã‚„HTMLãŒå«ã¾ã‚Œã¦ã„ãªã„ã‹ãƒã‚§ãƒƒã‚¯ã™ã‚‹'; -$lang['showuseras'] = 'æœ€çµ‚ç·¨é›†è€…ã®æƒ…å ±ã¨ã—ã¦è¡¨ç¤ºã™ã‚‹å†…容'; +$lang['sneaky_index'] = 'デフォルトã§ã¯ç´¢å¼•ã«ã™ã¹ã¦ã®åå‰ç©ºé–“を表示ã—ã¾ã™ãŒã€ã“ã®æ©Ÿèƒ½ã¯ãƒ¦ãƒ¼ã‚¶ãƒ¼ã«é–²è¦§æ¨©é™ã®ãªã„åå‰ç©ºé–“ã‚’éžè¡¨ç¤ºã«ã—ã¾ã™ã€‚ãŸã ã—ã€é–²è¦§ãŒå¯èƒ½ãªå‰¯åå‰ç©ºé–“ã¾ã§è¡¨ç¤ºã•れãªããªã‚‹ãŸã‚ã€ACLã®è¨å®šãŒé©æ£ã§ãªã„å ´åˆã¯ç´¢å¼•機能ãŒä½¿ãˆãªããªã‚‹å ´åˆãŒã‚りã¾ã™ã€‚'; +$lang['hidepages'] = 'éžå…¬é–‹ãƒšãƒ¼ã‚¸ï¼ˆRegex)'; $lang['useacl'] = 'アクセス管ç†ã‚’行ã†ï¼ˆACL)'; $lang['autopasswd'] = 'パスワードã®è‡ªå‹•生æˆï¼ˆACL)'; $lang['authtype'] = 'èªè¨¼æ–¹æ³•(ACL)'; @@ -86,61 +81,68 @@ $lang['defaultgroup'] = 'デフォルトグループ(ACL)'; $lang['superuser'] = 'スーパーユーザー(ACL)'; $lang['manager'] = 'マãƒãƒ¼ã‚¸ãƒ£ãƒ¼ï¼ˆç‰¹å®šã®ç®¡ç†æ©Ÿèƒ½ã‚’使用å¯èƒ½ãªãƒ¦ãƒ¼ã‚¶ãƒ¼ã‚‚ã—ãã¯ã‚°ãƒ«ãƒ¼ãƒ—)'; $lang['profileconfirm'] = 'プãƒãƒ•ィール変更時ã«ç¾åœ¨ã®ãƒ‘ã‚¹ãƒ¯ãƒ¼ãƒ‰ã‚’è¦æ±‚(ACL)'; +$lang['rememberme'] = 'ãƒã‚°ã‚¤ãƒ³ç”¨ã‚¯ãƒƒã‚ーを永久ã«ä¿æŒã™ã‚‹ã“ã¨ã‚’許å¯ï¼ˆãƒã‚°ã‚¤ãƒ³ã‚’ä¿æŒï¼‰'; $lang['disableactions'] = 'DokuWiki ã®å‹•作を無効ã«ã™ã‚‹'; $lang['disableactions_check'] = 'ãƒã‚§ãƒƒã‚¯'; $lang['disableactions_subscription'] = '登録 / 解除'; $lang['disableactions_wikicode'] = 'ソース閲覧 / 生データ出力'; $lang['disableactions_other'] = 'ãã®ä»–ã®å‹•作(カンマ区切り)'; -$lang['sneaky_index'] = 'デフォルトã§ã¯ç´¢å¼•ã«ã™ã¹ã¦ã®åå‰ç©ºé–“を表示ã—ã¾ã™ãŒã€ã“ã®æ©Ÿèƒ½ã¯ãƒ¦ãƒ¼ã‚¶ãƒ¼ã«é–²è¦§æ¨©é™ã®ãªã„åå‰ç©ºé–“ã‚’éžè¡¨ç¤ºã«ã—ã¾ã™ã€‚ãŸã ã—ã€é–²è¦§ãŒå¯èƒ½ãªå‰¯åå‰ç©ºé–“ã¾ã§è¡¨ç¤ºã•れãªããªã‚‹ãŸã‚ã€ACLã®è¨å®šãŒé©æ£ã§ãªã„å ´åˆã¯ç´¢å¼•機能ãŒä½¿ãˆãªããªã‚‹å ´åˆãŒã‚りã¾ã™ã€‚'; $lang['auth_security_timeout'] = 'èªè¨¼ã‚¿ã‚¤ãƒ アウトè¨å®šï¼ˆç§’)'; $lang['securecookie'] = 'クッã‚ーをHTTPSã«ã¦ã‚»ãƒƒãƒˆã™ã‚‹å ´åˆã¯ã€ãƒ–ラウザよりHTTPS経由ã§é€ä¿¡ã•れãŸå ´åˆã«ã¿ã«åˆ¶é™ã—ã¾ã™ã‹ï¼Ÿãƒã‚°ã‚¤ãƒ³ã®ã¿ã‚’SSLã§è¡Œã†å ´åˆã¯ã€ã“ã®æ©Ÿèƒ½ã‚’無効ã«ã—ã¦ãã ã•ã„。'; -$lang['xmlrpc'] = 'XML-RPCインターフェースを有効/無効ã«ã™ã‚‹'; -$lang['xmlrpcuser'] = 'XML-RPCアクセスを指定グループã¨ãƒ¦ãƒ¼ã‚¶ãƒ¼ã«åˆ¶é™ã—ã¾ã™ï¼ˆåŠè§’コンマ区切り)。 ã™ã¹ã¦ã®äººã«ã‚¢ã‚¯ã‚»ã‚¹ã‚’許å¯ã™ã‚‹å ´åˆã¯ç©ºã®ã¾ã¾ã«ã—ã¦ãã ã•ã„。'; +$lang['remote'] = 'リモートAPIを有効化ã—ã¾ã™ã€‚有効化ã™ã‚‹ã¨XML-RPCã¾ãŸã¯ä»–ã®æ‰‹æ®µã§wikiã«ã‚¢ãƒ—リケーションãŒã‚¢ã‚¯ã‚»ã‚¹ã™ã‚‹ã“ã¨ã‚’許å¯ã—ã¾ã™ã€‚'; +$lang['remoteuser'] = 'ã‚«ãƒ³ãƒžåŒºåˆ‡ã‚Šã§æ›¸ã‹ã‚ŒãŸã‚°ãƒ«ãƒ¼ãƒ—åã€ã¾ãŸã¯ãƒ¦ãƒ¼ã‚¶åã ã‘ã«ãƒªãƒ¢ãƒ¼ãƒˆAPIã¸ã®ã‚¢ã‚¯ã‚»ã‚¹ã‚’許å¯ã—ã¾ã™ã€‚空白ã®å ´åˆã¯ã€ã™ã¹ã¦ã®ãƒ¦ãƒ¼ã‚¶ã«ã‚¢ã‚¯ã‚»ã‚¹ã‚’許å¯ã—ã¾ã™ã€‚'; +$lang['usewordblock'] = 'å˜èªžãƒªã‚¹ãƒˆã«åŸºã¥ãスパムブãƒãƒƒã‚¯'; +$lang['relnofollow'] = 'rel="nofollow"ã‚’ä»˜åŠ '; +$lang['indexdelay'] = 'インデックスを許å¯ï¼ˆä½•秒後)'; +$lang['mailguard'] = 'メールアドレスä¿è·'; +$lang['iexssprotect'] = 'アップãƒãƒ¼ãƒ‰ãƒ•ã‚¡ã‚¤ãƒ«ã«æ‚ªæ„ã®ã‚ã‚‹JavaScriptã‚„HTMLãŒå«ã¾ã‚Œã¦ã„ãªã„ã‹ãƒã‚§ãƒƒã‚¯ã™ã‚‹'; +$lang['usedraft'] = '編集ä¸ã®è‡ªå‹•ä¿å˜ï¼ˆãƒ‰ãƒ©ãƒ•ト)機能を使用'; +$lang['htmlok'] = 'HTML埋ã‚è¾¼ã¿'; +$lang['phpok'] = 'PHP埋ã‚è¾¼ã¿'; +$lang['locktime'] = 'ファイルãƒãƒƒã‚¯æœŸé™ï¼ˆç§’)'; +$lang['cachetime'] = 'ã‚ãƒ£ãƒƒã‚·ãƒ¥ä¿æŒæ™‚間(秒)'; +$lang['target____wiki'] = '内部リンクã®è¡¨ç¤ºå…ˆ'; +$lang['target____interwiki'] = 'InterWikiリンクã®è¡¨ç¤ºå…ˆ'; +$lang['target____extern'] = '外部リンクã®è¡¨ç¤ºå…ˆ'; +$lang['target____media'] = 'メディアリンクã®è¡¨ç¤ºå…ˆ'; +$lang['target____windows'] = 'Windowsリンクã®è¡¨ç¤ºå…ˆ'; +$lang['mediarevisions'] = 'メディアファイルã®å±¥æ´ã‚’有効ã«ã—ã¾ã™ã‹?'; +$lang['refcheck'] = 'メディアå‚ç…§å…ƒãƒã‚§ãƒƒã‚¯'; +$lang['refshow'] = 'メディアå‚照元表示数'; +$lang['gdlib'] = 'GDlibãƒãƒ¼ã‚¸ãƒ§ãƒ³'; +$lang['im_convert'] = 'ImageMagick変æ›ãƒ„ールã¸ã®ãƒ‘ス'; +$lang['jpg_quality'] = 'JPG圧縮å“質(0-100)'; +$lang['fetchsize'] = '外部ã‹ã‚‰ã®ãƒ€ã‚¦ãƒ³ãƒãƒ¼ãƒ‰æœ€å¤§ã‚µã‚¤ã‚º'; +$lang['subscribers'] = '更新通知機能'; +$lang['subscribe_time'] = 'è³¼èªãƒªã‚¹ãƒˆã¨æ¦‚è¦ã‚’é€ä¿¡ã™ã‚‹æœŸé–“(秒)。「最近ã®å¤‰æ›´ã¨ã™ã‚‹æœŸé–“ã€ã§æŒ‡å®šã—ãŸæœŸé–“よりå°ã•ãã—ã¦ãã ã•ã„。'; +$lang['notify'] = '変更を通知ã™ã‚‹ãƒ¡ãƒ¼ãƒ«ã‚¢ãƒ‰ãƒ¬ã‚¹'; +$lang['registernotify'] = 'æ–°è¦ãƒ¦ãƒ¼ã‚¶ãƒ¼ç™»éŒ²ã‚’通知ã™ã‚‹ãƒ¡ãƒ¼ãƒ«ã‚¢ãƒ‰ãƒ¬ã‚¹'; +$lang['mailfrom'] = 'メールé€ä¿¡æ™‚ã®é€ä¿¡å…ƒã‚¢ãƒ‰ãƒ¬ã‚¹'; +$lang['mailprefix'] = '自動メールã®é¡Œåã«ä½¿ç”¨ã™ã‚‹æŽ¥é 語'; +$lang['sitemap'] = 'Googleサイトマップ作æˆé »åº¦ï¼ˆæ—¥æ•°ï¼‰'; +$lang['rss_type'] = 'RSSフィード形å¼'; +$lang['rss_linkto'] = 'RSS内リンク先'; +$lang['rss_content'] = 'XMLフィードã«ä½•を表示ã•ã›ã¾ã™ã‹ï¼Ÿ'; +$lang['rss_update'] = 'RSSãƒ•ã‚£ãƒ¼ãƒ‰ã®æ›´æ–°é–“隔(秒)'; +$lang['rss_show_summary'] = 'フィードã®ã‚¿ã‚¤ãƒˆãƒ«ã«ã‚µãƒžãƒªãƒ¼ã‚’表示'; +$lang['rss_media'] = 'XMLフィードã§ã€ã©ã‚“ãªç¨®é¡žã®å¤‰æ›´ã‚’記載ã™ã‚‹ã‹'; $lang['updatecheck'] = 'DokuWikiã®æ›´æ–°ã¨ã‚»ã‚ュリティã«é–¢ã™ã‚‹æƒ…å ±ã‚’ãƒã‚§ãƒƒã‚¯ã—ã¾ã™ã‹ï¼Ÿ ã“ã®æ©Ÿèƒ½ã¯ update.dokuwiki.org ã¸ã®æŽ¥ç¶šãŒå¿…è¦ã§ã™ã€‚'; $lang['userewrite'] = 'URLã®æ›¸ãæ›ãˆ'; $lang['useslash'] = 'URL上ã®åå‰ç©ºé–“ã®åŒºåˆ‡ã‚Šã«ã‚¹ãƒ©ãƒƒã‚·ãƒ¥ã‚’使用'; -$lang['usedraft'] = '編集ä¸ã®è‡ªå‹•ä¿å˜ï¼ˆãƒ‰ãƒ©ãƒ•ト)機能を使用'; $lang['sepchar'] = 'ページåã®å˜èªžåŒºåˆ‡ã‚Šæ–‡å—'; $lang['canonical'] = 'canonical URLï¼ˆæ£æº–URL)を使用'; $lang['fnencode'] = 'éžã‚¢ã‚¹ã‚ーファイルåã®ã‚¨ãƒ³ã‚³ãƒ¼ãƒ‡ã‚£ãƒ³ã‚°æ–¹æ³•'; $lang['autoplural'] = '自動複数形処ç†'; $lang['compression'] = 'アーカイブファイルã®åœ§ç¸®æ–¹æ³•'; -$lang['cachetime'] = 'ã‚ãƒ£ãƒƒã‚·ãƒ¥ä¿æŒæ™‚間(秒)'; -$lang['locktime'] = 'ファイルãƒãƒƒã‚¯æœŸé™ï¼ˆç§’)'; -$lang['fetchsize'] = '外部ã‹ã‚‰ã®ãƒ€ã‚¦ãƒ³ãƒãƒ¼ãƒ‰æœ€å¤§ã‚µã‚¤ã‚º'; -$lang['notify'] = '変更を通知ã™ã‚‹ãƒ¡ãƒ¼ãƒ«ã‚¢ãƒ‰ãƒ¬ã‚¹'; -$lang['registernotify'] = 'æ–°è¦ãƒ¦ãƒ¼ã‚¶ãƒ¼ç™»éŒ²ã‚’通知ã™ã‚‹ãƒ¡ãƒ¼ãƒ«ã‚¢ãƒ‰ãƒ¬ã‚¹'; -$lang['mailfrom'] = 'メールé€ä¿¡æ™‚ã®é€ä¿¡å…ƒã‚¢ãƒ‰ãƒ¬ã‚¹'; -$lang['mailprefix'] = '自動メールã®é¡Œåã«ä½¿ç”¨ã™ã‚‹æŽ¥é 語'; $lang['gzip_output'] = 'xhtmlã«å¯¾ã™ã‚‹ã‚³ãƒ³ãƒ†ãƒ³ãƒ„圧縮(gzip)を使用'; -$lang['gdlib'] = 'GDlibãƒãƒ¼ã‚¸ãƒ§ãƒ³'; -$lang['im_convert'] = 'ImageMagick変æ›ãƒ„ールã¸ã®ãƒ‘ス'; -$lang['jpg_quality'] = 'JPG圧縮å“質(0-100)'; -$lang['subscribers'] = '更新通知機能'; -$lang['subscribe_time'] = 'è³¼èªãƒªã‚¹ãƒˆã¨æ¦‚è¦ã‚’é€ä¿¡ã™ã‚‹æœŸé–“(秒)。「最近ã®å¤‰æ›´ã¨ã™ã‚‹æœŸé–“ã€ã§æŒ‡å®šã—ãŸæœŸé–“よりå°ã•ãã—ã¦ãã ã•ã„。'; $lang['compress'] = 'CSSã¨JavaScriptを圧縮'; $lang['cssdatauri'] = 'HTTP リクエスト数ã«ã‚ˆã‚‹ã‚ªãƒ¼ãƒãƒ¼ãƒ˜ãƒƒãƒ‰ã‚’減らã™ãŸã‚ã€CSS ファイルã‹ã‚‰å‚ç…§ã•れる画åƒãƒ•ァイルã®ã‚µã‚¤ã‚ºãŒã“ã“ã§æŒ‡å®šã™ã‚‹ãƒã‚¤ãƒˆæ•°ä»¥å†…ã®å ´åˆã¯ CSS ファイル内㫠Data URI ã¨ã—ã¦åŸ‹ã‚è¾¼ã¿ã¾ã™ã€‚ã“ã®ãƒ†ã‚¯ãƒ‹ãƒƒã‚¯ã¯ IE7 以下ã§ã¯å‹•作ã—ã¾ã›ã‚“! <code>400</code> ã‹ã‚‰ <code>600</code> ãƒã‚¤ãƒˆãŒã¡ã‚‡ã†ã©ã‚ˆã„値ã§ã™ã€‚<code>0</code> を指定ã™ã‚‹ã¨åŸ‹ã‚è¾¼ã¿å‡¦ç†ã¯è¡Œã‚れã¾ã›ã‚“。'; -$lang['hidepages'] = 'éžå…¬é–‹ãƒšãƒ¼ã‚¸ï¼ˆRegex)'; $lang['send404'] = '文書ãŒå˜åœ¨ã—ãªã„ページã«"HTTP404/Page Not Found"を使用'; -$lang['sitemap'] = 'Googleサイトマップ作æˆé »åº¦ï¼ˆæ—¥æ•°ï¼‰'; $lang['broken_iua'] = 'ignore_user_abort関数ãŒç ´æã—ã¦ã„ã‚‹æã‚ŒãŒã‚りã¾ã™ã€‚ãã®ãŸã‚ã€æ¤œç´¢ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ãŒå‹•作ã—ãªã„å¯èƒ½æ€§ãŒã‚りã¾ã™ã€‚IIS+PHP/CGIã®çµ„ã¿åˆã‚ã›ã§ç ´æã™ã‚‹ã“ã¨ãŒåˆ¤æ˜Žã—ã¦ã„ã¾ã™ã€‚詳ã—ãã¯<a href="http://bugs.splitbrain.org/?do=details&task_id=852">Bug 852</a>ã‚’å‚ç…§ã—ã¦ãã ã•ã„。'; $lang['xsendfile'] = 'ウェブサーãƒãƒ¼ãŒé™çš„ファイルを生æˆã™ã‚‹ãŸã‚ã« X-Sendfile ヘッダーを使用ã—ã¾ã™ã‹ï¼ŸãªãŠã€ã“ã®æ©Ÿèƒ½ã‚’ウェブサーãƒãƒ¼ãŒã‚µãƒãƒ¼ãƒˆã—ã¦ã„ã‚‹å¿…è¦ãŒã‚りã¾ã™ã€‚'; $lang['renderer_xhtml'] = 'Wikiã®å‡ºåŠ›ï¼ˆxhtml)ã«ãƒ¬ãƒ³ãƒ€ãƒ©ãƒ¼ã‚’使用ã™ã‚‹'; $lang['renderer__core'] = '%s (Dokuwikiコア)'; $lang['renderer__plugin'] = '%s (プラグイン)'; -$lang['rememberme'] = 'ãƒã‚°ã‚¤ãƒ³ç”¨ã‚¯ãƒƒã‚ーを永久ã«ä¿æŒã™ã‚‹ã“ã¨ã‚’許å¯ï¼ˆãƒã‚°ã‚¤ãƒ³ã‚’ä¿æŒï¼‰'; -$lang['rss_type'] = 'RSSフィード形å¼'; -$lang['rss_linkto'] = 'RSS内リンク先'; -$lang['rss_content'] = 'XMLフィードã«ä½•を表示ã•ã›ã¾ã™ã‹ï¼Ÿ'; -$lang['rss_update'] = 'RSSãƒ•ã‚£ãƒ¼ãƒ‰ã®æ›´æ–°é–“隔(秒)'; -$lang['recent_days'] = '最近ã®å¤‰æ›´ã¨ã™ã‚‹æœŸé–“(日数)'; -$lang['rss_show_summary'] = 'フィードã®ã‚¿ã‚¤ãƒˆãƒ«ã«ã‚µãƒžãƒªãƒ¼ã‚’表示'; -$lang['rss_media'] = 'XMLフィードã§ã€ã©ã‚“ãªç¨®é¡žã®å¤‰æ›´ã‚’記載ã™ã‚‹ã‹'; -$lang['target____wiki'] = '内部リンクã®è¡¨ç¤ºå…ˆ'; -$lang['target____interwiki'] = 'InterWikiリンクã®è¡¨ç¤ºå…ˆ'; -$lang['target____extern'] = '外部リンクã®è¡¨ç¤ºå…ˆ'; -$lang['target____media'] = 'メディアリンクã®è¡¨ç¤ºå…ˆ'; -$lang['target____windows'] = 'Windowsリンクã®è¡¨ç¤ºå…ˆ'; $lang['proxy____host'] = 'プãƒã‚ã‚· - サーãƒãƒ¼å'; $lang['proxy____port'] = 'プãƒã‚ã‚· - ãƒãƒ¼ãƒˆ'; $lang['proxy____user'] = 'プãƒã‚ã‚· - ユーザーå'; diff --git a/lib/plugins/config/lang/ko/intro.txt b/lib/plugins/config/lang/ko/intro.txt index 22dd96ef6208749963569294823fdb41ec39dd89..f6b76ecfcf8c27fd871b2fc93131cf16e513b1c2 100644 --- a/lib/plugins/config/lang/ko/intro.txt +++ b/lib/plugins/config/lang/ko/intro.txt @@ -1,9 +1,7 @@ ====== 환경 ì„¤ì • 관리 ====== -DokuWiki ì„¤ì¹˜í• ë•Œ ì„¤ì •ë“¤ì„ ë³€ê²½í•˜ê¸° 위해 사용하는 페ì´ì§€ìž…니다. ê° ì„¤ì •ì— ëŒ€í•œ ìžì„¸í•œ ë„움ë§ì´ 필요하다면 [[doku>ko:config|ì„¤ì • 문서(번ì—)]]와 [[doku>config|ì„¤ì • 문서(ì˜ë¬¸)]]를 참조합니다. - -플러그ì¸ì— 대한 ìžì„¸í•œ ì •ë³´ê°€ 필요하다면 [[doku>plugin:config|í”ŒëŸ¬ê·¸ì¸ ì„¤ì •]]페ì´ì§€ë¥¼ 참조합니다. ë¶‰ì€ ë°°ê²½ìƒ‰ìœ¼ë¡œ ë³´ì´ëŠ” ì„¤ì •ë“¤ì€ ì´ í”ŒëŸ¬ì¸ì—서 변경하지 못하ë„ë¡ ë˜ì–´ìžˆìŠµë‹ˆë‹¤. 파란 배경색으로 ë³´ì´ëŠ” ì„¤ì •ë“¤ì€ ê¸°ë³¸ ì„¤ì •ê°’ì„ ê°€ì§€ê³ ìžˆìŠµë‹ˆë‹¤. í°ìƒ‰ 배경색으로 ë³´ì´ëŠ” ì„¤ì •ë“¤ì€ íŠ¹ë³„í•œ 설치를 위해 ì„¤ì •ë˜ì–´ 있습니다. 파란색과 í°ìƒ‰ ë°°ê²½ ì„¤ì •ë“¤ì´ ìˆ˜ì • 가능합니다. - -ì´íŽ˜ì´ì§€ë¥¼ ë내기 ì „ì— **ì €ìž¥**ë²„íŠ¼ì„ ëˆ„ë¥´ì§€ 않으면 ì„¤ì •ê°’ë“¤ì€ ì ìš©ë˜ì§€ 않습니다. +DokuWiki ì„¤ì¹˜í• ë•Œ ì„¤ì •ì„ ë³€ê²½í•˜ê¸° 위해 사용하는 페ì´ì§€ìž…니다. ê° ì„¤ì •ì— ëŒ€í•œ ìžì„¸í•œ ë„움ë§ì´ 필요하다면 [[doku>ko:config|ì„¤ì • 문서 (한êµì–´)]]와 [[doku>config|ì„¤ì • 문서 (ì˜ì–´)]]를 ì°¸ê³ í•˜ì„¸ìš”. +플러그ì¸ì— 대한 ìžì„¸í•œ ì •ë³´ê°€ 필요하다면 [[doku>plugin:config|í”ŒëŸ¬ê·¸ì¸ ì„¤ì •]] 문서를 ì°¸ê³ í•˜ì„¸ìš”. 빨간 배경색으로 ë³´ì´ëŠ” ì„¤ì •ì€ ì´ í”ŒëŸ¬ê·¸ì¸ì—서 변경하지 못하ë„ë¡ ë˜ì–´ìžˆìŠµë‹ˆë‹¤. 파란 배경색으로 ë³´ì´ëŠ” ì„¤ì •ì€ ê¸°ë³¸ ì„¤ì •ê°’ì„ ê°€ì§€ê³ ìžˆìŠµë‹ˆë‹¤. 하얀 배경색으로 ë³´ì´ëŠ” ì„¤ì •ì€ íŠ¹ë³„í•œ 설치를 위해 ì„¤ì •ë˜ì–´ 있습니다. 파란색과 하얀색 배경으로 ëœ ì„¤ì •ì€ ìˆ˜ì •ì´ ê°€ëŠ¥í•©ë‹ˆë‹¤. +ì´ íŽ˜ì´ì§€ë¥¼ ë내기 ì „ì— **ì €ìž¥** ë²„íŠ¼ì„ ëˆ„ë¥´ì§€ 않으면 ì„¤ì •ê°’ì€ ì ìš©ë˜ì§€ 않습니다. diff --git a/lib/plugins/config/lang/ko/lang.php b/lib/plugins/config/lang/ko/lang.php index 82863b68406835c39a3eb00bbe00caba7154dda6..5f90044e4c0ba891364b7ad106b332e6b7a799c5 100644 --- a/lib/plugins/config/lang/ko/lang.php +++ b/lib/plugins/config/lang/ko/lang.php @@ -9,151 +9,156 @@ * @author SONG Younghwan <purluno@gmail.com> * @author Seung-Chul Yoo <dryoo@live.com> * @author erial2@gmail.com + * @author Myeongjin <aranet100@gmail.com> */ $lang['menu'] = '환경 ì„¤ì •'; -$lang['error'] = 'ìž˜ëª»ëœ ê°’ë•Œë¬¸ì— ì„¤ì •ë“¤ì„ ë³€ê²½í• ìˆ˜ 없습니다. ìˆ˜ì •í•œ ê°’ë“¤ì„ ê²€ì‚¬í•˜ê³ í™•ì¸ì„ 누르기 ë°”ëžë‹ˆë‹¤. - <br />ìž˜ëª»ëœ ê°’(들)ì€ ë¶‰ì€ ì„ ìœ¼ë¡œ 둘러싸여 있습니다.'; +$lang['error'] = 'ìž˜ëª»ëœ ê°’ ë•Œë¬¸ì— ì„¤ì •ì„ ë³€ê²½í• ìˆ˜ 없습니다. ìˆ˜ì •í•œ ê°’ì„ ê²€í† í•˜ê³ í™•ì¸ì„ 누르세요. +<br />ìž˜ëª»ëœ ê°’ì€ ë¹¨ê°„ ì„ ìœ¼ë¡œ 둘러싸여 있습니다.'; $lang['updated'] = 'ì„¤ì •ì´ ì„±ê³µì 으로 변경ë˜ì—ˆìŠµë‹ˆë‹¤.'; $lang['nochoice'] = '(다른 ì„ íƒì´ 불가능합니다.)'; -$lang['locked'] = '환경 ì„¤ì • 파ì¼ì„ ìˆ˜ì •í• ìˆ˜ 없습니다. ì˜ë„ëœ í–‰ë™ì´ 아니ë¼ë©´,<br /> 파ì¼ì´ë¦„ê³¼ ê¶Œí•œì´ ë§žëŠ”ì§€ 확ì¸í•˜ê¸° ë°”ëžë‹ˆë‹¤. '; -$lang['danger'] = '위험 : ì´ ì˜µì…˜ì„ ìž˜ëª» ìˆ˜ì •í•˜ë©´ í™˜ê²½ì„¤ì • 메뉴를 ì‚¬ìš©í• ìˆ˜ ì—†ì„ ìˆ˜ë„ ìžˆìŠµë‹ˆë‹¤.'; -$lang['warning'] = 'ê²½ê³ : ì´ ì˜µì…˜ì„ ìž˜ëª» ìˆ˜ì •í•˜ë©´ 잘못 ë™ìž‘ í• ìˆ˜ 있습니다.'; -$lang['security'] = '보안 ê²½ê³ : ì´ ì˜µì…˜ì€ ë³´ì•ˆì— ìœ„í—˜ì´ ìžˆì„ ìˆ˜ 있습니다.'; +$lang['locked'] = '환경 ì„¤ì • 파ì¼ì„ ìˆ˜ì •í• ìˆ˜ 없습니다. ì˜ë„한 í–‰ë™ì´ 아니ë¼ë©´,<br /> +íŒŒì¼ ì´ë¦„ê³¼ ê¶Œí•œì´ ë§žëŠ”ì§€ 확ì¸í•˜ê¸° ë°”ëžë‹ˆë‹¤. '; +$lang['danger'] = '위험: ì´ ì˜µì…˜ì„ ìž˜ëª» ìˆ˜ì •í•˜ë©´ í™˜ê²½ì„¤ì • 메뉴를 ì‚¬ìš©í• ìˆ˜ ì—†ì„ ìˆ˜ë„ ìžˆìŠµë‹ˆë‹¤.'; +$lang['warning'] = 'ê²½ê³ : ì´ ì˜µì…˜ì„ ìž˜ëª» ìˆ˜ì •í•˜ë©´ 잘못 ë™ìž‘í• ìˆ˜ 있습니다.'; +$lang['security'] = '보안 ê²½ê³ : ì´ ì˜µì…˜ì€ ë³´ì•ˆì— ìœ„í—˜ì´ ìžˆì„ ìˆ˜ 있습니다.'; $lang['_configuration_manager'] = '환경 ì„¤ì • 관리ìž'; $lang['_header_dokuwiki'] = 'DokuWiki ì„¤ì •'; -$lang['_header_plugin'] = 'Plugin ì„¤ì •'; -$lang['_header_template'] = 'Template ì„¤ì •'; +$lang['_header_plugin'] = 'í”ŒëŸ¬ê·¸ì¸ ì„¤ì •'; +$lang['_header_template'] = '템플릿 ì„¤ì •'; $lang['_header_undefined'] = 'ì •ì˜ë˜ì§€ ì•Šì€ ì„¤ì •'; $lang['_basic'] = '기본 ì„¤ì •'; $lang['_display'] = '화면 표시 ì„¤ì •'; $lang['_authentication'] = 'ì¸ì¦ ì„¤ì •'; -$lang['_anti_spam'] = '안티-스팸 ì„¤ì •'; +$lang['_anti_spam'] = '스팸 ë°©ì§€ ì„¤ì •'; $lang['_editing'] = '편집 ì„¤ì •'; $lang['_links'] = 'ë§í¬ ì„¤ì •'; $lang['_media'] = '미디어 ì„¤ì •'; -$lang['_advanced'] = 'ì§„ë³´ëœ ì„¤ì •'; +$lang['_notifications'] = '알림 ì„¤ì •'; +$lang['_syndication'] = 'ì‹ ë””ì¼€ì´ì…˜ ì„¤ì •'; +$lang['_advanced'] = 'ê³ ê¸‰ ì„¤ì •'; $lang['_network'] = 'ë„¤íŠ¸ì›Œí¬ ì„¤ì •'; -$lang['_plugin_sufix'] = 'Plugin ì„¤ì •'; -$lang['_template_sufix'] = 'Template ì„¤ì •'; -$lang['_msg_setting_undefined'] = 'ì„¤ì •ë˜ì§€ ì•Šì€ ë©”íƒ€ë°ì´íƒ€.'; +$lang['_plugin_sufix'] = 'í”ŒëŸ¬ê·¸ì¸ ì„¤ì •'; +$lang['_template_sufix'] = '템플릿 ì„¤ì •'; +$lang['_msg_setting_undefined'] = 'ì„¤ì •ë˜ì§€ ì•Šì€ ë©”íƒ€ë°ì´í„°.'; $lang['_msg_setting_no_class'] = 'ì„¤ì •ë˜ì§€ ì•Šì€ í´ëž˜ìФ.'; $lang['_msg_setting_no_default'] = '기본값 ì—†ìŒ.'; -$lang['fmode'] = 'íŒŒì¼ ìƒì„± 모드'; -$lang['dmode'] = 'ë””ë ‰í† ë¦¬ ìƒì„± 모드'; -$lang['lang'] = '언어'; -$lang['basedir'] = '기본 ë””ë ‰í† ë¦¬'; -$lang['baseurl'] = '기본 URL'; +$lang['title'] = '위키 ì œëª© (위키 ì´ë¦„)'; +$lang['start'] = 'ê° ì´ë¦„공간ì—서 ì‚¬ìš©í• ì‹œìž‘ 문서 ì´ë¦„'; +$lang['lang'] = 'ì¸í„°íŽ˜ì´ìФ 언어'; +$lang['template'] = '템플릿 (위키 ë””ìžì¸)'; +$lang['tagline'] = '태그 ë¼ì¸ (í…œí”Œë¦¿ì´ ì§€ì›í• ë•Œì— í•œí•¨)'; +$lang['sidebar'] = '사ì´ë“œë°” 문서 ì´ë¦„ (í…œí”Œë¦¿ì´ ì§€ì›í• ë•Œì— í•œí•¨). 비워ë‘ë©´ 사ì´ë“œë°”를 비활성화'; +$lang['license'] = '콘í…ì¸ ì— ì–´ë–¤ ë¼ì´ì„ 스를 ì ìš©í•˜ê² ìŠµë‹ˆê¹Œ?'; $lang['savedir'] = 'ë°ì´íƒ€ ì €ìž¥ ë””ë ‰í† ë¦¬'; -$lang['cookiedir'] = 'ì¿ í‚¤ 위치. 비워ë‘ë©´ 기본 url 위치로 ì§€ì •ë©ë‹ˆë‹¤.'; -$lang['start'] = '시작 페ì´ì§€ ì´ë¦„'; -$lang['title'] = '위키 ì œëª©'; -$lang['template'] = '템플릿'; -$lang['tagline'] = '태그 ë¼ì¸ (í…œí”Œë¦¿ì´ ì§€ì›í• ë•Œì— í•œí•´)'; -$lang['sidebar'] = '사ì´ë“œë°” 페ì´ì§€ ì´ë¦„(í…œí”Œë¦¿ì´ ì§€ì›í• ë•Œì— í•œí•´). 비워ë‘ë©´ 사ì´ë“œë°”를 비활성화함'; -$lang['license'] = '컨í…íŠ¸ì— ì–´ë–¤ ë¼ì´ì„¼ìФ ì •ì±…ì„ ì ìš©í•˜ì‹œê² ìŠµë‹ˆê¹Œ?'; -$lang['fullpath'] = '페ì´ì§€ í•˜ë‹¨ì— ì „ì²´ 경로 보여주기'; -$lang['recent'] = 'ìµœê·¼ì— ë°”ë€ ê²ƒ'; -$lang['breadcrumbs'] = '위치 ì¶”ì 수'; -$lang['youarehere'] = '계층형 위치 ì¶”ì '; +$lang['basedir'] = '서버 경로 (예를 들어 <code>/dokuwiki/</code>). ìžë™ ê°ì§€ë¥¼ í•˜ë ¤ë©´ 비우세요.'; +$lang['baseurl'] = '서버 URL (예를 들어 <code>http://www.yourserver.com</code>). ìžë™ ê°ì§€ë¥¼ í•˜ë ¤ë©´ 비우세요.'; +$lang['cookiedir'] = 'ì¿ í‚¤ 위치. 비워ë‘ë©´ 기본 URL 위치로 ì§€ì •ë©ë‹ˆë‹¤.'; +$lang['dmode'] = 'ë””ë ‰í† ë¦¬ ìƒì„± 모드'; +$lang['fmode'] = 'íŒŒì¼ ìƒì„± 모드'; +$lang['allowdebug'] = '디버그 허용 <b>필요하지 않으면 금지!</b>'; +$lang['recent'] = '최근 ë°”ë€ ë¬¸ì„œë‹¹ í•목 수'; +$lang['recent_days'] = '최근 ë°”ë€ ë¬¸ì„œ 기준 시간 (ë‚ ì§œ)'; +$lang['breadcrumbs'] = '위치 "ì¶”ì " 수. 0으로 ì„¤ì •í•˜ë©´ 비활성화함.'; +$lang['youarehere'] = '계층형 위치 ì¶”ì (ë‹¤ìŒ ìœ„ì˜ ì˜µì…˜ì„ ë¹„í™œì„±í™”í•˜ê³ ì‹¶ìŠµë‹ˆë‹¤)'; +$lang['fullpath'] = '문서 í•˜ë‹¨ì— ì „ì²´ 경로 보여주기'; $lang['typography'] = '기호 대체'; -$lang['htmlok'] = 'HTML 내장 허용'; -$lang['phpok'] = 'PHP 내장 허용'; -$lang['dformat'] = 'ë‚ ì§œ í¬ë§· (PHP <a href="http://www.php.net/strftime">strftime</a> 기능) 참조'; -$lang['signature'] = '서명'; +$lang['dformat'] = 'ë‚ ì§œ í˜•ì‹ (PHP <a href="http://www.php.net/strftime">strftime</a> 기능 ì°¸ê³ )'; +$lang['signature'] = '편집기ì—서 서명 ë²„íŠ¼ì„ ëˆ„ë¥¼ 때 ì‚½ìž…í• ë‚´ìš©'; +$lang['showuseras'] = 'ë§ˆì§€ë§‰ì— ë¬¸ì„œë¥¼ ìˆ˜ì •í•œ 사용ìžë¥¼ 보여줄지 여부'; $lang['toptoclevel'] = '목차 최ìƒìœ„ í•목'; -$lang['tocminheads'] = '목차 표시 여부를 ê²°ì •í• ìµœì†Œí•œì˜ í‘œì œ í•ëª©ì˜ ìˆ˜'; +$lang['tocminheads'] = '목차 표시 여부를 ê²°ì •í• ìµœì†Œí•œì˜ ë¬¸ë‹¨ ì œëª© í•ëª©ì˜ ìˆ˜'; $lang['maxtoclevel'] = '목차 최대 단계'; -$lang['maxseclevel'] = '섹션 최대 편집 단계'; +$lang['maxseclevel'] = '문단 최대 편집 단계'; $lang['camelcase'] = 'ë§í¬ì— CamelCase 사용'; -$lang['deaccent'] = '악센트 없는 페ì´ì§€ ì´ë¦„'; -$lang['useheading'] = '페ì´ì§€ ì´ë¦„으로 첫 헤드ë¼ì¸ 사용'; -$lang['refcheck'] = '미디어 참조 검사'; -$lang['refshow'] = '보여줄 미디어 참조 수'; -$lang['allowdebug'] = '디버그 허용 <b>필요하지 않으면 금지!</b>'; -$lang['mediarevisions'] = '미디어 ë²„ì „ 관리를 ì‚¬ìš©í•˜ì‹œê² ìŠµë‹ˆê¹Œ?'; -$lang['usewordblock'] = '금지단어를 사용해 스팸 막기'; -$lang['indexdelay'] = 'ìƒ‰ì¸ ì—°ê¸° 시간(ì´ˆ)'; -$lang['relnofollow'] = '외부 ë§í¬ì— rel="nofollow" 사용'; -$lang['mailguard'] = 'ì´ë©”ì¼ ì£¼ì†Œë¥¼ 알아볼 수 없게'; -$lang['iexssprotect'] = '업로드 파ì¼ì˜ 악성 Javascript, HTML 코드 가능성 여부를 검사'; -$lang['showuseras'] = '마지막으로 페ì´ì§€ë¥¼ ìˆ˜ì •í•œ 사용ìžë¥¼ 보여줄지 여부'; -$lang['useacl'] = 'ì ‘ê·¼ ì œì–´ 목ë¡(ACL) 사용'; -$lang['autopasswd'] = 'ìžë™ìœ¼ë¡œ 만들어진 패스워드'; +$lang['deaccent'] = '문서 ì´ë¦„ì„ ì§€ìš°ëŠ” 방법'; +$lang['useheading'] = '문서 ì´ë¦„으로 첫 문단 ì œëª© 사용'; +$lang['sneaky_index'] = '기본ì 으로 DokuWiki는 ìƒ‰ì¸ ëª©ë¡ì— ëª¨ë“ ì´ë¦„ê³µê°„ì„ ë³´ì—¬ì¤ë‹ˆë‹¤. +ì´ ì˜µì…˜ì„ ì„¤ì •í•˜ë©´ 사용ìžê°€ ì½ê¸° ê¶Œí•œì„ ê°€ì§€ê³ ìžˆì§€ ì•Šì€ ì´ë¦„ê³µê°„ì€ ë³´ì—¬ì£¼ì§€ 않습니다. ì ‘ê·¼ 가능한 하위 ì´ë¦„ê³µê°„ì„ ë³´ì´ì§€ 않게 ì„¤ì •í•˜ë©´ ìžë™ìœ¼ë¡œ ì„¤ì •ë©ë‹ˆë‹¤. íŠ¹ì • ACL ì„¤ì •ì€ ìƒ‰ì¸ ì‚¬ìš©ì´ ë¶ˆê°€ëŠ¥í•˜ê²Œ í• ìˆ˜ë„ ìžˆìŠµë‹ˆë‹¤.'; +$lang['hidepages'] = '사ì´íŠ¸ë§µê³¼ 기타 ìžë™ 색ì¸ê³¼ ê°™ì€ ì°¾ê¸°ì—서 ì •ê·œ 표현ì‹ê³¼ ì¼ì¹˜í•˜ëŠ” 문서 숨기기'; +$lang['useacl'] = 'ì ‘ê·¼ ì œì–´ ëª©ë¡ (ACL) 사용'; +$lang['autopasswd'] = 'ìžë™ìœ¼ë¡œ 만들어진 비밀번호'; $lang['authtype'] = 'ì¸ì¦ ë°±-엔드'; -$lang['passcrypt'] = '패스워드 암호화 방법'; -$lang['defaultgroup'] = '기본 그룹'; -$lang['superuser'] = 'ìŠˆí¼ ìœ ì €'; -$lang['manager'] = 'ê´€ë¦¬ìž - 관리 ê¸°ëŠ¥ë“¤ì„ ì‚¬ìš©í• ìˆ˜ 있는 그룹ì´ë‚˜ 사용ìž'; -$lang['profileconfirm'] = 'ê°œì¸ì •ë³´ 변경시 암호 재확ì¸'; -$lang['disableactions'] = 'DokuWiki Action 금지'; +$lang['passcrypt'] = '비밀번호 암호화 방법'; +$lang['defaultgroup'] = '기본 그룹, ëª¨ë“ ìƒˆ 사용ìžëŠ” ì´ ê·¸ë£¹ì— ì†í•©ë‹ˆë‹¤'; +$lang['superuser'] = 'ìŠˆí¼ ìœ ì € - ACL ì„¤ì •ê³¼ ìƒê´€ì—†ì´ ëª¨ë“ ë¬¸ì„œì™€ ê¸°ëŠ¥ì— ëŒ€í•œ ì „ì²´ ì ‘ê·¼ ê¶Œí•œì„ ê°€ì§„ 그룹ì´ë‚˜ 사용ìž. 사용ìž1,@그룹1,사용ìž2 쉼표로 구분한 목ë¡'; +$lang['manager'] = 'ê´€ë¦¬ìž - 관리 ê¸°ëŠ¥ì„ ì‚¬ìš©í• ìˆ˜ 있는 그룹ì´ë‚˜ 사용ìž. 사용ìž1,@그룹1,사용ìž2 쉼표로 구분한 목ë¡'; +$lang['profileconfirm'] = 'ê°œì¸ ì •ë³´ë¥¼ 바꿀 때 비밀번호 다시 확ì¸'; +$lang['rememberme'] = 'í•ìƒ ë¡œê·¸ì¸ ì •ë³´ ì €ìž¥ 허용 (기억하기)'; +$lang['disableactions'] = 'DokuWiki í™œë™ ë¹„í™œì„±í™”'; $lang['disableactions_check'] = '검사'; $lang['disableactions_subscription'] = 'êµ¬ë… ì‹ ì²/í•´ì§€'; -$lang['disableactions_wikicode'] = '문서 소스 보기'; -$lang['disableactions_other'] = '다른 Action(comma로 구분)'; -$lang['sneaky_index'] = '기본ì 으로, DokuWiki는 ìƒ‰ì¸ ëª©ë¡ì— ëª¨ë“ ë„¤ìž„ìŠ¤íŽ˜ì´ìŠ¤ë“¤ì„ ë³´ì—¬ì¤ë‹ˆë‹¤. -ì´ ì˜µì…˜ì„ ì„¤ì •í•˜ë©´ 사용ìžê°€ ì½ê¸° ê¶Œí•œì„ ê°€ì§€ê³ ìžˆì§€ ì•Šì€ ë„¤ìž„ìŠ¤íŽ˜ì´ìŠ¤ë“¤ì€ ë³´ì—¬ì£¼ì§€ 않습니다. ì ‘ê·¼ 가능한 하위 네임스페ì´ìŠ¤ë“¤ ë³´ì´ì§€ì•Šê²Œ ì„¤ì •í•˜ë©´ ìžë™ìœ¼ë¡œ ì„¤ì •ë©ë‹ˆë‹¤. -íŠ¹ì • ACL ì„¤ì •ì€ ìƒ‰ì¸ ì‚¬ìš©ì´ ë¶ˆê°€ëŠ¥í•˜ê²Œ í• ìˆ˜ë„ ìžˆìŠµë‹ˆë‹¤.'; -$lang['auth_security_timeout'] = 'ì¸ì¦ 보안 초과 시간(ì´ˆ)'; -$lang['securecookie'] = 'HTTPS로 ë³´ë‚´ì§„ ì¿ í‚¤ëŠ” HTTPSì—ë§Œ ì ìš© í• ê¹Œìš”? ìœ„í‚¤ì˜ ë¡œê·¸ì¸ íŽ˜ì´ì§€ë§Œ SSL로 암호화 í•˜ê³ ìœ„í‚¤ 페ì´ì§€ëŠ” ê·¸ë ‡ì§€ 않ì€ê²½ìš° 꺼야 합니다.'; -$lang['xmlrpc'] = 'XML-RPC ì¸í„°íŽ˜ì´ìФ ì§€ì›/무시'; -$lang['xmlrpcuser'] = '주어진 그룹ì´ë‚˜ ìœ ì €ë“¤ì—게만 XML-RPCì ‘ê·¼ì„ í—ˆë½í•˜ë ¤ë©´ 컴마로 구분하여 ì 으세요. 비어ë‘ë©´ 모ë‘ì—게 허용ë©ë‹ˆë‹¤.'; -$lang['updatecheck'] = 'ì—…ë°ì´íŠ¸ì™€ 보안 ë¬¸ì œë¥¼ 검사(DokuWiki를 update.dokuwiki.orgì— ì—°ê²°í•´ì•¼ 합니다.)'; -$lang['userewrite'] = 'URL rewriting기능 사용'; -$lang['useslash'] = 'URLì—서 네임스페ì´ìФ 구분ìžë¡œ 슬래쉬 ë¬¸ìž ì‚¬ìš©'; +$lang['disableactions_wikicode'] = 'ë‚´ìš© 보기/ì›ì‹œ 내보대기'; +$lang['disableactions_other'] = '다른 í™œë™ (쉼표로 구분)'; +$lang['auth_security_timeout'] = 'ì¸ì¦ 보안 초과 시간 (ì´ˆ)'; +$lang['securecookie'] = 'HTTPS로 ë³´ë‚´ì§„ ì¿ í‚¤ëŠ” HTTPSì—ë§Œ ì ìš© í• ê¹Œìš”? ìœ„í‚¤ì˜ ë¡œê·¸ì¸ íŽ˜ì´ì§€ë§Œ SSL로 ì•”í˜¸í™”í•˜ê³ ìœ„í‚¤ 문서는 ê·¸ë ‡ì§€ ì•Šì€ ê²½ìš° 비활성화 합니다.'; +$lang['remote'] = 'ì›ê²© API를 활성화 합니다. ì´ í•ëª©ì„ í—ˆìš©í•˜ë©´ XML-RPC ë° ê¸°íƒ€ ë©”ì¹´ë‹ˆì¦˜ì„ í†µí•´ 다른 어플리케ì´ì…˜ìœ¼ë¡œ ì ‘ê·¼ê°€ëŠ¥í•©ë‹ˆë‹¤.'; +$lang['remoteuser'] = 'ì´ í•ëª©ì— ìž…ë ¥ëœ ì‰¼í‘œë¡œ ë‚˜ëˆ ì§„ 그룹ì´ë‚˜ 사용ìžì—게 ì›ê²© API ì ‘ê·¼ì„ ì œí•œí•©ë‹ˆë‹¤. 빈칸으로 ë‘ë©´ 모ë‘ì—게 허용합니다.'; +$lang['usewordblock'] = '금지 단어를 사용해 스팸 막기'; +$lang['relnofollow'] = '외부 ë§í¬ì— rel="nofollow" 사용'; +$lang['indexdelay'] = 'ìƒ‰ì¸ ì—°ê¸° 시간 (ì´ˆ)'; +$lang['mailguard'] = 'ì´ë©”ì¼ ì£¼ì†Œë¥¼ 알아볼 수 없게 하기'; +$lang['iexssprotect'] = '올린 파ì¼ì˜ 악성 ìžë°”스í¬ë¦½íЏ, HTML 코드 가능성 여부를 검사'; $lang['usedraft'] = '편집하는 ë™ì•ˆ ìžë™ìœ¼ë¡œ 문서 초안 ì €ìž¥'; -$lang['sepchar'] = '페ì´ì§€ ì´ë¦„ 단어 구분ìž'; -$lang['canonical'] = 'ì™„ì „í•œ canonical URL 사용'; -$lang['fnencode'] = '아스키가 아닌 파ì¼ì´ë¦„ì„ ì¸ì½”딩 하는 방법.'; -$lang['autoplural'] = 'ë§í¬ 연결시 pluralí¼ ê²€ì‚¬'; -$lang['compression'] = 'atticíŒŒì¼ ì••ì¶• 방법 ì„ íƒ'; -$lang['cachetime'] = '최대 ìºì‰¬ ìƒì¡´ 시간(ì´ˆ)'; -$lang['locktime'] = '쵀대 íŒŒì¼ ìž ê¸ˆ 시간(ì´ˆ)'; -$lang['fetchsize'] = 'fetch.phpê°€ 외부ì—서 ë‹¤ìš´ë¡œë“œí• ìˆ˜ë„ ìžˆëŠ” 최대 í¬ê¸°(ë°”ì´íЏ)'; -$lang['notify'] = 'ì´ë©”ì¼ ì•ŒëžŒ 기능'; -$lang['registernotify'] = 'ì‹ ê·œ 등ë¡ìž 알람 기능'; -$lang['mailfrom'] = 'ìžë™ìœ¼ë¡œ 보내지는 ë©”ì¼ ë°œì‹ ìž'; -$lang['mailprefix'] = 'ìžë™ìœ¼ë¡œ 보내지는 ë©”ì¼ì˜ ì œëª© ë§ë¨¸ë¦¬ ë‚´ìš©'; -$lang['gzip_output'] = 'xhml ë‚´ìš© gzip ì••ì¶• 여부'; +$lang['htmlok'] = 'HTML 내장 허용'; +$lang['phpok'] = 'PHP 내장 허용'; +$lang['locktime'] = '최대 íŒŒì¼ ìž ê¸ˆ 시간(ì´ˆ)'; +$lang['cachetime'] = '최대 ìºì‹œ ìƒì¡´ 시간 (ì´ˆ)'; +$lang['target____wiki'] = 'ë‚´ë¶€ ë§í¬ì— 대한 타겟 ì°½'; +$lang['target____interwiki'] = 'ì¸í„°ìœ„키 ë§í¬ì— 대한 타겟 ì°½'; +$lang['target____extern'] = '외부 ë§í¬ì— 대한 타겟 ì°½'; +$lang['target____media'] = '미디어 ë§í¬ì— 대한 타겟 ì°½'; +$lang['target____windows'] = 'ì°½ ë§í¬ì— 대한 타겟 ì°½'; +$lang['mediarevisions'] = '미디어 ë²„ì „ 관리를 ì‚¬ìš©í•˜ê² ìŠµë‹ˆê¹Œ?'; +$lang['refcheck'] = '미디어 파ì¼ì„ ì‚ì œí•˜ê¸° ì „ì— ì‚¬ìš©í•˜ê³ ìžˆëŠ”ì§€ 검사'; +$lang['refshow'] = 'ìœ„ì˜ ì„¤ì •ì´ í™œì„±í™”ë˜ì—ˆì„ 때 보여줄 미디어 ì°¸ê³ ìˆ˜'; $lang['gdlib'] = 'GD ë¼ì´ë¸ŒëŸ¬ë¦¬ ë²„ì „'; -$lang['im_convert'] = 'ImageMagick 위치'; +$lang['im_convert'] = 'ImageMagick 변환 ë„구 위치'; $lang['jpg_quality'] = 'JPG ì••ì¶• 품질 (0-100)'; -$lang['subscribers'] = '페ì´ì§€ ê°±ì‹ ì•ŒëžŒ 기능'; -$lang['subscribe_time'] = ' êµ¬ë… ëª©ë¡ê³¼ ìš”ì•½ì´ ë³´ë‚´ì§ˆ 경과 시간 (ì´ˆ); ì´ ê²ƒì€ recent_daysì—서 ì„¤ì •ëœ ì‹œê°„ë³´ë‹¤ 작아야 합니다.'; -$lang['compress'] = '최ì í™”ëœ CSS, javascript ì¶œë ¥'; -$lang['cssdatauri'] = 'ì´ë¯¸ì§€ê°€ ë Œë”ë§ë 최대 용량 í¬ê¸°ë¥¼ CSSì— ê·œì •í•´ì•¼ HTTP request í—¤ë” ì˜¤ë²„í—¤ë“œ í¬ê¸°ë¥¼ ê°ì†Œì‹œí‚¬ 수 있습니다. ì´ ê¸°ìˆ ì€ IE 7 ì´í•˜ì—서는 ìž‘ë™í•˜ì§€ 않습니다! <code>400</code> ì—서 <code>600></code> ì •ë„ë©´ ì¢‹ì€ íš¨ìœ¨ì„ ê°€ì ¸ì˜µë‹ˆë‹¤. <code>0</code>로 ì§€ì •í• ê²½ìš° 비활성화 ë©ë‹ˆë‹¤.'; -$lang['hidepages'] = '매ì¹ëœ 페ì´ì§€ 숨기기(ì •ê·œí‘œí˜„ì‹)'; +$lang['fetchsize'] = 'fetch.phpê°€ 외부ì—서 ë‹¤ìš´ë¡œë“œí• ìˆ˜ë„ ìžˆëŠ” 최대 í¬ê¸° (ë°”ì´íЏ)'; +$lang['subscribers'] = '사용ìžê°€ ì´ë©”ì¼ë¡œ 문서 ë°”ë€œì— êµ¬ë…하ë„ë¡ í—ˆìš©'; +$lang['subscribe_time'] = 'êµ¬ë… ëª©ë¡ê³¼ ìš”ì•½ì´ ë³´ë‚´ì§ˆ 경과 시간 (ì´ˆ); ì´ ê²ƒì€ recent_daysì—서 ì„¤ì •ëœ ì‹œê°„ë³´ë‹¤ 작아야 합니다.'; +$lang['notify'] = 'í•ìƒ ì´ ì´ë©”ì¼ ì£¼ì†Œë¡œ 바뀜 ì•Œë¦¼ì„ ë³´ëƒ„'; +$lang['registernotify'] = 'í•ìƒ ìƒˆ 사용ìží•œí…Œ ì´ ì´ë©”ì¼ ì£¼ì†Œë¡œ ì •ë³´ë¥¼ 보냄'; +$lang['mailfrom'] = 'ìžë™ìœ¼ë¡œ 보내지는 ë©”ì¼ ë°œì‹ ìž'; +$lang['mailprefix'] = 'ìžë™ìœ¼ë¡œ 보내지는 ë©”ì¼ì˜ ì œëª© ë§ë¨¸ë¦¬ ë‚´ìš©. ë¹„ì› ì„ ê²½ìš° 위키 ì œëª© 사용'; +$lang['htmlmail'] = 'ìš©ëŸ‰ì€ ì¡°ê¸ˆ ë” í¬ì§€ë§Œ 보기 ì¢‹ì€ HTML 태그가 í¬í•¨ëœ ë©”ì¼ì„ 발송합니다. í…ìŠ¤íŠ¸ë§Œì˜ ë©”ì¼ì„ ë³´ë‚´ê³ ìží•˜ë©´ 비활성화하세요.'; +$lang['sitemap'] = '구글 사ì´íŠ¸ë§µ ìƒì„± (ë‚ ì§œ). 0ì¼ ê²½ìš° 비활성화'; +$lang['rss_type'] = 'XML 피드 타입'; +$lang['rss_linkto'] = 'XML 피드 ë§í¬ ì •ë³´'; +$lang['rss_content'] = 'XML 피드 í•ëª©ì— í‘œì‹œë˜ëŠ” ë‚´ìš©ì€?'; +$lang['rss_update'] = 'XML 피드 ì—…ë°ì´íЏ 주기 (ì´ˆ)'; +$lang['rss_show_summary'] = 'XML 피드 ì œëª©ì—서 ìš”ì•½ì •ë³´ 보여주기'; +$lang['rss_media'] = 'ì–´ë–¤ 규격으로 XML 피드를 ë°›ì•„ë³´ì‹œê² ìŠµë‹ˆê¹Œ?'; +$lang['updatecheck'] = 'ì—…ë°ì´íŠ¸ì™€ 보안 ë¬¸ì œë¥¼ ê²€ì‚¬í• ê¹Œìš”? ì´ ê¸°ëŠ¥ì„ ì‚¬ìš©í•˜ë ¤ë©´ DokuWiki를 update.dokuwiki.orgì— ì—°ê²°í•´ì•¼ 합니다.'; +$lang['userewrite'] = 'ë©‹ì§„ URL 사용'; +$lang['useslash'] = 'URLì—서 ì´ë¦„ 구분ìžë¡œ 슬래시 ë¬¸ìž ì‚¬ìš©'; +$lang['sepchar'] = '문서 ì´ë¦„ 단어 구분ìž'; +$lang['canonical'] = 'ì™„ì „í•œ canonical URL 사용'; +$lang['fnencode'] = '아스키가 아닌 íŒŒì¼ ì´ë¦„ì„ ì¸ì½”딩 하는 방법.'; +$lang['autoplural'] = 'ë§í¬ 연결시 복수 ì–‘ì‹ ê²€ì‚¬'; +$lang['compression'] = '첨부 íŒŒì¼ ì••ì¶• 방법 ì„ íƒ'; +$lang['gzip_output'] = 'xhml ë‚´ìš© gzip ì••ì¶• 사용'; +$lang['compress'] = '최ì í™”ëœ CSS, ìžë°”스í¬ë¦½íЏ ì¶œë ¥'; +$lang['cssdatauri'] = 'ê·¸ë¦¼ì´ ë Œë”ë§ë 최대 용량 í¬ê¸°ë¥¼ CSSì— ê·œì •í•´ì•¼ HTTP ìš”ì² í—¤ë” ì˜¤ë²„í—¤ë“œ í¬ê¸°ë¥¼ ê°ì†Œì‹œí‚¬ 수 있습니다. ì´ ê¸°ìˆ ì€ IE 7 ì´í•˜ì—서는 ìž‘ë™í•˜ì§€ 않습니다! <code>400</code>ì—서 <code>600</code> ì •ë„ë©´ ì¢‹ì€ íš¨ìœ¨ì„ ê°€ì ¸ì˜µë‹ˆë‹¤. <code>0</code>로 ì§€ì •í• ê²½ìš° 비활성화 ë©ë‹ˆë‹¤.'; $lang['send404'] = '존재하지 않는 페ì´ì§€ì— 대해 "HTTP 404/Page Not Found" ì‘답'; -$lang['sitemap'] = '구글 사ì´íŠ¸ë§µ ìƒì„±(ë‚ ì§œ)'; $lang['broken_iua'] = 'ì„¤ì¹˜ëœ ì‹œìŠ¤í…œì—서 ignore_user_abort ê¸°ëŠ¥ì— ë¬¸ì œê°€ 있으면 색ì¸ì´ ì •ìƒì 으로 ë™ìž‘하지 않습니다. ì´ ê¸°ëŠ¥ì´ IIS+PHP/CGIì—서 ë¬¸ì œê°€ 있는 것으로 ì•Œë ¤ì¡ŒìŠµë‹ˆë‹¤. ìžì„¸í•œ ì •ë³´ëŠ” <a href="http://bugs.splitbrain.org/?do=details&task_id=852">Bug 852</a>를 ì°¸ê³ í•˜ê¸° ë°”ëžë‹ˆë‹¤.'; $lang['xsendfile'] = '웹 서버 static íŒŒì¼ ì „ì†¡ ì§€ì›ì„ 위해 X-Sendfile í—¤ë”를 사용한다면 ì´ ì˜µì…˜ì„ ì‚¬ìš©í•©ë‹ˆë‹¤. 웹 서버가 ì´ ê¸°ëŠ¥ì„ ì§€ì›í•´ì•¼ 합니다.'; $lang['renderer_xhtml'] = '주 (xhtml) 위키 ì¶œë ¥ 처리기'; $lang['renderer__core'] = '%s (DokuWiki ë‚´ë¶€ 기능)'; -$lang['renderer__plugin'] = '%s (DokuWiki 플러그ì¸)'; -$lang['rememberme'] = 'ë¡œê·¸ì¸ ì •ë³´ ì €ìž¥ 허용'; -$lang['rss_type'] = 'XML feed 타잎'; -$lang['rss_linkto'] = 'XML feed ë§í¬ ì •ë³´'; -$lang['rss_content'] = 'XML feed í•ëª©ë“¤ì— í‘œì‹œë˜ëŠ” ë‚´ìš©ì€?'; -$lang['rss_update'] = 'XML feed ê°±ì‹ ì£¼ê¸°(ì´ˆ)'; -$lang['recent_days'] = '최근 ë°”ë€ íŽ˜ì´ì§€ 기준 시간(ë‚ ì§œ)'; -$lang['rss_show_summary'] = 'XML feed ì œëª©ì—서 ìš”ì•½ì •ë³´ 보여주기'; -$lang['rss_media'] = 'ì–´ë–¤ 규격으로 XML 피드를 ë°›ì•„ë³´ì‹œê² ìŠµë‹ˆê¹Œ?'; -$lang['target____wiki'] = 'ë‚´ë¶€ ë§í¬ë“¤ì— 대한 타겟 윈ë„ìš° '; -$lang['target____interwiki'] = 'InterWiki ë§í¬ë“¤ì— 대한 타겟 윈ë„ìš°'; -$lang['target____extern'] = '외부 ë§í¬ë“¤ì— 대한 타겟 윈ë„ìš°'; -$lang['target____media'] = '미디어 ë§í¬ë“¤ì— 대한 타겟 윈ë„ìš°'; -$lang['target____windows'] = '윈ë„ìš° ë§í¬ë“¤ì— 대한 타겟 윈ë„ìš°'; +$lang['renderer__plugin'] = '%s (플러그ì¸)'; +$lang['dnslookups'] = 'ì´ ì˜µì…˜ì„ í™œì„±í™”í•˜ë©´ ë„ì¿ ìœ„í‚¤ê°€ 문서를 ìˆ˜ì •í•˜ëŠ” 사용ìžì˜ 호스트 네임과 ì›ê²© IP 주소를 확ì¸í•©ë‹ˆë‹¤. 서버가 ëŠë¦¬ê±°ë‚˜, DNS를 ìš´ì˜í•˜ì§€ 않거나 ì´ ê¸°ëŠ¥ì„ ì›ì¹˜ 않으면 비활성화 시켜주세요.'; $lang['proxy____host'] = '프ë¡ì‹œ 서버 ì´ë¦„'; $lang['proxy____port'] = '프ë¡ì‹œ 서버 í¬íЏ'; $lang['proxy____user'] = '프ë¡ì‹œ ì‚¬ìš©ìž ì´ë¦„'; -$lang['proxy____pass'] = '프ë¡ì‹œ 패스워드'; -$lang['proxy____ssl'] = '프ë¡ì‹œ 연결시 ssl사용'; -$lang['proxy____except'] = '프ë¡ì‹œì„¤ì •ì´ ë¬´ì‹œë URLì£¼ì†Œë“¤ì˜ RegEx형ì‹í‘œí˜„'; +$lang['proxy____pass'] = '프ë¡ì‹œ 비밀번호'; +$lang['proxy____ssl'] = '프ë¡ì‹œ 연결시 SSL 사용'; +$lang['proxy____except'] = '프ë¡ì‹œ ì„¤ì •ì´ ë¬´ì‹œë URLì£¼ì†Œì˜ ì •ê·œ 표현ì‹'; $lang['safemodehack'] = 'safemode hack기능 사용'; $lang['ftp____host'] = 'safemode hackì˜ FTP 서버'; -$lang['ftp____port'] = 'safemode hackì˜ FTP port'; +$lang['ftp____port'] = 'safemode hackì˜ FTP í¬íЏ'; $lang['ftp____user'] = 'safemode hackì˜ FTP ì‚¬ìš©ìž ì´ë¦„'; -$lang['ftp____pass'] = 'safemode hackì˜ FTP 패스워드'; +$lang['ftp____pass'] = 'safemode hackì˜ FTP 비밀번호'; $lang['ftp____root'] = 'safemode hackì˜ FTP 루트 ë””ë ‰í† ë¦¬'; $lang['license_o_'] = 'ì„ íƒí•˜ì§€ 않ìŒ'; $lang['typography_o_0'] = '사용 안함'; @@ -174,13 +179,13 @@ $lang['rss_type_o_rss2'] = 'RSS 2.0'; $lang['rss_type_o_atom'] = 'Atom 0.3'; $lang['rss_type_o_atom1'] = 'Atom 1.0'; $lang['rss_content_o_abstract'] = '개요'; -$lang['rss_content_o_diff'] = '통합 ì°¨ì´ì 목ë¡'; -$lang['rss_content_o_htmldiff'] = 'ì°¨ì´ì ëª©ë¡ (HTML í…Œì´ë¸”)'; -$lang['rss_content_o_html'] = 'ë‚´ìš© (HTML 페ì´ì§€)'; -$lang['rss_linkto_o_diff'] = 'ì°¨ì´ì 보기'; -$lang['rss_linkto_o_page'] = '변경 페ì´ì§€ 보기'; -$lang['rss_linkto_o_rev'] = '변경 ëª©ë¡ ë³´ê¸°'; -$lang['rss_linkto_o_current'] = '최근 페ì´ì§€ 보기'; +$lang['rss_content_o_diff'] = '통합 ì°¨ì´ ëª©ë¡'; +$lang['rss_content_o_htmldiff'] = 'HTML ì°¨ì´ ëª©ë¡ í˜•ì‹'; +$lang['rss_content_o_html'] = '최대 HTML 페ì´ì§€ ë‚´ìš©'; +$lang['rss_linkto_o_diff'] = 'ì°¨ì´ ë³´ê¸°'; +$lang['rss_linkto_o_page'] = 'ë°”ë€ ë¬¸ì„œ 보기'; +$lang['rss_linkto_o_rev'] = 'ë°”ë€ ëª©ë¡ ë³´ê¸°'; +$lang['rss_linkto_o_current'] = '현재 문서 보기'; $lang['compression_o_0'] = 'ì—†ìŒ'; $lang['compression_o_gz'] = 'gzip'; $lang['compression_o_bz2'] = 'bz2'; @@ -190,10 +195,10 @@ $lang['xsendfile_o_2'] = '표준 X-Sendfile í—¤ë”'; $lang['xsendfile_o_3'] = '비공개 Nginx X-Accel-Redirect í—¤ë”'; $lang['showuseras_o_loginname'] = 'ë¡œê·¸ì¸ ì´ë¦„'; $lang['showuseras_o_username'] = 'ì‚¬ìš©ìž ì´ë¦„'; -$lang['showuseras_o_email'] = 'ì‚¬ìš©ìž e-mail 주소(ë©”ì¼ì£¼ì†Œ 보호 ì…‹íŒ…ì— ë”°ë¼ ì•ˆë³´ì¼ ìˆ˜ 있ìŒ)'; -$lang['showuseras_o_email_link'] = 'mailto: link로 표현ë ì‚¬ìš©ìž e-mail 주소'; -$lang['useheading_o_0'] = '아니요'; -$lang['useheading_o_navigation'] = '네비게ì´ì…˜ì—ë§Œ'; +$lang['showuseras_o_email'] = 'ì‚¬ìš©ìž ì´ë©”ì¼ ì£¼ì†Œ (ë©”ì¼ ì£¼ì†Œ 보호 ì„¤ì •ì— ë”°ë¼ ì•ˆë³´ì¼ ìˆ˜ 있ìŒ)'; +$lang['showuseras_o_email_link'] = 'mailto: link로 표현ë ì‚¬ìš©ìž ì´ë©”ì¼ ì£¼ì†Œ'; +$lang['useheading_o_0'] = '아니오'; +$lang['useheading_o_navigation'] = '둘러보기ì—ë§Œ'; $lang['useheading_o_content'] = '위키 ë‚´ìš©ì—ë§Œ'; $lang['useheading_o_1'] = 'í•ìƒ'; -$lang['readdircache'] = 'readdir ìºì‰¬ë¥¼ 위한 최대 시간 (ì´ˆ)'; +$lang['readdircache'] = 'readdir ìºì‹œë¥¼ 위한 최대 시간 (ì´ˆ)'; diff --git a/lib/plugins/config/lang/nl/lang.php b/lib/plugins/config/lang/nl/lang.php index 77b8d6a1a1d51e1fc292927258492ef863b5a0cb..e0c9d7d7c8e84c0c1f0b0278c5e1543f5e9cbe5a 100644 --- a/lib/plugins/config/lang/nl/lang.php +++ b/lib/plugins/config/lang/nl/lang.php @@ -36,6 +36,8 @@ $lang['_anti_spam'] = 'Anti-spaminstellingen'; $lang['_editing'] = 'Pagina-wijzigingsinstellingen'; $lang['_links'] = 'Link-instellingen'; $lang['_media'] = 'Media-instellingen'; +$lang['_notifications'] = 'Meldingsinstellingen'; +$lang['_syndication'] = 'Syndication-instellingen'; $lang['_advanced'] = 'Geavanceerde instellingen'; $lang['_network'] = 'Netwerkinstellingen'; $lang['_plugin_sufix'] = 'Plugin-instellingen'; @@ -43,26 +45,29 @@ $lang['_template_sufix'] = 'Sjabloon-instellingen'; $lang['_msg_setting_undefined'] = 'Geen metadata voor deze instelling.'; $lang['_msg_setting_no_class'] = 'Geen class voor deze instelling.'; $lang['_msg_setting_no_default'] = 'Geen standaard waarde.'; -$lang['fmode'] = 'Bestandaanmaak-modus (file creation mode)'; -$lang['dmode'] = 'Directory-aanmaak-modus (directory creation mode)'; +$lang['title'] = 'Titel van de wiki'; +$lang['start'] = 'Naam startpagina'; $lang['lang'] = 'Taal'; +$lang['template'] = 'Sjabloon ofwel het design van de wiki.'; +$lang['tagline'] = 'Ondertitel (als het sjabloon dat ondersteunt)'; +$lang['sidebar'] = 'Zijbalk-paginanaam (als het sjabloon dat ondersteunt), leeg veld betekent geen zijbalk'; +$lang['license'] = 'Onder welke licentie zou je tekst moeten worden gepubliceerd?'; +$lang['savedir'] = 'Directory om data op te slaan'; $lang['basedir'] = 'Basisdirectory'; $lang['baseurl'] = 'Basis-URL'; -$lang['savedir'] = 'Directory om data op te slaan'; $lang['cookiedir'] = 'Cookie pad. Laat leeg om de basis URL te gebruiken.'; -$lang['start'] = 'Naam startpagina'; -$lang['title'] = 'Titel van de wiki'; -$lang['template'] = 'Sjabloon'; -$lang['license'] = 'Onder welke licentie zou je tekst moeten worden gepubliceerd?'; -$lang['fullpath'] = 'Volledig pad van pagina\'s in de footer weergeven'; +$lang['dmode'] = 'Directory-aanmaak-modus (directory creation mode)'; +$lang['fmode'] = 'Bestandaanmaak-modus (file creation mode)'; +$lang['allowdebug'] = 'Debug toestaan <b>uitzetten indien niet noodzakelijk!</b>'; $lang['recent'] = 'Recente wijzigingen'; +$lang['recent_days'] = 'Hoeveel recente wijzigingen bewaren (dagen)'; $lang['breadcrumbs'] = 'Aantal broodkruimels'; $lang['youarehere'] = 'Hierarchische broodkruimels'; +$lang['fullpath'] = 'Volledig pad van pagina\'s in de footer weergeven'; $lang['typography'] = 'Breng typografische wijzigingen aan'; -$lang['htmlok'] = 'Embedded HTML toestaan'; -$lang['phpok'] = 'Embedded PHP toestaan'; $lang['dformat'] = 'Datum formaat (zie de PHP <a href="http://www.php.net/strftime">strftime</a> functie)'; $lang['signature'] = 'Ondertekening'; +$lang['showuseras'] = 'Hoe de gebruiker die de pagina het laatst wijzigde weergeven'; $lang['toptoclevel'] = 'Bovenste niveau voor inhoudsopgave'; $lang['tocminheads'] = 'Minimum aantal koppen dat bepaald of een index gemaakt wordt'; $lang['maxtoclevel'] = 'Laagste niveau voor inhoudsopgave'; @@ -70,16 +75,8 @@ $lang['maxseclevel'] = 'Laagste sectiewijzigingsniveau'; $lang['camelcase'] = 'CamelCase gebruiken voor links'; $lang['deaccent'] = 'Paginanamen ontdoen van vreemde tekens'; $lang['useheading'] = 'Eerste kopje voor paginanaam gebruiken'; -$lang['refcheck'] = 'Controleer verwijzingen naar media'; -$lang['refshow'] = 'Aantal te tonen mediaverwijzingen'; -$lang['allowdebug'] = 'Debug toestaan <b>uitzetten indien niet noodzakelijk!</b>'; -$lang['mediarevisions'] = 'Media revisies activeren?'; -$lang['usewordblock'] = 'Blokkeer spam op basis van woordenlijst'; -$lang['indexdelay'] = 'Uitstel voor indexeren (sec)'; -$lang['relnofollow'] = 'Gebruik rel="nofollow" voor externe links'; -$lang['mailguard'] = 'E-mailadressen onherkenbaar maken'; -$lang['iexssprotect'] = 'Controleer geüploade bestanden op mogelijk schadelijke JavaScript of HTML code'; -$lang['showuseras'] = 'Hoe de gebruiker die de pagina het laatst wijzigde weergeven'; +$lang['sneaky_index'] = 'Met de standaardinstellingen zal DokuWiki alle namespaces laten zien in de index. Het inschakelen van deze optie zorgt ervoor dat de namespaces waar de gebruiker geen leestoegang tot heeft, verborgen worden. Dit kan resulteren in het verbergen van subnamespaces waar de gebruiker wel toegang to heeft. Dit kan de index onbruikbaar maken met bepaalde ACL-instellingen.'; +$lang['hidepages'] = 'Verberg deze pagina\'s (regular expressions)'; $lang['useacl'] = 'Gebruik access control lists'; $lang['autopasswd'] = 'Zelf wachtwoorden genereren'; $lang['authtype'] = 'Authenticatiemechanisme'; @@ -88,64 +85,76 @@ $lang['defaultgroup'] = 'Standaardgroep'; $lang['superuser'] = 'Superuser - een groep of gebruiker of kommalijst (gebruiker1,@groep1,gebruiker2) met volledige toegang tot alle pagina\'s en functies, ongeacht de ACL instellingen'; $lang['manager'] = 'Beheerder - een groep of gebruiker of kommalijst (gebruiker1,@groep1,gebruiker2) met toegang tot bepaalde beheersfunctionaliteit'; $lang['profileconfirm'] = 'Bevestig profielwijzigingen met wachtwoord'; +$lang['rememberme'] = 'Permanente login cookie toestaan (onthoud mij)'; $lang['disableactions'] = 'Aangevinkte DokuWiki-akties uitschakelen'; $lang['disableactions_check'] = 'Controleer'; $lang['disableactions_subscription'] = 'Inschrijven/opzeggen'; $lang['disableactions_wikicode'] = 'Bron bekijken/exporteer rauw'; $lang['disableactions_other'] = 'Andere akties (gescheiden door komma\'s)'; -$lang['sneaky_index'] = 'Met de standaardinstellingen zal DokuWiki alle namespaces laten zien in de index. Het inschakelen van deze optie zorgt ervoor dat de namespaces waar de gebruiker geen leestoegang tot heeft, verborgen worden. Dit kan resulteren in het verbergen van subnamespaces waar de gebruiker wel toegang to heeft. Dit kan de index onbruikbaar maken met bepaalde ACL-instellingen.'; $lang['auth_security_timeout'] = 'Authenticatiebeveiligings-timeout (seconden)'; $lang['securecookie'] = 'Moeten cookies die via HTTPS gezet zijn alleen via HTTPS verzonden worden door de browser? Zet deze optie uit als alleen het inloggen op de wiki beveiligd is, maar het gebruik verder niet.'; +$lang['remote'] = 'Activeer het remote API-systeem. Hiermee kunnen andere applicaties de wiki benaderen via XML-RPC of andere mechanismen.'; +$lang['remoteuser'] = 'Beperk toegang tot de remote API tot deze komma-lijst van groepen of gebruikers. Leeg betekent toegang voor iedereen.'; +$lang['usewordblock'] = 'Blokkeer spam op basis van woordenlijst'; +$lang['relnofollow'] = 'Gebruik rel="nofollow" voor externe links'; +$lang['indexdelay'] = 'Uitstel voor indexeren (sec)'; +$lang['mailguard'] = 'E-mailadressen onherkenbaar maken'; +$lang['iexssprotect'] = 'Controleer geüploade bestanden op mogelijk schadelijke JavaScript of HTML code'; +$lang['usedraft'] = 'Sla automatisch een concept op tijdens het wijzigen'; +$lang['htmlok'] = 'Embedded HTML toestaan'; +$lang['phpok'] = 'Embedded PHP toestaan'; +$lang['locktime'] = 'Maximum leeftijd voor lockbestanden (sec)'; +$lang['cachetime'] = 'Maximum leeftijd voor cache (sec)'; +$lang['target____wiki'] = 'Doelvenster voor interne links'; +$lang['target____interwiki'] = 'Doelvenster voor interwiki-links'; +$lang['target____extern'] = 'Doelvenster voor externe links'; +$lang['target____media'] = 'Doelvenster voor medialinks'; +$lang['target____windows'] = 'Doelvenster voor windows links'; +$lang['mediarevisions'] = 'Media revisies activeren?'; +$lang['refcheck'] = 'Controleer verwijzingen naar media'; +$lang['refshow'] = 'Aantal te tonen mediaverwijzingen'; +$lang['gdlib'] = 'Versie GD Lib '; +$lang['im_convert'] = 'Path naar ImageMagick\'s convert tool'; +$lang['jpg_quality'] = 'JPG compressiekwaliteit (0-100)'; +$lang['fetchsize'] = 'Maximum grootte (bytes) die fetch.php mag downloaden van buiten'; +$lang['subscribers'] = 'Ondersteuning pagina-inschrijving aanzetten'; +$lang['subscribe_time'] = 'Inschrijvingsmeldingen en samenvattingen worden na deze tijdsduur (in seconden) verzonden. Deze waarde dient kleiner te zijn dan de tijd ingevuld bij "Hoeveel recente wijzigingen bewaren (dagen)"'; +$lang['notify'] = 'Stuur e-mailnotificaties naar dit adres'; +$lang['registernotify'] = 'Stuur informatie over nieuw aangemelde gebruikers naar dit e-mailadres'; +$lang['mailfrom'] = 'E-mailadres voor automatische e-mail'; +$lang['mailprefix'] = 'Te gebruiken voorvoegsel voor onderwerp automatische email'; +$lang['htmlmail'] = 'Zend multipart HTML e-mail. Dit ziet er beter uit, maar is groter. Uitschakelen betekent e-mail in platte tekst.'; +$lang['sitemap'] = 'Genereer Google sitemap (dagen). 0 betekent uitschakelen.'; +$lang['rss_type'] = 'XML feed type'; +$lang['rss_linkto'] = 'XML feed linkt naar'; +$lang['rss_content'] = 'Wat moet er in de XML feed items weergegeven worden?'; +$lang['rss_update'] = 'XML feed verversingsinterval (sec)'; +$lang['rss_show_summary'] = 'XML feed samenvatting in titel weergeven'; +$lang['rss_media'] = 'Welk type verandering moet in de XML feed worden weergegeven?'; $lang['updatecheck'] = 'Controleer op nieuwe versies en beveiligingswaarschuwingen? DokuWiki moet hiervoor contact opnemen met update.dokuwiki.org.'; $lang['userewrite'] = 'Gebruik nette URL\'s'; $lang['useslash'] = 'Gebruik slash (/) als scheiding tussen namepaces in URL\'s'; -$lang['usedraft'] = 'Sla automatisch een concept op tijdens het wijzigen'; $lang['sepchar'] = 'Woordscheider in paginanamen'; $lang['canonical'] = 'Herleid URL\'s tot hun basisvorm'; $lang['fnencode'] = 'Methode om niet-ASCII bestandsnamen te coderen.'; $lang['autoplural'] = 'Controleer op meervoudsvormen in links'; $lang['compression'] = 'Compressiemethode voor attic-bestanden'; -$lang['cachetime'] = 'Maximum leeftijd voor cache (sec)'; -$lang['locktime'] = 'Maximum leeftijd voor lockbestanden (sec)'; -$lang['fetchsize'] = 'Maximum grootte (bytes) die fetch.php mag downloaden van buiten'; -$lang['notify'] = 'Stuur e-mailnotificaties naar dit adres'; -$lang['registernotify'] = 'Stuur informatie over nieuw aangemelde gebruikers naar dit e-mailadres'; -$lang['mailfrom'] = 'E-mailadres voor automatische e-mail'; -$lang['mailprefix'] = 'Te gebruiken voorvoegsel voor onderwerp automatische email'; $lang['gzip_output'] = 'Gebruik gzip Content-Encoding voor xhtml'; -$lang['gdlib'] = 'Versie GD Lib '; -$lang['im_convert'] = 'Path naar ImageMagick\'s convert tool'; -$lang['jpg_quality'] = 'JPG compressiekwaliteit (0-100)'; -$lang['subscribers'] = 'Ondersteuning pagina-inschrijving aanzetten'; -$lang['subscribe_time'] = 'Inschrijvingsmeldingen en samenvattingen worden na deze tijdsduur (in seconden) verzonden. Deze waarde dient kleiner te zijn dan de tijd ingevuld bij "Hoeveel recente wijzigingen bewaren (dagen)"'; $lang['compress'] = 'Compacte CSS en javascript output'; $lang['cssdatauri'] = 'Maximale omvang in bytes van in CSS gelinkte afbeeldingen die bij de stylesheet moeten worden ingesloten ter reductie van de HTTP request header overhead. Deze techniek werkt niet in IE7 en ouder! <code>400</code> tot <code>600</code> is een geschikte omvang. Stel de omvang in op <code>0</code> om deze functionaliteit uit te schakelen.'; -$lang['hidepages'] = 'Verberg deze pagina\'s (regular expressions)'; $lang['send404'] = 'Stuur "HTTP 404/Page Not Found" voor niet-bestaande pagina\'s'; -$lang['sitemap'] = 'Genereer Google sitemap (dagen)'; $lang['broken_iua'] = 'Is de ignore_user_abort functie onbruikbaar op uw systeem? Dit kan een onbruikbare zoekindex tot gevolg hebben. IIS+PHP/CGI staat hier bekend om. Zie <a href="http://bugs.splitbrain.org/?do=details&task_id=852">Bug 852</a> voor meer informatie.'; $lang['xsendfile'] = 'Gebruik de X-Sendfile header om de webserver statische content te laten versturen? De webserver moet dit wel ondersteunen.'; $lang['renderer_xhtml'] = 'Weergavesysteem voor de standaard (xhtml) wiki-uitvoer'; $lang['renderer__core'] = '%s (dokuwiki core)'; $lang['renderer__plugin'] = '%s (plugin)'; -$lang['rememberme'] = 'Permanente login cookie toestaan (onthoud mij)'; -$lang['rss_type'] = 'XML feed type'; -$lang['rss_linkto'] = 'XML feed linkt naar'; -$lang['rss_content'] = 'Wat moet er in de XML feed items weergegeven worden?'; -$lang['rss_update'] = 'XML feed verversingsinterval (sec)'; -$lang['recent_days'] = 'Hoeveel recente wijzigingen bewaren (dagen)'; -$lang['rss_show_summary'] = 'XML feed samenvatting in titel weergeven'; -$lang['target____wiki'] = 'Doelvenster voor interne links'; -$lang['target____interwiki'] = 'Doelvenster voor interwiki-links'; -$lang['target____extern'] = 'Doelvenster voor externe links'; -$lang['target____media'] = 'Doelvenster voor medialinks'; -$lang['target____windows'] = 'Doelvenster voor windows links'; +$lang['dnslookups'] = 'DokuWiki zoekt de hostnamen van IP-adressen van gebruikers die pagina wijzigen op. Schakel deze optie uit als je geen of een langzame DNS server hebt.'; $lang['proxy____host'] = 'Proxy server'; $lang['proxy____port'] = 'Proxy port'; $lang['proxy____user'] = 'Proxy gebruikersnaam'; $lang['proxy____pass'] = 'Proxy wachtwoord'; -$lang['proxy____ssl'] = 'Gebruik SSL om een connectie te maken met de proxy'; -$lang['proxy____except'] = 'Reguliere expressie om URL\'s te bepalen waarvoor de proxy overgeslaan moet worden.'; +$lang['proxy____ssl'] = 'Gebruik SSL om een verbinding te maken met de proxy'; +$lang['proxy____except'] = 'Reguliere expressie om URL\'s te bepalen waarvoor de proxy overgeslagen moet worden.'; $lang['safemodehack'] = 'Safemode hack aanzetten'; $lang['ftp____host'] = 'FTP server voor safemode hack'; $lang['ftp____port'] = 'FTP port voor safemode hack'; @@ -185,7 +194,7 @@ $lang['xsendfile_o_0'] = 'niet gebruiken'; $lang['xsendfile_o_1'] = 'Eigen lighttpd header (voor release 1.5)'; $lang['xsendfile_o_2'] = 'Standaard X-Sendfile header'; $lang['xsendfile_o_3'] = 'Propritary Nginx X-Accel-Redirect header'; -$lang['showuseras_o_loginname'] = 'loginnaam'; +$lang['showuseras_o_loginname'] = 'Loginnaam'; $lang['showuseras_o_username'] = 'Volledige naam'; $lang['showuseras_o_email'] = 'E-mailadres (onherkenbaar gemaakt volgens mailguard-instelling)'; $lang['showuseras_o_email_link'] = 'E-mailadres als mailto: link'; diff --git a/lib/plugins/config/lang/pl/lang.php b/lib/plugins/config/lang/pl/lang.php index 7ebe5ba929d0568613861f4e3a1d65905d412003..8441722cdd53a14b06e4a1a3f30b402b8c4352b2 100644 --- a/lib/plugins/config/lang/pl/lang.php +++ b/lib/plugins/config/lang/pl/lang.php @@ -14,6 +14,7 @@ * @author Grzegorz WidÅ‚a <dzesdzes@gmail.com> * @author Åukasz Chmaj <teachmeter@gmail.com> * @author Begina Felicysym <begina.felicysym@wp.eu> + * @author Aoi Karasu <aoikarasu@gmail.com> */ $lang['menu'] = 'Ustawienia'; $lang['error'] = 'Ustawienia nie zostaÅ‚y zapisane z powodu błędnych wartoÅ›ci, przejrzyj je i ponów próbÄ™ zapisu. <br/> Niepoprawne wartoÅ›ci sÄ… wyróżnione kolorem czerwonym.'; @@ -35,6 +36,8 @@ $lang['_anti_spam'] = 'Spam'; $lang['_editing'] = 'Edycja'; $lang['_links'] = 'OdnoÅ›niki'; $lang['_media'] = 'Media'; +$lang['_notifications'] = 'Ustawienia powiadomieÅ„'; +$lang['_syndication'] = 'Ustawienia RSS'; $lang['_advanced'] = 'Zaawansowane'; $lang['_network'] = 'Sieć'; $lang['_plugin_sufix'] = 'Wtyczki'; @@ -42,28 +45,29 @@ $lang['_template_sufix'] = 'Motywy'; $lang['_msg_setting_undefined'] = 'Brak danych o ustawieniu.'; $lang['_msg_setting_no_class'] = 'Brak kategorii ustawieÅ„.'; $lang['_msg_setting_no_default'] = 'Brak wartoÅ›ci domyÅ›lnej.'; -$lang['fmode'] = 'Tryb tworzenia pliku'; -$lang['dmode'] = 'Tryb tworzenia katalogu'; -$lang['lang'] = 'JÄ™zyk'; -$lang['basedir'] = 'Katalog główny'; -$lang['baseurl'] = 'Główny URL'; -$lang['savedir'] = 'Katalog z danymi'; -$lang['cookiedir'] = 'Åšcieżka plików ciasteczek. Zostaw puste by użyć baseurl.'; -$lang['start'] = 'TytuÅ‚ strony poczÄ…tkowej'; $lang['title'] = 'TytuÅ‚ wiki'; +$lang['start'] = 'TytuÅ‚ strony poczÄ…tkowej'; +$lang['lang'] = 'JÄ™zyk'; $lang['template'] = 'Motyw'; $lang['tagline'] = 'Motto (jeÅ›li szablon daje takÄ… możliwość)'; $lang['sidebar'] = 'Nazwa strony paska bocznego (jeÅ›li szablon je obsÅ‚uguje), puste pole wyłącza pasek boczny'; $lang['license'] = 'Pod jakÄ… licencjÄ… publikować treÅ›ci wiki?'; -$lang['fullpath'] = 'WyÅ›wietlanie peÅ‚nych Å›cieżek'; +$lang['savedir'] = 'Katalog z danymi'; +$lang['basedir'] = 'Katalog główny'; +$lang['baseurl'] = 'Główny URL'; +$lang['cookiedir'] = 'Åšcieżka plików ciasteczek. Zostaw puste by użyć baseurl.'; +$lang['dmode'] = 'Tryb tworzenia katalogu'; +$lang['fmode'] = 'Tryb tworzenia pliku'; +$lang['allowdebug'] = 'Debugowanie (niebezpieczne!)'; $lang['recent'] = 'Ilość ostatnich zmian'; +$lang['recent_days'] = 'Ilość ostatnich zmian (w dniach)'; $lang['breadcrumbs'] = 'DÅ‚ugość Å›ladu'; $lang['youarehere'] = 'Åšlad wedÅ‚ug struktury'; +$lang['fullpath'] = 'WyÅ›wietlanie peÅ‚nych Å›cieżek'; $lang['typography'] = 'Konwersja cudzysÅ‚owu, myÅ›lników itp.'; -$lang['htmlok'] = 'Wstawki HTML'; -$lang['phpok'] = 'Wstawki PHP'; $lang['dformat'] = 'Format daty'; $lang['signature'] = 'Podpis'; +$lang['showuseras'] = 'Sposób wyÅ›wietlania nazwy użytkownika, który ostatnio edytowaÅ‚ stronÄ™'; $lang['toptoclevel'] = 'Minimalny poziom spisu treÅ›ci'; $lang['tocminheads'] = 'Minimalna liczba nagłówków niezbÄ™dna do wytworzenia spisu treÅ›ci.'; $lang['maxtoclevel'] = 'Maksymalny poziom spisu treÅ›ci'; @@ -71,16 +75,8 @@ $lang['maxseclevel'] = 'Maksymalny poziom podziaÅ‚u na sekcje edycyjne $lang['camelcase'] = 'Bikapitalizacja odnoÅ›ników (CamelCase)'; $lang['deaccent'] = 'Podmieniaj znaki spoza ASCII w nazwach'; $lang['useheading'] = 'Pierwszy nagłówek jako tytuÅ‚'; -$lang['refcheck'] = 'Sprawdzanie odwoÅ‚aÅ„ przed usuniÄ™ciem pliku'; -$lang['refshow'] = 'Ilość pokazywanych odwoÅ‚aÅ„ do pliku'; -$lang['allowdebug'] = 'Debugowanie (niebezpieczne!)'; -$lang['mediarevisions'] = 'Włączyć wersjonowanie multimediów?'; -$lang['usewordblock'] = 'Blokowanie spamu na podstawie słów'; -$lang['indexdelay'] = 'Okres indeksowania w sekundach'; -$lang['relnofollow'] = 'Nagłówek rel="nofollow" dla odnoÅ›ników zewnÄ™trznych'; -$lang['mailguard'] = 'Utrudnianie odczytu adresów e-mail'; -$lang['iexssprotect'] = 'Wykrywanie zÅ‚oÅ›liwego kodu JavaScript i HTML w plikach'; -$lang['showuseras'] = 'Sposób wyÅ›wietlania nazwy użytkownika, który ostatnio edytowaÅ‚ stronÄ™'; +$lang['sneaky_index'] = 'DomyÅ›lnie, Dokuwiki pokazuje wszystkie katalogi w indeksie. Włączenie tej opcji ukryje katalogi, do których użytkownik nie ma praw. Może to spowodować ukrycie podkatalogów, do których użytkownik ma prawa. Ta opcja może spowodować błędne dziaÅ‚anie indeksu w połączeniu z pewnymi konfiguracjami praw dostÄ™pu.'; +$lang['hidepages'] = 'Ukrywanie stron pasujÄ…cych do wzorca (wyrażenie regularne)'; $lang['useacl'] = 'Kontrola uprawnieÅ„ ACL'; $lang['autopasswd'] = 'Automatyczne generowanie haseÅ‚'; $lang['authtype'] = 'Typ autoryzacji'; @@ -89,58 +85,70 @@ $lang['defaultgroup'] = 'DomyÅ›lna grupa'; $lang['superuser'] = 'Administrator - grupa lub użytkownik z peÅ‚nymi uprawnieniami'; $lang['manager'] = 'Menadżer - grupa lub użytkownik z uprawnieniami do zarzÄ…dzania wiki'; $lang['profileconfirm'] = 'Potwierdzanie zmiany profilu hasÅ‚em'; +$lang['rememberme'] = 'Pozwól na ciasteczka automatycznie logujÄ…ce (pamiÄ™taj mnie)'; $lang['disableactions'] = 'Wyłącz akcje DokuWiki'; $lang['disableactions_check'] = 'Sprawdzanie'; $lang['disableactions_subscription'] = 'Subskrypcje'; $lang['disableactions_wikicode'] = 'Pokazywanie źródeÅ‚'; $lang['disableactions_other'] = 'Inne akcje (oddzielone przecinkiem)'; -$lang['sneaky_index'] = 'DomyÅ›lnie, Dokuwiki pokazuje wszystkie katalogi w indeksie. Włączenie tej opcji ukryje katalogi, do których użytkownik nie ma praw. Może to spowodować ukrycie podkatalogów, do których użytkownik ma prawa. Ta opcja może spowodować błędne dziaÅ‚anie indeksu w połączeniu z pewnymi konfiguracjami praw dostÄ™pu.'; $lang['auth_security_timeout'] = 'Czas wygaÅ›niÄ™cia uwierzytelnienia (w sekundach)'; $lang['securecookie'] = 'Czy ciasteczka wysÅ‚ane do przeglÄ…darki przez HTTPS powinny być przez niÄ… odsyÅ‚ane też tylko przez HTTPS? Odznacz tÄ™ opcjÄ™ tylko wtedy, gdy logowanie użytkowników jest zabezpieczone SSL, ale przeglÄ…danie stron odbywa siÄ™ bez zabezpieczenia.'; +$lang['remote'] = 'Włącz API zdalnego dostÄ™pu. Pozwoli to innym aplikacjom na dostÄ™p do wiki poprzez XML-RPC lub inne mechanizmy.'; +$lang['remoteuser'] = 'Ogranicz dostÄ™p poprzez API zdalnego dostÄ™pu do podanych grup lub użytkowników, oddzielonych przecinkami. Pozostaw to pole puste by pozwolić na dostÄ™p be ograniczeÅ„.'; +$lang['usewordblock'] = 'Blokowanie spamu na podstawie słów'; +$lang['relnofollow'] = 'Nagłówek rel="nofollow" dla odnoÅ›ników zewnÄ™trznych'; +$lang['indexdelay'] = 'Okres indeksowania w sekundach'; +$lang['mailguard'] = 'Utrudnianie odczytu adresów e-mail'; +$lang['iexssprotect'] = 'Wykrywanie zÅ‚oÅ›liwego kodu JavaScript i HTML w plikach'; +$lang['usedraft'] = 'Automatyczne zapisywanie szkicu podczas edycji'; +$lang['htmlok'] = 'Wstawki HTML'; +$lang['phpok'] = 'Wstawki PHP'; +$lang['locktime'] = 'Maksymalny wiek blokad w sekundach'; +$lang['cachetime'] = 'Maksymalny wiek cache w sekundach'; +$lang['target____wiki'] = 'Okno docelowe odnoÅ›ników wewnÄ™trznych'; +$lang['target____interwiki'] = 'Okno docelowe odnoÅ›ników do innych wiki'; +$lang['target____extern'] = 'Okno docelowe odnoÅ›ników zewnÄ™trznych'; +$lang['target____media'] = 'Okno docelowe odnoÅ›ników do plików'; +$lang['target____windows'] = 'Okno docelowe odnoÅ›ników zasobów Windows'; +$lang['mediarevisions'] = 'Włączyć wersjonowanie multimediów?'; +$lang['refcheck'] = 'Sprawdzanie odwoÅ‚aÅ„ przed usuniÄ™ciem pliku'; +$lang['refshow'] = 'Ilość pokazywanych odwoÅ‚aÅ„ do pliku'; +$lang['gdlib'] = 'Wersja biblioteki GDLib'; +$lang['im_convert'] = 'Åšcieżka do programu imagemagick'; +$lang['jpg_quality'] = 'Jakość kompresji JPG (0-100)'; +$lang['fetchsize'] = 'Maksymalny rozmiar pliku (w bajtach) jaki można pobrać z zewnÄ…trz'; +$lang['subscribers'] = 'Subskrypcja'; +$lang['subscribe_time'] = 'Czas po którym sÄ… wysyÅ‚ane listy subskrypcji i streszczenia (sek.); Powinna być to wartość wiÄ™ksza niż podana w zmiennej recent_days.'; +$lang['notify'] = 'WysyÅ‚anie powiadomieÅ„ na adres e-mail'; +$lang['registernotify'] = 'PrzeÅ›lij informacje o nowych użytkownikach na adres e-mail'; +$lang['mailfrom'] = 'Adres e-mail tego wiki'; +$lang['mailprefix'] = 'Prefiks tematu e-mail do automatycznych wiadomoÅ›ci'; +$lang['htmlmail'] = 'WysyÅ‚aj wiadomoÅ›ci e-mail w formacie HTML, które wyglÄ…dajÄ… lepiej, lecz ich rozmiar jest wiÄ™kszy. Wyłącz wysyÅ‚anie wiadomoÅ›ci zawierajÄ…cych tekst niesformatowany.'; +$lang['sitemap'] = 'Okres generowania Google Sitemap (w dniach)'; +$lang['rss_type'] = 'Typ RSS'; +$lang['rss_linkto'] = 'OdnoÅ›niki w RSS'; +$lang['rss_content'] = 'Rodzaj informacji wyÅ›wietlanych w RSS '; +$lang['rss_update'] = 'Okres aktualizacji RSS (w sekundach)'; +$lang['rss_show_summary'] = 'Podsumowanie w tytule'; +$lang['rss_media'] = 'Rodzaj zmian wyÅ›wietlanych w RSS'; $lang['updatecheck'] = 'Sprawdzanie aktualizacji i bezpieczeÅ„stwa. DokuWiki bÄ™dzie kontaktować siÄ™ z serwerem update.dokuwiki.org.'; $lang['userewrite'] = 'Proste adresy URL'; $lang['useslash'] = 'Używanie ukoÅ›nika jako separatora w adresie URL'; -$lang['usedraft'] = 'Automatyczne zapisywanie szkicu podczas edycji'; $lang['sepchar'] = 'Znak rozdzielajÄ…cy wyrazy nazw'; $lang['canonical'] = 'Kanoniczne adresy URL'; $lang['fnencode'] = 'Metoda kodowana nazw pików bez użycia ASCII.'; $lang['autoplural'] = 'Automatyczne tworzenie liczby mnogiej'; $lang['compression'] = 'Metoda kompresji dla usuniÄ™tych plików'; -$lang['cachetime'] = 'Maksymalny wiek cache w sekundach'; -$lang['locktime'] = 'Maksymalny wiek blokad w sekundach'; -$lang['fetchsize'] = 'Maksymalny rozmiar pliku (w bajtach) jaki można pobrać z zewnÄ…trz'; -$lang['notify'] = 'WysyÅ‚anie powiadomieÅ„ na adres e-mail'; -$lang['registernotify'] = 'PrzeÅ›lij informacje o nowych użytkownikach na adres e-mail'; -$lang['mailfrom'] = 'Adres e-mail tego wiki'; -$lang['mailprefix'] = 'Prefiks tematu e-mail do automatycznych wiadomoÅ›ci'; $lang['gzip_output'] = 'Używaj kodowania GZIP dla zawartoÅ›ci XHTML'; -$lang['gdlib'] = 'Wersja biblioteki GDLib'; -$lang['im_convert'] = 'Åšcieżka do programu imagemagick'; -$lang['jpg_quality'] = 'Jakość kompresji JPG (0-100)'; -$lang['subscribers'] = 'Subskrypcja'; -$lang['subscribe_time'] = 'Czas po którym sÄ… wysyÅ‚ane listy subskrypcji i streszczenia (sek.); Powinna być to wartość wiÄ™ksza niż podana w zmiennej recent_days.'; $lang['compress'] = 'Kompresja arkuszy CSS i plików JavaScript'; $lang['cssdatauri'] = 'Rozmiar w bajtach, poniżej którego odwoÅ‚ania do obrazów w plikach CSS powinny być osadzone bezpoÅ›rednio w arkuszu stylów by zmniejszyć ogólne żądania nagłówków HTTP. Technika ta nie dziaÅ‚a w IE 7 i poniżej! <code>400</code> do <code>600</code> bajtów jest dobrÄ… wartoÅ›ciÄ…. Ustaw <code>0</code> aby wyłączyć.'; -$lang['hidepages'] = 'Ukrywanie stron pasujÄ…cych do wzorca (wyrażenie regularne)'; $lang['send404'] = 'Nagłówek "HTTP 404/Page Not Found" dla nieistniejÄ…cych stron'; -$lang['sitemap'] = 'Okres generowania Google Sitemap (w dniach)'; $lang['broken_iua'] = 'Czy funkcja "ignore_user_abort" dziaÅ‚a? JeÅ›li nie, może to powodować problemy z indeksem przeszukiwania. Funkcja nie dziaÅ‚a przy konfiguracji oprogramowania IIS+PHP/CGI. Szczegółowe informacje: <a href="http://bugs.splitbrain.org/?do=details&task_id=852">Bug 852</a>.'; $lang['xsendfile'] = 'Użyj nagłówka HTTP X-Sendfile w celu przesyÅ‚ania statycznych plików. Serwer HTTP musi obsÅ‚ugiwać ten nagłówek.'; $lang['renderer_xhtml'] = 'Mechanizm renderowania głównej treÅ›ci strony (xhtml)'; $lang['renderer__core'] = '%s (dokuwiki)'; $lang['renderer__plugin'] = '%s (wtyczka)'; -$lang['rememberme'] = 'Pozwól na ciasteczka automatycznie logujÄ…ce (pamiÄ™taj mnie)'; -$lang['rss_type'] = 'Typ RSS'; -$lang['rss_linkto'] = 'OdnoÅ›niki w RSS'; -$lang['rss_content'] = 'Rodzaj informacji wyÅ›wietlanych w RSS '; -$lang['rss_update'] = 'Okres aktualizacji RSS (w sekundach)'; -$lang['recent_days'] = 'Ilość ostatnich zmian (w dniach)'; -$lang['rss_show_summary'] = 'Podsumowanie w tytule'; -$lang['target____wiki'] = 'Okno docelowe odnoÅ›ników wewnÄ™trznych'; -$lang['target____interwiki'] = 'Okno docelowe odnoÅ›ników do innych wiki'; -$lang['target____extern'] = 'Okno docelowe odnoÅ›ników zewnÄ™trznych'; -$lang['target____media'] = 'Okno docelowe odnoÅ›ników do plików'; -$lang['target____windows'] = 'Okno docelowe odnoÅ›ników zasobów Windows'; +$lang['dnslookups'] = 'DokiWiki wyszuka nazwy hostów dla zdalnych adresów IP użytkowników edytujÄ…cych strony. JeÅ›li twój serwer DNS dziaÅ‚a zbyt wolno, ulegÅ‚ awarii lub nie chcesz używać wyszukiwania, wyłącz tÄ™ opcjÄ™.'; $lang['proxy____host'] = 'Proxy - serwer'; $lang['proxy____port'] = 'Proxy - port'; $lang['proxy____user'] = 'Proxy - nazwa użytkownika'; diff --git a/lib/plugins/config/lang/ro/lang.php b/lib/plugins/config/lang/ro/lang.php index d638e1eec7a874a3293dd0116275f7ce53e754ab..72b205b90f62fade2fafad624c5f4a2171dae09d 100644 --- a/lib/plugins/config/lang/ro/lang.php +++ b/lib/plugins/config/lang/ro/lang.php @@ -10,6 +10,7 @@ * @author Emanuel-Emeric Andrasi <em.andrasi@mandrivausers.ro> * @author Marius OLAR <olarmariusalex@gmail.com> * @author Marius Olar <olarmariusalex@yahoo.com> + * @author Emanuel-Emeric AndraÈ™i <em.andrasi@mandrivausers.ro> */ $lang['menu'] = 'Setări de Configurare'; $lang['error'] = 'Setări nu au fost actualizate datorită unei valori incorecte; verificaÅ£i modificările ÅŸi încercaÅ£i din nou. <br /> Valorile incorecte vor apărea într-un chenar roÅŸu.'; @@ -48,6 +49,8 @@ $lang['cookiedir'] = 'Cale Cookie. LăsaÈ›i gol pentru a utiliza bas $lang['start'] = 'Numele paginii de start'; $lang['title'] = 'Titlul wiki'; $lang['template'] = 'Åžablon'; +$lang['tagline'] = 'Slogan (dacă templateul suportă opÈ›iunea)'; +$lang['sidebar'] = 'Numele paginii barei laterale (dacă templateul suportă opÈ›iunea), câmpul lăsat gol dezactivează bara laterală'; $lang['license'] = 'Sub ce licenţă va fi publicat conÅ£inutul?'; $lang['fullpath'] = 'Arată calea completă a paginii în subsol'; $lang['recent'] = 'Modificări recente'; @@ -91,6 +94,8 @@ $lang['disableactions_other'] = 'Alte acÅ£iuni (separate prin virgulă)'; $lang['sneaky_index'] = 'Implicit, DokuWiki va arăta toate numele de spaÅ£ii la vizualizarea indexului. Activând această opÅ£iune vor fi ascunse acelea la care utilizatorul nu are drepturi de citire. Aceasta poate determina ascunderea sub-numelor de spaÅ£ii accesibile. Aceasta poate face index-ul inutilizabil cu anumite setări ale ACL'; $lang['auth_security_timeout'] = 'Timpul de expirare al Autentificării Securizate (secunde)'; $lang['securecookie'] = 'Cookies-urile setate via HTTPS să fie trimise doar via HTTPS de către browser? DezactivaÅ£i această opÅ£iune numai când login-ul wiki-ului este securizat cu SSL dar navigarea wiki-ului se realizează nesecurizat.'; +$lang['remote'] = 'Activează sistemul remote API. Acesta permite altor aplicaÈ›ii să acceseze wiki-ul via XML-RPC sau alte mecanisme.'; +$lang['remoteuser'] = 'RestricÈ›ionează accesul sistemului remote API la grupurile sau utilizatorii următori (separaÈ›i prin virgulă). LăsaÈ›i câmpul gol pentru a da acces către toÈ›i.'; $lang['updatecheck'] = 'Verificare actualizări ÅŸi avertismente privind securitatea? DokuWiki trebuie să contacteze update.dokuwiki.org pentru această facilitate.'; $lang['userewrite'] = 'Folosire URL-uri "nice"'; $lang['useslash'] = 'FoloseÅŸte slash-ul ca separator de spaÅ£ii de nume în URL-uri'; @@ -130,6 +135,7 @@ $lang['rss_content'] = 'Ce să afiÅŸez în obiectele fluxurilor XML'; $lang['rss_update'] = 'Intervalul de actualizare a fluxului XML (sec)'; $lang['recent_days'] = 'Câte modificări recente să se păstreze?'; $lang['rss_show_summary'] = 'Fluxul XML arată rezumat în titlu'; +$lang['rss_media'] = 'Ce fel de modificări ar trebui afiÈ™ate în fluxul XML?'; $lang['target____wiki'] = 'Fereastra Å£intă pentru legăturile interne'; $lang['target____interwiki'] = 'Fereastra Å£intă pentru legăturile interwiki'; $lang['target____extern'] = 'Fereastra Å£intă pentru legăturile externe'; diff --git a/lib/plugins/config/lang/uk/intro.txt b/lib/plugins/config/lang/uk/intro.txt index 7255c30f999206799ead89ec34593a537d35b99b..87abe1be3f91eab5f6536145625d2b07a775bfac 100644 --- a/lib/plugins/config/lang/uk/intro.txt +++ b/lib/plugins/config/lang/uk/intro.txt @@ -1,6 +1,6 @@ -====== ÐаÑтройка конфігурації ====== +====== ÐÐ°Ð»Ð°ÑˆÑ‚ÑƒÐ²Ð°Ð½Ð½Ñ Ð’Ñ–ÐºÑ– ====== -ВикориÑтовуйте цю Ñторінку Ð´Ð»Ñ Ð½Ð°Ñтройки ДокуВікі. Ð”Ð»Ñ Ð´Ð¾Ð²Ñ–Ð´Ð¾Ðº щодо конкретних параметрів дивітьÑÑ [[doku>config]]. Ð”Ð»Ñ Ð±Ñ–Ð»ÑŒÑˆ детальної інформації про цей доданок дивітьÑÑ [[doku>plugin:config]]. +ВикориÑтовуйте цю Ñторінку Ð´Ð»Ñ Ð½Ð°Ð»Ð°ÑˆÑ‚ÑƒÐ²Ð°Ð½Ð½Ñ Ð”Ð¾ÐºÑƒÐ’Ñ–ÐºÑ–. Ð”Ð»Ñ Ð´Ð¾Ð²Ñ–Ð´Ð¾Ðº щодо конкретних параметрів дивітьÑÑ [[doku>config]]. Ð”Ð»Ñ Ð±Ñ–Ð»ÑŒÑˆ детальної інформації про цей доданок дивітьÑÑ [[doku>plugin:config]]. Параметри, що виділені червоним кольором тла захищені та не можуть бути змінені за допомогою цього доданка. Параметри, з Ñинім кольором тла мають Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ð¿Ð¾ замовчуванню, а параметри з білим тлом були вÑтановлені Ð´Ð»Ñ Ñ†Ñ–Ñ”Ñ— локальної інÑталÑції. Сині та білі параметри можуть бути змінені. diff --git a/lib/plugins/config/lang/uk/lang.php b/lib/plugins/config/lang/uk/lang.php index 375c5d3bfc361278875fd8378b358ea5604a46e8..3d463fc72a51c011a2ae86177ae70a84a4515541 100644 --- a/lib/plugins/config/lang/uk/lang.php +++ b/lib/plugins/config/lang/uk/lang.php @@ -11,54 +11,56 @@ * @author Ulrikhe Lukoie <lukoie@gmail>.com * @author Kate Arzamastseva pshns@ukr.net */ -$lang['menu'] = 'ÐаÑтройка конфігурації'; +$lang['menu'] = 'ÐÐ°Ð»Ð°ÑˆÑ‚ÑƒÐ²Ð°Ð½Ð½Ñ Ð’Ñ–ÐºÑ–'; $lang['error'] = 'Параметри не збережено через помилкові значеннÑ. Будь лаÑка, переглÑньте ваші зміни та Ñпробуйте ще раз <br />Помилкові Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ð±ÑƒÐ´ÑƒÑ‚ÑŒ виділені червоною рамкою.'; $lang['updated'] = 'Параметри уÑпішно збережено.'; $lang['nochoice'] = '(інших варіантів не Ñ–Ñнує)'; -$lang['locked'] = 'Ðеможливо запиÑати файл наÑтройки. ПереконайтеÑÑ, <br /> +$lang['locked'] = 'Ðеможливо запиÑати файл налаштувань. ПереконайтеÑÑ, <br /> що ім\'Ñ Ñ‚Ð° права доÑтупу Ð´Ð»Ñ Ð»Ð¾ÐºÐ°Ð»ÑŒÐ½Ð¾Ð³Ð¾ файлу вказано правильно.'; $lang['danger'] = 'УВÐГÐ! Зміна цього параметру може призвеÑти до недоÑтупноÑті вашої Вікі та меню конфігурації.'; $lang['warning'] = 'УВÐГÐ! Зміна цього параметру може призвеÑти до непередбачуваних наÑлідків.'; $lang['security'] = 'УВÐГÐ! Зміна цього параметру може призвеÑти до поÑÐ»Ð°Ð±Ð»ÐµÐ½Ð½Ñ Ð±ÐµÐ·Ð¿ÐµÐºÐ¸ вашої Вікі.'; $lang['_configuration_manager'] = 'Ð£Ð¿Ñ€Ð°Ð²Ð»Ñ–Ð½Ð½Ñ ÐºÐ¾Ð½Ñ„Ñ–Ð³ÑƒÑ€Ð°Ñ†Ñ–Ñ”ÑŽ'; -$lang['_header_dokuwiki'] = 'ÐаÑтройки ДокуВікі'; -$lang['_header_plugin'] = 'ÐаÑтройки Доданків'; -$lang['_header_template'] = 'ÐаÑтройки шаблонів'; -$lang['_header_undefined'] = 'Ðевизначені наÑтройки'; -$lang['_basic'] = 'Базові наÑтройки'; -$lang['_display'] = 'ÐаÑтройки диÑплеÑ'; -$lang['_authentication'] = 'ÐаÑтройки автентифікації'; -$lang['_anti_spam'] = 'ÐаÑтройки Ðнти-Ñпаму'; -$lang['_editing'] = 'ÐаÑтройки редагуваннÑ'; -$lang['_links'] = 'ÐаÑтройки поÑилань'; -$lang['_media'] = 'ÐаÑтройки медіа'; -$lang['_advanced'] = 'Розширені наÑтройки'; -$lang['_network'] = 'ÐаÑтройки мережі'; -$lang['_plugin_sufix'] = 'ÐаÑтройки (доданок)'; -$lang['_template_sufix'] = 'ÐаÑтройки (шаблон)'; +$lang['_header_dokuwiki'] = 'ÐÐ°Ð»Ð°ÑˆÑ‚ÑƒÐ²Ð°Ð½Ð½Ñ Ð”Ð¾ÐºÑƒÐ’Ñ–ÐºÑ–'; +$lang['_header_plugin'] = 'ÐÐ°Ð»Ð°ÑˆÑ‚ÑƒÐ²Ð°Ð½Ð½Ñ Ð”Ð¾Ð´Ð°Ð½ÐºÑ–Ð²'; +$lang['_header_template'] = 'ÐÐ°Ð»Ð°ÑˆÑ‚ÑƒÐ²Ð°Ð½Ð½Ñ ÑˆÐ°Ð±Ð»Ð¾Ð½Ñ–Ð²'; +$lang['_header_undefined'] = 'Ðевизначені налаштуваннÑ'; +$lang['_basic'] = 'Базові налаштуваннÑ'; +$lang['_display'] = 'ÐÐ°Ð»Ð°ÑˆÑ‚ÑƒÐ²Ð°Ð½Ð½Ñ Ð²Ñ–Ð´Ð¾Ð±Ñ€Ð°Ð¶ÐµÐ½Ð½Ñ'; +$lang['_authentication'] = 'ÐÐ°Ð»Ð°ÑˆÑ‚ÑƒÐ²Ð°Ð½Ð½Ñ Ð°Ð²Ñ‚ÐµÐ½Ñ‚Ð¸Ñ„Ñ–ÐºÐ°Ñ†Ñ–Ñ—'; +$lang['_anti_spam'] = 'ÐÐ°Ð»Ð°ÑˆÑ‚ÑƒÐ²Ð°Ð½Ð½Ñ Ðнти-Ñпаму'; +$lang['_editing'] = 'ÐÐ°Ð»Ð°ÑˆÑ‚ÑƒÐ²Ð°Ð½Ð½Ñ Ñ€ÐµÐ´Ð°Ð³ÑƒÐ²Ð°Ð½Ð½Ñ'; +$lang['_links'] = 'ÐÐ°Ð»Ð°ÑˆÑ‚ÑƒÐ²Ð°Ð½Ð½Ñ Ð¿Ð¾Ñилань'; +$lang['_media'] = 'ÐÐ°Ð»Ð°ÑˆÑ‚ÑƒÐ²Ð°Ð½Ð½Ñ Ð¼ÐµÐ´Ñ–Ð°'; +$lang['_notifications'] = 'ÐÐ°Ð»Ð°ÑˆÑ‚ÑƒÐ²Ð°Ð½Ð½Ñ Ñповіщень'; +$lang['_advanced'] = 'Розширені налаштуваннÑ'; +$lang['_network'] = 'ÐÐ°Ð»Ð°ÑˆÑ‚ÑƒÐ²Ð°Ð½Ð½Ñ Ð¼ÐµÑ€ÐµÐ¶Ñ–'; +$lang['_plugin_sufix'] = 'ÐÐ°Ð»Ð°ÑˆÑ‚ÑƒÐ²Ð°Ð½Ð½Ñ (доданок)'; +$lang['_template_sufix'] = 'ÐÐ°Ð»Ð°ÑˆÑ‚ÑƒÐ²Ð°Ð½Ð½Ñ (шаблон)'; $lang['_msg_setting_undefined'] = 'Ðемає метаданих параметру.'; $lang['_msg_setting_no_class'] = 'Ðемає клаÑу параметру.'; $lang['_msg_setting_no_default'] = 'Ðемає Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ð·Ð° замовчуваннÑм.'; -$lang['fmode'] = 'Права Ð´Ð»Ñ Ñтворених файлів'; -$lang['dmode'] = 'Права Ð´Ð»Ñ Ñтворених папок'; -$lang['lang'] = 'Мова'; -$lang['basedir'] = 'Коренева папка'; -$lang['baseurl'] = 'Кореневий URL'; -$lang['savedir'] = 'Папка Ð´Ð»Ñ Ð·Ð±ÐµÑ€ÐµÐ¶ÐµÐ½Ð½Ñ Ð´Ð°Ð½Ð¸Ñ…'; -$lang['start'] = 'Ðазва Ñтартової Ñторінки'; $lang['title'] = 'Ðазва Вікі'; +$lang['start'] = 'Ðазва Ñтартової Ñторінки'; +$lang['lang'] = 'Мова'; $lang['template'] = 'Шаблон'; $lang['license'] = 'Під Ñкою ліцензією Ñлід публікувати вміÑÑ‚?'; -$lang['fullpath'] = 'Повний шлÑÑ… до документу'; +$lang['savedir'] = 'Папка Ð´Ð»Ñ Ð·Ð±ÐµÑ€ÐµÐ¶ÐµÐ½Ð½Ñ Ð´Ð°Ð½Ð¸Ñ…'; +$lang['basedir'] = 'Коренева папка'; +$lang['baseurl'] = 'Кореневий URL'; +$lang['dmode'] = 'Права Ð´Ð»Ñ Ñтворених папок'; +$lang['fmode'] = 'Права Ð´Ð»Ñ Ñтворених файлів'; +$lang['allowdebug'] = 'Дозволити Ð²Ñ–Ð´Ð»Ð°Ð³Ð¾Ð´Ð¶ÐµÐ½Ð½Ñ <b>вимкніть, Ñкщо не потрібно!</b>'; $lang['recent'] = 'ОÑтанні зміни'; +$lang['recent_days'] = 'Скільки оÑтанніх змін пам\'Ñтати (дні)'; $lang['breadcrumbs'] = 'Ви відвідали (кількіÑть Ñторінок, що показуєтьÑÑ)'; $lang['youarehere'] = 'Показувати "Ви тут"'; +$lang['fullpath'] = 'Повний шлÑÑ… до документу'; $lang['typography'] = 'Замінювати типографÑькі Ñимволи'; -$lang['htmlok'] = 'Дозволити HTML'; -$lang['phpok'] = 'Дозволити PHP'; $lang['dformat'] = 'Формат дати (дивітьÑÑ Ñ„ÑƒÐ½ÐºÑ†Ñ–ÑŽ <a href="http://www.php.net/strftime">strftime</a> PHP)'; $lang['signature'] = 'ПідпиÑ'; +$lang['showuseras'] = 'Що вказувати при відображенні кориÑтувача, Ñкий воÑтаннє редагував Ñторінку'; $lang['toptoclevel'] = 'Мінімальний рівень Ð´Ð»Ñ Ð·Ð¼Ñ–Ñту'; $lang['tocminheads'] = 'Мінімальна кількіÑть заголовків, необхідна Ð´Ð»Ñ ÑÑ‚Ð²Ð¾Ñ€ÐµÐ½Ð½Ñ Ñ‚Ð°Ð±Ð»Ð¸Ñ†Ñ– зміÑту'; $lang['maxtoclevel'] = 'МакÑимальний рівень Ð´Ð»Ñ Ñ‚Ð°Ð±Ð»Ð¸Ñ†Ñ– зміÑту'; @@ -66,15 +68,8 @@ $lang['maxseclevel'] = 'МакÑимальний рівень Ñекц $lang['camelcase'] = 'ВикориÑтовувати CamelCase'; $lang['deaccent'] = 'ТранÑÐ»Ñ–Ñ‚ÐµÑ€Ð°Ñ†Ñ–Ñ Ð² іменах Ñторінок'; $lang['useheading'] = 'Першій заголовок заміÑть імені'; -$lang['refcheck'] = 'ПеревірÑти поÑÐ¸Ð»Ð°Ð½Ð½Ñ Ð½Ð° медіа-файлі'; -$lang['refshow'] = 'Показувати кількіÑть медіа-поÑилань'; -$lang['allowdebug'] = 'Дозволити Ð²Ñ–Ð´Ð»Ð°Ð³Ð¾Ð´Ð¶ÐµÐ½Ð½Ñ <b>вимкніть, Ñкщо не потрібно!</b>'; -$lang['usewordblock'] = 'Блокувати Ñпам по ÑпиÑку Ñлів'; -$lang['indexdelay'] = 'Затримка перед індекÑацією'; -$lang['relnofollow'] = 'ВикориÑтовувати rel="nofollow"'; -$lang['mailguard'] = 'Кодувати адреÑи e-mail'; -$lang['iexssprotect'] = 'Перевірте оновлені файли на можливі заборонені Javascript чи HTML коди'; -$lang['showuseras'] = 'Що вказувати при відображенні кориÑтувача, Ñкий воÑтаннє редагував Ñторінку'; +$lang['sneaky_index'] = 'За замовчуваннÑм, ДокуВікі показує вÑÑ– проÑтори імен в зміÑті. ÐÐºÑ‚Ð¸Ð²Ð°Ñ†Ñ–Ñ Ñ†Ñ–Ñ”Ñ— опції Ñховає ті проÑтори, де кориÑтувач не має прав на читаннÑ. Результатом може бути неможливіÑть доÑтупу до певних відкритих проÑторів імен. Це зробить неможливим викориÑÑ‚Ð°Ð½Ð½Ñ Ð·Ð¼Ñ–Ñту при певних конфігураціÑÑ….'; +$lang['hidepages'] = 'Ховати Ñторінки (regular expressions)'; $lang['useacl'] = 'ВикориÑтовувати ACL'; $lang['autopasswd'] = 'Ðвтоматичне ÑÑ‚Ð²Ð¾Ñ€ÐµÐ½Ð½Ñ Ð¿Ð°Ñ€Ð¾Ð»Ñ–Ð²'; $lang['authtype'] = 'ÐутентифікаціÑ'; @@ -83,57 +78,63 @@ $lang['defaultgroup'] = 'Група за замовчуваннÑм'; $lang['superuser'] = 'СуперкориÑтувач'; $lang['manager'] = 'Менеджер - група, кориÑтувач чи розділений комами ÑпиÑок user1,@group1,user2 з правами до певних функцій керуваннÑ'; $lang['profileconfirm'] = 'Підтверджувати зміни профілю паролем'; +$lang['rememberme'] = 'Дозволити поÑтійні файли cookies Ð´Ð»Ñ Ð²Ñ…Ð¾Ð´Ñƒ (Запам\'Ñтати мене)'; $lang['disableactions'] = 'Заборонити дії ДокуВікі'; $lang['disableactions_check'] = 'Перевірити'; $lang['disableactions_subscription'] = 'ПідпиÑатиÑÑŒ/ВідпиÑатиÑÑŒ'; $lang['disableactions_wikicode'] = 'ПереглÑнути код/ЕкÑпорт'; $lang['disableactions_other'] = 'Інші дії (розділені комами)'; -$lang['sneaky_index'] = 'За замовчуваннÑм, ДокуВікі показує вÑÑ– проÑтори імен в зміÑті. ÐÐºÑ‚Ð¸Ð²Ð°Ñ†Ñ–Ñ Ñ†Ñ–Ñ”Ñ— опції Ñховає ті проÑтори, де кориÑтувач не має прав на читаннÑ. Результатом може бути неможливіÑть доÑтупу до певних відкритих проÑторів імен. Це зробить неможливим викориÑÑ‚Ð°Ð½Ð½Ñ Ð·Ð¼Ñ–Ñту при певних конфігураціÑÑ….'; $lang['auth_security_timeout'] = 'Таймаут аутентифікації (в Ñекундах)'; $lang['securecookie'] = 'Чи повинен браузер надÑилати файли cookies тільки через HTTPS? Вимкніть цей параметр, лише тоді, Ñкщо вхід до Вікі захищено SSL, але переглÑд Ñторінок відбуваєтьÑÑ Ñƒ незахищеному режимі.'; +$lang['usewordblock'] = 'Блокувати Ñпам по ÑпиÑку Ñлів'; +$lang['relnofollow'] = 'ВикориÑтовувати rel="nofollow"'; +$lang['indexdelay'] = 'Затримка перед індекÑацією'; +$lang['mailguard'] = 'Кодувати адреÑи e-mail'; +$lang['iexssprotect'] = 'Перевірте оновлені файли на можливі заборонені Javascript чи HTML коди'; +$lang['usedraft'] = 'Ðвтоматично зберігати чернетку при редагуванні'; +$lang['htmlok'] = 'Дозволити HTML'; +$lang['phpok'] = 'Дозволити PHP'; +$lang['locktime'] = 'Ð§Ð°Ñ Ð±Ð»Ð¾ÐºÑƒÐ²Ð°Ð½Ð½Ñ (Ñек)'; +$lang['cachetime'] = 'МакÑимальний вік кешу (Ñек)'; +$lang['target____wiki'] = 'Target Ð´Ð»Ñ Ð²Ð½ÑƒÑ‚Ñ€Ñ–ÑˆÐ½Ñ–Ñ… поÑилань'; +$lang['target____interwiki'] = 'Target Ð´Ð»Ñ Ñ–Ð½Ñ‚ÐµÑ€Ð’Ñ–ÐºÑ–-поÑилань'; +$lang['target____extern'] = 'Target Ð´Ð»Ñ Ð·Ð¾Ð²Ð½Ñ–ÑˆÐ½Ñ–Ñ… поÑилань'; +$lang['target____media'] = 'Target Ð´Ð»Ñ Ð¼ÐµÐ´Ñ–Ð°-поÑилань'; +$lang['target____windows'] = 'Target Ð´Ð»Ñ Ð¿Ð¾Ñилань на мережеві папки'; +$lang['refcheck'] = 'ПеревірÑти поÑÐ¸Ð»Ð°Ð½Ð½Ñ Ð½Ð° медіа-файлі'; +$lang['refshow'] = 'Показувати кількіÑть медіа-поÑилань'; +$lang['gdlib'] = 'ВерÑÑ–Ñ GD Lib'; +$lang['im_convert'] = 'ШлÑÑ… до ImageMagick'; +$lang['jpg_quality'] = 'ЯкіÑть компреÑÑ–Ñ— JPG (0-100)'; +$lang['fetchsize'] = 'МакÑимальний розмір (в байтах), що fetch.php може завантажувати з зовні'; +$lang['subscribers'] = 'ПідпиÑка на зміни'; +$lang['subscribe_time'] = 'ЧаÑ, піÑÐ»Ñ Ñкого ÑпиÑок підпиÑки та дайджеÑти будуть надіÑлані (Ñек.); Має бути меншим за чаÑ, вказаний у перемінній recent_days'; +$lang['notify'] = 'E-mail Ð´Ð»Ñ Ñповіщень'; +$lang['registernotify'] = 'ÐадÑилати інформацію про нових кориÑтувачів на цю адреÑу'; +$lang['mailfrom'] = 'E-mail Ð´Ð»Ñ Ð°Ð²Ñ‚Ð¾Ð¼Ð°Ñ‚Ð¸Ñ‡Ð½Ð¸Ñ… повідомлень'; +$lang['mailprefix'] = 'ÐŸÑ€ÐµÑ„Ñ–ÐºÑ Ñ‚ÐµÐ¼Ð¸ повідомленнÑ, що викориÑтовуєтьÑÑ Ð² автоматичній розÑилці електронних лиÑтів'; +$lang['sitemap'] = 'Створювати мапу Ñайту Ð´Ð»Ñ Google (дні)'; +$lang['rss_type'] = 'тип RSS'; +$lang['rss_linkto'] = 'поÑÐ¸Ð»Ð°Ð½Ð½Ñ Ð² RSS'; +$lang['rss_content'] = 'Що відображати в пунктах XML-feed'; +$lang['rss_update'] = 'Інтервал Ð¾Ð½Ð¾Ð²Ð»ÐµÐ½Ð½Ñ RSS (Ñек)'; +$lang['rss_show_summary'] = 'Показувати підÑумки змін в заголовку XML-feed'; $lang['updatecheck'] = 'Перевірити наÑвніÑть оновлень чи попереджень безпеки? Ð”Ð»Ñ Ñ†ÑŒÐ¾Ð³Ð¾ ДокуВікі необхідно зв\'ÑзатиÑÑ Ð·Ñ– update.dokuwiki.org.'; $lang['userewrite'] = 'КраÑиві URL'; $lang['useslash'] = 'Слеш, Ñк розділювач проÑторів імен в URL'; -$lang['usedraft'] = 'Ðвтоматично зберігати чернетку при редагуванні'; $lang['sepchar'] = 'Розділювач Ñлів у імені Ñторінки'; $lang['canonical'] = 'Канонічні URL'; $lang['fnencode'] = 'Метод Ð´Ð»Ñ ÐºÐ¾Ð´ÑƒÐ²Ð°Ð½Ð½Ñ Ñ–Ð¼ÐµÐ½ файлів, що міÑÑ‚Ñть не ASCII Ñимволи.'; $lang['autoplural'] = 'ПеревірÑти множину у поÑиланнÑÑ…'; $lang['compression'] = 'Метод ÑтиÑÐ½ÐµÐ½Ð½Ñ attic файлів'; -$lang['cachetime'] = 'МакÑимальний вік кешу (Ñек)'; -$lang['locktime'] = 'Ð§Ð°Ñ Ð±Ð»Ð¾ÐºÑƒÐ²Ð°Ð½Ð½Ñ (Ñек)'; -$lang['fetchsize'] = 'МакÑимальний розмір (в байтах), що fetch.php може завантажувати з зовні'; -$lang['notify'] = 'E-mail Ð´Ð»Ñ Ñповіщень'; -$lang['registernotify'] = 'ÐадÑилати інформацію про нових кориÑтувачів на цю адреÑу'; -$lang['mailfrom'] = 'E-mail Ð´Ð»Ñ Ð°Ð²Ñ‚Ð¾Ð¼Ð°Ñ‚Ð¸Ñ‡Ð½Ð¸Ñ… повідомлень'; -$lang['mailprefix'] = 'ÐŸÑ€ÐµÑ„Ñ–ÐºÑ Ñ‚ÐµÐ¼Ð¸ повідомленнÑ, що викориÑтовуєтьÑÑ Ð² автоматичній розÑилці електронних лиÑтів'; $lang['gzip_output'] = 'ВикориÑтовувати gzip, Ñк Content-Encoding Ð´Ð»Ñ xhtml'; -$lang['gdlib'] = 'ВерÑÑ–Ñ GD Lib'; -$lang['im_convert'] = 'ШлÑÑ… до ImageMagick'; -$lang['jpg_quality'] = 'ЯкіÑть компреÑÑ–Ñ— JPG (0-100)'; -$lang['subscribers'] = 'ПідпиÑка на зміни'; -$lang['subscribe_time'] = 'ЧаÑ, піÑÐ»Ñ Ñкого ÑпиÑок підпиÑки та дайджеÑти будуть надіÑлані (Ñек.); Має бути меншим за чаÑ, вказаний у перемінній recent_days'; $lang['compress'] = 'СтиÑкати файли CSS та javascript'; -$lang['hidepages'] = 'Ховати Ñторінки (regular expressions)'; $lang['send404'] = 'ÐадÑилати "HTTP 404/Сторінка не знайдена " Ð´Ð»Ñ Ð½ÐµÑ–Ñнуючих Ñторінок'; -$lang['sitemap'] = 'Створювати мапу Ñайту Ð´Ð»Ñ Google (дні)'; $lang['broken_iua'] = 'У вашій ÑиÑтемі зіпÑована Ñ„ÑƒÐ½ÐºÑ†Ñ–Ñ ignore_user_abort? Це може зіпÑувати пошукову ÑиÑтему. IIS+PHP/CGI не працює. ДивітьÑÑ <a href="http://bugs.splitbrain.org/?do=details&task_id=852">Bug 852</a> Ð´Ð»Ñ Ð¾Ñ‚Ñ€Ð¸Ð¼Ð°Ð½Ð½Ñ Ð´Ð¾Ð´Ð°Ñ‚ÐºÐ¾Ð²Ð¾Ñ— інформації'; $lang['xsendfile'] = 'ВикориÑтовувати заголовок X-Sendfile Ð´Ð»Ñ Ð´Ð¾Ñтавки Ñтатичних файлів веб Ñервером? Ваш веб Ñервер повинен підтримувати цю функцію.'; $lang['renderer_xhtml'] = 'ТранÑлÑтор (Renderer) Ð´Ð»Ñ Ð¾Ñновного виводу wiki (xhtml)'; $lang['renderer__core'] = '%s (Ñдро докуВікі)'; $lang['renderer__plugin'] = '%s (доданок)'; -$lang['rememberme'] = 'Дозволити поÑтійні файли cookies Ð´Ð»Ñ Ð²Ñ…Ð¾Ð´Ñƒ (Запам\'Ñтати мене)'; -$lang['rss_type'] = 'тип RSS'; -$lang['rss_linkto'] = 'поÑÐ¸Ð»Ð°Ð½Ð½Ñ Ð² RSS'; -$lang['rss_content'] = 'Що відображати в пунктах XML-feed'; -$lang['rss_update'] = 'Інтервал Ð¾Ð½Ð¾Ð²Ð»ÐµÐ½Ð½Ñ RSS (Ñек)'; -$lang['recent_days'] = 'Скільки оÑтанніх змін пам\'Ñтати (дні)'; -$lang['rss_show_summary'] = 'Показувати підÑумки змін в заголовку XML-feed'; -$lang['target____wiki'] = 'Target Ð´Ð»Ñ Ð²Ð½ÑƒÑ‚Ñ€Ñ–ÑˆÐ½Ñ–Ñ… поÑилань'; -$lang['target____interwiki'] = 'Target Ð´Ð»Ñ Ñ–Ð½Ñ‚ÐµÑ€Ð’Ñ–ÐºÑ–-поÑилань'; -$lang['target____extern'] = 'Target Ð´Ð»Ñ Ð·Ð¾Ð²Ð½Ñ–ÑˆÐ½Ñ–Ñ… поÑилань'; -$lang['target____media'] = 'Target Ð´Ð»Ñ Ð¼ÐµÐ´Ñ–Ð°-поÑилань'; -$lang['target____windows'] = 'Target Ð´Ð»Ñ Ð¿Ð¾Ñилань на мережеві папки'; $lang['proxy____host'] = 'ÐдреÑа Proxy'; $lang['proxy____port'] = 'Порт Proxy'; $lang['proxy____user'] = 'КориÑтувач Proxy'; @@ -181,7 +182,7 @@ $lang['xsendfile_o_2'] = 'Стандартний X-Sendfile заголо $lang['xsendfile_o_3'] = 'Фірмовий заголовок Nginx X-Accel-Redirect'; $lang['showuseras_o_loginname'] = 'Логін'; $lang['showuseras_o_username'] = 'Повне Ñ–Ð¼â€™Ñ ÐºÐ¾Ñ€Ð¸Ñтувача'; -$lang['showuseras_o_email'] = 'E-mail кориÑтувача (прихована відповідно до наÑтройок)'; +$lang['showuseras_o_email'] = 'E-mail кориÑтувача (прихована відповідно до налаштувань)'; $lang['showuseras_o_email_link'] = 'E-mail кориÑтувача Ñк поÑÐ¸Ð»Ð°Ð½Ð½Ñ mailto:'; $lang['useheading_o_0'] = 'Ðіколи'; $lang['useheading_o_navigation'] = 'Лише Ð´Ð»Ñ Ð½Ð°Ð²Ñ–Ð³Ð°Ñ†Ñ–Ñ—'; diff --git a/lib/plugins/config/lang/vi/lang.php b/lib/plugins/config/lang/vi/lang.php new file mode 100644 index 0000000000000000000000000000000000000000..2933d88752a2d2de929afffb9037ed069e4033a9 --- /dev/null +++ b/lib/plugins/config/lang/vi/lang.php @@ -0,0 +1,5 @@ +<?php +/** + * Vietnamese language file + * + */ diff --git a/lib/plugins/config/lang/zh/lang.php b/lib/plugins/config/lang/zh/lang.php index 5b7229c624ce812da41b6f8410a2f5f71b3b92a5..832dfe749da179d9072b0a273c60530c8a844a7a 100644 --- a/lib/plugins/config/lang/zh/lang.php +++ b/lib/plugins/config/lang/zh/lang.php @@ -38,6 +38,8 @@ $lang['_anti_spam'] = 'å垃圾邮件/评论设置'; $lang['_editing'] = '编辑设置'; $lang['_links'] = '链接设置'; $lang['_media'] = '媒体设置'; +$lang['_notifications'] = '通知设置'; +$lang['_syndication'] = 'èšåˆè®¾ç½®'; $lang['_advanced'] = '高级设置'; $lang['_network'] = '网络设置'; $lang['_plugin_sufix'] = 'æ’件设置'; @@ -45,26 +47,29 @@ $lang['_template_sufix'] = '模æ¿è®¾ç½®'; $lang['_msg_setting_undefined'] = '设置的元数æ®ä¸å˜åœ¨ã€‚'; $lang['_msg_setting_no_class'] = '设置的分类ä¸å˜åœ¨ã€‚'; $lang['_msg_setting_no_default'] = '设置的默认值ä¸å˜åœ¨ã€‚'; -$lang['fmode'] = '文件的创建模å¼'; -$lang['dmode'] = '文件夹的创建模å¼'; +$lang['title'] = 'ç»´åŸºç«™ç‚¹çš„æ ‡é¢˜'; +$lang['start'] = '开始页é¢çš„åç§°'; $lang['lang'] = 'è¯è¨€'; +$lang['template'] = '模版'; +$lang['tagline'] = 'å‰¯æ ‡é¢˜ ï¼ˆå¦‚æžœæ¨¡æ¿æ”¯æŒæ¤åŠŸèƒ½ï¼‰'; +$lang['sidebar'] = 'ä¾§è¾¹æ 的页é¢åç§° ï¼ˆå¦‚æžœæ¨¡æ¿æ”¯æŒæ¤åŠŸèƒ½ï¼‰ï¼Œç•™ç©ºä»¥ç¦ç”¨ä¾§è¾¹æ '; +$lang['license'] = '您愿æ„è®©ä½ è´¡çŒ®çš„å†…å®¹åœ¨ä½•ç§è®¸å¯æ–¹å¼ä¸‹å‘布?'; +$lang['savedir'] = 'ä¿å˜æ•°æ®çš„目录'; $lang['basedir'] = 'æ ¹ç›®å½•'; $lang['baseurl'] = 'æ ¹è·¯å¾„ï¼ˆURL)'; -$lang['savedir'] = 'ä¿å˜æ•°æ®çš„目录'; $lang['cookiedir'] = 'Cookie 路径。留空以使用 baseurl。'; -$lang['start'] = '开始页é¢çš„åç§°'; -$lang['title'] = 'ç»´åŸºç«™ç‚¹çš„æ ‡é¢˜'; -$lang['template'] = '模版'; -$lang['license'] = '您愿æ„è®©ä½ è´¡çŒ®çš„å†…å®¹åœ¨ä½•ç§è®¸å¯æ–¹å¼ä¸‹å‘布?'; -$lang['fullpath'] = '在页é¢åº•部显示完整路径'; +$lang['dmode'] = '文件夹的创建模å¼'; +$lang['fmode'] = '文件的创建模å¼'; +$lang['allowdebug'] = 'å…许调试 <b>如果您ä¸éœ€è¦è°ƒè¯•,请勿勾选ï¼</b>'; $lang['recent'] = '最近更新'; +$lang['recent_days'] = 'ä¿ç•™å¤šå°‘天的最近更改(天)'; $lang['breadcrumbs'] = '显示“足迹â€çš„æ•°é‡'; $lang['youarehere'] = '显示“您在这里â€'; +$lang['fullpath'] = '在页é¢åº•部显示完整路径'; $lang['typography'] = '进行å—符替æ¢'; -$lang['htmlok'] = 'å…è®¸åµŒå…¥å¼ HTML'; -$lang['phpok'] = 'å…è®¸åµŒå…¥å¼ PHP'; $lang['dformat'] = 'æ—¥æœŸæ ¼å¼ï¼ˆå‚è§ PHP çš„ <a href="http://www.php.net/strftime">strftime</a> 功能)'; $lang['signature'] = 'ç¾åæ ·å¼'; +$lang['showuseras'] = '显示用户为'; $lang['toptoclevel'] = '目录的最顶层'; $lang['tocminheads'] = 'å¤´æ¡æ•°ç›®çš„æœ€å°æ•°ç›®ï¼Œè¿™å°†ç”¨äºŽå†³å®šæ˜¯å¦åˆ›å»ºç›®å½•列表(TOC)'; $lang['maxtoclevel'] = '目录的最多层次'; @@ -72,15 +77,8 @@ $lang['maxseclevel'] = '段è½ç¼–辑的最多层次'; $lang['camelcase'] = '对链接使用 CamelCase'; $lang['deaccent'] = '清ç†é¡µé¢åç§°'; $lang['useheading'] = 'ä½¿ç”¨â€œæ ‡é¢˜ H1â€ä½œä¸ºé¡µé¢åç§°'; -$lang['refcheck'] = '检查媒体与页é¢çš„æŒ‚钩情况'; -$lang['refshow'] = 'æ˜¾ç¤ºåª’ä½“ä¸Žé¡µé¢æŒ‚钩情况的数é‡'; -$lang['allowdebug'] = 'å…许调试 <b>如果您ä¸éœ€è¦è°ƒè¯•,请勿勾选ï¼</b>'; -$lang['usewordblock'] = 'æ ¹æ® wordlist 阻æ¢åžƒåœ¾è¯„论'; -$lang['indexdelay'] = '构建索引å‰çš„æ—¶é—´å»¶æ»žï¼ˆç§’)'; -$lang['relnofollow'] = '对外部链接使用 rel="nofollow" æ ‡ç¾'; -$lang['mailguard'] = '弄乱邮件地å€ï¼ˆä¿æŠ¤ç”¨æˆ·çš„邮件地å€ï¼‰'; -$lang['iexssprotect'] = 'æ£€éªŒä¸Šä¼ çš„æ–‡ä»¶ä»¥é¿å…å¯èƒ½å˜åœ¨çš„æ¶æ„ JavaScript 或 HTML 代ç '; -$lang['showuseras'] = '显示用户为'; +$lang['sneaky_index'] = '默认情况下,DokuWiki 在索引页会显示所有 namespace。å¯ç”¨è¯¥é€‰é¡¹èƒ½éšè—那些用户没有æƒé™é˜…读的页é¢ã€‚但也å¯èƒ½å°†ç”¨æˆ·èƒ½å¤Ÿé˜…读的å页é¢ä¸€å¹¶éšè—。这有å¯èƒ½å¯¼è‡´åœ¨ç‰¹å®š ACL 设置下,索引功能ä¸å¯ç”¨ã€‚'; +$lang['hidepages'] = 'éšè—匹é…的界é¢ï¼ˆæ£åˆ™è¡¨è¾¾å¼ï¼‰'; $lang['useacl'] = '使用访问控制列表(ACL)'; $lang['autopasswd'] = '自动生æˆå¯†ç '; $lang['authtype'] = '认è¯åŽå°ç®¡ç†æ–¹å¼'; @@ -89,59 +87,71 @@ $lang['defaultgroup'] = '默认组'; $lang['superuser'] = '超级用户 - ä¸è®º ACL 如何设置,都能访问所有页é¢ä¸ŽåŠŸèƒ½çš„ç”¨æˆ·ç»„/用户'; $lang['manager'] = '管ç†å‘˜ - 能访问相应管ç†åŠŸèƒ½çš„ç”¨æˆ·ç»„/用户'; $lang['profileconfirm'] = 'æ›´æ–°ä¸ªäººä¿¡æ¯æ—¶éœ€è¦è¾“入当å‰å¯†ç '; +$lang['rememberme'] = 'å…许在本地机长期ä¿ç•™ç™»å½•cookiesä¿¡æ¯ï¼ˆè®°ä½æˆ‘)'; $lang['disableactions'] = 'åœç”¨ DokuWiki 功能'; $lang['disableactions_check'] = '检查'; $lang['disableactions_subscription'] = '订阅/退订'; $lang['disableactions_wikicode'] = 'æŸ¥çœ‹æºæ–‡ä»¶/å¯¼å‡ºæºæ–‡ä»¶'; $lang['disableactions_other'] = '其他功能(用英文逗å·åˆ†éš”)'; -$lang['sneaky_index'] = '默认情况下,DokuWiki 在索引页会显示所有 namespace。å¯ç”¨è¯¥é€‰é¡¹èƒ½éšè—那些用户没有æƒé™é˜…读的页é¢ã€‚但也å¯èƒ½å°†ç”¨æˆ·èƒ½å¤Ÿé˜…读的å页é¢ä¸€å¹¶éšè—。这有å¯èƒ½å¯¼è‡´åœ¨ç‰¹å®š ACL 设置下,索引功能ä¸å¯ç”¨ã€‚'; $lang['auth_security_timeout'] = '认è¯å®‰å…¨è¶…时(秒)'; $lang['securecookie'] = 'è¦è®©æµè§ˆå™¨é¡»ä»¥HTTPSæ–¹å¼ä¼ é€åœ¨HTTPS会è¯ä¸è®¾ç½®çš„cookieså—?请åªåœ¨ç™»å½•过程为SSLåŠ å¯†è€Œæµè§ˆç»´åŸºä¸ºæ˜Žæ–‡çš„æƒ…况下打开æ¤é€‰é¡¹ã€‚'; +$lang['remote'] = '激活远程 API 系统。这å…许其他程åºé€šè¿‡ XML-RPC 或其他机制æ¥è®¿é—®ç»´åŸºã€‚'; +$lang['remoteuser'] = '将远程 API 的访问æƒé™é™åˆ¶åœ¨æŒ‡å®šçš„组或用户ä¸ï¼Œä»¥é€—å·åˆ†éš”。留空则å…许任何人访问。'; +$lang['usewordblock'] = 'æ ¹æ® wordlist 阻æ¢åžƒåœ¾è¯„论'; +$lang['relnofollow'] = '对外部链接使用 rel="nofollow" æ ‡ç¾'; +$lang['indexdelay'] = '构建索引å‰çš„æ—¶é—´å»¶æ»žï¼ˆç§’)'; +$lang['mailguard'] = '弄乱邮件地å€ï¼ˆä¿æŠ¤ç”¨æˆ·çš„邮件地å€ï¼‰'; +$lang['iexssprotect'] = 'æ£€éªŒä¸Šä¼ çš„æ–‡ä»¶ä»¥é¿å…å¯èƒ½å˜åœ¨çš„æ¶æ„ JavaScript 或 HTML 代ç '; +$lang['usedraft'] = '编辑时自动ä¿å˜ä¸€ä»½è‰ç¨¿'; +$lang['htmlok'] = 'å…è®¸åµŒå…¥å¼ HTML'; +$lang['phpok'] = 'å…è®¸åµŒå…¥å¼ PHP'; +$lang['locktime'] = '独有编辑æƒ/文件é”定的最长时间(秒)'; +$lang['cachetime'] = '缓å˜çš„æœ€é•¿æ—¶é—´ï¼ˆç§’)'; +$lang['target____wiki'] = 'å†…éƒ¨é“¾æŽ¥çš„ç›®æ ‡çª—å£'; +$lang['target____interwiki'] = 'Interwiki é“¾æŽ¥çš„ç›®æ ‡çª—å£'; +$lang['target____extern'] = 'å¤–éƒ¨é“¾æŽ¥çš„ç›®æ ‡çª—å£'; +$lang['target____media'] = 'åª’ä½“æ–‡ä»¶é“¾æŽ¥çš„ç›®æ ‡çª—å£'; +$lang['target____windows'] = 'Windows é“¾æŽ¥çš„ç›®æ ‡çª—å£'; +$lang['mediarevisions'] = '激活媒体修订历å²ï¼Ÿ'; +$lang['refcheck'] = '检查媒体与页é¢çš„æŒ‚钩情况'; +$lang['refshow'] = 'æ˜¾ç¤ºåª’ä½“ä¸Žé¡µé¢æŒ‚钩情况的数é‡'; +$lang['gdlib'] = 'GD 库版本'; +$lang['im_convert'] = 'ImageMagick 转æ¢å·¥å…·çš„路径'; +$lang['jpg_quality'] = 'JPG 压缩质é‡ï¼ˆ0-100)'; +$lang['fetchsize'] = 'fetch.php 能从外部下载的最大文件大å°ï¼ˆå—节)'; +$lang['subscribers'] = 'å¯ç”¨é¡µé¢è®¢é˜…支æŒ'; +$lang['subscribe_time'] = '订阅列表和摘è¦å‘é€çš„æ—¶é—´é—´éš”(秒);这应当å°äºŽæŒ‡å®šçš„æœ€è¿‘更改ä¿ç•™æ—¶é—´ï¼ˆrecent_days)。 +'; +$lang['notify'] = 'å‘逿›´æ”¹é€šçŸ¥ç»™è¿™ä¸ªé‚®ä»¶åœ°å€'; +$lang['registernotify'] = 'å‘逿–°æ³¨å†Œç”¨æˆ·çš„ä¿¡æ¯ç»™è¿™ä¸ªé‚®ä»¶åœ°å€'; +$lang['mailfrom'] = '自动å‘é€é‚®ä»¶æ—¶ä½¿ç”¨çš„邮件地å€'; +$lang['mailprefix'] = '自动å‘é€é‚®ä»¶æ—¶ä½¿ç”¨çš„邮件地å€å‰ç¼€'; +$lang['htmlmail'] = 'å‘逿›´åŠ ç¾Žè§‚ï¼Œä½†ä½“ç§¯æ›´å¤§çš„ HTML 多部分邮件。ç¦ç”¨åˆ™å‘é€çº¯æ–‡æœ¬é‚®ä»¶ã€‚'; +$lang['sitemap'] = 'ç”Ÿæˆ Google sitemap(天)'; +$lang['rss_type'] = 'XML feed 类型'; +$lang['rss_linkto'] = 'XML feed 链接到'; +$lang['rss_content'] = 'XML feed é¡¹ç›®ä¸æ˜¾ç¤ºä»€ä¹ˆå‘¢ï¼Ÿ'; +$lang['rss_update'] = 'XML feed å‡çº§é—´éš”(秒)'; +$lang['rss_show_summary'] = 'XML feed åœ¨æ ‡é¢˜ä¸æ˜¾ç¤ºæ‘˜è¦'; +$lang['rss_media'] = '在 XML æºä¸åº”该列出何ç§ç±»åž‹çš„æ›´æ”¹ï¼Ÿ'; $lang['updatecheck'] = '自动检查更新并接收安全è¦å‘Šå—?开å¯è¯¥åŠŸèƒ½åŽ DokuWiki 将自动访问 splitbrain.org。'; $lang['userewrite'] = '使用更整æ´çš„ URL'; $lang['useslash'] = '在 URL ä¸ä½¿ç”¨æ–œæ 作为命å空间的分隔符'; -$lang['usedraft'] = '编辑时自动ä¿å˜ä¸€ä»½è‰ç¨¿'; $lang['sepchar'] = '页é¢åç§°ä¸çš„å•è¯åˆ†éš”符'; $lang['canonical'] = 'ä½¿ç”¨å®Œå…¨æ ‡å‡†çš„ URL'; $lang['fnencode'] = 'éž ASCII 文件åçš„ç¼–ç æ–¹æ³•。'; $lang['autoplural'] = 'åœ¨é“¾æŽ¥ä¸æ£€æŸ¥å¤šç§æ ¼å¼'; $lang['compression'] = 'attic 文件的压缩方å¼'; -$lang['cachetime'] = '缓å˜çš„æœ€é•¿æ—¶é—´ï¼ˆç§’)'; -$lang['locktime'] = '独有编辑æƒ/文件é”定的最长时间(秒)'; -$lang['fetchsize'] = 'fetch.php 能从外部下载的最大文件大å°ï¼ˆå—节)'; -$lang['notify'] = 'å‘逿›´æ”¹é€šçŸ¥ç»™è¿™ä¸ªé‚®ä»¶åœ°å€'; -$lang['registernotify'] = 'å‘逿–°æ³¨å†Œç”¨æˆ·çš„ä¿¡æ¯ç»™è¿™ä¸ªé‚®ä»¶åœ°å€'; -$lang['mailfrom'] = '自动å‘é€é‚®ä»¶æ—¶ä½¿ç”¨çš„邮件地å€'; -$lang['mailprefix'] = '自动å‘é€é‚®ä»¶æ—¶ä½¿ç”¨çš„邮件地å€å‰ç¼€'; $lang['gzip_output'] = '对 xhtml 使用 gzip 内容编ç '; -$lang['gdlib'] = 'GD 库版本'; -$lang['im_convert'] = 'ImageMagick 转æ¢å·¥å…·çš„路径'; -$lang['jpg_quality'] = 'JPG 压缩质é‡ï¼ˆ0-100)'; -$lang['subscribers'] = 'å¯ç”¨é¡µé¢è®¢é˜…支æŒ'; -$lang['subscribe_time'] = '订阅列表和摘è¦å‘é€çš„æ—¶é—´é—´éš”(秒);这应当å°äºŽæŒ‡å®šçš„æœ€è¿‘更改ä¿ç•™æ—¶é—´ï¼ˆrecent_days)。 -'; $lang['compress'] = '使 CSS å’Œ javascript 的输出更紧密'; $lang['cssdatauri'] = 'å—节数。CSS 文件引用的图片若å°äºŽè¯¥å—èŠ‚ï¼Œåˆ™è¢«ç›´æŽ¥åµŒå…¥æ ·å¼è¡¨ä¸æ¥å‡å°‘ HTTP 请求头的开销。这个技术在 IE ä¸ä¸èµ·ä½œç”¨ã€‚<code>400</code> 到 <code>600</code> å—节是ä¸é”™çš„值。设置为 <code>0</code> 则ç¦ç”¨ã€‚'; -$lang['hidepages'] = 'éšè—匹é…的界é¢ï¼ˆæ£åˆ™è¡¨è¾¾å¼ï¼‰'; $lang['send404'] = 'å‘é€ "HTTP 404/页颿²¡æœ‰æ‰¾åˆ°" 错误信æ¯ç»™ä¸å˜åœ¨çš„页é¢'; -$lang['sitemap'] = 'ç”Ÿæˆ Google sitemap(天)'; $lang['broken_iua'] = 'ignore_user_abort 功能失效了?这有å¯èƒ½å¯¼è‡´æœç´¢ç´¢å¼•ä¸å¯ç”¨ã€‚IIS+PHP/CGI å·²æŸå。请å‚阅 <a href="http://bugs.splitbrain.org/?do=details&task_id=852">Bug 852</a> èŽ·å–æ›´å¤šä¿¡æ¯ã€‚'; $lang['xsendfile'] = '使用 X-Sendfile 头让æœåС噍å‘é€çŠ¶æ€æ–‡ä»¶ï¼Ÿæ‚¨çš„æœåŠ¡å™¨éœ€è¦æ”¯æŒè¯¥åŠŸèƒ½ã€‚'; $lang['renderer_xhtml'] = 'ä¸»ç»´åŸºé¡µé¢ (xhtml) 输出使用的渲染'; $lang['renderer__core'] = '%s(DokuWiki å†…æ ¸ï¼‰'; $lang['renderer__plugin'] = '%s(æ’件)'; -$lang['rememberme'] = 'å…许在本地机长期ä¿ç•™ç™»å½•cookiesä¿¡æ¯ï¼ˆè®°ä½æˆ‘)'; -$lang['rss_type'] = 'XML feed 类型'; -$lang['rss_linkto'] = 'XML feed 链接到'; -$lang['rss_content'] = 'XML feed é¡¹ç›®ä¸æ˜¾ç¤ºä»€ä¹ˆå‘¢ï¼Ÿ'; -$lang['rss_update'] = 'XML feed å‡çº§é—´éš”(秒)'; -$lang['recent_days'] = 'ä¿ç•™å¤šå°‘天的最近更改(天)'; -$lang['rss_show_summary'] = 'XML feed åœ¨æ ‡é¢˜ä¸æ˜¾ç¤ºæ‘˜è¦'; -$lang['target____wiki'] = 'å†…éƒ¨é“¾æŽ¥çš„ç›®æ ‡çª—å£'; -$lang['target____interwiki'] = 'Interwiki é“¾æŽ¥çš„ç›®æ ‡çª—å£'; -$lang['target____extern'] = 'å¤–éƒ¨é“¾æŽ¥çš„ç›®æ ‡çª—å£'; -$lang['target____media'] = 'åª’ä½“æ–‡ä»¶é“¾æŽ¥çš„ç›®æ ‡çª—å£'; -$lang['target____windows'] = 'Windows é“¾æŽ¥çš„ç›®æ ‡çª—å£'; +$lang['dnslookups'] = 'Dokuwiki 将会查询用户编辑页é¢çš„远程 IP 地å€çš„主机å。如果您的 DNS æœåŠ¡å™¨æ¯”è¾ƒç¼“æ…¢æˆ–è€…ä¸å·¥ä½œï¼Œæˆ–è€…æ‚¨ä¸æƒ³è¦è¿™ä¸ªåŠŸèƒ½ï¼Œè¯·ç¦ç”¨æ¤é€‰é¡¹ã€‚'; $lang['proxy____host'] = 'ä»£ç†æœåŠ¡å™¨çš„åç§°'; $lang['proxy____port'] = 'ä»£ç†æœåŠ¡å™¨çš„ç«¯å£'; $lang['proxy____user'] = 'ä»£ç†æœåŠ¡å™¨çš„ç”¨æˆ·å'; diff --git a/lib/plugins/config/rtl.css b/lib/plugins/config/rtl.css deleted file mode 100644 index b8b9660e24cddb83fca181fc798494dd9582f914..0000000000000000000000000000000000000000 --- a/lib/plugins/config/rtl.css +++ /dev/null @@ -1,45 +0,0 @@ -#config__manager fieldset { - clear: both; -} - -#config__manager fieldset td { - text-align: right; -} - -#config__manager label { - text-align: right; -} - -#config__manager td.value input.checkbox { - float: right; - padding-left: 0; - padding-right: 0.7em; -} - -#config__manager td.value label { - float: left; -} - -#config__manager td.label { - padding: 0.8em 1em 0.6em 0; -} - -#config__manager td.label span.outkey { - float: right; - margin-right: 1em; -} - -#config__manager td.label label { - clear: right; -} - -#config__manager td.label img { - float: left; -} - -#config__manager .selection { - width: 14.8em; - float: right; - margin: 0 0 2px 0.3em; -} - diff --git a/lib/plugins/config/settings/config.metadata.php b/lib/plugins/config/settings/config.metadata.php index a472a954b32f3034a92dd4e42df8005ad791cfeb..3607f56c6509500ffa24ac00504ed276249d7e0c 100644 --- a/lib/plugins/config/settings/config.metadata.php +++ b/lib/plugins/config/settings/config.metadata.php @@ -104,6 +104,7 @@ $meta['allowdebug'] = array('onoff'); $meta['_display'] = array('fieldset'); $meta['recent'] = array('numeric'); +$meta['recent_days'] = array('numeric'); $meta['breadcrumbs'] = array('numeric','_min' => 0); $meta['youarehere'] = array('onoff'); $meta['fullpath'] = array('onoff'); @@ -118,8 +119,8 @@ $meta['maxseclevel'] = array('multichoice','_choices' => array(0,1,2,3,4,5)); // $meta['camelcase'] = array('onoff'); $meta['deaccent'] = array('multichoice','_choices' => array(0,1,2)); $meta['useheading'] = array('multichoice','_choices' => array(0,'navigation','content',1)); -$meta['refcheck'] = array('onoff'); -$meta['refshow'] = array('numeric'); +$meta['sneaky_index'] = array('onoff'); +$meta['hidepages'] = array('string'); $meta['_authentication'] = array('fieldset'); $meta['useacl'] = array('onoff'); @@ -131,11 +132,9 @@ $meta['superuser'] = array('string'); $meta['manager'] = array('string'); $meta['profileconfirm'] = array('onoff'); $meta['rememberme'] = array('onoff'); -$meta['registernotify'] = array('email'); $meta['disableactions'] = array('disableactions', '_choices' => array('backlink','index','recent','revisions','search','subscription','register','resendpwd','profile','edit','wikicode','check'), '_combine' => array('subscription' => array('subscribe','unsubscribe'), 'wikicode' => array('source','export_raw'))); -$meta['sneaky_index'] = array('onoff'); $meta['auth_security_timeout'] = array('numeric'); $meta['securecookie'] = array('onoff'); $meta['remote'] = array('onoff'); @@ -152,9 +151,6 @@ $meta['_editing'] = array('fieldset'); $meta['usedraft'] = array('onoff'); $meta['htmlok'] = array('onoff'); $meta['phpok'] = array('onoff'); -$meta['notify'] = array('email', '_multiple' => true); -$meta['subscribers'] = array('onoff'); -$meta['subscribe_time'] = array('numeric'); $meta['locktime'] = array('numeric'); $meta['cachetime'] = array('numeric'); @@ -171,6 +167,26 @@ $meta['gdlib'] = array('multichoice','_choices' => array(0,1,2)); $meta['im_convert'] = array('im_convert'); $meta['jpg_quality'] = array('numeric','_pattern' => '/^100$|^[1-9]?[0-9]$/'); //(0-100) $meta['fetchsize'] = array('numeric'); +$meta['refcheck'] = array('onoff'); +$meta['refshow'] = array('numeric'); + +$meta['_notifications'] = array('fieldset'); +$meta['subscribers'] = array('onoff'); +$meta['subscribe_time'] = array('numeric'); +$meta['notify'] = array('email', '_multiple' => true); +$meta['registernotify'] = array('email'); +$meta['mailfrom'] = array('richemail'); +$meta['mailprefix'] = array('string'); +$meta['htmlmail'] = array('onoff'); + +$meta['_syndication'] = array('fieldset'); +$meta['sitemap'] = array('numeric'); +$meta['rss_type'] = array('multichoice','_choices' => array('rss','rss1','rss2','atom','atom1')); +$meta['rss_linkto'] = array('multichoice','_choices' => array('diff','page','rev','current')); +$meta['rss_content'] = array('multichoice','_choices' => array('abstract','diff','htmldiff','html')); +$meta['rss_media'] = array('multichoice','_choices' => array('both','pages','media')); +$meta['rss_update'] = array('numeric'); +$meta['rss_show_summary'] = array('onoff'); $meta['_advanced'] = array('fieldset'); $meta['updatecheck'] = array('onoff'); @@ -180,28 +196,18 @@ $meta['sepchar'] = array('sepchar'); $meta['canonical'] = array('onoff'); $meta['fnencode'] = array('multichoice','_choices' => array('url','safe','utf-8')); $meta['autoplural'] = array('onoff'); -$meta['mailfrom'] = array('richemail'); -$meta['mailprefix'] = array('string'); $meta['compress'] = array('onoff'); $meta['cssdatauri'] = array('numeric','_pattern' => '/^\d+$/'); $meta['gzip_output'] = array('onoff'); -$meta['hidepages'] = array('string'); $meta['send404'] = array('onoff'); $meta['compression'] = array('compression'); -$meta['sitemap'] = array('numeric'); -$meta['rss_type'] = array('multichoice','_choices' => array('rss','rss1','rss2','atom','atom1')); -$meta['rss_linkto'] = array('multichoice','_choices' => array('diff','page','rev','current')); -$meta['rss_content'] = array('multichoice','_choices' => array('abstract','diff','htmldiff','html')); -$meta['rss_media'] = array('multichoice','_choices' => array('both','pages','media')); -$meta['rss_update'] = array('numeric'); -$meta['rss_show_summary'] = array('onoff'); -$meta['recent_days'] = array('numeric'); $meta['broken_iua'] = array('onoff'); $meta['xsendfile'] = array('multichoice','_choices' => array(0,1,2,3)); $meta['renderer_xhtml'] = array('renderer','_format' => 'xhtml','_choices' => array('xhtml')); $meta['readdircache'] = array('numeric'); $meta['_network'] = array('fieldset'); +$meta['dnslookups'] = array('onoff'); $meta['proxy____host'] = array('string','_pattern' => '#^(|[a-z0-9\-\.+]+)$#i'); $meta['proxy____port'] = array('numericopt'); $meta['proxy____user'] = array('string'); diff --git a/lib/plugins/config/style.css b/lib/plugins/config/style.css index 65c44a7585885b6dd30df5510f01cc356df12d7f..1be94feb9299915c2819df55f5f0f79fdfb35847 100644 --- a/lib/plugins/config/style.css +++ b/lib/plugins/config/style.css @@ -15,6 +15,9 @@ color: __text__; padding: 0 1em; } +[dir=rtl] #config__manager fieldset { + clear: both; +} #config__manager legend { font-size: 1.25em; } @@ -28,25 +31,49 @@ #config__manager fieldset td { text-align: left; } +[dir=rtl] #config__manager fieldset td { + text-align: right; +} #config__manager fieldset td.value { /* fixed data column width */ width: 31em; } +[dir=rtl] #config__manager label { + text-align: right; +} +[dir=rtl] #config__manager td.value input.checkbox { + float: right; + padding-left: 0; + padding-right: 0.7em; +} +[dir=rtl] #config__manager td.value label { + float: left; +} + #config__manager td.label { padding: 0.8em 0 0.6em 1em; vertical-align: top; } +[dir=rtl] #config__manager td.label { + padding: 0.8em 1em 0.6em 0; +} #config__manager td.label label { clear: left; display: block; } +[dir=rtl] #config__manager td.label label { + clear: right; +} #config__manager td.label img { padding: 0 10px; vertical-align: middle; float: right; } +[dir=rtl] #config__manager td.label img { + float: left; +} #config__manager td.label span.outkey { font-size: 70%; @@ -60,6 +87,10 @@ position: relative; z-index: 1; } +[dir=rtl] #config__manager td.label span.outkey { + float: right; + margin-right: 1em; +} #config__manager td input.edit { width: 30em; @@ -106,6 +137,11 @@ float: left; margin: 0 0.3em 2px 0; } +[dir=rtl] #config__manager .selection { + width: 14.8em; + float: right; + margin: 0 0 2px 0.3em; +} #config__manager .selection label { float: right; diff --git a/lib/plugins/plugin/lang/ar/lang.php b/lib/plugins/plugin/lang/ar/lang.php index fbc6d3c362fadc9e7adc2ad01f153342e4cc14b8..8327e5ce3d81f9d6683cd050763ebb287b6f7059 100644 --- a/lib/plugins/plugin/lang/ar/lang.php +++ b/lib/plugins/plugin/lang/ar/lang.php @@ -50,3 +50,4 @@ $lang['enabled'] = 'Ø§Ù„Ø§Ø¶Ø§ÙØ© %s ÙÙØ¹Ù„ت. '; $lang['notenabled'] = 'تعذر ØªÙØ¹ÙŠÙ„ Ø§Ù„Ø§Ø¶Ø§ÙØ© %sØŒ تØÙ‚Ù‚ من اذونات الملÙ.'; $lang['disabled'] = 'Ø¹ÙØ·Ù„ت Ø§Ù„Ø¥Ø¶Ø§ÙØ© %s.'; $lang['notdisabled'] = 'تعذر تعطيل Ø§Ù„Ø¥Ø¶Ø§ÙØ© %sØŒ تØÙ‚Ù‚ من اذونات الملÙ.'; +$lang['packageinstalled'] = 'ØØ²Ù…Ø© Ø§Ù„Ø¥Ø¶Ø§ÙØ© (%d plugin(s): %Xs) ثبتت بنجاج.'; diff --git a/lib/plugins/plugin/lang/eo/admin_plugin.txt b/lib/plugins/plugin/lang/eo/admin_plugin.txt index 8cc59843b0dd5ef80666c3ad57af963d9c62dd7e..c97dddf56ea5c48a725514e8675c76eddefa35e7 100644 --- a/lib/plugins/plugin/lang/eo/admin_plugin.txt +++ b/lib/plugins/plugin/lang/eo/admin_plugin.txt @@ -1,3 +1,3 @@ ====== Administrado de Kromaĵoj ====== -En tiu ĉi paÄo vi povas administri ĉion pri DokuWiki-aj [[doku>plugins|kromaĵoj]]. Por sukcesi elÅuti kaj instali kromaĵon, via dosierujo de kromaĵoj devas esti konservebla por la retservilo. +En tiu ĉi paÄo vi povas administri ĉion pri DokuWiki-aj [[doku>plugins|kromaĵoj]]. Por sukcesi elÅuti kaj instali kromaĵon, via dosierujo de kromaĵoj devas esti konservebla por la retservilo. diff --git a/lib/plugins/plugin/lang/eo/lang.php b/lib/plugins/plugin/lang/eo/lang.php index ab9af73e19e042a0db2fa06a0045cf2dc24415e8..36e7eadffb9a5142ba0e0f05594e80f2dbfbaf84 100644 --- a/lib/plugins/plugin/lang/eo/lang.php +++ b/lib/plugins/plugin/lang/eo/lang.php @@ -6,19 +6,17 @@ * @author Felipe Castro <fefcas@gmail.com> * @author Felipe Castro <fefcas (cxe) gmail (punkto) com> * @author Felipo Kastro <fefcas@gmail.com> - * @author Robert Bogenschneider <robog@gmx.de> * @author Erik Pedersen <erik pedersen@shaw.ca> * @author Erik Pedersen <erik.pedersen@shaw.ca> - * @author Robert Bogenschneider <robog@GMX.de> * @author Robert BOGENSCHNEIDER <robog@gmx.de> - * @author Robert BOGENSCHNEIDER <bogi@UEA.org> + * @author Robert Bogenschneider <bogi@uea.org> */ $lang['menu'] = 'Administri Kromaĵojn'; $lang['download'] = 'ElÅuti kaj instali novan kromaĵon'; $lang['manage'] = 'Instalitaj kromaĵoj'; -$lang['btn_info'] = 'info'; -$lang['btn_update'] = 'Äisdatigo'; -$lang['btn_delete'] = 'forigi'; +$lang['btn_info'] = 'Info'; +$lang['btn_update'] = 'Äœisdatigo'; +$lang['btn_delete'] = 'Forigi'; $lang['btn_settings'] = 'agordoj'; $lang['btn_download'] = 'ElÅuti'; $lang['btn_enable'] = 'Konservi'; @@ -29,16 +27,16 @@ $lang['source'] = 'Fonto:'; $lang['unknown'] = 'nekonate'; $lang['updating'] = 'Äœisdatiganta ...'; $lang['updated'] = 'Kromaĵo %s estas sukcese Äisdatigita'; -$lang['updates'] = 'La jenaj kromaĵoj estas sukcese Äisdatigitaj'; +$lang['updates'] = 'Jenaj kromaĵoj estas sukcese Äisdatigitaj'; $lang['update_none'] = 'Neniu Äisdatigo troviÄas.'; $lang['deleting'] = 'Foriganta ...'; $lang['deleted'] = 'Kromaĵo %s estas forigita.'; $lang['downloading'] = 'ElÅutanta ...'; $lang['downloaded'] = 'La kromaĵo %s estas sukcese instalita'; -$lang['downloads'] = 'La jenaj kromaĵoj estas sukcese instalitaj:'; +$lang['downloads'] = 'Jenaj kromaĵoj estas sukcese instalitaj:'; $lang['download_none'] = 'Neniu kromaĵo troveblas, aÅ eble okazis nekonata problemo dum elÅuto kaj instalo.'; $lang['plugin'] = 'Kromaĵo:'; -$lang['components'] = 'Komponeroj'; +$lang['components'] = 'Komponantoj'; $lang['noinfo'] = 'Tiu ĉi kromaĵo liveris neniun informon: eble Äi ne validas.'; $lang['name'] = 'Nomo:'; $lang['date'] = 'Dato:'; @@ -50,11 +48,11 @@ $lang['error'] = 'Nekonata eraro okazis.'; $lang['error_download'] = 'Maleblas elÅuti la kromaĵan dosieron: %s'; $lang['error_badurl'] = 'Suspektinda malbona URL - maleblas difini la dosieran nomon el la URL'; $lang['error_dircreate'] = 'Maleblas krei provizoran dosierujon por ricevi elÅutaĵon'; -$lang['error_decompress'] = 'La administrilo de kromaĵoj ne kapablis malkompakti la elÅutitan dosieron. Tio povas esti pro malkompleta elÅuto, tiaokaze vi devus provi refoje; aÅ eble la kompakta formato ne estas konata, tiaokaze vi bezonos elÅuti kaj instali la kromaĵon permane.'; -$lang['error_copy'] = 'Okazis eraro de dosierkopio dum provo instali dosierojn por la kromaĵo <em>%s</em>: la disko povus esti plenplena aÅ aliro-rajtoj povus esti misdifinitaj. Tio povus rezulti en malkomplete instalita kromaĵo kaj igi vian vikion malstabila.'; -$lang['error_delete'] = 'Okazis eraro dum provo forigi la kromaĵon <em>%s</em>. Plejprobable tio sekvas de nesufiĉa rajto por aliri la dosieron aÅ ties ujon.'; +$lang['error_decompress'] = 'La administrilo de kromaĵoj ne kapablis malkompakti la elÅutitan dosieron. Tio povas esti pro malkompleta elÅuto, tiaokaze provu refoje; aÅ eble la kompakta formato ne estas konata, tiaokaze elÅutu kaj instalu la kromaĵon permane.'; +$lang['error_copy'] = 'Okazis eraro de dosierkopio dum provo instali dosierojn por la kromaĵo <em>%s&</em>: la disko povus esti plenplena aÅ aliro-rajtoj povus esti misdifinitaj. Tio povus rezulti en malkomplete instalita kromaĵo kaj igi vian vikion malstabila.'; +$lang['error_delete'] = 'Okazis eraro dum provo forigi la kromaĵon <em>%s</em>. VerÅajne tio sekvas de nesufiĉa rajto por aliri la dosieron aÅ ties ujon.'; $lang['enabled'] = 'La kromaĵo %s estas ebligita.'; $lang['notenabled'] = 'La kromaĵo %s ne povis esti ebligita, kontrolu dosier-permesojn.'; $lang['disabled'] = 'La kromaĵo %s estas malebligita.'; $lang['notdisabled'] = 'La kromaĵo %s ne povis esti malebligita, kontrolu dosier-permesojn.'; -$lang['packageinstalled'] = 'Kromaĵa pakaĵo (%d kromaĵo(j): %s) sukcese instalitaj.'; +$lang['packageinstalled'] = 'Kromaĵa pakaĵo (%d kromaĵo(j): %s) sukcese instalita.'; diff --git a/lib/plugins/plugin/lang/fr/lang.php b/lib/plugins/plugin/lang/fr/lang.php index bb0b498722bf4d23ccff9ec8fa2019e31f19360b..bf7a3739a23cd3c78a9e7fcceac773bb4e1c8e5e 100644 --- a/lib/plugins/plugin/lang/fr/lang.php +++ b/lib/plugins/plugin/lang/fr/lang.php @@ -17,6 +17,7 @@ * @author Johan Guilbaud <guilbaud.johan@gmail.com> * @author schplurtz@laposte.net * @author skimpax@gmail.com + * @author Yannick Aure <yannick.aure@gmail.com> */ $lang['menu'] = 'Gestion des modules externes'; $lang['download'] = 'Télécharger et installer un nouveau module'; diff --git a/lib/plugins/plugin/lang/it/lang.php b/lib/plugins/plugin/lang/it/lang.php index e675c5530d0515cea2c0fe8d6b3bc7cd88bce332..3994948a041890b038d918776251ab59aa1cafe0 100644 --- a/lib/plugins/plugin/lang/it/lang.php +++ b/lib/plugins/plugin/lang/it/lang.php @@ -13,6 +13,7 @@ * @author robocap <robocap1@gmail.com> * @author Osman Tekin osman.tekin93@hotmail.it * @author Jacopo Corbetta <jacopo.corbetta@gmail.com> + * @author Matteo Pasotti <matteo@xquiet.eu> */ $lang['menu'] = 'Gestione Plugin'; $lang['download'] = 'Scarica e installa un nuovo plugin'; @@ -58,3 +59,4 @@ $lang['enabled'] = 'Plugin %s abilitato.'; $lang['notenabled'] = 'Impossibile abilitare il plugin %s, verifica i permessi dei file.'; $lang['disabled'] = 'Plugin %s disabilitato.'; $lang['notdisabled'] = 'Impossibile disabilitare il plugin %s, verifica i permessi dei file.'; +$lang['packageinstalled'] = 'Pacchetto plugin (%d plugin(s): %s) installato con successo.'; diff --git a/lib/plugins/plugin/lang/ko/admin_plugin.txt b/lib/plugins/plugin/lang/ko/admin_plugin.txt index 22ce0e6e6be3b2d82cc8ca8ff5949d86e66e5a9f..b553d622bd42c4bc7815eb85bd1a537d1afe4615 100644 --- a/lib/plugins/plugin/lang/ko/admin_plugin.txt +++ b/lib/plugins/plugin/lang/ko/admin_plugin.txt @@ -1,5 +1,5 @@ ====== í”ŒëŸ¬ê·¸ì¸ ê´€ë¦¬ ====== -ì´ íŽ˜ì´ì§€ì—서 Dokuwiki[[doku>plugins|plugins]]ì— ê´€ë ¨ëœ ëª¨ë“ ê´€ë¦¬ ìž‘ì—…ì„ í•©ë‹ˆë‹¤. 플러그ì¸ì„ 다운로드하거나 설치하기 위해서 웹서버가 í”ŒëŸ¬ê·¸ì¸ ë””ë ‰í† ë¦¬ì— ëŒ€í•´ 쓰기 ê¶Œí•œì„ ê°€ì§€ê³ ìžˆì–´ì•¼ 합니다. +ì´ íŽ˜ì´ì§€ì—서 Dokuwiki [[doku>plugins|플러그ì¸]]ì— ê´€ë ¨ëœ ëª¨ë“ ê´€ë¦¬ ìž‘ì—…ì„ í•©ë‹ˆë‹¤. 플러그ì¸ì„ 다운로드하거나 설치하기 위해서는 웹 서버가 í”ŒëŸ¬ê·¸ì¸ ë””ë ‰í† ë¦¬ì— ëŒ€í•´ 쓰기 ê¶Œí•œì„ ê°€ì§€ê³ ìžˆì–´ì•¼ 합니다. diff --git a/lib/plugins/plugin/lang/ko/lang.php b/lib/plugins/plugin/lang/ko/lang.php index b15b377a6b9fd46e2d834b8e0150435f310cc998..4fc6fd1d9e22d01820d1e90e8d6da79ce411b235 100644 --- a/lib/plugins/plugin/lang/ko/lang.php +++ b/lib/plugins/plugin/lang/ko/lang.php @@ -9,49 +9,50 @@ * @author SONG Younghwan <purluno@gmail.com> * @author Seung-Chul Yoo <dryoo@live.com> * @author erial2@gmail.com + * @author Myeongjin <aranet100@gmail.com> */ $lang['menu'] = 'í”ŒëŸ¬ê·¸ì¸ ê´€ë¦¬ìž'; -$lang['download'] = '새로운 í”ŒëŸ¬ê·¸ì¸ ë‹¤ìš´ë¡œë“œ ë° ì„¤ì¹˜'; -$lang['manage'] = 'ì´ë¯¸ ì„¤ì¹˜ëœ í”ŒëŸ¬ê·¸ì¸ë“¤'; +$lang['download'] = '새 í”ŒëŸ¬ê·¸ì¸ ë‹¤ìš´ë¡œë“œ ë° ì„¤ì¹˜'; +$lang['manage'] = 'ì´ë¯¸ 설치한 플러그ì¸'; $lang['btn_info'] = 'ì •ë³´'; -$lang['btn_update'] = 'ê°±ì‹ '; +$lang['btn_update'] = 'ì—…ë°ì´íЏ'; $lang['btn_delete'] = 'ì‚ì œ'; $lang['btn_settings'] = 'ì„¤ì •'; $lang['btn_download'] = '다운로드'; $lang['btn_enable'] = 'ì €ìž¥'; $lang['url'] = 'URL'; -$lang['installed'] = '설치ëœ:'; -$lang['lastupdate'] = '가장 ìµœê·¼ì— ê°±ì‹ ëœ:'; -$lang['source'] = '소스:'; -$lang['unknown'] = '알 수 없는'; -$lang['updating'] = 'ê°±ì‹ ì¤‘ ...'; -$lang['updated'] = '%s 플러그ì¸ì´ 성공ì 으로 ê°±ì‹ ë˜ì—ˆìŠµë‹ˆë‹¤.'; -$lang['updates'] = 'ë‹¤ìŒ í”ŒëŸ¬ê·¸ì¸ë“¤ì´ 성공ì 으로 ê°±ì‹ ë˜ì—ˆìŠµë‹ˆë‹¤:'; -$lang['update_none'] = 'ê°±ì‹ ê°€ëŠ¥í•œ 플러그ì¸ì´ 없습니다.'; +$lang['installed'] = '설치ë¨:'; +$lang['lastupdate'] = '가장 ë‚˜ì¤‘ì— ì—…ë°ì´íЏë¨:'; +$lang['source'] = 'ë‚´ìš©:'; +$lang['unknown'] = '알 수 ì—†ìŒ'; +$lang['updating'] = 'ì—…ë°ì´íЏ 중 ...'; +$lang['updated'] = '%s 플러그ì¸ì„ 성공ì 으로 ì—…ë°ì´íŠ¸í–ˆìŠµë‹ˆë‹¤'; +$lang['updates'] = 'ë‹¤ìŒ í”ŒëŸ¬ê·¸ì¸ì„ 성공ì 으로 ì—…ë°ì´íŠ¸í–ˆìŠµë‹ˆë‹¤'; +$lang['update_none'] = 'ì—…ë°ì´íŠ¸ë¥¼ ì°¾ì„ ìˆ˜ 없습니다.'; $lang['deleting'] = 'ì‚ì œ 중 ...'; $lang['deleted'] = '%s 플러그ì¸ì´ ì‚ì œë˜ì—ˆìŠµë‹ˆë‹¤.'; $lang['downloading'] = '다운로드 중 ...'; $lang['downloaded'] = '%s 플러그ì¸ì´ 성공ì 으로 설치ë˜ì—ˆìŠµë‹ˆë‹¤.'; -$lang['downloads'] = 'ë‹¤ìŒ í”ŒëŸ¬ê·¸ì¸ë“¤ì´ 성공ì 으로 설치ë˜ì—ˆìŠµë‹ˆë‹¤:'; -$lang['download_none'] = '플러그ì¸ì´ 없거나 다운로드/설치 ì¤‘ì— ì•Œìˆ˜ 없는 ë¬¸ì œê°€ ë°œìƒí–ˆìŠµë‹ˆë‹¤.'; +$lang['downloads'] = 'ë‹¤ìŒ í”ŒëŸ¬ê·¸ì¸ì´ 성공ì 으로 설치ë˜ì—ˆìŠµë‹ˆë‹¤:'; +$lang['download_none'] = '플러그ì¸ì´ 없거나 다운로드 ë˜ëŠ” 설치 ì¤‘ì— ì•Œ 수 없는 ë¬¸ì œê°€ ë°œìƒí–ˆìŠµë‹ˆë‹¤.'; $lang['plugin'] = '플러그ì¸:'; -$lang['components'] = '콤í¼ë„ŒíŠ¸ë“¤'; -$lang['noinfo'] = 'ì´ í”ŒëŸ¬ê·¸ì¸ì€ ì–´ë–¤ ì •ë³´ë„ ì—†ìŠµë‹ˆë‹¤. ìœ íš¨í•œ 플러그ì¸ì´ ì•„ë‹ ì§€ë„ ëª¨ë¦…ë‹ˆë‹¤.'; +$lang['components'] = '구성 요소'; +$lang['noinfo'] = 'ì´ í”ŒëŸ¬ê·¸ì¸ì€ ì–´ë–¤ ì •ë³´ë„ ì—†ìŠµë‹ˆë‹¤. ìž˜ëª»ëœ í”ŒëŸ¬ê·¸ì¸ì¼ 수 있습니다.'; $lang['name'] = 'ì´ë¦„:'; $lang['date'] = 'ë‚ ì§œ:'; -$lang['type'] = '타입:'; +$lang['type'] = '종류:'; $lang['desc'] = '설명:'; -$lang['author'] = 'ì œìž‘ìž:'; +$lang['author'] = 'ë§Œë“ ì´:'; $lang['www'] = '웹:'; $lang['error'] = '알 수 없는 ë¬¸ì œê°€ ë°œìƒí–ˆìŠµë‹ˆë‹¤.'; $lang['error_download'] = 'í”ŒëŸ¬ê·¸ì¸ íŒŒì¼ì„ 다운로드 í• ìˆ˜ 없습니다: %s'; -$lang['error_badurl'] = 'ìž˜ëª»ëœ URL같습니다. - URLì—서 íŒŒì¼ ì´ë¦„ì„ ì•Œ 수 없습니다.'; +$lang['error_badurl'] = 'ìž˜ëª»ëœ URL 같습니다 - URLì—서 íŒŒì¼ ì´ë¦„ì„ ì•Œ 수 없습니다.'; $lang['error_dircreate'] = '다운로드를 받기 위한 임시 ë””ë ‰í† ë¦¬ë¥¼ 만들 수 없습니다.'; -$lang['error_decompress'] = 'í”ŒëŸ¬ê·¸ì¸ ë§¤ë‹ˆì €ê°€ 다운로드 ë°›ì€ íŒŒì¼ì„ ì••ì¶•í•´ì œí• ìˆ˜ 없습니다.잘못 다운로드 ë°›ì•˜ì„ ìˆ˜ë„ ìžˆìœ¼ë‹ˆ 다시 한번 시ë„해보기 ë°”ëžë‹ˆë‹¤; ì••ì¶• í¬ë§·ì„ 알 수 없는 경우ì—는 다운로드 후 수ë™ìœ¼ë¡œ ì§ì ‘ 설치하기 ë°”ëžë‹ˆë‹¤.'; -$lang['error_copy'] = 'í”ŒëŸ¬ê·¸ì¸ ì„¤ì¹˜í•˜ëŠ” ë™ì•ˆ íŒŒì¼ ë³µì‚¬ ì—러가 ë°œìƒí–ˆìŠµë‹ˆë‹¤. <em>%s</em>: 디스í¬ê°€ 꽉 찼거나 íŒŒì¼ ì ‘ê·¼ ê¶Œí•œì´ ìž˜ëª»ëœ ê²½ìš°ìž…ë‹ˆë‹¤. í”ŒëŸ¬ê·¸ì¸ ì„¤ì¹˜ê°€ 부분ì 으로만 ì´ë£¨ì–´ì¡Œì„ 것입니다.설치가 ë¶ˆì™„ì „í•©ë‹ˆë‹¤.'; -$lang['error_delete'] = '<em>%s</em> í”ŒëŸ¬ê·¸ì¸ ì‚ì œ ë„중 ì—러가 ë°œìƒí–ˆìŠµë‹ˆë‹¤. ëŒ€ë¶€ë¶„ì˜ ê²½ìš°, ë¶ˆì™„ì „í•œ 파ì¼ì´ê±°ë‚˜ ë””ë ‰í† ë¦¬ ì ‘ê·¼ ê¶Œí•œì´ ìž˜ëª»ëœ ê²½ìš°ìž…ë‹ˆë‹¤.'; -$lang['enabled'] = '%s 플러그ì¸ì„ 켰습니다.'; -$lang['notenabled'] = '%s 플러그ì¸ì„ 킬 수 없습니다. íŒŒì¼ ê¶Œí•œì„ í™•ì¸í•˜ì‹ì‹œì˜¤.'; -$lang['disabled'] = '%s 플러그ì¸ì„ ê»ìŠµë‹ˆë‹¤.'; -$lang['notdisabled'] = '%s 플러그ì¸ì„ ëŒ ìˆ˜ 없습니다. íŒŒì¼ ê¶Œí•œì„ í™•ì¸í•˜ì‹ì‹œì˜¤.'; -$lang['packageinstalled'] = 'í”ŒëŸ¬ê·¸ì¸ íŒ¨í‚¤ì§€(%d ê°œì˜ í”ŒëŸ¬ê·¸ì¸: %s)ê°€ 성공ì 으로 설치ë˜ì—ˆìŠµë‹ˆë‹¤.'; +$lang['error_decompress'] = 'í”ŒëŸ¬ê·¸ì¸ ê´€ë¦¬ìžê°€ 다운로드 ë°›ì€ íŒŒì¼ì„ ì••ì¶•ì„ í’€ 수 없습니다. 잘못 다운로드 ë°›ì•˜ì„ ìˆ˜ë„ ìžˆìœ¼ë‹ˆ 다시 한번 시ë„해보기 ë°”ëžë‹ˆë‹¤. ë˜ëŠ” ì••ì¶• í¬ë§·ì„ 알 수 없는 경우ì—는 다운로드한 후 수ë™ìœ¼ë¡œ ì§ì ‘ 설치하기 ë°”ëžë‹ˆë‹¤.'; +$lang['error_copy'] = '플러그ì¸ì„ 설치하는 ë™ì•ˆ íŒŒì¼ ë³µì‚¬í•˜ëŠ” ë° ì˜¤ë¥˜ê°€ ë°œìƒí–ˆìŠµë‹ˆë‹¤. <em>%s</em>: 디스í¬ê°€ 꽉 찼거나 íŒŒì¼ ì ‘ê·¼ ê¶Œí•œì´ ìž˜ëª»ëœ ê²½ìš°ìž…ë‹ˆë‹¤. í”ŒëŸ¬ê·¸ì¸ ì„¤ì¹˜ê°€ 부분ì 으로만 ì´ë£¨ì–´ì¡Œì„ 것입니다. 설치가 ë¶ˆì™„ì „í•©ë‹ˆë‹¤.'; +$lang['error_delete'] = '<em>%s</em> 플러그ì¸ì„ ì‚ì œí•˜ëŠ” ë™ì•ˆ 오류가 ë°œìƒí–ˆìŠµë‹ˆë‹¤. ëŒ€ë¶€ë¶„ì˜ ê²½ìš° ë¶ˆì™„ì „í•œ 파ì¼ì´ê±°ë‚˜ ë””ë ‰í† ë¦¬ ì ‘ê·¼ ê¶Œí•œì´ ìž˜ëª»ëœ ê²½ìš°ìž…ë‹ˆë‹¤.'; +$lang['enabled'] = '%s 플러그ì¸ì„ 활성화했습니다.'; +$lang['notenabled'] = '%s 플러그ì¸ì„ í™œì„±í™”í• ìˆ˜ 없습니다. íŒŒì¼ ê¶Œí•œì„ í™•ì¸í•˜ì‹ì‹œì˜¤.'; +$lang['disabled'] = '%s 플러그ì¸ì„ 비활성화했습니다.'; +$lang['notdisabled'] = '%s 플러그ì¸ì„ ë¹„í™œì„±í™”í• ìˆ˜ 없습니다. íŒŒì¼ ê¶Œí•œì„ í™•ì¸í•˜ì‹ì‹œì˜¤.'; +$lang['packageinstalled'] = 'í”ŒëŸ¬ê·¸ì¸ íŒ¨í‚¤ì§€(í”ŒëŸ¬ê·¸ì¸ %dê°œ: %s)ê°€ 성공ì 으로 설치ë˜ì—ˆìŠµë‹ˆë‹¤.'; diff --git a/lib/plugins/plugin/lang/pl/lang.php b/lib/plugins/plugin/lang/pl/lang.php index 02459f1de04ae226e55c749df9b16d06e4de4b9b..1d3bbbc0316fdacf1e249f4930bf29a84f19608f 100644 --- a/lib/plugins/plugin/lang/pl/lang.php +++ b/lib/plugins/plugin/lang/pl/lang.php @@ -14,6 +14,7 @@ * @author Grzegorz WidÅ‚a <dzesdzes@gmail.com> * @author Åukasz Chmaj <teachmeter@gmail.com> * @author Begina Felicysym <begina.felicysym@wp.eu> + * @author Aoi Karasu <aoikarasu@gmail.com> */ $lang['menu'] = 'Menadżer wtyczek'; $lang['download'] = 'ÅšciÄ…gnij i zainstaluj nowÄ… wtyczkÄ™'; diff --git a/lib/plugins/plugin/lang/ro/lang.php b/lib/plugins/plugin/lang/ro/lang.php index 50f6ca6f622e62fd96047fd6590abe78b086e30e..c57647e0b78ca56072b25c41dc286b46acfc0101 100644 --- a/lib/plugins/plugin/lang/ro/lang.php +++ b/lib/plugins/plugin/lang/ro/lang.php @@ -10,6 +10,7 @@ * @author Emanuel-Emeric Andrasi <em.andrasi@mandrivausers.ro> * @author Marius OLAR <olarmariusalex@gmail.com> * @author Marius Olar <olarmariusalex@yahoo.com> + * @author Emanuel-Emeric AndraÈ™i <em.andrasi@mandrivausers.ro> */ $lang['menu'] = 'Administrează plugin-uri'; $lang['download'] = 'Descarcă ÅŸi instalează un nou plugin'; diff --git a/lib/plugins/plugin/lang/vi/lang.php b/lib/plugins/plugin/lang/vi/lang.php new file mode 100644 index 0000000000000000000000000000000000000000..2933d88752a2d2de929afffb9037ed069e4033a9 --- /dev/null +++ b/lib/plugins/plugin/lang/vi/lang.php @@ -0,0 +1,5 @@ +<?php +/** + * Vietnamese language file + * + */ diff --git a/lib/plugins/plugin/rtl.css b/lib/plugins/plugin/rtl.css deleted file mode 100644 index 6ababd8e08d2913b4cf07dc3572ddde1fc1193a4..0000000000000000000000000000000000000000 --- a/lib/plugins/plugin/rtl.css +++ /dev/null @@ -1,51 +0,0 @@ - -#plugin__manager .pm_menu, -#plugin__manager .pm_info, -#plugin__manager p, -#plugin__manager label { - text-align: right; -} - -#plugin__manager .pm_menu { - float: right; -} - -#plugin__manager .pm_info { - float: left; -} - -#plugin__manager .pm_info dt { - float: right; - clear: right; -} - -#plugin__manager .pm_info dd { - margin: 0 7em 0 0; -} - -#plugin__manager .common fieldset { - text-align: right; -} - - -#plugin__manager .plugins .legend { - text-align: right; - float: right; -} - -#plugin__manager .plugins .enable { - float: right; - margin-right: 0; - margin-left: 0.5em; -} - -#plugin__manager .plugins .button { - float: left; - margin-right: 0.5em; -} - - -#plugin__manager .plugins fieldset.buttons .button { - float: right; -} - diff --git a/lib/plugins/plugin/style.css b/lib/plugins/plugin/style.css index de6cca579cb701dfe88b597f4b6bdbddeda1a658..9433e60011dcd876bef090899dccd38e78c14446 100644 --- a/lib/plugins/plugin/style.css +++ b/lib/plugins/plugin/style.css @@ -52,15 +52,28 @@ text-align: left; } +[dir=rtl] #plugin__manager .pm_menu, +[dir=rtl] #plugin__manager .pm_info, +[dir=rtl] #plugin__manager p, +[dir=rtl] #plugin__manager label { + text-align: right; +} + #plugin__manager .pm_menu { float: left; width: 48%; } +[dir=rtl] #plugin__manager .pm_menu { + float: right; +} #plugin__manager .pm_info { float: right; width: 50%; } +[dir=rtl] #plugin__manager .pm_info { + float: left; +} #plugin__manager .common fieldset { margin: 0; @@ -68,6 +81,9 @@ text-align: left; border: none; } +[dir=rtl] #plugin__manager .common fieldset { + text-align: right; +} #plugin__manager .common label { padding: 0 0 0.5em 0; @@ -111,6 +127,10 @@ padding: 0; clear: none; } +[dir=rtl] #plugin__manager .plugins .legend { + text-align: right; + float: right; +} #plugin__manager .plugins .button { font-size: 95%; @@ -123,6 +143,13 @@ #plugin__manager .plugins fieldset.buttons .button { float: left; } +[dir=rtl] #plugin__manager .plugins .button { + float: left; + margin-right: 0.5em; +} +[dir=rtl] #plugin__manager .plugins fieldset.buttons .button { + float: right; +} #plugin__manager .pm_info h3 { margin-left: 0; @@ -140,17 +167,29 @@ margin: 0; padding: 0; } +[dir=rtl] #plugin__manager .pm_info dt { + float: right; + clear: right; +} #plugin__manager .pm_info dd { margin: 0 0 0 7em; padding: 0; background: none; } +[dir=rtl] #plugin__manager .pm_info dd { + margin: 0 7em 0 0; +} #plugin__manager .plugins .enable { float: left; width: auto; margin-right: 0.5em; } +[dir=rtl] #plugin__manager .plugins .enable { + float: right; + margin-right: 0; + margin-left: 0.5em; +} /* end admin plugin styles */ diff --git a/lib/plugins/popularity/lang/eo/intro.txt b/lib/plugins/popularity/lang/eo/intro.txt index 8d9b3dde808d5d3726748c3b12505fa7e604a977..fd37efc70cc78a77918dc863b6d9e2e79483a5d2 100644 --- a/lib/plugins/popularity/lang/eo/intro.txt +++ b/lib/plugins/popularity/lang/eo/intro.txt @@ -1,9 +1,9 @@ ====== Populareca enketo ====== -Tiu ĉi ilo prenas anoniman datenaron pri via vikio kaj ebligas al vi sendi Äin reen al la kodumantoj de DokuWiki. Tio helpas ke ili komprenu kiel DokuWiki estas uzata kaj certigas ke estontaj disvolviÄaj decidoj estos subtenataj de statistikoj pri reala aplikado. +Tiu ĉi ilo prenas anoniman datenaron pri via vikio kaj ebligas al vi sendi Äin reen al la kodumantoj de DokuWiki. Tio helpas al ili kompreni kiel DokuWiki estas uzata kaj certigas ke estontaj disvolviÄaj decidoj estos subtenataj de statistikoj pri reala aplikado. Ni instigas vin ripeti tiun agon iam kaj tiam por teni la disvolvigantojn informitaj, dum via vikio kreskas. Viaj resendotaj datenaroj estos identigitaj per anonima ID. -La kolektita datenaro enhavas informon pri versio de la instalita DokuWiki, nombro kaj grandeco de la paÄoj kaj dosieroj, instalitaj kromaĵoj kaj informoj pri via PHP-sistemo. +La kolektita datumaro enhavas informon pri versio de la instalita DokuWiki, nombro kaj grandeco de la paÄoj kaj dosieroj, instalitaj kromaĵoj kaj informoj pri via PHP-sistemo. -La kruda datenaro sendota estas montrita sube. Bonvole uzu la butonon "Sendi datumaron" por transÅuti tiun informaron. \ No newline at end of file +La kruda datumaro sendota estas montrita sube. Bonvolu uzi la butonon "Sendi datumaron" por transÅuti tiun informaron. diff --git a/lib/plugins/popularity/lang/eo/lang.php b/lib/plugins/popularity/lang/eo/lang.php index e992e12ce06680f1b92f7f8372a23c2e17c977f4..c2bca23b1f86ac493d03e5d5c9720b4a6e81574f 100644 --- a/lib/plugins/popularity/lang/eo/lang.php +++ b/lib/plugins/popularity/lang/eo/lang.php @@ -7,14 +7,12 @@ * @author Robert Bogenschneider <robog@gmx.de> * @author Erik Pedersen <erik pedersen@shaw.ca> * @author Erik Pedersen <erik.pedersen@shaw.ca> - * @author Robert Bogenschneider <robog@GMX.de> - * @author Robert BOGENSCHNEIDER <robog@gmx.de> - * @author Robert BOGENSCHNEIDER <bogi@UEA.org> + * @author Robert Bogenschneider <bogi@uea.org> */ $lang['name'] = 'Populareca enketo (eble la Åargo prokrastos iomete)'; $lang['submit'] = 'Sendi datumaron'; $lang['autosubmit'] = 'AÅtomate sendi datumaron monate'; -$lang['submissionFailed'] = 'La datumaro ne povis esti sendata pro la jena eraro:'; +$lang['submissionFailed'] = 'La datumaro ne povis esti sendata tial:'; $lang['submitDirectly'] = 'Vi povas sendi vi mem la datumaron per la sekva informilo.'; -$lang['autosubmitError'] = 'La lasta aÅtomata sendo malsukcesis, pro la jena eraro:'; -$lang['lastSent'] = 'La datumaro estas sendita'; +$lang['autosubmitError'] = 'La lasta aÅtomata sendo malsukcesis, tial:'; +$lang['lastSent'] = 'La datumaro sendiÄis'; diff --git a/lib/plugins/popularity/lang/eo/submitted.txt b/lib/plugins/popularity/lang/eo/submitted.txt index c2bce4e9f2248a2d439cc97acedde3597f0e29e2..095439bf339af723d966c08d2c206c1620eff529 100644 --- a/lib/plugins/popularity/lang/eo/submitted.txt +++ b/lib/plugins/popularity/lang/eo/submitted.txt @@ -1,3 +1,3 @@ ====== Enketo pri Populareco ====== -La datumoj estis senditaj sukcese. \ No newline at end of file +La datumoj sendiÄis sukcese. diff --git a/lib/plugins/popularity/lang/fr/lang.php b/lib/plugins/popularity/lang/fr/lang.php index 9ff7a7e8bd771c9c73150c1180590f17cb5945dd..f235fd0fa51bbc635dd60fef4aec414f8c0651e6 100644 --- a/lib/plugins/popularity/lang/fr/lang.php +++ b/lib/plugins/popularity/lang/fr/lang.php @@ -14,6 +14,7 @@ * @author Johan Guilbaud <guilbaud.johan@gmail.com> * @author schplurtz@laposte.net * @author skimpax@gmail.com + * @author Yannick Aure <yannick.aure@gmail.com> */ $lang['name'] = 'Enquête de popularité (peut nécessiter un certain temps pour être chargée)'; $lang['submit'] = 'Envoyer les données'; diff --git a/lib/plugins/popularity/lang/it/lang.php b/lib/plugins/popularity/lang/it/lang.php index a7852f22cf226e9a35dafe64ce779c1471400f0c..9bf4ca8c6452d932b2e90a1f18c5c3a1e62f6612 100644 --- a/lib/plugins/popularity/lang/it/lang.php +++ b/lib/plugins/popularity/lang/it/lang.php @@ -9,6 +9,7 @@ * @author robocap <robocap1@gmail.com> * @author Osman Tekin osman.tekin93@hotmail.it * @author Jacopo Corbetta <jacopo.corbetta@gmail.com> + * @author Matteo Pasotti <matteo@xquiet.eu> */ $lang['name'] = 'Raccolta dati sul wiki (può impiegare del tempo per caricarsi)'; $lang['submit'] = 'Invia dati'; diff --git a/lib/plugins/popularity/lang/ko/intro.txt b/lib/plugins/popularity/lang/ko/intro.txt index e979b71d5b6714d9a3b9f202c9a4834caf3e7d2f..0af7ee2cccd328ce46498736d03603ad4d25395c 100644 --- a/lib/plugins/popularity/lang/ko/intro.txt +++ b/lib/plugins/popularity/lang/ko/intro.txt @@ -1,9 +1,9 @@ ====== ì¸ê¸°ë„ 조사 ====== -ì„¤ì¹˜ëœ ìœ„í‚¤ì˜ ìµëª… ì •ë³´ë¥¼ DokuWiki 개발ìžë“¤ì—게 보냅니다. ì´ ê¸°ëŠ¥ì€ DokuWikiê°€ ì‹¤ì œ 사용ìžë“¤ì—게 어떻게 사용ë˜ëŠ”ì§€ DokuWiki 개발ìžë“¤ì—게 ì•Œë ¤ì¤Œìœ¼ë¡œì¨ ì´ í›„ 개발 시 ì°¸ê³ ê°€ ë©ë‹ˆë‹¤. +ì„¤ì¹˜ëœ ìœ„í‚¤ì˜ ìµëª… ì •ë³´ë¥¼ DokuWiki 개발ìžì—게 보냅니다. ì´ [[doku>popularity|기능]]ì€ DokuWikiê°€ ì‹¤ì œ 사용ìžì—게 어떻게 사용ë˜ëŠ”ì§€ DokuWiki 개발ìžì—게 ì•Œë ¤ì¤Œìœ¼ë¡œì¨ ì´ í›„ 개발 시 ì°¸ê³ ê°€ ë©ë‹ˆë‹¤. ì„¤ì¹˜ëœ ìœ„í‚¤ê°€ 커ì§ì— ë”°ë¼ì„œ ì´ ê³¼ì •ì„ ë°˜ë³µí• í•„ìš”ê°€ 있습니다. ë°˜ë³µëœ ë°ì´íƒ€ëŠ” ìµëª… ID로 구별ë˜ì–´ì§‘니다. -ì „ì†¡ ë°ì´íƒ€ëŠ” 설치 DokuWiki ë²„ì „, 페ì´ì§€ì™€ íŒŒì¼ ìˆ˜, í¬ê¸°, 설치 플러그ì¸, 설치 PHP ì •ë³´ë“±ì„ í¬í•¨í•˜ê³ 있습니다. +ì „ì†¡ ë°ì´íƒ€ëŠ” 설치 DokuWiki ë²„ì „, 문서와 íŒŒì¼ ìˆ˜, í¬ê¸°, 설치 플러그ì¸, 설치 PHP ì •ë³´ë“±ì„ í¬í•¨í•˜ê³ 있습니다. -ì‹¤ì œ 보내질 ìžë£ŒëŠ” 아래와 같습니다. ì •ë³´ë¥¼ ë³´ë‚´ë ¤ë©´ "ìžë£Œ 보내기" ë²„íŠ¼ì„ í´ë¦í•©ë‹ˆë‹¤. +ì‹¤ì œ 보내질 ìžë£ŒëŠ” 아래와 같습니다. ì •ë³´ë¥¼ ë³´ë‚´ë ¤ë©´ "ìžë£Œ 보내기" ë²„íŠ¼ì„ í´ë¦í•©ë‹ˆë‹¤. \ No newline at end of file diff --git a/lib/plugins/popularity/lang/ko/lang.php b/lib/plugins/popularity/lang/ko/lang.php index 01bc51044fcd63bf2e9e0cb57547940dded9ca25..5e6966402a688e20a7a446360cdce74b71796bb5 100644 --- a/lib/plugins/popularity/lang/ko/lang.php +++ b/lib/plugins/popularity/lang/ko/lang.php @@ -8,11 +8,12 @@ * @author SONG Younghwan <purluno@gmail.com> * @author Seung-Chul Yoo <dryoo@live.com> * @author erial2@gmail.com + * @author Myeongjin <aranet100@gmail.com> */ $lang['name'] = 'ì¸ê¸°ë„ 조사 (ë¶ˆëŸ¬ì˜¤ëŠ”ë° ì‹œê°„ì´ ê±¸ë¦´ 수 있습니다.)'; $lang['submit'] = 'ìžë£Œ 보내기'; $lang['autosubmit'] = 'ìžë£Œë¥¼ ìžë™ìœ¼ë¡œ 매달 한번씩 보내기'; -$lang['submissionFailed'] = '다ìŒê³¼ ê°™ì€ ì´ìœ 로 ìžë£Œ ì „ì†¡ì— ì‹¤íŒ¨í–ˆìŠµë‹ˆë‹¤ :'; +$lang['submissionFailed'] = '다ìŒê³¼ ê°™ì€ ì´ìœ 로 ìžë£Œ ì „ì†¡ì— ì‹¤íŒ¨í–ˆìŠµë‹ˆë‹¤:'; $lang['submitDirectly'] = 'ì•„ëž˜ì˜ ì–‘ì‹ì— ë§žì¶° 수ë™ìœ¼ë¡œ ìž‘ì„±ëœ ìžë£Œë¥¼ 보낼 수 있습니다'; -$lang['autosubmitError'] = '다ìŒê³¼ ê°™ì€ ì´ìœ 로 ìžë™ ìžë£Œ ì „ì†¡ì— ì‹¤íŒ¨í–ˆìŠµë‹ˆë‹¤ :'; +$lang['autosubmitError'] = '다ìŒê³¼ ê°™ì€ ì´ìœ 로 ìžë™ ìžë£Œ ì „ì†¡ì— ì‹¤íŒ¨í–ˆìŠµë‹ˆë‹¤:'; $lang['lastSent'] = 'ìžë£Œê°€ ì „ì†¡ë˜ì—ˆìŠµë‹ˆë‹¤'; diff --git a/lib/plugins/popularity/lang/ko/submitted.txt b/lib/plugins/popularity/lang/ko/submitted.txt index e8b434dc502e50ff431f3e57a18f69a1efadbbfb..12f0efe45c220c8cbecafbbf7c923973b3c955f9 100644 --- a/lib/plugins/popularity/lang/ko/submitted.txt +++ b/lib/plugins/popularity/lang/ko/submitted.txt @@ -1,3 +1,3 @@ ====== ì¸ê¸°ë„ 조사 ====== -ìžë£Œ ì „ì†¡ì´ ì„±ê³µì 으로 완료ë˜ì—ˆìŠµë‹ˆë‹¤ \ No newline at end of file +ìžë£Œ ì „ì†¡ì´ ì„±ê³µì 으로 완료ë˜ì—ˆìŠµë‹ˆë‹¤. \ No newline at end of file diff --git a/lib/plugins/popularity/lang/pl/lang.php b/lib/plugins/popularity/lang/pl/lang.php index 64d772d549f529fa4fa06cb79ba3a59d4f893cf8..76a9464bd7a18df6ce0bb2c2e1e563bcf010b08f 100644 --- a/lib/plugins/popularity/lang/pl/lang.php +++ b/lib/plugins/popularity/lang/pl/lang.php @@ -12,6 +12,7 @@ * @author Grzegorz WidÅ‚a <dzesdzes@gmail.com> * @author Åukasz Chmaj <teachmeter@gmail.com> * @author Begina Felicysym <begina.felicysym@wp.eu> + * @author Aoi Karasu <aoikarasu@gmail.com> */ $lang['name'] = 'Informacja o popularnoÅ›ci (Å‚adowanie może zająć dÅ‚uższÄ… chwilÄ™)'; $lang['submit'] = 'WyÅ›lij dane'; diff --git a/lib/plugins/popularity/lang/ro/lang.php b/lib/plugins/popularity/lang/ro/lang.php index 9e9086b0d2c0476a601375685dca5033ae83226c..8ba119dcbeede7baf2a7acb72b7881f4d061bd81 100644 --- a/lib/plugins/popularity/lang/ro/lang.php +++ b/lib/plugins/popularity/lang/ro/lang.php @@ -8,6 +8,7 @@ * @author Emanuel-Emeric Andrasi <em.andrasi@mandrivausers.ro> * @author Marius OLAR <olarmariusalex@gmail.com> * @author Marius Olar <olarmariusalex@yahoo.com> + * @author Emanuel-Emeric AndraÈ™i <em.andrasi@mandrivausers.ro> */ $lang['name'] = 'Feedback de popularitate (încărcarea poate dura mai mult)'; $lang['submit'] = 'Trimite datele'; diff --git a/lib/plugins/popularity/lang/vi/lang.php b/lib/plugins/popularity/lang/vi/lang.php new file mode 100644 index 0000000000000000000000000000000000000000..2933d88752a2d2de929afffb9037ed069e4033a9 --- /dev/null +++ b/lib/plugins/popularity/lang/vi/lang.php @@ -0,0 +1,5 @@ +<?php +/** + * Vietnamese language file + * + */ diff --git a/lib/plugins/revert/lang/eo/lang.php b/lib/plugins/revert/lang/eo/lang.php index a893fb145562b9b0284b00a50b35e01c7d0dbaa2..05eec26a8e55a675ea7a4cb8ae98a0091589a4c3 100644 --- a/lib/plugins/revert/lang/eo/lang.php +++ b/lib/plugins/revert/lang/eo/lang.php @@ -9,16 +9,14 @@ * @author Robert Bogenschneider <robog@gmx.de> * @author Erik Pedersen <erik pedersen@shaw.ca> * @author Erik Pedersen <erik.pedersen@shaw.ca> - * @author Robert Bogenschneider <robog@GMX.de> - * @author Robert BOGENSCHNEIDER <robog@gmx.de> - * @author Robert BOGENSCHNEIDER <bogi@UEA.org> + * @author Robert Bogenschneider <bogi@uea.org> */ $lang['menu'] = 'Administrado de restarigo'; $lang['filter'] = 'Serĉi spamecajn paÄojn'; $lang['revert'] = 'Restarigi la elektitajn paÄojn'; $lang['reverted'] = '%s estas restarigita al revizio %s'; $lang['removed'] = '%s estas forigita'; -$lang['revstart'] = 'Restariga procezo estas ekigita. Tio povas daÅri longan tempon. Se la skripto tro prokrastos antaÅ plenumo, vi bezonos restarigi po pli etaj blokoj.'; +$lang['revstart'] = 'Restariga procezo ekis. Tio povas daÅri longan tempon. Se la skripto tro prokrastos antaÅ plenumo, vi restarigu po pli etaj blokoj.'; $lang['revstop'] = 'Restariga procezo plenumiÄis sukcese.'; $lang['note1'] = 'Rimarko: tiu ĉi serĉo distingas usklecon'; -$lang['note2'] = 'Rimarko: la paÄo restariÄos al la lasta versio ne enhavanta la menditan spaman terminon <i>%s</i>.'; +$lang['note2'] = 'Rimarko: la paÄo restariÄos al la lasta versio ne enhavanta la menditan spaman terminon <i>%s</i>.'; diff --git a/lib/plugins/revert/lang/fr/lang.php b/lib/plugins/revert/lang/fr/lang.php index 9c5194b3181d0a20c5ad7760d39c7919c60c1815..75c8bab688005863795013e22f535fe05158d717 100644 --- a/lib/plugins/revert/lang/fr/lang.php +++ b/lib/plugins/revert/lang/fr/lang.php @@ -15,6 +15,7 @@ * @author Johan Guilbaud <guilbaud.johan@gmail.com> * @author schplurtz@laposte.net * @author skimpax@gmail.com + * @author Yannick Aure <yannick.aure@gmail.com> */ $lang['menu'] = 'Gestionnaire de réversions'; $lang['filter'] = 'Trouver les pages spammées '; diff --git a/lib/plugins/revert/lang/it/lang.php b/lib/plugins/revert/lang/it/lang.php index 79565655bf1ff70f61f9bd4d0b8b6b1e6cd6426a..a0b676d77393928662941b36b89aa6dfbb466dcb 100644 --- a/lib/plugins/revert/lang/it/lang.php +++ b/lib/plugins/revert/lang/it/lang.php @@ -10,6 +10,7 @@ * @author robocap <robocap1@gmail.com> * @author Osman Tekin osman.tekin93@hotmail.it * @author Jacopo Corbetta <jacopo.corbetta@gmail.com> + * @author Matteo Pasotti <matteo@xquiet.eu> */ $lang['menu'] = 'Gestore di ripristini'; $lang['filter'] = 'Cerca pagine con spam'; diff --git a/lib/plugins/revert/lang/ko/intro.txt b/lib/plugins/revert/lang/ko/intro.txt index a0164dc4f58e0d1d7b6013dc05fd16ddbe4ba0c5..30813fe49d7758162e1a8c4acf6954a0390a6886 100644 --- a/lib/plugins/revert/lang/ko/intro.txt +++ b/lib/plugins/revert/lang/ko/intro.txt @@ -1,3 +1,3 @@ ====== 복구 ê´€ë¦¬ìž ====== -스팸 공격으로 부터 ìžë™ìœ¼ë¡œ ë³µêµ¬í•˜ëŠ”ë° ì´íŽ˜ì´ì§€ëŠ” ë„ì›€ì´ ë 수 있습니다. 스팸 ê³µê²©ë°›ì€ íŽ˜ì´ì§€ 목ë¡ì„ ì°¾ìœ¼ë ¤ë©´ 문ìžì—´ì„ ìž…ë ¥í•˜ê¸° ë°”ëžë‹ˆë‹¤(예. 스팸 URL), ê·¸ 후 ê²€ìƒ‰ëœ íŽ˜ì´ì§€ë“¤ì´ 스팸 공격받았는지 확ì¸í•˜ê³ 복구합니다. +스팸 공격으로 부터 ìžë™ìœ¼ë¡œ ë³µêµ¬í•˜ëŠ”ë° ì´ íŽ˜ì´ì§€ê°€ ë„ì›€ì´ ë 수 있습니다. 스팸 ê³µê²©ë°›ì€ ë¬¸ì„œ 목ë¡ì„ ì°¾ìœ¼ë ¤ë©´ 문ìžì—´ì„ ìž…ë ¥í•˜ê¸° ë°”ëžë‹ˆë‹¤ (예를 들어 스팸 URL), ê·¸ 후 ì°¾ì€ ë¬¸ì„œê°€ 스팸 ê³µê²©ì„ ë°›ì•˜ëŠ”ì§€ 확ì¸í•˜ê³ 복구합니다. diff --git a/lib/plugins/revert/lang/ko/lang.php b/lib/plugins/revert/lang/ko/lang.php index da689c788d6e6cd650cf0c89072fdb6a252ec7b4..90cba9bcef9cb330a5f944486716026d3234dbfc 100644 --- a/lib/plugins/revert/lang/ko/lang.php +++ b/lib/plugins/revert/lang/ko/lang.php @@ -8,13 +8,14 @@ * @author SONG Younghwan <purluno@gmail.com> * @author Seung-Chul Yoo <dryoo@live.com> * @author erial2@gmail.com + * @author Myeongjin <aranet100@gmail.com> */ $lang['menu'] = '복구 관리ìž'; -$lang['filter'] = '스팸 페ì´ì§€ 검색 '; -$lang['revert'] = 'ì„ íƒ íŽ˜ì´ì§€ë“¤ 복구'; -$lang['reverted'] = '%s를 ì´ì „ ë²„ì „ %s 으로 복구'; +$lang['filter'] = '스팸 문서 찾기'; +$lang['revert'] = 'ì„ íƒí•œ 문서 복구'; +$lang['reverted'] = '%s ë²„ì „ì„ %s ë²„ì „ìœ¼ë¡œ 복구'; $lang['removed'] = '%s ì‚ì œ'; -$lang['revstart'] = '복구 ìž‘ì—…ì„ ì‹œìž‘í•©ë‹ˆë‹¤. 오랜 ì‹œê°„ì´ ê±¸ë¦´ 수 있습니다. 완료ë˜ê¸° ì „ì— ìŠ¤í¬ë¦½íЏ time outì´ ë°œìƒí•œë‹¤ë©´ ë” ìž‘ì€ ìž‘ì—…ë“¤ë¡œ 나누어서 복구하기 ë°”ëžë‹ˆë‹¤. '; +$lang['revstart'] = '복구 ìž‘ì—…ì„ ì‹œìž‘í•©ë‹ˆë‹¤. 오랜 ì‹œê°„ì´ ê±¸ë¦´ 수 있습니다. 완료ë˜ê¸° ì „ì— ìŠ¤í¬ë¦½íЏ 시간 초과가 ë°œìƒí•œë‹¤ë©´ ë” ìž‘ì€ ìž‘ì—…ìœ¼ë¡œ 나누어서 복구하기 ë°”ëžë‹ˆë‹¤.'; $lang['revstop'] = '복구 ìž‘ì—…ì´ ì„±ê³µì 으로 ë났습니다.'; -$lang['note1'] = '주ì˜: ëŒ€ì†Œë¬¸ìž êµ¬ë³„í•˜ì—¬ 검색합니다.'; -$lang['note2'] = '주ì˜: ì´ íŽ˜ì´ì§€ëŠ” 스팸 단어 <i>%s</i>를 í¬í•¨í•˜ì§€ ì•Šì€ ê°€ìž¥ 최근 과거 문서 ë²„ì „ìœ¼ë¡œ 복구ë©ë‹ˆë‹¤. '; +$lang['note1'] = 'ì°¸ê³ : ëŒ€ì†Œë¬¸ìž êµ¬ë³„í•˜ì—¬ 찾습니다.'; +$lang['note2'] = 'ì°¸ê³ : ì´ ë¬¸ì„œëŠ” <i>%s</i> 스팸 단어를 í¬í•¨í•˜ì§€ ì•Šì€ ìµœê·¼ ì´ì „ ë²„ì „ìœ¼ë¡œ 복구ë©ë‹ˆë‹¤. '; diff --git a/lib/plugins/revert/lang/pl/lang.php b/lib/plugins/revert/lang/pl/lang.php index 30ab60fda091edeab05d49ef7f1a64abb7726e68..462841292bf79341e507b0a13ec96eaf9521da3d 100644 --- a/lib/plugins/revert/lang/pl/lang.php +++ b/lib/plugins/revert/lang/pl/lang.php @@ -11,6 +11,7 @@ * @author Grzegorz WidÅ‚a <dzesdzes@gmail.com> * @author Åukasz Chmaj <teachmeter@gmail.com> * @author Begina Felicysym <begina.felicysym@wp.eu> + * @author Aoi Karasu <aoikarasu@gmail.com> */ $lang['menu'] = 'Menadżer przywracania'; $lang['filter'] = 'Wyszukaj uszkodzone strony'; diff --git a/lib/plugins/revert/lang/ro/lang.php b/lib/plugins/revert/lang/ro/lang.php index f1fcf727caf3b565206ac5cd4cb52dba37a662e7..5ea802575ebf271e569da072411197c03d255e8c 100644 --- a/lib/plugins/revert/lang/ro/lang.php +++ b/lib/plugins/revert/lang/ro/lang.php @@ -10,6 +10,7 @@ * @author Emanuel-Emeric Andrasi <em.andrasi@mandrivausers.ro> * @author Marius OLAR <olarmariusalex@gmail.com> * @author Marius Olar <olarmariusalex@yahoo.com> + * @author Emanuel-Emeric AndraÈ™i <em.andrasi@mandrivausers.ro> */ $lang['menu'] = 'Manager Reveniri'; $lang['filter'] = 'Caută pagini cu posibil spam'; diff --git a/lib/plugins/revert/lang/vi/lang.php b/lib/plugins/revert/lang/vi/lang.php new file mode 100644 index 0000000000000000000000000000000000000000..2933d88752a2d2de929afffb9037ed069e4033a9 --- /dev/null +++ b/lib/plugins/revert/lang/vi/lang.php @@ -0,0 +1,5 @@ +<?php +/** + * Vietnamese language file + * + */ diff --git a/lib/plugins/testing/_test/dummy_plugin_integration_test.test.php b/lib/plugins/testing/_test/dummy_plugin_integration_test.test.php new file mode 100644 index 0000000000000000000000000000000000000000..5982c693357073f619bab9bec549c263275a4d4e --- /dev/null +++ b/lib/plugins/testing/_test/dummy_plugin_integration_test.test.php @@ -0,0 +1,32 @@ +<?php + +/** + * @group integration + */ +class TestingDummyPluginIntegrationTest extends DokuWikiTest { + + function setUp() { + $this->pluginsEnabled = array( + 'testing' + ); + + parent::setUp(); + } + + function testTestingPluginEnabled() { + global $EVENT_HANDLER; + + $request = new TestRequest(); + $hookTriggered = false; + + $EVENT_HANDLER->register_hook('TESTING_PLUGIN_INSTALLED', 'AFTER', null, + function() use (&$hookTriggered) { + $hookTriggered = true; + } + ); + + $request->execute(); + + $this->assertTrue($hookTriggered, 'Testing plugin did not trigger!'); + } +} diff --git a/lib/plugins/testing/_test/dummy_plugin_test.test.php b/lib/plugins/testing/_test/dummy_plugin_test.test.php new file mode 100644 index 0000000000000000000000000000000000000000..eee825fbdef96a8569ee9bbadbf98fe28e84339a --- /dev/null +++ b/lib/plugins/testing/_test/dummy_plugin_test.test.php @@ -0,0 +1,9 @@ +<?php + +class TestingDummyPluginTest extends DokuWikiTest { + + function testNothing() { + $this->assertTrue(true, 'wow, you really fucked up'); + } + +} diff --git a/lib/plugins/testing/action.php b/lib/plugins/testing/action.php new file mode 100644 index 0000000000000000000000000000000000000000..e829847b6b2924fd23038fd9021e058837865be2 --- /dev/null +++ b/lib/plugins/testing/action.php @@ -0,0 +1,19 @@ +<?php +/** + * Plugin for testing the test system + * + * This plugin doesn't really do anything and should always be disabled + * + * @author Tobias Sarnowski <tobias@trustedco.de> + */ +class action_plugin_testing extends DokuWiki_Action_Plugin { + function register(&$controller) { + $controller->register_hook('DOKUWIKI_STARTED', 'AFTER', $this, 'dokuwikiStarted'); + } + + function dokuwikiStarted() { + $param = array(); + trigger_event('TESTING_PLUGIN_INSTALLED', $param); + msg('The testing plugin is enabled and should be disabled.',-1); + } +} diff --git a/lib/plugins/testing/plugin.info.txt b/lib/plugins/testing/plugin.info.txt new file mode 100644 index 0000000000000000000000000000000000000000..a514d77744ab4e295fa4671e13f872f26b183c5c --- /dev/null +++ b/lib/plugins/testing/plugin.info.txt @@ -0,0 +1,6 @@ +base testing +author Tobias Sarnowski +email tobias@trustedco.de +date 2012-04-24 +name Testing Plugin +desc Used to test the test framework. Should always be disabled. diff --git a/lib/plugins/usermanager/lang/eo/intro.txt b/lib/plugins/usermanager/lang/eo/intro.txt index 2ef373f661bacfb12d4ce646031d5ddce7f80e84..5b5a940012e3705f6efb0cc05d7db41d29b2f8c2 100644 --- a/lib/plugins/usermanager/lang/eo/intro.txt +++ b/lib/plugins/usermanager/lang/eo/intro.txt @@ -1 +1 @@ -====== Administrado de Uzantoj ====== \ No newline at end of file +====== Administrado de uzantoj ====== diff --git a/lib/plugins/usermanager/lang/eo/lang.php b/lib/plugins/usermanager/lang/eo/lang.php index b5f1abc0eecd2e33b51bcf33aa44510565487a57..75782fe23c196f41037c23b1b9694d144966e4b9 100644 --- a/lib/plugins/usermanager/lang/eo/lang.php +++ b/lib/plugins/usermanager/lang/eo/lang.php @@ -9,9 +9,7 @@ * @author Robert Bogenschneider <robog@gmx.de> * @author Erik Pedersen <erik pedersen@shaw.ca> * @author Erik Pedersen <erik.pedersen@shaw.ca> - * @author Robert Bogenschneider <robog@GMX.de> - * @author Robert BOGENSCHNEIDER <robog@gmx.de> - * @author Robert BOGENSCHNEIDER <bogi@UEA.org> + * @author Robert Bogenschneider <bogi@uea.org> */ $lang['menu'] = 'Administrado de uzantoj'; $lang['noauth'] = '(identiÄo de uzantoj ne disponeblas)'; @@ -20,7 +18,7 @@ $lang['badauth'] = 'tiu identiÄa procezo ne validas'; $lang['user_id'] = 'Uzanto'; $lang['user_pass'] = 'Pasvorto'; $lang['user_name'] = 'Vera nomo'; -$lang['user_mail'] = 'Retadreso'; +$lang['user_mail'] = 'RetpoÅtadreso'; $lang['user_groups'] = 'Grupoj'; $lang['field'] = 'Kampo'; $lang['value'] = 'Valoro'; @@ -35,22 +33,22 @@ $lang['search_prompt'] = 'Fari serĉon'; $lang['clear'] = 'Refari serĉan filtron'; $lang['filter'] = 'Filtro'; $lang['summary'] = 'MontriÄas uzantoj %1$d-%2$d el %3$d trovitaj. %4$d uzantoj entute.'; -$lang['nonefound'] = 'Neniu uzantoj troviÄas. %d uzantoj entute.'; -$lang['delete_ok'] = '%d uzantoj estis forigitaj'; +$lang['nonefound'] = 'Neniuj uzantoj troviÄas. %d uzantoj entute.'; +$lang['delete_ok'] = '%d uzantoj forigiÄis'; $lang['delete_fail'] = '%d malsukcesis esti forigitaj.'; -$lang['update_ok'] = 'Tiu uzanto estis sukcese Äisdatigita'; +$lang['update_ok'] = 'Tiu uzanto sukcese ÄisdatiÄis'; $lang['update_fail'] = 'Malsukceso okazis por Äisdatigi tiun uzanton'; $lang['update_exists'] = 'Malsukceso okazis por ÅanÄi la nomon de tiu uzanto: la enmetita nomo (%s) jam ekzistas (ĉiuj aliaj ÅanÄoj estos aplikitaj)'; $lang['start'] = 'Ekigi'; $lang['prev'] = 'antaÅe'; $lang['next'] = 'sekve'; $lang['last'] = 'laste'; -$lang['edit_usermissing'] = 'La elektita uzanto ne estis trovita: tiu nomo povis esti forigita aÅ ÅanÄita aliloke.'; +$lang['edit_usermissing'] = 'La elektita uzanto ne troviÄis: tiu nomo povis esti forigita aÅ ÅanÄita aliloke.'; $lang['user_notify'] = 'Avizi uzanton'; $lang['note_notify'] = 'Avizantaj mesaÄoj estos sendataj nur se la uzanto ekhavos novan pasvorton.'; $lang['note_group'] = 'Novaj uzantoj estos aldonitaj al la komuna grupo (%s) se neniu alia estos specifita.'; -$lang['note_pass'] = 'La pasvorto estos aÅtomate kreita se la kampo estos lasita malplena kaj \'aviso al uzantoj\' estos ebligita.'; -$lang['add_ok'] = 'La uzanto estis sukcese aldonita'; -$lang['add_fail'] = 'Malsukceso okazis por aldoni uzulon'; -$lang['notify_ok'] = 'Avizanta mesaÄo estis sendita'; +$lang['note_pass'] = 'La pasvorto estos aÅtomate kreita se la kampo estos lasita malplena kaj \'avizo al uzantoj\' estos ebligita.'; +$lang['add_ok'] = 'La uzanto sukcese aldoniÄis'; +$lang['add_fail'] = 'Ne eblis aldoni uzanton'; +$lang['notify_ok'] = 'Avizanta mesaÄo sendiÄis'; $lang['notify_fail'] = 'La avizanta mesaÄo ne povis esti sendita'; diff --git a/lib/plugins/usermanager/lang/eo/list.txt b/lib/plugins/usermanager/lang/eo/list.txt index 714671afb166b031eb8e0a7f8b0b69c722badc44..5be7222a9c19a3f1ac96b669d986ad11387f8f44 100644 --- a/lib/plugins/usermanager/lang/eo/list.txt +++ b/lib/plugins/usermanager/lang/eo/list.txt @@ -1 +1 @@ -===== Listo de Uzantoj ===== \ No newline at end of file +===== Listo de uzantoj ===== diff --git a/lib/plugins/usermanager/lang/fr/lang.php b/lib/plugins/usermanager/lang/fr/lang.php index 948262a8f043a78631b2bf516daaba8e337262eb..882312820b477ca880cee59747fc5c5b7a503176 100644 --- a/lib/plugins/usermanager/lang/fr/lang.php +++ b/lib/plugins/usermanager/lang/fr/lang.php @@ -16,6 +16,7 @@ * @author Johan Guilbaud <guilbaud.johan@gmail.com> * @author schplurtz@laposte.net * @author skimpax@gmail.com + * @author Yannick Aure <yannick.aure@gmail.com> */ $lang['menu'] = 'Gestion des utilisateurs'; $lang['noauth'] = '(authentification utilisateur non disponible)'; diff --git a/lib/plugins/usermanager/lang/it/lang.php b/lib/plugins/usermanager/lang/it/lang.php index 34c510def6520a5e49d9facfdecf3e1e40e3f52e..1e948baab24f376894119bd4cfd4486fb74428ad 100644 --- a/lib/plugins/usermanager/lang/it/lang.php +++ b/lib/plugins/usermanager/lang/it/lang.php @@ -12,6 +12,7 @@ * @author robocap <robocap1@gmail.com> * @author Osman Tekin osman.tekin93@hotmail.it * @author Jacopo Corbetta <jacopo.corbetta@gmail.com> + * @author Matteo Pasotti <matteo@xquiet.eu> */ $lang['menu'] = 'Gestione Utenti'; $lang['noauth'] = '(autenticazione non disponibile)'; diff --git a/lib/plugins/usermanager/lang/ko/lang.php b/lib/plugins/usermanager/lang/ko/lang.php index 111267e5f862fda2a8b840f77840ba235390940e..3754fea909ce159bfe313c92ade9679944bbf9c4 100644 --- a/lib/plugins/usermanager/lang/ko/lang.php +++ b/lib/plugins/usermanager/lang/ko/lang.php @@ -8,44 +8,45 @@ * @author SONG Younghwan <purluno@gmail.com> * @author Seung-Chul Yoo <dryoo@live.com> * @author erial2@gmail.com + * @author Myeongjin <aranet100@gmail.com> */ $lang['menu'] = 'ì‚¬ìš©ìž ê´€ë¦¬ìž'; $lang['noauth'] = '(ì‚¬ìš©ìž ì¸ì¦ì´ 불가능합니다.)'; $lang['nosupport'] = '(ì‚¬ìš©ìž ê´€ë¦¬ê°€ ì§€ì›ë˜ì§€ 않습니다.)'; -$lang['badauth'] = 'ìœ íš¨í•˜ì§€ ì•Šì€ ì¸ì¦ 메카니즘입니다.'; +$lang['badauth'] = 'ìž˜ëª»ëœ ì¸ì¦ 메카니즘'; $lang['user_id'] = '사용ìž'; -$lang['user_pass'] = '패스워드'; +$lang['user_pass'] = '비밀번호'; $lang['user_name'] = 'ì‹¤ì œ ì´ë¦„'; $lang['user_mail'] = 'ì´ë©”ì¼ '; -$lang['user_groups'] = '그룹들'; +$lang['user_groups'] = '그룹'; $lang['field'] = 'í•목'; $lang['value'] = 'ê°’'; $lang['add'] = '추가'; $lang['delete'] = 'ì‚ì œ'; -$lang['delete_selected'] = 'ì‚ì œ ì„ íƒ'; +$lang['delete_selected'] = 'ì„ íƒ ì‚ì œ'; $lang['edit'] = 'ìˆ˜ì •'; $lang['edit_prompt'] = 'ì´ ì‚¬ìš©ìž ìˆ˜ì •'; -$lang['modify'] = '변경 ì €ìž¥'; -$lang['search'] = '검색'; -$lang['search_prompt'] = '검색 실행'; -$lang['clear'] = '검색 í•„í„° 초기화'; +$lang['modify'] = '바뀜 ì €ìž¥'; +$lang['search'] = '찾기'; +$lang['search_prompt'] = '찾기 실행'; +$lang['clear'] = '찾기 í•„í„° 초기화'; $lang['filter'] = 'í•„í„°'; -$lang['summary'] = 'ê²€ìƒ‰ëœ ì‚¬ìš©ìžë“¤ 보기(%1$d-%2$d 중 %3$d). ì „ì²´ ì‚¬ìš©ìž %4$d 명.'; -$lang['nonefound'] = 'ê²€ìƒ‰ëœ ì‚¬ìš©ìžê°€ 없습니다. ì „ì²´ ì‚¬ìš©ìž %d 명.'; -$lang['delete_ok'] = '%d ëª…ì˜ ì‚¬ìš©ìžê°€ ì‚ì œë˜ì—ˆìŠµë‹ˆë‹¤.'; -$lang['delete_fail'] = '%d ëª…ì˜ ì‚¬ìš©ìžì˜ ì‚ì œê°€ 실패했습니다.'; -$lang['update_ok'] = 'ì‚¬ìš©ìž ê°±ì‹ ì´ ì„±ê³µí–ˆìŠµë‹ˆë‹¤.'; -$lang['update_fail'] = 'ì‚¬ìš©ìž ê°±ì‹ ì´ ì‹¤íŒ¨í–ˆìŠµë‹ˆë‹¤.'; -$lang['update_exists'] = 'ì‚¬ìš©ìž ì´ë¦„ ë³€ê²½ì´ ì‹¤íŒ¨í–ˆìŠµë‹ˆë‹¤. ì‚¬ìš©ìž ì´ë¦„(%s)ì´ ì´ë¯¸ 존재합니다. (다른 í•ëª©ë“¤ì˜ ë³€ê²½ì€ ì ìš©ë©ë‹ˆë‹¤.)'; +$lang['summary'] = 'ì°¾ì€ ì‚¬ìš©ìž %3$d 중 %1$d-%2$d 보기. ì „ì²´ ì‚¬ìš©ìž %4$d명.'; +$lang['nonefound'] = 'ì°¾ì€ ì‚¬ìš©ìžê°€ 없습니다. ì „ì²´ ì‚¬ìš©ìž %d명.'; +$lang['delete_ok'] = 'ì‚¬ìš©ìž %dëª…ì´ ì‚ì œë˜ì—ˆìŠµë‹ˆë‹¤'; +$lang['delete_fail'] = 'ì‚¬ìš©ìž %dëª…ì˜ ì‚ì œê°€ 실패했습니다.'; +$lang['update_ok'] = 'ì‚¬ìš©ìž ë³€ê²½ì„ ì„±ê³µí–ˆìŠµë‹ˆë‹¤.'; +$lang['update_fail'] = 'ì‚¬ìš©ìž ë³€ê²½ì„ ì‹¤íŒ¨í–ˆìŠµë‹ˆë‹¤.'; +$lang['update_exists'] = 'ì‚¬ìš©ìž ì´ë¦„ ë³€ê²½ì´ ì‹¤íŒ¨í–ˆìŠµë‹ˆë‹¤. ì‚¬ìš©ìž ì´ë¦„(%s)ì´ ì´ë¯¸ 존재합니다. (다른 í•ëª©ì˜ ë°”ë€œì€ ì ìš©ë©ë‹ˆë‹¤.)'; $lang['start'] = '시작'; $lang['prev'] = 'ì´ì „'; $lang['next'] = '다ìŒ'; $lang['last'] = '마지막'; -$lang['edit_usermissing'] = 'ì„ íƒëœ 사용ìžë¥¼ ì°¾ì„ ìˆ˜ 없습니다, ì‚¬ìš©ìž ì´ë¦„ì´ ì‚ì œë˜ê±°ë‚˜ 변경ëì„ ìˆ˜ë„ ìžˆìŠµë‹ˆë‹¤.'; +$lang['edit_usermissing'] = 'ì„ íƒëœ 사용ìžë¥¼ ì°¾ì„ ìˆ˜ 없습니다. ì‚¬ìš©ìž ì´ë¦„ì´ ì‚ì œë˜ê±°ë‚˜ 변경ëì„ ìˆ˜ë„ ìžˆìŠµë‹ˆë‹¤.'; $lang['user_notify'] = '사용ìžì—게 알림'; -$lang['note_notify'] = '사용ìžì—게 새로운 암호를 준 경우ì—ë§Œ 알림 ì´ë©”ì¼ì´ 보내집니다.'; -$lang['note_group'] = '새로운 사용ìžë“¤ì€ ì–´ë–¤ ê·¸ë£¹ë„ ì„¤ì •í•˜ì§€ ì•Šì€ ê²½ìš°ì— ê¸°ë³¸ 그룹(%s)ì— ì¶”ê°€ë©ë‹ˆë‹¤.'; -$lang['note_pass'] = 'ì‚¬ìš©ìž í†µì§€ê°€ ì§€ì •ë˜ì–´ 있ì„때, í•„ë“œì— ì•„ë¬´ê°’ë„ ìž…ë ¥í•˜ì§€ 않으면 암호가 ìžë™ ìƒì„± ë©ë‹ˆë‹¤.'; +$lang['note_notify'] = '사용ìžì—게 새로운 비밀번호를 준 경우ì—ë§Œ 알림 ì´ë©”ì¼ì´ 보내집니다.'; +$lang['note_group'] = '새로운 사용ìžëŠ” ì–´ë–¤ ê·¸ë£¹ë„ ì„¤ì •í•˜ì§€ ì•Šì€ ê²½ìš°ì— ê¸°ë³¸ 그룹(%s)ì— ì¶”ê°€ë©ë‹ˆë‹¤.'; +$lang['note_pass'] = 'ì‚¬ìš©ìž í†µì§€ê°€ ì§€ì •ë˜ì–´ ìžˆì„ ë•Œ í•„ë“œì— ì•„ë¬´ ê°’ë„ ìž…ë ¥í•˜ì§€ 않으면 비밀번호가 ìžë™ìœ¼ë¡œ 만들어집니다.'; $lang['add_ok'] = '사용ìžê°€ 성공ì 으로 추가ë˜ì—ˆìŠµë‹ˆë‹¤.'; $lang['add_fail'] = 'ì‚¬ìš©ìž ì¶”ê°€ê°€ 실패했습니다.'; $lang['notify_ok'] = '알림 ì´ë©”ì¼ì´ 성공ì 으로 발송ë˜ì—ˆìŠµë‹ˆë‹¤. '; diff --git a/lib/plugins/usermanager/lang/pl/lang.php b/lib/plugins/usermanager/lang/pl/lang.php index 5bbf8437038d301c8c260748d8fce551944c3f97..cfc0ba327f01edf98ff2ada5c81d066bec2e4089 100644 --- a/lib/plugins/usermanager/lang/pl/lang.php +++ b/lib/plugins/usermanager/lang/pl/lang.php @@ -12,6 +12,7 @@ * @author Grzegorz WidÅ‚a <dzesdzes@gmail.com> * @author Åukasz Chmaj <teachmeter@gmail.com> * @author Begina Felicysym <begina.felicysym@wp.eu> + * @author Aoi Karasu <aoikarasu@gmail.com> */ $lang['menu'] = 'Menadżer użytkowników'; $lang['noauth'] = '(uwierzytelnienie użytkownika niemożliwe)'; diff --git a/lib/plugins/usermanager/lang/ro/lang.php b/lib/plugins/usermanager/lang/ro/lang.php index 7aac6cfb047d3cd7b22afb127dcb18662163acfa..1b33cc4f8f78ce5a0334c21cae68b6b42b485ed3 100644 --- a/lib/plugins/usermanager/lang/ro/lang.php +++ b/lib/plugins/usermanager/lang/ro/lang.php @@ -10,6 +10,7 @@ * @author Emanuel-Emeric Andrasi <em.andrasi@mandrivausers.ro> * @author Marius OLAR <olarmariusalex@gmail.com> * @author Marius Olar <olarmariusalex@yahoo.com> + * @author Emanuel-Emeric AndraÈ™i <em.andrasi@mandrivausers.ro> */ $lang['menu'] = 'Manager Utilizatori'; $lang['noauth'] = '(autentificarea utilizatorilor nu este disponibilă)'; diff --git a/lib/plugins/usermanager/lang/vi/lang.php b/lib/plugins/usermanager/lang/vi/lang.php new file mode 100644 index 0000000000000000000000000000000000000000..2933d88752a2d2de929afffb9037ed069e4033a9 --- /dev/null +++ b/lib/plugins/usermanager/lang/vi/lang.php @@ -0,0 +1,5 @@ +<?php +/** + * Vietnamese language file + * + */ diff --git a/lib/styles/screen.css b/lib/styles/screen.css index 101ed35295684ea1f6d6845781ac8b60d1c57202..8ada48932f6145f2bdb3c19a6e536b2036d65319 100644 --- a/lib/styles/screen.css +++ b/lib/styles/screen.css @@ -10,36 +10,38 @@ div.success, div.notify { color: #000; background-repeat: no-repeat; - background-position: .5em 0; - border-bottom: 1px solid; + background-position: 8px 50%; + border: 1px solid; font-size: 90%; - margin: 0; - padding-left: 3em; + margin: 0 0 0.5em; + padding: 0.4em; + padding-left: 32px; overflow: hidden; + border-radius: 5px; } div.error { background-color: #fcc; background-image: url(../images/error.png); - border-bottom-color: #faa; + border-color: #ebb; } div.info { background-color: #ccf; background-image: url(../images/info.png); - border-bottom-color: #aaf; + border-color: #bbe; } div.success { background-color: #cfc; background-image: url(../images/success.png); - border-bottom-color: #afa; + border-color: #beb; } div.notify { background-color: #ffc; background-image: url(../images/notify.png); - border-bottom-color: #ffa; + border-color: #eeb; } /* modal windows */ diff --git a/lib/tpl/dokuwiki/css/_links.css b/lib/tpl/dokuwiki/css/_links.css index ef34a670695049715b24b0b7a8dec6c97c740f6c..c8f5b7c9e4dba77a5aa691ecc6b3a502b43f0734 100644 --- a/lib/tpl/dokuwiki/css/_links.css +++ b/lib/tpl/dokuwiki/css/_links.css @@ -43,16 +43,16 @@ } /* external link */ .dokuwiki a.urlextern { - background-image: url(images/link_icon.gif); + background-image: url(images/external-link.png); padding: 0 0 0 17px; } /* windows share */ .dokuwiki a.windows { - background-image: url(images/windows.gif); + background-image: url(images/unc.png); } /* email link */ .dokuwiki a.mail { - background-image: url(images/mail_icon.gif); + background-image: url(images/email.png); } /* icons of the following are set by dokuwiki in lib/exe/css.php */ diff --git a/lib/tpl/dokuwiki/css/basic.css b/lib/tpl/dokuwiki/css/basic.css index e7590dbb7027a0e6f7aae467731ec724cd6a7b1c..e0b8cddfebc965d9785707e1046e68691d1aecca 100644 --- a/lib/tpl/dokuwiki/css/basic.css +++ b/lib/tpl/dokuwiki/css/basic.css @@ -17,7 +17,11 @@ body { color: __text__; background-color: __background_site__; background-image: url(images/page-background.svg); - /*background-image: linear-gradient( top, __background_neu__ 0%, __background_alt__ 1em, __background_site__ 4em);*/ + /*background-image: -moz-linear-gradient( top, __background_neu__ 0%, __background_alt__ 1em, __background_site__ 4em); see FS#2447*/ + background-image: -webkit-linear-gradient(top, __background_neu__ 0%, __background_alt__ 1em, __background_site__ 4em); + background-image: -o-linear-gradient( top, __background_neu__ 0%, __background_alt__ 1em, __background_site__ 4em); + background-image: -ms-linear-gradient( top, __background_neu__ 0%, __background_alt__ 1em, __background_site__ 4em); + background-image: linear-gradient( top, __background_neu__ 0%, __background_alt__ 1em, __background_site__ 4em); background-size: 1px 10em; background-repeat: repeat-x; margin: 0; @@ -195,6 +199,7 @@ img { img, object { max-width: 100%; + height: auto; } hr { @@ -330,8 +335,12 @@ button, .qq-upload-button { color: #333; background-color: #eee; - background-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIHZpZXdCb3g9IjAgMCAxIDEiIHByZXNlcnZlQXNwZWN0UmF0aW89Im5vbmUiPgo8bGluZWFyR3JhZGllbnQgaWQ9Imc4MjQiIGdyYWRpZW50VW5pdHM9InVzZXJTcGFjZU9uVXNlIiB4MT0iMCUiIHkxPSIwJSIgeDI9IjAlIiB5Mj0iMTAwJSI+CjxzdG9wIHN0b3AtY29sb3I9IiNGRkZGRkYiIG9mZnNldD0iMCIvPjxzdG9wIHN0b3AtY29sb3I9IiNGNEY0RjQiIG9mZnNldD0iMC4zIi8+PHN0b3Agc3RvcC1jb2xvcj0iI0VFRUVFRSIgb2Zmc2V0PSIwLjk5Ii8+PHN0b3Agc3RvcC1jb2xvcj0iI0NDQ0NDQyIgb2Zmc2V0PSIuOTkiLz4KPC9saW5lYXJHcmFkaWVudD4KPHJlY3QgeD0iMCIgeT0iMCIgd2lkdGg9IjEiIGhlaWdodD0iMSIgZmlsbD0idXJsKCNnODI0KSIgLz4KPC9zdmc+"); - /*background: linear-gradient( top, #ffffff 0%, #f4f4f4 30%, #eeeeee 99%, #cccccc 99%);*/ + background-image: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIHZpZXdCb3g9IjAgMCAxIDEiIHByZXNlcnZlQXNwZWN0UmF0aW89Im5vbmUiPgo8bGluZWFyR3JhZGllbnQgaWQ9Imc4MjQiIGdyYWRpZW50VW5pdHM9InVzZXJTcGFjZU9uVXNlIiB4MT0iMCUiIHkxPSIwJSIgeDI9IjAlIiB5Mj0iMTAwJSI+CjxzdG9wIHN0b3AtY29sb3I9IiNGRkZGRkYiIG9mZnNldD0iMCIvPjxzdG9wIHN0b3AtY29sb3I9IiNGNEY0RjQiIG9mZnNldD0iMC4zIi8+PHN0b3Agc3RvcC1jb2xvcj0iI0VFRUVFRSIgb2Zmc2V0PSIwLjk5Ii8+PHN0b3Agc3RvcC1jb2xvcj0iI0NDQ0NDQyIgb2Zmc2V0PSIuOTkiLz4KPC9saW5lYXJHcmFkaWVudD4KPHJlY3QgeD0iMCIgeT0iMCIgd2lkdGg9IjEiIGhlaWdodD0iMSIgZmlsbD0idXJsKCNnODI0KSIgLz4KPC9zdmc+); + /*background: -moz-linear-gradient( top, #ffffff 0%, #f4f4f4 30%, #eeeeee 99%, #cccccc 99%); see FS#2447*/ + background: -webkit-linear-gradient(top, #ffffff 0%, #f4f4f4 30%, #eeeeee 99%, #cccccc 99%); + background: -o-linear-gradient( top, #ffffff 0%, #f4f4f4 30%, #eeeeee 99%, #cccccc 99%); + background: -ms-linear-gradient( top, #ffffff 0%, #f4f4f4 30%, #eeeeee 99%, #cccccc 99%); + background: linear-gradient( top, #ffffff 0%, #f4f4f4 30%, #eeeeee 99%, #cccccc 99%); border: 1px solid #ccc; border-radius: 2px; padding: .1em .5em; @@ -353,8 +362,12 @@ button:focus, .qq-upload-button:hover { border-color: #999; background-color: #ddd; - background-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIHZpZXdCb3g9IjAgMCAxIDEiIHByZXNlcnZlQXNwZWN0UmF0aW89Im5vbmUiPgo8bGluZWFyR3JhZGllbnQgaWQ9Imc2NzAiIGdyYWRpZW50VW5pdHM9InVzZXJTcGFjZU9uVXNlIiB4MT0iMCUiIHkxPSIwJSIgeDI9IjAlIiB5Mj0iMTAwJSI+CjxzdG9wIHN0b3AtY29sb3I9IiNGRkZGRkYiIG9mZnNldD0iMCIvPjxzdG9wIHN0b3AtY29sb3I9IiNGNEY0RjQiIG9mZnNldD0iMC4zIi8+PHN0b3Agc3RvcC1jb2xvcj0iI0RERERERCIgb2Zmc2V0PSIwLjk5Ii8+PHN0b3Agc3RvcC1jb2xvcj0iI0JCQkJCQiIgb2Zmc2V0PSIuOTkiLz4KPC9saW5lYXJHcmFkaWVudD4KPHJlY3QgeD0iMCIgeT0iMCIgd2lkdGg9IjEiIGhlaWdodD0iMSIgZmlsbD0idXJsKCNnNjcwKSIgLz4KPC9zdmc+"); - /*background: linear-gradient( top, #ffffff 0%, #f4f4f4 30%, #dddddd 99%, #bbbbbb 99%);*/ + background-image:url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIHZpZXdCb3g9IjAgMCAxIDEiIHByZXNlcnZlQXNwZWN0UmF0aW89Im5vbmUiPgo8bGluZWFyR3JhZGllbnQgaWQ9Imc2NzAiIGdyYWRpZW50VW5pdHM9InVzZXJTcGFjZU9uVXNlIiB4MT0iMCUiIHkxPSIwJSIgeDI9IjAlIiB5Mj0iMTAwJSI+CjxzdG9wIHN0b3AtY29sb3I9IiNGRkZGRkYiIG9mZnNldD0iMCIvPjxzdG9wIHN0b3AtY29sb3I9IiNGNEY0RjQiIG9mZnNldD0iMC4zIi8+PHN0b3Agc3RvcC1jb2xvcj0iI0RERERERCIgb2Zmc2V0PSIwLjk5Ii8+PHN0b3Agc3RvcC1jb2xvcj0iI0JCQkJCQiIgb2Zmc2V0PSIuOTkiLz4KPC9saW5lYXJHcmFkaWVudD4KPHJlY3QgeD0iMCIgeT0iMCIgd2lkdGg9IjEiIGhlaWdodD0iMSIgZmlsbD0idXJsKCNnNjcwKSIgLz4KPC9zdmc+); + /*background: -moz-linear-gradient( top, #ffffff 0%, #f4f4f4 30%, #dddddd 99%, #cccccc 99%); see FS#2447*/ + background: -webkit-linear-gradient(top, #ffffff 0%, #f4f4f4 30%, #dddddd 99%, #bbbbbb 99%); + background: -o-linear-gradient( top, #ffffff 0%, #f4f4f4 30%, #dddddd 99%, #bbbbbb 99%); + background: -ms-linear-gradient( top, #ffffff 0%, #f4f4f4 30%, #dddddd 99%, #bbbbbb 99%); + background: linear-gradient( top, #ffffff 0%, #f4f4f4 30%, #dddddd 99%, #bbbbbb 99%); } input::-moz-focus-inner, diff --git a/lib/tpl/dokuwiki/css/design.css b/lib/tpl/dokuwiki/css/design.css index 1bc667fb5c4e20f8bb8964345cd01c3a090d9b90..059decf49a6cd9d9a54dc477396f4ed3c74e48fe 100644 --- a/lib/tpl/dokuwiki/css/design.css +++ b/lib/tpl/dokuwiki/css/design.css @@ -95,6 +95,17 @@ text-overflow: ellipsis; } +#dokuwiki__usertools a.action, +#dokuwiki__sitetools a.action { + padding-left: 20px; + background: transparent url(images/sitetools.png) no-repeat 0 0; +} +[dir=rtl] #dokuwiki__usertools a.action, +[dir=rtl] #dokuwiki__sitetools a.action { + padding-left: 0; + padding-right: 20px; +} + #dokuwiki__header .mobileTools { display: none; /* hide mobile tools dropdown to only show in mobile view */ } @@ -121,6 +132,37 @@ #dokuwiki__usertools ul li.user { } +#dokuwiki__usertools a.action.admin { + background-position: left -96px; +} +[dir=rtl] #dokuwiki__usertools a.action.admin { + background-position: right -96px; +} +#dokuwiki__usertools a.action.profile { + background-position: left -128px; +} +[dir=rtl] #dokuwiki__usertools a.action.profile { + background-position: right -128px; +} +#dokuwiki__usertools a.action.register { + background-position: left -160px; +} +[dir=rtl] #dokuwiki__usertools a.action.register { + background-position: right -160px; +} +#dokuwiki__usertools a.action.login { + background-position: left -192px; +} +[dir=rtl] #dokuwiki__usertools a.action.login { + background-position: right -192px; +} +#dokuwiki__usertools a.action.logout { + background-position: left -224px; +} +[dir=rtl] #dokuwiki__usertools a.action.logout { + background-position: right -224px; +} + /*____________ site tools ____________*/ @@ -165,6 +207,25 @@ #dokuwiki__sitetools li { } +#dokuwiki__sitetools a.action.recent { + background-position: left 0; +} +[dir=rtl] #dokuwiki__sitetools a.action.recent { + background-position: right 0; +} +#dokuwiki__sitetools a.action.media { + background-position: left -32px; +} +[dir=rtl] #dokuwiki__sitetools a.action.media { + background-position: right -32px; +} +#dokuwiki__sitetools a.action.index { + background-position: left -64px; +} +[dir=rtl] #dokuwiki__sitetools a.action.index { + background-position: right -64px; +} + /*____________ breadcrumbs ____________*/ .dokuwiki div.breadcrumbs { diff --git a/lib/tpl/dokuwiki/css/pagetools.css b/lib/tpl/dokuwiki/css/pagetools.css index f691d82a7c4134b9cd3c2fd8dcac1631feb00eb7..a40d525b3028cc5efd461db51a9aa22b52a39caf 100644 --- a/lib/tpl/dokuwiki/css/pagetools.css +++ b/lib/tpl/dokuwiki/css/pagetools.css @@ -14,7 +14,9 @@ padding-left: 40px; } .dokuwiki div.page { + height: 190px; min-height: 190px; /* 30 (= height of icons) x 6 (= maximum number of possible tools) + 2x5 */ + height: auto; } #dokuwiki__usertools { /* move the tools just outside of the site */ @@ -31,6 +33,7 @@ right: -40px; /* on same vertical level as first headline, because .page has 2em padding */ top: 2em; + width: 40px; } [dir=rtl] #dokuwiki__pagetools { right: auto; @@ -39,6 +42,7 @@ #dokuwiki__pagetools div.tools { position: fixed; + width: 40px; } #dokuwiki__pagetools ul { @@ -83,7 +87,8 @@ /* hide labels accessibly when neither on hover nor on focus */ #dokuwiki__pagetools ul li a span { position: absolute; - left: -99999px; + clip: rect(0 0 0 0); /* IE7, IE6 */ + clip: rect(0, 0, 0, 0); } /* show all tools on hover and individual tools on focus */ diff --git a/lib/tpl/dokuwiki/css/print.css b/lib/tpl/dokuwiki/css/print.css index 9f43f513146e29d1cf07985b6cfa2c7cfa7377cb..191d50c28491f00af97cb2356f0f4c919b1d22a7 100644 --- a/lib/tpl/dokuwiki/css/print.css +++ b/lib/tpl/dokuwiki/css/print.css @@ -138,6 +138,9 @@ div.clearer { border: solid #ccc; border-width: 0 0 0 2pt; } +[dir=rtl] .dokuwiki blockquote { + border-width: 0 2pt 0 0; +} /* tables */ .dokuwiki table { @@ -154,6 +157,10 @@ div.clearer { border: 1pt solid #666; text-align: left; } +[dir=rtl] .dokuwiki th, +[dir=rtl] .dokuwiki td { + text-align: right; +} .dokuwiki th { font-weight: bold; } @@ -174,6 +181,11 @@ div.clearer { float: left; margin-right: .5em; } +[dir=rtl] #dokuwiki__header h1 img { + float: right; + margin-right: 0; + margin-left: .5em; +} .dokuwiki div.footnotes { clear: both; border-top: 1pt solid #000; diff --git a/lib/tpl/dokuwiki/images/apple-touch-icon.png b/lib/tpl/dokuwiki/images/apple-touch-icon.png index 45fa4e7b081d35277b8d6f86a3e2a3f16aa3295e..fb5f108c06b9822b995e9658025456ddd41625a1 100644 Binary files a/lib/tpl/dokuwiki/images/apple-touch-icon.png and b/lib/tpl/dokuwiki/images/apple-touch-icon.png differ diff --git a/lib/tpl/dokuwiki/images/bullet.png b/lib/tpl/dokuwiki/images/bullet.png index 5da53744304e2101e279193fb1b352566d1ab49e..5e557b334a36b3f1274edd6c7b9d70ff24347c02 100644 Binary files a/lib/tpl/dokuwiki/images/bullet.png and b/lib/tpl/dokuwiki/images/bullet.png differ diff --git a/lib/tpl/dokuwiki/images/button-dw.png b/lib/tpl/dokuwiki/images/button-dw.png index 97272d96841ff4488878a3c8908a1a32b58776ef..8d6aea898634683b381f03903c824449f9e22985 100644 Binary files a/lib/tpl/dokuwiki/images/button-dw.png and b/lib/tpl/dokuwiki/images/button-dw.png differ diff --git a/lib/tpl/dokuwiki/images/button-rss.png b/lib/tpl/dokuwiki/images/button-rss.png index f2438043f4801a97122a2816f7f1fd47da4d91b9..b7cddadec707d93233e3f2c72db8bbdcd6c552ab 100644 Binary files a/lib/tpl/dokuwiki/images/button-rss.png and b/lib/tpl/dokuwiki/images/button-rss.png differ diff --git a/lib/tpl/dokuwiki/images/closed-rtl.png b/lib/tpl/dokuwiki/images/closed-rtl.png index 85ebd59e132a17b345e5b0d83d23443ed73f6970..caa027e341541f00572a80f103413950e731a37b 100644 Binary files a/lib/tpl/dokuwiki/images/closed-rtl.png and b/lib/tpl/dokuwiki/images/closed-rtl.png differ diff --git a/lib/tpl/dokuwiki/images/closed.png b/lib/tpl/dokuwiki/images/closed.png index 3691ebc17538c95ad5f6b7964c4bf45642c2fe93..e3bd0f9e94cb25e2fe5db97ce4ff9743cbf3e06f 100644 Binary files a/lib/tpl/dokuwiki/images/closed.png and b/lib/tpl/dokuwiki/images/closed.png differ diff --git a/lib/tpl/dokuwiki/images/email.png b/lib/tpl/dokuwiki/images/email.png new file mode 100644 index 0000000000000000000000000000000000000000..5128be8953cdef007c66eda831e167ffbdae9e4f Binary files /dev/null and b/lib/tpl/dokuwiki/images/email.png differ diff --git a/lib/tpl/dokuwiki/images/external-link.png b/lib/tpl/dokuwiki/images/external-link.png new file mode 100644 index 0000000000000000000000000000000000000000..084135f957a3f3fbec5e0e2524b3bb0208633a9c Binary files /dev/null and b/lib/tpl/dokuwiki/images/external-link.png differ diff --git a/lib/tpl/dokuwiki/images/icons-license.txt b/lib/tpl/dokuwiki/images/icons-license.txt new file mode 100644 index 0000000000000000000000000000000000000000..7e12bbbd4823c57ae081a9e0a80979a6cc4be7b1 --- /dev/null +++ b/lib/tpl/dokuwiki/images/icons-license.txt @@ -0,0 +1,5 @@ +Icons for: sitetools.png, email.png, external-link.png and unc.png +Icon set: Dusseldorf +Designer: pc.de +License: Creative Commons Attribution License [http://creativecommons.org/licenses/by/3.0/] +URL: http://pc.de/icons/#Dusseldorf diff --git a/lib/tpl/dokuwiki/images/link_icon.gif b/lib/tpl/dokuwiki/images/link_icon.gif deleted file mode 100644 index 815ccb1b1ca04a07ba4d90178e909fae30c26889..0000000000000000000000000000000000000000 Binary files a/lib/tpl/dokuwiki/images/link_icon.gif and /dev/null differ diff --git a/lib/tpl/dokuwiki/images/logo.png b/lib/tpl/dokuwiki/images/logo.png index 8b794dd6428a216661610c80294de907a3f6fb1e..35640279c228d702aefbc0932f6edb0eea292caa 100644 Binary files a/lib/tpl/dokuwiki/images/logo.png and b/lib/tpl/dokuwiki/images/logo.png differ diff --git a/lib/tpl/dokuwiki/images/mail_icon.gif b/lib/tpl/dokuwiki/images/mail_icon.gif deleted file mode 100644 index 50a87a9a0689ac0dbaed5410b2c7f0fd107ae7b2..0000000000000000000000000000000000000000 Binary files a/lib/tpl/dokuwiki/images/mail_icon.gif and /dev/null differ diff --git a/lib/tpl/dokuwiki/images/open.png b/lib/tpl/dokuwiki/images/open.png index 40ff129be9b52d25ed8351a6b9f313f746702006..5f2d408c53819c8d9519ea9230c119ae0303093f 100644 Binary files a/lib/tpl/dokuwiki/images/open.png and b/lib/tpl/dokuwiki/images/open.png differ diff --git a/lib/tpl/dokuwiki/images/pagetools-sprite.png b/lib/tpl/dokuwiki/images/pagetools-sprite.png index bbd7fd361b260c082e7f9c46cc3a3a3b3e7f90ef..898f0f4a697c36ba8c9d87606ee3a01c3be2b9d8 100644 Binary files a/lib/tpl/dokuwiki/images/pagetools-sprite.png and b/lib/tpl/dokuwiki/images/pagetools-sprite.png differ diff --git a/lib/tpl/dokuwiki/images/resizecol.png b/lib/tpl/dokuwiki/images/resizecol.png index f0111507c56e87e1b2369d083b2c99c726224137..b5aeec0043800139c75cb212e0c31d5c14c62b3f 100644 Binary files a/lib/tpl/dokuwiki/images/resizecol.png and b/lib/tpl/dokuwiki/images/resizecol.png differ diff --git a/lib/tpl/dokuwiki/images/search.png b/lib/tpl/dokuwiki/images/search.png index 2adfc73571231390322fe02b2dfe4800593cab45..1ab7866fb0410158619d8a793c3a04ac186b4fdf 100644 Binary files a/lib/tpl/dokuwiki/images/search.png and b/lib/tpl/dokuwiki/images/search.png differ diff --git a/lib/tpl/dokuwiki/images/sitetools.png b/lib/tpl/dokuwiki/images/sitetools.png new file mode 100644 index 0000000000000000000000000000000000000000..dc5764647e6206278e49ea31d3b51d1062a27f08 Binary files /dev/null and b/lib/tpl/dokuwiki/images/sitetools.png differ diff --git a/lib/tpl/dokuwiki/images/toc-arrows.png b/lib/tpl/dokuwiki/images/toc-arrows.png index 9f441eb264e555a86002e35e76add55a57069d9c..4a353e4f6fd46416e4c26ae33460e36a7c981b63 100644 Binary files a/lib/tpl/dokuwiki/images/toc-arrows.png and b/lib/tpl/dokuwiki/images/toc-arrows.png differ diff --git a/lib/tpl/dokuwiki/images/toc-bullet.png b/lib/tpl/dokuwiki/images/toc-bullet.png index a6f0169c31aa514f10bbb128e03d64d272db0184..fc771b97e0dc8ecb788d5d345388a2e72e723155 100644 Binary files a/lib/tpl/dokuwiki/images/toc-bullet.png and b/lib/tpl/dokuwiki/images/toc-bullet.png differ diff --git a/lib/tpl/dokuwiki/images/unc.png b/lib/tpl/dokuwiki/images/unc.png new file mode 100644 index 0000000000000000000000000000000000000000..f2aca8815150c0b817198568f6b77d67a6f32ca0 Binary files /dev/null and b/lib/tpl/dokuwiki/images/unc.png differ diff --git a/lib/tpl/dokuwiki/images/windows.gif b/lib/tpl/dokuwiki/images/windows.gif deleted file mode 100644 index 4f12acce13903d3e31eedc3939152ddbad6efd24..0000000000000000000000000000000000000000 Binary files a/lib/tpl/dokuwiki/images/windows.gif and /dev/null differ