summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore4
-rw-r--r--_test/README166
-rw-r--r--_test/bootstrap.php107
-rw-r--r--_test/cases/inc/DifferenceEngine.test.php31
-rw-r--r--_test/cases/inc/auth_aclcheck.test.php231
-rw-r--r--_test/cases/inc/auth_admincheck.test.php132
-rw-r--r--_test/cases/inc/common_cleanText.test.php34
-rw-r--r--_test/cases/inc/common_pagetemplate.test.php19
-rw-r--r--_test/cases/inc/html_hilight.test.php104
-rw-r--r--_test/cases/inc/indexer_idx_indexlengths.test.php60
-rw-r--r--_test/cases/inc/mail_send.php49
-rw-r--r--_test/cases/inc/parser/lexer.group.php21
-rw-r--r--_test/cases/inc/parser/lexer.test.php625
-rw-r--r--_test/cases/inc/parser/parser.group.php34
-rw-r--r--_test/cases/inc/parser/parser.inc.php53
-rw-r--r--_test/cases/inc/parser/parser_formatting.test.php434
-rw-r--r--_test/cases/inc/parser/xhtml_htmlphp.test.php203
-rw-r--r--_test/cases/inc/parser/xhtml_links.test.php239
-rw-r--r--_test/conf/acl.auth.php21
-rw-r--r--_test/conf/local.php10
-rw-r--r--_test/conf/plugins.local.php8
-rw-r--r--_test/conf/users.auth.php12
-rw-r--r--_test/core/DokuWikiTest.php96
-rw-r--r--_test/core/TestRequest.php87
-rw-r--r--_test/core/TestResponse.php55
-rw-r--r--_test/core/TestUtils.php70
-rw-r--r--_test/core/phpQuery-onefile.php5702
-rw-r--r--_test/data/_dummy (renamed from _test/cases/inc/search/data/ns1/ns3/page3.txt)0
-rw-r--r--_test/data/attic/_dummy (renamed from _test/cases/inc/search/data/ns1/page1.txt)0
-rw-r--r--_test/data/cache/_dummy (renamed from _test/cases/inc/search/data/ns1/page2.txt)0
-rw-r--r--_test/data/index/_dummy (renamed from _test/cases/inc/search/data/ns2/nopage.ext)0
-rw-r--r--_test/data/locks/_dummy (renamed from _test/cases/inc/search/data/ns2/page1.txt)0
-rw-r--r--_test/data/media/wiki/dokuwiki-128.pngbin0 -> 33615 bytes
-rw-r--r--_test/data/media_attic/_dummy0
-rw-r--r--_test/data/media_meta/_dummy0
-rw-r--r--_test/data/meta/_dummy0
-rw-r--r--_test/data/pages/wiki/dokuwiki.txt64
-rw-r--r--_test/data/pages/wiki/syntax.txt486
-rw-r--r--_test/data/tmp/_dummy0
-rw-r--r--_test/debug.note4
-rw-r--r--_test/index.php228
-rw-r--r--_test/jslint.js89
-rw-r--r--_test/lib/cli_reporter.php114
-rw-r--r--_test/lib/mock_functions.php519
-rw-r--r--_test/lib/rss_writer_class.php369
-rw-r--r--_test/lib/testmanager.php579
-rw-r--r--_test/lib/unittest.php5
-rw-r--r--_test/lib/web.inc.php47
-rw-r--r--_test/lib/xml_writer_class.php292
-rw-r--r--_test/phpunit.xml26
-rwxr-xr-x_test/remotetests.php163
-rw-r--r--_test/rss2html.xsl110
-rwxr-xr-x_test/runtests.php187
-rw-r--r--_test/tests.css27
-rw-r--r--_test/tests.ini12
-rw-r--r--_test/tests/inc/auth_aclcheck.test.php240
-rw-r--r--_test/tests/inc/auth_admincheck.test.php126
-rw-r--r--_test/tests/inc/auth_nameencode.test.php (renamed from _test/cases/inc/auth_nameencode.test.php)17
-rw-r--r--_test/tests/inc/auth_password.test.php (renamed from _test/cases/inc/auth_password.test.php)32
-rw-r--r--_test/tests/inc/blowfish.test.php33
-rw-r--r--_test/tests/inc/common_cleanText.test.php25
-rw-r--r--_test/tests/inc/common_clientip.test.php (renamed from _test/cases/inc/common_clientip.test.php)42
-rw-r--r--_test/tests/inc/common_obfuscate.test.php (renamed from _test/cases/inc/common_obfuscate.test.php)10
-rw-r--r--_test/tests/inc/common_pagetemplate.test.php15
-rw-r--r--_test/tests/inc/common_wl.test.php148
-rw-r--r--_test/tests/inc/form_form.test.php (renamed from _test/cases/inc/form_form.test.php)19
-rw-r--r--_test/tests/inc/html_hilight.test.php100
-rw-r--r--_test/tests/inc/httpclient_http.test.php180
-rw-r--r--_test/tests/inc/httpclient_https.test.php15
-rw-r--r--_test/tests/inc/init_fullpath.test.php (renamed from _test/cases/inc/init_fullpath.test.php)9
-rw-r--r--_test/tests/inc/init_getbaseurl.test.php (renamed from _test/cases/inc/init_getbaseurl.test.php)28
-rw-r--r--_test/tests/inc/input.test.php216
-rw-r--r--_test/tests/inc/ixr_library_date.test.php (renamed from _test/cases/inc/IXR_Library_date.test.php)5
-rw-r--r--_test/tests/inc/ixr_library_ixr_message.test.php (renamed from _test/cases/inc/IXR_Library_IXR_Message.test.php)49
-rw-r--r--_test/tests/inc/json.test.php418
-rw-r--r--_test/tests/inc/mail_isvalid.test.php (renamed from _test/cases/inc/mail_isvalid.test.php)9
-rw-r--r--_test/tests/inc/mail_quoted_printable_encode.test.php (renamed from _test/cases/inc/mail_quoted_printable_encode.php)16
-rw-r--r--_test/tests/inc/mailer.test.php94
-rw-r--r--_test/tests/inc/pageutils_clean_id.test.php (renamed from _test/cases/inc/pageutils_clean_id.test.php)20
-rw-r--r--_test/tests/inc/pageutils_getid.test.php (renamed from _test/cases/inc/pageutils_getid.test.php)20
-rw-r--r--_test/tests/inc/pageutils_resolve_id.test.php (renamed from _test/cases/inc/pageutils_resolve_id.test.php)6
-rw-r--r--_test/tests/inc/pageutils_resolve_pageid.test.php (renamed from _test/cases/inc/pageutils_resolve_pageid.test.php)13
-rw-r--r--_test/tests/inc/parser/lexer.test.php531
-rw-r--r--_test/tests/inc/parser/parser.inc.php29
-rw-r--r--_test/tests/inc/parser/parser_eol.test.php (renamed from _test/cases/inc/parser/parser_eol.test.php)26
-rw-r--r--_test/tests/inc/parser/parser_footnote.test.php (renamed from _test/cases/inc/parser/parser_footnote.test.php)36
-rw-r--r--_test/tests/inc/parser/parser_headers.test.php (renamed from _test/cases/inc/parser/parser_headers.test.php)60
-rw-r--r--_test/tests/inc/parser/parser_i18n.test.php (renamed from _test/cases/inc/parser/parser_i18n.test.php)16
-rw-r--r--_test/tests/inc/parser/parser_links.test.php (renamed from _test/cases/inc/parser/parser_links.test.php)89
-rw-r--r--_test/tests/inc/parser/parser_lists.test.php (renamed from _test/cases/inc/parser/parser_lists.test.php)28
-rw-r--r--_test/tests/inc/parser/parser_preformatted.test.php (renamed from _test/cases/inc/parser/parser_preformatted.test.php)28
-rw-r--r--_test/tests/inc/parser/parser_quote.test.php (renamed from _test/cases/inc/parser/parser_quote.test.php)26
-rw-r--r--_test/tests/inc/parser/parser_quotes.test.php (renamed from _test/cases/inc/parser/parser_quotes.test.php)32
-rw-r--r--_test/tests/inc/parser/parser_replacements.test.php (renamed from _test/cases/inc/parser/parser_replacements.test.php)47
-rw-r--r--_test/tests/inc/parser/parser_table.test.php (renamed from _test/cases/inc/parser/parser_table.test.php)30
-rw-r--r--_test/tests/inc/parser/parser_unformatted.test.php (renamed from _test/cases/inc/parser/parser_unformatted.test.php)14
-rw-r--r--_test/tests/inc/parserutils_set_metadata_during_rendering.test.php (renamed from _test/cases/inc/parserutils_set_metadata_during_rendering.test.php)16
-rw-r--r--_test/tests/inc/remote.test.php (renamed from _test/cases/inc/remote.test.php)70
-rw-r--r--_test/tests/inc/safefn.test.php (renamed from _test/cases/inc/safefn.test.php)12
-rw-r--r--_test/tests/inc/search/data/ns1/ns3/page3.txt0
-rw-r--r--_test/tests/inc/search/data/ns1/page1.txt0
-rw-r--r--_test/tests/inc/search/data/ns1/page2.txt0
-rw-r--r--_test/tests/inc/search/data/ns2/nopage.ext0
-rw-r--r--_test/tests/inc/search/data/ns2/page1.txt0
-rw-r--r--_test/tests/inc/search/search.test.php (renamed from _test/cases/inc/search/search.test.php)9
-rw-r--r--_test/tests/inc/utf8_correctidx.test.php (renamed from _test/cases/inc/utf8_correctidx.test.php)11
-rw-r--r--_test/tests/inc/utf8_html.test.php (renamed from _test/cases/inc/utf8_html.test.php)24
-rw-r--r--_test/tests/inc/utf8_kanaromaji.txt (renamed from _test/cases/inc/utf8_kanaromaji.txt)0
-rw-r--r--_test/tests/inc/utf8_romanize.test.php (renamed from _test/cases/inc/utf8_romanize.test.php)11
-rw-r--r--_test/tests/inc/utf8_stripspecials.test.php (renamed from _test/cases/inc/utf8_stripspecials.test.php)5
-rw-r--r--_test/tests/inc/utf8_substr.test.php (renamed from _test/cases/inc/utf8_substr.test.php)7
-rw-r--r--_test/tests/inc/utf8_unicode.test.php (renamed from _test/cases/inc/utf8_unicode.test.php)20
-rw-r--r--_test/tests/inc/utf8_utf16be.test.php (renamed from _test/cases/inc/utf8_utf16be.test.php)8
-rw-r--r--_test/tests/lib/exe/css_css_compress.test.php (renamed from _test/cases/lib/exe/css_css_compress.test.php)19
-rw-r--r--_test/tests/lib/exe/css_css_loadfile.test.php (renamed from _test/cases/lib/exe/css_css_loadfile.test.php)6
-rw-r--r--_test/tests/lib/exe/js_js_compress.test.php (renamed from _test/cases/lib/exe/js_js_compress.test.php)59
-rw-r--r--_test/tests/lib/exe/js_js_compress/test-CommentInDoubleQuotes1-in.js (renamed from _test/cases/lib/exe/js_js_compress/test-CommentInDoubleQuotes1-in.js)0
-rw-r--r--_test/tests/lib/exe/js_js_compress/test-CommentInDoubleQuotes1-out.js (renamed from _test/cases/lib/exe/js_js_compress/test-CommentInDoubleQuotes1-out.js)0
-rw-r--r--_test/tests/lib/exe/js_js_compress/test-CommentInDoubleQuotes2-in.js (renamed from _test/cases/lib/exe/js_js_compress/test-CommentInDoubleQuotes2-in.js)0
-rw-r--r--_test/tests/lib/exe/js_js_compress/test-CommentInDoubleQuotes2-out.js (renamed from _test/cases/lib/exe/js_js_compress/test-CommentInDoubleQuotes2-out.js)0
-rw-r--r--_test/tests/lib/exe/js_js_compress/test-CommentInSingleQuotes1-in.js (renamed from _test/cases/lib/exe/js_js_compress/test-CommentInSingleQuotes1-in.js)0
-rw-r--r--_test/tests/lib/exe/js_js_compress/test-CommentInSingleQuotes1-out.js (renamed from _test/cases/lib/exe/js_js_compress/test-CommentInSingleQuotes1-out.js)0
-rw-r--r--_test/tests/lib/exe/js_js_compress/test-CommentInSingleQuotes2-in.js (renamed from _test/cases/lib/exe/js_js_compress/test-CommentInSingleQuotes2-in.js)0
-rw-r--r--_test/tests/lib/exe/js_js_compress/test-CommentInSingleQuotes2-out.js (renamed from _test/cases/lib/exe/js_js_compress/test-CommentInSingleQuotes2-out.js)0
-rw-r--r--_test/tests/lib/exe/js_js_compress/test-CommentMultiline-in.js (renamed from _test/cases/lib/exe/js_js_compress/test-CommentMultiline-in.js)0
-rw-r--r--_test/tests/lib/exe/js_js_compress/test-CommentMultiline-out.js (renamed from _test/cases/lib/exe/js_js_compress/test-CommentMultiline-out.js)0
-rw-r--r--_test/tests/lib/exe/js_js_compress/test-CommentSingleLine-in.js (renamed from _test/cases/lib/exe/js_js_compress/test-CommentSingleLine-in.js)0
-rw-r--r--_test/tests/lib/exe/js_js_compress/test-CommentSingleLine-out.js (renamed from _test/cases/lib/exe/js_js_compress/test-CommentSingleLine-out.js)0
-rw-r--r--_test/tests/lib/exe/js_js_compress/test-IfThenElseBraces-in.js (renamed from _test/cases/lib/exe/js_js_compress/test-IfThenElseBraces-in.js)0
-rw-r--r--_test/tests/lib/exe/js_js_compress/test-IfThenElseBraces-out.js (renamed from _test/cases/lib/exe/js_js_compress/test-IfThenElseBraces-out.js)0
-rw-r--r--_test/tests/lib/exe/js_js_compress/test-IfThenElseNoBraces-in.js (renamed from _test/cases/lib/exe/js_js_compress/test-IfThenElseNoBraces-in.js)0
-rw-r--r--_test/tests/lib/exe/js_js_compress/test-IfThenElseNoBraces-out.js (renamed from _test/cases/lib/exe/js_js_compress/test-IfThenElseNoBraces-out.js)0
-rw-r--r--_test/tests/lib/exe/js_js_compress/test-RegexpBackslash-in.js (renamed from _test/cases/lib/exe/js_js_compress/test-RegexpBackslash-in.js)0
-rw-r--r--_test/tests/lib/exe/js_js_compress/test-RegexpBackslash-out.js (renamed from _test/cases/lib/exe/js_js_compress/test-RegexpBackslash-out.js)0
-rw-r--r--_test/tests/lib/exe/js_js_compress/test-RegexpSimple-in.js (renamed from _test/cases/lib/exe/js_js_compress/test-RegexpSimple-in.js)0
-rw-r--r--_test/tests/lib/exe/js_js_compress/test-RegexpSimple-out.js (renamed from _test/cases/lib/exe/js_js_compress/test-RegexpSimple-out.js)0
-rw-r--r--_test/tests/lib/exe/js_js_compress/test-RegexpSimpleWhitespace-in.js (renamed from _test/cases/lib/exe/js_js_compress/test-RegexpSimpleWhitespace-in.js)0
-rw-r--r--_test/tests/lib/exe/js_js_compress/test-RegexpSimpleWhitespace-out.js (renamed from _test/cases/lib/exe/js_js_compress/test-RegexpSimpleWhitespace-out.js)0
-rw-r--r--_test/tests/lib/exe/js_js_compress/test-RegexpString-in.js (renamed from _test/cases/lib/exe/js_js_compress/test-RegexpString-in.js)0
-rw-r--r--_test/tests/lib/exe/js_js_compress/test-RegexpString-out.js (renamed from _test/cases/lib/exe/js_js_compress/test-RegexpString-out.js)0
-rw-r--r--_test/tests/lib/exe/js_js_compress/test-StatementDoWhile-in.js (renamed from _test/cases/lib/exe/js_js_compress/test-StatementDoWhile-in.js)0
-rw-r--r--_test/tests/lib/exe/js_js_compress/test-StatementDoWhile-out.js (renamed from _test/cases/lib/exe/js_js_compress/test-StatementDoWhile-out.js)0
-rw-r--r--_test/tests/lib/exe/js_js_compress/test-StatementForIn-in.js (renamed from _test/cases/lib/exe/js_js_compress/test-StatementForIn-in.js)0
-rw-r--r--_test/tests/lib/exe/js_js_compress/test-StatementForIn-out.js (renamed from _test/cases/lib/exe/js_js_compress/test-StatementForIn-out.js)0
-rw-r--r--_test/tests/lib/exe/js_js_compress/test-StatementNew-in.js (renamed from _test/cases/lib/exe/js_js_compress/test-StatementNew-in.js)0
-rw-r--r--_test/tests/lib/exe/js_js_compress/test-StatementNew-out.js (renamed from _test/cases/lib/exe/js_js_compress/test-StatementNew-out.js)0
-rw-r--r--_test/tests/lib/exe/js_js_compress/test-StatementSwitchCase-in.js (renamed from _test/cases/lib/exe/js_js_compress/test-StatementSwitchCase-in.js)0
-rw-r--r--_test/tests/lib/exe/js_js_compress/test-StatementSwitchCase-out.js (renamed from _test/cases/lib/exe/js_js_compress/test-StatementSwitchCase-out.js)0
-rw-r--r--_test/tests/lib/exe/js_js_compress/test-StringDoubleQuotes-in.js (renamed from _test/cases/lib/exe/js_js_compress/test-StringDoubleQuotes-in.js)0
-rw-r--r--_test/tests/lib/exe/js_js_compress/test-StringDoubleQuotes-out.js (renamed from _test/cases/lib/exe/js_js_compress/test-StringDoubleQuotes-out.js)0
-rw-r--r--_test/tests/lib/exe/js_js_compress/test-StringSingleQuotes-in.js (renamed from _test/cases/lib/exe/js_js_compress/test-StringSingleQuotes-in.js)0
-rw-r--r--_test/tests/lib/exe/js_js_compress/test-StringSingleQuotes-out.js (renamed from _test/cases/lib/exe/js_js_compress/test-StringSingleQuotes-out.js)0
-rw-r--r--_test/tests/test/basic.test.php22
-rw-r--r--_test/tests/test/globals.test.php49
-rw-r--r--_test/tests/test/hooks.test.php24
-rw-r--r--_test/tests/test/phpquery.test.php18
-rw-r--r--_test/tests/test/plugins.test.php32
-rw-r--r--_test/tests/test/plugins_defaults.test.php24
-rw-r--r--_test/tests/test/reset.test.php38
-rw-r--r--_test/tests/test/scope.test.php49
-rwxr-xr-x_test/webtest-stripper.sh41
-rw-r--r--conf/dokuwiki.php166
-rw-r--r--conf/mime.conf1
-rw-r--r--conf/plugins.php6
-rw-r--r--conf/users.auth.php.dist2
-rw-r--r--data/pages/wiki/syntax.txt4
-rw-r--r--doku.php55
-rw-r--r--feed.php345
-rw-r--r--inc/DifferenceEngine.php61
-rw-r--r--inc/Input.class.php229
-rw-r--r--inc/JSON.php27
-rw-r--r--inc/Mailer.class.php658
-rw-r--r--inc/PassHash.class.php284
-rw-r--r--inc/RemoteAPICore.php29
-rw-r--r--inc/actions.php6
-rw-r--r--inc/auth.php673
-rw-r--r--inc/auth/ad.class.php3
-rw-r--r--inc/common.php909
-rw-r--r--inc/config_cascade.php1
-rw-r--r--inc/events.php10
-rw-r--r--inc/fulltext.php2
-rw-r--r--inc/geshi.php115
-rw-r--r--inc/geshi/4cs.php2
-rw-r--r--inc/geshi/6502acme.php230
-rw-r--r--inc/geshi/6502kickass.php241
-rw-r--r--inc/geshi/6502tasm.php189
-rw-r--r--inc/geshi/68000devpac.php168
-rw-r--r--inc/geshi/abap.php2
-rw-r--r--inc/geshi/actionscript.php2
-rw-r--r--inc/geshi/actionscript3.php4
-rw-r--r--inc/geshi/ada.php2
-rw-r--r--inc/geshi/algol68.php329
-rw-r--r--inc/geshi/apache.php5
-rw-r--r--inc/geshi/applescript.php2
-rw-r--r--inc/geshi/apt_sources.php12
-rw-r--r--inc/geshi/asm.php10
-rw-r--r--inc/geshi/asp.php2
-rw-r--r--inc/geshi/autoconf.php2
-rw-r--r--inc/geshi/autohotkey.php2
-rw-r--r--inc/geshi/autoit.php2
-rw-r--r--inc/geshi/avisynth.php2
-rw-r--r--inc/geshi/awk.php2
-rw-r--r--inc/geshi/bascomavr.php185
-rw-r--r--inc/geshi/bash.php137
-rw-r--r--inc/geshi/basic4gl.php2
-rw-r--r--inc/geshi/bf.php2
-rw-r--r--inc/geshi/bibtex.php2
-rw-r--r--inc/geshi/blitzbasic.php2
-rw-r--r--inc/geshi/bnf.php2
-rw-r--r--inc/geshi/boo.php2
-rw-r--r--inc/geshi/c.php85
-rw-r--r--inc/geshi/c_loadrunner.php323
-rw-r--r--inc/geshi/c_mac.php2
-rw-r--r--inc/geshi/caddcl.php2
-rw-r--r--inc/geshi/cadlisp.php2
-rw-r--r--inc/geshi/cfdg.php2
-rw-r--r--inc/geshi/cfm.php2
-rw-r--r--inc/geshi/chaiscript.php2
-rw-r--r--inc/geshi/cil.php2
-rw-r--r--inc/geshi/clojure.php2
-rw-r--r--inc/geshi/cmake.php2
-rw-r--r--inc/geshi/cobol.php2
-rw-r--r--inc/geshi/coffeescript.php146
-rw-r--r--inc/geshi/cpp-qt.php4
-rw-r--r--inc/geshi/cpp.php4
-rw-r--r--inc/geshi/csharp.php2
-rw-r--r--inc/geshi/css.php17
-rw-r--r--inc/geshi/cuesheet.php2
-rw-r--r--inc/geshi/d.php2
-rw-r--r--inc/geshi/dcs.php2
-rw-r--r--inc/geshi/delphi.php2
-rw-r--r--inc/geshi/diff.php2
-rw-r--r--inc/geshi/div.php2
-rw-r--r--inc/geshi/dos.php35
-rw-r--r--inc/geshi/dot.php2
-rw-r--r--inc/geshi/e.php208
-rw-r--r--inc/geshi/ecmascript.php2
-rw-r--r--inc/geshi/eiffel.php2
-rw-r--r--inc/geshi/email.php12
-rw-r--r--inc/geshi/epc.php154
-rw-r--r--inc/geshi/erlang.php10
-rw-r--r--inc/geshi/euphoria.php140
-rw-r--r--inc/geshi/f1.php151
-rw-r--r--inc/geshi/falcon.php218
-rw-r--r--inc/geshi/fo.php2
-rw-r--r--inc/geshi/fortran.php2
-rw-r--r--inc/geshi/freebasic.php2
-rw-r--r--inc/geshi/fsharp.php8
-rw-r--r--inc/geshi/gambas.php2
-rw-r--r--inc/geshi/gdb.php63
-rw-r--r--inc/geshi/genero.php2
-rw-r--r--inc/geshi/genie.php2
-rw-r--r--inc/geshi/gettext.php2
-rw-r--r--inc/geshi/glsl.php2
-rw-r--r--inc/geshi/gml.php2
-rw-r--r--inc/geshi/gnuplot.php2
-rw-r--r--inc/geshi/go.php375
-rw-r--r--inc/geshi/groovy.php18
-rw-r--r--inc/geshi/gwbasic.php2
-rw-r--r--inc/geshi/haskell.php2
-rw-r--r--inc/geshi/hicest.php2
-rw-r--r--inc/geshi/hq9plus.php2
-rw-r--r--inc/geshi/html4strict.php27
-rw-r--r--inc/geshi/html5.php212
-rw-r--r--inc/geshi/icon.php2
-rw-r--r--inc/geshi/idl.php2
-rw-r--r--inc/geshi/ini.php2
-rw-r--r--inc/geshi/inno.php2
-rw-r--r--inc/geshi/intercal.php2
-rw-r--r--inc/geshi/io.php2
-rw-r--r--inc/geshi/j.php73
-rw-r--r--inc/geshi/java.php2
-rw-r--r--inc/geshi/java5.php2
-rw-r--r--inc/geshi/javascript.php10
-rw-r--r--inc/geshi/jquery.php2
-rw-r--r--inc/geshi/kixtart.php2
-rw-r--r--inc/geshi/klonec.php2
-rw-r--r--inc/geshi/klonecpp.php2
-rw-r--r--inc/geshi/latex.php4
-rw-r--r--inc/geshi/lb.php162
-rw-r--r--inc/geshi/lisp.php2
-rw-r--r--inc/geshi/llvm.php385
-rw-r--r--inc/geshi/locobasic.php2
-rw-r--r--inc/geshi/logtalk.php35
-rw-r--r--inc/geshi/lolcode.php2
-rw-r--r--inc/geshi/lotusformulas.php2
-rw-r--r--inc/geshi/lotusscript.php2
-rw-r--r--inc/geshi/lscript.php2
-rw-r--r--inc/geshi/lsl2.php2
-rw-r--r--inc/geshi/lua.php64
-rw-r--r--inc/geshi/m68k.php2
-rw-r--r--inc/geshi/magiksf.php2
-rw-r--r--inc/geshi/make.php2
-rw-r--r--inc/geshi/mapbasic.php2
-rw-r--r--inc/geshi/matlab.php2
-rw-r--r--inc/geshi/mirc.php2
-rw-r--r--inc/geshi/mmix.php2
-rw-r--r--inc/geshi/modula2.php2
-rw-r--r--inc/geshi/modula3.php2
-rw-r--r--inc/geshi/mpasm.php2
-rw-r--r--inc/geshi/mxml.php2
-rw-r--r--inc/geshi/mysql.php2
-rw-r--r--inc/geshi/newlisp.php2
-rw-r--r--inc/geshi/nsis.php2
-rw-r--r--inc/geshi/oberon2.php2
-rw-r--r--inc/geshi/objc.php2
-rw-r--r--inc/geshi/objeck.php116
-rw-r--r--inc/geshi/ocaml-brief.php2
-rw-r--r--inc/geshi/ocaml.php2
-rw-r--r--inc/geshi/oobas.php2
-rw-r--r--inc/geshi/oracle11.php2
-rw-r--r--inc/geshi/oracle8.php2
-rw-r--r--inc/geshi/oxygene.php2
-rw-r--r--inc/geshi/oz.php2
-rw-r--r--inc/geshi/pascal.php2
-rw-r--r--inc/geshi/pcre.php2
-rw-r--r--inc/geshi/per.php2
-rw-r--r--inc/geshi/perl.php2
-rw-r--r--inc/geshi/perl6.php2
-rw-r--r--inc/geshi/pf.php2
-rw-r--r--inc/geshi/php-brief.php2
-rw-r--r--inc/geshi/php.php2
-rw-r--r--inc/geshi/pic16.php2
-rw-r--r--inc/geshi/pike.php2
-rw-r--r--inc/geshi/pixelbender.php2
-rw-r--r--inc/geshi/pli.php200
-rw-r--r--inc/geshi/plsql.php2
-rw-r--r--inc/geshi/postgresql.php2
-rw-r--r--inc/geshi/povray.php2
-rw-r--r--inc/geshi/powerbuilder.php2
-rw-r--r--inc/geshi/powershell.php2
-rw-r--r--inc/geshi/proftpd.php374
-rw-r--r--inc/geshi/progress.php2
-rw-r--r--inc/geshi/prolog.php2
-rw-r--r--inc/geshi/properties.php2
-rw-r--r--inc/geshi/providex.php2
-rw-r--r--inc/geshi/purebasic.php2
-rw-r--r--inc/geshi/pycon.php64
-rw-r--r--inc/geshi/python.php17
-rw-r--r--inc/geshi/q.php2
-rw-r--r--inc/geshi/qbasic.php2
-rw-r--r--inc/geshi/rails.php2
-rw-r--r--inc/geshi/rebol.php2
-rw-r--r--inc/geshi/reg.php2
-rw-r--r--inc/geshi/robots.php2
-rw-r--r--inc/geshi/rpmspec.php2
-rw-r--r--inc/geshi/rsplus.php2
-rw-r--r--inc/geshi/ruby.php2
-rw-r--r--inc/geshi/sas.php6
-rw-r--r--inc/geshi/scala.php2
-rw-r--r--inc/geshi/scheme.php2
-rw-r--r--inc/geshi/scilab.php2
-rw-r--r--inc/geshi/sdlbasic.php2
-rw-r--r--inc/geshi/smalltalk.php2
-rw-r--r--inc/geshi/smarty.php2
-rw-r--r--inc/geshi/sql.php75
-rw-r--r--inc/geshi/systemverilog.php8
-rw-r--r--inc/geshi/tcl.php2
-rw-r--r--inc/geshi/teraterm.php147
-rw-r--r--inc/geshi/text.php2
-rw-r--r--inc/geshi/thinbasic.php2
-rw-r--r--inc/geshi/tsql.php2
-rw-r--r--inc/geshi/typoscript.php2
-rw-r--r--inc/geshi/unicon.php2
-rw-r--r--inc/geshi/uscript.php299
-rw-r--r--inc/geshi/vala.php2
-rw-r--r--inc/geshi/vb.php2
-rw-r--r--inc/geshi/vbnet.php2
-rw-r--r--inc/geshi/verilog.php2
-rw-r--r--inc/geshi/vhdl.php2
-rw-r--r--inc/geshi/vim.php2
-rw-r--r--inc/geshi/visualfoxpro.php2
-rw-r--r--inc/geshi/visualprolog.php2
-rw-r--r--inc/geshi/whitespace.php2
-rw-r--r--inc/geshi/whois.php2
-rw-r--r--inc/geshi/winbatch.php2
-rw-r--r--inc/geshi/xbasic.php3
-rw-r--r--inc/geshi/xml.php2
-rw-r--r--inc/geshi/xorg_conf.php2
-rw-r--r--inc/geshi/xpp.php2
-rw-r--r--inc/geshi/yaml.php150
-rw-r--r--inc/geshi/z80.php2
-rw-r--r--inc/geshi/zxbasic.php150
-rw-r--r--inc/html.php9
-rw-r--r--inc/infoutils.php3
-rw-r--r--inc/init.php25
-rw-r--r--inc/lang/ar/lang.php54
-rw-r--r--inc/lang/ar/resetpwd.txt3
-rw-r--r--inc/lang/cs/subscr_digest.txt2
-rw-r--r--inc/lang/cs/subscr_list.txt2
-rw-r--r--inc/lang/cs/subscr_single.txt2
-rw-r--r--inc/lang/de-informal/lang.php2
-rw-r--r--inc/lang/de/lang.php2
-rw-r--r--inc/lang/en/lang.php3
-rw-r--r--inc/lang/en/mailwrap.html13
-rw-r--r--inc/lang/en/subscr_digest.txt2
-rw-r--r--inc/lang/en/subscr_list.txt2
-rw-r--r--inc/lang/en/subscr_single.txt2
-rw-r--r--inc/lang/eo/conflict.txt4
-rw-r--r--inc/lang/eo/denied.txt2
-rw-r--r--inc/lang/eo/diff.txt2
-rw-r--r--inc/lang/eo/draft.txt4
-rw-r--r--inc/lang/eo/edit.txt2
-rw-r--r--inc/lang/eo/editrev.txt2
-rw-r--r--inc/lang/eo/index.txt2
-rw-r--r--inc/lang/eo/install.html12
-rw-r--r--inc/lang/eo/lang.php69
-rw-r--r--inc/lang/eo/locked.txt2
-rw-r--r--inc/lang/eo/mailtext.txt7
-rw-r--r--inc/lang/eo/newpage.txt2
-rw-r--r--inc/lang/eo/norev.txt2
-rw-r--r--inc/lang/eo/password.txt7
-rw-r--r--inc/lang/eo/preview.txt2
-rw-r--r--inc/lang/eo/pwconfirm.txt9
-rw-r--r--inc/lang/eo/read.txt2
-rw-r--r--inc/lang/eo/recent.txt2
-rw-r--r--inc/lang/eo/register.txt2
-rw-r--r--inc/lang/eo/registermail.txt5
-rw-r--r--inc/lang/eo/resendpwd.txt2
-rw-r--r--inc/lang/eo/showrev.txt2
-rw-r--r--inc/lang/eo/stopwords.txt4
-rw-r--r--inc/lang/eo/subscr_digest.txt3
-rw-r--r--inc/lang/eo/subscr_list.txt3
-rw-r--r--inc/lang/eo/subscr_single.txt3
-rw-r--r--inc/lang/eo/updateprofile.txt2
-rw-r--r--inc/lang/eo/uploadmail.txt5
-rw-r--r--inc/lang/fr/lang.php9
-rw-r--r--inc/lang/fr/resetpwd.txt3
-rw-r--r--inc/lang/it/lang.php48
-rw-r--r--inc/lang/it/mailwrap.html13
-rw-r--r--inc/lang/it/resetpwd.txt1
-rw-r--r--inc/lang/ja/lang.php1
-rw-r--r--inc/lang/ko/admin.txt3
-rw-r--r--inc/lang/ko/backlinks.txt5
-rw-r--r--inc/lang/ko/conflict.txt5
-rw-r--r--inc/lang/ko/denied.txt3
-rw-r--r--inc/lang/ko/diff.txt6
-rw-r--r--inc/lang/ko/draft.txt7
-rw-r--r--inc/lang/ko/edit.txt3
-rw-r--r--inc/lang/ko/editrev.txt2
-rw-r--r--inc/lang/ko/index.txt5
-rw-r--r--inc/lang/ko/install.html24
-rw-r--r--inc/lang/ko/lang.php360
-rw-r--r--inc/lang/ko/locked.txt4
-rw-r--r--inc/lang/ko/login.txt3
-rw-r--r--inc/lang/ko/mailtext.txt23
-rw-r--r--inc/lang/ko/mailwrap.html13
-rw-r--r--inc/lang/ko/newpage.txt4
-rw-r--r--inc/lang/ko/norev.txt2
-rw-r--r--inc/lang/ko/password.txt11
-rw-r--r--inc/lang/ko/preview.txt5
-rw-r--r--inc/lang/ko/pwconfirm.txt14
-rw-r--r--inc/lang/ko/read.txt2
-rw-r--r--inc/lang/ko/recent.txt6
-rw-r--r--inc/lang/ko/register.txt3
-rw-r--r--inc/lang/ko/registermail.txt15
-rw-r--r--inc/lang/ko/resendpwd.txt5
-rw-r--r--inc/lang/ko/resetpwd.txt4
-rw-r--r--inc/lang/ko/revisions.txt3
-rw-r--r--inc/lang/ko/searchpage.txt4
-rw-r--r--inc/lang/ko/stopwords.txt18
-rw-r--r--inc/lang/ko/subscr_digest.txt14
-rw-r--r--inc/lang/ko/subscr_form.txt2
-rw-r--r--inc/lang/ko/subscr_list.txt9
-rw-r--r--inc/lang/ko/subscr_single.txt11
-rw-r--r--inc/lang/ko/updateprofile.txt4
-rw-r--r--inc/lang/ko/uploadmail.txt23
-rw-r--r--inc/lang/mr/lang.php82
-rw-r--r--inc/lang/nl/edit.txt2
-rw-r--r--inc/lang/nl/lang.php17
-rw-r--r--inc/lang/nl/mailwrap.html13
-rw-r--r--inc/lang/pl/lang.php5
-rw-r--r--inc/lang/pl/mailwrap.html13
-rw-r--r--inc/lang/pl/resetpwd.txt3
-rw-r--r--inc/lang/ro/lang.php9
-rw-r--r--inc/lang/ro/resetpwd.txt3
-rw-r--r--inc/lang/uk/install.html2
-rw-r--r--inc/lang/uk/lang.php11
-rw-r--r--inc/lang/vi/backlinks.txt4
-rw-r--r--inc/lang/vi/conflict.txt2
-rw-r--r--inc/lang/vi/denied.txt2
-rw-r--r--inc/lang/vi/edit.txt2
-rw-r--r--inc/lang/vi/editrev.txt2
-rw-r--r--inc/lang/vi/lang.php186
-rw-r--r--inc/lang/vi/login.txt2
-rw-r--r--inc/lang/vi/mailtext.txt2
-rw-r--r--inc/lang/vi/newpage.txt2
-rw-r--r--inc/lang/vi/norev.txt2
-rw-r--r--inc/lang/vi/password.txt2
-rw-r--r--inc/lang/vi/preview.txt2
-rw-r--r--inc/lang/vi/read.txt2
-rw-r--r--inc/lang/vi/revisions.txt2
-rw-r--r--inc/lang/vi/searchpage.txt2
-rw-r--r--inc/lang/zh/lang.php14
-rw-r--r--inc/lang/zh/mailwrap.html13
-rw-r--r--inc/lang/zh/resetpwd.txt3
-rw-r--r--inc/load.php14
-rw-r--r--inc/media.php64
-rw-r--r--inc/pageutils.php12
-rw-r--r--inc/parserutils.php4
-rw-r--r--inc/plugincontroller.class.php2
-rw-r--r--inc/subscription.php22
-rw-r--r--inc/template.php6
-rw-r--r--inc/utf8.php59
-rw-r--r--install.php115
-rw-r--r--lib/exe/indexer.php13
-rw-r--r--lib/exe/js.php10
-rw-r--r--lib/exe/xmlrpc.php3
-rw-r--r--lib/images/fileicons/ico.pngbin0 -> 907 bytes
-rw-r--r--lib/plugins/acl/lang/eo/help.txt4
-rw-r--r--lib/plugins/acl/lang/eo/lang.php24
-rw-r--r--lib/plugins/acl/lang/fr/lang.php1
-rw-r--r--lib/plugins/acl/lang/it/lang.php1
-rw-r--r--lib/plugins/acl/lang/ko/help.txt10
-rw-r--r--lib/plugins/acl/lang/ko/lang.php33
-rw-r--r--lib/plugins/acl/lang/pl/lang.php1
-rw-r--r--lib/plugins/acl/lang/ro/lang.php1
-rw-r--r--lib/plugins/acl/lang/vi/help.txt12
-rw-r--r--lib/plugins/acl/lang/vi/lang.php35
-rw-r--r--lib/plugins/acl/rtl.css40
-rw-r--r--lib/plugins/acl/style.css31
-rw-r--r--lib/plugins/config/lang/ar/lang.php11
-rw-r--r--lib/plugins/config/lang/en/lang.php140
-rw-r--r--lib/plugins/config/lang/eo/intro.txt4
-rw-r--r--lib/plugins/config/lang/eo/lang.php89
-rw-r--r--lib/plugins/config/lang/fr/lang.php101
-rw-r--r--lib/plugins/config/lang/it/lang.php104
-rw-r--r--lib/plugins/config/lang/ja/lang.php106
-rw-r--r--lib/plugins/config/lang/ko/intro.txt8
-rw-r--r--lib/plugins/config/lang/ko/lang.php241
-rw-r--r--lib/plugins/config/lang/nl/lang.php111
-rw-r--r--lib/plugins/config/lang/pl/lang.php106
-rw-r--r--lib/plugins/config/lang/ro/lang.php6
-rw-r--r--lib/plugins/config/lang/uk/intro.txt4
-rw-r--r--lib/plugins/config/lang/uk/lang.php131
-rw-r--r--lib/plugins/config/lang/vi/lang.php5
-rw-r--r--lib/plugins/config/lang/zh/lang.php106
-rw-r--r--lib/plugins/config/rtl.css45
-rw-r--r--lib/plugins/config/settings/config.metadata.php42
-rw-r--r--lib/plugins/config/style.css36
-rw-r--r--lib/plugins/plugin/lang/ar/lang.php1
-rw-r--r--lib/plugins/plugin/lang/eo/admin_plugin.txt2
-rw-r--r--lib/plugins/plugin/lang/eo/lang.php24
-rw-r--r--lib/plugins/plugin/lang/fr/lang.php1
-rw-r--r--lib/plugins/plugin/lang/it/lang.php2
-rw-r--r--lib/plugins/plugin/lang/ko/admin_plugin.txt2
-rw-r--r--lib/plugins/plugin/lang/ko/lang.php53
-rw-r--r--lib/plugins/plugin/lang/pl/lang.php1
-rw-r--r--lib/plugins/plugin/lang/ro/lang.php1
-rw-r--r--lib/plugins/plugin/lang/vi/lang.php5
-rw-r--r--lib/plugins/plugin/rtl.css51
-rw-r--r--lib/plugins/plugin/style.css39
-rw-r--r--lib/plugins/popularity/lang/eo/intro.txt6
-rw-r--r--lib/plugins/popularity/lang/eo/lang.php10
-rw-r--r--lib/plugins/popularity/lang/eo/submitted.txt2
-rw-r--r--lib/plugins/popularity/lang/fr/lang.php1
-rw-r--r--lib/plugins/popularity/lang/it/lang.php1
-rw-r--r--lib/plugins/popularity/lang/ko/intro.txt6
-rw-r--r--lib/plugins/popularity/lang/ko/lang.php5
-rw-r--r--lib/plugins/popularity/lang/ko/submitted.txt2
-rw-r--r--lib/plugins/popularity/lang/pl/lang.php1
-rw-r--r--lib/plugins/popularity/lang/ro/lang.php1
-rw-r--r--lib/plugins/popularity/lang/vi/lang.php5
-rw-r--r--lib/plugins/revert/lang/eo/lang.php8
-rw-r--r--lib/plugins/revert/lang/fr/lang.php1
-rw-r--r--lib/plugins/revert/lang/it/lang.php1
-rw-r--r--lib/plugins/revert/lang/ko/intro.txt2
-rw-r--r--lib/plugins/revert/lang/ko/lang.php13
-rw-r--r--lib/plugins/revert/lang/pl/lang.php1
-rw-r--r--lib/plugins/revert/lang/ro/lang.php1
-rw-r--r--lib/plugins/revert/lang/vi/lang.php5
-rw-r--r--lib/plugins/testing/_test/dummy_plugin_integration_test.test.php32
-rw-r--r--lib/plugins/testing/_test/dummy_plugin_test.test.php9
-rw-r--r--lib/plugins/testing/action.php19
-rw-r--r--lib/plugins/testing/plugin.info.txt6
-rw-r--r--lib/plugins/usermanager/lang/eo/intro.txt2
-rw-r--r--lib/plugins/usermanager/lang/eo/lang.php22
-rw-r--r--lib/plugins/usermanager/lang/eo/list.txt2
-rw-r--r--lib/plugins/usermanager/lang/fr/lang.php1
-rw-r--r--lib/plugins/usermanager/lang/it/lang.php1
-rw-r--r--lib/plugins/usermanager/lang/ko/lang.php39
-rw-r--r--lib/plugins/usermanager/lang/pl/lang.php1
-rw-r--r--lib/plugins/usermanager/lang/ro/lang.php1
-rw-r--r--lib/plugins/usermanager/lang/vi/lang.php5
-rw-r--r--lib/styles/screen.css18
-rw-r--r--lib/tpl/dokuwiki/css/_links.css6
-rw-r--r--lib/tpl/dokuwiki/css/basic.css23
-rw-r--r--lib/tpl/dokuwiki/css/design.css61
-rw-r--r--lib/tpl/dokuwiki/css/pagetools.css7
-rw-r--r--lib/tpl/dokuwiki/css/print.css12
-rw-r--r--lib/tpl/dokuwiki/images/apple-touch-icon.pngbin17728 -> 6399 bytes
-rw-r--r--lib/tpl/dokuwiki/images/bullet.pngbin199 -> 112 bytes
-rw-r--r--lib/tpl/dokuwiki/images/button-dw.pngbin404 -> 398 bytes
-rw-r--r--lib/tpl/dokuwiki/images/button-rss.pngbin191 -> 180 bytes
-rw-r--r--lib/tpl/dokuwiki/images/closed-rtl.pngbin170 -> 118 bytes
-rw-r--r--lib/tpl/dokuwiki/images/closed.pngbin165 -> 119 bytes
-rw-r--r--lib/tpl/dokuwiki/images/email.pngbin0 -> 502 bytes
-rw-r--r--lib/tpl/dokuwiki/images/external-link.pngbin0 -> 758 bytes
-rw-r--r--lib/tpl/dokuwiki/images/icons-license.txt5
-rw-r--r--lib/tpl/dokuwiki/images/link_icon.gifbin942 -> 0 bytes
-rw-r--r--lib/tpl/dokuwiki/images/logo.pngbin12212 -> 3820 bytes
-rw-r--r--lib/tpl/dokuwiki/images/mail_icon.gifbin918 -> 0 bytes
-rw-r--r--lib/tpl/dokuwiki/images/open.pngbin174 -> 118 bytes
-rw-r--r--lib/tpl/dokuwiki/images/pagetools-sprite.pngbin8178 -> 5931 bytes
-rw-r--r--lib/tpl/dokuwiki/images/resizecol.pngbin225 -> 158 bytes
-rw-r--r--lib/tpl/dokuwiki/images/search.pngbin400 -> 316 bytes
-rw-r--r--lib/tpl/dokuwiki/images/sitetools.pngbin0 -> 2225 bytes
-rw-r--r--lib/tpl/dokuwiki/images/toc-arrows.pngbin322 -> 225 bytes
-rw-r--r--lib/tpl/dokuwiki/images/toc-bullet.pngbin211 -> 121 bytes
-rw-r--r--lib/tpl/dokuwiki/images/unc.pngbin0 -> 517 bytes
-rw-r--r--lib/tpl/dokuwiki/images/windows.gifbin223 -> 0 bytes
611 files changed, 20374 insertions, 8809 deletions
diff --git a/.gitignore b/.gitignore
index f9155eaed..eb2474a3f 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 099290a0d..a4206f489 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 000000000..6c3d6aaa8
--- /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 aa1756114..000000000
--- 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 @@&nbsp;<span class="diff-deletedline"><del>' . $lang['deleted'] .
- '</del></span>&nbsp;<span class="diff-addedline">' . $lang['created'] .
- '</span></td></tr>
-
-<tr><td colspan="4">example&nbsp;<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&nbsp;<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 ff092c2de..000000000
--- 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 2a420ffd4..000000000
--- 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 936ed1d76..000000000
--- 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 2db8b64ae..000000000
--- 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 cc5579c71..000000000
--- 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 a0f7c9224..000000000
--- 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 e41c501fe..000000000
--- 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 6e9ef0742..000000000
--- 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 e802277f1..000000000
--- 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 ed7fce76e..000000000
--- 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 74d956f43..000000000
--- 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 69c57dfb5..000000000
--- 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 65d64e579..000000000
--- 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">&lt;b&gt;bold&lt;/b&gt;</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">&lt;b&gt;bold&lt;/b&gt;</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 a9a6dfdbc..000000000
--- 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">&lt;script&gt;alert(&#039;&quot;alert&quot;&#039;);&lt;/script&gt;</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&amp;h=20&amp;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.'&amp;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.'&amp;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.' &crarr;" 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.' &crarr;" 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 000000000..14344d778
--- /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 000000000..ff1299393
--- /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 000000000..00e8c10be
--- /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 000000000..4adee0d4b
--- /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 000000000..e47c06329
--- /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 000000000..66760b1e0
--- /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 000000000..6d20afb28
--- /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 000000000..2750a3edf
--- /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 000000000..4c1dfa3da
--- /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(' ', '&nbsp;', $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*)(\')([^\']*)(?:&lt;|%3C)\\?(?:php)?(.*?)(?:\\?(?:&gt;|%3E))([^\']*)\'@s',
+ '@(<(?!\\?)(?:[^>]|\\?>)+\\w+\\s*=\\s*)(")([^"]*)(?:&lt;|%3C)\\?(?:php)?(.*?)(?:\\?(?:&gt;|%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", "&#10;", "&#9;", "%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
index e69de29bb..e69de29bb 100644
--- a/_test/cases/inc/search/data/ns1/ns3/page3.txt
+++ b/_test/data/_dummy
diff --git a/_test/cases/inc/search/data/ns1/page1.txt b/_test/data/attic/_dummy
index e69de29bb..e69de29bb 100644
--- a/_test/cases/inc/search/data/ns1/page1.txt
+++ b/_test/data/attic/_dummy
diff --git a/_test/cases/inc/search/data/ns1/page2.txt b/_test/data/cache/_dummy
index e69de29bb..e69de29bb 100644
--- a/_test/cases/inc/search/data/ns1/page2.txt
+++ b/_test/data/cache/_dummy
diff --git a/_test/cases/inc/search/data/ns2/nopage.ext b/_test/data/index/_dummy
index e69de29bb..e69de29bb 100644
--- a/_test/cases/inc/search/data/ns2/nopage.ext
+++ b/_test/data/index/_dummy
diff --git a/_test/cases/inc/search/data/ns2/page1.txt b/_test/data/locks/_dummy
index e69de29bb..e69de29bb 100644
--- a/_test/cases/inc/search/data/ns2/page1.txt
+++ b/_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 000000000..b2306ac95
--- /dev/null
+++ b/_test/data/media/wiki/dokuwiki-128.png
Binary files differ
diff --git a/_test/data/media_attic/_dummy b/_test/data/media_attic/_dummy
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/_test/data/media_attic/_dummy
diff --git a/_test/data/media_meta/_dummy b/_test/data/media_meta/_dummy
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/_test/data/media_meta/_dummy
diff --git a/_test/data/meta/_dummy b/_test/data/meta/_dummy
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/_test/data/meta/_dummy
diff --git a/_test/data/pages/wiki/dokuwiki.txt b/_test/data/pages/wiki/dokuwiki.txt
new file mode 100644
index 000000000..e6fac5b65
--- /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 000000000..0b5480949
--- /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 000000000..e69de29bb
--- /dev/null
+++ b/_test/data/tmp/_dummy
diff --git a/_test/debug.note b/_test/debug.note
deleted file mode 100644
index 28c34d8ee..000000000
--- 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 64ece4762..000000000
--- 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 730f8d8a8..000000000
--- 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 3ad88119d..000000000
--- 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 9ef5b7b8f..000000000
--- 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 684acfcfa..000000000
--- 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 06efd2694..000000000
--- 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 220aa6c1b..000000000
--- 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 7ca70f204..000000000
--- 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 97fb1bee0..000000000
--- 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="&quot;";
- break;
- case 38:
- $character="&amp;";
- break;
- case 39:
- $character="&apos;";
- break;
- case 60:
- $character="&lt;";
- break;
- case 62:
- $character="&gt;";
- 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 000000000..13676f207
--- /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 3dd290712..000000000
--- 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 ae56d2c20..000000000
--- 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 8b93efec3..000000000
--- 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 c20d8bb4f..000000000
--- 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 cb16d4f1b..000000000
--- 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 000000000..ea48ec6a5
--- /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 000000000..d88399cbe
--- /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
index 56806a862..21db304e0 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
index d4a4d2bdb..426353291 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 000000000..972df11f4
--- /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 000000000..00e70d4c7
--- /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
index 68c108165..5b569cd98 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
index 31321bea1..b8ec70980 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'),
'&#x6a;&#x6f;&#x6e;&#x2d;&#x64;&#x6f;&#x65;&#x40;&#x65;&#x78;&#x61;&#x6d;&#x70;&#x6c;&#x65;&#x2e;&#x63;&#x6f;&#x6d;');
}
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 000000000..a076ce069
--- /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 000000000..2e34dcae3
--- /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:&amp;a=b&amp;c=d&amp;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:&amp;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:&amp;a=b&amp;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
index 5d5fa72af..02242a807 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 000000000..bb0cdd424
--- /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 000000000..9cae3736a
--- /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 000000000..26a0f86db
--- /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
index aa63b0ce9..fabf03fa0 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
index a22172feb..af5a8b318 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 000000000..761b7ddbc
--- /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
index 28fa86486..f38486925 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
index bc9be572d..b8afd607e 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 000000000..ca939d885
--- /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
index d8c88765e..25e6b1f7b 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
index a5a36e35b..52ddf6228 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 000000000..b2c74a257
--- /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
index 167229c7f..9c5781b24 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
index 6eddeb5ea..0fcd58666 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
index 9aa4ee8b7..23a2405d4 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
index c65ed1866..41a441658 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 000000000..d0965a13e
--- /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 000000000..e9efef0d3
--- /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
index 692882c6c..6264f8b55 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
index e3571d8e7..f3b5ddf56 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
index 688bac2eb..a1bf7d2ba 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
index 27ec3c78b..096f2e227 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
index d0fb19570..529efac6e 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
index 6e61da1a1..e4ef1f83e 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
index 7a00f3599..f7a01a7e5 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
index ebc5da604..ae14671c1 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
index 77e323799..b2dae1039 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
index d277560c7..f0367dac0 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
index 12898860c..96789c38c 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
index dd69564b4..f20ba5e8b 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
index 8319da298..0683848f1 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
index f03d13ce1..49152d8db 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
index 1227e5578..175b72dfc 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 000000000..e69de29bb
--- /dev/null
+++ b/_test/tests/inc/search/data/ns1/ns3/page3.txt
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 000000000..e69de29bb
--- /dev/null
+++ b/_test/tests/inc/search/data/ns1/page1.txt
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 000000000..e69de29bb
--- /dev/null
+++ b/_test/tests/inc/search/data/ns1/page2.txt
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 000000000..e69de29bb
--- /dev/null
+++ b/_test/tests/inc/search/data/ns2/nopage.ext
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 000000000..e69de29bb
--- /dev/null
+++ b/_test/tests/inc/search/data/ns2/page1.txt
diff --git a/_test/cases/inc/search/search.test.php b/_test/tests/inc/search/search.test.php
index a6f15e9b6..33cc80e74 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
index 20f6ba3a3..a704fd0e8 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
index 3e6d35bc7..bdebd9d45 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 = '&#252;';
- $this->assertEqual(utf8_tohtml($in),$out);
+ $this->assertEquals(utf8_tohtml($in),$out);
}
function test_from_3byte(){
$in = "\xe2\x99\x8a";
$out = '&#x264a;';
- $this->assertEqual(utf8_tohtml($in),$out);
+ $this->assertEquals(utf8_tohtml($in),$out);
}
function test_from_4byte(){
$in = "\xf4\x80\x80\x81";
$out = '&#x100001;';
- $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 = '&#252;';
- $this->assertEqual(utf8_unhtml($in),$out);
+ $this->assertEquals(utf8_unhtml($in),$out);
}
function test_to_3byte(){
$out = "\xe2\x99\x8a";
$in = '&#x264a;';
- $this->assertEqual(utf8_unhtml($in),$out);
+ $this->assertEquals(utf8_unhtml($in),$out);
}
function test_to_4byte(){
$out = "\xf4\x80\x80\x81";
$in = '&#x100001;';
- $this->assertEqual(utf8_unhtml($in),$out);
+ $this->assertEquals(utf8_unhtml($in),$out);
}
function test_without_entities(){
$out = '&amp;#38;&amp;#38;';
$in = '&amp;#38;&#38;amp;#38;';
- $this->assertEqual(utf8_unhtml($in),$out);
+ $this->assertEquals(utf8_unhtml($in),$out);
}
function test_with_entities(){
$out = '&#38;&amp;#38;';
$in = '&amp;#38;&#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
index d6bf51e95..d6bf51e95 100644
--- a/_test/cases/inc/utf8_kanaromaji.txt
+++ b/_test/tests/inc/utf8_kanaromaji.txt
diff --git a/_test/cases/inc/utf8_romanize.test.php b/_test/tests/inc/utf8_romanize.test.php
index 950c8842a..d08346faa 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
index 481f47650..c9dc3205f 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
index 2806d34f1..758e8c9d4 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
index 424f47d11..fde8c5d02 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
index d8b8746f2..6a12a01fd 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
index 527071bbe..a7c87b6a7 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
index a444d0086..c89b69b2c 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
index 4702d35d3..aa8d82933 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
index 771dc1640..771dc1640 100644
--- a/_test/cases/lib/exe/js_js_compress/test-CommentInDoubleQuotes1-in.js
+++ b/_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
index 7d6a5346e..7d6a5346e 100644
--- a/_test/cases/lib/exe/js_js_compress/test-CommentInDoubleQuotes1-out.js
+++ b/_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
index a59f1b774..a59f1b774 100644
--- a/_test/cases/lib/exe/js_js_compress/test-CommentInDoubleQuotes2-in.js
+++ b/_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
index caa2fdca2..caa2fdca2 100644
--- a/_test/cases/lib/exe/js_js_compress/test-CommentInDoubleQuotes2-out.js
+++ b/_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
index 845c59bdf..845c59bdf 100644
--- a/_test/cases/lib/exe/js_js_compress/test-CommentInSingleQuotes1-in.js
+++ b/_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
index b2696cb98..b2696cb98 100644
--- a/_test/cases/lib/exe/js_js_compress/test-CommentInSingleQuotes1-out.js
+++ b/_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
index 0459a4891..0459a4891 100644
--- a/_test/cases/lib/exe/js_js_compress/test-CommentInSingleQuotes2-in.js
+++ b/_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
index 21b6a410e..21b6a410e 100644
--- a/_test/cases/lib/exe/js_js_compress/test-CommentInSingleQuotes2-out.js
+++ b/_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
index b9d16a7bd..b9d16a7bd 100644
--- a/_test/cases/lib/exe/js_js_compress/test-CommentMultiline-in.js
+++ b/_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
index 8eed2e57a..8eed2e57a 100644
--- a/_test/cases/lib/exe/js_js_compress/test-CommentMultiline-out.js
+++ b/_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
index 302d7160b..302d7160b 100644
--- a/_test/cases/lib/exe/js_js_compress/test-CommentSingleLine-in.js
+++ b/_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
index 8eed2e57a..8eed2e57a 100644
--- a/_test/cases/lib/exe/js_js_compress/test-CommentSingleLine-out.js
+++ b/_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
index afc824762..afc824762 100644
--- a/_test/cases/lib/exe/js_js_compress/test-IfThenElseBraces-in.js
+++ b/_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
index 2a982a98e..2a982a98e 100644
--- a/_test/cases/lib/exe/js_js_compress/test-IfThenElseBraces-out.js
+++ b/_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
index 79d10775e..79d10775e 100644
--- a/_test/cases/lib/exe/js_js_compress/test-IfThenElseNoBraces-in.js
+++ b/_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
index b087c42fc..b087c42fc 100644
--- a/_test/cases/lib/exe/js_js_compress/test-IfThenElseNoBraces-out.js
+++ b/_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
index 503e07283..503e07283 100644
--- a/_test/cases/lib/exe/js_js_compress/test-RegexpBackslash-in.js
+++ b/_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
index e5c83770c..e5c83770c 100644
--- a/_test/cases/lib/exe/js_js_compress/test-RegexpBackslash-out.js
+++ b/_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
index 2741e74c2..2741e74c2 100644
--- a/_test/cases/lib/exe/js_js_compress/test-RegexpSimple-in.js
+++ b/_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
index bb530b0a1..bb530b0a1 100644
--- a/_test/cases/lib/exe/js_js_compress/test-RegexpSimple-out.js
+++ b/_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
index c7dbdba3d..c7dbdba3d 100644
--- a/_test/cases/lib/exe/js_js_compress/test-RegexpSimpleWhitespace-in.js
+++ b/_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
index 5c2db510b..5c2db510b 100644
--- a/_test/cases/lib/exe/js_js_compress/test-RegexpSimpleWhitespace-out.js
+++ b/_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
index debb983e5..debb983e5 100644
--- a/_test/cases/lib/exe/js_js_compress/test-RegexpString-in.js
+++ b/_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
index 92ffc7d47..92ffc7d47 100644
--- a/_test/cases/lib/exe/js_js_compress/test-RegexpString-out.js
+++ b/_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
index 0c84c66ec..0c84c66ec 100644
--- a/_test/cases/lib/exe/js_js_compress/test-StatementDoWhile-in.js
+++ b/_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
index 593e9a664..593e9a664 100644
--- a/_test/cases/lib/exe/js_js_compress/test-StatementDoWhile-out.js
+++ b/_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
index 1b0aeb6ff..1b0aeb6ff 100644
--- a/_test/cases/lib/exe/js_js_compress/test-StatementForIn-in.js
+++ b/_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
index 95c85871e..95c85871e 100644
--- a/_test/cases/lib/exe/js_js_compress/test-StatementForIn-out.js
+++ b/_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
index 61f357f34..61f357f34 100644
--- a/_test/cases/lib/exe/js_js_compress/test-StatementNew-in.js
+++ b/_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
index 0d4ff7f58..0d4ff7f58 100644
--- a/_test/cases/lib/exe/js_js_compress/test-StatementNew-out.js
+++ b/_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
index 39ffc1239..39ffc1239 100644
--- a/_test/cases/lib/exe/js_js_compress/test-StatementSwitchCase-in.js
+++ b/_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
index e51c07371..e51c07371 100644
--- a/_test/cases/lib/exe/js_js_compress/test-StatementSwitchCase-out.js
+++ b/_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
index 57fe13b90..57fe13b90 100644
--- a/_test/cases/lib/exe/js_js_compress/test-StringDoubleQuotes-in.js
+++ b/_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
index 9f91fc83d..9f91fc83d 100644
--- a/_test/cases/lib/exe/js_js_compress/test-StringDoubleQuotes-out.js
+++ b/_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
index bb5f9951a..bb5f9951a 100644
--- a/_test/cases/lib/exe/js_js_compress/test-StringSingleQuotes-in.js
+++ b/_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
index f38b26544..f38b26544 100644
--- a/_test/cases/lib/exe/js_js_compress/test-StringSingleQuotes-out.js
+++ b/_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 000000000..b4926d2ba
--- /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 000000000..180fd0d0d
--- /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 000000000..621b9f9b8
--- /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 000000000..188d834cb
--- /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 000000000..ac6d1ee45
--- /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 000000000..953960bb7
--- /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 000000000..39c43cd3b
--- /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 000000000..8c4ad9cf8
--- /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 f7991cc0b..000000000
--- 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 5c0b28114..cbd42115d 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 24529b06c..381b93f86 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 000000000..b2c79970d
--- /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 6576eeb5f..df3c78482 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 0b5480949..dd3154ef0 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 e699c818b..4499bc197 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 793180ca6..b8db5387f 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 01926b20c..0a7ce8e7c 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 000000000..f4174404a
--- /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 2dea44003..7f89005ff 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 000000000..fccf1dad9
--- /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 3fb1349d2..f85766723 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 546832100..36c518881 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 4a2e200ae..e85cbfccc 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 59ef1cb54..d0f21c825 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 bc4168527..e161c2939 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 0a75f2eab..768260bbf 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='&amp;'){
+function buildURLparams($params, $sep = '&amp;') {
$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='&amp;'){
*
* @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='&amp;'){
+function wl($id = '', $urlParameters = '', $absolute = false, $separator = '&amp;') {
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='&amp;'){
*
* @author Ben Coburn <btcoburn@silicodon.net>
*/
-function exportlink($id='',$format='raw',$more='',$abs=false,$sep='&amp;'){
+function exportlink($id = '', $format = 'raw', $more = '', $abs = false, $sep = '&amp;') {
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='&amp;'){
* 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='&amp;',$abs=false){
+function ml($id = '', $more = '', $direct = true, $sep = '&amp;', $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='&amp;',$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='&amp;',$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 79567fc56..e4a3df353 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 621cb64c1..4e81f85c8 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 620237296..8f4db111d 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 31d2da49f..aedc64f84 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 */
@@ -732,6 +736,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.
*
* If GESHI_HEADER_DIV is used, the code is surrounded in a "div".This
@@ -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 48b671f4a..7b1efec9a 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 000000000..880211d5b
--- /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 000000000..b1edcaa5b
--- /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 000000000..5f9f2b9be
--- /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 000000000..efd800809
--- /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 942d2397e..6ce930c7c 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 41d66edd2..47eec3950 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 4aab929dc..ba27573cc 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 c6b0597bb..8f8390952 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 000000000..1f79f10eb
--- /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 34704eb22..ace3862ef 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 9e214f2e1..c64a4974d 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 f4cf9ae3f..9feefceaf 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 d54e24023..2093d86b8 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 4a9d6c8e2..c011de960 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 0883f9f54..901125bdc 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 6a3528334..c162f7ade 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 c8ef4404b..7f69d2bd5 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 f74f50c3a..949d0ecb6 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 5d540315c..a1ab68ef1 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 000000000..8270fb26e
--- /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 dad391c8a..8edb3f30e 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 7ac869304..ce409e8a4 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 ba44e6caf..0529ec3c5 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 e47e0665c..13685608b 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 e43ec4635..15f24fdbe 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 f52df9cb8..7cec792a9 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 09d4ee40e..f56afee5f 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 b0e2987d7..7db6d3d50 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 000000000..4e5429cda
--- /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 1a034ae08..f80dc2ed2 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 74310d6d9..6587cfed9 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 9277e5192..00e3c6c5b 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 ee17fdf53..31d32fa45 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 dd508eec7..f340c39ac 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 e1baad4db..dcd05dbf5 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 142c7743a..975572c64 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 4bcb9a3ae..bf21c7603 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 ccd855b0b..fcf45c691 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 c1220a06f..c3ed01d4c 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 000000000..f85541973
--- /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 8523d16b7..3f6aa3079 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 30f5a93f2..289ab9947 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 6a9c3c2bd..e73f22d50 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 51f261486..a8706bd26 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 81c607c10..e994a0aa3 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 5ef349d52..107d07b1a 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 4762ed906..bac2beea8 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 ff54af8f9..d7f19f832 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 5570406da..09cc50873 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 276e9e882..e8de7a525 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 9484d3766..e84e1550a 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 04b6792d7..1d5036d36 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 000000000..9bdbc137b
--- /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 3e61b57cb..e220c839b 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 89cef7965..66427acc7 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 91a104840..68f875499 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 000000000..764461fc2
--- /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 d98de2f37..ede55917c 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 => ''
),
- // ASCIIcodes
+ // 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 000000000..afd4ad7c4
--- /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 000000000..13056b78b
--- /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 000000000..ce75f2057
--- /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 3a1d24021..e472f2271 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 6eac52ae0..247e3e4b4 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 35fc8ca6f..8ac2904eb 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 56146958c..a900e4b60 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 0fc89bb59..b89db0382 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 ed7ee2ffa..284b589a0 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 a7ccf5fee..1d70d752c 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 66bea6dc7..898f9ef10 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 e1c88e185..1dc8f8d24 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 f9a37ed07..d810db3f0 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 3f8a06c4f..57c42d4c8 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 980561d35..59b343eb1 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 000000000..a71c2515e
--- /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 f2a2e9ab5..8a250245a 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}&amp;num=100&amp;hl=en&amp;as_occt=url&amp;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 7b2385de7..e35a322a4 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 4997a26c3..ce1b3bf69 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 6cb61f87c..67d8d114a 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 50a0f80c6..2cce643df 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 301513e4e..68ba72328 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 000000000..7ffd4a05d
--- /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' => '(?<=&lt;|&lt;\/)',
+ 'DISALLOWED_AFTER' => '(?=\s|\/|&gt;)',
+ )
+ )
+ )
+);
+
+?> \ No newline at end of file
diff --git a/inc/geshi/icon.php b/inc/geshi/icon.php
index 0712c21c3..e68c2f17f 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 d2d9a92fa..84e57f30b 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 e48cc045c..2ca7feb0b 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 9ec8cdfd9..b0878e298 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 cd800a8eb..06fd2b41b 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 94c278f03..3d6341fee 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 61154c7ef..5d464c922 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(
- '=', '&lt;', '&lt;.', '&lt;:', //verbs
- '_:','&gt;', '&gt;.', '&gt;:',
- '+', '+.', '+:', '*', '*.', '*:', '-', '-.', '-:', '%', '%.', '%:',
- '^', '^.', '$', '$.', '$:', '~.', '~:', '\|', '|.', '|:',
- ',', ',.', ',:', ';', ';:', '#', '#.', '#:', '!', '/:', '\:',
- '[', '[:', ']', '{', '{.', '{:', '{::', '}.', '}:',
- '&quot;.', '&quot;:', '?', '?.',
- '~', '\/;', '\\', '/.', '\\.', '}', //adverbs
- '^:', ';.', '!.', '!:', //conj
- '&quot;', '`', '`:', '@', '@.', '@:',
- '&amp;', '&amp;.', '&amp;:', '&amp;.:',
- '_.', //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 3269dffe2..2f3d9fb96 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 bc9af739a..6163995f8 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 429cdd653..93997a70c 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 54e653ed1..9374ec1ca 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 62cb54652..f3f29e2e3 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 e47e597ef..553763d61 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 1a2d2082b..6fe0df1ef 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 1ba3d409e..91c034236 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 000000000..390fe19a9
--- /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 a8f50691e..82aa7f69b 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 000000000..f58be2da8
--- /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 a3e22a7be..55aacc263 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 fb77bd6d3..b4eba764c 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 a804913cc..bcbad11c6 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 862adbc82..5b755e55a 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 1ef2f3eee..c2b2f45f5 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 b7e313212..51852414b 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 e5f40969b..828e2b91c 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 abeaa54ea..2ec6c0b88 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 543b73c8b..081578158 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 f3da7fcf2..b6f431ea8 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 689552312..2d5d73425 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 0025d4e22..7d365263d 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 1f9c12b78..5c64a0d49 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 1b7df83aa..e9e0346e6 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 3e90dce29..8e57ad7b9 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 042e7404a..131543baa 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 ad827a3e6..21b2e255d 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 59247ff69..70f12de48 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 df4c9d50e..72a071aae 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 ca171733f..b85377d1c 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 027e86588..508f116b7 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 5631a8389..ab05ed82b 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 8339f3fb8..33b828df5 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 5a5c5940f..3b2c593ef 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 000000000..5ab3642e5
--- /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 => '-&gt;'
+ ),
+ '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 2e2a82fb2..d988409e8 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 46e6a22aa..4e36f3c30 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 6f6e13fc2..f4e15893a 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 f57c3f044..bd3d30501 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 e470e0dd4..bc80735c4 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 3af03bfc2..cfab3d34f 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 cd594d4ca..f371a6457 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 7ee5729a6..2252a11de 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 a67cf2858..1944bfdb3 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 b656c105e..9819c03f5 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 5d1c4320b..487fd0515 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 9ea20fc78..701e0b59c 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 d59a609d5..a89e97ff0 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 c28d985f4..d47737883 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 ec6981134..b36544213 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 626a768b0..94e098293 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 2b860ccd6..a3de9082e 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 82c64ae52..b9fe1aff2 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 000000000..1d6eefd9b
--- /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 e0145362c..8428ff4b6 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 7f89fe2a4..0245b33ad 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 c987a013e..eeda49f49 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 ef86c242c..f978f3f5b 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 c90538809..1d9003030 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 000000000..dd57d9b0a
--- /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&amp;q={FNAMEL}+site:www.proftpd.org+inurl:docs&amp;btnI=I%27m%20Feeling%20Lucky',
+ 2 => '',
+ 3 => 'http://www.google.com/search?hl=en&amp;q={FNAMEL}+site:www.proftpd.org+inurl:docs&amp;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' => '(?<=&lt;|&lt;\/)',
+ 'DISALLOWED_AFTER' => '(?=\s|\/|&gt;)',
+ ),
+ 4 => array(
+ 'DISALLOWED_BEFORE' => '(?<=\s)(?<!=)',
+ 'DISALLOWED_AFTER' => '(?!\+)(?=\/|(?:\s+\w+)*\s*&gt;)',
+ )
+ )
+ )
+);
+
+?> \ No newline at end of file
diff --git a/inc/geshi/progress.php b/inc/geshi/progress.php
index 90c3bf0fa..affb62000 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 4dd01ff7e..74d03374c 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 9fc8b8da4..08ba9a419 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 0352ac2a1..b7232873a 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 b24986f57..213868d74 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 000000000..141d521f9
--- /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 1be7e2953..38d9a0b02 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 9629ded4a..e4bb92da8 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 da4372258..ff61449d0 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 64d83ea16..0e825040e 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 a3889eec9..1e5dff626 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 bb2e845f3..9878f42f6 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 baf286b7f..c0713a64c 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 96dc9556f..243df94c7 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 b73f5ea77..41cdd158b 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 47ecbb2e2..c38d5a218 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 c4d426fa0..6f4ce285e 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 202c06c83..12462cf3b 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 2e2430bff..f687e79a7 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 d1ff6fc16..cd1ca70f1 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 876dc09a6..27aaf522b 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 b475ad711..008bfcd1d 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 7f4489289..1d8199936 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 9e45e850d..6f7870196 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 19405c097..142fd117b 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 2a07ccd46..c948ff261 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 443bf7b4c..510ad04c4 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 66f459293..dd219f599 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 693c698d6..c496cea6f 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 b915b087d..dddf51934 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 525271428..c1e380689 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 edad62df3..42fffc886 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 000000000..e06aa8ca7
--- /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 334398a87..a9d6b0745 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 f24d86505..dd6545eb5 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 f74775214..563bb993a 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 14c1d7172..9e4211eb9 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 6856933c7..f6ce941d4 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 f4f93ad2e..68abc272e 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 7d804257f..322f34bae 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 5afd7de8d..a51466dcd 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 c47775d44..3e19b60ce 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 9b4b24179..ae851cd08 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 949e61c14..d27fe070f 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 a2d85a6df..94a2debf1 100644
--- a/inc/geshi/xbasic.php
+++ b/inc/geshi/xbasic.php
@@ -4,9 +4,8 @@
* ----------
* Author: Jos Gabriel Moya Yangela (josemoya@gmail.com)
* Copyright: (c) 2005 Jos Gabriel Moya Yangela (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 efd3e6c33..4a420d1b7 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 5cde8e171..e1fff61b5 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 216c46eaf..d4d7b457d 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 000000000..1b3ce96f2
--- /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 f28593cd2..cb92e9692 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 000000000..b32b8950a
--- /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 0b297a347..a20ee5c39 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 2b8486906..ff752cd0f 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 d57e12d7b..a28050736 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 af92243c9..350e26695 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 000000000..2bbd4a21a
--- /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 57b7240c5..1b1770965 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 82683c57f..f85be8a9f 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 c0089c1b7..1ee33da09 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 093125aa6..61e5ef3d8 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 63ffd3008..cfbe04396 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 2ba220e64..7f0bf05e9 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 000000000..f9f80fd80
--- /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 fac8564bd..35011b6e6 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 efe27d866..4c38b9326 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 f2abe6d77..673c4c32a 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 603af39e1..cd0192942 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 '&quot;Konservi'&quot;, do via versio estos konservita. Presonte butonon '&quot;Rezigni&quot; 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 b35fe0412..3cd6c76bf 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 ac5474ef1..5829a7db1 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 fa43ecb74..32ddc83f6 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 9239c7fe6..29b3382c5 100644
--- a/inc/lang/eo/edit.txt
+++ b/inc/lang/eo/edit.txt
@@ -1 +1 @@
-Redaktu paĝon kaj poste premu butonon titolitan '&quot;Konservi'&quot;. 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 4bab50b93..1640baa91 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 4ef720cb2..ac1f32cba 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&gt;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 9f43ae82e..2e741e7c2 100644
--- a/inc/lang/eo/install.html
+++ b/inc/lang/eo/install.html
@@ -1,9 +1,9 @@
-&lt;p&gt;Tiu ĉi paĝo helpas en la unua instalo kaj agordado de &lt;a href=&quot;http://dokuwiki.org&quot;&gt;DokuWiki&lt;/a&gt;. Pli da informo pri tiu instalilo estas disponebla en ĝia propra &lt;a href=&quot;http://dokuwiki.org/installer&quot;&gt;dokumentada paĝo&lt;/a&gt;.&lt;/p&gt;
+<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>
-&lt;p&gt;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 &lt;strong&gt;devas&lt;/strong&gt; 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>
-&lt;p&gt;Tiu ĉi instalilo difinos vian DokuWiki-an agordadon por &lt;acronym title=&quot;alir-kontrola listo&quot;&gt;ACL&lt;/acronym&gt;, 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.&lt;/p&gt;
+<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>
-&lt;p&gt;Spertuloj aŭ uzantoj kiuj bezonas specialajn agordrimedojn devus uzi tiujn ligilojn por havi pli detalojn pri &lt;a href=&quot;http://dokuwiki.org/install&quot;&gt;instaladaj instrukcioj&lt;/a&gt;
-kaj &lt;a href=&quot;http://dokuwiki.org/config&quot;&gt;agordadaj difinoj&lt;/a&gt;.&lt;/p&gt; \ 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 41c6b80d1..b2c64b2a6 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 68963da75..abdc05916 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 b2cb3b49d..2765301ea 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 486f61f5a..53ab6209d 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 &quot;Krei paĝon&quot;.
+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 dc44d194b..e951a551b 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 &quot;Malnovaj revizioj&quot; 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 ef744059e..6dc42a9de 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 ac2e75d00..b3faef69e 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 f227752b1..5abc3d13e 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 734eb1654..b8c642f43 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 ffd9936e2..2454ea630 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 57d5ca1f4..10b303d3b 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 8b9ea8501..9ef6013c0 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 57b4b0408..556477a07 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 e3a8a1747..3ece4f2fb 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 38757ae04..d27c569a2 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 d6bc69887..42fc79ad1 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 175e3f3d2..1957e85e0 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 d51c5ca15..431fd0251 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 a3de0c840..4b52ff20a 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 e7c327a60..1cb48ade6 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 140c584c3..a77be6965 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 000000000..7b1990ca0
--- /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 eda33898b..70082caae 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 000000000..24a2bc8a9
--- /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 000000000..450dd8301
--- /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 057fa5a54..490c84cc9 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 7dd0f58b3..c61db1a42 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 1711945e4..ce77ca5a7 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 529296359..43988a62b 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 316a660c0..f384a0a8c 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 8cfb1da43..76b488d90 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 3df8a5e86..861834e5d 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 9b59524f7..f52326a33 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 2715448d3..136eef733 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 7ca9488e0..24eb9450c 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 6b1bfaf75..f73b91294 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 84fdb3c48..7b4e30a49 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 24525fc46..176a792d6 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 1aae449df..160b899d3 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 5c496435e..219fe6e0b 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 000000000..885730428
--- /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 f8380bd84..87ac969d2 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 e1b4093b4..6758ce4ec 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 e0a22c59a..02b23d17c 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 8bcc6a1eb..6563874ee 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 c022a52a9..1920f4a20 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 6b5d7b3db..9b2ec822f 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 f693c4bf1..f2ffb8c6f 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 24105efeb..6509bed91 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 4b1aa20a5..d06f93047 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 b06163e92..0ad46eb1e 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 b84674b82..ed909456f 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 12d11894d..64733d86d 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 198d9a428..2e8502b13 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 bdb41deba..4b5551ce5 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 2e9c87848..13459428f 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 31470f372..ed380ccee 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 2661a6a15..68adf0de9 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 1aa4d7efa..6bd1885e6 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 5ea331c05..ebf19d8ab 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 46c66a66b..675c0bd3f 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 96323394d..32781e6d4 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 e539050bc..9718d0900 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 4644f5e5d..911ffdc10 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 000000000..2ffe19a88
--- /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 3bde240d9..79d18bbf5 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 000000000..61772866e
--- /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 000000000..64d2d7d47
--- /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 21a6ecef4..41727e521 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 000000000..2eb8052f1
--- /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 084da8662..0c4a32544 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 28756e2a1..b06cb9158 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 231ab5d8c..eee624d96 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 0df1ddbe4..646dcbc45 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 e70ed5d5f..35acaeb62 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 b00316a7c..1c16f903c 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 076466c06..8a2031c4d 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 361e51e84..c9179f6b3 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'] = '“'; //&ldquo;
+$lang['doublequoteclosing'] = '”'; //&rdquo;
+$lang['singlequoteopening'] = '‘'; //&lsquo;
+$lang['singlequoteclosing'] = '’'; //&rsquo;
+$lang['apostrophe'] = '’'; //&rsquo;
$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 4265a79df..71a8b1a01 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 3fcdf5595..836e02d24 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 b03bb5224..93f474b18 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 0fa27d898..224bd1db0 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 589bbf067..798a20d33 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 81069a2c4..f02a25142 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 ffeffc7bf..eec69966b 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 943e3fff1..b9e9779ee 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 821ca9f7b..7ded7a808 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 9d125ce44..9ea0f5e7f 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 000000000..0f00d95b1
--- /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 000000000..a9d59fdd3
--- /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 f3ab5bcdd..b676518e7 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 dd0193fa0..2462a1deb 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 db00258e2..c94d14624 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 9384929bf..25d7cf131 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 208d7dae9..11636fb91 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 c94f17ad0..d1ee0397a 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 131f34020..a18d7151f 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 54986e14e..7b7c19c6b 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 61db2be9f..a1d406209 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 95e2af05b..738a29503 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 4b72014b2..7c54f3e2e 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 cf3682f11..5e6c197d0 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 000000000..1d9dd562a
--- /dev/null
+++ b/lib/images/fileicons/ico.png
Binary files differ
diff --git a/lib/plugins/acl/lang/eo/help.txt b/lib/plugins/acl/lang/eo/help.txt
index cc3f63e5a..488e84a1b 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&gt;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 72ce576ee..de75c2dd7 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 &lt;b class=&quot;acluser&quot;&gt;%s&lt;/b&gt; aktuale havas la jenajn rajtojn en la paĝo &lt;b class=&quot;aclpage&quot;&gt;%s&lt;/b&gt;: &lt;i&gt;%s&lt;/i&gt;.';
-$lang['p_user_ns'] = 'Uzanto &lt;b class=&quot;acluser&quot;&gt;%s&lt;/b&gt; aktuale havas la jenajn rajtojn en la nomspaco &lt;b class=&quot;aclns&quot;&gt;%s&lt;/b&gt;: &lt;i&gt;%s&lt;/i&gt;.';
-$lang['p_group_id'] = 'Anoj de la grupo &lt;b class=&quot;aclgroup&quot;&gt;%s&lt;/b&gt; aktuale havas la jenajn rajtojn en la paĝo &lt;b class=&quot;aclpage&quot;&gt;%s&lt;/b&gt;: &lt;i&gt;%s&lt;/i&gt;.';
-$lang['p_group_ns'] = 'Anoj de la grupo &lt;b class=&quot;aclgroup&quot;&gt;%s&lt;/b&gt; aktuale havas la jenajn rajtojn en la nomspaco &lt;b class=&quot;aclns&quot;&gt;%s&lt;/b&gt;: &lt;i&gt;%s&lt;/i&gt;.';
-$lang['p_choose_id'] = 'Bonvolu &lt;b&gt;enmeti uzanton aŭ grupon&lt;/b&gt; en la suba agordilo por rigardi aŭ redakti la aron da rajtoj por la paĝo &lt;b class=&quot;aclpage&quot;&gt;%s&lt;/b&gt;.';
-$lang['p_choose_ns'] = 'Bonvolu &lt;b&gt;enmeti uzanton aŭ grupon&lt;/b&gt; en la suba agordilo por rigardi aŭ redakti la aron da rajtoj por la nomspaco &lt;b class=&quot;aclns&quot;&gt;%s&lt;/b&gt;.';
-$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 a33a52bf0..7db8ae4ac 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 f789b979f..a55a2c0f3 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 516198ee5..377636682 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 6b1e77cf8..c8e1ce5cc 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 1b10b5232..bef2d2615 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 c278c918e..4d093216b 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 000000000..23e258678
--- /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 6237f79ba..ddf764dca 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 e79abe596..000000000
--- 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 b7154aa78..2eee4f41c 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 3855f4ac1..2e55446ec 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&amp;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 2151d7543..83c843b3a 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&amp;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&amp;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 c717d9a4d..5ed2f0ecb 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&gt;config]]. Por pli detaloj pri tiu ĉi kromaĵo, vidu [[doku&gt;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 3acb00545..de3c95bb5 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.
-&lt;br /&gt;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, &lt;br /&gt; 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 &lt;a href=&quot;http://www.php.net/strftime&quot;&gt;strftime&lt;/a&gt;)';
+$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 &lt;b&gt;malebligu se ne necese!&lt;/b&gt;';
+$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=&quot;nofollow&quot; 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!
-&lt;code&gt;400&lt;/code&gt; ĝis &lt;code&gt;600&lt;/code&gt; bitokoj estas bona grandeco. Indiku &lt;code&gt;0&lt;/code&gt; 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 &quot;HTTP 404/Paĝo ne trovita&quot; por ne ekzistantaj paĝoj';
-$lang['sitemap'] = 'Krei Guglan paĝarmapon &quot;sitemap&quot; (po kiom tagoj)';
-$lang['broken_iua'] = 'Ĉu la funkcio &quot;ignore_user_abort&quot; difektas en via sistemo? Tio povus misfunkciigi la serĉindekson. IIS+PHP/CGI estas konata kiel fuŝaĵo. Vidu &lt;a href=&quot;http://bugs.splitbrain.org/?do=details&amp;task_id=852&quot;&gt;Cimon 852&lt;/a&gt; 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 &quot;target&quot; (celo) por internaj ligiloj';
-$lang['target____interwiki'] = 'Parametro &quot;target&quot; (celo) por intervikiaj ligiloj';
-$lang['target____extern'] = 'Parametro &quot;target&quot; (celo) por eksteraj ligiloj';
-$lang['target____media'] = 'Parametro &quot;target&quot; (celo) por aŭdvidaĵaj ligiloj';
-$lang['target____windows'] = 'Parametro &quot;target&quot; (celo) por Vindozaj ligiloj';
-$lang['proxy____host'] = 'Retservilnomo de la &quot;Proxy&quot;';
-$lang['proxy____port'] = 'Pordo ĉe la &quot;Proxy&quot;';
-$lang['proxy____user'] = 'Uzantonomo ĉe la &quot;Proxy&quot;';
-$lang['proxy____pass'] = 'Pasvorto ĉe la &quot;Proxy&quot;';
-$lang['proxy____ssl'] = 'Uzi SSL por konekti al la &quot;Proxy&quot;';
+$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 &quot;Diff&quot;';
-$lang['rss_content_o_htmldiff'] = '&quot;Diff&quot;-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 &quot;lighttpd&quot; (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 4a67a0fc8..591e9f2fb 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&amp;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 9c348dcee..91c92bd85 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&amp;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 fb263fe00..a89123f8c 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&amp;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 22dd96ef6..f6b76ecfc 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 82863b684..5f90044e4 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&amp;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 77b8d6a1a..e0c9d7d7c 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&amp;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 7ebe5ba92..8441722cd 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&amp;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 d638e1eec..72b205b90 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 7255c30f9..87abe1be3 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 375c5d3bf..3d463fc72 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&amp;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 000000000..2933d8875
--- /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 5b7229c62..832dfe749 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&amp;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 b8b9660e2..000000000
--- 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 a472a954b..3607f56c6 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 65c44a758..1be94feb9 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 fbc6d3c36..8327e5ce3 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 8cc59843b..c97dddf56 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&gt;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 ab9af73e1..36e7eadff 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 &lt;em&gt;%s&lt;/em&gt;: 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 &lt;em&gt;%s&lt;/em&gt;. 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 bb0b49872..bf7a3739a 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 e675c5530..3994948a0 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 22ce0e6e6..b553d622b 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 b15b377a6..4fc6fd1d9 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 02459f1de..1d3bbbc03 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 50f6ca6f6..c57647e0b 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 000000000..2933d8875
--- /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 6ababd8e0..000000000
--- 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 de6cca579..9433e6001 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 8d9b3dde8..fd37efc70 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 &quot;Sendi datumaron&quot; 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 e992e12ce..c2bca23b1 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 c2bce4e9f..095439bf3 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 9ff7a7e8b..f235fd0fa 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 a7852f22c..9bf4ca8c6 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 e979b71d5..0af7ee2cc 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 01bc51044..5e6966402 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 e8b434dc5..12f0efe45 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 64d772d54..76a9464bd 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 9e9086b0d..8ba119dcb 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 000000000..2933d8875
--- /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 a893fb145..05eec26a8 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 &lt;i&gt;%s&lt;/i&gt;.';
+$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 9c5194b31..75c8bab68 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 79565655b..a0b676d77 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 a0164dc4f..30813fe49 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 da689c788..90cba9bce 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 30ab60fda..462841292 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 f1fcf727c..5ea802575 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 000000000..2933d8875
--- /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 000000000..5982c6933
--- /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 000000000..eee825fbd
--- /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 000000000..e829847b6
--- /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 000000000..a514d7774
--- /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 2ef373f66..5b5a94001 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 b5f1abc0e..75782fe23 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 714671afb..5be7222a9 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 948262a8f..882312820 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 34c510def..1e948baab 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 111267e5f..3754fea90 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 5bbf84370..cfc0ba327 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 7aac6cfb0..1b33cc4f8 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 000000000..2933d8875
--- /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 101ed3529..8ada48932 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 ef34a6706..c8f5b7c9e 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 e7590dbb7..e0b8cddfe 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 1bc667fb5..059decf49 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 f691d82a7..a40d525b3 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 9f43f5131..191d50c28 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 45fa4e7b0..fb5f108c0 100644
--- a/lib/tpl/dokuwiki/images/apple-touch-icon.png
+++ b/lib/tpl/dokuwiki/images/apple-touch-icon.png
Binary files differ
diff --git a/lib/tpl/dokuwiki/images/bullet.png b/lib/tpl/dokuwiki/images/bullet.png
index 5da537443..5e557b334 100644
--- a/lib/tpl/dokuwiki/images/bullet.png
+++ b/lib/tpl/dokuwiki/images/bullet.png
Binary files differ
diff --git a/lib/tpl/dokuwiki/images/button-dw.png b/lib/tpl/dokuwiki/images/button-dw.png
index 97272d968..8d6aea898 100644
--- a/lib/tpl/dokuwiki/images/button-dw.png
+++ b/lib/tpl/dokuwiki/images/button-dw.png
Binary files differ
diff --git a/lib/tpl/dokuwiki/images/button-rss.png b/lib/tpl/dokuwiki/images/button-rss.png
index f2438043f..b7cddadec 100644
--- a/lib/tpl/dokuwiki/images/button-rss.png
+++ b/lib/tpl/dokuwiki/images/button-rss.png
Binary files differ
diff --git a/lib/tpl/dokuwiki/images/closed-rtl.png b/lib/tpl/dokuwiki/images/closed-rtl.png
index 85ebd59e1..caa027e34 100644
--- a/lib/tpl/dokuwiki/images/closed-rtl.png
+++ b/lib/tpl/dokuwiki/images/closed-rtl.png
Binary files differ
diff --git a/lib/tpl/dokuwiki/images/closed.png b/lib/tpl/dokuwiki/images/closed.png
index 3691ebc17..e3bd0f9e9 100644
--- a/lib/tpl/dokuwiki/images/closed.png
+++ b/lib/tpl/dokuwiki/images/closed.png
Binary files differ
diff --git a/lib/tpl/dokuwiki/images/email.png b/lib/tpl/dokuwiki/images/email.png
new file mode 100644
index 000000000..5128be895
--- /dev/null
+++ b/lib/tpl/dokuwiki/images/email.png
Binary files differ
diff --git a/lib/tpl/dokuwiki/images/external-link.png b/lib/tpl/dokuwiki/images/external-link.png
new file mode 100644
index 000000000..084135f95
--- /dev/null
+++ b/lib/tpl/dokuwiki/images/external-link.png
Binary files differ
diff --git a/lib/tpl/dokuwiki/images/icons-license.txt b/lib/tpl/dokuwiki/images/icons-license.txt
new file mode 100644
index 000000000..7e12bbbd4
--- /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 815ccb1b1..000000000
--- a/lib/tpl/dokuwiki/images/link_icon.gif
+++ /dev/null
Binary files differ
diff --git a/lib/tpl/dokuwiki/images/logo.png b/lib/tpl/dokuwiki/images/logo.png
index 8b794dd64..35640279c 100644
--- a/lib/tpl/dokuwiki/images/logo.png
+++ b/lib/tpl/dokuwiki/images/logo.png
Binary files differ
diff --git a/lib/tpl/dokuwiki/images/mail_icon.gif b/lib/tpl/dokuwiki/images/mail_icon.gif
deleted file mode 100644
index 50a87a9a0..000000000
--- a/lib/tpl/dokuwiki/images/mail_icon.gif
+++ /dev/null
Binary files differ
diff --git a/lib/tpl/dokuwiki/images/open.png b/lib/tpl/dokuwiki/images/open.png
index 40ff129be..5f2d408c5 100644
--- a/lib/tpl/dokuwiki/images/open.png
+++ b/lib/tpl/dokuwiki/images/open.png
Binary files differ
diff --git a/lib/tpl/dokuwiki/images/pagetools-sprite.png b/lib/tpl/dokuwiki/images/pagetools-sprite.png
index bbd7fd361..898f0f4a6 100644
--- a/lib/tpl/dokuwiki/images/pagetools-sprite.png
+++ b/lib/tpl/dokuwiki/images/pagetools-sprite.png
Binary files differ
diff --git a/lib/tpl/dokuwiki/images/resizecol.png b/lib/tpl/dokuwiki/images/resizecol.png
index f0111507c..b5aeec004 100644
--- a/lib/tpl/dokuwiki/images/resizecol.png
+++ b/lib/tpl/dokuwiki/images/resizecol.png
Binary files differ
diff --git a/lib/tpl/dokuwiki/images/search.png b/lib/tpl/dokuwiki/images/search.png
index 2adfc7357..1ab7866fb 100644
--- a/lib/tpl/dokuwiki/images/search.png
+++ b/lib/tpl/dokuwiki/images/search.png
Binary files differ
diff --git a/lib/tpl/dokuwiki/images/sitetools.png b/lib/tpl/dokuwiki/images/sitetools.png
new file mode 100644
index 000000000..dc5764647
--- /dev/null
+++ b/lib/tpl/dokuwiki/images/sitetools.png
Binary files differ
diff --git a/lib/tpl/dokuwiki/images/toc-arrows.png b/lib/tpl/dokuwiki/images/toc-arrows.png
index 9f441eb26..4a353e4f6 100644
--- a/lib/tpl/dokuwiki/images/toc-arrows.png
+++ b/lib/tpl/dokuwiki/images/toc-arrows.png
Binary files differ
diff --git a/lib/tpl/dokuwiki/images/toc-bullet.png b/lib/tpl/dokuwiki/images/toc-bullet.png
index a6f0169c3..fc771b97e 100644
--- a/lib/tpl/dokuwiki/images/toc-bullet.png
+++ b/lib/tpl/dokuwiki/images/toc-bullet.png
Binary files differ
diff --git a/lib/tpl/dokuwiki/images/unc.png b/lib/tpl/dokuwiki/images/unc.png
new file mode 100644
index 000000000..f2aca8815
--- /dev/null
+++ b/lib/tpl/dokuwiki/images/unc.png
Binary files differ
diff --git a/lib/tpl/dokuwiki/images/windows.gif b/lib/tpl/dokuwiki/images/windows.gif
deleted file mode 100644
index 4f12acce1..000000000
--- a/lib/tpl/dokuwiki/images/windows.gif
+++ /dev/null
Binary files differ