1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/dokuwiki_ynh.git synced 2024-09-03 18:26:20 +02:00

[enh] Upgrade sources to 2015-08-10a 'Detritus' version.

This commit is contained in:
opi 2016-01-25 13:47:28 +01:00
parent b9fa96607b
commit 7c3202ec24
1430 changed files with 27185 additions and 8322 deletions

View file

@ -4,7 +4,7 @@ at http://www.dokuwiki.org/
For Installation Instructions see
http://www.dokuwiki.org/install
DokuWiki - 2004-2014 (c) Andreas Gohr <andi@splitbrain.org>
DokuWiki - 2004-2015 (c) Andreas Gohr <andi@splitbrain.org>
and the DokuWiki Community
See COPYING and file headers for license info

View file

@ -1 +1 @@
2014-09-29 "Hrun"
2015-08-10a "Detritus"

View file

@ -28,7 +28,8 @@ class PageCLI extends DokuCLI {
$options->registerOption(
'user',
'work as this user. defaults to current CLI user',
'u'
'u',
'username'
);
$options->setHelp(
'Utility to help command line Dokuwiki page editing, allow '.
@ -239,6 +240,7 @@ class PageCLI extends DokuCLI {
if($this->force) $this->deleteLock($wiki_id);
$_SERVER['REMOTE_USER'] = $this->username;
if(checklock($wiki_id)) {
$this->error("Page $wiki_id is already locked by another user");
exit(1);
@ -246,7 +248,6 @@ class PageCLI extends DokuCLI {
lock($wiki_id);
$_SERVER['REMOTE_USER'] = '_'.$this->username.'_';
if(checklock($wiki_id) != $this->username) {
$this->error("Unable to obtain lock for $wiki_id ");
var_dump(checklock($wiki_id));

View file

@ -101,7 +101,7 @@ class GitToolCLI extends DokuCLI {
/**
* Tries to install the given extensions using git clone
*
* @param $extensions
* @param array $extensions
*/
public function cmd_clone($extensions) {
$errors = array();
@ -130,7 +130,7 @@ class GitToolCLI extends DokuCLI {
/**
* Tries to install the given extensions using git clone with fallback to install
*
* @param $extensions
* @param array $extensions
*/
public function cmd_install($extensions) {
$errors = array();
@ -206,12 +206,13 @@ class GitToolCLI extends DokuCLI {
* Install extension from the given download URL
*
* @param string $ext
* @return bool
* @return bool|null
*/
private function downloadExtension($ext) {
/** @var helper_plugin_extension_extension $plugin */
$plugin = plugin_load('helper', 'extension_extension');
if(!$ext) die("extension plugin not available, can't continue");
$plugin->setExtension($ext);
$url = $plugin->getDownloadURL();
@ -291,12 +292,13 @@ class GitToolCLI extends DokuCLI {
* Returns the repository for the given extension
*
* @param $extension
* @return bool|string
* @return false|string
*/
private function getSourceRepo($extension) {
/** @var helper_plugin_extension_extension $ext */
$ext = plugin_load('helper', 'extension_extension');
if(!$ext) die("extension plugin not available, can't continue");
$ext->setExtension($extension);
$repourl = $ext->getSourcerepoURL();

View file

@ -26,7 +26,8 @@ class StripLangsCLI extends DokuCLI {
$options->registerOption(
'keep',
'Comma separated list of languages to keep in addition to English.',
'k'
'k',
'langcodes'
);
$options->registerOption(
'english-only',

View file

@ -61,6 +61,13 @@ class WantedPagesCLI extends DokuCLI {
}
}
/**
* Determine directions of the search loop
*
* @param string $entry
* @param string $basepath
* @return int
*/
protected function dir_filter($entry, $basepath) {
if($entry == '.' || $entry == '..') {
return WantedPagesCLI::DIR_CONTINUE;
@ -77,6 +84,13 @@ class WantedPagesCLI extends DokuCLI {
return WantedPagesCLI::DIR_CONTINUE;
}
/**
* Collects recursively the pages in a namespace
*
* @param string $dir
* @return array
* @throws DokuCLI_Exception
*/
protected function get_pages($dir) {
static $trunclen = null;
if(!$trunclen) {
@ -108,6 +122,12 @@ class WantedPagesCLI extends DokuCLI {
return $pages;
}
/**
* Parse instructions and returns the non-existing links
*
* @param array $page array with page id and file path
* @return array
*/
function internal_links($page) {
global $conf;
$instructions = p_get_instructions(file_get_contents($page['file']));

View file

@ -1,37 +1,41 @@
# Each URL may contain one of the placeholders {URL} or {NAME}
# Each URL may contain one of these placeholders
# {URL} is replaced by the URL encoded representation of the wikiname
# this is the right thing to do in most cases
# {NAME} this is replaced by the wikiname as given in the document
# no further encoding is done
# only mandatory encoded is done, urlencoding if the link
# is an external URL, or encoding as a wikiname if it is an
# internal link (begins with a colon)
# {SCHEME}
# {HOST}
# {PORT}
# {PATH}
# {QUERY} these placeholders will be replaced with the appropriate part
# of the link when parsed as a URL
# If no placeholder is defined the urlencoded name is appended to the URL
# To prevent losing your added InterWiki shortcuts after an upgrade,
# you should add new ones to interwiki.local.conf
wp http://en.wikipedia.org/wiki/{NAME}
wpfr http://fr.wikipedia.org/wiki/{NAME}
wpde http://de.wikipedia.org/wiki/{NAME}
wpes http://es.wikipedia.org/wiki/{NAME}
wppl http://pl.wikipedia.org/wiki/{NAME}
wpjp http://ja.wikipedia.org/wiki/{NAME}
wpmeta http://meta.wikipedia.org/wiki/{NAME}
doku http://www.dokuwiki.org/
dokubug http://bugs.dokuwiki.org/index.php?do=details&amp;task_id=
rfc http://tools.ietf.org/html/rfc
wp https://en.wikipedia.org/wiki/{NAME}
wpfr https://fr.wikipedia.org/wiki/{NAME}
wpde https://de.wikipedia.org/wiki/{NAME}
wpes https://es.wikipedia.org/wiki/{NAME}
wppl https://pl.wikipedia.org/wiki/{NAME}
wpjp https://ja.wikipedia.org/wiki/{NAME}
wpmeta https://meta.wikipedia.org/wiki/{NAME}
doku https://www.dokuwiki.org/
rfc https://tools.ietf.org/html/rfc
man http://man.cx/
amazon http://www.amazon.com/exec/obidos/ASIN/{URL}/splitbrain-20/
amazon.de http://www.amazon.de/exec/obidos/ASIN/{URL}/splitbrain-21/
amazon.uk http://www.amazon.co.uk/exec/obidos/ASIN/
amazon https://www.amazon.com/exec/obidos/ASIN/{URL}/splitbrain-20/
amazon.de https://www.amazon.de/exec/obidos/ASIN/{URL}/splitbrain-21/
amazon.uk https://www.amazon.co.uk/exec/obidos/ASIN/
paypal https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&amp;business=
phpfn http://www.php.net/{NAME}
coral http://{HOST}.{PORT}.nyud.net:8090{PATH}?{QUERY}
freecache http://freecache.org/{NAME}
sb http://www.splitbrain.org/go/
phpfn https://www.php.net/{NAME}
skype skype:{NAME}
google.de http://www.google.de/search?q=
go http://www.google.com/search?q={URL}&amp;btnI=lucky
google.de https://www.google.de/search?q=
go https://www.google.com/search?q={URL}&amp;btnI=lucky
user :user:{NAME}
# To support VoIP/SIP links
# To support VoIP/SIP/TEL links
callto callto://{NAME}
tel tel:{NAME}

View file

@ -9,7 +9,6 @@ gif image/gif
png image/png
ico image/vnd.microsoft.icon
swf application/x-shockwave-flash
mp3 audio/mpeg
ogg audio/ogg
wav audio/wav
@ -66,3 +65,7 @@ odt !application/vnd.oasis.opendocument.text
#xml text/xml
#csv text/csv
# Also flash may be able to execute arbitrary scripts in the website's
# context
#swf application/x-shockwave-flash

View file

@ -56,7 +56,7 @@ $conf['plugin']['authmysql']['TablesToLock']= array("users", "users AS u","group
* of the user. If the result table is empty or contains more than one
* row, access will be denied.
*
* The plugin accesses the password as 'pass' so a alias might be necessary.
* The plugin accesses the password as 'pass' so an alias might be necessary.
*
* Following patters will be replaced:
* %{user} user name
@ -107,10 +107,10 @@ $conf['plugin']['authmysql']['getGroups'] = "SELECT name as `group`
/* This statement should return a table containing all user login names
* that meet certain filter criteria. The filter expressions will be added
* case dependend by the plugin. At the end a sort expression will be added.
* Important is that this list contains no double entries fo a user. Each
* Important is that this list contains no double entries for a user. Each
* user name is only allowed once in the table.
*
* The login name will be accessed as 'user' to a alias might be neseccary.
* The login name will be accessed as 'user' to an alias might be neseccary.
* No patterns will be replaced in this statement but following patters
* will be replaced in the filter expressions:
* %{user} in FilterLogin user's login name
@ -174,7 +174,7 @@ $conf['plugin']['authmysql']['delGroup'] = "DELETE FROM groups
WHERE gid='%{gid}'";
/* This statement should return the database index of a given user name.
* The plugin will access the index with the name 'id' so a alias might be
* The plugin will access the index with the name 'id' so an alias might be
* necessary.
* following patters will be replaced:
* %{user} user name
@ -240,7 +240,7 @@ $conf['plugin']['authmysql']['delUserGroup']= "DELETE FROM usergroup
AND gid='%{gid}'";
/* This statement should return the database index of a given group name.
* The plugin will access the index with the name 'id' so a alias might
* The plugin will access the index with the name 'id' so an alias might
* be necessary.
*
* Following patters will be replaced:

View file

@ -2,16 +2,12 @@
# patches welcome
#
https?:\/\/(\S*?)(-side-effects|top|pharm|pill|discount|discount-|deal|price|order|now|best|cheap|cheap-|online|buy|buy-|sale|sell)(\S*?)(cialis|viagra|prazolam|xanax|zanax|soma|vicodin|zenical|xenical|meridia|paxil|prozac|claritin|allegra|lexapro|wellbutrin|zoloft|retin|valium|levitra|phentermine)
gay\s*sex
bi\s*sex
incest
https?:\/\/(\S*?)(bi\s*sex|gay\s*sex|fetish|incest|penis|\brape\b)
zoosex
gang\s*bang
facials
ladyboy
fetish
\btits\b
\brape\b
bolea\.com
52crystal
baida\.org

View file

@ -2,6 +2,252 @@
# but were removed later. An up to date DokuWiki should not have any of
# the files installed
# removed in 2015-08-10
inc/TarLib.class.php
inc/geshi.php
inc/geshi/4cs.php
inc/geshi/6502acme.php
inc/geshi/6502kickass.php
inc/geshi/6502tasm.php
inc/geshi/68000devpac.php
inc/geshi/abap.php
inc/geshi/actionscript-french.php
inc/geshi/actionscript.php
inc/geshi/actionscript3.php
inc/geshi/ada.php
inc/geshi/algol68.php
inc/geshi/apache.php
inc/geshi/applescript.php
inc/geshi/apt_sources.php
inc/geshi/arm.php
inc/geshi/asm.php
inc/geshi/asp.php
inc/geshi/asymptote.php
inc/geshi/autoconf.php
inc/geshi/autohotkey.php
inc/geshi/autoit.php
inc/geshi/avisynth.php
inc/geshi/awk.php
inc/geshi/bascomavr.php
inc/geshi/bash.php
inc/geshi/basic4gl.php
inc/geshi/bf.php
inc/geshi/bibtex.php
inc/geshi/blitzbasic.php
inc/geshi/bnf.php
inc/geshi/boo.php
inc/geshi/c.php
inc/geshi/c_loadrunner.php
inc/geshi/c_mac.php
inc/geshi/caddcl.php
inc/geshi/cadlisp.php
inc/geshi/cfdg.php
inc/geshi/cfm.php
inc/geshi/chaiscript.php
inc/geshi/cil.php
inc/geshi/clojure.php
inc/geshi/cmake.php
inc/geshi/cobol.php
inc/geshi/coffeescript.php
inc/geshi/cpp-qt.php
inc/geshi/cpp.php
inc/geshi/csharp.php
inc/geshi/css.php
inc/geshi/cuesheet.php
inc/geshi/d.php
inc/geshi/dcl.php
inc/geshi/dcpu16.php
inc/geshi/dcs.php
inc/geshi/delphi.php
inc/geshi/diff.php
inc/geshi/div.php
inc/geshi/dos.php
inc/geshi/dot.php
inc/geshi/e.php
inc/geshi/ecmascript.php
inc/geshi/eiffel.php
inc/geshi/email.php
inc/geshi/epc.php
inc/geshi/erlang.php
inc/geshi/euphoria.php
inc/geshi/f1.php
inc/geshi/falcon.php
inc/geshi/fo.php
inc/geshi/fortran.php
inc/geshi/freebasic.php
inc/geshi/freeswitch.php
inc/geshi/fsharp.php
inc/geshi/gambas.php
inc/geshi/gdb.php
inc/geshi/genero.php
inc/geshi/genie.php
inc/geshi/gettext.php
inc/geshi/glsl.php
inc/geshi/gml.php
inc/geshi/gnuplot.php
inc/geshi/go.php
inc/geshi/groovy.php
inc/geshi/gwbasic.php
inc/geshi/haskell.php
inc/geshi/haxe.php
inc/geshi/hicest.php
inc/geshi/hq9plus.php
inc/geshi/html4strict.php
inc/geshi/html5.php
inc/geshi/icon.php
inc/geshi/idl.php
inc/geshi/ini.php
inc/geshi/inno.php
inc/geshi/intercal.php
inc/geshi/io.php
inc/geshi/j.php
inc/geshi/java.php
inc/geshi/java5.php
inc/geshi/javascript.php
inc/geshi/jquery.php
inc/geshi/kixtart.php
inc/geshi/klonec.php
inc/geshi/klonecpp.php
inc/geshi/latex.php
inc/geshi/lb.php
inc/geshi/ldif.php
inc/geshi/lisp.php
inc/geshi/llvm.php
inc/geshi/locobasic.php
inc/geshi/logtalk.php
inc/geshi/lolcode.php
inc/geshi/lotusformulas.php
inc/geshi/lotusscript.php
inc/geshi/lscript.php
inc/geshi/lsl2.php
inc/geshi/lua.php
inc/geshi/m68k.php
inc/geshi/magiksf.php
inc/geshi/make.php
inc/geshi/mapbasic.php
inc/geshi/matlab.php
inc/geshi/mirc.php
inc/geshi/mmix.php
inc/geshi/modula2.php
inc/geshi/modula3.php
inc/geshi/mpasm.php
inc/geshi/mxml.php
inc/geshi/mysql.php
inc/geshi/nagios.php
inc/geshi/netrexx.php
inc/geshi/newlisp.php
inc/geshi/nsis.php
inc/geshi/oberon2.php
inc/geshi/objc.php
inc/geshi/objeck.php
inc/geshi/ocaml-brief.php
inc/geshi/ocaml.php
inc/geshi/octave.php
inc/geshi/oobas.php
inc/geshi/oorexx.php
inc/geshi/oracle11.php
inc/geshi/oracle8.php
inc/geshi/oxygene.php
inc/geshi/oz.php
inc/geshi/parasail.php
inc/geshi/parigp.php
inc/geshi/pascal.php
inc/geshi/pcre.php
inc/geshi/per.php
inc/geshi/perl.php
inc/geshi/perl6.php
inc/geshi/pf.php
inc/geshi/php-brief.php
inc/geshi/php.php
inc/geshi/pic16.php
inc/geshi/pike.php
inc/geshi/pixelbender.php
inc/geshi/pli.php
inc/geshi/plsql.php
inc/geshi/postgresql.php
inc/geshi/povray.php
inc/geshi/powerbuilder.php
inc/geshi/powershell.php
inc/geshi/proftpd.php
inc/geshi/progress.php
inc/geshi/prolog.php
inc/geshi/properties.php
inc/geshi/providex.php
inc/geshi/purebasic.php
inc/geshi/pycon.php
inc/geshi/pys60.php
inc/geshi/python.php
inc/geshi/q.php
inc/geshi/qbasic.php
inc/geshi/rails.php
inc/geshi/rebol.php
inc/geshi/reg.php
inc/geshi/rexx.php
inc/geshi/robots.php
inc/geshi/rpmspec.php
inc/geshi/rsplus.php
inc/geshi/ruby.php
inc/geshi/sas.php
inc/geshi/scala.php
inc/geshi/scheme.php
inc/geshi/scilab.php
inc/geshi/sdlbasic.php
inc/geshi/smalltalk.php
inc/geshi/smarty.php
inc/geshi/spark.php
inc/geshi/sparql.php
inc/geshi/sql.php
inc/geshi/stonescript.php
inc/geshi/systemverilog.php
inc/geshi/tcl.php
inc/geshi/teraterm.php
inc/geshi/text.php
inc/geshi/thinbasic.php
inc/geshi/tsql.php
inc/geshi/typoscript.php
inc/geshi/unicon.php
inc/geshi/upc.php
inc/geshi/urbi.php
inc/geshi/uscript.php
inc/geshi/vala.php
inc/geshi/vb.php
inc/geshi/vbnet.php
inc/geshi/vedit.php
inc/geshi/verilog.php
inc/geshi/vhdl.php
inc/geshi/vim.php
inc/geshi/visualfoxpro.php
inc/geshi/visualprolog.php
inc/geshi/whitespace.php
inc/geshi/whois.php
inc/geshi/winbatch.php
inc/geshi/xbasic.php
inc/geshi/xml.php
inc/geshi/xorg_conf.php
inc/geshi/xpp.php
inc/geshi/yaml.php
inc/geshi/z80.php
inc/geshi/zxbasic.php
inc/lang/ku/admin.txt
inc/lang/ku/denied.txt
inc/lang/ku/editrev.txt
inc/lang/ku/locked.txt
inc/lang/ku/login.txt
inc/lang/ku/mailtext.txt
inc/lang/ku/norev.txt
inc/lang/ku/password.txt
inc/lang/ku/read.txt
inc/lang/ku/register.txt
inc/lang/ku/revisions.txt
inc/lang/ku/showrev.txt
inc/lang/ku/stopwords.txt
lib/images/interwiki/coral.gif
lib/images/interwiki/dokubug.gif
lib/images/interwiki/sb.gif
lib/scripts/drag.js
lib/scripts/jquery/jquery-ui-theme/images/animated-overlay.gif
lib/scripts/tw-sack.js
# removed in 2014-05-05
lib/images/fileicons/audio.png
lib/plugins/acl/lang/hi/lang.php

Binary file not shown.

Before

Width:  |  Height:  |  Size: 33 KiB

After

Width:  |  Height:  |  Size: 27 KiB

View file

@ -57,7 +57,7 @@ All documentation and additional information besides the [[syntax|syntax descrip
===== Copyright =====
2004-2013 (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
2004-2015 (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 ;-).

View file

@ -83,9 +83,14 @@ Windows shares like [[\\server\share|this]] are recognized, too. Please note tha
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/userscript.js'':
LANG.nosmblinks = '';
* 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/lang/en/lang.php'' (more details at [[doku>localization#changing_some_localized_texts_and_strings_in_your_installation|localization]]): <code - conf/lang/en/lang.php>
<?php
/**
* Customization of the english language file
* Copy only the strings that needs to be modified
*/
$lang['js']['nosmblinks'] = '';
</code>
==== Image Links ====
@ -170,6 +175,12 @@ DokuWiki can embed the following media formats directly.
If you specify a filename that is not a supported media format, then it will be displayed as a link instead.
By adding ''?linkonly'' you provide a link to the media without displaying it inline
{{wiki:dokuwiki-128.png?linkonly}}
{{wiki:dokuwiki-128.png?linkonly}} This is just a link to the image.
==== Fallback Formats ====
Unfortunately not all browsers understand all video and audio formats. To mitigate the problem, you can upload your file in different formats for maximum browser compatibility.
@ -261,17 +272,19 @@ There are three exceptions which do not come from that pattern file: multiplicat
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
<code>
I think we should do it
> No we shouldn't
> No we shouldn't
>> Well, I say we should
>> Well, I say we should
> Really?
> Really?
>> Yes!
>> Yes!
>>> Then lets do it!
>>> Then lets do it!
</code>
I think we should do it
@ -317,7 +330,7 @@ As you can see, it's the cell separator before a cell which decides about the fo
^ 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.
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 |
@ -481,10 +494,13 @@ echo '</tr></table>';
| 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 |
| nosort | do not sort the items in the feed |
| //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.
By default the feed will be sorted by date, newest items first. You can sort it by oldest first using the ''reverse'' parameter, or display the feed as is with ''nosort''.
**Example:**
{{rss>http://slashdot.org/index.rss 5 author date 1h }}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.7 KiB

After

Width:  |  Height:  |  Size: 6.4 KiB

View file

@ -8,13 +8,18 @@
* @global Input $INPUT
*/
// update message version
$updateVersion = 46;
// update message version - always use a string to avoid localized floats!
$updateVersion = "47.1";
// xdebug_start_profiling();
if(!defined('DOKU_INC')) define('DOKU_INC', dirname(__FILE__).'/');
// define all DokuWiki globals here (needed within test requests but also helps to keep track)
global $ACT, $INPUT, $QUERY, $ID, $REV, $DATE_AT, $IDX,
$DATE, $RANGE, $HIGH, $TEXT, $PRE, $SUF, $SUM, $INFO, $JSINFO;
if(isset($_SERVER['HTTP_X_DOKUWIKI_DO'])) {
$ACT = trim(strtolower($_SERVER['HTTP_X_DOKUWIKI_DO']));
} elseif(!empty($_REQUEST['idx'])) {

View file

@ -218,7 +218,7 @@ function rss_buildItems(&$rss, &$data, $opt) {
$date = $ditem['date'];
} elseif ($ditem['media']) {
$date = @filemtime(mediaFN($id));
} elseif (@file_exists(wikiFN($id))) {
} elseif (file_exists(wikiFN($id))) {
$date = @filemtime(wikiFN($id));
} elseif($meta['date']['modified']) {
$date = $meta['date']['modified'];
@ -306,7 +306,7 @@ function rss_buildItems(&$rss, &$data, $opt) {
$src_r = '';
$src_l = '';
if($size = media_image_preview_size($id, false, new JpegMeta(mediaFN($id)), 300)) {
if($size = media_image_preview_size($id, '', new JpegMeta(mediaFN($id)), 300)) {
$more = 'w='.$size[0].'&h='.$size[1].'&t='.@filemtime(mediaFN($id));
$src_r = ml($id, $more, true, '&amp;', true);
}
@ -355,7 +355,7 @@ function rss_buildItems(&$rss, &$data, $opt) {
break;
case 'html':
if($ditem['media']) {
if($size = media_image_preview_size($id, false, new JpegMeta(mediaFN($id)))) {
if($size = media_image_preview_size($id, '', new JpegMeta(mediaFN($id)))) {
$more = 'w='.$size[0].'&h='.$size[1].'&t='.@filemtime(mediaFN($id));
$src = ml($id, $more, true, '&amp;', true);
$content = '<img src="'.$src.'" alt="'.$id.'" />';
@ -386,7 +386,7 @@ function rss_buildItems(&$rss, &$data, $opt) {
case 'abstract':
default:
if($ditem['media']) {
if($size = media_image_preview_size($id, false, new JpegMeta(mediaFN($id)))) {
if($size = media_image_preview_size($id, '', new JpegMeta(mediaFN($id)))) {
$more = 'w='.$size[0].'&h='.$size[1].'&t='.@filemtime(mediaFN($id));
$src = ml($id, $more, true, '&amp;', true);
$content = '<img src="'.$src.'" alt="'.$id.'" />';

View file

@ -14,6 +14,9 @@ class _DiffOp {
var $orig;
var $closing;
/**
* @return _DiffOp
*/
function reverse() {
trigger_error("pure virtual", E_USER_ERROR);
}
@ -104,6 +107,21 @@ class _DiffOp_Change extends _DiffOp {
*/
class _DiffEngine {
var $xchanged = array();
var $ychanged = array();
var $xv = array();
var $yv = array();
var $xind = array();
var $yind = array();
var $seq;
var $in_seq;
var $lcs;
/**
* @param array $from_lines
* @param array $to_lines
* @return _DiffOp[]
*/
function diff($from_lines, $to_lines) {
$n_from = count($from_lines);
$n_to = count($to_lines);
@ -495,9 +513,9 @@ class Diff {
* Constructor.
* Computes diff between sequences of strings.
*
* @param $from_lines array An array of strings.
* (Typically these are lines from a file.)
* @param $to_lines array An array of strings.
* @param array $from_lines An array of strings.
* (Typically these are lines from a file.)
* @param array $to_lines An array of strings.
*/
function __construct($from_lines, $to_lines) {
$eng = new _DiffEngine;
@ -512,8 +530,9 @@ class Diff {
*
* $diff = new Diff($lines1, $lines2);
* $rev = $diff->reverse();
* @return object A Diff object representing the inverse of the
* original diff.
*
* @return Diff A Diff object representing the inverse of the
* original diff.
*/
function reverse() {
$rev = $this;
@ -631,19 +650,19 @@ class MappedDiff extends Diff {
* case-insensitve diffs, or diffs which ignore
* changes in white-space.
*
* @param $from_lines array An array of strings.
* (Typically these are lines from a file.)
* @param string[] $from_lines An array of strings.
* (Typically these are lines from a file.)
*
* @param $to_lines array An array of strings.
* @param string[] $to_lines An array of strings.
*
* @param $mapped_from_lines array This array should
* have the same size number of elements as $from_lines.
* The elements in $mapped_from_lines and
* $mapped_to_lines are what is actually compared
* when computing the diff.
* @param string[] $mapped_from_lines This array should
* have the same size number of elements as $from_lines.
* The elements in $mapped_from_lines and
* $mapped_to_lines are what is actually compared
* when computing the diff.
*
* @param $mapped_to_lines array This array should
* have the same number of elements as $to_lines.
* @param string[] $mapped_to_lines This array should
* have the same number of elements as $to_lines.
*/
function __construct($from_lines, $to_lines, $mapped_from_lines, $mapped_to_lines) {
@ -697,12 +716,13 @@ class DiffFormatter {
/**
* Format a diff.
*
* @param $diff object A Diff object.
* @param Diff $diff A Diff object.
* @return string The formatted output.
*/
function format($diff) {
$xi = $yi = 1;
$x0 = $y0 = 0;
$block = false;
$context = array();
@ -752,6 +772,13 @@ class DiffFormatter {
return $this->_end_diff();
}
/**
* @param int $xbeg
* @param int $xlen
* @param int $ybeg
* @param int $ylen
* @param array $edits
*/
function _block($xbeg, $xlen, $ybeg, $ylen, &$edits) {
$this->_start_block($this->_block_header($xbeg, $xlen, $ybeg, $ylen));
foreach ($edits as $edit) {
@ -779,6 +806,13 @@ class DiffFormatter {
return $val;
}
/**
* @param int $xbeg
* @param int $xlen
* @param int $ybeg
* @param int $ylen
* @return string
*/
function _block_header($xbeg, $xlen, $ybeg, $ylen) {
if ($xlen > 1)
$xbeg .= "," . ($xbeg + $xlen - 1);
@ -788,6 +822,9 @@ class DiffFormatter {
return $xbeg . ($xlen ? ($ylen ? 'c' : 'd') : 'a') . $ybeg;
}
/**
* @param string $header
*/
function _start_block($header) {
echo $header;
}
@ -896,6 +933,9 @@ class _HWLDF_WordAccumulator {
$this->_tag = $new_tag;
}
/**
* @param string $new_tag
*/
function _flushLine($new_tag) {
$this->_flushGroup($new_tag);
if ($this->_line != '')
@ -1055,6 +1095,10 @@ class TableDiffFormatter extends DiffFormatter {
$this->trailing_context_lines = 2;
}
/**
* @param Diff $diff
* @return string
*/
function format($diff) {
// Preserve whitespaces by converting some to non-breaking spaces.
// Do not convert all of them to allow word-wrap.
@ -1165,6 +1209,10 @@ class InlineDiffFormatter extends DiffFormatter {
$this->trailing_context_lines = 2;
}
/**
* @param Diff $diff
* @return string
*/
function format($diff) {
// Preserve whitespaces by converting some to non-breaking spaces.
// Do not convert all of them to allow word-wrap.

View file

@ -0,0 +1,34 @@
<?php
namespace dokuwiki\Form;
/**
* Class ButtonElement
*
* Represents a simple button
*
* @package dokuwiki\Form
*/
class ButtonElement extends Element {
/** @var string HTML content */
protected $content = '';
/**
* @param string $name
* @param string $content HTML content of the button. You have to escape it yourself.
*/
function __construct($name, $content = '') {
parent::__construct('button', array('name' => $name, 'value' => 1));
$this->content = $content;
}
/**
* The HTML representation of this element
*
* @return string
*/
public function toHTML() {
return '<button ' . buildAttributes($this->attrs()) . '>'.$this->content.'</button>';
}
}

View file

@ -0,0 +1,62 @@
<?php
namespace dokuwiki\Form;
/**
* Class CheckableElement
*
* For Radio- and Checkboxes
*
* @package DokuForm
*/
class CheckableElement extends InputElement {
/**
* @param string $type The type of this element
* @param string $name The name of this form element
* @param string $label The label text for this element
*/
public function __construct($type, $name, $label) {
parent::__construct($type, $name, $label);
// default value is 1
$this->attr('value', 1);
}
/**
* Handles the useInput flag and sets the checked attribute accordingly
*/
protected function prefillInput() {
global $INPUT;
list($name, $key) = $this->getInputName();
$myvalue = $this->val();
if(!$INPUT->has($name)) return;
if($key === null) {
// no key - single value
$value = $INPUT->str($name);
if($value == $myvalue) {
$this->attr('checked', 'checked');
} else {
$this->rmattr('checked');
}
} else {
// we have an array, there might be several values in it
$input = $INPUT->arr($name);
if(isset($input[$key])) {
$this->rmattr('checked');
// values seem to be in another sub array
if(is_array($input[$key])) {
$input = $input[$key];
}
foreach($input as $value) {
if($value == $myvalue) {
$this->attr('checked', 'checked');
}
}
}
}
}
}

View file

@ -0,0 +1,151 @@
<?php
namespace dokuwiki\Form;
/**
* Class Element
*
* The basic building block of a form
*
* @package dokuwiki\Form
*/
abstract class Element {
/**
* @var array the attributes of this element
*/
protected $attributes = array();
/**
* @var string The type of this element
*/
protected $type;
/**
* @param string $type The type of this element
* @param array $attributes
*/
public function __construct($type, $attributes = array()) {
$this->type = $type;
$this->attributes = $attributes;
}
/**
* Type of this element
*
* @return string
*/
public function getType() {
return $this->type;
}
/**
* Gets or sets an attribute
*
* When no $value is given, the current content of the attribute is returned.
* An empty string is returned for unset attributes.
*
* When a $value is given, the content is set to that value and the Element
* itself is returned for easy chaining
*
* @param string $name Name of the attribute to access
* @param null|string $value New value to set
* @return string|$this
*/
public function attr($name, $value = null) {
// set
if($value !== null) {
$this->attributes[$name] = $value;
return $this;
}
// get
if(isset($this->attributes[$name])) {
return $this->attributes[$name];
} else {
return '';
}
}
/**
* Removes the given attribute if it exists
*
* @param $name
* @return $this
*/
public function rmattr($name) {
if(isset($this->attributes[$name])) {
unset($this->attributes[$name]);
}
return $this;
}
/**
* Gets or adds a all given attributes at once
*
* @param array|null $attributes
* @return array|$this
*/
public function attrs($attributes = null) {
// set
if($attributes) {
foreach((array) $attributes as $key => $val) {
$this->attr($key, $val);
}
return $this;
}
// get
return $this->attributes;
}
/**
* Adds a class to the class attribute
*
* This is the preferred method of setting the element's class
*
* @param string $class the new class to add
* @return $this
*/
public function addClass($class) {
$classes = explode(' ', $this->attr('class'));
$classes[] = $class;
$classes = array_unique($classes);
$classes = array_filter($classes);
$this->attr('class', join(' ', $classes));
return $this;
}
/**
* Get or set the element's ID
*
* This is the preferred way of setting the element's ID
*
* @param null|string $id
* @return string|$this
*/
public function id($id = null) {
if(strpos($id, '__') === false) {
throw new \InvalidArgumentException('IDs in DokuWiki have to contain two subsequent underscores');
}
return $this->attr('id', $id);
}
/**
* Get or set the element's value
*
* This is the preferred way of setting the element's value
*
* @param null|string $value
* @return string|$this
*/
public function val($value = null) {
return $this->attr('value', $value);
}
/**
* The HTML representation of this element
*
* @return string
*/
abstract public function toHTML();
}

View file

@ -0,0 +1,30 @@
<?php
namespace dokuwiki\Form;
/**
* Class FieldsetCloseElement
*
* Closes an open Fieldset
*
* @package dokuwiki\Form
*/
class FieldsetCloseElement extends TagCloseElement {
/**
* @param array $attributes
*/
public function __construct($attributes = array()) {
parent::__construct('', $attributes);
$this->type = 'fieldsetclose';
}
/**
* The HTML representation of this element
*
* @return string
*/
public function toHTML() {
return '</fieldset>';
}
}

View file

@ -0,0 +1,36 @@
<?php
namespace dokuwiki\Form;
/**
* Class FieldsetOpenElement
*
* Opens a Fieldset with an optional legend
*
* @package dokuwiki\Form
*/
class FieldsetOpenElement extends TagOpenElement {
/**
* @param string $legend
* @param array $attributes
*/
public function __construct($legend='', $attributes = array()) {
// this is a bit messy and we just do it for the nicer class hierarchy
// the parent would expect the tag in $value but we're storing the
// legend there, so we have to set the type manually
parent::__construct($legend, $attributes);
$this->type = 'fieldsetopen';
}
/**
* The HTML representation of this element
*
* @return string
*/
public function toHTML() {
$html = '<fieldset '.buildAttributes($this->attrs()).'>';
$legend = $this->val();
if($legend) $html .= DOKU_LF.'<legend>'.hsc($legend).'</legend>';
return $html;
}
}

426
sources/inc/Form/Form.php Normal file
View file

@ -0,0 +1,426 @@
<?php
namespace dokuwiki\Form;
/**
* Class Form
*
* Represents the whole Form. This is what you work on, and add Elements to
*
* @package dokuwiki\Form
*/
class Form extends Element {
/**
* @var array name value pairs for hidden values
*/
protected $hidden = array();
/**
* @var Element[] the elements of the form
*/
protected $elements = array();
/**
* Creates a new, empty form with some default attributes
*
* @param array $attributes
*/
public function __construct($attributes = array()) {
global $ID;
parent::__construct('form', $attributes);
// use the current URL as default action
if(!$this->attr('action')) {
$get = $_GET;
if(isset($get['id'])) unset($get['id']);
$self = wl($ID, $get, false, '&'); //attributes are escaped later
$this->attr('action', $self);
}
// post is default
if(!$this->attr('method')) {
$this->attr('method', 'post');
}
// we like UTF-8
if(!$this->attr('accept-charset')) {
$this->attr('accept-charset', 'utf-8');
}
// add the security token by default
$this->setHiddenField('sectok', getSecurityToken());
// identify this as a new form based form in HTML
$this->addClass('doku_form');
}
/**
* Sets a hidden field
*
* @param $name
* @param $value
* @return $this
*/
public function setHiddenField($name, $value) {
$this->hidden[$name] = $value;
return $this;
}
#region element query function
/**
* Returns the numbers of elements in the form
*
* @return int
*/
public function elementCount() {
return count($this->elements);
}
/**
* Returns a reference to the element at a position.
* A position out-of-bounds will return either the
* first (underflow) or last (overflow) element.
*
* @param $pos
* @return Element
*/
public function getElementAt($pos) {
if($pos < 0) $pos = count($this->elements) + $pos;
if($pos < 0) $pos = 0;
if($pos >= count($this->elements)) $pos = count($this->elements) - 1;
return $this->elements[$pos];
}
/**
* Gets the position of the first of a type of element
*
* @param string $type Element type to look for.
* @param int $offset search from this position onward
* @return false|int position of element if found, otherwise false
*/
public function findPositionByType($type, $offset = 0) {
$len = $this->elementCount();
for($pos = $offset; $pos < $len; $pos++) {
if($this->elements[$pos]->getType() == $type) {
return $pos;
}
}
return false;
}
/**
* Gets the position of the first element matching the attribute
*
* @param string $name Name of the attribute
* @param string $value Value the attribute should have
* @param int $offset search from this position onward
* @return false|int position of element if found, otherwise false
*/
public function findPositionByAttribute($name, $value, $offset = 0) {
$len = $this->elementCount();
for($pos = $offset; $pos < $len; $pos++) {
if($this->elements[$pos]->attr($name) == $value) {
return $pos;
}
}
return false;
}
#endregion
#region Element positioning functions
/**
* Adds or inserts an element to the form
*
* @param Element $element
* @param int $pos 0-based position in the form, -1 for at the end
* @return Element
*/
public function addElement(Element $element, $pos = -1) {
if(is_a($element, '\dokuwiki\Form\Form')) throw new \InvalidArgumentException('You can\'t add a form to a form');
if($pos < 0) {
$this->elements[] = $element;
} else {
array_splice($this->elements, $pos, 0, array($element));
}
return $element;
}
/**
* Replaces an existing element with a new one
*
* @param Element $element the new element
* @param $pos 0-based position of the element to replace
*/
public function replaceElement(Element $element, $pos) {
if(is_a($element, '\dokuwiki\Form\Form')) throw new \InvalidArgumentException('You can\'t add a form to a form');
array_splice($this->elements, $pos, 1, array($element));
}
/**
* Remove an element from the form completely
*
* @param $pos 0-based position of the element to remove
*/
public function removeElement($pos) {
array_splice($this->elements, $pos, 1);
}
#endregion
#region Element adding functions
/**
* Adds a text input field
*
* @param $name
* @param $label
* @param int $pos
* @return InputElement
*/
public function addTextInput($name, $label = '', $pos = -1) {
return $this->addElement(new InputElement('text', $name, $label), $pos);
}
/**
* Adds a password input field
*
* @param $name
* @param $label
* @param int $pos
* @return InputElement
*/
public function addPasswordInput($name, $label = '', $pos = -1) {
return $this->addElement(new InputElement('password', $name, $label), $pos);
}
/**
* Adds a radio button field
*
* @param $name
* @param $label
* @param int $pos
* @return CheckableElement
*/
public function addRadioButton($name, $label = '', $pos = -1) {
return $this->addElement(new CheckableElement('radio', $name, $label), $pos);
}
/**
* Adds a checkbox field
*
* @param $name
* @param $label
* @param int $pos
* @return CheckableElement
*/
public function addCheckbox($name, $label = '', $pos = -1) {
return $this->addElement(new CheckableElement('checkbox', $name, $label), $pos);
}
/**
* Adds a textarea field
*
* @param $name
* @param $label
* @param int $pos
* @return TextareaElement
*/
public function addTextarea($name, $label = '', $pos = -1) {
return $this->addElement(new TextareaElement($name, $label), $pos);
}
/**
* Adds a simple button, escapes the content for you
*
* @param string $name
* @param string $content
* @param int $pos
* @return Element
*/
public function addButton($name, $content, $pos = -1) {
return $this->addElement(new ButtonElement($name, hsc($content)), $pos);
}
/**
* Adds a simple button, allows HTML for content
*
* @param string $name
* @param string $html
* @param int $pos
* @return Element
*/
public function addButtonHTML($name, $html, $pos = -1) {
return $this->addElement(new ButtonElement($name, $html), $pos);
}
/**
* Adds a label referencing another input element, escapes the label for you
*
* @param $label
* @param string $for
* @param int $pos
* @return Element
*/
public function addLabel($label, $for='', $pos = -1) {
return $this->addLabelHTML(hsc($label), $for, $pos);
}
/**
* Adds a label referencing another input element, allows HTML for content
*
* @param string $content
* @param string|Element $for
* @param int $pos
* @return Element
*/
public function addLabelHTML($content, $for='', $pos = -1) {
$element = new LabelElement(hsc($content));
if(is_a($for, '\dokuwiki\Form\Element')) {
/** @var Element $for */
$for = $for->id();
}
$for = (string) $for;
if($for !== '') {
$element->attr('for', $for);
}
return $this->addElement($element, $pos);
}
/**
* Add fixed HTML to the form
*
* @param $html
* @param int $pos
* @return HTMLElement
*/
public function addHTML($html, $pos = -1) {
return $this->addElement(new HTMLElement($html), $pos);
}
/**
* Add a closed HTML tag to the form
*
* @param $tag
* @param int $pos
* @return TagElement
*/
public function addTag($tag, $pos = -1) {
return $this->addElement(new TagElement($tag), $pos);
}
/**
* Add an open HTML tag to the form
*
* Be sure to close it again!
*
* @param $tag
* @param int $pos
* @return TagOpenElement
*/
public function addTagOpen($tag, $pos = -1) {
return $this->addElement(new TagOpenElement($tag), $pos);
}
/**
* Add a closing HTML tag to the form
*
* Be sure it had been opened before
*
* @param $tag
* @param int $pos
* @return TagCloseElement
*/
public function addTagClose($tag, $pos = -1) {
return $this->addElement(new TagCloseElement($tag), $pos);
}
/**
* Open a Fieldset
*
* @param $legend
* @param int $pos
* @return FieldsetOpenElement
*/
public function addFieldsetOpen($legend = '', $pos = -1) {
return $this->addElement(new FieldsetOpenElement($legend), $pos);
}
/**
* Close a fieldset
*
* @param int $pos
* @return TagCloseElement
*/
public function addFieldsetClose($pos = -1) {
return $this->addElement(new FieldsetCloseElement(), $pos);
}
#endregion
/**
* Adjust the elements so that fieldset open and closes are matching
*/
protected function balanceFieldsets() {
$lastclose = 0;
$isopen = false;
$len = count($this->elements);
for($pos = 0; $pos < $len; $pos++) {
$type = $this->elements[$pos]->getType();
if($type == 'fieldsetopen') {
if($isopen) {
//close previous fieldset
$this->addFieldsetClose($pos);
$lastclose = $pos + 1;
$pos++;
$len++;
}
$isopen = true;
} else if($type == 'fieldsetclose') {
if(!$isopen) {
// make sure there was a fieldsetopen
// either right after the last close or at the begining
$this->addFieldsetOpen('', $lastclose);
$len++;
$pos++;
}
$lastclose = $pos;
$isopen = false;
}
}
// close open fieldset at the end
if($isopen) {
$this->addFieldsetClose();
}
}
/**
* The HTML representation of the whole form
*
* @return string
*/
public function toHTML() {
$this->balanceFieldsets();
$html = '<form ' . buildAttributes($this->attrs()) . '>' . DOKU_LF;
foreach($this->hidden as $name => $value) {
$html .= '<input type="hidden" name="' . $name . '" value="' . formText($value) . '" />' . DOKU_LF;
}
foreach($this->elements as $element) {
$html .= $element->toHTML() . DOKU_LF;
}
$html .= '</form>' . DOKU_LF;
return $html;
}
}

View file

@ -0,0 +1,29 @@
<?php
namespace dokuwiki\Form;
/**
* Class HTMLElement
*
* Holds arbitrary HTML that is added as is to the Form
*
* @package dokuwiki\Form
*/
class HTMLElement extends ValueElement {
/**
* @param string $html
*/
public function __construct($html) {
parent::__construct('html', $html);
}
/**
* The HTML representation of this element
*
* @return string
*/
public function toHTML() {
return $this->val();
}
}

View file

@ -0,0 +1,161 @@
<?php
namespace dokuwiki\Form;
/**
* Class InputElement
*
* Base class for all input elements. Uses a wrapping label when label
* text is given.
*
* @todo figure out how to make wrapping or related label configurable
* @package dokuwiki\Form
*/
class InputElement extends Element {
/**
* @var LabelElement
*/
protected $label = null;
/**
* @var bool if the element should reflect posted values
*/
protected $useInput = true;
/**
* @param string $type The type of this element
* @param string $name The name of this form element
* @param string $label The label text for this element (will be autoescaped)
*/
public function __construct($type, $name, $label = '') {
parent::__construct($type, array('name' => $name));
$this->attr('name', $name);
$this->attr('type', $type);
if($label) $this->label = new LabelElement($label);
}
/**
* Returns the label element if there's one set
*
* @return LabelElement|null
*/
public function getLabel() {
return $this->label;
}
/**
* Should the user sent input be used to initialize the input field
*
* The default is true. Any set values will be overwritten by the INPUT
* provided values.
*
* @param bool $useinput
* @return $this
*/
public function useInput($useinput) {
$this->useInput = (bool) $useinput;
return $this;
}
/**
* Get or set the element's ID
*
* @param null|string $id
* @return string|$this
*/
public function id($id = null) {
if($this->label) $this->label->attr('for', $id);
return parent::id($id);
}
/**
* Adds a class to the class attribute
*
* This is the preferred method of setting the element's class
*
* @param string $class the new class to add
* @return $this
*/
public function addClass($class) {
if($this->label) $this->label->addClass($class);
return parent::addClass($class);
}
/**
* Figures out how to access the value for this field from INPUT data
*
* The element's name could have been given as a simple string ('foo')
* or in array notation ('foo[bar]').
*
* Note: this function only handles one level of arrays. If your data
* is nested deeper, you should call useInput(false) and set the
* correct value yourself
*
* @return array name and array key (null if not an array)
*/
protected function getInputName() {
$name = $this->attr('name');
parse_str("$name=1", $parsed);
$name = array_keys($parsed);
$name = array_shift($name);
if(is_array($parsed[$name])) {
$key = array_keys($parsed[$name]);
$key = array_shift($key);
} else {
$key = null;
}
return array($name, $key);
}
/**
* Handles the useInput flag and set the value attribute accordingly
*/
protected function prefillInput() {
global $INPUT;
list($name, $key) = $this->getInputName();
if(!$INPUT->has($name)) return;
if($key === null) {
$value = $INPUT->str($name);
} else {
$value = $INPUT->arr($name);
if(isset($value[$key])) {
$value = $value[$key];
} else {
$value = '';
}
}
if($value !== '') {
$this->val($value);
}
}
/**
* The HTML representation of this element
*
* @return string
*/
protected function mainElementHTML() {
if($this->useInput) $this->prefillInput();
return '<input ' . buildAttributes($this->attrs()) . ' />';
}
/**
* The HTML representation of this element wrapped in a label
*
* @return string
*/
public function toHTML() {
if($this->label) {
return '<label ' . buildAttributes($this->label->attrs()) . '>' . DOKU_LF .
'<span>' . hsc($this->label->val()) . '</span>' . DOKU_LF .
$this->mainElementHTML() . DOKU_LF .
'</label>';
} else {
return $this->mainElementHTML();
}
}
}

View file

@ -0,0 +1,27 @@
<?php
namespace dokuwiki\Form;
/**
* Class Label
* @package dokuwiki\Form
*/
class LabelElement extends ValueElement {
/**
* Creates a new Label
*
* @param string $label This is is raw HTML and will not be escaped
*/
public function __construct($label) {
parent::__construct('label', $label);
}
/**
* The HTML representation of this element
*
* @return string
*/
public function toHTML() {
return '<label ' . buildAttributes($this->attrs()) . '>' . $this->val() . '</label>';
}
}

View file

@ -0,0 +1,181 @@
<?php
namespace dokuwiki\Form;
/**
* Class LegacyForm
*
* Provides a compatibility layer to the old Doku_Form API
*
* This can be used to work with the modern API on forms provided by old events for
* example. When you start new forms, just use Form\Form
*
* @package dokuwiki\Form
*/
class LegacyForm extends Form {
/**
* Creates a new modern form from an old legacy Doku_Form
*
* @param \Doku_Form $oldform
*/
public function __construct(\Doku_Form $oldform) {
parent::__construct($oldform->params);
$this->hidden = $oldform->_hidden;
foreach($oldform->_content as $element) {
list($ctl, $attr) = $this->parseLegacyAttr($element);
if(is_array($element)) {
switch($ctl['elem']) {
case 'wikitext':
$this->addTextarea('wikitext')
->attrs($attr)
->id('wiki__text')
->val($ctl['text'])
->addClass($ctl['class']);
break;
case 'textfield':
$this->addTextInput($ctl['name'], $ctl['text'])
->attrs($attr)
->id($ctl['id'])
->addClass($ctl['class']);
break;
case 'passwordfield':
$this->addPasswordInput($ctl['name'], $ctl['text'])
->attrs($attr)
->id($ctl['id'])
->addClass($ctl['class']);
break;
case 'checkboxfield':
$this->addCheckbox($ctl['name'], $ctl['text'])
->attrs($attr)
->id($ctl['id'])
->addClass($ctl['class']);
break;
case 'radiofield':
$this->addRadioButton($ctl['name'], $ctl['text'])
->attrs($attr)
->id($ctl['id'])
->addClass($ctl['class']);
break;
case 'tag':
$this->addTag($ctl['tag'])
->attrs($attr)
->attr('name', $ctl['name'])
->id($ctl['id'])
->addClass($ctl['class']);
break;
case 'opentag':
$this->addTagOpen($ctl['tag'])
->attrs($attr)
->attr('name', $ctl['name'])
->id($ctl['id'])
->addClass($ctl['class']);
break;
case 'closetag':
$this->addTagClose($ctl['tag']);
break;
case 'openfieldset':
$this->addFieldsetOpen($ctl['legend'])
->attrs($attr)
->attr('name', $ctl['name'])
->id($ctl['id'])
->addClass($ctl['class']);
break;
case 'closefieldset':
$this->addFieldsetClose();
break;
case 'button':
case 'field':
case 'fieldright':
case 'filefield':
case 'menufield':
case 'listboxfield':
throw new \UnexpectedValueException('Unsupported legacy field ' . $ctl['elem']);
break;
default:
throw new \UnexpectedValueException('Unknown legacy field ' . $ctl['elem']);
}
} else {
$this->addHTML($element);
}
}
}
/**
* Parses out what is the elements attributes and what is control info
*
* @param array $legacy
* @return array
*/
protected function parseLegacyAttr($legacy) {
$attributes = array();
$control = array();
foreach($legacy as $key => $val) {
if($key{0} == '_') {
$control[substr($key, 1)] = $val;
} elseif($key == 'name') {
$control[$key] = $val;
} elseif($key == 'id') {
$control[$key] = $val;
} else {
$attributes[$key] = $val;
}
}
return array($control, $attributes);
}
/**
* Translates our types to the legacy types
*
* @param string $type
* @return string
*/
protected function legacyType($type) {
static $types = array(
'text' => 'textfield',
'password' => 'passwordfield',
'checkbox' => 'checkboxfield',
'radio' => 'radiofield',
'tagopen' => 'opentag',
'tagclose' => 'closetag',
'fieldsetopen' => 'openfieldset',
'fieldsetclose' => 'closefieldset',
);
if(isset($types[$type])) return $types[$type];
return $type;
}
/**
* Creates an old legacy form from this modern form's data
*
* @return \Doku_Form
*/
public function toLegacy() {
$this->balanceFieldsets();
$legacy = new \Doku_Form($this->attrs());
$legacy->_hidden = $this->hidden;
foreach($this->elements as $element) {
if(is_a($element, 'dokuwiki\Form\HTMLElement')) {
$legacy->_content[] = $element->toHTML();
} elseif(is_a($element, 'dokuwiki\Form\InputElement')) {
/** @var InputElement $element */
$data = $element->attrs();
$data['_elem'] = $this->legacyType($element->getType());
$label = $element->getLabel();
if($label) {
$data['_class'] = $label->attr('class');
}
$legacy->_content[] = $data;
}
}
return $legacy;
}
}

View file

@ -0,0 +1,76 @@
<?php
namespace dokuwiki\Form;
/**
* Class TagCloseElement
*
* Creates an HTML close tag. You have to make sure it has been opened
* before or this will produce invalid HTML
*
* @package dokuwiki\Form
*/
class TagCloseElement extends ValueElement {
/**
* @param string $tag
* @param array $attributes
*/
public function __construct($tag, $attributes = array()) {
parent::__construct('tagclose', $tag, $attributes);
}
/**
* do not call this
*
* @param $class
* @return void
* @throws \BadMethodCallException
*/
public function addClass($class) {
throw new \BadMethodCallException('You can\t add classes to closing tag');
}
/**
* do not call this
*
* @param $id
* @return void
* @throws \BadMethodCallException
*/
public function id($id = null) {
throw new \BadMethodCallException('You can\t add ID to closing tag');
}
/**
* do not call this
*
* @param $name
* @param $value
* @return void
* @throws \BadMethodCallException
*/
public function attr($name, $value = null) {
throw new \BadMethodCallException('You can\t add attributes to closing tag');
}
/**
* do not call this
*
* @param $attributes
* @return void
* @throws \BadMethodCallException
*/
public function attrs($attributes = null) {
throw new \BadMethodCallException('You can\t add attributes to closing tag');
}
/**
* The HTML representation of this element
*
* @return string
*/
public function toHTML() {
return '</'.$this->val().'>';
}
}

View file

@ -0,0 +1,29 @@
<?php
namespace dokuwiki\Form;
/**
* Class TagElement
*
* Creates a self closing HTML tag
*
* @package dokuwiki\Form
*/
class TagElement extends ValueElement {
/**
* @param string $tag
* @param array $attributes
*/
public function __construct($tag, $attributes = array()) {
parent::__construct('tag', $tag, $attributes);
}
/**
* The HTML representation of this element
*
* @return string
*/
public function toHTML() {
return '<'.$this->val().' '.buildAttributes($this->attrs()).' />';
}
}

View file

@ -0,0 +1,30 @@
<?php
namespace dokuwiki\Form;
/**
* Class TagOpenElement
*
* Creates an open HTML tag. You have to make sure you close it
* again or this will produce invalid HTML
*
* @package dokuwiki\Form
*/
class TagOpenElement extends ValueElement {
/**
* @param string $tag
* @param array $attributes
*/
public function __construct($tag, $attributes = array()) {
parent::__construct('tagopen', $tag, $attributes);
}
/**
* The HTML representation of this element
*
* @return string
*/
public function toHTML() {
return '<'.$this->val().' '.buildAttributes($this->attrs()).'>';
}
}

View file

@ -0,0 +1,51 @@
<?php
namespace dokuwiki\Form;
/**
* Class TextareaElement
* @package dokuwiki\Form
*/
class TextareaElement extends InputElement {
/**
* @var string the actual text within the area
*/
protected $text;
/**
* @param string $name The name of this form element
* @param string $label The label text for this element
*/
public function __construct($name, $label) {
parent::__construct('textarea', $name, $label);
$this->attr('dir', 'auto');
}
/**
* Get or set the element's value
*
* This is the preferred way of setting the element's value
*
* @param null|string $value
* @return string|$this
*/
public function val($value = null) {
if($value !== null) {
$this->text = $value;
return $this;
}
return $this->text;
}
/**
* The HTML representation of this element
*
* @return string
*/
protected function mainElementHTML() {
if($this->useInput) $this->prefillInput();
return '<textarea ' . buildAttributes($this->attrs()) . '>' .
formText($this->val()) . '</textarea>';
}
}

View file

@ -0,0 +1,45 @@
<?php
namespace dokuwiki\Form;
/**
* Class ValueElement
*
* Just like an Element but it's value is not part of its attributes
*
* What the value is (tag name, content, etc) is defined by the actual implementations
*
* @package dokuwiki\Form
*/
abstract class ValueElement extends Element {
/**
* @var string holds the element's value
*/
protected $value = '';
/**
* @param string $type
* @param array|string $value
* @param array $attributes
*/
public function __construct($type, $value, $attributes = array()) {
parent::__construct($type, $attributes);
$this->val($value);
}
/**
* Get or set the element's value
*
* @param null|string $value
* @return string|$this
*/
public function val($value = null) {
if($value !== null) {
$this->value = $value;
return $this;
}
return $this->value;
}
}

View file

@ -57,6 +57,12 @@ class DokuHTTPClient extends HTTPClient {
* @triggers HTTPCLIENT_REQUEST_SEND
* @author Andreas Gohr <andi@splitbrain.org>
*/
/**
* @param string $url
* @param string|array $data the post data either as array or raw data
* @param string $method
* @return bool
*/
function sendRequest($url,$data='',$method='GET'){
$httpdata = array('url' => $url,
'data' => $data,
@ -104,7 +110,7 @@ class HTTPClient {
var $header_regexp; // if set this RE must match against the headers, else abort
var $headers;
var $debug;
var $start = 0; // for timings
var $start = 0.0; // for timings
var $keep_alive = true; // keep alive rocks
// don't set these, read on error
@ -166,7 +172,8 @@ class HTTPClient {
*
* @param string $url The URL to fetch
* @param bool $sloppy304 Return body on 304 not modified
* @return bool|string response body, false on error
* @return false|string response body, false on error
*
* @author Andreas Gohr <andi@splitbrain.org>
*/
function get($url,$sloppy304=false){
@ -187,7 +194,8 @@ class HTTPClient {
* @param string $url The URL to fetch
* @param array $data Associative array of parameters
* @param bool $sloppy304 Return body on 304 not modified
* @return bool|string response body, false on error
* @return false|string response body, false on error
*
* @author Andreas Gohr <andi@splitbrain.org>
*/
function dget($url,$data,$sloppy304=false){
@ -207,7 +215,7 @@ class HTTPClient {
*
* @param string $url The URL to fetch
* @param array $data Associative array of parameters
* @return bool|string response body, false on error
* @return false|string response body, false on error
* @author Andreas Gohr <andi@splitbrain.org>
*/
function post($url,$data){
@ -229,6 +237,7 @@ class HTTPClient {
* @param mixed $data - the post data either as array or raw data
* @param string $method - HTTP Method usually GET or POST.
* @return bool - true on success
*
* @author Andreas Goetz <cpuidle@gmx.de>
* @author Andreas Gohr <andi@splitbrain.org>
*/
@ -580,10 +589,25 @@ class HTTPClient {
$this->_debug('SSL Tunnel Response',$r_headers);
if(preg_match('/^HTTP\/1\.[01] 200/i',$r_headers)){
if (stream_socket_enable_crypto($socket, true, STREAM_CRYPTO_METHOD_SSLv3_CLIENT)) {
// set correct peer name for verification (enabled since PHP 5.6)
stream_context_set_option($socket, 'ssl', 'peer_name', $requestinfo['host']);
// because SSLv3 is mostly broken, we try TLS connections here first.
// according to https://github.com/splitbrain/dokuwiki/commit/c05ef534 we had problems with certain
// setups with this solution before, but we have no usable test for that and TLS should be the more
// common crypto by now
if (@stream_socket_enable_crypto($socket, true, STREAM_CRYPTO_METHOD_TLS_CLIENT)) {
$requesturl = $requestinfo['path'];
return true;
}
// if the above failed, this will most probably not work either, but we can try
if (@stream_socket_enable_crypto($socket, true, STREAM_CRYPTO_METHOD_SSLv3_CLIENT)) {
$requesturl = $requestinfo['path'];
return true;
}
throw new HTTPClientException('Failed to set up crypto for secure connection to '.$requestinfo['host'], -151);
}
throw new HTTPClientException('Failed to establish secure proxy connection', -150);
@ -596,6 +620,7 @@ class HTTPClient {
* @param string $data The data to write
* @param string $message Description of what is being read
* @throws HTTPClientException
*
* @author Tom N Harris <tnharris@whoopdedo.org>
*/
function _sendData($socket, $data, $message) {
@ -640,6 +665,7 @@ class HTTPClient {
* @param bool $ignore_eof End-of-file is not an error if this is set
* @throws HTTPClientException
* @return string
*
* @author Tom N Harris <tnharris@whoopdedo.org>
*/
function _readData($socket, $nbytes, $message, $ignore_eof = false) {
@ -689,6 +715,7 @@ class HTTPClient {
* @param string $message Description of what is being read
* @throws HTTPClientException
* @return string
*
* @author Tom N Harris <tnharris@whoopdedo.org>
*/
function _readLine($socket, $message) {
@ -723,6 +750,9 @@ class HTTPClient {
* Uses _debug_text or _debug_html depending on the SAPI name
*
* @author Andreas Gohr <andi@splitbrain.org>
*
* @param string $info
* @param mixed $var
*/
function _debug($info,$var=null){
if(!$this->debug) return;
@ -736,8 +766,8 @@ class HTTPClient {
/**
* print debug info as HTML
*
* @param $info
* @param null $var
* @param string $info
* @param mixed $var
*/
function _debug_html($info, $var=null){
print '<b>'.$info.'</b> '.($this->_time() - $this->start).'s<br />';
@ -753,8 +783,8 @@ class HTTPClient {
/**
* prints debug info as plain text
*
* @param $info
* @param null $var
* @param string $info
* @param mixed $var
*/
function _debug_text($info, $var=null){
print '*'.$info.'* '.($this->_time() - $this->start)."s\n";
@ -764,6 +794,8 @@ class HTTPClient {
/**
* Return current timestamp in microsecond resolution
*
* @return float
*/
static function _time(){
list($usec, $sec) = explode(" ", microtime());
@ -776,6 +808,9 @@ class HTTPClient {
* All Keys are lowercased.
*
* @author Andreas Gohr <andi@splitbrain.org>
*
* @param string $string
* @return array
*/
function _parseHeaders($string){
$headers = array();
@ -804,6 +839,9 @@ class HTTPClient {
* convert given header array to header string
*
* @author Andreas Gohr <andi@splitbrain.org>
*
* @param array $headers
* @return string
*/
function _buildHeaders($headers){
$string = '';
@ -818,6 +856,8 @@ class HTTPClient {
* get cookies as http header string
*
* @author Andreas Goetz <cpuidle@gmx.de>
*
* @return string
*/
function _getCookies(){
$headers = '';
@ -833,6 +873,9 @@ class HTTPClient {
* Encode data for posting
*
* @author Andreas Gohr <andi@splitbrain.org>
*
* @param array $data
* @return string
*/
function _postEncode($data){
return http_build_query($data,'','&');
@ -843,6 +886,9 @@ class HTTPClient {
*
* @fixme use of urlencode might be wrong here
* @author Andreas Gohr <andi@splitbrain.org>
*
* @param array $data
* @return string
*/
function _postMultipartEncode($data){
$boundary = '--'.$this->boundary;

File diff suppressed because it is too large Load diff

View file

@ -83,7 +83,6 @@ class Input {
*
* @see isset
* @param string $name Parameter name
* @return bool
*/
public function remove($name) {
if(isset($this->access[$name])) {
@ -132,7 +131,7 @@ class Input {
* @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
* @return mixed (reference)
*/
public function &ref($name, $default = '', $nonempty = false) {
if(!isset($this->access[$name]) || ($nonempty && empty($this->access[$name]))) {
@ -146,7 +145,7 @@ class Input {
* 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 int $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
*/
@ -164,7 +163,7 @@ class Input {
* 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 string $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
*/
@ -246,7 +245,7 @@ class Input {
*
* This function returns the $INPUT object itself for easy chaining
*
* @param $name
* @param string $name
* @return Input
*/
public function extract($name){

View file

@ -119,7 +119,7 @@ class JSON {
* JSON_LOOSE_TYPE - loose typing
* "{...}" syntax creates associative arrays in decode.
*/
function JSON($use=JSON_STRICT_TYPE) {
function __construct($use=JSON_STRICT_TYPE) {
$this->use = $use;
}

View file

@ -42,6 +42,7 @@
class JpegMeta {
var $_fileName;
var $_fp = null;
var $_fpout = null;
var $_type = 'unknown';
var $_markers;
@ -53,7 +54,7 @@ class JpegMeta {
*
* @author Sebastian Delmont <sdelmont@zonageek.com>
*/
function JpegMeta($fileName) {
function __construct($fileName) {
$this->_fileName = $fileName;
@ -132,6 +133,9 @@ class JpegMeta {
* through one function
*
* @author Andreas Gohr <andi@splitbrain.org>
*
* @param array|string $fields field name or array with field names
* @return bool|string
*/
function getField($fields) {
if(!is_array($fields)) $fields = array($fields);
@ -177,6 +181,10 @@ class JpegMeta {
* through one function
*
* @author Andreas Gohr <andi@splitbrain.org>
*
* @param string $field field name
* @param string $value
* @return bool success or fail
*/
function setField($field, $value) {
if(strtolower(substr($field,0,5)) == 'iptc.'){
@ -193,6 +201,9 @@ class JpegMeta {
* through one function
*
* @author Andreas Gohr <andi@splitbrain.org>
*
* @param string $field field name
* @return bool
*/
function deleteField($field) {
if(strtolower(substr($field,0,5)) == 'iptc.'){
@ -208,6 +219,9 @@ class JpegMeta {
* Return a date field
*
* @author Andreas Gohr <andi@splitbrain.org>
*
* @param string $field
* @return false|string
*/
function getDateField($field) {
if (!isset($this->_info['dates'])) {
@ -225,6 +239,9 @@ class JpegMeta {
* Return a file info field
*
* @author Andreas Gohr <andi@splitbrain.org>
*
* @param string $field field name
* @return false|string
*/
function getFileField($field) {
if (!isset($this->_info['file'])) {
@ -243,6 +260,8 @@ class JpegMeta {
*
* @author Andreas Gohr <andi@splitbrain.org>
* @todo handle makernotes
*
* @return false|string
*/
function getCamera(){
$make = $this->getField(array('Exif.Make','Exif.TIFFMake'));
@ -256,6 +275,8 @@ class JpegMeta {
* Return shutter speed as a ratio
*
* @author Joe Lapp <joe.lapp@pobox.com>
*
* @return string
*/
function getShutterSpeed() {
if (!isset($this->_info['exif'])) {
@ -274,6 +295,9 @@ class JpegMeta {
* Return an EXIF field
*
* @author Sebastian Delmont <sdelmont@zonageek.com>
*
* @param string $field field name
* @return false|string
*/
function getExifField($field) {
if (!isset($this->_info['exif'])) {
@ -295,6 +319,9 @@ class JpegMeta {
* Return an XMP field
*
* @author Hakan Sandell <hakan.sandell@mydata.se>
*
* @param string $field field name
* @return false|string
*/
function getXmpField($field) {
if (!isset($this->_info['xmp'])) {
@ -316,6 +343,9 @@ class JpegMeta {
* Return an Adobe Field
*
* @author Sebastian Delmont <sdelmont@zonageek.com>
*
* @param string $field field name
* @return false|string
*/
function getAdobeField($field) {
if (!isset($this->_info['adobe'])) {
@ -337,6 +367,9 @@ class JpegMeta {
* Return an IPTC field
*
* @author Sebastian Delmont <sdelmont@zonageek.com>
*
* @param string $field field name
* @return false|string
*/
function getIPTCField($field) {
if (!isset($this->_info['iptc'])) {
@ -359,6 +392,10 @@ class JpegMeta {
*
* @author Sebastian Delmont <sdelmont@zonageek.com>
* @author Joe Lapp <joe.lapp@pobox.com>
*
* @param string $field field name
* @param string $value
* @return bool
*/
function setExifField($field, $value) {
if (!isset($this->_info['exif'])) {
@ -389,6 +426,10 @@ class JpegMeta {
* Set an Adobe Field
*
* @author Sebastian Delmont <sdelmont@zonageek.com>
*
* @param string $field field name
* @param string $value
* @return bool
*/
function setAdobeField($field, $value) {
if (!isset($this->_info['adobe'])) {
@ -413,6 +454,10 @@ class JpegMeta {
* dimensions
*
* @author Andreas Gohr <andi@splitbrain.org>
*
* @param int $maxwidth
* @param int $maxheight
* @return float|int
*/
function getResizeRatio($maxwidth,$maxheight=0){
if(!$maxheight) $maxheight = $maxwidth;
@ -442,6 +487,10 @@ class JpegMeta {
* Set an IPTC field
*
* @author Sebastian Delmont <sdelmont@zonageek.com>
*
* @param string $field field name
* @param string $value
* @return bool
*/
function setIPTCField($field, $value) {
if (!isset($this->_info['iptc'])) {
@ -465,6 +514,9 @@ class JpegMeta {
* Delete an EXIF field
*
* @author Sebastian Delmont <sdelmont@zonageek.com>
*
* @param string $field field name
* @return bool
*/
function deleteExifField($field) {
if (!isset($this->_info['exif'])) {
@ -486,6 +538,9 @@ class JpegMeta {
* Delete an Adobe field
*
* @author Sebastian Delmont <sdelmont@zonageek.com>
*
* @param string $field field name
* @return bool
*/
function deleteAdobeField($field) {
if (!isset($this->_info['adobe'])) {
@ -507,6 +562,9 @@ class JpegMeta {
* Delete an IPTC field
*
* @author Sebastian Delmont <sdelmont@zonageek.com>
*
* @param string $field field name
* @return bool
*/
function deleteIPTCField($field) {
if (!isset($this->_info['iptc'])) {
@ -527,12 +585,12 @@ class JpegMeta {
/**
* Get the image's title, tries various fields
*
* @param int $max maximum number chars (keeps words)
* @param int $max maximum number chars (keeps words)
* @return false|string
*
* @author Andreas Gohr <andi@splitbrain.org>
*/
function getTitle($max=80){
$cap = '';
// try various fields
$cap = $this->getField(array('Iptc.Headline',
'Iptc.Caption',
@ -555,11 +613,14 @@ class JpegMeta {
* Gather various date fields
*
* @author Sebastian Delmont <sdelmont@zonageek.com>
*
* @return array|bool
*/
function getDates() {
$this->_parseAll();
if ($this->_markers == null) {
if (@isset($this->_info['file']['UnixTime'])) {
$dates = array();
$dates['FileModified'] = $this->_info['file']['UnixTime'];
$dates['Time'] = $this->_info['file']['UnixTime'];
$dates['TimeSource'] = 'FileModified';
@ -690,6 +751,8 @@ class JpegMeta {
* Get the image width, tries various fields
*
* @author Sebastian Delmont <sdelmont@zonageek.com>
*
* @return false|string
*/
function getWidth() {
if (!isset($this->_info['sof'])) {
@ -719,6 +782,8 @@ class JpegMeta {
* Get the image height, tries various fields
*
* @author Sebastian Delmont <sdelmont@zonageek.com>
*
* @return false|string
*/
function getHeight() {
if (!isset($this->_info['sof'])) {
@ -748,6 +813,8 @@ class JpegMeta {
* Get an dimension string for use in img tag
*
* @author Sebastian Delmont <sdelmont@zonageek.com>
*
* @return false|string
*/
function getDimStr() {
if ($this->_markers == null) {
@ -764,6 +831,9 @@ class JpegMeta {
* Checks for an embedded thumbnail
*
* @author Sebastian Delmont <sdelmont@zonageek.com>
*
* @param string $which possible values: 'any', 'exif' or 'adobe'
* @return false|string
*/
function hasThumbnail($which = 'any') {
if (($which == 'any') || ($which == 'exif')) {
@ -805,6 +875,9 @@ class JpegMeta {
* Send embedded thumbnail to browser
*
* @author Sebastian Delmont <sdelmont@zonageek.com>
*
* @param string $which possible values: 'any', 'exif' or 'adobe'
* @return bool
*/
function sendThumbnail($which = 'any') {
$data = null;
@ -855,12 +928,15 @@ class JpegMeta {
*
* @author Sebastian Delmont <sdelmont@zonageek.com>
* @author Andreas Gohr <andi@splitbrain.org>
*
* @param string $fileName file name or empty string for a random name
* @return bool
*/
function save($fileName = "") {
if ($fileName == "") {
$tmpName = tempnam(dirname($this->_fileName),'_metatemp_');
$this->_writeJPEG($tmpName);
if (@file_exists($tmpName)) {
if (file_exists($tmpName)) {
return io_rename($tmpName, $this->_fileName);
}
} else {
@ -1030,6 +1106,10 @@ class JpegMeta {
}
/*************************************************************/
/**
* @param string $outputName
*/
function _writeJPEG($outputName) {
$this->_parseAll();
@ -1162,6 +1242,12 @@ class JpegMeta {
}
/*************************************************************/
/**
* @param integer $marker
* @param integer $length
* @param integer $origLength
*/
function _writeJPEGMarker($marker, $length, &$data, $origLength) {
if ($length <= 0) {
return false;
@ -1334,7 +1420,6 @@ class JpegMeta {
return false;
}
$pos = 0;
$this->_info['jfif'] = array();
$vmaj = $this->_getByte($data, 5);
@ -1420,7 +1505,6 @@ class JpegMeta {
break;
default:
return false;
break;
}
$this->_info['sof']['Format'] = $format;
@ -1491,6 +1575,7 @@ class JpegMeta {
* Parses XMP nodes by recursion
*
* @author Hakan Sandell <hakan.sandell@mydata.se>
* @param integer $count
*/
function _parseXmpNode($values, &$i, &$meta, $count) {
if ($values[$i]['type'] == 'close') return;
@ -1594,6 +1679,12 @@ class JpegMeta {
}
/*************************************************************/
/**
* @param integer $base
* @param boolean $isBigEndian
* @param string $mode
*/
function _readIFD($data, $base, $offset, $isBigEndian, $mode) {
$EXIFTags = $this->_exifTagNames($mode);
@ -1849,6 +1940,12 @@ class JpegMeta {
}
/*************************************************************/
/**
* @param integer $offsetBase
* @param boolean $isBigEndian
* @param boolean $hasNext
*/
function _writeIFD(&$data, $pos, $offsetBase, &$entries, $isBigEndian, $hasNext) {
$tiffData = null;
$tiffDataOffsetPos = -1;
@ -1905,6 +2002,11 @@ class JpegMeta {
}
/*************************************************************/
/**
* @param boolean $isBigEndian
* @param string $mode
*/
function & _getIFDEntries($isBigEndian, $mode) {
$EXIFNames = $this->_exifTagNames($mode);
$EXIFTags = $this->_exifNameTags($mode);
@ -2413,6 +2515,10 @@ class JpegMeta {
}
/*************************************************************/
/**
* @param integer $pos
*/
function _write8BIM(&$data, $pos, $type, $header, &$value) {
$signature = "8BIM";
@ -2473,6 +2579,10 @@ class JpegMeta {
}
/*************************************************************/
/**
* @param integer $pos
*/
function _writeIPTCEntry(&$data, $pos, $type, &$value) {
$pos = $this->_putShort($data, $pos, 0x1C02);
$pos = $this->_putByte($data, $pos, $type);
@ -2833,11 +2943,19 @@ class JpegMeta {
}
/*************************************************************/
/**
* @param integer $pos
*/
function _getByte(&$data, $pos) {
return ord($data{$pos});
}
/*************************************************************/
/**
* @param integer $pos
*/
function _putByte(&$data, $pos, $val) {
$val = intval($val);
@ -2873,6 +2991,10 @@ class JpegMeta {
}
/*************************************************************/
/**
* @param integer $pos
*/
function _getLong(&$data, $pos, $bigEndian = true) {
if ($bigEndian) {
return (ord($data{$pos}) << 24)
@ -2888,6 +3010,10 @@ class JpegMeta {
}
/*************************************************************/
/**
* @param integer $pos
*/
function _putLong(&$data, $pos, $val, $bigEndian = true) {
$val = intval($val);

View file

@ -108,6 +108,9 @@ class Mailer {
/**
* Callback function to automatically embed images referenced in HTML templates
*
* @param array $matches
* @return string placeholder
*/
protected function autoembed_cb($matches) {
static $embeds = 0;
@ -130,7 +133,7 @@ class Mailer {
* 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 string|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) {
@ -160,6 +163,8 @@ class Mailer {
*
* 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
*
* @param string $param
*/
public function setParameters($param) {
$this->sendparam = $param;
@ -177,7 +182,7 @@ class Mailer {
* @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 string $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) {
@ -265,6 +270,8 @@ class Mailer {
* Placeholders can be used to reference embedded attachments
*
* You probably want to use setBody() instead
*
* @param string $html
*/
public function setHTML($html) {
$this->html = $html;
@ -274,6 +281,8 @@ class Mailer {
* Set the plain text part of the mail
*
* You probably want to use setBody() instead
*
* @param string $text
*/
public function setText($text) {
$this->text = $text;
@ -283,7 +292,7 @@ class Mailer {
* Add the To: recipients
*
* @see cleanAddress
* @param string|array $address Multiple adresses separated by commas or as array
* @param string|string[] $address Multiple adresses separated by commas or as array
*/
public function to($address) {
$this->setHeader('To', $address, false);
@ -293,7 +302,7 @@ class Mailer {
* Add the Cc: recipients
*
* @see cleanAddress
* @param string|array $address Multiple adresses separated by commas or as array
* @param string|string[] $address Multiple adresses separated by commas or as array
*/
public function cc($address) {
$this->setHeader('Cc', $address, false);
@ -303,7 +312,7 @@ class Mailer {
* Add the Bcc: recipients
*
* @see cleanAddress
* @param string|array $address Multiple adresses separated by commas or as array
* @param string|string[] $address Multiple adresses separated by commas or as array
*/
public function bcc($address) {
$this->setHeader('Bcc', $address, false);
@ -340,8 +349,8 @@ class Mailer {
* Example:
* cc("föö <foo@bar.com>, me@somewhere.com","TBcc");
*
* @param string|array $addresses Multiple adresses separated by commas or as array
* @return bool|string the prepared header (can contain multiple lines)
* @param string|string[] $addresses Multiple adresses separated by commas or as array
* @return false|string the prepared header (can contain multiple lines)
*/
public function cleanAddress($addresses) {
// No named recipients for To: in Windows (see FS#652)
@ -418,6 +427,8 @@ class Mailer {
* Prepare the mime multiparts for all attachments
*
* Replaces placeholders in the HTML with the correct CIDs
*
* @return string mime multiparts
*/
protected function prepareAttachments() {
$mime = '';
@ -565,9 +576,9 @@ class Mailer {
/**
* Returns a complete, EOL terminated header line, wraps it if necessary
*
* @param $key
* @param $val
* @return string
* @param string $key
* @param string $val
* @return string line
*/
protected function wrappedHeaderLine($key, $val){
return wordwrap("$key: $val", 78, MAILHEADER_EOL.' ').MAILHEADER_EOL;

View file

@ -16,8 +16,9 @@ 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
*
* @param string $clear Clear-Text password
* @param string $hash Hash to compare against
* @return bool
*/
function verify_hash($clear, $hash) {
@ -49,7 +50,7 @@ class PassHash {
} elseif(preg_match('/^md5\$(.{5})\$/', $hash, $m)) {
$method = 'djangomd5';
$salt = $m[1];
} elseif(preg_match('/^\$2a\$(.{2})\$/', $hash, $m)) {
} elseif(preg_match('/^\$2(a|y)\$(.{2})\$/', $hash, $m)) {
$method = 'bcrypt';
$salt = $hash;
} elseif(substr($hash, 0, 6) == '{SSHA}') {
@ -109,9 +110,9 @@ class PassHash {
* If $salt is not null, the value is kept, but the lenght restriction is
* applied (unless, $cut is false).
*
* @param string &$salt The salt, pass null if you want one generated
* @param int $len The length of the salt
* @param bool $cut Apply length restriction to existing salt?
* @param string|null &$salt The salt, pass null if you want one generated
* @param int $len The length of the salt
* @param bool $cut Apply length restriction to existing salt?
*/
public function init_salt(&$salt, $len = 32, $cut = true) {
if(is_null($salt)) {
@ -135,6 +136,7 @@ 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
* @return string Hashed password
@ -175,6 +177,7 @@ 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)
@ -337,6 +340,7 @@ class PassHash {
* 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)
@ -404,6 +408,7 @@ 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
* @return string Hashed password
@ -420,6 +425,7 @@ 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
* @return string Hashed password
@ -486,6 +492,7 @@ class PassHash {
* method 'A' is not supported.
*
* @link http://www.mediawiki.org/wiki/Manual_talk:User_table#user_password_column
*
* @param string $clear The clear text to hash
* @param string $salt The salt to use, null for random
* @return string Hashed password
@ -511,7 +518,6 @@ class PassHash {
* @param string $data Message to be hashed.
* @param string $key Shared secret key used for generating the HMAC variant of the message digest.
* @param bool $raw_output When set to TRUE, outputs raw binary data. FALSE outputs lowercase hexits.
*
* @return string
*/
public static function hmac($algo, $data, $key, $raw_output = false) {
@ -545,9 +551,8 @@ class PassHash {
/**
* Use DokuWiki's secure random generator if available
*
* @param $min
* @param $max
*
* @param int $min
* @param int $max
* @return int
*/
protected function random($min, $max){

View file

@ -13,6 +13,11 @@ class RemoteAPICore {
$this->api = $api;
}
/**
* Returns details about the core methods
*
* @return array
*/
function __getRemoteInfo() {
return array(
'dokuwiki.getVersion' => array(
@ -158,19 +163,27 @@ class RemoteAPICore {
);
}
/**
* @return string
*/
function getVersion() {
return getVersion();
}
/**
* @return int unix timestamp
*/
function getTime() {
return time();
}
/**
* Return a raw wiki page
*
* @param string $id wiki page id
* @param string $rev revision number of the page
* @return page text.
* @param int|string $rev revision timestamp of the page or empty string
* @return string page text.
* @throws RemoteAccessDeniedException if no permission for page
*/
function rawPage($id,$rev=''){
$id = $this->resolvePageId($id);
@ -189,8 +202,11 @@ class RemoteAPICore {
* Return a media file
*
* @author Gina Haeussge <osd@foosel.net>
*
* @param string $id file id
* @return media file
* @return mixed media file
* @throws RemoteAccessDeniedException no permission for media
* @throws RemoteException not exist
*/
function getAttachment($id){
$id = cleanID($id);
@ -211,6 +227,9 @@ class RemoteAPICore {
* Return info about a media file
*
* @author Gina Haeussge <osd@foosel.net>
*
* @param string $id page id
* @return array
*/
function getAttachmentInfo($id){
$id = cleanID($id);
@ -230,6 +249,11 @@ class RemoteAPICore {
/**
* Return a wiki page rendered to html
*
* @param string $id page id
* @param string|int $rev revision timestamp or empty string
* @return null|string html
* @throws RemoteAccessDeniedException no access to page
*/
function htmlPage($id,$rev=''){
$id = $this->resolvePageId($id);
@ -241,6 +265,8 @@ class RemoteAPICore {
/**
* List all pages - we use the indexer list here
*
* @return array
*/
function listPages(){
$list = array();
@ -265,6 +291,12 @@ class RemoteAPICore {
/**
* List all pages in the given namespace (and below)
*
* @param string $ns
* @param array $opts
* $opts['depth'] recursion level, 0 for all
* $opts['hash'] do md5 sum of content?
* @return array
*/
function readNamespace($ns,$opts){
global $conf;
@ -281,9 +313,12 @@ class RemoteAPICore {
/**
* List all pages in the given namespace (and below)
*
* @param string $query
* @return array
*/
function search($query){
$regex = '';
$regex = array();
$data = ft_pageSearch($query,$regex);
$pages = array();
@ -314,6 +349,8 @@ class RemoteAPICore {
/**
* Returns the wiki title.
*
* @return string
*/
function getTitle(){
global $conf;
@ -328,6 +365,15 @@ class RemoteAPICore {
* a regular expression matching their name.
*
* @author Gina Haeussge <osd@foosel.net>
*
* @param string $ns
* @param array $options
* $options['depth'] recursion level, 0 for all
* $options['showmsg'] shows message if invalid media id is used
* $options['pattern'] check given pattern
* $options['hash'] add hashes to result list
* @return array
* @throws RemoteAccessDeniedException no access to the media files
*/
function listAttachments($ns, $options = array()) {
global $conf;
@ -359,6 +405,9 @@ class RemoteAPICore {
/**
* Return a list of backlinks
*
* @param string $id page id
* @return array
*/
function listBackLinks($id){
return ft_backlinks($this->resolvePageId($id));
@ -366,6 +415,12 @@ class RemoteAPICore {
/**
* Return some basic data about a page
*
* @param string $id page id
* @param string|int $rev revision timestamp or empty string
* @return array
* @throws RemoteAccessDeniedException no access for page
* @throws RemoteException page not exist
*/
function pageInfo($id,$rev=''){
$id = $this->resolvePageId($id);
@ -395,6 +450,13 @@ class RemoteAPICore {
* Save a wiki page
*
* @author Michael Klier <chi@chimeric.de>
*
* @param string $id page id
* @param string $text wiki text
* @param array $params parameters: summary, minor edit
* @return bool
* @throws RemoteAccessDeniedException no write access for page
* @throws RemoteException no id, empty new page or locked
*/
function putPage($id, $text, $params) {
global $TEXT;
@ -451,6 +513,11 @@ class RemoteAPICore {
/**
* Appends text to a wiki page.
*
* @param string $id page id
* @param string $text wiki text
* @param array $params such as summary,minor
* @return bool|string
*/
function appendPage($id, $text, $params) {
$currentpage = $this->rawPage($id);
@ -464,6 +531,12 @@ class RemoteAPICore {
* Uploads a file to the wiki.
*
* Michael Klier <chi@chimeric.de>
*
* @param string $id page id
* @param string $file
* @param array $params such as overwrite
* @return false|string
* @throws RemoteException
*/
function putAttachment($id, $file, $params) {
$id = cleanID($id);
@ -493,6 +566,11 @@ class RemoteAPICore {
* Deletes a file from the wiki.
*
* @author Gina Haeussge <osd@foosel.net>
*
* @param string $id page id
* @return int
* @throws RemoteAccessDeniedException no permissions
* @throws RemoteException file in use or not deleted
*/
function deleteAttachment($id){
$id = cleanID($id);
@ -511,6 +589,9 @@ class RemoteAPICore {
/**
* Returns the permissions of a given wiki page
*
* @param string $id page id
* @return int permission level
*/
function aclCheck($id) {
$id = $this->resolvePageId($id);
@ -521,6 +602,10 @@ class RemoteAPICore {
* Lists all links contained in a wiki page
*
* @author Michael Klier <chi@chimeric.de>
*
* @param string $id page id
* @return array
* @throws RemoteAccessDeniedException no read access for page
*/
function listLinks($id) {
$id = $this->resolvePageId($id);
@ -571,6 +656,10 @@ class RemoteAPICore {
*
* @author Michael Hamann <michael@content-space.de>
* @author Michael Klier <chi@chimeric.de>
*
* @param int $timestamp unix timestamp
* @return array
* @throws RemoteException no valid timestamp
*/
function getRecentChanges($timestamp) {
if(strlen($timestamp) != 10) {
@ -596,7 +685,7 @@ class RemoteAPICore {
return $changes;
} else {
// in case we still have nothing at this point
return new RemoteException('There are no changes in the specified timeframe', 321);
throw new RemoteException('There are no changes in the specified timeframe', 321);
}
}
@ -605,6 +694,10 @@ class RemoteAPICore {
*
* @author Michael Hamann <michael@content-space.de>
* @author Michael Klier <chi@chimeric.de>
*
* @param int $timestamp unix timestamp
* @return array
* @throws RemoteException no valid timestamp
*/
function getRecentMediaChanges($timestamp) {
if(strlen($timestamp) != 10)
@ -637,6 +730,12 @@ class RemoteAPICore {
* Returns a list of available revisions of a given wiki page
*
* @author Michael Klier <chi@chimeric.de>
*
* @param string $id page id
* @param int $first skip the first n changelog lines
* @return array
* @throws RemoteAccessDeniedException no read access for page
* @throws RemoteException empty id
*/
function pageVersions($id, $first) {
$id = $this->resolvePageId($id);
@ -681,6 +780,7 @@ class RemoteAPICore {
$pagelog->setChunkSize(1024);
$info = $pagelog->getRevisionInfo($time);
if(!empty($info)) {
$data = array();
$data['user'] = $info['user'];
$data['ip'] = $info['ip'];
$data['type'] = $info['type'];
@ -713,6 +813,9 @@ class RemoteAPICore {
*
* Returns an associative array with the keys locked, lockfail, unlocked and
* unlockfail, each containing lists of pages.
*
* @param array[] $set list pages with array('lock' => array, 'unlock' => array)
* @return array
*/
function setLocks($set){
$locked = array();
@ -747,13 +850,27 @@ class RemoteAPICore {
);
}
/**
* Return API version
*
* @return int
*/
function getAPIVersion(){
return DOKU_API_VERSION;
}
/**
* Login
*
* @param string $user
* @param string $pass
* @return int
*/
function login($user,$pass){
global $conf;
/** @var DokuWiki_Auth_Plugin $auth */
global $auth;
if(!$conf['useacl']) return 0;
if(!$auth) return 0;
@ -774,6 +891,11 @@ class RemoteAPICore {
return $ok;
}
/**
* Log off
*
* @return int
*/
function logoff(){
global $conf;
global $auth;
@ -785,6 +907,12 @@ class RemoteAPICore {
return 1;
}
/**
* Resolve page id
*
* @param string $id page id
* @return string
*/
private function resolvePageId($id) {
$id = cleanID($id);
if(empty($id)) {

View file

@ -24,6 +24,8 @@ class Sitemapper {
* @author Andreas Gohr
* @link https://www.google.com/webmasters/sitemaps/docs/en/about.html
* @link http://www.sitemaps.org/
*
* @return bool
*/
public static function generate(){
global $conf;
@ -31,7 +33,7 @@ class Sitemapper {
$sitemap = Sitemapper::getFilePath();
if(@file_exists($sitemap)){
if(file_exists($sitemap)){
if(!is_writable($sitemap)) return false;
}else{
if(!is_writable(dirname($sitemap))) return false;
@ -53,7 +55,7 @@ class Sitemapper {
foreach($pages as $id){
//skip hidden, non existing and restricted files
if(isHiddenPage($id)) continue;
if(auth_aclcheck($id,'','') < AUTH_READ) continue;
if(auth_aclcheck($id,'',array()) < AUTH_READ) continue;
$item = SitemapItem::createFromID($id);
if ($item !== null)
$items[] = $item;
@ -75,6 +77,7 @@ class Sitemapper {
*
* @param $items array The SitemapItems that shall be included in the sitemap.
* @return string The sitemap XML.
*
* @author Michael Hamann
*/
private static function getXML($items) {
@ -95,6 +98,7 @@ class Sitemapper {
* Helper function for getting the path to the sitemap file.
*
* @return string The path to the sitemap file.
*
* @author Michael Hamann
*/
public static function getFilePath() {
@ -123,6 +127,8 @@ class Sitemapper {
* urls to ping using the SITEMAP_PING event.
*
* @author Michael Hamann
*
* @return bool
*/
public static function pingSearchEngines() {
//ping search engines...
@ -168,9 +174,9 @@ class SitemapItem {
/**
* Create a new item.
*
* @param $url string The url of the item
* @param $lastmod int Timestamp of the last modification
* @param $changefreq string How frequently the item is likely to change. Valid values: always, hourly, daily, weekly, monthly, yearly, never.
* @param string $url The url of the item
* @param int $lastmod Timestamp of the last modification
* @param string $changefreq How frequently the item is likely to change. Valid values: always, hourly, daily, weekly, monthly, yearly, never.
* @param $priority float|string The priority of the item relative to other URLs on your site. Valid values range from 0.0 to 1.0.
*/
public function __construct($url, $lastmod, $changefreq = null, $priority = null) {
@ -183,9 +189,9 @@ class SitemapItem {
/**
* Helper function for creating an item for a wikipage id.
*
* @param $id string A wikipage id.
* @param $changefreq string How frequently the item is likely to change. Valid values: always, hourly, daily, weekly, monthly, yearly, never.
* @param $priority float|string The priority of the item relative to other URLs on your site. Valid values range from 0.0 to 1.0.
* @param string $id A wikipage id.
* @param string $changefreq How frequently the item is likely to change. Valid values: always, hourly, daily, weekly, monthly, yearly, never.
* @param float|string $priority The priority of the item relative to other URLs on your site. Valid values range from 0.0 to 1.0.
* @return SitemapItem The sitemap item.
*/
public static function createFromID($id, $changefreq = null, $priority = null) {

View file

@ -43,6 +43,7 @@
* @author Andreas Gohr <andi@splitbrain.org>
* @author Bouchon <tarlib@bouchon.org> (Maxg)
* @license GPL 2
* @deprecated 2015-05-15 - use splitbrain\PHPArchive\Tar instead
*/
class Tar {
@ -53,6 +54,7 @@ class Tar {
protected $file = '';
protected $comptype = Tar::COMPRESS_AUTO;
/** @var resource|int */
protected $fh;
protected $memory = '';
protected $closed = true;
@ -105,6 +107,9 @@ class Tar {
*
* The archive is closed afer reading the contents, because rewinding is not possible in bzip2 streams.
* Reopen the file with open() again if you want to do additional operations
*
* @return array
* @throws TarIOException
*/
public function contents() {
if($this->closed || !$this->file) throw new TarIOException('Can not read from a closed archive');
@ -270,6 +275,7 @@ class Tar {
* Add a file to the current TAR archive using an existing file in the filesystem
*
* @todo handle directory adding
*
* @param string $file the original file
* @param string $name the name to use for the file in the archive
* @throws TarIOException
@ -377,6 +383,10 @@ class Tar {
* Returns the created in-memory archive data
*
* This implicitly calls close() on the Archive
*
* @param int $comptype
* @param int $complevel
* @return mixed|string
*/
public function getArchive($comptype = Tar::COMPRESS_AUTO, $complevel = 9) {
$this->close();
@ -395,7 +405,7 @@ class Tar {
* Note: It more memory effective to specify the filename in the create() function and
* let the library work on the new file directly.
*
* @param $file
* @param string $file
* @param int $comptype
* @param int $complevel
* @throws TarIOException
@ -522,7 +532,7 @@ class Tar {
* Decode the given tar file header
*
* @param string $block a 512 byte block containign the header data
* @return array|bool
* @return false|array
*/
protected function parseHeader($block) {
if(!$block || strlen($block) != 512) return false;
@ -536,6 +546,7 @@ class Tar {
$header = @unpack("a100filename/a8perm/a8uid/a8gid/a12size/a12mtime/a8checksum/a1typeflag/a100link/a6magic/a2version/a32uname/a32gname/a8devmajor/a8devminor/a155prefix", $block);
if(!$header) return false;
$return = array();
$return['checksum'] = OctDec(trim($header['checksum']));
if($return['checksum'] != $chks) return false;
@ -570,7 +581,7 @@ class Tar {
/**
* Cleans up a path and removes relative parts, also strips leading slashes
*
* @param string $p_dir
* @param string $path
* @return string
*/
public function cleanPath($path) {
@ -590,7 +601,7 @@ class Tar {
/**
* Checks if the given compression type is available and throws an exception if not
*
* @param $comptype
* @param int $comptype
* @throws TarIllegalCompressionException
*/
protected function compressioncheck($comptype) {
@ -624,8 +635,14 @@ class Tar {
}
}
/**
* Class TarIOException
*/
class TarIOException extends Exception {
}
/**
* Class TarIllegalCompressionException
*/
class TarIllegalCompressionException extends Exception {
}

View file

@ -1,89 +0,0 @@
<?php
/**
* This is a compatibility wrapper around the new Tar class
*
* Use of this library is strongly discouraged. Only basic extraction is wrapped,
* everything else will fail.
*
* @deprecated 2012-11-06
*/
class TarLib {
const COMPRESS_GZIP = 1;
const COMPRESS_BZIP = 2;
const COMPRESS_AUTO = 3;
const COMPRESS_NONE = 0;
const TARLIB_VERSION = '1.2';
const FULL_ARCHIVE = -1;
const ARCHIVE_DYNAMIC = 0;
const ARCHIVE_RENAMECOMP = 5;
const COMPRESS_DETECT = -1;
private $file = '';
private $tar;
public $_result = true;
function __construct($file, $comptype = TarLib::COMPRESS_AUTO, $complevel = 9) {
dbg_deprecated('class Tar');
if(!$file) $this->error('__construct', '$file');
$this->file = $file;
switch($comptype) {
case TarLib::COMPRESS_AUTO:
case TarLib::COMPRESS_DETECT:
$comptype = Tar::COMPRESS_AUTO;
break;
case TarLib::COMPRESS_GZIP:
$comptype = Tar::COMPRESS_GZIP;
break;
case TarLib::COMPRESS_BZIP:
$comptype = Tar::COMPRESS_BZIP;
break;
default:
$comptype = Tar::COMPRESS_NONE;
}
$this->complevel = $complevel;
try {
$this->tar = new Tar();
$this->tar->open($file, $comptype);
} catch(Exception $e) {
$this->_result = false;
}
}
function Extract($p_what = TarLib::FULL_ARCHIVE, $p_to = '.', $p_remdir = '', $p_mode = 0755) {
if($p_what != TarLib::FULL_ARCHIVE) {
$this->error('Extract', 'Ep_what');
return 0;
}
try {
$this->tar->extract($p_to, $p_remdir);
} catch(Exception $e) {
return 0;
}
return 1;
}
function error($func, $param = '') {
$error = 'TarLib is deprecated and should no longer be used.';
if($param) {
$error .= "In this compatibility wrapper, the function '$func' does not accept your value for".
"the parameter '$param' anymore.";
} else {
$error .= "The function '$func' no longer exists in this compatibility wrapper.";
}
msg($error, -1);
}
function __call($name, $arguments) {
$this->error($name);
}
}

View file

@ -6,6 +6,7 @@
* @link http://forum.maxg.info
*
* Modified for Dokuwiki
* @deprecated 2015-05-15 - use splitbrain\PHPArchive\Zip instead
* @author Christopher Smith <chris@jalakai.co.uk>
*/
class ZipLib {
@ -16,6 +17,10 @@ class ZipLib {
var $old_offset = 0;
var $dirs = Array(".");
/**
* @param string $zip_name filename path to file
* @return array|int
*/
function get_List($zip_name) {
$zip = @fopen($zip_name, 'rb');
if(!$zip) return(0);
@ -24,10 +29,12 @@ class ZipLib {
@rewind($zip);
@fseek($zip, $centd['offset']);
$ret = array();
for ($i=0; $i<$centd['entries']; $i++) {
$header = $this->ReadCentralFileHeaders($zip);
$header['index'] = $i;
$info = array();
$info['filename'] = $header['filename'];
$info['stored_filename'] = $header['stored_filename'];
$info['size'] = $header['size'];
@ -45,9 +52,15 @@ class ZipLib {
return $ret;
}
/**
* @param array $files array filled with array(string filename, string data)
* @param bool $compact
* @return array
*/
function Add($files,$compact) {
if(!is_array($files[0])) $files=Array($files);
$ret = array();
for($i=0;$files[$i];$i++){
$fn = $files[$i];
if(!in_Array(dirname($fn[0]),$this->dirs))
@ -60,6 +73,10 @@ class ZipLib {
/**
* Zips recursively the $folder directory, from the $basedir directory
*
* @param string $folder filename path to file
* @param string|null $basedir
* @param string|null $parent
*/
function Compress($folder, $basedir=null, $parent=null) {
$full_path = $basedir."/".$parent.$folder;
@ -70,6 +87,7 @@ class ZipLib {
}
$dir = new DirectoryIterator($full_path);
foreach($dir as $file) {
/** @var DirectoryIterator $file */
if(!$file->isDot()) {
$filename = $file->getFilename();
if($file->isDir()) {
@ -84,6 +102,8 @@ class ZipLib {
/**
* Returns the Zip file
*
* @return string
*/
function get_file() {
$data = implode('', $this -> datasec);
@ -94,6 +114,9 @@ class ZipLib {
pack('V', strlen($ctrldir)) . pack('V', strlen($data)) . "\x00\x00";
}
/**
* @param string $name the name of the directory
*/
function add_dir($name) {
$name = str_replace("\\", "/", $name);
$fr = "\x50\x4b\x03\x04\x0a\x00\x00\x00\x00\x00\x00\x00\x00\x00";
@ -117,8 +140,13 @@ class ZipLib {
/**
* Add a file named $name from a string $data
*
* @param string $data
* @param string $name filename
* @param bool $compact
* @return bool
*/
function add_File($data, $name, $compact = 1) {
function add_File($data, $name, $compact = true) {
$name = str_replace('\\', '/', $name);
$dtime = dechex($this->DosTime());
@ -166,6 +194,9 @@ class ZipLib {
return true;
}
/**
* @return int
*/
function DosTime() {
$timearray = getdate();
if ($timearray['year'] < 1980) {
@ -186,10 +217,14 @@ class ZipLib {
/**
* Extract a zip file $zn to the $to directory
*
* @param string $zn filename
* @param string $to filename path to file
* @param array $index
* @return array|int
*/
function Extract ( $zn, $to, $index = Array(-1) ) {
if(!@is_dir($to)) $this->_mkdir($to);
$ok = 0;
$zip = @fopen($zn,'rb');
if(!$zip) return(-1);
$cdir = $this->ReadCentralDir($zip,$zn);
@ -203,6 +238,7 @@ class ZipLib {
return(-1);
}
$stat = array();
for ($i=0; $i<$cdir['entries']; $i++) {
@fseek($zip, $pos_entry);
$header = $this->ReadCentralFileHeaders($zip);
@ -218,6 +254,11 @@ class ZipLib {
return $stat;
}
/**
* @param resource $zip
* @param array $header
* @return array
*/
function ReadFileHeader($zip, $header) {
$binary_data = fread($zip, 30);
$data = unpack('vchk/vid/vversion/vflag/vcompression/vmtime/vmdate/Vcrc/Vcompressed_size/Vsize/vfilename_len/vextra_len', $binary_data);
@ -254,6 +295,10 @@ class ZipLib {
return $header;
}
/**
* @param resource $zip
* @return array
*/
function ReadCentralFileHeaders($zip){
$binary_data = fread($zip, 46);
$header = unpack('vchkid/vid/vversion/vversion_extracted/vflag/vcompression/vmtime/vmdate/Vcrc/Vcompressed_size/Vsize/vfilename_len/vextra_len/vcomment_len/vdisk/vinternal/Vexternal/Voffset', $binary_data);
@ -295,6 +340,11 @@ class ZipLib {
return $header;
}
/**
* @param resource $zip
* @param string $zip_name filename path to file
* @return array
*/
function ReadCentralDir($zip,$zip_name) {
$size = filesize($zip_name);
if ($size < 277){
@ -320,6 +370,7 @@ class ZipLib {
$data=unpack('vdisk/vdisk_start/vdisk_entries/ventries/Vsize/Voffset/vcomment_size',
fread($zip, 18));
$centd = array();
if ($data['comment_size'] != 0){
$centd['comment'] = fread($zip, $data['comment_size']);
} else {
@ -334,6 +385,12 @@ class ZipLib {
return $centd;
}
/**
* @param array $header
* @param string $to filename path to file
* @param resource $zip
* @return bool|int
*/
function ExtractFile($header,$to,$zip) {
$header = $this->readfileheader($zip, $header);
@ -414,14 +471,20 @@ class ZipLib {
* centralize mkdir calls and use dokuwiki io functions
*
* @author Christopher Smith <chris@jalakai.co.uk>
*
* @param string $d filename path to file
* @return bool|int|string
*/
function _mkdir($d) {
return io_mkdir_p($d);
}
/**
* @param string $zn
* @param string $name
* @return null|string
*/
function ExtractStr($zn, $name) {
$ok = 0;
$zip = @fopen($zn,'rb');
if(!$zip) return(null);
$cdir = $this->ReadCentralDir($zip,$zn);
@ -445,8 +508,13 @@ class ZipLib {
return null;
}
/**
* @param array $header
* @param resource $zip
* @return null|string
*/
function ExtractStrFile($header,$zip) {
$hdr = $this->readfileheader($zip);
$hdr = $this->readfileheader($zip, $header);
$binary_data = '';
if (!($header['external']==0x41FF0010) && !($header['external']==16)) {
if ($header['compression']==0) {
@ -484,6 +552,10 @@ class ZipLib {
return null;
}
/**
* @param string $val
* @return int|string
*/
function _ret_bytes($val) {
$val = trim($val);
$last = $val{strlen($val)-1};

View file

@ -162,20 +162,9 @@ function act_dispatch(){
if($ACT == 'admin'){
// retrieve admin plugin name from $_REQUEST['page']
if (($page = $INPUT->str('page', '', true)) != '') {
$pluginlist = plugin_list('admin');
if (in_array($page, $pluginlist)) {
// attempt to load the plugin
if (($plugin = plugin_load('admin',$page)) !== null){
/** @var DokuWiki_Admin_Plugin $plugin */
if($plugin->forAdminOnly() && !$INFO['isadmin']){
// a manager tried to load a plugin that's for admins only
$INPUT->remove('page');
msg('For admins only',-1);
}else{
$plugin->handle();
}
}
/** @var $plugin DokuWiki_Admin_Plugin */
if ($plugin = plugin_getRequestAdminPlugin()){
$plugin->handle();
}
}
}
@ -200,6 +189,7 @@ function act_dispatch(){
global $license;
//call template FIXME: all needed vars available?
$headers = array();
$headers[] = 'Content-Type: text/html; charset=utf-8';
trigger_event('ACTION_HEADERS_SEND',$headers,'act_sendheaders');
@ -221,6 +211,9 @@ function act_sendheaders($headers) {
* Sanitize the action command
*
* @author Andreas Gohr <andi@splitbrain.org>
*
* @param array|string $act
* @return string
*/
function act_clean($act){
// check if the action was given as array key
@ -245,6 +238,9 @@ function act_clean($act){
* Add all allowed commands here.
*
* @author Andreas Gohr <andi@splitbrain.org>
*
* @param array|string $act
* @return string
*/
function act_validate($act) {
global $conf;
@ -284,10 +280,12 @@ function act_validate($act) {
* Run permissionchecks
*
* @author Andreas Gohr <andi@splitbrain.org>
*
* @param string $act action command
* @return string action command
*/
function act_permcheck($act){
global $INFO;
global $conf;
if(in_array($act,array('save','preview','edit','recover'))){
if($INFO['exists']){
@ -330,6 +328,9 @@ function act_permcheck($act){
* Handle 'draftdel'
*
* Deletes the draft for the current page and user
*
* @param string $act action command
* @return string action command
*/
function act_draftdel($act){
global $INFO;
@ -342,6 +343,9 @@ function act_draftdel($act){
* Saves a draft on preview
*
* @todo this currently duplicates code from ajax.php :-/
*
* @param string $act action command
* @return string action command
*/
function act_draftsave($act){
global $INFO;
@ -372,6 +376,9 @@ function act_draftsave($act){
* returns a new action.
*
* @author Andreas Gohr <andi@splitbrain.org>
*
* @param string $act action command
* @return string action command
*/
function act_save($act){
global $ID;
@ -394,7 +401,7 @@ function act_save($act){
return 'conflict';
//save it
saveWikiText($ID,con($PRE,$TEXT,$SUF,1),$SUM,$INPUT->bool('minor')); //use pretty mode for con
saveWikiText($ID,con($PRE,$TEXT,$SUF,true),$SUM,$INPUT->bool('minor')); //use pretty mode for con
//unlock it
unlock($ID);
@ -410,6 +417,9 @@ function act_save($act){
* Revert to a certain revision
*
* @author Andreas Gohr <andi@splitbrain.org>
*
* @param string $act action command
* @return string action command
*/
function act_revert($act){
global $ID;
@ -457,6 +467,9 @@ function act_revert($act){
* Do a redirect after receiving post data
*
* Tries to add the section id as hash mark after section editing
*
* @param string $id page id
* @param string $preact action command before redirect
*/
function act_redirect($id,$preact){
global $PRE;
@ -478,7 +491,7 @@ function act_redirect($id,$preact){
/**
* Execute the redirect
*
* @param array $opts id and fragment for the redirect
* @param array $opts id and fragment for the redirect and the preact
*/
function act_redirect_execute($opts){
$go = wl($opts['id'],'',true);
@ -492,6 +505,9 @@ function act_redirect_execute($opts){
* Handle 'login', 'logout'
*
* @author Andreas Gohr <andi@splitbrain.org>
*
* @param string $act action command
* @return string action command
*/
function act_auth($act){
global $ID;
@ -527,6 +543,9 @@ function act_auth($act){
* Handle 'edit', 'preview', 'recover'
*
* @author Andreas Gohr <andi@splitbrain.org>
*
* @param string $act action command
* @return string action command
*/
function act_edit($act){
global $ID;
@ -591,6 +610,9 @@ function act_edit($act){
*
* @author Andreas Gohr <andi@splitbrain.org>
* @author Michael Klier <chi@chimeric.de>
*
* @param string $act action command
* @return string action command
*/
function act_export($act){
global $ID;
@ -600,7 +622,6 @@ function act_export($act){
$pre = '';
$post = '';
$output = '';
$headers = array();
// search engines: never cache exported docs! (Google only currently)
@ -644,7 +665,7 @@ function act_export($act){
$output = p_wiki_xhtml($ID,$REV,false);
break;
default:
$output = p_cached_output(wikiFN($ID,$REV), $mode);
$output = p_cached_output(wikiFN($ID,$REV), $mode, $ID);
$headers = p_get_metadata($ID,"format $mode");
break;
}
@ -672,6 +693,8 @@ function act_export($act){
* Handle sitemap delivery
*
* @author Michael Hamann <michael@content-space.de>
*
* @param string $act action command
*/
function act_sitemap($act) {
global $conf;
@ -720,6 +743,10 @@ function act_sitemap($act) {
* Throws exception on error.
*
* @author Adrian Lang <lang@cosmocode.de>
*
* @param string $act action command
* @return string action command
* @throws Exception if (un)subscribing fails
*/
function act_subscription($act){
global $lang;
@ -779,6 +806,9 @@ function act_subscription($act){
* default action for the event ACTION_HANDLE_SUBSCRIBE.
*
* @author Adrian Lang <lang@cosmocode.de>
*
* @param array &$params the parameters: target, style and action
* @throws Exception
*/
function subscription_handle_post(&$params) {
global $INFO;

View file

@ -127,6 +127,7 @@ function auth_setup() {
* Loads the ACL setup and handle user wildcards
*
* @author Andreas Gohr <andi@splitbrain.org>
*
* @return array
*/
function auth_loadACL() {
@ -173,7 +174,7 @@ function auth_loadACL() {
/**
* Event hook callback for AUTH_LOGIN_CHECK
*
* @param $evdata
* @param array $evdata
* @return bool
*/
function auth_login_wrapper($evdata) {
@ -280,8 +281,9 @@ function auth_login($user, $pass, $sticky = false, $silent = false) {
* token is correct. Will exit with a 401 Status if not.
*
* @author Andreas Gohr <andi@splitbrain.org>
*
* @param string $token The authentication token
* @return boolean true (or will exit on failure)
* @return boolean|null true (or will exit on failure)
*/
function auth_validateToken($token) {
if(!$token || $token != $_SESSION[DOKU_COOKIE]['auth']['token']) {
@ -307,6 +309,7 @@ function auth_validateToken($token) {
* NOTE: this is completely unrelated to the getSecurityToken() function
*
* @author Andreas Gohr <andi@splitbrain.org>
*
* @return string The auth token
*/
function auth_createToken() {
@ -335,7 +338,6 @@ function auth_browseruid() {
$ip = clientIP(true);
$uid = '';
$uid .= $INPUT->server->str('HTTP_USER_AGENT');
$uid .= $INPUT->server->str('HTTP_ACCEPT_ENCODING');
$uid .= $INPUT->server->str('HTTP_ACCEPT_CHARSET');
$uid .= substr($ip, 0, strpos($ip, '.'));
$uid = strtolower($uid);
@ -351,6 +353,7 @@ function auth_browseruid() {
* and stored in this file.
*
* @author Andreas Gohr <andi@splitbrain.org>
*
* @param bool $addsession if true, the sessionid is added to the salt
* @param bool $secure if security is more important than keeping the old value
* @return string
@ -378,6 +381,7 @@ function auth_cookiesalt($addsession = false, $secure = false) {
* @author Mark Seecof
* @author Michael Hamann <michael@content-space.de>
* @link http://www.php.net/manual/de/function.mt-rand.php#83655
*
* @param int $length number of bytes to get
* @return string binary random strings
*/
@ -444,6 +448,7 @@ function auth_randombytes($length) {
*
* @author Michael Samuel
* @author Michael Hamann <michael@content-space.de>
*
* @param int $min
* @param int $max
* @return int
@ -515,6 +520,7 @@ function auth_decrypt($ciphertext, $secret) {
* off. It also clears session data.
*
* @author Andreas Gohr <andi@splitbrain.org>
*
* @param bool $keepbc - when true, the breadcrumb data is not cleared
*/
function auth_logoff($keepbc = false) {
@ -555,6 +561,7 @@ 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
@ -599,6 +606,7 @@ function auth_ismanager($user = null, $groups = null, $adminonly = false) {
*
* @author Andreas Gohr <andi@splitbrain.org>
* @see auth_ismanager()
*
* @param string $user Username
* @param array $groups List of groups the user is in
* @return bool
@ -613,9 +621,9 @@ function auth_isadmin($user = null, $groups = null) {
*
* Note: all input should NOT be nameencoded.
*
* @param $memberlist string commaseparated list of allowed users and groups
* @param $user string user to match against
* @param $groups array groups the user is member of
* @param string $memberlist commaseparated list of allowed users and groups
* @param string $user user to match against
* @param array $groups groups the user is member of
* @return bool true for membership acknowledged
*/
function auth_isMember($memberlist, $user, array $groups) {
@ -678,6 +686,7 @@ function auth_quickaclcheck($id) {
* Returns the maximum rights a user has for the given ID or its namespace
*
* @author Andreas Gohr <andi@splitbrain.org>
*
* @triggers AUTH_ACL_CHECK
* @param string $id page ID (needs to be resolved and cleaned)
* @param string $user Username
@ -700,6 +709,7 @@ function auth_aclcheck($id, $user, $groups) {
* DO NOT CALL DIRECTLY, use auth_aclcheck() instead
*
* @author Andreas Gohr <andi@splitbrain.org>
*
* @param array $data event data
* @return int permission level
*/
@ -729,27 +739,22 @@ function auth_aclcheck_cb($data) {
$user = utf8_strtolower($user);
$groups = array_map('utf8_strtolower', $groups);
}
$user = $auth->cleanUser($user);
$user = auth_nameencode($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++) {
$groups[$i] = '@'.auth_nameencode($groups[$i]);
foreach($groups as &$group) {
$group = '@'.auth_nameencode($group);
}
$ns = getNS($id);
$perm = -1;
if($user || count($groups)) {
//add ALL group
$groups[] = '@ALL';
//add User
if($user) $groups[] = $user;
} else {
$groups[] = '@ALL';
}
//add ALL group
$groups[] = '@ALL';
//add User
if($user) $groups[] = $user;
//check exact match first
$matches = preg_grep('/^'.preg_quote($id, '/').'[ \t]+([^ \t]+)[ \t]+/', $AUTH_ACL);
@ -832,6 +837,10 @@ function auth_aclcheck_cb($data) {
*
* @author Andreas Gohr <gohr@cosmocode.de>
* @see rawurldecode()
*
* @param string $name
* @param bool $skip_group
* @return string
*/
function auth_nameencode($name, $skip_group = false) {
global $cache_authname;
@ -913,6 +922,7 @@ function auth_pwgen($foruser = '') {
* 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
@ -948,6 +958,7 @@ 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() {
@ -990,7 +1001,7 @@ function register() {
//okay try to create the user
if(!$auth->triggerUserMod('create', array($login, $pass, $fullname, $email))) {
msg($lang['reguexists'], -1);
msg($lang['regfail'], -1);
return false;
}
@ -1082,17 +1093,18 @@ function updateprofile() {
}
}
if($result = $auth->triggerUserMod('modify', array($INPUT->server->str('REMOTE_USER'), &$changes))) {
// update cookie and session with the changed data
if($changes['pass']) {
list( /*user*/, $sticky, /*pass*/) = auth_getCookie();
$pass = auth_encrypt($changes['pass'], auth_cookiesalt(!$sticky, true));
auth_setCookie($INPUT->server->str('REMOTE_USER'), $pass, (bool) $sticky);
}
return true;
if(!$auth->triggerUserMod('modify', array($INPUT->server->str('REMOTE_USER'), &$changes))) {
msg($lang['proffail'], -1);
return false;
}
return false;
// update cookie and session with the changed data
if($changes['pass']) {
list( /*user*/, $sticky, /*pass*/) = auth_getCookie();
$pass = auth_encrypt($changes['pass'], auth_cookiesalt(!$sticky, true));
auth_setCookie($INPUT->server->str('REMOTE_USER'), $pass, (bool) $sticky);
}
return true;
}
/**
@ -1129,6 +1141,7 @@ function auth_deleteprofile(){
}
}
$deleted = array();
$deleted[] = $INPUT->server->str('REMOTE_USER');
if($auth->triggerUserMod('delete', array($deleted))) {
// force and immediate logout including removing the sticky cookie
@ -1172,7 +1185,7 @@ function act_resendpwd() {
// we're in token phase - get user info from token
$tfile = $conf['cachedir'].'/'.$token{0}.'/'.$token.'.pwauth';
if(!@file_exists($tfile)) {
if(!file_exists($tfile)) {
msg($lang['resendpwdbadauth'], -1);
$INPUT->remove('pwauth');
return false;
@ -1204,7 +1217,7 @@ function act_resendpwd() {
// change it
if(!$auth->triggerUserMod('modify', array($user, array('pass' => $pass)))) {
msg('error modifying user data', -1);
msg($lang['proffail'], -1);
return false;
}
@ -1212,7 +1225,7 @@ function act_resendpwd() {
$pass = auth_pwgen($user);
if(!$auth->triggerUserMod('modify', array($user, array('pass' => $pass)))) {
msg('error modifying user data', -1);
msg($lang['proffail'], -1);
return false;
}
@ -1279,6 +1292,7 @@ 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
@ -1303,6 +1317,7 @@ function auth_cryptPassword($clear, $method = '', $salt = null) {
* Verifies a cleartext password against a crypted hash
*
* @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

View file

@ -356,7 +356,7 @@ class Horde_Cipher_blowfish
* Encrypt a block on data.
*
* @param String $block The data to encrypt
* @param optional String $key The key to use
* @param String $key optional The key to use
*
* @return String the encrypted output
*/
@ -404,8 +404,8 @@ class Horde_Cipher_blowfish
/**
* Decrypt a block on data.
*
* @param String $block The data to decrypt
* @param optional String $key The key to use
* @param String $block The data to decrypt
* @param String $key optional The key to use
*
* @return String the decrypted output
*/
@ -452,6 +452,7 @@ class Horde_Cipher_blowfish
/**
* Converts a text key into an array.
*
* @param string $key
* @return array The key.
*/
function _formatKey($key) {
@ -464,8 +465,8 @@ class Horde_Cipher_blowfish
/**
* Encryption using blowfish algorithm
*
* @param string original data
* @param string the secret
* @param string $data original data
* @param string $secret the secret
*
* @return string the encrypted result
*
@ -493,8 +494,8 @@ function PMA_blowfish_encrypt($data, $secret) {
/**
* Decryption using blowfish algorithm
*
* @param string encrypted data
* @param string the secret
* @param string $encdata encrypted data
* @param string $secret the secret
*
* @return string original data
*

View file

@ -26,7 +26,7 @@ class cache {
* @param string $key primary identifier
* @param string $ext file extension
*/
public function cache($key,$ext) {
public function __construct($key,$ext) {
$this->key = $key;
$this->ext = $ext;
$this->cache = getCacheName($key,$ext);
@ -50,7 +50,7 @@ class cache {
$this->_addDependencies();
if ($this->_event) {
return $this->_stats(trigger_event($this->_event,$this,array($this,'_useCache')));
return $this->_stats(trigger_event($this->_event, $this, array($this,'_useCache')));
} else {
return $this->_stats($this->_useCache());
}
@ -188,12 +188,12 @@ class cache_parser extends cache {
* @param string $file source file for cache
* @param string $mode input mode
*/
public function cache_parser($id, $file, $mode) {
public function __construct($id, $file, $mode) {
if ($id) $this->page = $id;
$this->file = $file;
$this->mode = $mode;
parent::cache($file.$_SERVER['HTTP_HOST'].$_SERVER['SERVER_PORT'],'.'.$mode);
parent::__construct($file.$_SERVER['HTTP_HOST'].$_SERVER['SERVER_PORT'],'.'.$mode);
}
/**
@ -203,7 +203,7 @@ class cache_parser extends cache {
*/
public function _useCache() {
if (!@file_exists($this->file)) return false; // source exists?
if (!file_exists($this->file)) return false; // source exists?
return parent::_useCache();
}
@ -308,15 +308,15 @@ class cache_instructions extends cache_parser {
* @param string $id page id
* @param string $file source file for cache
*/
public function cache_instructions($id, $file) {
parent::cache_parser($id, $file, 'i');
public function __construct($id, $file) {
parent::__construct($id, $file, 'i');
}
/**
* retrieve the cached data
*
* @param bool $clean true to clean line endings, false to leave line endings alone
* @return string cache contents
* @return array cache contents
*/
public function retrieveCache($clean=true) {
$contents = io_readFile($this->cache, false);
@ -326,7 +326,7 @@ class cache_instructions extends cache_parser {
/**
* cache $instructions
*
* @param string $instructions the instruction to be cached
* @param array $instructions the instruction to be cached
* @return bool true on success, false otherwise
*/
public function storeCache($instructions) {

View file

@ -83,17 +83,19 @@ function addLogEntry($date, $id, $type=DOKU_CHANGE_TYPE_EDIT, $summary='', $extr
'extra' => str_replace($strip, '', $extra)
);
$wasCreated = ($type===DOKU_CHANGE_TYPE_CREATE);
$wasReverted = ($type===DOKU_CHANGE_TYPE_REVERT);
// update metadata
if (!$wasRemoved) {
$oldmeta = p_read_metadata($id);
$meta = array();
if (!$INFO['exists'] && empty($oldmeta['persistent']['date']['created'])){ // newly created
if ($wasCreated && empty($oldmeta['persistent']['date']['created'])){ // newly created
$meta['date']['created'] = $created;
if ($user){
$meta['creator'] = $INFO['userinfo']['name'];
$meta['user'] = $user;
}
} elseif (!$INFO['exists'] && !empty($oldmeta['persistent']['date']['created'])) { // re-created / restored
} elseif (($wasCreated || $wasReverted) && !empty($oldmeta['persistent']['date']['created'])) { // re-created / restored
$meta['date']['created'] = $oldmeta['persistent']['date']['created'];
$meta['date']['modified'] = $created; // use the files ctime here
$meta['creator'] = $oldmeta['persistent']['creator'];
@ -349,7 +351,7 @@ function _handleRecent($line,$ns,$flags,&$seen){
// check existance
if($flags & RECENTS_SKIP_DELETED){
$fn = (($flags & RECENTS_MEDIA_CHANGES) ? mediaFN($recent['id']) : wikiFN($recent['id']));
if(!@file_exists($fn)) return false;
if(!file_exists($fn)) return false;
}
return $recent;
@ -496,14 +498,14 @@ abstract class ChangeLog {
if($first < 0) {
$first = 0;
} else if(@file_exists($this->getFilename())) {
} else if(file_exists($this->getFilename())) {
// skip current revision if the page exists
$first = max($first + 1, 0);
}
$file = $this->getChangelogFilename();
if(!@file_exists($file)) {
if(!file_exists($file)) {
return $revs;
}
if(filesize($file) < $this->chunk_size || $this->chunk_size == 0) {
@ -725,13 +727,15 @@ abstract class ChangeLog {
* If file larger than $chuncksize, only chunck is read that could contain $rev.
*
* @param int $rev revision timestamp
* @return array(fp, array(changeloglines), $head, $tail, $eof)|bool
* returns false when not succeed. fp only defined for chuck reading, needs closing.
* @return array|false
* if success returns array(fp, array(changeloglines), $head, $tail, $eof)
* where fp only defined for chuck reading, needs closing.
* otherwise false
*/
protected function readloglines($rev) {
$file = $this->getChangelogFilename();
if(!@file_exists($file)) {
if(!file_exists($file)) {
return false;
}
@ -850,7 +854,6 @@ abstract class ChangeLog {
* Return an existing revision for a specific date which is
* the current one or younger or equal then the date
*
* @param string $id
* @param number $date_at timestamp
* @return string revision ('' for current)
*/
@ -1045,6 +1048,12 @@ class MediaChangelog extends ChangeLog {
*
* @author Ben Coburn <btcoburn@silicodon.net>
* @author Kate Arzamastseva <pshns@ukr.net>
*
* @param string $id
* @param int $rev
* @param int $chunk_size
* @param bool $media
* @return array|bool
*/
function getRevisionInfo($id, $rev, $chunk_size = 8192, $media = false) {
dbg_deprecated('class PageChangeLog or class MediaChangelog');

View file

@ -108,7 +108,7 @@ abstract class DokuCLI {
/**
* Print an error message
*
* @param $string
* @param string $string
*/
public function error($string) {
$this->colors->ptln("E: $string", 'red', STDERR);
@ -117,7 +117,7 @@ abstract class DokuCLI {
/**
* Print a success message
*
* @param $string
* @param string $string
*/
public function success($string) {
$this->colors->ptln("S: $string", 'green', STDERR);
@ -126,7 +126,7 @@ abstract class DokuCLI {
/**
* Print an info message
*
* @param $string
* @param string $string
*/
public function info($string) {
$this->colors->ptln("I: $string", 'cyan', STDERR);
@ -199,8 +199,8 @@ class DokuCLI_Colors {
/**
* Convenience function to print a line in a given color
*
* @param $line
* @param $color
* @param string $line
* @param string $color
* @param resource $channel
*/
public function ptln($line, $color, $channel = STDOUT) {
@ -470,8 +470,8 @@ class DokuCLI_Options {
* Can only be used after parseOptions() has been run
*
* @param string $option
* @param mixed $default what to return if the option was not set
* @return mixed
* @param bool|string $default what to return if the option was not set
* @return bool|string
*/
public function getOpt($option, $default = false) {
if(isset($this->options[$option])) return $this->options[$option];
@ -593,8 +593,8 @@ class DokuCLI_Options {
/**
* Displays text in multiple word wrapped columns
*
* @param array $widths list of column widths (in characters)
* @param array $texts list of texts for each column
* @param int[] $widths list of column widths (in characters)
* @param string[] $texts list of texts for each column
* @return string
*/
private function tableFormat($widths, $texts) {
@ -640,6 +640,11 @@ class DokuCLI_Exception extends Exception {
const E_OPT_ABIGUOUS = 4; //Option abiguous
const E_ARG_READ = 5; //Could not read argv
/**
* @param string $message The Exception message to throw.
* @param int $code The Exception code
* @param Exception $previous The previous exception used for the exception chaining.
*/
public function __construct($message = "", $code = 0, Exception $previous = null) {
if(!$code) $code = DokuCLI_Exception::E_ANY;
parent::__construct($message, $code, $previous);

View file

@ -36,9 +36,9 @@ if (version_compare(phpversion(), '4.3.0', '<') || php_sapi_name() == 'cgi') {
// PHP ini settings
set_time_limit(0);
ini_set('track_errors', true);
ini_set('html_errors', false);
ini_set('magic_quotes_runtime', false);
ini_set('track_errors', "1");
ini_set('html_errors', "0");
ini_set('magic_quotes_runtime', "0");
// Define stream constants
define('STDIN', fopen('php://stdin', 'r'));
@ -78,7 +78,7 @@ class Doku_Cli_Opts {
* @param string $bin_file executing file name - this MUST be passed the __FILE__ constant
* @param string $short_options short options
* @param array $long_options (optional) long options
* @return Doku_Cli_Opts_Container or Doku_Cli_Opts_Error
* @return Doku_Cli_Opts_Container|Doku_Cli_Opts_Error
*/
function & getOptions($bin_file, $short_options, $long_options = null) {
$args = Doku_Cli_Opts::readPHPArgv();
@ -447,7 +447,7 @@ class Doku_Cli_Opts_Error {
var $code;
var $msg;
function Doku_Cli_Opts_Error($code, $msg) {
function __construct($code, $msg) {
$this->code = $code;
$this->msg = $msg;
}
@ -468,7 +468,7 @@ class Doku_Cli_Opts_Container {
var $options = array();
var $args = array();
function Doku_Cli_Opts_Container($options) {
function __construct($options) {
foreach ( $options[0] as $option ) {
if ( false !== ( strpos($option[0], '--') ) ) {
$opt_name = substr($option[0], 2);

View file

@ -49,7 +49,7 @@ function ptln($string, $indent = 0) {
*
* @author Andreas Gohr <andi@splitbrain.org>
*
* @param $string string being stripped
* @param string $string being stripped
* @return string
*/
function stripctl($string) {
@ -62,6 +62,7 @@ function stripctl($string) {
* @author Andreas Gohr <andi@splitbrain.org>
* @link http://en.wikipedia.org/wiki/Cross-site_request_forgery
* @link http://christ1an.blogspot.com/2007/04/preventing-csrf-efficiently.html
*
* @return string
*/
function getSecurityToken() {
@ -95,7 +96,7 @@ function checkSecurityToken($token = null) {
* @author Andreas Gohr <andi@splitbrain.org>
*
* @param bool $print if true print the field, otherwise html of the field is returned
* @return void|string html of hidden form field
* @return string html of hidden form field
*/
function formSecurityToken($print = true) {
$ret = '<div class="no"><input type="hidden" name="sectok" value="'.getSecurityToken().'" /></div>'."\n";
@ -120,6 +121,7 @@ function basicinfo($id, $htmlClient=true){
global $INPUT;
// set info about manager/admin status.
$info = array();
$info['isadmin'] = false;
$info['ismanager'] = false;
if($INPUT->server->has('REMOTE_USER')) {
@ -186,7 +188,7 @@ function pageinfo() {
$info['locked'] = checklock($ID);
$info['filepath'] = fullpath(wikiFN($ID));
$info['exists'] = @file_exists($info['filepath']);
$info['exists'] = file_exists($info['filepath']);
$info['currentrev'] = @filemtime($info['filepath']);
if($REV) {
//check if current revision was meant
@ -200,7 +202,7 @@ function pageinfo() {
} else {
//really use old revision
$info['filepath'] = fullpath(wikiFN($ID, $REV));
$info['exists'] = @file_exists($info['filepath']);
$info['exists'] = file_exists($info['filepath']);
}
}
$info['rev'] = $REV;
@ -254,7 +256,7 @@ function pageinfo() {
// draft
$draft = getCacheName($info['client'].$ID, '.draft');
if(@file_exists($draft)) {
if(file_exists($draft)) {
if(@filemtime($draft) < @filemtime(wikiFN($ID))) {
// remove stale draft
@unlink($draft);
@ -335,7 +337,7 @@ function buildAttributes($params, $skipempty = false) {
*
* @author Andreas Gohr <andi@splitbrain.org>
*
* @return array(pageid=>name, ... )
* @return string[] with the data: array(pageid=>name, ... )
*/
function breadcrumbs() {
// we prepare the breadcrumbs early for quick session closing
@ -350,7 +352,7 @@ 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;
}
@ -688,6 +690,7 @@ function checkwordblock($text = '') {
}
if(count($re) && preg_match('#('.join('|', $re).')#si', $text, $matches)) {
// prepare event data
$data = array();
$data['matches'] = $matches;
$data['userinfo']['ip'] = $INPUT->server->str('REMOTE_ADDR');
if($INPUT->server->str('REMOTE_USER')) {
@ -850,7 +853,7 @@ function checklock($id) {
$lock = wikiLockFN($id);
//no lockfile
if(!@file_exists($lock)) return false;
if(!file_exists($lock)) return false;
//lockfile expired
if((time() - filemtime($lock)) > $conf['locktime']) {
@ -904,7 +907,7 @@ function unlock($id) {
global $INPUT;
$lock = wikiLockFN($id);
if(@file_exists($lock)) {
if(file_exists($lock)) {
@list($ip, $session) = explode("\n", io_readFile($lock));
if($ip == $INPUT->server->str('REMOTE_USER') || $ip == clientIP() || $session == session_id()) {
@unlink($lock);
@ -971,7 +974,7 @@ function rawLocale($id, $ext = 'txt') {
* @author Andreas Gohr <andi@splitbrain.org>
*
* @param string $id page id
* @param string $rev timestamp when a revision of wikitext is desired
* @param string|int $rev timestamp when a revision of wikitext is desired
* @return string
*/
function rawWiki($id, $rev = '') {
@ -1007,13 +1010,13 @@ function pageTemplate($id) {
// if the before event did not set a template file, try to find one
if(empty($data['tplfile'])) {
$path = dirname(wikiFN($id));
if(@file_exists($path.'/_template.txt')) {
if(file_exists($path.'/_template.txt')) {
$data['tplfile'] = $path.'/_template.txt';
} else {
// search upper namespaces for templates
$len = strlen(rtrim($conf['datadir'], '/'));
while(strlen($path) >= $len) {
if(@file_exists($path.'/__template.txt')) {
if(file_exists($path.'/__template.txt')) {
$data['tplfile'] = $path.'/__template.txt';
break;
}
@ -1111,7 +1114,7 @@ function parsePageTemplate(&$data) {
* @param string $range in form "from-to"
* @param string $id page id
* @param string $rev optional, the revision timestamp
* @return array with three slices
* @return string[] with three slices
*/
function rawWikiSlices($range, $id, $rev = '') {
$text = io_readWikiPage(wikiFN($id, $rev), $id, $rev);
@ -1122,6 +1125,7 @@ function rawWikiSlices($range, $id, $rev = '') {
$from = !$from ? 0 : ($from - 1);
$to = !$to ? strlen($text) : ($to - 1);
$slices = array();
$slices[0] = substr($text, 0, $from);
$slices[1] = substr($text, $from, $to - $from);
$slices[2] = substr($text, $to);
@ -1193,13 +1197,13 @@ function saveWikiText($id, $text, $summary, $minor = false) {
$file = wikiFN($id);
$old = @filemtime($file); // from page
$wasRemoved = (trim($text) == ''); // check for empty or whitespace only
$wasCreated = !@file_exists($file);
$wasCreated = !file_exists($file);
$wasReverted = ($REV == true);
$pagelog = new PageChangeLog($id, 1024);
$newRev = false;
$oldRev = $pagelog->getRevisions(-1, 1); // from changelog
$oldRev = (int) (empty($oldRev) ? 0 : $oldRev[0]);
if(!@file_exists(wikiFN($id, $old)) && @file_exists($file) && $old >= $oldRev) {
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
@ -1281,7 +1285,7 @@ function saveWikiText($id, $text, $summary, $minor = false) {
*/
function saveOldRevision($id) {
$oldf = wikiFN($id);
if(!@file_exists($oldf)) return '';
if(!file_exists($oldf)) return '';
$date = filemtime($oldf);
$newf = wikiFN($id, $date);
io_writeWikiPage($newf, rawWiki($id), $id, $date);
@ -1296,7 +1300,7 @@ function saveOldRevision($id) {
* @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
* @param string[] $replace Additional string substitutions, @KEY@ to be replaced by value
* @return bool
*
* @author Andreas Gohr <andi@splitbrain.org>
@ -1376,8 +1380,8 @@ function getGoogleQuery() {
/**
* Return the human readable size of a file
*
* @param int $size A file size
* @param int $dec A number of decimal places
* @param int $size A file size
* @param int $dec A number of decimal places
* @return string human readable size
*
* @author Martin Benjamin <b.martin@cybernet.ch>
@ -1460,7 +1464,7 @@ 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
* @param int $int_date current date in UNIX timestamp
* @return string
*/
function date_iso8601($int_date) {
@ -1739,7 +1743,7 @@ function license_img($type) {
$try[] = 'lib/images/license/'.$type.'/cc.png';
}
foreach($try as $src) {
if(@file_exists(DOKU_INC.$src)) return $src;
if(file_exists(DOKU_INC.$src)) return $src;
}
return '';
}
@ -1803,17 +1807,6 @@ function send_redirect($url) {
// always close the session
session_write_close();
// 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, '?')) {
$url = $url.'&#'.$hash;
} else {
$url = $url.'?&#'.$hash;
}
}
// check if running on IIS < 6 with CGI-PHP
if($INPUT->server->has('SERVER_SOFTWARE') && $INPUT->server->has('GATEWAY_INTERFACE') &&
(strpos($INPUT->server->str('GATEWAY_INTERFACE'), 'CGI') !== false) &&
@ -1824,6 +1817,8 @@ function send_redirect($url) {
} else {
header('Location: '.$url);
}
if(defined('DOKU_UNITTEST')) return; // no exits during unit tests
exit;
}
@ -1880,6 +1875,7 @@ function get_doku_pref($pref, $default) {
/**
* Add a preference to the DokuWiki cookie
* (remembering $_COOKIE['DOKU_PREFS'] is urlencoded)
* Remove it by setting $val to false
*
* @param string $pref preference key
* @param string $val preference value
@ -1896,12 +1892,17 @@ function set_doku_pref($pref, $val) {
$enc_pref = rawurlencode($pref);
for($i = 0; $i < $cnt; $i += 2) {
if($parts[$i] == $enc_pref) {
$parts[$i + 1] = rawurlencode($val);
if ($val !== false) {
$parts[$i + 1] = rawurlencode($val);
} else {
unset($parts[$i]);
unset($parts[$i + 1]);
}
break;
}
}
$cookieVal = implode('#', $parts);
} else if (!$orig) {
} else if (!$orig && $val !== false) {
$cookieVal = ($_COOKIE['DOKU_PREFS'] ? $_COOKIE['DOKU_PREFS'].'#' : '').rawurlencode($pref).'#'.rawurlencode($val);
}
@ -1914,7 +1915,7 @@ function set_doku_pref($pref, $val) {
/**
* Strips source mapping declarations from given text #601
*
* @param &string $text reference to the CSS or JavaScript code to clean
* @param string &$text reference to the CSS or JavaScript code to clean
*/
function stripsourcemaps(&$text){
$text = preg_replace('/^(\/\/|\/\*)[@#]\s+sourceMappingURL=.*?(\*\/)?$/im', '\\1\\2', $text);

View file

@ -41,12 +41,42 @@ if(!function_exists('gzopen') && function_exists('gzopen64')) {
*
* @link http://stackoverflow.com/questions/23417519/php-zlib-gzopen-not-exists
*
* @param string $filename
* @param string $mode
* @param int $use_include_path
* @param string $filename
* @param string $mode
* @param int $use_include_path
* @return mixed
*/
function gzopen($filename, $mode, $use_include_path = 0) {
return gzopen64($filename, $mode, $use_include_path);
}
}
if(!function_exists('gzseek') && function_exists('gzseek64')) {
/**
* work around for PHP compiled against certain zlib versions #865
*
* @link http://stackoverflow.com/questions/23417519/php-zlib-gzopen-not-exists
*
* @param resource $zp
* @param int $offset
* @param int $whence
* @return int
*/
function gzseek($zp, $offset, $whence = SEEK_SET) {
return gzseek64($zp, $offset, $whence);
}
}
if(!function_exists('gztell') && function_exists('gztell64')) {
/**
* work around for PHP compiled against certain zlib versions #865
*
* @link http://stackoverflow.com/questions/23417519/php-zlib-gzopen-not-exists
*
* @param resource $zp
* @return int
*/
function gztell($zp) {
return gztell64($zp);
}
}

View file

@ -49,13 +49,13 @@ $config_cascade = array_merge(
'local' => array(DOKU_CONF . 'wordblock.local.conf'),
),
'userstyle' => array(
'screen' => DOKU_CONF . 'userstyle.css',
'print' => DOKU_CONF . 'userprint.css',
'feed' => DOKU_CONF . 'userfeed.css',
'all' => DOKU_CONF . 'userall.css',
'screen' => array(DOKU_CONF . 'userstyle.css', DOKU_CONF . 'userstyle.less'),
'print' => array(DOKU_CONF . 'userprint.css', DOKU_CONF . 'userprint.less'),
'feed' => array(DOKU_CONF . 'userfeed.css', DOKU_CONF . 'userfeed.less'),
'all' => array(DOKU_CONF . 'userall.css', DOKU_CONF . 'userall.less')
),
'userscript' => array(
'default' => DOKU_CONF . 'userscript.js'
'default' => array(DOKU_CONF . 'userscript.js')
),
'acl' => array(
'default' => DOKU_CONF . 'acl.auth.php',

View file

@ -6,6 +6,12 @@
* @author Harry Fuecks <hfuecks@gmail.com>
*/
/*
* line prefix used to negate single value config items
* (scheme.conf & stopwords.conf), e.g.
* !gopher
*/
const DOKU_CONF_NEGATION = '!';
/**
* Returns the (known) extension and mimetype of a given filename
@ -14,6 +20,10 @@
* are returned.
*
* @author Andreas Gohr <andi@splitbrain.org>
*
* @param string $file file name
* @param bool $knownonly
* @return array with extension, mimetype and if it should be downloaded
*/
function mimetype($file, $knownonly=true){
$mtypes = getMimeTypes(); // known mimetypes
@ -45,6 +55,7 @@ function getMimeTypes() {
static $mime = null;
if ( !$mime ) {
$mime = retrieveConfig('mime','confToHash');
$mime = array_filter($mime);
}
return $mime;
}
@ -58,6 +69,7 @@ function getAcronyms() {
static $acronyms = null;
if ( !$acronyms ) {
$acronyms = retrieveConfig('acronyms','confToHash');
$acronyms = array_filter($acronyms, 'strlen');
}
return $acronyms;
}
@ -71,6 +83,7 @@ function getSmileys() {
static $smileys = null;
if ( !$smileys ) {
$smileys = retrieveConfig('smileys','confToHash');
$smileys = array_filter($smileys, 'strlen');
}
return $smileys;
}
@ -84,6 +97,7 @@ function getEntities() {
static $entities = null;
if ( !$entities ) {
$entities = retrieveConfig('entities','confToHash');
$entities = array_filter($entities, 'strlen');
}
return $entities;
}
@ -97,9 +111,11 @@ function getInterwiki() {
static $wikis = null;
if ( !$wikis ) {
$wikis = retrieveConfig('interwiki','confToHash',array(true));
$wikis = array_filter($wikis, 'strlen');
//add sepecial case 'this'
$wikis['this'] = DOKU_URL.'{NAME}';
}
//add sepecial case 'this'
$wikis['this'] = DOKU_URL.'{NAME}';
return $wikis;
}
@ -110,7 +126,7 @@ function getInterwiki() {
function getWordblocks() {
static $wordblocks = null;
if ( !$wordblocks ) {
$wordblocks = retrieveConfig('wordblock','file');
$wordblocks = retrieveConfig('wordblock','file',null,'array_merge_with_removal');
}
return $wordblocks;
}
@ -123,11 +139,11 @@ function getWordblocks() {
function getSchemes() {
static $schemes = null;
if ( !$schemes ) {
$schemes = retrieveConfig('scheme','file');
$schemes = retrieveConfig('scheme','file',null,'array_merge_with_removal');
$schemes = array_map('trim', $schemes);
$schemes = preg_replace('/^#.*/', '', $schemes);
$schemes = array_filter($schemes);
}
$schemes = array_map('trim', $schemes);
$schemes = preg_replace('/^#.*/', '', $schemes);
$schemes = array_filter($schemes);
return $schemes;
}
@ -190,9 +206,14 @@ function confToHash($file,$lower=false) {
* @param string $type the configuration settings to be read, must correspond to a key/array in $config_cascade
* @param callback $fn the function used to process the configuration file into an array
* @param array $params optional additional params to pass to the callback
* @param callback $combine the function used to combine arrays of values read from different configuration files;
* the function takes two parameters,
* $combined - the already read & merged configuration values
* $new - array of config values from the config cascade file being currently processed
* and returns an array of the merged configuration values.
* @return array configuration values
*/
function retrieveConfig($type,$fn,$params=null) {
function retrieveConfig($type,$fn,$params=null,$combine='array_merge') {
global $config_cascade;
if(!is_array($params)) $params = array();
@ -202,9 +223,9 @@ function retrieveConfig($type,$fn,$params=null) {
foreach (array('default','local','protected') as $config_group) {
if (empty($config_cascade[$type][$config_group])) continue;
foreach ($config_cascade[$type][$config_group] as $file) {
if (@file_exists($file)) {
if (file_exists($file)) {
$config = call_user_func_array($fn,array_merge(array($file),$params));
$combined = array_merge($combined, $config);
$combined = $combine($combined, $config);
}
}
}
@ -343,4 +364,27 @@ function conf_decodeString($str) {
return $str;
}
}
/**
* array combination function to remove negated values (prefixed by !)
*
* @param array $current
* @param array $new
*
* @return array the combined array, numeric keys reset
*/
function array_merge_with_removal($current, $new) {
foreach ($new as $val) {
if (substr($val,0,1) == DOKU_CONF_NEGATION) {
$idx = array_search(trim(substr($val,1)),$current);
if ($idx !== false) {
unset($current[$idx]);
}
} else {
$current[] = trim($val);
}
}
return array_slice($current,0);
}
//Setup VIM: ex: et ts=4 :

View file

@ -27,8 +27,11 @@ class Doku_Event {
/**
* event constructor
*
* @param string $name
* @param mixed $data
*/
function Doku_Event($name, &$data) {
function __construct($name, &$data) {
$this->name = $name;
$this->data =& $data;
@ -120,14 +123,18 @@ class Doku_Event {
* stop any further processing of the event by event handlers
* this function does not prevent the default action taking place
*/
function stopPropagation() { $this->_continue = false; }
function stopPropagation() {
$this->_continue = false;
}
/**
* preventDefault
*
* prevent the default action taking place
*/
function preventDefault() { $this->_default = false; }
function preventDefault() {
$this->_default = false;
}
}
/**
@ -146,7 +153,7 @@ class Doku_Event_Handler {
* constructor, loads all action plugins and calls their register() method giving them
* an opportunity to register any hooks they require
*/
function Doku_Event_Handler() {
function __construct() {
// load action plugins
/** @var DokuWiki_Action_Plugin $plugin */
@ -165,13 +172,13 @@ class Doku_Event_Handler {
*
* register a hook for an event
*
* @param $event string name used by the event, (incl '_before' or '_after' for triggers)
* @param $advise string
* @param $obj object object in whose scope method is to be executed,
* @param string $event string name used by the event, (incl '_before' or '_after' for triggers)
* @param string $advise
* @param object $obj object in whose scope method is to be executed,
* if NULL, method is assumed to be a globally available function
* @param $method string event handler function
* @param $param mixed data passed to the event handler
* @param $seq int sequence number for ordering hook execution (ascending)
* @param string $method event handler function
* @param mixed $param data passed to the event handler
* @param int $seq sequence number for ordering hook execution (ascending)
*/
function register_hook($event, $advise, $obj, $method, $param=null, $seq=0) {
$seq = (int)$seq;
@ -216,14 +223,14 @@ class Doku_Event_Handler {
*
* function wrapper to process (create, trigger and destroy) an event
*
* @param $name string name for the event
* @param $data mixed event data
* @param $action callback (optional, default=NULL) default action, a php callback function
* @param $canPreventDefault bool (optional, default=true) can hooks prevent the default action
* @param string $name name for the event
* @param mixed $data event data
* @param callback $action (optional, default=NULL) default action, a php callback function
* @param bool $canPreventDefault (optional, default=true) can hooks prevent the default action
*
* @return mixed the event results value after all event processing is complete
* by default this is the return value of the default action however
* it can be set or modified by event handler hooks
* by default this is the return value of the default action however
* it can be set or modified by event handler hooks
*/
function trigger_event($name, &$data, $action=null, $canPreventDefault=true) {

View file

@ -135,12 +135,12 @@ $config_cascade = array(
),
),
'userstyle' => array(
'screen' => DOKU_CONF.'userstyle.css',
'print' => DOKU_CONF.'userprint.css',
'feed' => DOKU_CONF.'userfeed.css',
'all' => DOKU_CONF.'userall.css',
'screen' => array(DOKU_CONF . 'userstyle.css', DOKU_CONF . 'userstyle.less'),
'print' => array(DOKU_CONF . 'userprint.css', DOKU_CONF . 'userprint.less'),
'feed' => array(DOKU_CONF . 'userfeed.css', DOKU_CONF . 'userfeed.less'),
'all' => array(DOKU_CONF . 'userall.css', DOKU_CONF . 'userall.less')
),
'userscript' => array(
'default' => DOKU_CONF.'userscript.js'
'default' => array(DOKU_CONF . 'userscript.js')
),
);

View file

@ -129,6 +129,9 @@ class FeedItem extends HtmlDescribable {
// var $source;
}
/**
* Class EnclosureItem
*/
class EnclosureItem extends HtmlDescribable {
/*
*
@ -226,7 +229,7 @@ class FeedHtmlField {
* Creates a new instance of FeedHtmlField.
* @param string $parFieldContent: if given, sets the rawFieldContent property
*/
function FeedHtmlField($parFieldContent) {
function __construct($parFieldContent) {
if ($parFieldContent) {
$this->rawFieldContent = $parFieldContent;
}
@ -482,6 +485,8 @@ class FeedCreator extends HtmlDescribable {
var $additionalElements = Array();
var $_timeout;
/**
* Adds an FeedItem to the feed.
*
@ -505,7 +510,7 @@ class FeedCreator extends HtmlDescribable {
* @param int $length the maximum length the string should be truncated to
* @return string the truncated string
*/
function iTrunc($string, $length) {
static function iTrunc($string, $length) {
if (strlen($string)<=$length) {
return $string;
}
@ -604,6 +609,8 @@ class FeedCreator extends HtmlDescribable {
/**
* @since 1.4
* @access private
*
* @param string $filename
*/
function _redirect($filename) {
// attention, heavily-commented-out-area
@ -697,7 +704,7 @@ class FeedDate {
* Accepts RFC 822, ISO 8601 date formats as well as unix time stamps.
* @param mixed $dateString optional the date this FeedDate will represent. If not specified, the current date and time is used.
*/
function FeedDate($dateString="") {
function __construct($dateString="") {
if ($dateString=="") $dateString = date("r");
if (is_numeric($dateString)) {
@ -878,7 +885,10 @@ class RSSCreator091 extends FeedCreator {
*/
var $RSSVersion;
function RSSCreator091() {
/**
* Constructor
*/
function __construct() {
$this->_setRSSVersion("0.91");
$this->contentType = "application/rss+xml";
}
@ -886,6 +896,8 @@ class RSSCreator091 extends FeedCreator {
/**
* Sets this RSS feed's version number.
* @access private
*
* @param $version
*/
function _setRSSVersion($version) {
$this->RSSVersion = $version;
@ -1034,7 +1046,10 @@ class RSSCreator091 extends FeedCreator {
*/
class RSSCreator20 extends RSSCreator091 {
function RSSCreator20() {
/**
* Constructor
*/
function __construct() {
parent::_setRSSVersion("2.0");
}
@ -1051,7 +1066,10 @@ class RSSCreator20 extends RSSCreator091 {
*/
class PIECreator01 extends FeedCreator {
function PIECreator01() {
/**
* Constructor
*/
function __construct() {
$this->encoding = "utf-8";
}
@ -1113,7 +1131,10 @@ class PIECreator01 extends FeedCreator {
*/
class AtomCreator10 extends FeedCreator {
function AtomCreator10() {
/**
* Constructor
*/
function __construct() {
$this->contentType = "application/atom+xml";
$this->encoding = "utf-8";
}
@ -1200,7 +1221,10 @@ class AtomCreator10 extends FeedCreator {
*/
class AtomCreator03 extends FeedCreator {
function AtomCreator03() {
/**
* Constructor
*/
function __construct() {
$this->contentType = "application/atom+xml";
$this->encoding = "utf-8";
}
@ -1272,12 +1296,19 @@ class AtomCreator03 extends FeedCreator {
* @author Kai Blankenhorn <kaib@bitfolge.de>
*/
class MBOXCreator extends FeedCreator {
function MBOXCreator() {
/**
* Constructor
*/
function __construct() {
$this->contentType = "text/plain";
$this->encoding = "utf-8";
}
/**
* @param string $input
* @param int $line_max
* @return string
*/
function qp_enc($input = "", $line_max = 76) {
$hex = array('0','1','2','3','4','5','6','7','8','9','A','B','C','D','E','F');
$lines = preg_split("/(?:\r\n|\r|\n)/", $input);
@ -1363,7 +1394,10 @@ class MBOXCreator extends FeedCreator {
*/
class OPMLCreator extends FeedCreator {
function OPMLCreator() {
/**
* Constructor
*/
function __construct() {
$this->encoding = "utf-8";
}

View file

@ -16,6 +16,7 @@
* @author Andreas Gohr <andi@splitbrain.org>
* @author Ben Coburn <btcoburn@silicodon.net>
* @author Gerry Weissbach <dokuwiki@gammaproduction.de>
*
* @param string $file local file to send
* @param string $mime mime type of the file
* @param bool $dl set to true to force a browser download
@ -46,18 +47,15 @@ function sendFile($file, $mime, $dl, $cache, $public = false, $orig = null) {
// cache publically
header('Expires: '.gmdate("D, d M Y H:i:s", $expires).' GMT');
header('Cache-Control: public, proxy-revalidate, no-transform, max-age='.$maxage);
header('Pragma: public');
} else {
// cache in browser
header('Expires: '.gmdate("D, d M Y H:i:s", $expires).' GMT');
header('Cache-Control: private, no-transform, max-age='.$maxage);
header('Pragma: no-cache');
}
} else {
// no cache at all
header('Expires: Thu, 01 Jan 1970 00:00:00 GMT');
header('Cache-Control: no-cache, no-transform');
header('Pragma: no-cache');
}
//send important headers first, script stops here if '304 Not Modified' response
@ -71,9 +69,9 @@ function sendFile($file, $mime, $dl, $cache, $public = false, $orig = null) {
//download or display?
if($dl) {
header('Content-Disposition: attachment; filename="'.utf8_basename($orig).'";');
header('Content-Disposition: attachment;'.rfc2231_encode('filename', utf8_basename($orig)).';');
} else {
header('Content-Disposition: inline; filename="'.utf8_basename($orig).'";');
header('Content-Disposition: inline;'.rfc2231_encode('filename', utf8_basename($orig)).';');
}
//use x-sendfile header to pass the delivery to compatible webservers
@ -89,6 +87,31 @@ function sendFile($file, $mime, $dl, $cache, $public = false, $orig = null) {
}
}
/**
* Try an rfc2231 compatible encoding. This ensures correct
* interpretation of filenames outside of the ASCII set.
* This seems to be needed for file names with e.g. umlauts that
* would otherwise decode wrongly in IE.
*
* There is no additional checking, just the encoding and setting the key=value for usage in headers
*
* @author Gerry Weissbach <gerry.w@gammaproduction.de>
* @param string $name name of the field to be set in the header() call
* @param string $value value of the field to be set in the header() call
* @param string $charset used charset for the encoding of value
* @param string $lang language used.
* @return string in the format " name=value" for values WITHOUT special characters
* @return string in the format " name*=charset'lang'value" for values WITH special characters
*/
function rfc2231_encode($name, $value, $charset='utf-8', $lang='en') {
$internal = preg_replace_callback('/[\x00-\x20*\'%()<>@,;:\\\\"\/[\]?=\x80-\xFF]/', function($match) { return rawurlencode($match[0]); }, $value);
if ( $value != $internal ) {
return ' '.$name.'*='.$charset."'".$lang."'".$internal;
} else {
return ' '.$name.'="'.$value.'"';
}
}
/**
* Check for media for preconditions and return correct status code
*
@ -96,12 +119,13 @@ function sendFile($file, $mime, $dl, $cache, $public = false, $orig = null) {
* WRITE: MEDIA, FILE, array( STATUS, STATUSMESSAGE )
*
* @author Gerry Weissbach <gerry.w@gammaproduction.de>
*
* @param string $media reference to the media id
* @param string $file reference to the file variable
* @param string $rev
* @param int $width
* @param int $height
* @return array(STATUS, STATUSMESSAGE)
* @return array as array(STATUS, STATUSMESSAGE)
*/
function checkFileStatus(&$media, &$file, $rev = '', $width=0, $height=0) {
global $MIME, $EXT, $CACHE, $INPUT;
@ -136,7 +160,7 @@ function checkFileStatus(&$media, &$file, $rev = '', $width=0, $height=0) {
}
//check file existance
if(!@file_exists($file)) {
if(!file_exists($file)) {
return array(404, 'Not Found');
}
@ -149,6 +173,9 @@ function checkFileStatus(&$media, &$file, $rev = '', $width=0, $height=0) {
* Resolves named constants
*
* @author Andreas Gohr <andi@splitbrain.org>
*
* @param string $cache
* @return int cachetime in seconds
*/
function calc_cache($cache) {
global $conf;

View file

@ -52,9 +52,10 @@ class Doku_Form {
* @param bool|string $action (optional, deprecated) submit URL, defaults to current page
* @param bool|string $method (optional, deprecated) 'POST' or 'GET', default is POST
* @param bool|string $enctype (optional, deprecated) Encoding type of the data
*
* @author Tom N Harris <tnharris@whoopdedo.org>
*/
function Doku_Form($params, $action=false, $method=false, $enctype=false) {
function __construct($params, $action=false, $method=false, $enctype=false) {
if(!is_array($params)) {
$this->params = array('id' => $params);
if ($action !== false) $this->params['action'] = $action;
@ -84,6 +85,7 @@ class Doku_Form {
* Usually results in a border drawn around the form.
*
* @param string $legend Label that will be printed with the border.
*
* @author Tom N Harris <tnharris@whoopdedo.org>
*/
function startFieldset($legend) {
@ -115,6 +117,7 @@ class Doku_Form {
*
* @param string $name Field name.
* @param string $value Field value. If null, remove a previously added field.
*
* @author Tom N Harris <tnharris@whoopdedo.org>
*/
function addHidden($name, $value) {
@ -132,6 +135,7 @@ class Doku_Form {
* If string, it is printed without escaping special chars. *
*
* @param string|array $elem Pseudo-tag or string to add to the form.
*
* @author Tom N Harris <tnharris@whoopdedo.org>
*/
function addElement($elem) {
@ -145,6 +149,7 @@ class Doku_Form {
*
* @param string $pos 0-based index where the element will be inserted.
* @param string|array $elem Pseudo-tag or string to add to the form.
*
* @author Tom N Harris <tnharris@whoopdedo.org>
*/
function insertElement($pos, $elem) {
@ -158,6 +163,7 @@ class Doku_Form {
*
* @param int $pos 0-based index the element will be placed at.
* @param string|array $elem Pseudo-tag or string to add to the form.
*
* @author Tom N Harris <tnharris@whoopdedo.org>
*/
function replaceElement($pos, $elem) {
@ -172,7 +178,8 @@ class Doku_Form {
* Gets the position of the first of a type of element.
*
* @param string $type Element type to look for.
* @return int position of element if found, otherwise false
* @return int|false position of element if found, otherwise false
*
* @author Tom N Harris <tnharris@whoopdedo.org>
*/
function findElementByType($type) {
@ -189,7 +196,8 @@ class Doku_Form {
* Gets the position of the element with an ID attribute.
*
* @param string $id ID of the element to find.
* @return int position of element if found, otherwise false
* @return int|false position of element if found, otherwise false
*
* @author Tom N Harris <tnharris@whoopdedo.org>
*/
function findElementById($id) {
@ -207,7 +215,8 @@ class Doku_Form {
*
* @param string $name Attribute name.
* @param string $value Attribute value.
* @return int position of element if found, otherwise false
* @return int|false position of element if found, otherwise false
*
* @author Tom N Harris <tnharris@whoopdedo.org>
*/
function findElementByAttribute($name, $value) {
@ -227,6 +236,7 @@ class Doku_Form {
*
* @param int $pos 0-based index
* @return array reference pseudo-element
*
* @author Tom N Harris <tnharris@whoopdedo.org>
*/
function &getElementAt($pos) {
@ -243,6 +253,8 @@ class Doku_Form {
* 'form_$type'. The function should return the HTML to be printed.
*
* @author Tom N Harris <tnharris@whoopdedo.org>
*
* @return string html of the form
*/
function getForm() {
global $lang;
@ -310,6 +322,7 @@ class Doku_Form {
* @param string $tag Tag name.
* @param array $attrs Optional attributes.
* @return array pseudo-tag
*
* @author Tom N Harris <tnharris@whoopdedo.org>
*/
function form_makeTag($tag, $attrs=array()) {
@ -326,6 +339,7 @@ function form_makeTag($tag, $attrs=array()) {
* @param string $tag Tag name.
* @param array $attrs Optional attributes.
* @return array pseudo-tag
*
* @author Tom N Harris <tnharris@whoopdedo.org>
*/
function form_makeOpenTag($tag, $attrs=array()) {
@ -341,6 +355,7 @@ function form_makeOpenTag($tag, $attrs=array()) {
*
* @param string $tag Tag name.
* @return array pseudo-tag
*
* @author Tom N Harris <tnharris@whoopdedo.org>
*/
function form_makeCloseTag($tag) {
@ -358,6 +373,7 @@ function form_makeCloseTag($tag) {
* @param string $text Text to fill the field with.
* @param array $attrs Optional attributes.
* @return array pseudo-tag
*
* @author Tom N Harris <tnharris@whoopdedo.org>
*/
function form_makeWikiText($text, $attrs=array()) {
@ -378,12 +394,13 @@ function form_makeWikiText($text, $attrs=array()) {
* @param string $value (optional) Displayed label. Uses $act if not provided.
* @param array $attrs Optional attributes.
* @return array pseudo-tag
*
* @author Tom N Harris <tnharris@whoopdedo.org>
*/
function form_makeButton($type, $act, $value='', $attrs=array()) {
if ($value == '') $value = $act;
$elem = array('_elem'=>'button', 'type'=>$type, '_action'=>$act,
'value'=>$value, 'class'=>'button');
'value'=>$value);
if (!empty($attrs['accesskey']) && empty($attrs['title'])) {
$attrs['title'] = $value . ' ['.strtoupper($attrs['accesskey']).']';
}
@ -406,6 +423,7 @@ function form_makeButton($type, $act, $value='', $attrs=array()) {
* reference it with a 'for' attribute.
* @param array $attrs Optional attributes.
* @return array pseudo-tag
*
* @author Tom N Harris <tnharris@whoopdedo.org>
*/
function form_makeField($type, $name, $value='', $label=null, $id='', $class='', $attrs=array()) {
@ -522,6 +540,18 @@ function form_makeRadioField($name, $value='1', $label=null, $id='', $class='',
* a string.
*
* @author Tom N Harris <tnharris@whoopdedo.org>
*
* @param string $name Name attribute of the input.
* @param string[]|array[] $values The list of values can be strings, arrays of (value,text),
* or an associative array with the values as keys and labels as values.
* @param string|int $selected default selected value, string or index number
* @param string $class Class attribute of the label. If this is 'block',
* then a line break will be added after the field.
* @param string $label Label that will be printed before the input.
* @param string $id ID attribute of the input. If set, the label will
* reference it with a 'for' attribute.
* @param array $attrs Optional attributes.
* @return array pseudo-tag
*/
function form_makeMenuField($name, $values, $selected='', $label=null, $id='', $class='', $attrs=array()) {
if (is_null($label)) $label = $name;
@ -556,6 +586,18 @@ function form_makeMenuField($name, $values, $selected='', $label=null, $id='', $
* Items are selected by supplying its value or an array of values.
*
* @author Tom N Harris <tnharris@whoopdedo.org>
*
* @param string $name Name attribute of the input.
* @param string[]|array[] $values The list of values can be strings, arrays of (value,text),
* or an associative array with the values as keys and labels as values.
* @param array|string $selected value or array of values of the items that need to be selected
* @param string $class Class attribute of the label. If this is 'block',
* then a line break will be added after the field.
* @param string $label Label that will be printed before the input.
* @param string $id ID attribute of the input. If set, the label will
* reference it with a 'for' attribute.
* @param array $attrs Optional attributes.
* @return array pseudo-tag
*/
function form_makeListboxField($name, $values, $selected='', $label=null, $id='', $class='', $attrs=array()) {
if (is_null($label)) $label = $name;
@ -595,6 +637,9 @@ function form_makeListboxField($name, $values, $selected='', $label=null, $id=''
* Attributes are passed to buildAttributes()
*
* @author Tom N Harris <tnharris@whoopdedo.org>
*
* @param array $attrs attributes
* @return string html of tag
*/
function form_tag($attrs) {
return '<'.$attrs['_tag'].' '.buildAttributes($attrs,true).'/>';
@ -608,6 +653,9 @@ function form_tag($attrs) {
* Attributes are passed to buildAttributes()
*
* @author Tom N Harris <tnharris@whoopdedo.org>
*
* @param array $attrs attributes
* @return string html of tag
*/
function form_opentag($attrs) {
return '<'.$attrs['_tag'].' '.buildAttributes($attrs,true).'>';
@ -621,6 +669,9 @@ function form_opentag($attrs) {
* There are no attributes.
*
* @author Tom N Harris <tnharris@whoopdedo.org>
*
* @param array $attrs attributes
* @return string html of tag
*/
function form_closetag($attrs) {
return '</'.$attrs['_tag'].'>';
@ -634,6 +685,9 @@ function form_closetag($attrs) {
* Attributes are passed to buildAttributes()
*
* @author Tom N Harris <tnharris@whoopdedo.org>
*
* @param array $attrs attributes
* @return string html
*/
function form_openfieldset($attrs) {
$s = '<fieldset '.buildAttributes($attrs,true).'>';
@ -648,6 +702,8 @@ function form_openfieldset($attrs) {
* There are no attributes.
*
* @author Tom N Harris <tnharris@whoopdedo.org>
*
* @return string html
*/
function form_closefieldset() {
return '</fieldset>';
@ -661,6 +717,9 @@ function form_closefieldset() {
* Value is passed to formText()
*
* @author Tom N Harris <tnharris@whoopdedo.org>
*
* @param array $attrs attributes
* @return string html
*/
function form_hidden($attrs) {
return '<input type="hidden" name="'.$attrs['name'].'" value="'.formText($attrs['value']).'" />';
@ -674,6 +733,9 @@ function form_hidden($attrs) {
* Text will be passed to formText(), attributes to buildAttributes()
*
* @author Tom N Harris <tnharris@whoopdedo.org>
*
* @param array $attrs attributes
* @return string html
*/
function form_wikitext($attrs) {
// mandatory attributes
@ -693,10 +755,15 @@ function form_wikitext($attrs) {
* Other attributes are passed to buildAttributes()
*
* @author Tom N Harris <tnharris@whoopdedo.org>
*
* @param array $attrs attributes
* @return string html
*/
function form_button($attrs) {
$p = (!empty($attrs['_action'])) ? 'name="do['.$attrs['_action'].']" ' : '';
return '<input '.$p.buildAttributes($attrs,true).' />';
$value = $attrs['value'];
unset($attrs['value']);
return '<button '.$p.buildAttributes($attrs,true).'>'.$value.'</button>';
}
/**
@ -708,6 +775,9 @@ function form_button($attrs) {
* Other attributes are passed to buildAttributes() for the input tag.
*
* @author Tom N Harris <tnharris@whoopdedo.org>
*
* @param array $attrs attributes
* @return string html
*/
function form_field($attrs) {
$s = '<label';
@ -729,6 +799,9 @@ function form_field($attrs) {
* Other attributes are passed to buildAttributes() for the input tag.
*
* @author Tom N Harris <tnharris@whoopdedo.org>
*
* @param array $attrs attributes
* @return string html
*/
function form_fieldright($attrs) {
$s = '<label';
@ -750,6 +823,9 @@ function form_fieldright($attrs) {
* Other attributes are passed to buildAttributes() for the input tag.
*
* @author Tom N Harris <tnharris@whoopdedo.org>
*
* @param array $attrs attributes
* @return string html
*/
function form_textfield($attrs) {
// mandatory attributes
@ -773,6 +849,9 @@ function form_textfield($attrs) {
* Other attributes are passed to buildAttributes() for the input tag.
*
* @author Tom N Harris <tnharris@whoopdedo.org>
*
* @param array $attrs attributes
* @return string html
*/
function form_passwordfield($attrs) {
// mandatory attributes
@ -798,6 +877,9 @@ function form_passwordfield($attrs) {
* Other attributes are passed to buildAttributes() for the input tag
*
* @author Michael Klier <chi@chimeric.de>
*
* @param array $attrs attributes
* @return string html
*/
function form_filefield($attrs) {
$s = '<label';
@ -824,6 +906,9 @@ function form_filefield($attrs) {
* $attrs['value'][1] is constructed as well.
*
* @author Tom N Harris <tnharris@whoopdedo.org>
*
* @param array $attrs attributes
* @return string html
*/
function form_checkboxfield($attrs) {
// mandatory attributes
@ -853,6 +938,9 @@ function form_checkboxfield($attrs) {
* Other attributes are passed to buildAttributes() for the input tag.
*
* @author Tom N Harris <tnharris@whoopdedo.org>
*
* @param array $attrs attributes
* @return string html
*/
function form_radiofield($attrs) {
// mandatory attributes
@ -879,6 +967,9 @@ function form_radiofield($attrs) {
* Other attributes are passed to buildAttributes() for the input tag.
*
* @author Tom N Harris <tnharris@whoopdedo.org>
*
* @param array $attrs attributes
* @return string html
*/
function form_menufield($attrs) {
$attrs['size'] = '1';
@ -924,6 +1015,9 @@ function form_menufield($attrs) {
* Other attributes are passed to buildAttributes() for the input tag.
*
* @author Tom N Harris <tnharris@whoopdedo.org>
*
* @param array $attrs attributes
* @return string html
*/
function form_listboxfield($attrs) {
$s = '<label';

View file

@ -20,9 +20,13 @@ if(!defined('FT_SNIPPET_NUMBER')) define('FT_SNIPPET_NUMBER',15);
*
* refactored into ft_pageSearch(), _ft_pageSearch() and trigger_event()
*
* @param string $query
* @param array $highlight
* @return array
*/
function ft_pageSearch($query,&$highlight){
$data = array();
$data['query'] = $query;
$data['highlight'] =& $highlight;
@ -34,6 +38,9 @@ function ft_pageSearch($query,&$highlight){
*
* @author Andreas Gohr <andi@splitbrain.org>
* @author Kazutaka Miyasaka <kazmiya@gmail.com>
*
* @param array $data event data
* @return array matching documents
*/
function _ft_pageSearch(&$data) {
$Indexer = idx_get_indexer();
@ -205,6 +212,11 @@ function ft_mediause($id, $ignore_perms = false){
* @triggers SEARCH_QUERY_PAGELOOKUP
* @author Andreas Gohr <andi@splitbrain.org>
* @author Adrian Lang <lang@cosmocode.de>
*
* @param string $id page id
* @param bool $in_ns match against namespace as well?
* @param bool $in_title search in title?
* @return string[]
*/
function ft_pageLookup($id, $in_ns=false, $in_title=false){
$data = compact('id', 'in_ns', 'in_title');
@ -212,6 +224,12 @@ function ft_pageLookup($id, $in_ns=false, $in_title=false){
return trigger_event('SEARCH_QUERY_PAGELOOKUP', $data, '_ft_pageLookup');
}
/**
* Returns list of pages as array(pageid => First Heading)
*
* @param array &$data event data
* @return string[]
*/
function _ft_pageLookup(&$data){
// split out original parameters
$id = $data['id'];
@ -269,6 +287,10 @@ function _ft_pageLookup(&$data){
* Tiny helper function for comparing the searched title with the title
* from the search index. This function is a wrapper around stripos with
* adapted argument order and return value.
*
* @param string $search searched title
* @param string $title title from index
* @return bool
*/
function _ft_pageLookupTitleCompare($search, $title) {
return stripos($title, $search) !== false;
@ -278,6 +300,10 @@ function _ft_pageLookupTitleCompare($search, $title) {
* Sort pages based on their namespace level first, then on their string
* values. This makes higher hierarchy pages rank higher than lower hierarchy
* pages.
*
* @param string $a
* @param string $b
* @return int Returns < 0 if $a is less than $b; > 0 if $a is greater than $b, and 0 if they are equal.
*/
function ft_pagesorter($a, $b){
$ac = count(explode(':',$a));
@ -295,6 +321,10 @@ function ft_pagesorter($a, $b){
*
* @author Andreas Gohr <andi@splitbrain.org>
* @triggers FULLTEXT_SNIPPET_CREATE
*
* @param string $id page id
* @param array $highlight
* @return mixed
*/
function ft_snippet($id,$highlight){
$text = rawWiki($id);
@ -389,6 +419,9 @@ function ft_snippet($id,$highlight){
/**
* Wraps a search term in regex boundary checks.
*
* @param string $term
* @return string
*/
function ft_snippet_re_preprocess($term) {
// do not process asian terms where word boundaries are not explicit
@ -432,6 +465,7 @@ function ft_snippet_re_preprocess($term) {
* based upon PEAR's PHP_Compat function for array_intersect_key()
*
* @param array $args An array of page arrays
* @return array
*/
function ft_resultCombine($args){
$array_count = count($args);
@ -461,6 +495,8 @@ function ft_resultCombine($args){
* based upon ft_resultCombine() function
*
* @param array $args An array of page arrays
* @return array
*
* @author Kazutaka Miyasaka <kazmiya@gmail.com>
*/
function ft_resultUnite($args) {
@ -484,6 +520,8 @@ function ft_resultUnite($args) {
* nearly identical to PHP5's array_diff_key()
*
* @param array $args An array of page arrays
* @return array
*
* @author Kazutaka Miyasaka <kazmiya@gmail.com>
*/
function ft_resultComplement($args) {
@ -506,6 +544,10 @@ function ft_resultComplement($args) {
*
* @author Andreas Gohr <andi@splitbrain.org>
* @author Kazutaka Miyasaka <kazmiya@gmail.com>
*
* @param Doku_Indexer $Indexer
* @param string $query search query
* @return array of search formulas
*/
function ft_queryParser($Indexer, $query){
/**
@ -736,6 +778,12 @@ function ft_queryParser($Indexer, $query){
* This function is used in ft_queryParser() and not for general purpose use.
*
* @author Kazutaka Miyasaka <kazmiya@gmail.com>
*
* @param Doku_Indexer $Indexer
* @param string $term
* @param bool $consider_asian
* @param bool $phrase_mode
* @return string
*/
function ft_termParser($Indexer, $term, $consider_asian = true, $phrase_mode = false) {
$parsed = '';

View file

@ -1,957 +0,0 @@
<?php
/*************************************************************************************
* actionscript.php
* ----------------
* Author: Steffen Krause (Steffen.krause@muse.de)
* Copyright: (c) 2004 Steffen Krause, Nigel McNie (http://qbnz.com/highlighter)
* Release Version: 1.0.7.9
* CVS Revision Version: $Revision: 1.9 $
* Date Started: 2004/06/20
* Last Modified: $Date: 2006/04/23 01:14:41 $
*
* Actionscript language file for GeSHi.
*
* CHANGES
* -------
* 2005/08/25 (1.0.2)
* Author [ NikO ] - http://niko.informatif.org
* - add full link for myInstance.methods to http://wiki.media-box.net/documentation/flash
* 2004/11/27 (1.0.1)
* - Added support for multiple object splitters
* 2004/10/27 (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
*
************************************************************************************/
$language_data = array (
'LANG_NAME' => 'Actionscript',
'COMMENT_SINGLE' => array(1 => '//', 2 => '#'),
'COMMENT_MULTI' => array('/*' => '*/'),
'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
'QUOTEMARKS' => array("'", '"'),
'ESCAPE_CHAR' => '\\',
'KEYWORDS' => array(
1 => array(
'#include',
'for',
'foreach',
'if',
'elseif',
'else',
'while',
'do',
'dowhile',
'endwhile',
'endif',
'switch',
'case',
'endswitch',
'break',
'continue',
'in',
'null',
'false',
'true',
'var',
'default',
'new',
'_global',
'undefined',
'super'
),
2 => array(
'static',
'private',
'public',
'class',
'extends',
'implements',
'import',
'return',
'trace',
'_quality',
'_root',
'set',
'setInterval',
'setProperty',
'stopAllSounds',
'targetPath',
'this',
'typeof',
'unescape',
'updateAfterEvent'
),
3 => array (
'Accessibility',
'Array',
'Boolean',
'Button',
'Camera',
'Color',
'ContextMenuItem',
'ContextMenu',
'Cookie',
'Date',
'Error',
'function',
'FWEndCommand',
'FWJavascript',
'Key',
'LoadMovieNum',
'LoadMovie',
'LoadVariablesNum',
'LoadVariables',
'LoadVars',
'LocalConnection',
'Math',
'Microphone',
'MMExecute',
'MMEndCommand',
'MMSave',
'Mouse',
'MovieClipLoader',
'MovieClip',
'NetConnexion',
'NetStream',
'Number',
'Object',
'printAsBitmapNum',
'printNum',
'printAsBitmap',
'printJob',
'print',
'Selection',
'SharedObject',
'Sound',
'Stage',
'String',
'System',
'TextField',
'TextFormat',
'Tween',
'Video',
'XMLUI',
'XMLNode',
'XMLSocket',
'XML'
),
4 => array (
'isactive',
'updateProperties'
),
5 => array (
'callee',
'caller',
),
6 => array (
'concat',
'join',
'pop',
'push',
'reverse',
'shift',
'slice',
'sort',
'sortOn',
'splice',
'toString',
'unshift'
),
7 => array (
'valueOf'
),
8 => array (
'onDragOut',
'onDragOver',
'onKeyUp',
'onKillFocus',
'onPress',
'onRelease',
'onReleaseOutside',
'onRollOut',
'onRollOver',
'onSetFocus'
),
9 => array (
'setMode',
'setMotionLevel',
'setQuality',
'activityLevel',
'bandwidth',
'currentFps',
'fps',
'index',
'motionLevel',
'motionTimeOut',
'muted',
'names',
'quality',
'onActivity',
'onStatus'
),
10 => array (
'getRGB',
'setRGB',
'getTransform',
'setTransform'
),
11 => array (
'caption',
'enabled',
'separatorBefore',
'visible',
'onSelect'
),
12 => array (
'setCookie',
'getcookie'
),
13 => array (
'hideBuiltInItems',
'builtInItems',
'customItems',
'onSelect'
),
14 => array (
'CustomActions.get',
'CustomActions.install',
'CustomActions.list',
'CustomActions.uninstall',
),
15 => array (
'getDate',
'getDay',
'getFullYear',
'getHours',
'getMilliseconds',
'getMinutes',
'getMonth',
'getSeconds',
'getTime',
'getTimezoneOffset',
'getUTCDate',
'getUTCDay',
'getUTCFullYear',
'getUTCHours',
'getUTCMinutes',
'getUTCMilliseconds',
'getUTCMonth',
'getUTCSeconds',
'getYear',
'setDate',
'setFullYear',
'setHours',
'setMilliseconds',
'setMinutes',
'setMonth',
'setSeconds',
'setTime',
'setUTCDate',
'setUTCDay',
'setUTCFullYear',
'setUTCHours',
'setUTCMinutes',
'setUTCMilliseconds',
'setUTCMonth',
'setUTCSeconds',
'setYear',
'UTC'
),
16 => array (
'message',
'name',
'throw',
'try',
'catch',
'finally'
),
17 => array (
'apply',
'call'
),
18 => array (
'BACKSPACE',
'CAPSLOCK',
'CONTROL',
'DELETEKEY',
'DOWN',
'END',
'ENTER',
'ESCAPE',
'getAscii',
'getCode',
'HOME',
'INSERT',
'isDown',
'isToggled',
'LEFT',
'onKeyDown',
'onKeyUp',
'PGDN',
'PGUP',
'RIGHT',
'SPACE',
'TAB',
'UP'
),
19 => array (
'addRequestHeader',
'contentType',
'decode'
),
20 => array (
'allowDomain',
'allowInsecureDomain',
'close',
'domain'
),
21 => array (
'abs',
'acos',
'asin',
'atan',
'atan2',
'ceil',
'cos',
'exp',
'floor',
'log',
'LN2',
'LN10',
'LOG2E',
'LOG10E',
'max',
'min',
'PI',
'pow',
'random',
'sin',
'SQRT1_2',
'sqrt',
'tan',
'round',
'SQRT2'
),
22 => array (
'activityLevel',
'muted',
'names',
'onActivity',
'onStatus',
'setRate',
'setGain',
'gain',
'rate',
'setSilenceLevel',
'setUseEchoSuppression',
'silenceLevel',
'silenceTimeOut',
'useEchoSuppression'
),
23 => array (
'hide',
'onMouseDown',
'onMouseMove',
'onMouseUp',
'onMouseWeel',
'show'
),
24 => array (
'_alpha',
'attachAudio',
'attachMovie',
'beginFill',
'beginGradientFill',
'clear',
'createEmptyMovieClip',
'createTextField',
'_current',
'curveTo',
'_dropTarget',
'duplicateMovieClip',
'endFill',
'focusEnabled',
'enabled',
'_focusrec',
'_framesLoaded',
'getBounds',
'getBytesLoaded',
'getBytesTotal',
'getDepth',
'getInstanceAtDepth',
'getNextHighestDepth',
'getSWFVersion',
'getTextSnapshot',
'getURL',
'globalToLocal',
'gotoAndPlay',
'gotoAndStop',
'_height',
'hitArea',
'hitTest',
'lineStyle',
'lineTo',
'localToGlobal',
'_lockroot',
'menu',
'onUnload',
'_parent',
'play',
'prevFrame',
'_quality',
'removeMovieClip',
'_rotation',
'setMask',
'_soundbuftime',
'startDrag',
'stopDrag',
'stop',
'swapDepths',
'tabChildren',
'_target',
'_totalFrames',
'trackAsMenu',
'unloadMovie',
'useHandCursor',
'_visible',
'_width',
'_xmouse',
'_xscale',
'_x',
'_ymouse',
'_yscale',
'_y'
),
25 => array (
'getProgress',
'loadClip',
'onLoadComplete',
'onLoadError',
'onLoadInit',
'onLoadProgress',
'onLoadStart'
),
26 => array (
'bufferLength',
'currentFps',
'seek',
'setBufferTime',
'bufferTime',
'time',
'pause'
),
27 => array (
'MAX_VALUE',
'MIN_VALUE',
'NEGATIVE_INFINITY',
'POSITIVE_INFINITY'
),
28 => array (
'addProperty',
'constructor',
'__proto__',
'registerClass',
'__resolve',
'unwatch',
'watch',
'onUpDate'
),
29 => array (
'addPage'
),
30 => array (
'getBeginIndex',
'getCaretIndex',
'getEndIndex',
'setSelection'
),
31 => array (
'flush',
'getLocal',
'getSize'
),
32 => array (
'attachSound',
'duration',
'getPan',
'getVolume',
'onID3',
'loadSound',
'id3',
'onSoundComplete',
'position',
'setPan',
'setVolume'
),
33 => array (
'getBeginIndex',
'getCaretIndex',
'getEndIndex',
'setSelection'
),
34 => array (
'getEndIndex',
),
35 => array (
'align',
'height',
'width',
'onResize',
'scaleMode',
'showMenu'
),
36 => array (
'charAt',
'charCodeAt',
'concat',
'fromCharCode',
'indexOf',
'lastIndexOf',
'substr',
'substring',
'toLowerCase',
'toUpperCase'
),
37 => array (
'avHardwareDisable',
'hasAccessibility',
'hasAudioEncoder',
'hasAudio',
'hasEmbeddedVideo',
'hasMP3',
'hasPrinting',
'hasScreenBroadcast',
'hasScreenPlayback',
'hasStreamingAudio',
'hasStreamingVideo',
'hasVideoEncoder',
'isDebugger',
'language',
'localFileReadDisable',
'manufacturer',
'os',
'pixelAspectRatio',
'playerType',
'screenColor',
'screenDPI',
'screenResolutionX',
'screenResolutionY',
'serverString',
'version'
),
38 => array (
'allowDomain',
'allowInsecureDomain',
'loadPolicyFile'
),
39 => array (
'exactSettings',
'setClipboard',
'showSettings',
'useCodepage'
),
40 => array (
'getStyle',
'getStyleNames',
'parseCSS',
'setStyle',
'transform'
),
41 => array (
'autoSize',
'background',
'backgroundColor',
'border',
'borderColor',
'bottomScroll',
'condenseWhite',
'embedFonts',
'getFontList',
'getNewTextFormat',
'getTextFormat',
'hscroll',
'htmlText',
'html',
'maxChars',
'maxhscroll',
'maxscroll',
'mouseWheelEnabled',
'multiline',
'onScroller',
'password',
'removeTextField',
'replaceSel',
'replaceText',
'restrict',
'scroll',
'selectable',
'setNewTextFormat',
'setTextFormat',
'styleSheet',
'tabEnabled',
'tabIndex',
'textColor',
'textHeight',
'textWidth',
'text',
'type',
'_url',
'variable',
'wordWrap'
),
42 => array (
'blockIndent',
'bold',
'bullet',
'font',
'getTextExtent',
'indent',
'italic',
'leading',
'leftMargin',
'rightMargin',
'size',
'tabStops',
'underline'
),
43 => array (
'findText',
'getCount',
'getSelected',
'getSelectedText',
'getText',
'hitTestTextNearPos',
'setSelectColor',
'setSelected'
),
44 => array (
'begin',
'change',
'continueTo',
'fforward',
'finish',
'func',
'FPS',
'getPosition',
'isPlaying',
'looping',
'obj',
'onMotionChanged',
'onMotionFinished',
'onMotionLooped',
'onMotionStarted',
'onMotionResumed',
'onMotionStopped',
'prop',
'rewind',
'resume',
'setPosition',
'time',
'userSeconds',
'yoyo'
),
45 => array (
'attachVideo',
'deblocking',
'smoothing'
),
46 => array (
'addRequestHeader',
'appendChild',
'attributes',
'childNodes',
'cloneNode',
'contentType',
'createElement',
'createTextNode',
'docTypeDecl',
'firstChild',
'hasChildNodes',
'ignoreWhite',
'insertBefore',
'lastChild',
'nextSibling',
'nodeName',
'nodeType',
'nodeValue',
'parentNode',
'parseXML',
'previousSibling',
'removeNode',
'xmlDecl'
),
47 => array (
'onClose',
'onXML'
),
48 => array (
'add',
'and',
'_highquality',
'chr',
'eq',
'ge',
'ifFrameLoaded',
'int',
'le',
'it',
'mbchr',
'mblength',
'mbord',
'ne',
'not',
'or',
'ord',
'tellTarget',
'toggleHighQuality'
),
49 => array (
'ASSetPropFlags',
'ASnative',
'ASconstructor',
'AsSetupError',
'FWEndCommand',
'FWJavascript',
'MMEndCommand',
'MMSave',
'XMLUI'
),
50 => array (
'System.capabilities'
),
51 => array (
'System.security'
),
52 => array (
'TextField.StyleSheet'
)
),
'SYMBOLS' => 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,
27 => true,
28 => true,
29 => true,
30 => true,
31 => true,
32 => true,
33 => true,
34 => true,
35 => true,
36 => true,
37 => true,
38 => true,
39 => true,
40 => true,
41 => true,
42 => true,
43 => true,
44 => true,
45 => true,
46 => true,
47 => true,
48 => true,
49 => true,
50 => true,
51 => true,
52 => true
),
'STYLES' => array(
'KEYWORDS' => array(
1 => 'color: #0000ff;',
2 => 'color: #006600;',
3 => 'color: #000080;',
4 => 'color: #006600;',
5 => 'color: #006600;',
6 => 'color: #006600;',
7 => 'color: #006600;',
8 => 'color: #006600;',
9 => 'color: #006600;',
10 => 'color: #006600;',
11 => 'color: #006600;',
12 => 'color: #006600;',
13 => 'color: #006600;',
14 => 'color: #006600;',
15 => 'color: #006600;',
16 => 'color: #006600;',
17 => 'color: #006600;',
18 => 'color: #006600;',
19 => 'color: #006600;',
20 => 'color: #006600;',
21 => 'color: #006600;',
22 => 'color: #006600;',
23 => 'color: #006600;',
24 => 'color: #006600;',
25 => 'color: #006600;',
26 => 'color: #006600;',
27 => 'color: #006600;',
28 => 'color: #006600;',
29 => 'color: #006600;',
30 => 'color: #006600;',
31 => 'color: #006600;',
32 => 'color: #006600;',
33 => 'color: #006600;',
34 => 'color: #006600;',
35 => 'color: #006600;',
36 => 'color: #006600;',
37 => 'color: #006600;',
38 => 'color: #006600;',
39 => 'color: #006600;',
40 => 'color: #006600;',
41 => 'color: #006600;',
42 => 'color: #006600;',
43 => 'color: #006600;',
44 => 'color: #006600;',
45 => 'color: #006600;',
46 => 'color: #006600;',
47 => 'color: #006600;',
48 => 'color: #CC0000;',
49 => 'color: #5700d1;',
50 => 'color: #006600;',
51 => 'color: #006600;',
52 => 'color: #CC0000;'
),
'COMMENTS' => array(
1 => 'color: #ff8000; font-style: italic;',
2 => 'color: #ff8000; font-style: italic;',
'MULTI' => 'color: #ff8000; font-style: italic;'
),
'ESCAPE_CHAR' => array(
0 => 'color: #000099; font-weight: bold;'
),
'BRACKETS' => array(
0 => 'color: #333333;'
),
'STRINGS' => array(
0 => 'color: #333333; background-color: #eeeeee;'
),
'NUMBERS' => array(
0 => 'color: #c50000;'
),
'SYMBOLS' => array(
0 => 'color: #000000;'
),
'METHODS' => array(
1 => 'color: #006600;'
),
'REGEXPS' => array(
),
'SCRIPT' => array(
)
),
'URLS' => array(
1 => 'http://wiki.media-box.net/documentation/flash/{FNAME}',
2 => 'http://wiki.media-box.net/documentation/flash/{FNAME}',
3 => 'http://wiki.media-box.net/documentation/flash/{FNAME}',
4 => 'http://wiki.media-box.net/documentation/flash/accessibility/{FNAME}',
5 => 'http://wiki.media-box.net/documentation/flash/arguments/{FNAME}',
6 => 'http://wiki.media-box.net/documentation/flash/array/{FNAME}',
7 => 'http://wiki.media-box.net/documentation/flash/boolean/{FNAME}',
8 => 'http://wiki.media-box.net/documentation/flash/button/{FNAME}',
9 => 'http://wiki.media-box.net/documentation/flash/camera/{FNAME}',
10 => 'http://wiki.media-box.net/documentation/flash/color/{FNAME}',
11 => 'http://wiki.media-box.net/documentation/flash/contextmenuitem/{FNAME}',
12 => 'http://wiki.media-box.net/documentation/flash/contextmenu/{FNAME}',
13 => 'http://wiki.media-box.net/documentation/flash/cookie/{FNAME}',
14 => 'http://wiki.media-box.net/documentation/flash/customactions/{FNAME}',
15 => 'http://wiki.media-box.net/documentation/flash/date/{FNAME}',
16 => 'http://wiki.media-box.net/documentation/flash/error/{FNAME}',
17 => 'http://wiki.media-box.net/documentation/flash/function/{FNAME}',
18 => 'http://wiki.media-box.net/documentation/flash/key/{FNAME}',
19 => 'http://wiki.media-box.net/documentation/flash/loadvars/{FNAME}',
20 => 'http://wiki.media-box.net/documentation/flash/localconnection/{FNAME}',
21 => 'http://wiki.media-box.net/documentation/flash/math/{FNAME}',
22 => 'http://wiki.media-box.net/documentation/flash/microphone/{FNAME}',
23 => 'http://wiki.media-box.net/documentation/flash/mouse/{FNAME}',
24 => 'http://wiki.media-box.net/documentation/flash/movieclip/{FNAME}',
25 => 'http://wiki.media-box.net/documentation/flash/moviecliploader/{FNAME}',
26 => 'http://wiki.media-box.net/documentation/flash/netstream/{FNAME}',
27 => 'http://wiki.media-box.net/documentation/flash/number/{FNAME}',
28 => 'http://wiki.media-box.net/documentation/flash/object/{FNAME}',
29 => 'http://wiki.media-box.net/documentation/flash/printJob/{FNAME}',
30 => 'http://wiki.media-box.net/documentation/flash/selection/{FNAME}',
31 => 'http://wiki.media-box.net/documentation/flash/sharedobject/{FNAME}',
32 => 'http://wiki.media-box.net/documentation/flash/sound/{FNAME}',
33 => 'http://wiki.media-box.net/documentation/flash/selection/{FNAME}',
34 => 'http://wiki.media-box.net/documentation/flash/sharedobject/{FNAME}',
35 => 'http://wiki.media-box.net/documentation/flash/stage/{FNAME}',
36 => 'http://wiki.media-box.net/documentation/flash/string/{FNAME}',
37 => 'http://wiki.media-box.net/documentation/flash/system/capabilities/{FNAME}',
38 => 'http://wiki.media-box.net/documentation/flash/system/security/{FNAME}',
39 => 'http://wiki.media-box.net/documentation/flash/system/{FNAME}',
40 => 'http://wiki.media-box.net/documentation/flash/textfield/stylesheet/{FNAME}',
41 => 'http://wiki.media-box.net/documentation/flash/textfield/{FNAME}',
42 => 'http://wiki.media-box.net/documentation/flash/textformat/{FNAME}',
43 => 'http://wiki.media-box.net/documentation/flash/textsnapshot/{FNAME}',
44 => 'http://wiki.media-box.net/documentation/flash/tween/{FNAME}',
45 => 'http://wiki.media-box.net/documentation/flash/video/{FNAME}',
46 => 'http://wiki.media-box.net/documentation/flash/xml/{FNAME}',
47 => 'http://wiki.media-box.net/documentation/flash/xmlsocket/{FNAME}',
48 => 'http://wiki.media-box.net/documentation/flash/{FNAME}',
49 => 'http://wiki.media-box.net/documentation/flash/{FNAME}',
50 => 'http://wiki.media-box.net/documentation/flash/system/capabilities',
51 => 'http://wiki.media-box.net/documentation/flash/system/security',
52 => 'http://wiki.media-box.net/documentation/flash/textfield/stylesheet'
),
'OOLANG' => true,
'OBJECT_SPLITTERS' => array(
1 => '.'
),
'REGEXPS' => array(
),
'STRICT_MODE_APPLIES' => GESHI_NEVER,
'SCRIPT_DELIMITERS' => array(),
'HIGHLIGHT_STRICT_BLOCK' => array()
);
?>

View file

@ -1,244 +0,0 @@
<?php
/*************************************************************************************
* cobol.php
* ----------
* Author: BenBE (BenBE@omorphia.org)
* Copyright: (c) 2007-2008 BenBE (http://www.omorphia.de/)
* Release Version: 1.0.8.11
* Date Started: 2007/07/02
*
* COBOL language file for GeSHi.
*
* CHANGES
* -------
*
* TODO (updated 2007/07/02)
* -------------------------
*
*************************************************************************************
*
* 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' => 'COBOL',
'COMMENT_SINGLE' => array(),
'COMMENT_MULTI' => array(),
'COMMENT_REGEXP' => array(1 => '/^\*.*?$/m'),
'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
'QUOTEMARKS' => array('"', "'"),
'ESCAPE_CHAR' => '\\',
'NUMBERS' =>
GESHI_NUMBER_INT_BASIC |
GESHI_NUMBER_FLT_NONSCI |
GESHI_NUMBER_FLT_SCI_SHORT |
GESHI_NUMBER_FLT_SCI_ZERO,
'KEYWORDS' => array(
1 => array( //Compiler Directives
'ANSI', 'BLANK', 'NOBLANK', 'CALL-SHARED', 'CANCEL', 'NOCANCEL',
'CHECK', 'CODE', 'NOCODE', 'COLUMNS', 'COMPACT', 'NOCOMPACT',
'COMPILE', 'CONSULT', 'NOCONSULT', 'CROSSREF', 'NOCROSSREF',
'DIAGNOSE-74', 'NODIAGNOSE-74', 'DIAGNOSE-85', 'NODIAGNOSE-85',
'DIAGNOSEALL', 'NODIAGNOSEALL', 'ENDIF', 'ENDUNIT', 'ENV',
'ERRORFILE', 'ERRORS', 'FIPS', 'NOFIPS', 'FMAP', 'HEADING', 'HEAP',
'HIGHPIN', 'HIGHREQUESTERS', 'ICODE', 'NOICODE', 'IF', 'IFNOT',
'INNERLIST', 'NOINNERLIST', 'INSPECT', 'NOINSPECT', 'LARGEDATA',
'LD', 'LESS-CODE', 'LIBRARY', 'LINES', 'LIST', 'NOLIST', 'LMAP',
'NOLMAP', 'MAIN', 'MAP', 'NOMAP', 'NLD', 'NONSTOP', 'NON-SHARED',
'OPTIMIZE', 'PERFORM-TRACE', 'PORT', 'NOPORT', 'RESETTOG',
'RUNNABLE', 'RUNNAMED', 'SAVE', 'SAVEABEND', 'NOSAVEABEND',
'SEARCH', 'NOSEARCH', 'SECTION', 'SETTOG', 'SHARED', 'SHOWCOPY',
'NOSHOWCOPY', 'SHOWFILE', 'NOSHOWFILE', 'SOURCE', 'SQL', 'NOSQL',
'SQLMEM', 'SUBSET', 'SUBTYPE', 'SUPPRESS', 'NOSUPPRESS', 'SYMBOLS',
'NOSYMBOLS', 'SYNTAX', 'TANDEM', 'TRAP2', 'NOTRAP2', 'TRAP2-74',
'NOTRAP2-74', 'UL', 'WARN', 'NOWARN'
),
2 => array( //Statement Keywords
'ACCEPT', 'ADD', 'TO', 'GIVING', 'CORRESPONDING', 'ALTER', 'CALL',
'CHECKPOINT', 'CLOSE', 'COMPUTE', 'CONTINUE', 'COPY',
'DELETE', 'DISPLAY', 'DIVIDE', 'INTO', 'REMAINDER', 'ENTER',
'COBOL', 'EVALUATE', 'EXIT', 'GO', 'INITIALIZE',
'TALLYING', 'REPLACING', 'CONVERTING', 'LOCKFILE', 'MERGE', 'MOVE',
'MULTIPLY', 'OPEN', 'PERFORM', 'TIMES',
'UNTIL', 'VARYING', 'RETURN',
),
3 => array( //Reserved in some contexts
'ACCESS', 'ADDRESS', 'ADVANCING', 'AFTER', 'ALL',
'ALPHABET', 'ALPHABETIC', 'ALPHABETIC-LOWER', 'ALPHABETIC-UPPER',
'ALPHANUMERIC', 'ALPHANUMERIC-EDITED', 'ALSO', 'ALTERNATE',
'AND', 'ANY', 'APPROXIMATE', 'AREA', 'AREAS', 'ASCENDING', 'ASSIGN',
'AT', 'AUTHOR', 'BEFORE', 'BINARY', 'BLOCK', 'BOTTOM', 'BY',
'CD', 'CF', 'CH', 'CHARACTER', 'CHARACTERS',
'CHARACTER-SET', 'CLASS', 'CLOCK-UNITS',
'CODE-SET', 'COLLATING', 'COLUMN', 'COMMA',
'COMMON', 'COMMUNICATION', 'COMP', 'COMP-3', 'COMP-5',
'COMPUTATIONAL', 'COMPUTATIONAL-3', 'COMPUTATIONAL-5',
'CONFIGURATION', 'CONTAINS', 'CONTENT', 'CONTROL',
'CONTROLS', 'CORR', 'COUNT',
'CURRENCY', 'DATA', 'DATE', 'DATE-COMPILED', 'DATE-WRITTEN', 'DAY',
'DAY-OF-WEEK', 'DE', 'DEBUG-CONTENTS', 'DEBUG-ITEM', 'DEBUG-LINE',
'DEBUG-SUB-2', 'DEBUG-SUB-3', 'DEBUGGING', 'DECIMAL-POINT',
'DECLARATIVES', 'DEBUG-NAME', 'DEBUG-SUB-1', 'DELIMITED',
'DELIMITER', 'DEPENDING', 'DESCENDING', 'DESTINATION', 'DETAIL',
'DISABLE', 'DIVISION', 'DOWN', 'DUPLICATES',
'DYNAMIC', 'EGI', 'ELSE', 'EMI', 'ENABLE', 'END', 'END-ADD',
'END-COMPUTE', 'END-DELETE', 'END-DIVIDE', 'END-EVALUATE', 'END-IF',
'END-MULTIPLY', 'END-OF-PAGE', 'END-PERFORM', 'END-READ',
'END-RECEIVE', 'END-RETURN', 'END-REWRITE', 'END-SEARCH',
'END-START', 'END-STRING', 'END-SUBTRACT', 'END-UNSTRING',
'END-WRITE', 'EOP', 'EQUAL', 'ERROR', 'ESI',
'EVERY', 'EXCEPTION', 'EXCLUSIVE', 'EXTEND',
'EXTENDED-STORAGE', 'EXTERNAL', 'FALSE', 'FD', 'FILE',
'FILE-CONTROL', 'FILLER', 'FINAL', 'FIRST', 'FOOTING', 'FOR',
'FROM', 'FUNCTION', 'GENERATE', 'GENERIC', 'GLOBAL',
'GREATER', 'GROUP', 'GUARDIAN-ERR', 'HIGH-VALUE',
'HIGH-VALUES', 'I-O', 'I-O-CONTROL', 'IDENTIFICATION', 'IN',
'INDEX', 'INDEXED', 'INDICATE', 'INITIAL', 'INITIATE',
'INPUT', 'INPUT-OUTPUT', 'INSTALLATION',
'INVALID', 'IS', 'JUST', 'JUSTIFIED', 'KEY', 'LABEL', 'LAST',
'LEADING', 'LEFT', 'LESS', 'LIMIT', 'LIMITS', 'LINAGE',
'LINAGE-COUNTER', 'LINE', 'LINE-COUNTER', 'LINKAGE', 'LOCK',
'LOW-VALUE', 'LOW-VALUES', 'MEMORY', 'MESSAGE',
'MODE', 'MODULES', 'MULTIPLE', 'NATIVE',
'NEGATIVE', 'NEXT', 'NO', 'NOT', 'NULL', 'NULLS', 'NUMBER',
'NUMERIC', 'NUMERIC-EDITED', 'OBJECT-COMPUTER', 'OCCURS', 'OF',
'OFF', 'OMITTED', 'ON', 'OPTIONAL', 'OR', 'ORDER',
'ORGANIZATION', 'OTHER', 'OUTPUT', 'OVERFLOW', 'PACKED-DECIMAL',
'PADDING', 'PAGE', 'PAGE-COUNTER', 'PF', 'PH', 'PIC',
'PICTURE', 'PLUS', 'POINTER', 'POSITION', 'POSITIVE', 'PRINTING',
'PROCEDURE', 'PROCEDURES', 'PROCEED', 'PROGRAM', 'PROGRAM-ID',
'PROGRAM-STATUS', 'PROGRAM-STATUS-1', 'PROGRAM-STATUS-2', 'PROMPT',
'PROTECTED', 'PURGE', 'QUEUE', 'QUOTE', 'QUOTES', 'RD',
'RECEIVE', 'RECEIVE-CONTROL', 'RECORD', 'RECORDS',
'REDEFINES', 'REEL', 'REFERENCE', 'REFERENCES', 'RELATIVE',
'REMOVAL', 'RENAMES', 'REPLACE',
'REPLY', 'REPORT', 'REPORTING', 'REPORTS', 'RERUN',
'RESERVE', 'RESET', 'REVERSED', 'REWIND', 'REWRITE', 'RF',
'RH', 'RIGHT', 'ROUNDED', 'RUN', 'SAME', 'SD',
'SECURITY', 'SEGMENT', 'SEGMENT-LIMIT', 'SELECT', 'SEND',
'SENTENCE', 'SEPARATE', 'SEQUENCE', 'SEQUENTIAL', 'SET',
'SIGN', 'SIZE', 'SORT', 'SORT-MERGE', 'SOURCE-COMPUTER',
'SPACE', 'SPACES', 'SPECIAL-NAMES', 'STANDARD', 'STANDARD-1',
'STANDARD-2', 'START', 'STARTBACKUP', 'STATUS', 'STOP', 'STRING',
'SUB-QUEUE-1', 'SUB-QUEUE-2', 'SUB-QUEUE-3', 'SUBTRACT',
'SYMBOLIC', 'SYNC', 'SYNCDEPTH', 'SYNCHRONIZED',
'TABLE', 'TAL', 'TAPE', 'TERMINAL', 'TERMINATE', 'TEST',
'TEXT', 'THAN', 'THEN', 'THROUGH', 'THRU', 'TIME',
'TOP', 'TRAILING', 'TRUE', 'TYPE', 'UNIT', 'UNLOCK', 'UNLOCKFILE',
'UNLOCKRECORD', 'UNSTRING', 'UP', 'UPON', 'USAGE', 'USE',
'USING', 'VALUE', 'VALUES', 'WHEN', 'WITH', 'WORDS',
'WORKING-STORAGE', 'WRITE', 'ZERO', 'ZEROES'
),
4 => array( //Standard functions
'ACOS', 'ANNUITY', 'ASIN', 'ATAN', 'CHAR', 'COS', 'CURRENT-DATE',
'DATE-OF-INTEGER', 'DAY-OF-INTEGER', 'FACTORIAL', 'INTEGER',
'INTEGER-OF-DATE', 'INTEGER-OF-DAY', 'INTEGER-PART', 'LENGTH',
'LOG', 'LOG10', 'LOWER-CASE', 'MAX', 'MEAN', 'MEDIAN', 'MIDRANGE',
'MIN', 'MOD', 'NUMVAL', 'NUMVAL-C', 'ORD', 'ORD-MAX', 'ORD-MIN',
'PRESENT-VALUE', 'RANDOM', 'RANGE', 'REM', 'REVERSE', 'SIN', 'SQRT',
'STANDARD-DEVIATION', 'SUM', 'TAN', 'UPPER-CASE', 'VARIANCE',
'WHEN-COMPILED'
),
5 => array( //Privileged Built-in Functions
'#IN', '#OUT', '#TERM', '#TEMP', '#DYNAMIC', 'COBOL85^ARMTRAP',
'COBOL85^COMPLETION', 'COBOL_COMPLETION_', 'COBOL_CONTROL_',
'COBOL_GETENV_', 'COBOL_PUTENV_', 'COBOL85^RETURN^SORT^ERRORS',
'COBOL_RETURN_SORT_ERRORS_', 'COBOL85^REWIND^SEQUENTIAL',
'COBOL_REWIND_SEQUENTIAL_', 'COBOL85^SET^SORT^PARAM^TEXT',
'COBOL_SET_SORT_PARAM_TEXT_', 'COBOL85^SET^SORT^PARAM^VALUE',
'COBOL_SET_SORT_PARAM_VALUE_', 'COBOL_SET_MAX_RECORD_',
'COBOL_SETMODE_', 'COBOL85^SPECIAL^OPEN', 'COBOL_SPECIAL_OPEN_',
'COBOLASSIGN', 'COBOL_ASSIGN_', 'COBOLFILEINFO', 'COBOL_FILE_INFO_',
'COBOLSPOOLOPEN', 'CREATEPROCESS', 'ALTERPARAMTEXT',
'CHECKLOGICALNAME', 'CHECKMESSAGE', 'DELETEASSIGN', 'DELETEPARAM',
'DELETESTARTUP', 'GETASSIGNTEXT', 'GETASSIGNVALUE', 'GETBACKUPCPU',
'GETPARAMTEXT', 'GETSTARTUPTEXT', 'PUTASSIGNTEXT', 'PUTASSIGNVALUE',
'PUTPARAMTEXT', 'PUTSTARTUPTEXT'
)
),
'SYMBOLS' => array(
//Avoid having - in identifiers marked as symbols
' + ', ' - ', ' * ', ' / ', ' ** ',
'.', ',',
'=',
'(', ')', '[', ']'
),
'CASE_SENSITIVE' => array(
GESHI_COMMENTS => false,
1 => false,
2 => false,
3 => false,
4 => false,
5 => false
),
'STYLES' => array(
'KEYWORDS' => array(
1 => 'color: #000080; font-weight: bold;',
2 => 'color: #000000; font-weight: bold;',
3 => 'color: #008000; font-weight: bold;',
4 => 'color: #000080;',
5 => 'color: #008000;',
),
'COMMENTS' => array(
1 => 'color: #a0a0a0; font-style: italic;',
'MULTI' => 'color: #a0a0a0; font-style: italic;'
),
'ESCAPE_CHAR' => array(
0 => 'color: #000099; font-weight: bold;'
),
'BRACKETS' => array(
0 => 'color: #339933;'
),
'STRINGS' => array(
0 => 'color: #ff0000;'
),
'NUMBERS' => array(
0 => 'color: #993399;'
),
'METHODS' => array(
1 => 'color: #202020;'
),
'SYMBOLS' => array(
0 => 'color: #000066;'
),
'REGEXPS' => array(
),
'SCRIPT' => array(
)
),
'URLS' => array(
1 => '',
2 => '',
3 => '',
4 => '',
5 => ''
),
'OOLANG' => false,
'OBJECT_SPLITTERS' => array(
),
'REGEXPS' => array(
),
'STRICT_MODE_APPLIES' => GESHI_NEVER,
'SCRIPT_DELIMITERS' => array(
),
'HIGHLIGHT_STRICT_BLOCK' => array(
),
'TAB_WIDTH' => 4
);
?>

View file

@ -1,277 +0,0 @@
<?php
/*************************************************************************************
* parigp.php
* --------
* Author: Charles R Greathouse IV (charles@crg4.com)
* Copyright: 2011 Charles R Greathouse IV (http://math.crg4.com/)
* Release Version: 1.0.8.11
* Date Started: 2011/05/11
*
* PARI/GP language file for GeSHi.
*
* CHANGES
* -------
* 2011/07/09 (1.0.8.11)
* - First Release
*
* TODO (updated 2011/07/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' => 'PARI/GP',
'COMMENT_SINGLE' => array(1 => '\\\\'),
'COMMENT_MULTI' => array('/*' => '*/'),
'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
'QUOTEMARKS' => array('"'),
'ESCAPE_CHAR' => '\\',
'NUMBERS' => array(
# Integers
1 => GESHI_NUMBER_INT_BASIC,
# Reals
2 => GESHI_NUMBER_FLT_SCI_ZERO
),
'KEYWORDS' => array(
1 => array(
'addprimes','bestappr','bezout','bezoutres','bigomega','binomial',
'chinese','content','contfrac','contfracpnqn','core','coredisc',
'dirdiv','direuler','dirmul','divisors','eulerphi','factor',
'factorback','factorcantor','factorff','factorial','factorint',
'factormod','ffgen','ffinit','fflog','fforder','ffprimroot',
'fibonacci','gcd','hilbert','isfundamental','ispower','isprime',
'ispseudoprime','issquare','issquarefree','kronecker','lcm',
'moebius','nextprime','numbpart','numdiv','omega','partitions',
'polrootsff','precprime','prime','primepi','primes','qfbclassno',
'qfbcompraw','qfbhclassno','qfbnucomp','qfbnupow','qfbpowraw',
'qfbprimeform','qfbred','qfbsolve','quadclassunit','quaddisc',
'quadgen','quadhilbert','quadpoly','quadray','quadregulator',
'quadunit','removeprimes','sigma','sqrtint','stirling',
'sumdedekind','zncoppersmith','znlog','znorder','znprimroot',
'znstar','Col','List','Mat','Mod','Pol','Polrev','Qfb','Ser','Set',
'Str','Strchr','Strexpand','Strtex','Vec','Vecrev','Vecsmall',
'binary','bitand','bitneg','bitnegimply','bitor','bittest','bitxor',
'ceil','centerlift','component','conj','conjvec','denominator',
'floor','frac','imag','length','lift','norm','norml2','numerator',
'numtoperm','padicprec','permtonum','precision','random','real',
'round','simplify','sizebyte','sizedigit','truncate','valuation',
'variable','ellL1','elladd','ellak','ellan','ellanalyticrank',
'ellap','ellbil','ellchangecurve','ellchangepoint','ellconvertname',
'elldivpol','elleisnum','elleta','ellgenerators','ellglobalred',
'ellgroup','ellheight','ellheightmatrix','ellidentify','ellinit',
'ellisoncurve','ellj','elllocalred','elllog','elllseries',
'ellminimalmodel','ellmodulareqn','ellorder','ellordinate',
'ellpointtoz','ellpow','ellrootno','ellsearch','ellsigma','ellsub',
'elltaniyama','elltatepairing','elltors','ellweilpairing','ellwp',
'ellzeta','ellztopoint','bnfcertify','bnfcompress',
'bnfdecodemodule','bnfinit','bnfisintnorm','bnfisnorm',
'bnfisprincipal','bnfissunit','bnfisunit','bnfnarrow','bnfsignunit',
'bnfsunit','bnrL1','bnrclassno','bnrclassnolist','bnrconductor',
'bnrconductorofchar','bnrdisc','bnrdisclist','bnrinit',
'bnrisconductor','bnrisprincipal','bnrrootnumber','bnrstark',
'dirzetak','factornf','galoisexport','galoisfixedfield',
'galoisgetpol','galoisidentify','galoisinit','galoisisabelian',
'galoisisnormal','galoispermtopol','galoissubcyclo',
'galoissubfields','galoissubgroups','idealadd','idealaddtoone',
'idealappr','idealchinese','idealcoprime','idealdiv','idealfactor',
'idealfactorback','idealfrobenius','idealhnf','idealintersect',
'idealinv','ideallist','ideallistarch','ideallog','idealmin',
'idealmul','idealnorm','idealpow','idealprimedec','idealramgroups',
'idealred','idealstar','idealtwoelt','idealval','matalgtobasis',
'matbasistoalg','modreverse','newtonpoly','nfalgtobasis','nfbasis',
'nfbasistoalg','nfdetint','nfdisc','nfeltadd','nfeltdiv',
'nfeltdiveuc','nfeltdivmodpr','nfeltdivrem','nfeltmod','nfeltmul',
'nfeltmulmodpr','nfeltnorm','nfeltpow','nfeltpowmodpr',
'nfeltreduce','nfeltreducemodpr','nfelttrace','nfeltval','nffactor',
'nffactorback','nffactormod','nfgaloisapply','nfgaloisconj',
'nfhilbert','nfhnf','nfhnfmod','nfinit','nfisideal','nfisincl',
'nfisisom','nfkermodpr','nfmodprinit','nfnewprec','nfroots',
'nfrootsof1','nfsnf','nfsolvemodpr','nfsubfields','polcompositum',
'polgalois','polred','polredabs','polredord','poltschirnhaus',
'rnfalgtobasis','rnfbasis','rnfbasistoalg','rnfcharpoly',
'rnfconductor','rnfdedekind','rnfdet','rnfdisc','rnfeltabstorel',
'rnfeltdown','rnfeltreltoabs','rnfeltup','rnfequation',
'rnfhnfbasis','rnfidealabstorel','rnfidealdown','rnfidealhnf',
'rnfidealmul','rnfidealnormabs','rnfidealnormrel',
'rnfidealreltoabs','rnfidealtwoelt','rnfidealup','rnfinit',
'rnfisabelian','rnfisfree','rnfisnorm','rnfisnorminit','rnfkummer',
'rnflllgram','rnfnormgroup','rnfpolred','rnfpolredabs',
'rnfpseudobasis','rnfsteinitz','subgrouplist','zetak','zetakinit',
'plot','plotbox','plotclip','plotcolor','plotcopy','plotcursor',
'plotdraw','ploth','plothraw','plothsizes','plotinit','plotkill',
'plotlines','plotlinetype','plotmove','plotpoints','plotpointsize',
'plotpointtype','plotrbox','plotrecth','plotrecthraw','plotrline',
'plotrmove','plotrpoint','plotscale','plotstring','psdraw',
'psploth','psplothraw','O','deriv','diffop','eval','factorpadic',
'intformal','padicappr','padicfields','polchebyshev','polcoeff',
'polcyclo','poldegree','poldisc','poldiscreduced','polhensellift',
'polhermite','polinterpolate','polisirreducible','pollead',
'pollegendre','polrecip','polresultant','polroots','polrootsmod',
'polrootspadic','polsturm','polsubcyclo','polsylvestermatrix',
'polsym','poltchebi','polzagier','serconvol','serlaplace',
'serreverse','subst','substpol','substvec','taylor','thue',
'thueinit','break','for','fordiv','forell','forprime','forstep',
'forsubgroup','forvec','if','next','return','until','while',
'Strprintf','addhelp','alarm','alias','allocatemem','apply',
'default','error','extern','externstr','getheap','getrand',
'getstack','gettime','global','input','install','kill','print1',
'print','printf','printtex','quit','read','readvec','select',
'setrand','system','trap','type','version','warning','whatnow',
'write1','write','writebin','writetex','divrem','lex','max','min',
'shift','shiftmul','sign','vecmax','vecmin','derivnum','intcirc',
'intfouriercos','intfourierexp','intfouriersin','intfuncinit',
'intlaplaceinv','intmellininv','intmellininvshort','intnum',
'intnuminit','intnuminitgen','intnumromb','intnumstep','prod',
'prodeuler','prodinf','solve','sum','sumalt','sumdiv','suminf',
'sumnum','sumnumalt','sumnuminit','sumpos','Euler','I','Pi','abs',
'acos','acosh','agm','arg','asin','asinh','atan','atanh','bernfrac',
'bernreal','bernvec','besselh1','besselh2','besseli','besselj',
'besseljh','besselk','besseln','cos','cosh','cotan','dilog','eint1',
'erfc','eta','exp','gamma','gammah','hyperu','incgam','incgamc',
'lngamma','log','polylog','psi','sin','sinh','sqr','sqrt','sqrtn',
'tan','tanh','teichmuller','theta','thetanullk','weber','zeta',
'algdep','charpoly','concat','lindep','listcreate','listinsert',
'listkill','listpop','listput','listsort','matadjoint',
'matcompanion','matdet','matdetint','matdiagonal','mateigen',
'matfrobenius','mathess','mathilbert','mathnf','mathnfmod',
'mathnfmodid','matid','matimage','matimagecompl','matindexrank',
'matintersect','matinverseimage','matisdiagonal','matker',
'matkerint','matmuldiagonal','matmultodiagonal','matpascal',
'matrank','matrix','matrixqz','matsize','matsnf','matsolve',
'matsolvemod','matsupplement','mattranspose','minpoly','qfgaussred',
'qfjacobi','qflll','qflllgram','qfminim','qfperfection','qfrep',
'qfsign','setintersect','setisset','setminus','setsearch','cmp',
'setunion','trace','vecextract','vecsort','vector','vectorsmall',
'vectorv','ellheegner'
),
2 => array(
'void','bool','negbool','small','int',/*'real',*/'mp','var','lg','pol',
'vecsmall','vec','list','str','genstr','gen','typ'
),
3 => array(
'TeXstyle','breakloop','colors','compatible','datadir','debug',
'debugfiles','debugmem','echo','factor_add_primes','factor_proven',
'format','graphcolormap','graphcolors','help','histfile','histsize',
'lines','linewrap',/*'log',*/'logfile','new_galois_format','output',
'parisize','path','prettyprinter','primelimit','prompt_cont',
'prompt','psfile','readline','realprecision','recover','secure',
'seriesprecision',/*'simplify',*/'strictmatch','timer'
),
4 => array(
'alarmer','archer','errpile','gdiver','impl','syntaxer','invmoder',
'overflower','talker','typeer','user'
)
),
'SYMBOLS' => array(
1 => array(
'(',')','{','}','[',']','+','-','*','/','%','=','<','>','!','^','&','|','?',';',':',',','\\','\''
)
),
'CASE_SENSITIVE' => array(
GESHI_COMMENTS => false,
1 => true,
2 => true,
3 => true,
4 => true
),
'STYLES' => array(
'KEYWORDS' => array(
1 => 'color: #0000ff;',
2 => 'color: #e07022;',
3 => 'color: #00d2d2;',
4 => 'color: #00d2d2;'
),
'COMMENTS' => array(
1 => 'color: #008000;',
'MULTI' => 'color: #008000;'
),
'ESCAPE_CHAR' => array(
0 => 'color: #111111; font-weight: bold;'
),
'BRACKETS' => array(
0 => 'color: #002222;'
),
'STRINGS' => array(
0 => 'color: #800080;'
),
'NUMBERS' => array(
0 => 'color: #666666;',
1 => 'color: #666666;',
2 => 'color: #666666;'
),
'METHODS' => array(
0 => 'color: #004000;'
),
'SYMBOLS' => array(
1 => 'color: #339933;'
),
'REGEXPS' => array(
0 => 'color: #e07022', # Should be the same as keyword group 2
1 => 'color: #555555'
),
'SCRIPT' => array()
),
'URLS' => array(
1 => '',
2 => '',
3 => '',
4 => ''
),
'OOLANG' => true,
'OBJECT_SPLITTERS' => array(
1 => '.'
),
'REGEXPS' => array(
0 => array( # types marked on variables
GESHI_SEARCH => '(?<!\\\\ )"(t_(?:INT|REAL|INTMOD|FRAC|FFELT|COMPLEX|PADIC|QUAD|POLMOD|POL|SER|RFRAC|QFR|QFI|VEC|COL|MAT|LIST|STR|VECSMALL|CLOSURE))"',
GESHI_REPLACE => '\\1',
GESHI_MODIFIERS => '',
GESHI_BEFORE => '"',
GESHI_AFTER => '"'
),
1 => array( # literal variables
GESHI_SEARCH => '(?<!\\\\)(\'[a-zA-Z][a-zA-Z0-9_]*)',
GESHI_REPLACE => '\\1',
GESHI_MODIFIERS => '',
GESHI_BEFORE => '',
GESHI_AFTER => ''
)
),
'STRICT_MODE_APPLIES' => GESHI_NEVER,
'SCRIPT_DELIMITERS' => array(
2 => array(
'[a-zA-Z][a-zA-Z0-9_]*:' => ''
),
3 => array(
'default(' => ''
),
4 => array(
'trap(' => ''
),
),
'HIGHLIGHT_STRICT_BLOCK' => array()
);
?>

View file

@ -83,6 +83,10 @@ function html_denied() {
* inserts section edit buttons if wanted or removes the markers
*
* @author Andreas Gohr <andi@splitbrain.org>
*
* @param string $text
* @param bool $show show section edit buttons?
* @return string
*/
function html_secedit($text,$show=true){
global $INFO;
@ -101,8 +105,11 @@ function html_secedit($text,$show=true){
* prepares section edit button data for event triggering
* used as a callback in html_secedit
*
* @triggers HTML_SECEDIT_BUTTON
* @author Andreas Gohr <andi@splitbrain.org>
*
* @param array $matches matches with regexp
* @return string
* @triggers HTML_SECEDIT_BUTTON
*/
function html_secedit_button($matches){
$data = array('secid' => $matches[1],
@ -121,6 +128,9 @@ function html_secedit_button($matches){
* used as default action form HTML_SECEDIT_BUTTON
*
* @author Adrian Lang <lang@cosmocode.de>
*
* @param array $data name, section id and target
* @return string html
*/
function html_secedit_get_button($data) {
global $ID;
@ -147,6 +157,8 @@ function html_secedit_get_button($data) {
* Just the back to top button (in its own form)
*
* @author Andreas Gohr <andi@splitbrain.org>
*
* @return string html
*/
function html_topbtn(){
global $lang;
@ -161,8 +173,17 @@ function html_topbtn(){
* If tooltip exists, the access key tooltip is replaced.
*
* @author Andreas Gohr <andi@splitbrain.org>
*
* @param string $name
* @param string $id
* @param string $akey access key
* @param string[] $params key-value pairs added as hidden inputs
* @param string $method
* @param string $tooltip
* @param bool|string $label label text, false: lookup btn_$name in localization
* @return string
*/
function html_btn($name,$id,$akey,$params,$method='get',$tooltip='',$label=false){
function html_btn($name, $id, $akey, $params, $method='get', $tooltip='', $label=false){
global $conf;
global $lang;
@ -200,22 +221,34 @@ function html_btn($name,$id,$akey,$params,$method='get',$tooltip='',$label=false
$tip = htmlspecialchars($label);
}
$ret .= '<input type="submit" value="'.hsc($label).'" class="button" ';
$ret .= '<button type="submit" ';
if($akey){
$tip .= ' ['.strtoupper($akey).']';
$ret .= 'accesskey="'.$akey.'" ';
}
$ret .= 'title="'.$tip.'" ';
$ret .= '/>';
$ret .= hsc($label);
$ret .= '</button>';
$ret .= '</div></form>';
return $ret;
}
/**
* show a revision warning
*
* @author Szymon Olewniczak <dokuwiki@imz.re>
*/
function html_showrev() {
print p_locale_xhtml('showrev');
}
/**
* show a wiki page
* Show a wiki page
*
* @author Andreas Gohr <andi@splitbrain.org>
*
* @param null|string $txt wiki text or null for showing $ID
*/
function html_show($txt=null){
global $ID;
@ -242,7 +275,10 @@ function html_show($txt=null){
echo '</div></div>';
}else{
if ($REV||$DATE_AT) print p_locale_xhtml('showrev');
if ($REV||$DATE_AT){
$data = array('rev' => &$REV, 'date_at' => &$DATE_AT);
trigger_event('HTML_SHOWREV_OUTPUT', $data, 'html_showrev');
}
$html = p_wiki_xhtml($ID,$REV,true,$DATE_AT);
$html = html_secedit($html,$secedit);
if($INFO['prependTOC']) $html = tpl_toc(true).$html;
@ -282,6 +318,10 @@ function html_draft(){
*
* @author Andreas Gohr <andi@splitbrain.org>
* @author Harry Fuecks <hfuecks@gmail.com>
*
* @param string $html
* @param array|string $phrases
* @return string html
*/
function html_hilight($html,$phrases){
$phrases = (array) $phrases;
@ -300,6 +340,9 @@ function html_hilight($html,$phrases){
* Callback used by html_hilight()
*
* @author Harry Fuecks <hfuecks@gmail.com>
*
* @param array $m matches
* @return string html
*/
function html_hilight_callback($m) {
$hlight = unslash($m[0]);
@ -425,6 +468,9 @@ function html_locked(){
* @author Andreas Gohr <andi@splitbrain.org>
* @author Ben Coburn <btcoburn@silicodon.net>
* @author Kate Arzamastseva <pshns@ukr.net>
*
* @param int $first skip the first n changelog lines
* @param bool|string $media_id id of media, or false for current page
*/
function html_revisions($first=0, $media_id = false){
global $ID;
@ -468,7 +514,7 @@ function html_revisions($first=0, $media_id = false){
$form->addElement(form_makeOpenTag('ul'));
if (!$media_id) $exists = $INFO['exists'];
else $exists = @file_exists(mediaFN($id));
else $exists = file_exists(mediaFN($id));
$display_name = (!$media_id && useHeading('navigation')) ? hsc(p_get_first_heading($id)) : $id;
if (!$display_name) $display_name = $id;
@ -535,7 +581,7 @@ function html_revisions($first=0, $media_id = false){
$date = dformat($rev);
$info = $changelog->getRevisionInfo($rev);
if($media_id) {
$exists = @file_exists(mediaFN($id, $rev));
$exists = file_exists(mediaFN($id, $rev));
} else {
$exists = page_exists($id, $rev);
}
@ -646,6 +692,9 @@ function html_revisions($first=0, $media_id = false){
* @author Matthias Grimm <matthiasgrimm@users.sourceforge.net>
* @author Ben Coburn <btcoburn@silicodon.net>
* @author Kate Arzamastseva <pshns@ukr.net>
*
* @param int $first
* @param string $show_changes
*/
function html_recent($first=0, $show_changes='both'){
global $conf;
@ -729,10 +778,16 @@ function html_recent($first=0, $show_changes='both'){
$href = '';
if (!empty($recent['media'])) {
$diff = (count(getRevisions($recent['id'], 0, 1, 8192, true)) && @file_exists(mediaFN($recent['id'])));
$changelog = new MediaChangeLog($recent['id']);
$revs = $changelog->getRevisions(0, 1);
$diff = (count($revs) && file_exists(mediaFN($recent['id'])));
if ($diff) {
$href = media_managerURL(array('tab_details' => 'history',
'mediado' => 'diff', 'image' => $recent['id'], 'ns' => getNS($recent['id'])), '&');
$href = media_managerURL(array(
'tab_details' => 'history',
'mediado' => 'diff',
'image' => $recent['id'],
'ns' => getNS($recent['id'])
), '&');
}
} else {
$href = wl($recent['id'],"do=diff", false, '&');
@ -803,26 +858,28 @@ function html_recent($first=0, $show_changes='both'){
$first -= $conf['recent'];
if ($first < 0) $first = 0;
$form->addElement(form_makeOpenTag('div', array('class' => 'pagenav-prev')));
$form->addElement(form_makeTag('input', array(
$form->addElement(form_makeOpenTag('button', array(
'type' => 'submit',
'name' => 'first['.$first.']',
'value' => $lang['btn_newer'],
'accesskey' => 'n',
'title' => $lang['btn_newer'].' [N]',
'class' => 'button show'
)));
$form->addElement($lang['btn_newer']);
$form->addElement(form_makeCloseTag('button'));
$form->addElement(form_makeCloseTag('div'));
}
if ($hasNext) {
$form->addElement(form_makeOpenTag('div', array('class' => 'pagenav-next')));
$form->addElement(form_makeTag('input', array(
$form->addElement(form_makeOpenTag('button', array(
'type' => 'submit',
'name' => 'first['.$last.']',
'value' => $lang['btn_older'],
'accesskey' => 'p',
'title' => $lang['btn_older'].' [P]',
'class' => 'button show'
)));
$form->addElement($lang['btn_older']);
$form->addElement(form_makeCloseTag('button'));
$form->addElement(form_makeCloseTag('div'));
}
$form->addElement(form_makeCloseTag('div'));
@ -833,6 +890,8 @@ function html_recent($first=0, $show_changes='both'){
* Display page index
*
* @author Andreas Gohr <andi@splitbrain.org>
*
* @param string $ns
*/
function html_index($ns){
global $conf;
@ -861,6 +920,9 @@ function html_index($ns){
* User function for html_buildlist()
*
* @author Andreas Gohr <andi@splitbrain.org>
*
* @param array $item
* @return string
*/
function html_list_index($item){
global $ID, $conf;
@ -891,10 +953,24 @@ function html_list_index($item){
* it gives different classes to opened or closed "folders"
*
* @author Andreas Gohr <andi@splitbrain.org>
*
* @param array $item
* @return string html
*/
function html_li_index($item){
global $INFO;
global $ACT;
$class = '';
$id = '';
if($item['type'] == "f"){
return '<li class="level'.$item['level'].'">';
// scroll to the current item
if($item['id'] == $INFO['id'] && $ACT == 'index') {
$id = ' id="scroll__here"';
$class = ' bounce';
}
return '<li class="level'.$item['level'].$class.'" '.$id.'>';
}elseif($item['open']){
return '<li class="open">';
}else{
@ -906,6 +982,9 @@ function html_li_index($item){
* Default List item
*
* @author Andreas Gohr <andi@splitbrain.org>
*
* @param array $item
* @return string html
*/
function html_li_default($item){
return '<li class="level'.$item['level'].'">';
@ -929,9 +1008,9 @@ function html_li_default($item){
* @param array $data array with item arrays
* @param string $class class of ul wrapper
* @param callable $func callback to print an list item
* @param string $lifunc callback to the opening li tag
* @param callable $lifunc callback to the opening li tag
* @param bool $forcewrapper Trigger building a wrapper ul if the first level is
0 (we have a root object) or 1 (just the root content)
* 0 (we have a root object) or 1 (just the root content)
* @return string html of an unordered list
*/
function html_buildlist($data,$class,$func,$lifunc='html_li_default',$forcewrapper=false){
@ -1021,12 +1100,13 @@ function html_backlinks(){
/**
* Get header of diff HTML
*
* @param string $l_rev Left revisions
* @param string $r_rev Right revision
* @param string $id Page id, if null $ID is used
* @param bool $media If it is for media files
* @param bool $inline Return the header on a single line
* @return array HTML snippets for diff header
* @return string[] HTML snippets for diff header
*/
function html_diff_head($l_rev, $r_rev, $id = null, $media = false, $inline = false) {
global $lang;
@ -1334,7 +1414,13 @@ function html_diff_navigation($pagelog, $type, $l_rev, $r_rev) {
// last timestamp is not in changelog, retrieve timestamp from metadata
// note: when page is removed, the metadata timestamp is zero
$r_rev = $r_rev ? $r_rev : $INFO['meta']['last_change']['date'];
if(!$r_rev) {
if(isset($INFO['meta']['last_change']['date'])) {
$r_rev = $INFO['meta']['last_change']['date'];
} else {
$r_rev = 0;
}
}
//retrieve revisions with additional info
list($l_revs, $r_revs) = $pagelog->getRevisionsAround($l_rev, $r_rev);
@ -1482,7 +1568,7 @@ function html_diff_navigationlink($difftype, $linktype, $lrev, $rrev = null) {
/**
* Insert soft breaks in diff html
*
* @param $diffhtml
* @param string $diffhtml
* @return string
*/
function html_insert_softbreaks($diffhtml) {
@ -1521,6 +1607,9 @@ REGEX;
* show warning on conflict detection
*
* @author Andreas Gohr <andi@splitbrain.org>
*
* @param string $text
* @param string $summary
*/
function html_conflict($text,$summary){
global $ID;
@ -1681,7 +1770,6 @@ function html_edit(){
global $lang;
global $conf;
global $TEXT;
global $RANGE;
if ($INPUT->has('changecheck')) {
$check = $INPUT->str('changecheck');
@ -1783,6 +1871,7 @@ function html_edit(){
* Display the default edit form
*
* Is the default action for HTML_EDIT_FORMSELECTION.
*
* @param mixed[] $param
*/
function html_edit_form($param) {
@ -1802,6 +1891,8 @@ function html_edit_form($param) {
* Adds a checkbox for minor edits for logged in users
*
* @author Andreas Gohr <andi@splitbrain.org>
*
* @return array|bool
*/
function html_minoredit(){
global $conf;
@ -1902,6 +1993,7 @@ function html_debug(){
print '</pre>';
if (function_exists('apache_get_version')) {
$apache = array();
$apache['version'] = apache_get_version();
if (function_exists('apache_get_modules')) {
@ -1989,6 +2081,13 @@ function html_admin(){
$menu['config']['prompt'].'</a></div></li>');
}
unset($menu['config']);
if($menu['styling']){
ptln(' <li class="admin_styling"><div class="li">'.
'<a href="'.wl($ID, array('do' => 'admin','page' => 'styling')).'">'.
$menu['styling']['prompt'].'</a></div></li>');
}
unset($menu['styling']);
}
ptln('</ul>');
@ -2080,6 +2179,9 @@ function html_resendpwd() {
* Return the TOC rendered to XHTML
*
* @author Andreas Gohr <andi@splitbrain.org>
*
* @param array $toc
* @return string html
*/
function html_TOC($toc){
if(!count($toc)) return '';
@ -2098,6 +2200,9 @@ function html_TOC($toc){
/**
* Callback for html_buildlist
*
* @param array $item
* @return string html
*/
function html_list_toc($item){
if(isset($item['hid'])){
@ -2132,6 +2237,7 @@ function html_mktocitem($link, $text, $level, $hash='#'){
* Triggers an event with the form name: HTML_{$name}FORM_OUTPUT
*
* @author Tom N Harris <tnharris@whoopdedo.org>
*
* @param string $name The name of the form
* @param Doku_Form $form The form
*/
@ -2144,6 +2250,7 @@ function html_form($name, &$form) {
/**
* Form print function.
* Just calls printForm() on the data object.
*
* @param Doku_Form $data The form
*/
function html_form_output($data) {

View file

@ -15,6 +15,7 @@ define('HTTP_CHUNK_SIZE',16*1024);
*
* @author Simon Willison <swillison@gmail.com>
* @link http://simonwillison.net/2003/Apr/23/conditionalGet/
*
* @param int $timestamp lastmodified time of the cache file
* @returns void or exits with previously header() commands executed
*/
@ -64,6 +65,7 @@ function http_conditionalRequest($timestamp){
* Let the webserver send the given file via x-sendfile method
*
* @author Chris Smith <chris@jalakai.co.uk>
*
* @param string $file absolute path of file to send
* @returns void or exits with previous header() commands executed
*/
@ -190,6 +192,9 @@ function http_rangeRequest($fh,$size,$mime){
* (samepath/samefilename.sameext.gz) created after the uncompressed file
*
* @author Chris Smith <chris.eureka@jalakai.co.uk>
*
* @param string $uncompressed_file
* @return bool
*/
function http_gzip_valid($uncompressed_file) {
$gzip = $uncompressed_file.'.gz';
@ -206,6 +211,9 @@ function http_gzip_valid($uncompressed_file) {
* This function handles output of cacheable resource files. It ses the needed
* HTTP headers. If a useable cache is present, it is passed to the web server
* and the script is terminated.
*
* @param string $cache cache file name
* @param bool $cache_ok if cache can be used
*/
function http_cached($cache, $cache_ok) {
global $conf;
@ -235,6 +243,9 @@ function http_cached($cache, $cache_ok) {
/**
* Cache content and print it
*
* @param string $file file name
* @param string $content
*/
function http_cached_finish($file, $content) {
global $conf;

View file

@ -61,6 +61,8 @@ define('IDX_ASIAN', '(?:'.IDX_ASIAN1.'|'.IDX_ASIAN2.'|'.IDX_ASIAN3.')');
*
* @author Tom N Harris <tnharris@whoopdedo.org>
* @author Michael Hamann <michael@content-space.de>
*
* @return int|string
*/
function idx_get_version(){
static $indexer_version = null;
@ -84,6 +86,9 @@ function idx_get_version(){
* Differs from strlen in handling of asian characters.
*
* @author Tom N Harris <tnharris@whoopdedo.org>
*
* @param string $w
* @return int
*/
function wordlen($w){
$l = strlen($w);
@ -115,7 +120,8 @@ class Doku_Indexer {
*
* @param string $page a page name
* @param string $text the body of the page
* @return boolean the function completed successfully
* @return string|boolean the function completed successfully
*
* @author Tom N Harris <tnharris@whoopdedo.org>
* @author Andreas Gohr <andi@splitbrain.org>
*/
@ -190,6 +196,7 @@ class Doku_Indexer {
*
* @param string $text content of the page
* @return array list of word IDs and number of times used
*
* @author Andreas Gohr <andi@splitbrain.org>
* @author Christopher Smith <chris@jalakai.co.uk>
* @author Tom N Harris <tnharris@whoopdedo.org>
@ -245,7 +252,8 @@ class Doku_Indexer {
* @param string $page a page name
* @param mixed $key a key string or array of key=>value pairs
* @param mixed $value the value or list of values
* @return boolean the function completed successfully
* @return boolean|string the function completed successfully
*
* @author Tom N Harris <tnharris@whoopdedo.org>
* @author Michael Hamann <michael@content-space.de>
*/
@ -453,7 +461,8 @@ class Doku_Indexer {
* Erases entries in all known indexes.
*
* @param string $page a page name
* @return boolean the function completed successfully
* @return string|boolean the function completed successfully
*
* @author Tom N Harris <tnharris@whoopdedo.org>
*/
public function deletePage($page) {
@ -474,6 +483,7 @@ class Doku_Indexer {
*
* @param string $page a page name
* @return boolean the function completed successfully
*
* @author Tom N Harris <tnharris@whoopdedo.org>
*/
protected function deletePageNoLock($page) {
@ -568,6 +578,7 @@ class Doku_Indexer {
* @param string $text plain text
* @param boolean $wc are wildcards allowed?
* @return array list of words in the text
*
* @author Tom N Harris <tnharris@whoopdedo.org>
* @author Andreas Gohr <andi@splitbrain.org>
*/
@ -676,6 +687,7 @@ class Doku_Indexer {
*
* @param array $tokens list of words to search for
* @return array list of page names with usage counts
*
* @author Tom N Harris <tnharris@whoopdedo.org>
* @author Andreas Gohr <andi@splitbrain.org>
*/
@ -730,6 +742,7 @@ class Doku_Indexer {
* @param string $value search term to look for, must be a string or array of strings
* @param callback $func comparison function
* @return array lists with page names, keys are query values if $value is array
*
* @author Tom N Harris <tnharris@whoopdedo.org>
* @author Michael Hamann <michael@content-space.de>
*/
@ -829,6 +842,7 @@ class Doku_Indexer {
* @param array $words The query terms.
* @param array $result Set to word => array("length*id" ...)
* @return array Set to length => array(id ...)
*
* @author Tom N Harris <tnharris@whoopdedo.org>
*/
protected function getIndexWords(&$words, &$result) {
@ -909,6 +923,7 @@ class Doku_Indexer {
*
* @param string $key list only pages containing the metadata key (optional)
* @return array list of page names
*
* @author Tom N Harris <tnharris@whoopdedo.org>
*/
public function getPages($key=null) {
@ -942,6 +957,7 @@ class Doku_Indexer {
* @param int $minlen minimum length of words to count
* @param string $key metadata key to list. Uses the fulltext index if not given
* @return array list of words as the keys and frequency as values
*
* @author Tom N Harris <tnharris@whoopdedo.org>
*/
public function histogram($min=1, $max=0, $minlen=3, $key=null) {
@ -1002,6 +1018,8 @@ class Doku_Indexer {
* Lock the indexer.
*
* @author Tom N Harris <tnharris@whoopdedo.org>
*
* @return bool|string
*/
protected function lock() {
global $conf;
@ -1033,6 +1051,8 @@ class Doku_Indexer {
* Release the indexer lock.
*
* @author Tom N Harris <tnharris@whoopdedo.org>
*
* @return bool
*/
protected function unlock() {
global $conf;
@ -1050,12 +1070,13 @@ class Doku_Indexer {
* @param string $idx name of the index
* @param string $suffix subpart identifier
* @return array list of lines without CR or LF
*
* @author Tom N Harris <tnharris@whoopdedo.org>
*/
protected function getIndex($idx, $suffix) {
global $conf;
$fn = $conf['indexdir'].'/'.$idx.$suffix.'.idx';
if (!@file_exists($fn)) return array();
if (!file_exists($fn)) return array();
return file($fn, FILE_IGNORE_NEW_LINES);
}
@ -1066,6 +1087,7 @@ class Doku_Indexer {
* @param string $suffix subpart identifier
* @param array $lines list of lines without LF
* @return bool If saving succeeded
*
* @author Tom N Harris <tnharris@whoopdedo.org>
*/
protected function saveIndex($idx, $suffix, &$lines) {
@ -1090,12 +1112,13 @@ class Doku_Indexer {
* @param string $suffix subpart identifier
* @param int $id the line number
* @return string a line with trailing whitespace removed
*
* @author Tom N Harris <tnharris@whoopdedo.org>
*/
protected function getIndexKey($idx, $suffix, $id) {
global $conf;
$fn = $conf['indexdir'].'/'.$idx.$suffix.'.idx';
if (!@file_exists($fn)) return '';
if (!file_exists($fn)) return '';
$fh = @fopen($fn, 'r');
if (!$fh) return '';
$ln = -1;
@ -1114,6 +1137,7 @@ class Doku_Indexer {
* @param int $id the line number
* @param string $line line to write
* @return bool If saving succeeded
*
* @author Tom N Harris <tnharris@whoopdedo.org>
*/
protected function saveIndexKey($idx, $suffix, $id, $line) {
@ -1155,6 +1179,7 @@ class Doku_Indexer {
* @param string $suffix subpart identifier
* @param string $value line to find in the index
* @return int|bool line number of the value in the index or false if writing the index failed
*
* @author Tom N Harris <tnharris@whoopdedo.org>
*/
protected function addIndexKey($idx, $suffix, $value) {
@ -1178,6 +1203,8 @@ class Doku_Indexer {
* a sorted array of lengths of the words used in the wiki.
*
* @author YoBoY <yoboy.leguesh@gmail.com>
*
* @return array
*/
protected function listIndexLengths() {
return idx_listIndexLengths();
@ -1190,6 +1217,9 @@ class Doku_Indexer {
* that there are indices for.
*
* @author YoBoY <yoboy.leguesh@gmail.com>
*
* @param array|int $filter
* @return array
*/
protected function indexLengths($filter) {
global $conf;
@ -1198,7 +1228,7 @@ class Doku_Indexer {
// testing if index files exist only
$path = $conf['indexdir']."/i";
foreach ($filter as $key => $value) {
if (@file_exists($path.$key.'.idx'))
if (file_exists($path.$key.'.idx'))
$idx[] = $key;
}
} else {
@ -1216,6 +1246,11 @@ class Doku_Indexer {
* Insert or replace a tuple in a line.
*
* @author Tom N Harris <tnharris@whoopdedo.org>
*
* @param string $line
* @param string|int $id
* @param int $count
* @return string
*/
protected function updateTuple($line, $id, $count) {
if ($line != ''){
@ -1237,6 +1272,10 @@ class Doku_Indexer {
*
* @author Tom N Harris <tnharris@whoopdedo.org>
* @author Andreas Gohr <andi@splitbrain.org>
*
* @param array $keys
* @param string $line
* @return array
*/
protected function parseTuples(&$keys, $line) {
$result = array();
@ -1257,13 +1296,16 @@ class Doku_Indexer {
* Sum the counts in a list of tuples.
*
* @author Tom N Harris <tnharris@whoopdedo.org>
*
* @param string $line
* @return int
*/
protected function countTuples($line) {
$freq = 0;
$parts = explode(':', $line);
foreach ($parts as $tuple) {
if ($tuple === '') continue;
list($pid, $cnt) = explode('*', $tuple);
list(/* $pid */, $cnt) = explode('*', $tuple);
$freq += (int)$cnt;
}
return $freq;
@ -1273,7 +1315,8 @@ class Doku_Indexer {
/**
* Create an instance of the indexer.
*
* @return Doku_Indexer a Doku_Indexer
* @return Doku_Indexer a Doku_Indexer
*
* @author Tom N Harris <tnharris@whoopdedo.org>
*/
function idx_get_indexer() {
@ -1288,6 +1331,7 @@ function idx_get_indexer() {
* Returns words that will be ignored.
*
* @return array list of stop words
*
* @author Tom N Harris <tnharris@whoopdedo.org>
*/
function & idx_get_stopwords() {
@ -1295,7 +1339,7 @@ function & idx_get_stopwords() {
if (is_null($stopwords)) {
global $conf;
$swfile = DOKU_INC.'inc/lang/'.$conf['lang'].'/stopwords.txt';
if(@file_exists($swfile)){
if(file_exists($swfile)){
$stopwords = file($swfile, FILE_IGNORE_NEW_LINES);
}else{
$stopwords = array();
@ -1312,14 +1356,15 @@ function & idx_get_stopwords() {
* @param string $page name of the page to index
* @param boolean $verbose print status messages
* @param boolean $force force reindexing even when the index is up to date
* @return boolean the function completed successfully
* @return string|boolean the function completed successfully
*
* @author Tom N Harris <tnharris@whoopdedo.org>
*/
function idx_addPage($page, $verbose=false, $force=false) {
$idxtag = metaFN($page,'.indexed');
// check if page was deleted but is still in the index
if (!page_exists($page)) {
if (!@file_exists($idxtag)) {
if (!file_exists($idxtag)) {
if ($verbose) print("Indexer: $page does not exist, ignoring".DOKU_LF);
return false;
}
@ -1334,7 +1379,7 @@ function idx_addPage($page, $verbose=false, $force=false) {
}
// check if indexing needed
if(!$force && @file_exists($idxtag)){
if(!$force && file_exists($idxtag)){
if(trim(io_readFile($idxtag)) == idx_get_version()){
$last = @filemtime($idxtag);
if($last > @filemtime(wikiFN($page))){
@ -1347,7 +1392,7 @@ function idx_addPage($page, $verbose=false, $force=false) {
$indexenabled = p_get_metadata($page, 'internal index', METADATA_RENDER_UNLIMITED);
if ($indexenabled === false) {
$result = false;
if (@file_exists($idxtag)) {
if (file_exists($idxtag)) {
$Indexer = idx_get_indexer();
$result = $Indexer->deletePage($page);
if ($result === "locked") {
@ -1441,11 +1486,15 @@ function idx_tokenizer($string, $wc=false) {
* Read the list of words in an index (if it exists).
*
* @author Tom N Harris <tnharris@whoopdedo.org>
*
* @param string $idx
* @param string $suffix
* @return array
*/
function idx_getIndex($idx, $suffix) {
global $conf;
$fn = $conf['indexdir'].'/'.$idx.$suffix.'.idx';
if (!@file_exists($fn)) return array();
if (!file_exists($fn)) return array();
return file($fn);
}
@ -1456,6 +1505,8 @@ function idx_getIndex($idx, $suffix) {
* a sorted array of lengths of the words used in the wiki.
*
* @author YoBoY <yoboy.leguesh@gmail.com>
*
* @return array
*/
function idx_listIndexLengths() {
global $conf;
@ -1464,7 +1515,7 @@ function idx_listIndexLengths() {
$docache = false;
} else {
clearstatcache();
if (@file_exists($conf['indexdir'].'/lengths.idx')
if (file_exists($conf['indexdir'].'/lengths.idx')
&& (time() < @filemtime($conf['indexdir'].'/lengths.idx') + $conf['readdircache'])) {
if (($lengths = @file($conf['indexdir'].'/lengths.idx', FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES)) !== false) {
$idx = array();
@ -1510,6 +1561,9 @@ function idx_listIndexLengths() {
* that there are indices for.
*
* @author YoBoY <yoboy.leguesh@gmail.com>
*
* @param array|int $filter
* @return array
*/
function idx_indexLengths($filter) {
global $conf;
@ -1518,7 +1572,7 @@ function idx_indexLengths($filter) {
// testing if index files exist only
$path = $conf['indexdir']."/i";
foreach ($filter as $key => $value) {
if (@file_exists($path.$key.'.idx'))
if (file_exists($path.$key.'.idx'))
$idx[] = $key;
}
} else {
@ -1539,6 +1593,9 @@ function idx_indexLengths($filter) {
* not a letter, number, or underscore.
*
* @author Tom N Harris <tnharris@whoopdedo.org>
*
* @param string $name
* @return string
*/
function idx_cleanName($name) {
$name = utf8_romanize(trim((string)$name));

View file

@ -20,27 +20,28 @@ function checkUpdateMessages(){
if(!$conf['updatecheck']) return;
if($conf['useacl'] && !$INFO['ismanager']) return;
$cf = $conf['cachedir'].'/messages.txt';
$cf = getCacheName($updateVersion, '.updmsg');
$lm = @filemtime($cf);
// check if new messages needs to be fetched
if($lm < time()-(60*60*24) || $lm < @filemtime(DOKU_INC.DOKU_SCRIPT)){
@touch($cf);
dbglog("checkUpdateMessages(): downloading messages.txt");
dbglog("checkUpdateMessages(): downloading messages to ".$cf);
$http = new DokuHTTPClient();
$http->timeout = 12;
$data = $http->get(DOKU_MESSAGEURL.$updateVersion);
if(substr(trim($data), -1) != '%') {
// this doesn't look like one of our messages, maybe some WiFi login interferred
$data = '';
}else {
io_saveFile($cf,$data);
$resp = $http->get(DOKU_MESSAGEURL.$updateVersion);
if(is_string($resp) && ($resp == "" || substr(trim($resp), -1) == '%')) {
// basic sanity check that this is either an empty string response (ie "no messages")
// or it looks like one of our messages, not WiFi login or other interposed response
io_saveFile($cf,$resp);
} else {
dbglog("checkUpdateMessages(): unexpected HTTP response received");
}
}else{
dbglog("checkUpdateMessages(): messages.txt up to date");
$data = io_readFile($cf);
dbglog("checkUpdateMessages(): messages up to date");
}
$data = io_readFile($cf);
// show messages through the usual message mechanism
$msgs = explode("\n%\n",$data);
foreach($msgs as $msg){
@ -57,7 +58,7 @@ function checkUpdateMessages(){
function getVersionData(){
$version = array();
//import version string
if(@file_exists(DOKU_INC.'VERSION')){
if(file_exists(DOKU_INC.'VERSION')){
//official release
$version['date'] = trim(io_readfile(DOKU_INC.'VERSION'));
$version['type'] = 'Release';
@ -113,13 +114,13 @@ function check(){
if ($INFO['isadmin'] || $INFO['ismanager']){
msg('DokuWiki version: '.getVersion(),1);
if(version_compare(phpversion(),'5.2.0','<')){
msg('Your PHP version is too old ('.phpversion().' vs. 5.2.0+ needed)',-1);
if(version_compare(phpversion(),'5.3.3','<')){
msg('Your PHP version is too old ('.phpversion().' vs. 5.3.3+ needed)',-1);
}else{
msg('PHP version '.phpversion(),1);
}
} else {
if(version_compare(phpversion(),'5.2.0','<')){
if(version_compare(phpversion(),'5.3.3','<')){
msg('Your PHP version is too old',-1);
}
}
@ -140,20 +141,20 @@ function check(){
if(is_writable($conf['changelog'])){
msg('Changelog is writable',1);
}else{
if (@file_exists($conf['changelog'])) {
if (file_exists($conf['changelog'])) {
msg('Changelog is not writable',-1);
}
}
if (isset($conf['changelog_old']) && @file_exists($conf['changelog_old'])) {
if (isset($conf['changelog_old']) && file_exists($conf['changelog_old'])) {
msg('Old changelog exists', 0);
}
if (@file_exists($conf['changelog'].'_failed')) {
if (file_exists($conf['changelog'].'_failed')) {
msg('Importing old changelog failed', -1);
} else if (@file_exists($conf['changelog'].'_importing')) {
} else if (file_exists($conf['changelog'].'_importing')) {
msg('Importing old changelog now.', 0);
} else if (@file_exists($conf['changelog'].'_import_ok')) {
} else if (file_exists($conf['changelog'].'_import_ok')) {
msg('Old changelog imported', 1);
if (!plugin_isdisabled('importoldchangelog')) {
msg('Importoldchangelog plugin not disabled after import', -1);
@ -296,6 +297,7 @@ define('MSG_ADMINS_ONLY',4);
*/
function msg($message,$lvl=0,$line='',$file='',$allow=MSG_PUBLIC){
global $MSG, $MSG_shown;
$errors = array();
$errors[-1] = 'error';
$errors[0] = 'info';
$errors[1] = 'success';
@ -452,7 +454,7 @@ function dbg_backtrace(){
}elseif(is_array($arg)){
$params[] = '[Array]';
}elseif(is_null($arg)){
$param[] = '[NULL]';
$params[] = '[NULL]';
}else{
$params[] = (string) '"'.$arg.'"';
}

View file

@ -16,7 +16,7 @@ $config_cascade = array();
// if available load a preload config file
$preload = fullpath(dirname(__FILE__)).'/preload.php';
if (@file_exists($preload)) include($preload);
if (file_exists($preload)) include($preload);
// define the include path
if(!defined('DOKU_INC')) define('DOKU_INC',fullpath(dirname(__FILE__).'/../').'/');
@ -28,7 +28,7 @@ if(!defined('DOKU_PLUGIN')) define('DOKU_PLUGIN',DOKU_INC.'lib/plugins/');
if(!defined('DOKU_CONF')) define('DOKU_CONF',DOKU_INC.'conf/');
// check for error reporting override or set error reporting to sane values
if (!defined('DOKU_E_LEVEL') && @file_exists(DOKU_CONF.'report_e_all')) {
if (!defined('DOKU_E_LEVEL') && file_exists(DOKU_CONF.'report_e_all')) {
define('DOKU_E_LEVEL', E_ALL);
}
if (!defined('DOKU_E_LEVEL')) {
@ -65,7 +65,7 @@ $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)) {
if (file_exists($config_file)) {
include($config_file);
}
}
@ -79,7 +79,7 @@ $license = array();
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)){
if(file_exists($config_file)){
include($config_file);
}
}
@ -178,14 +178,6 @@ $_REQUEST = array_merge($_GET,$_POST);
// we don't want a purge URL to be digged
if(isset($_REQUEST['purge']) && !empty($_SERVER['HTTP_REFERER'])) unset($_REQUEST['purge']);
// disable gzip if not available
if($conf['compression'] == 'bz2' && !function_exists('bzopen')){
$conf['compression'] = 'gz';
}
if($conf['compression'] == 'gz' && !function_exists('gzopen')){
$conf['compression'] = 0;
}
// precalculate file creation modes
init_creationmodes();
@ -199,8 +191,17 @@ global $plugin_controller_class, $plugin_controller;
if (empty($plugin_controller_class)) $plugin_controller_class = 'Doku_Plugin_Controller';
// load libraries
require_once(DOKU_INC.'vendor/autoload.php');
require_once(DOKU_INC.'inc/load.php');
// disable gzip if not available
if($conf['compression'] == 'bz2' && !function_exists('bzopen')){
$conf['compression'] = 'gz';
}
if($conf['compression'] == 'gz' && !function_exists('gzopen')){
$conf['compression'] = 0;
}
// input handle class
global $INPUT;
$INPUT = new Input();
@ -272,7 +273,7 @@ function init_lang($langCode) {
//load the language files
require(DOKU_INC.'inc/lang/en/lang.php');
foreach ($config_cascade['lang']['core'] as $config_file) {
if (@file_exists($config_file . 'en/lang.php')) {
if (file_exists($config_file . 'en/lang.php')) {
include($config_file . 'en/lang.php');
}
}
@ -282,7 +283,7 @@ function init_lang($langCode) {
require(DOKU_INC."inc/lang/$langCode/lang.php");
}
foreach ($config_cascade['lang']['core'] as $config_file) {
if (@file_exists($config_file . "$langCode/lang.php")) {
if (file_exists($config_file . "$langCode/lang.php")) {
include($config_file . "$langCode/lang.php");
}
}
@ -298,7 +299,7 @@ function init_files(){
$files = array($conf['indexdir'].'/page.idx');
foreach($files as $file){
if(!@file_exists($file)){
if(!file_exists($file)){
$fh = @fopen($file,'a');
if($fh){
fclose($fh);
@ -312,7 +313,7 @@ function init_files(){
# create title index (needs to have same length as page.idx)
/*
$file = $conf['indexdir'].'/title.idx';
if(!@file_exists($file)){
if(!file_exists($file)){
$pages = file($conf['indexdir'].'/page.idx');
$pages = count($pages);
$fh = @fopen($file,'a');
@ -339,9 +340,9 @@ function init_files(){
function init_path($path){
// check existence
$p = fullpath($path);
if(!@file_exists($p)){
if(!file_exists($p)){
$p = fullpath(DOKU_INC.$path);
if(!@file_exists($p)){
if(!file_exists($p)){
return '';
}
}
@ -352,7 +353,7 @@ function init_path($path){
}
// check accessability (execute bit) for directories
if(@is_dir($p) && !@file_exists("$p/.")){
if(@is_dir($p) && !file_exists("$p/.")){
return '';
}
@ -429,7 +430,7 @@ function getBaseURL($abs=null){
//if canonical url enabled always return absolute
if(is_null($abs)) $abs = $conf['canonical'];
if($conf['basedir']){
if(!empty($conf['basedir'])){
$dir = $conf['basedir'];
}elseif(substr($_SERVER['SCRIPT_NAME'],-4) == '.php'){
$dir = dirname($_SERVER['SCRIPT_NAME']);
@ -456,7 +457,7 @@ function getBaseURL($abs=null){
if(!$abs) return $dir;
//use config option if available, trim any slash from end of baseurl to avoid multiple consecutive slashes in the path
if($conf['baseurl']) return rtrim($conf['baseurl'],'/').$dir;
if(!empty($conf['baseurl'])) return rtrim($conf['baseurl'],'/').$dir;
//split hostheader into host and port
if(isset($_SERVER['HTTP_HOST'])){
@ -535,7 +536,7 @@ function nice_die($msg){
</body>
</html>
EOT;
exit;
exit(1);
}
/**
@ -593,7 +594,7 @@ function fullpath($path,$exists=false){
$finalpath = $root.implode('/', $newpath);
// check for existence when needed (except when unit testing)
if($exists && !defined('DOKU_UNITTEST') && !@file_exists($finalpath)) {
if($exists && !defined('DOKU_UNITTEST') && !file_exists($finalpath)) {
return false;
}
return $finalpath;

View file

@ -20,6 +20,7 @@ if(!defined('DOKU_INC')) die('meh.');
* @param string $id - a pageid, the namespace of that id will be tried to deleted
* @param string $basedir - the config name of the type to delete (datadir or mediadir usally)
* @return bool - true if at least one namespace was deleted
*
* @author Andreas Gohr <andi@splitbrain.org>
* @author Ben Coburn <btcoburn@silicodon.net>
*/
@ -60,6 +61,11 @@ function io_sweepNS($id,$basedir='datadir'){
* $data[3] rev: The page revision, false for current wiki pages.
*
* @author Ben Coburn <btcoburn@silicodon.net>
*
* @param string $file filename
* @param string $id page id
* @param bool|int $rev revision timestamp
* @return string
*/
function io_readWikiPage($file, $id, $rev=false) {
if (empty($rev)) { $rev = false; }
@ -69,7 +75,11 @@ function io_readWikiPage($file, $id, $rev=false) {
/**
* Callback adapter for io_readFile().
*
* @author Ben Coburn <btcoburn@silicodon.net>
*
* @param array $data event data
* @return string
*/
function _io_readWikiPage_action($data) {
if (is_array($data) && is_array($data[0]) && count($data[0])===2) {
@ -88,19 +98,25 @@ function _io_readWikiPage_action($data) {
* be sure to set $clean to false!
*
* @author Andreas Gohr <andi@splitbrain.org>
*
* @param string $file filename
* @param bool $clean
* @return string|bool the file contents or false on error
*/
function io_readFile($file,$clean=true){
$ret = '';
if(@file_exists($file)){
if(file_exists($file)){
if(substr($file,-3) == '.gz'){
$ret = join('',gzfile($file));
$ret = gzfile($file);
if(is_array($ret)) $ret = join('', $ret);
}else if(substr($file,-4) == '.bz2'){
$ret = bzfile($file);
}else{
$ret = file_get_contents($file);
}
}
if($clean){
if($ret === null) return false;
if($ret !== false && $clean){
return cleanText($ret);
}else{
return $ret;
@ -108,21 +124,44 @@ function io_readFile($file,$clean=true){
}
/**
* Returns the content of a .bz2 compressed file as string
*
* @author marcel senf <marcel@rucksackreinigung.de>
* @author Andreas Gohr <andi@splitbrain.org>
*
* @param string $file filename
* @param bool $array return array of lines
* @return string|array|bool content or false on error
*/
function bzfile($file){
function bzfile($file, $array=false) {
$bz = bzopen($file,"r");
if($bz === false) return false;
if($array) $lines = array();
$str = '';
while (!feof($bz)){
while (!feof($bz)) {
//8192 seems to be the maximum buffersize?
$str = $str . bzread($bz,8192);
$buffer = bzread($bz,8192);
if(($buffer === false) || (bzerrno($bz) !== 0)) {
return false;
}
$str = $str . $buffer;
if($array) {
$pos = strpos($str, "\n");
while($pos !== false) {
$lines[] = substr($str, 0, $pos+1);
$str = substr($str, $pos+1);
$pos = strpos($str, "\n");
}
}
}
bzclose($bz);
if($array) {
if($str !== '') $lines[] = $str;
return $lines;
}
return $str;
}
/**
* Used to write out a DokuWiki page to file, and send IO_WIKIPAGE_WRITE events.
*
@ -138,6 +177,12 @@ function bzfile($file){
* $data[3] rev: The page revision, false for current wiki pages.
*
* @author Ben Coburn <btcoburn@silicodon.net>
*
* @param string $file filename
* @param string $content
* @param string $id page id
* @param int|bool $rev timestamp of revision
* @return bool
*/
function io_writeWikiPage($file, $content, $id, $rev=false) {
if (empty($rev)) { $rev = false; }
@ -149,6 +194,9 @@ function io_writeWikiPage($file, $content, $id, $rev=false) {
/**
* Callback adapter for io_saveFile().
* @author Ben Coburn <btcoburn@silicodon.net>
*
* @param array $data event data
* @return bool
*/
function _io_writeWikiPage_action($data) {
if (is_array($data) && is_array($data[0]) && count($data[0])===3) {
@ -158,6 +206,47 @@ function _io_writeWikiPage_action($data) {
}
}
/**
* Internal function to save contents to a file.
*
* @author Andreas Gohr <andi@splitbrain.org>
*
* @param string $file filename path to file
* @param string $content
* @param bool $append
* @return bool true on success, otherwise false
*/
function _io_saveFile($file, $content, $append) {
global $conf;
$mode = ($append) ? 'ab' : 'wb';
$fileexists = file_exists($file);
if(substr($file,-3) == '.gz'){
$fh = @gzopen($file,$mode.'9');
if(!$fh) return false;
gzwrite($fh, $content);
gzclose($fh);
}else if(substr($file,-4) == '.bz2'){
if($append) {
$bzcontent = bzfile($file);
if($bzcontent === false) return false;
$content = $bzcontent.$content;
}
$fh = @bzopen($file,'w');
if(!$fh) return false;
bzwrite($fh, $content);
bzclose($fh);
}else{
$fh = @fopen($file,$mode);
if(!$fh) return false;
fwrite($fh, $content);
fclose($fh);
}
if(!$fileexists and !empty($conf['fperm'])) chmod($file, $conf['fperm']);
return true;
}
/**
* Saves $content to $file.
*
@ -168,104 +257,97 @@ function _io_writeWikiPage_action($data) {
* and bz2 if extension is .bz2
*
* @author Andreas Gohr <andi@splitbrain.org>
* @return bool true on success
*
* @param string $file filename path to file
* @param string $content
* @param bool $append
* @return bool true on success, otherwise false
*/
function io_saveFile($file,$content,$append=false){
global $conf;
$mode = ($append) ? 'ab' : 'wb';
$fileexists = @file_exists($file);
function io_saveFile($file, $content, $append=false) {
io_makeFileDir($file);
io_lock($file);
if(substr($file,-3) == '.gz'){
$fh = @gzopen($file,$mode.'9');
if(!$fh){
msg("Writing $file failed",-1);
io_unlock($file);
return false;
}
gzwrite($fh, $content);
gzclose($fh);
}else if(substr($file,-4) == '.bz2'){
$fh = @bzopen($file,$mode{0});
if(!$fh){
msg("Writing $file failed", -1);
io_unlock($file);
return false;
}
bzwrite($fh, $content);
bzclose($fh);
}else{
$fh = @fopen($file,$mode);
if(!$fh){
msg("Writing $file failed",-1);
io_unlock($file);
return false;
}
fwrite($fh, $content);
fclose($fh);
if(!_io_saveFile($file, $content, $append)) {
msg("Writing $file failed",-1);
io_unlock($file);
return false;
}
if(!$fileexists and !empty($conf['fperm'])) chmod($file, $conf['fperm']);
io_unlock($file);
return true;
}
/**
* Delete exact linematch for $badline from $file.
* Replace one or more occurrences of a line in a file.
*
* Be sure to include the trailing newline in $badline
* The default, when $maxlines is 0 is to delete all matching lines then append a single line.
* A regex that matches any part of the line will remove the entire line in this mode.
* Captures in $newline are not available.
*
* Otherwise each line is matched and replaced individually, up to the first $maxlines lines
* or all lines if $maxlines is -1. If $regex is true then captures can be used in $newline.
*
* Be sure to include the trailing newline in $oldline when replacing entire lines.
*
* Uses gzip if extension is .gz
*
* 2005-10-14 : added regex option -- Christopher Smith <chris@jalakai.co.uk>
* and bz2 if extension is .bz2
*
* @author Steven Danz <steven-danz@kc.rr.com>
* @author Christopher Smith <chris@jalakai.co.uk>
* @author Patrick Brown <ptbrown@whoopdedo.org>
*
* @param string $file filename
* @param string $oldline exact linematch to remove
* @param string $newline new line to insert
* @param bool $regex use regexp?
* @param int $maxlines number of occurrences of the line to replace
* @return bool true on success
*/
function io_deleteFromFile($file,$badline,$regex=false){
if (!@file_exists($file)) return true;
function io_replaceInFile($file, $oldline, $newline, $regex=false, $maxlines=0) {
if ((string)$oldline === '') {
trigger_error('$oldline parameter cannot be empty in io_replaceInFile()', E_USER_WARNING);
return false;
}
if (!file_exists($file)) return true;
io_lock($file);
// load into array
if(substr($file,-3) == '.gz'){
$lines = gzfile($file);
}else if(substr($file,-4) == '.bz2'){
$lines = bzfile($file, true);
}else{
$lines = file($file);
}
// remove all matching lines
if ($regex) {
$lines = preg_grep($badline,$lines,PREG_GREP_INVERT);
} else {
$pos = array_search($badline,$lines); //return null or false if not found
while(is_int($pos)){
unset($lines[$pos]);
$pos = array_search($badline,$lines);
// make non-regexes into regexes
$pattern = $regex ? $oldline : '/^'.preg_quote($oldline,'/').'$/';
$replace = $regex ? $newline : addcslashes($newline, '\$');
// remove matching lines
if ($maxlines > 0) {
$count = 0;
$matched = 0;
while (($count < $maxlines) && (list($i,$line) = each($lines))) {
// $matched will be set to 0|1 depending on whether pattern is matched and line replaced
$lines[$i] = preg_replace($pattern, $replace, $line, -1, $matched);
if ($matched) $count++;
}
} else if ($maxlines == 0) {
$lines = preg_grep($pattern, $lines, PREG_GREP_INVERT);
if ((string)$newline !== ''){
$lines[] = $newline;
}
} else {
$lines = preg_replace($pattern, $replace, $lines);
}
if(count($lines)){
$content = join('',$lines);
if(substr($file,-3) == '.gz'){
$fh = @gzopen($file,'wb9');
if(!$fh){
msg("Removing content from $file failed",-1);
io_unlock($file);
return false;
}
gzwrite($fh, $content);
gzclose($fh);
}else{
$fh = @fopen($file,'wb');
if(!$fh){
msg("Removing content from $file failed",-1);
io_unlock($file);
return false;
}
fwrite($fh, $content);
fclose($fh);
if(!_io_saveFile($file, join('',$lines), false)) {
msg("Removing content from $file failed",-1);
io_unlock($file);
return false;
}
}else{
@unlink($file);
@ -275,6 +357,22 @@ function io_deleteFromFile($file,$badline,$regex=false){
return true;
}
/**
* Delete lines that match $badline from $file.
*
* Be sure to include the trailing newline in $badline
*
* @author Patrick Brown <ptbrown@whoopdedo.org>
*
* @param string $file filename
* @param string $badline exact linematch to remove
* @param bool $regex use regexp?
* @return bool true on success
*/
function io_deleteFromFile($file,$badline,$regex=false){
return io_replaceInFile($file,$badline,null,$regex,0);
}
/**
* Tries to lock a file
*
@ -285,6 +383,8 @@ function io_deleteFromFile($file,$badline,$regex=false){
* the lock is assumed to be stale and the function goes on
*
* @author Andreas Gohr <andi@splitbrain.org>
*
* @param string $file filename
*/
function io_lock($file){
global $conf;
@ -311,6 +411,8 @@ function io_lock($file){
* Unlocks a file
*
* @author Andreas Gohr <andi@splitbrain.org>
*
* @param string $file filename
*/
function io_unlock($file){
global $conf;
@ -331,6 +433,9 @@ function io_unlock($file){
* $data[1] ns_type: 'pages' or 'media' namespace tree.
*
* @author Ben Coburn <btcoburn@silicodon.net>
*
* @param string $id page id
* @param string $ns_type 'pages' or 'media'
*/
function io_createNamespace($id, $ns_type='pages') {
// verify ns_type
@ -344,7 +449,7 @@ function io_createNamespace($id, $ns_type='pages') {
$ns_stack = explode(':', $id);
$ns = $id;
$tmp = dirname( $file = call_user_func($types[$ns_type], $ns) );
while (!@is_dir($tmp) && !(@file_exists($tmp) && !is_dir($tmp))) {
while (!@is_dir($tmp) && !(file_exists($tmp) && !is_dir($tmp))) {
array_pop($ns_stack);
$ns = implode(':', $ns_stack);
if (strlen($ns)==0) { break; }
@ -365,6 +470,8 @@ function io_createNamespace($id, $ns_type='pages') {
* Create the directory needed for the given file
*
* @author Andreas Gohr <andi@splitbrain.org>
*
* @param string $file file name
*/
function io_makeFileDir($file){
$dir = dirname($file);
@ -379,11 +486,14 @@ function io_makeFileDir($file){
* @link http://www.php.net/manual/en/function.mkdir.php
* @author <saint@corenova.com>
* @author Andreas Gohr <andi@splitbrain.org>
*
* @param string $target filename
* @return bool|int|string
*/
function io_mkdir_p($target){
global $conf;
if (@is_dir($target)||empty($target)) return 1; // best case check first
if (@file_exists($target) && !is_dir($target)) return 0;
if (file_exists($target) && !is_dir($target)) return 0;
//recursion
if (io_mkdir_p(substr($target,0,strrpos($target,'/')))){
if($conf['safemodehack']){
@ -454,6 +564,9 @@ function io_rmdir($path, $removefiles = false) {
* This is used when the safemode workaround is enabled
*
* @author <andi@splitbrain.org>
*
* @param string $dir name of the new directory
* @return false|string
*/
function io_mkdir_ftp($dir){
global $conf;
@ -488,6 +601,8 @@ function io_mkdir_ftp($dir){
* its path.
*
* @author Michael Klier <chi@chimeric.de>
*
* @return false|string path to new directory or false
*/
function io_mktmpdir() {
global $conf;
@ -516,6 +631,13 @@ function io_mktmpdir() {
*
* @author Andreas Gohr <andi@splitbrain.org>
* @author Chris Smith <chris@jalakai.co.uk>
*
* @param string $url url to download
* @param string $file path to file or directory where to save
* @param bool $useAttachment if true: try to use name of download, uses otherwise $defaultName, false: uses $file as path to file
* @param string $defaultName fallback for if using $useAttachment
* @param int $maxSize maximum file size
* @return bool|string if failed false, otherwise true or the name of the file in the given dir
*/
function io_download($url,$file,$useAttachment=false,$defaultName='',$maxSize=2097152){
global $conf;
@ -548,7 +670,7 @@ function io_download($url,$file,$useAttachment=false,$defaultName='',$maxSize=20
$file = $file.$name;
}
$fileexists = @file_exists($file);
$fileexists = file_exists($file);
$fp = @fopen($file,"w");
if(!$fp) return false;
fwrite($fp,$data);
@ -563,6 +685,10 @@ function io_download($url,$file,$useAttachment=false,$defaultName='',$maxSize=20
*
* rename() can not overwrite existing files on Windows
* this function will use copy/unlink instead
*
* @param string $from
* @param string $to
* @return bool succes or fail
*/
function io_rename($from,$to){
global $conf;
@ -582,6 +708,11 @@ function io_rename($from,$to){
* Returns the exit code from the process.
*
* @author Tom N Harris <tnharris@whoopdedo.org>
*
* @param string $cmd
* @param string $input input pipe
* @param string $output output pipe
* @return int exit code from process
*/
function io_exec($cmd, $input, &$output){
$descspec = array(

View file

@ -1,3 +0,0 @@
## no access to the lang directory
order allow,deny
deny from all

View file

@ -44,7 +44,6 @@ $lang['profnoempty'] = 'Jy moet \'n name en a e-posadres in sit';
$lang['resendpwdmissing'] = 'Jammer, jy moet ales in fil';
$lang['resendpwdconfirm'] = '\'n Bevestigingpos is gestuur na die gekose e-posadres.';
$lang['resendpwdsuccess'] = 'Jou nuive wagwoord was deur e-pos gesteur';
$lang['fileupload'] = 'Laai lêer';
$lang['uploadsucc'] = 'Laai suksesvol';
$lang['uploadfail'] = 'Laai fout';
$lang['js']['hidedetails'] = 'Steek weg';
@ -62,7 +61,6 @@ $lang['qb_link'] = 'Interne skakel';
$lang['qb_extlink'] = 'Eksterne skakel';
$lang['qb_hr'] = 'Horisontale streep';
$lang['qb_sig'] = 'Handtekening met datum';
$lang['admin_register'] = 'Skep gerus \'n rekening';
$lang['btn_img_backto'] = 'Terug na %s';
$lang['img_date'] = 'Datem:';
$lang['img_camera'] = 'Camera:';

View file

@ -1,6 +1,7 @@
/* Arabic Translation for jQuery UI date picker plugin. */
/* Khaled Alhourani -- me@khaledalhourani.com */
/* NOTE: monthNames are the original months names and they are the Arabic names, not the new months name فبراير - يناير and there isn't any Arabic roots for these months */
/* Used in most of Arab countries, primarily in Bahrain, Kuwait, Oman, Qatar, Saudi Arabia and the United Arab Emirates, Egypt, Sudan and Yemen. */
/* Written by Mohammed Alshehri -- m@dralshehri.com */
(function( factory ) {
if ( typeof define === "function" && define.amd ) {
@ -18,15 +19,15 @@ datepicker.regional['ar'] = {
prevText: '&#x3C;السابق',
nextText: 'التالي&#x3E;',
currentText: 'اليوم',
monthNames: ['كانون الثاني', 'شباط', 'آذار', 'نيسان', 'مايو', 'حزيران',
'تموز', 'آب', 'أيلول', 'تشرين الأول', 'تشرين الثاني', 'كانون الأول'],
monthNames: ['يناير', 'فبراير', 'مارس', 'أبريل', 'مايو', 'يونيو',
'يوليو', 'أغسطس', 'سبتمبر', 'أكتوبر', 'نوفمبر', 'ديسمبر'],
monthNamesShort: ['1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12'],
dayNames: ['الأحد', 'الاثنين', 'الثلاثاء', 'الأربعاء', 'الخميس', 'الجمعة', 'السبت'],
dayNamesShort: ['الأحد', 'الاثنين', 'الثلاثاء', 'الأربعاء', 'الخميس', 'الجمعة', 'السبت'],
dayNamesShort: ['أحد', 'اثنين', 'ثلاثاء', 'أربعاء', 'خميس', 'جمعة', 'سبت'],
dayNamesMin: ['ح', 'ن', 'ث', 'ر', 'خ', 'ج', 'س'],
weekHeader: 'أسبوع',
dateFormat: 'dd/mm/yy',
firstDay: 6,
firstDay: 0,
isRTL: true,
showMonthAfterYear: false,
yearSuffix: ''};

View file

@ -41,7 +41,6 @@ $lang['btn_update'] = 'حدّث';
$lang['btn_delete'] = 'احذف';
$lang['btn_back'] = 'ارجع';
$lang['btn_backlink'] = 'ارتباطات';
$lang['btn_backtomedia'] = 'ارجع إلى اختيار ملف الوسائط';
$lang['btn_subscribe'] = 'ادر الاشتراكات';
$lang['btn_profile'] = 'حدث الملف الشخصي';
$lang['btn_reset'] = 'صفّر';
@ -143,8 +142,6 @@ $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'] = 'تم';
@ -154,7 +151,6 @@ $lang['js']['media_overwrt'] = 'أكتب فوق الملفات الموجود
$lang['rssfailed'] = 'خطأ ما حدث أثناء جلب ملف التغذية:';
$lang['nothingfound'] = 'لا يوجد شيء';
$lang['mediaselect'] = 'ملفات الوسائط';
$lang['fileupload'] = 'تحميل ملف وسائط';
$lang['uploadsucc'] = 'تم الرفع بنجاح';
$lang['uploadfail'] = 'فشل الرفع، ربما خطأ تراخيص؟';
$lang['uploadwrong'] = 'الرفع ممنوع، نوع الملف مرفوض!';
@ -245,7 +241,6 @@ $lang['qb_sig'] = 'أدرج التوقيع';
$lang['qb_smileys'] = 'الإبتسامات';
$lang['qb_chars'] = 'محارف خاصة';
$lang['upperns'] = 'انتقل للنطاق الأب';
$lang['admin_register'] = 'أضف مستخدما جديدا';
$lang['metaedit'] = 'تحرير البيانات الشمولية ';
$lang['metasaveerr'] = 'فشلت كتابة البيانات الشمولية';
$lang['metasaveok'] = 'حُفظت البيانات الشمولية';
@ -278,7 +273,6 @@ $lang['subscr_style_every'] = 'بريدا على كل تغيير';
$lang['subscr_style_digest'] = 'البريد الإلكتروني, ملخص للتغييرات لكل صفحة (كل يوم %.2f)';
$lang['subscr_style_list'] = 'قائمة بالصفحات التي تم تغييرها منذ آخر بريد الإلكتروني (كل يوم %.2f)';
$lang['authtempfail'] = 'تصريح المشترك غير متوفر مؤقتاً، إن استمرت هذه الحالة يرجى مراسلة المدير';
$lang['authpwdexpire'] = 'ستنتهي صلاحية كلمة السر في %d . عليك بتغييرها سريعا.';
$lang['i_chooselang'] = 'اختر لغتك';
$lang['i_installer'] = 'برنامج تنصيب دوكو ويكي';
$lang['i_wikiname'] = 'اسم الويكي';
@ -303,8 +297,8 @@ $lang['i_badhash'] = 'الملف dokuwiki.php غير مصنف أو
(hash=<code>%s</code>)';
$lang['i_badval'] = 'القيمة <code>%s</code> غير شرعية أو فارغة';
$lang['i_success'] = 'الإعدادات تمت بنجاح، يرجى حذف الملف install.php الآن.
ثم تابع إلى <a href="doku.php"> دوكو ويكي الجديدة</a>';
$lang['i_failure'] = 'بعض الأخطاء حدثت أثنا كتابة ملفات الإعدادات، عليك تعديلها يدوياً قبل أن تستطيع استخدام <a href="doku.php"> دوكو ويكي الجديدة</a>';
ثم تابع إلى <a href="doku.php?id=wiki:welcome"> دوكو ويكي الجديدة</a>';
$lang['i_failure'] = 'بعض الأخطاء حدثت أثنا كتابة ملفات الإعدادات، عليك تعديلها يدوياً قبل أن تستطيع استخدام <a href="doku.php?id=wiki:welcome"> دوكو ويكي الجديدة</a>';
$lang['i_policy'] = 'تصريح ACL مبدئي';
$lang['i_pol0'] = 'ويكي مفتوحة؛ أي القراءة والكتابة والتحميل مسموحة للجميع';
$lang['i_pol1'] = 'ويكي عامة؛ أي القراءة للجميع ولكن الكتابة والتحميل للمشتركين المسجلين فقط';

View file

@ -1,3 +1,3 @@
====== سجل كمستخدم جديد ======
أملئ البيانات التالية لتسجيل حساب جديد على الويكي. تأكد من كتابة **بريد إلكترونى صحيح** - سترسل اليك كلمة سر جديدة. أسم الدخول يجب أن يكون [[doku>pagename|أسم صفحة]] صحيح.
املئ البيانات التالية لتسجيل حساب جديد على الويكي. تأكد من كتابة **بريد إلكتروني صحيح** - سترسل إليك كلمة سر جديدة. اسم الدخول يجب أن يكون [[doku>pagename|أسم صفحة]] صحيح.

View file

@ -2,6 +2,169 @@
# When you edit this file be sure to use UNIX line endings (single newline)
# No need to include words shorter than 3 chars - these are ignored anyway
# This list is based upon the ones found at http://www.ranks.nl/stopwords/
ب
ا
،
عشر
عدد
عدة
عشرة
عدم
عام
عاما
عن
عند
عندما
على
عليه
عليها
زيارة
سنة
سنوات
تم
ضد
بعد
بعض
اعادة
اعلنت
بسبب
حتى
اذا
احد
اثر
برس
باسم
غدا
شخصا
صباح
اطار
اربعة
اخرى
بان
اجل
غير
بشكل
حاليا
بن
به
ثم
اف
ان
او
اي
بها
صفر
حيث
اكد
الا
اما
امس
السابق
التى
التي
اكثر
ايار
ايضا
ثلاثة
الذاتي
الاخيرة
الثاني
الثانية
الذى
الذي
الان
امام
ايام
خلال
حوالى
الذين
الاول
الاولى
بين
ذلك
دون
حول
حين
الف
الى
انه
اول
ضمن
انها
جميع
الماضي
الوقت
المقبل
اليوم
ـ
ف
و
و6
قد
لا
ما
مع
مساء
هذا
واحد
واضاف
واضافت
فان
قبل
قال
كان
لدى
نحو
هذه
وان
واكد
كانت
واوضح
مايو
فى
في
كل
لم
لن
له
من
هو
هي
قوة
كما
لها
منذ
وقد
ولا
نفسه
لقاء
مقابل
هناك
وقال
وكان
نهاية
وقالت
وكانت
للامم
فيه
كلم
لكن
وفي
وقف
ولم
ومن
وهو
وهي
يوم
فيها
منها
مليار
لوكالة
يكون
يمكن
مليون
فى
أم
about
are
and

View file

@ -35,7 +35,6 @@ $lang['btn_update'] = 'Yenilə';
$lang['btn_delete'] = 'Sil';
$lang['btn_back'] = 'Geri';
$lang['btn_backlink'] = 'Bura olan link-lər';
$lang['btn_backtomedia'] = 'media-fayl seçiminə qayıt';
$lang['btn_subscribe'] = 'Abunə ol (bütün dəyişiklər)';
$lang['btn_profile'] = 'Profil';
$lang['btn_reset'] = 'Boşalt';
@ -92,7 +91,6 @@ $lang['js']['willexpire'] = 'Sizin bu səhifədə dəyişik etmək ü
$lang['rssfailed'] = 'Aşağıda göstərilmiş xəbər lentini əldə edən zaman xəta baş verdi: ';
$lang['nothingfound'] = 'Heçnə tapılmadı.';
$lang['mediaselect'] = 'Mediya-faylın seçilməsi';
$lang['fileupload'] = 'Mediya-faylın serverə yüklənməsi';
$lang['uploadsucc'] = 'Yüklənmə uğur ilə başa çatdı';
$lang['uploadfail'] = 'Yüklənmə zamanı xəta baş veri. Bəlkə giriş haqları ilə problem var?';
$lang['uploadwrong'] = 'Yuklənməyə qadağa qoyuldu. Belə növlu faylları serverə yükləmək olmaz. ';
@ -169,7 +167,6 @@ $lang['qb_sig'] = 'İmza at';
$lang['qb_smileys'] = 'Smayllar';
$lang['qb_chars'] = 'Xüsusi simvollar';
$lang['upperns'] = 'Ana namespace-ə keç';
$lang['admin_register'] = 'İstifadəçi əlavə et';
$lang['metaedit'] = 'Meta-məlumatlarda düzəliş et';
$lang['metasaveerr'] = 'Meta-məlumatları yazan zamanı xəta';
$lang['metasaveok'] = 'Meta-məlumatlar yadda saxlandı';

View file

@ -10,8 +10,8 @@
*/
$lang['encoding'] = 'utf-8';
$lang['direction'] = 'ltr';
$lang['doublequoteopening'] = '"';
$lang['doublequoteclosing'] = '"';
$lang['doublequoteopening'] = '';
$lang['doublequoteclosing'] = '';
$lang['singlequoteopening'] = '';
$lang['singlequoteclosing'] = '';
$lang['apostrophe'] = '';
@ -38,7 +38,6 @@ $lang['btn_update'] = 'Актуализиране';
$lang['btn_delete'] = 'Изтриване';
$lang['btn_back'] = 'Назад';
$lang['btn_backlink'] = 'Какво сочи насам';
$lang['btn_backtomedia'] = 'Назад към избора на файл';
$lang['btn_subscribe'] = 'Абонаменти';
$lang['btn_profile'] = 'Профил';
$lang['btn_reset'] = 'Изчистване';
@ -51,6 +50,8 @@ $lang['btn_register'] = 'Регистриране';
$lang['btn_apply'] = 'Прилагане';
$lang['btn_media'] = 'Диспечер на файлове';
$lang['btn_deleteuser'] = 'Изтриване на профила';
$lang['btn_img_backto'] = 'Назад към %s';
$lang['btn_mediaManager'] = 'Преглед в диспечера на файлове';
$lang['loggedinas'] = 'Вписани сте като:';
$lang['user'] = 'Потребител';
$lang['pass'] = 'Парола';
@ -71,6 +72,7 @@ $lang['regmissing'] = 'Моля, попълнете всички по
$lang['reguexists'] = 'Вече съществува потребител с избраното име.';
$lang['regsuccess'] = 'Потребителят е създаден, а паролата е пратена по електронната поща.';
$lang['regsuccess2'] = 'Потребителят е създаден.';
$lang['regfail'] = 'Потребителят не може да бъде създаден.';
$lang['regmailfail'] = 'Изглежда, че има проблем с пращането на писмото с паролата. Моля, свържете се с администратора!';
$lang['regbadmail'] = 'Въведеният адрес изглежда невалиден - ако мислите, че това е грешка, свържете се с администратора.';
$lang['regbadpass'] = 'Двете въведени пароли не съвпадат, моля опитайте отново.';
@ -85,6 +87,7 @@ $lang['profdeleteuser'] = 'Изтриване на профила';
$lang['profdeleted'] = 'Вашият профил е премахнат от това wiki ';
$lang['profconfdelete'] = 'Искам да изтрия профила си от това wiki. <br/> Веднъж изтрит, профилът не може да бъде възстановен!';
$lang['profconfdeletemissing'] = 'Не сте поставили отметка в кутията потвърждение';
$lang['proffail'] = 'Потребителският профил не може да бъде актуализиран.';
$lang['pwdforget'] = 'Забравили сте паролата си? Получете нова';
$lang['resendna'] = 'Wiki-то не поддържа повторно пращане на паролата.';
$lang['resendpwd'] = 'Задаване на нова парола за';
@ -147,7 +150,6 @@ $lang['js']['media_overwrt'] = 'Презапиши съществуващит
$lang['rssfailed'] = 'Възникна грешка при получаването на емисията: ';
$lang['nothingfound'] = 'Нищо не е открито.';
$lang['mediaselect'] = 'Файлове';
$lang['fileupload'] = 'Качване на файлове';
$lang['uploadsucc'] = 'Качването е успешно';
$lang['uploadfail'] = 'Качването се провали. Може би поради грешни права?';
$lang['uploadwrong'] = 'Качването е отказано. Файлово разширение е забранено!';
@ -181,6 +183,9 @@ $lang['difflink'] = 'Препратка към сравнениет
$lang['diff_type'] = 'Преглед на разликите:';
$lang['diff_inline'] = 'Вграден';
$lang['diff_side'] = 'Един до друг';
$lang['diffprevrev'] = 'Предходна версия';
$lang['diffnextrev'] = 'Следваща версия';
$lang['difflastrev'] = 'Последна версия';
$lang['line'] = 'Ред';
$lang['breadcrumb'] = 'Следа:';
$lang['youarehere'] = 'Намирате се в:';
@ -233,11 +238,9 @@ $lang['qb_sig'] = 'Вмъкване на подпис';
$lang['qb_smileys'] = 'Усмивчици';
$lang['qb_chars'] = 'Специални знаци';
$lang['upperns'] = 'към майчиното именно пространство';
$lang['admin_register'] = 'Добавяне на нов потребител';
$lang['metaedit'] = 'Редактиране на метаданни';
$lang['metasaveerr'] = 'Записването на метаданните се провали';
$lang['metasaveok'] = 'Метаданните са запазени успешно';
$lang['btn_img_backto'] = 'Назад към %s';
$lang['img_title'] = 'Заглавие:';
$lang['img_caption'] = 'Надпис:';
$lang['img_date'] = 'Дата:';
@ -250,7 +253,6 @@ $lang['img_camera'] = 'Фотоапарат:';
$lang['img_keywords'] = 'Ключови думи:';
$lang['img_width'] = 'Ширина:';
$lang['img_height'] = 'Височина:';
$lang['btn_mediaManager'] = 'Преглед в диспечера на файлове';
$lang['subscr_subscribe_success'] = '%s е добавен към списъка с абониралите се за %s';
$lang['subscr_subscribe_error'] = 'Грешка при добавянето на %s към списъка с абониралите се за %s';
$lang['subscr_subscribe_noaddress'] = 'Добавянето ви към списъка с абонати не е възможно поради липсата на свързан адрес (имейл) с профила ви.';
@ -268,7 +270,6 @@ $lang['subscr_style_every'] = 'на имейл при всяка промян
$lang['subscr_style_digest'] = 'на имейл с обобщение на промените във всяка страница (всеки %.2f дни)';
$lang['subscr_style_list'] = 'на списък с променените страници от последния имейл (всеки %.2f дни)';
$lang['authtempfail'] = 'Удостоверяването на потребители не е възможно за момента. Ако продължи дълго, моля уведомете администратора на Wiki страницата.';
$lang['authpwdexpire'] = 'Срока на паролата ви ще изтече след %d дни. Препоръчително е да я смените по-скоро.';
$lang['i_chooselang'] = 'Изберете вашия език';
$lang['i_installer'] = 'Инсталатор на DokuWiki';
$lang['i_wikiname'] = 'Име на Wiki-то';
@ -279,12 +280,13 @@ $lang['i_modified'] = 'Поради мерки за сигурнос
Трябва да разархивирате отново файловете от сваления архив или да се посъветвате с <a href="http://dokuwiki.org/install">Инструкциите за инсталиране на Dokuwiki</a>.';
$lang['i_funcna'] = 'PHP функцията <code>%s</code> не е достъпна. Може би е забранена от доставчика на хостинг.';
$lang['i_phpver'] = 'Инсталираната версия <code>%s</code> на PHP е по-стара от необходимата <code>%s</code>. Актуализирайте PHP инсталацията.';
$lang['i_mbfuncoverload'] = 'Необходимо е да изключите mbstring.func_overload в php.ini за да може DokuWiki да стартира.';
$lang['i_permfail'] = '<code>%s</code> не е достъпна за писане от DokuWiki. Трябва да промените правата за достъп до директорията!';
$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. Продължете към <a href="doku.php?id=wiki:welcome">Вашето ново DokuWiki</a>.';
$lang['i_success'] = 'Настройването приключи успешно. Вече можете да изтриете файла install.php. Продължете към <a href="doku.php?id=wiki:welcome">Вашето новата инсталация на DokuWiki</a>.';
$lang['i_failure'] = 'Възникнаха грешки при записването на файловете с настройки. Вероятно ще се наложи да ги поправите ръчно,
за да можете да ползвате <a href="doku.php?id=wiki:welcome">Вашето ново DokuWiki</a>.';
$lang['i_policy'] = 'Първоначална политика за достъп';

View file

@ -6,20 +6,20 @@
* @author Foysol <ragebot1125@gmail.com>
* @author ninetailz <ninetailz1125@gmail.com>
* @author Khan M. B. Asad <muhammad2017@gmail.com>
* @author Ninetailz <ninetailz1125@gmail.com>
*/
$lang['encoding'] = 'utf-8';
$lang['direction'] = 'itr';
$lang['doublequoteopening'] = '"';
$lang['doublequoteclosing'] = '"';
$lang['singlequoteopening'] = '\'';
$lang['singlequoteclosing'] = '\'';
$lang['apostrophe'] = '\'';
$lang['direction'] = 'ltr';
$lang['doublequoteopening'] = '';
$lang['doublequoteclosing'] = '';
$lang['singlequoteopening'] = '';
$lang['singlequoteclosing'] = '';
$lang['apostrophe'] = '';
$lang['btn_edit'] = 'এই পৃষ্ঠা সম্পাদনা করুন';
$lang['btn_source'] = 'দেখান পাতা উৎস';
$lang['btn_show'] = 'দেখান পৃষ্ঠা';
$lang['btn_create'] = 'এই পৃষ্ঠা তৈরি করুন';
$lang['btn_search'] = 'অনুসন্ধান';
$lang['btn_save'] = 'Save';
$lang['btn_preview'] = 'পূর্বরূপ';
$lang['btn_top'] = 'উপরে ফিরে যান ';
$lang['btn_newer'] = '<< আরো সাম্প্রতিক';
@ -37,7 +37,6 @@ $lang['btn_update'] = 'আধুনিক করা';
$lang['btn_delete'] = 'মুছে ফেলা';
$lang['btn_back'] = 'পিছনে';
$lang['btn_backlink'] = 'ব্যাকলিঙ্কগুলি';
$lang['btn_backtomedia'] = 'পিছনে Mediafile নির্বাচনে যান';
$lang['btn_subscribe'] = 'সাবস্ক্রিপশন পরিচালনা করুন';
$lang['btn_profile'] = 'প্রোফাইল আপডেট করুন';
$lang['btn_reset'] = 'রিসেট করুন';
@ -148,7 +147,6 @@ $lang['js']['media_overwrt'] = 'বর্তমান ফাইল ওভা
$lang['rssfailed'] = 'ফিডটি জোগাড় করতে গিয়ে একটি ত্রুটি ঘটেছে:';
$lang['nothingfound'] = 'কিছু পাওয়া যায়নি।';
$lang['mediaselect'] = 'মিডিয়া ফাইল';
$lang['fileupload'] = 'মিডিয়া ফাইল আপলোড';
$lang['uploadsucc'] = 'আপলোড সফল';
$lang['uploadfail'] = 'আপলোড ব্যর্থ। অনুমতি জনিত ত্রুটি কী?';
$lang['uploadwrong'] = 'আপলোড প্রত্যাখ্যাত। এই ফাইল এক্সটেনশন অননুমোদিত।';
@ -197,4 +195,32 @@ $lang['created'] = 'তৈরি করা';
$lang['restored'] = 'পুরানো সংস্করণের পুনঃস্থাপন (%s)';
$lang['external_edit'] = 'বাহ্যিক সম্পাদনা';
$lang['summary'] = 'সম্পাদনা সারাংশ';
$lang['noflash'] = 'এ href="http://www.adobe.com/products/flashplayer/"> অ্যাডোবি ফ্ল্যাশ প্লাগইন </ a> এই সামগ্রী প্রদর্শন করার জন্য প্রয়োজন হয়.';
$lang['noflash'] = 'এ 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['sidebar'] = 'সাইডবার';
$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'] = 'আন্ডারলাইন টেক্সট';
$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'] = 'নির্বাচন করুন শিরোনাম';

View file

@ -36,7 +36,6 @@ $lang['btn_update'] = 'Actualisar';
$lang['btn_delete'] = 'Borrar';
$lang['btn_back'] = 'Arrere';
$lang['btn_backlink'] = 'Vínculs remitents';
$lang['btn_backtomedia'] = 'Tornar a la selecció d\'archius de mijos';
$lang['btn_subscribe'] = 'Subscriure\'s a la pàgina';
$lang['btn_profile'] = 'Actualisar perfil';
$lang['btn_reset'] = 'Reiniciar';
@ -94,7 +93,6 @@ $lang['js']['notsavedyet'] = 'Els canvis no guardats es perdran.\n¿Segur qu
$lang['rssfailed'] = 'Ha ocorregut un erro al solicitar este canal: ';
$lang['nothingfound'] = 'No s\'ha trobat res.';
$lang['mediaselect'] = 'Archius de mijos';
$lang['fileupload'] = 'Enviar archius de mijos';
$lang['uploadsucc'] = 'Enviament correcte';
$lang['uploadfail'] = 'Enviament fallit. ¿Potser no tinga els permissos necessaris?';
$lang['uploadwrong'] = 'Enviament denegat. ¡Esta extensió d\'archiu està prohibida!';
@ -171,7 +169,6 @@ $lang['qb_sig'] = 'Afegir firma';
$lang['qb_smileys'] = 'Smileys';
$lang['qb_chars'] = 'Caràcters especials';
$lang['upperns'] = 'anar a l\'espai de noms superior';
$lang['admin_register'] = 'Afegir nou usuari';
$lang['metaedit'] = 'Editar meta-senyes';
$lang['metasaveerr'] = 'Erro escrivint meta-senyes';
$lang['metasaveok'] = 'Meta-senyes guardades';

View file

@ -1,11 +1,13 @@
<?php
/**
* catalan language file
*
* @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
*
* @author Carles Bellver <carles.bellver@cent.uji.es>
* @author Carles Bellver <carles.bellver@gmail.com>
* @author daniel@6temes.cat
* @author Eduard Díaz <edudiaz@scopia.es>
* @author controlonline.net <controlonline.net@gmail.com>
*/
$lang['encoding'] = 'utf-8';
$lang['direction'] = 'ltr';
@ -37,7 +39,6 @@ $lang['btn_update'] = 'Actualitza';
$lang['btn_delete'] = 'Suprimeix';
$lang['btn_back'] = 'Enrere';
$lang['btn_backlink'] = 'Què hi enllaça';
$lang['btn_backtomedia'] = 'Torna a la selecció de fitxers';
$lang['btn_subscribe'] = 'Subscripció a canvis d\'aquesta pàgina';
$lang['btn_profile'] = 'Actualització del perfil';
$lang['btn_reset'] = 'Reinicia';
@ -48,6 +49,10 @@ $lang['btn_draftdel'] = 'Suprimeix esborrany';
$lang['btn_revert'] = 'Restaura';
$lang['btn_register'] = 'Registra\'m';
$lang['btn_apply'] = 'Aplica';
$lang['btn_media'] = 'Mànager Multimèdia';
$lang['btn_deleteuser'] = 'Esborrar compte';
$lang['btn_img_backto'] = 'Torna a %s';
$lang['btn_mediaManager'] = 'Veure a multimèdia mànager ';
$lang['loggedinas'] = 'Heu entrat com:';
$lang['user'] = 'Nom d\'usuari';
$lang['pass'] = 'Contrasenya';
@ -59,14 +64,16 @@ $lang['fullname'] = 'Nom complet';
$lang['email'] = 'Correu electrònic';
$lang['profile'] = 'Perfil d\'usuari';
$lang['badlogin'] = 'Nom d\'usuari o contrasenya incorrectes.';
$lang['badpassconfirm'] = 'Contrasenya incorrecta';
$lang['minoredit'] = 'Canvis menors';
$lang['draftdate'] = 'L\'esborrany s\'ha desat automàticament';
$lang['nosecedit'] = 'Mentrestant la pàgina ha estat modificada. La informació de seccions estava obsoleta i ha calgut carregar la pàgina sencera.';
$lang['searchcreatepage'] = "Si no trobeu allò que buscàveu, podeu crear una pàgina nova per mitjà del botó ''Edita aquesta pàgina''.";
$lang['searchcreatepage'] = 'Si no trobeu allò que buscàveu, podeu crear una pàgina nova per mitjà del botó \'\'Edita aquesta pàgina\'\'.';
$lang['regmissing'] = 'Heu d\'omplir tots els camps.';
$lang['reguexists'] = 'Ja existeix un altre usuari amb aquest nom.';
$lang['regsuccess'] = 'S\'ha creat l\'usuari. La contrasenya s\'ha enviat per correu.';
$lang['regsuccess2'] = 'S\'ha creat l\'usuari.';
$lang['regfail'] = 'L\'usuari no pot ser creat';
$lang['regmailfail'] = 'Sembla que un error ha impedit enviar la contrasenya per correu. Contacteu amb l\'administrador.';
$lang['regbadmail'] = 'L\'adreça de correu que heu donat no sembla vàlida. Si creieu que això és un error, contacu amb l\'administrador.';
$lang['regbadpass'] = 'Les dues contrasenyes no són iguals. Torneu a intentar-ho.';
@ -76,6 +83,12 @@ $lang['profna'] = 'Aquest wiki no permet modificar el perfil';
$lang['profnochange'] = 'No heu introduït cap canvi.';
$lang['profnoempty'] = 'No es pot deixar en blanc el nom o l\'adreça de correu.';
$lang['profchanged'] = 'El perfil d\'usuari s\'ha actualitzat correctament.';
$lang['profnodelete'] = 'Aquesta wiki no permet esborrar usuaris';
$lang['profdeleteuser'] = 'Esborrar compte';
$lang['profdeleted'] = 'El vostre compte ha sigut esborrat d\'aquest compte';
$lang['profconfdelete'] = 'Vull esmorrar el meu compte d\'aquesta wiki. </br> Aquesta acció no pot desfer-se.';
$lang['profconfdeletemissing'] = 'Confirmació no acceptada';
$lang['proffail'] = 'Perfil d\'usuari no actialitzat';
$lang['pwdforget'] = 'Heu oblidat la contrasenya? Podeu obtenir-ne una de nova.';
$lang['resendna'] = 'Aquest wiki no permet tornar a enviar la contrasenya.';
$lang['resendpwd'] = 'Estableix una nova contrasenya per';
@ -140,7 +153,6 @@ $lang['js']['media_overwrt'] = 'Sobreescriu els arxius existents';
$lang['rssfailed'] = 'S\'ha produït un error en recollir aquesta alimentació: ';
$lang['nothingfound'] = 'No s\'ha trobat res.';
$lang['mediaselect'] = 'Selecció de fitxers';
$lang['fileupload'] = 'Càrrega de fitxers';
$lang['uploadsucc'] = 'S\'ha penjat el fitxer';
$lang['uploadfail'] = 'No es pot penjar el fitxer. Potser no teniu prou permisos?';
$lang['uploadwrong'] = 'No es pot penjar el fitxer. Aquesta extensió està prohibida.';
@ -174,6 +186,9 @@ $lang['difflink'] = 'Enllaç a la visualització de la comparació'
$lang['diff_type'] = 'Veieu les diferències:';
$lang['diff_inline'] = 'En línia';
$lang['diff_side'] = 'Un al costat de l\'altre';
$lang['diffprevrev'] = 'Revisió prèvia';
$lang['diffnextrev'] = 'Següent revisió';
$lang['difflastrev'] = 'Ultima revisió';
$lang['line'] = 'Línia';
$lang['breadcrumb'] = 'Camí:';
$lang['youarehere'] = 'Sou aquí:';
@ -194,6 +209,7 @@ $lang['skip_to_content'] = 'salta al contingut';
$lang['sidebar'] = 'Barra lateral';
$lang['mail_newpage'] = 'pàgina afegida:';
$lang['mail_changed'] = 'pàgina modificada:';
$lang['mail_subscribe_list'] = 'pagines canviades a l0espai de noms:';
$lang['mail_new_user'] = 'nou usuari:';
$lang['mail_upload'] = 'fitxer penjat:';
$lang['changes_type'] = 'Veure els canvis de';
@ -225,11 +241,9 @@ $lang['qb_sig'] = 'Insereix signatura';
$lang['qb_smileys'] = 'Emoticones';
$lang['qb_chars'] = 'Caràcters especials';
$lang['upperns'] = 'Salta a l\'espai superior';
$lang['admin_register'] = 'Afegeix nou usuari';
$lang['metaedit'] = 'Edita metadades';
$lang['metasaveerr'] = 'No s\'han pogut escriure les metadades';
$lang['metasaveok'] = 'S\'han desat les metadades';
$lang['btn_img_backto'] = 'Torna a %s';
$lang['img_title'] = 'Títol:';
$lang['img_caption'] = 'Peu d\'imatge:';
$lang['img_date'] = 'Data:';
@ -259,7 +273,6 @@ $lang['subscr_style_every'] = 'Envia\'m un correu electrònic per a cada canv
$lang['subscr_style_digest'] = 'Envia\'m un correu electrònic amb un resum dels canvis per a cada pàgina (cada %.2f dies)';
$lang['subscr_style_list'] = 'llistat de pàgines canviades des de l\'últim correu electrònic (cada %.2f dies)';
$lang['authtempfail'] = 'L\'autenticació d\'usuaris no està disponible temporalment. Si aquesta situació persisteix, si us plau informeu els administradors del wiki.';
$lang['authpwdexpire'] = 'La vostra contrasenya caducarà en %d dies, l\'hauríeu de canviar aviat.';
$lang['i_chooselang'] = 'Trieu l\'idioma';
$lang['i_installer'] = 'Instal·lador de DokuWiki';
$lang['i_wikiname'] = 'Nom del wiki';
@ -274,14 +287,18 @@ $lang['i_confexists'] = '<code>%s</code> ja existeix';
$lang['i_writeerr'] = 'No es pot crear <code>%s</code>. Comproveu els permisos del directori i/o del fitxer i creeu el fitxer manualment.';
$lang['i_badhash'] = 'dokuwiki.php no reconegut o modificat (hash=<code>%s</code>)';
$lang['i_badval'] = '<code>%s</code> - valor il·legal o buit';
$lang['i_success'] = 'La configuració s\'ha acabat amb èxit. Ara podeu suprimir el fitxer install.php. Aneu al vostre nou <a href="doku.php">DokuWiki</a>.';
$lang['i_failure'] = 'S\'han produït alguns errors en escriure els fitxers de configuració. Potser caldrà que els arregleu manualment abans d\'utilitzar el vostre nou <a href="doku.php">DokuWiki</a>.';
$lang['i_success'] = 'La configuració s\'ha acabat amb èxit. Ara podeu suprimir el fitxer install.php. Aneu al <a href="doku.php?id=wiki:welcome">vostre nou DokuWiki</a>.';
$lang['i_failure'] = 'S\'han produït alguns errors en escriure els fitxers de configuració. Potser caldrà que els arregleu manualment abans d\'utilitzar el <a href="doku.php?id=wiki:welcome">vostre nou DokuWiki</a>.';
$lang['i_policy'] = 'Política ACL inicial';
$lang['i_pol0'] = 'Wiki obert (tothom pot llegir, escriure i penjar fitxers)';
$lang['i_pol1'] = 'Wiki públic (tothom pot llegir, els usuaris registrats poden escriure i penjar fitxers)';
$lang['i_pol2'] = 'Wiki tancat (només els usuaris registrats poden llegir, escriure i penjar fitxers)';
$lang['i_allowreg'] = 'Permet d\'autoinscripció d\'usuaris';
$lang['i_retry'] = 'Reintenta';
$lang['i_license'] = 'Escolliu el tipus de llicència que voleu fer servir per al vostre contingut:';
$lang['i_license_none'] = 'No mostrar cap informació sobre llicencies';
$lang['i_pop_field'] = 'Si us plau, ajuda\'ns a millorar la DokuWiki';
$lang['i_pop_label'] = 'Una vegada al mes, enviar anònimament dades als programadors de la DokuWiki';
$lang['recent_global'] = 'Esteu veient els canvis recents de l\'espai <strong>%s</strong>. També podeu veure els <a href="%s">canvis recents de tot el wiki</a>.';
$lang['years'] = 'fa %d anys';
$lang['months'] = 'fa %d mesos';
@ -314,3 +331,6 @@ $lang['media_perm_read'] = 'No teniu permisos suficients per a llegir arxi
$lang['media_perm_upload'] = 'No teniu permisos suficients per a pujar arxius';
$lang['media_update'] = 'Puja la nova versió';
$lang['media_restore'] = 'Restaura aquesta versió';
$lang['currentns'] = 'Espai de noms actual';
$lang['searchresult'] = 'Resultats cerca';
$lang['plainhtml'] = 'HTML pla';

View file

@ -1,3 +1,3 @@
===== Gestió de les Subscripcions =====
Aquesta pàgina podeu gestiona les vostres subscripcions per a les pàgines i els espais actuals.
Des d'aquesta pàgina, podeu gestionar les vostres subscripcions per a les pàgines i els espais que seleccioneu.

View file

@ -1 +1 @@
===== Další pluginy =====
===== Další zásuvné moduly =====

View file

@ -19,6 +19,7 @@
* @author Radovan Buroň <radovan@buron.cz>
* @author Viktor Zavadil <vzavadil@newps.cz>
* @author Jaroslav Lichtblau <jlichtblau@seznam.cz>
* @author Turkislav <turkislav@blabla.com>
*/
$lang['encoding'] = 'utf-8';
$lang['direction'] = 'ltr';
@ -50,8 +51,7 @@ $lang['btn_update'] = 'Aktualizovat';
$lang['btn_delete'] = 'Vymazat';
$lang['btn_back'] = 'Zpět';
$lang['btn_backlink'] = 'Zpětné odkazy';
$lang['btn_backtomedia'] = 'Zpět do Výběru dokumentu';
$lang['btn_subscribe'] = 'Odebírat emailem změny stránky';
$lang['btn_subscribe'] = 'Odebírat e-mailem změny stránky';
$lang['btn_profile'] = 'Upravit profil';
$lang['btn_reset'] = 'Reset';
$lang['btn_resendpwd'] = 'Nastavit nové heslo';
@ -70,7 +70,7 @@ $lang['user'] = 'Uživatelské jméno';
$lang['pass'] = 'Heslo';
$lang['newpass'] = 'Nové heslo';
$lang['oldpass'] = 'Současné heslo';
$lang['passchk'] = 'ještě jednou';
$lang['passchk'] = 'Zopakovat';
$lang['remember'] = 'Přihlásit se nastálo';
$lang['fullname'] = 'Celé jméno';
$lang['email'] = 'E-mail';
@ -80,33 +80,35 @@ $lang['badpassconfirm'] = 'Bohužel špatné heslo';
$lang['minoredit'] = 'Drobné změny';
$lang['draftdate'] = 'Koncept automaticky uložen v';
$lang['nosecedit'] = 'Stránka byla v mezičase změněna. Informace o sekci již nebylo platné, byla načtena celá stránka.';
$lang['searchcreatepage'] = "Pokud jste nenašli, co hledáte, zkuste požadovanou stránku sami vytvořit stisknutím tlačítka ''Vytvořit stránku''.";
$lang['searchcreatepage'] = 'Pokud jste nenašli, co hledáte, zkuste požadovanou stránku sami vytvořit stisknutím tlačítka \'\'Vytvořit stránku\'\'.';
$lang['regmissing'] = 'Musíte vyplnit všechny údaje.';
$lang['reguexists'] = 'Uživatel se stejným jménem už je zaregistrován.';
$lang['regsuccess'] = 'Uživatelský účet byl vytvořen a heslo zasláno mailem.';
$lang['regsuccess'] = 'Uživatelský účet byl vytvořen a heslo zasláno e-mailem.';
$lang['regsuccess2'] = 'Uživatelský účet byl vytvořen.';
$lang['regfail'] = 'Uživatelský profil nemohl být vytvořen.';
$lang['regmailfail'] = 'Zdá se, že nastala chyba při posílání mailu s heslem. Zkuste kontaktovat správce.';
$lang['regbadmail'] = 'Zadaná mailová adresa není platná. Pokud si myslíte, že to je špatně, zkuste kontaktovat správce.';
$lang['regbadmail'] = 'Zadaná e-mailová adresa není platná. Pokud si myslíte, že to je špatně, zkuste kontaktovat správce.';
$lang['regbadpass'] = 'Heslo nebylo zadáno dvakrát stejně, zkuste to prosím znovu.';
$lang['regpwmail'] = 'Vaše heslo do systému DokuWiki';
$lang['reghere'] = 'Nemáte uživatelský účet? Zřiďte si ho';
$lang['profna'] = 'Tato wiki neumožňuje změnu profilu';
$lang['profnochange'] = 'Žádné změny nebyly provedeny.';
$lang['profnoempty'] = 'Nelze zadat prázdné jméno nebo mailová adresa.';
$lang['profnoempty'] = 'Nelze vynechat jméno nebo e-mailovou adresu.';
$lang['profchanged'] = 'Uživatelský profil změněn.';
$lang['profnodelete'] = 'Tato wiki nepodporuje mazání uživatelů';
$lang['profdeleteuser'] = 'Smazat účet';
$lang['profdeleted'] = 'Váš uživatelský účet byl z této wiki smazán';
$lang['profconfdelete'] = 'Chci smazat můj účet z této wiki. <br/> Tato akce je nevratná.';
$lang['profconfdeletemissing'] = 'Potvrzovací tlačítko nezaškrtnuto';
$lang['proffail'] = 'Uživatelský profil nebyl aktualizován.';
$lang['pwdforget'] = 'Zapomněli jste heslo? Nechte si zaslat nové';
$lang['resendna'] = 'Tato wiki neumožňuje zasílání nových hesel.';
$lang['resendpwd'] = 'Nastavit nové heslo pro';
$lang['resendpwdmissing'] = 'Musíte vyplnit všechny položky.';
$lang['resendpwdnouser'] = 'Bohužel takový uživatel v systému není.';
$lang['resendpwdbadauth'] = 'Autorizační kód není platný. Zadali jste opravdu celý odkaz na potvrzovací stránku?';
$lang['resendpwdconfirm'] = 'Odkaz na potvrzovací stránku byl odeslán mailem.';
$lang['resendpwdsuccess'] = 'Vaše nové heslo bylo odesláno emailem.';
$lang['resendpwdconfirm'] = 'Odkaz na potvrzovací stránku byl odeslán e-mailem.';
$lang['resendpwdsuccess'] = 'Vaše nové heslo bylo odesláno e-mailem.';
$lang['license'] = 'Kromě míst, kde je explicitně uvedeno jinak, je obsah této wiki licencován pod následující licencí:';
$lang['licenseok'] = 'Poznámka: Tím, že editujete tuto stránku, souhlasíte, aby váš obsah byl licencován pod následující licencí:';
$lang['searchmedia'] = 'Hledat jméno souboru:';
@ -163,7 +165,6 @@ $lang['js']['media_overwrt'] = 'Přepsat existující soubory';
$lang['rssfailed'] = 'Nastala chyba při vytváření tohoto RSS: ';
$lang['nothingfound'] = 'Nic nenalezeno.';
$lang['mediaselect'] = 'Výběr dokumentu';
$lang['fileupload'] = 'Načtení dokumentu';
$lang['uploadsucc'] = 'Přenos proběhl v pořádku';
$lang['uploadfail'] = 'Chyba při načítání. Možná kvůli špatně nastaveným právům?';
$lang['uploadwrong'] = 'Načtení souboru s takovouto příponou není dovoleno.';
@ -200,6 +201,8 @@ $lang['diff_side'] = 'Přidané';
$lang['diffprevrev'] = 'Předchozí verze';
$lang['diffnextrev'] = 'Následující verze';
$lang['difflastrev'] = 'Poslední revize';
$lang['diffbothprevrev'] = 'Obě strany předchozí revize';
$lang['diffbothnextrev'] = 'Obě strany příští revize';
$lang['line'] = 'Řádek';
$lang['breadcrumb'] = 'Historie:';
$lang['youarehere'] = 'Umístění:';
@ -252,7 +255,6 @@ $lang['qb_sig'] = 'Vložit podpis';
$lang['qb_smileys'] = 'Emotikony';
$lang['qb_chars'] = 'Speciální znaky';
$lang['upperns'] = 'skočit do nadřazeného jmenného prostoru';
$lang['admin_register'] = 'Přidat nového uživatele';
$lang['metaedit'] = 'Upravit Metadata';
$lang['metasaveerr'] = 'Chyba při zápisu metadat';
$lang['metasaveok'] = 'Metadata uložena';
@ -276,16 +278,15 @@ $lang['subscr_unsubscribe_error'] = 'Došlo k chybě při odhlašování %s ze s
$lang['subscr_already_subscribed'] = '%s již je přihlášen do seznamu odběratelů %s';
$lang['subscr_not_subscribed'] = '%s není přihlášen do seznamu odběratelů %s';
$lang['subscr_m_not_subscribed'] = 'V současné době neodebíráte změny na aktuální stránce nebo ve jmenném prostoru.';
$lang['subscr_m_new_header'] = 'Přihlásit k odebírání změn emailem';
$lang['subscr_m_new_header'] = 'Přihlásit k odebírání změn e-mailem';
$lang['subscr_m_current_header'] = 'Aktuální odběratelé změn';
$lang['subscr_m_unsubscribe'] = 'Odhlásit z odběru změn emailem';
$lang['subscr_m_subscribe'] = 'Přihlásit se k odběru změn emailem';
$lang['subscr_m_unsubscribe'] = 'Odhlásit z odběru změn e-mailem';
$lang['subscr_m_subscribe'] = 'Přihlásit se k odběru změn e-mailem';
$lang['subscr_m_receive'] = 'Přejete si dostávat';
$lang['subscr_style_every'] = 'email pro každou změnu';
$lang['subscr_style_digest'] = 'souhrnný email změn pro každou stránku (každé %.2f dny/dní)';
$lang['subscr_style_list'] = 'seznam změněných stránek od posledního emailu (každé %.2f dny/dní)';
$lang['subscr_style_every'] = 'e-mail pro každou změnu';
$lang['subscr_style_digest'] = 'souhrnný e-mail změn pro každou stránku (každé %.2f dny/dní)';
$lang['subscr_style_list'] = 'seznam změněných stránek od posledního e-mailu (každé %.2f dny/dní)';
$lang['authtempfail'] = 'Autentizace uživatelů je dočasně nedostupná. Pokud tento problém přetrvává, informujte prosím správce této wiki.';
$lang['authpwdexpire'] = 'Platnost vašeho hesla vyprší za %d dní, měli byste ho změnit co nejdříve.';
$lang['i_chooselang'] = 'Vyberte si jazyk';
$lang['i_installer'] = 'Instalace DokuWiki';
$lang['i_wikiname'] = 'Název wiki';
@ -295,6 +296,7 @@ $lang['i_problems'] = 'Instalátor narazil na níže popsané problé
$lang['i_modified'] = 'Instalátor bude z bezpečnostních důvodů pracovat pouze s čistou a ještě neupravenou instalací DokuWiki. Buď znovu rozbalte soubory z instalačního balíčku, nebo zkuste prostudovat <a href="http://dokuwiki.org/install">instrukce pro instalaci DokuWiki</a>.';
$lang['i_funcna'] = 'PHP funkce <code>%s</code> není dostupná. Váš webhosting ji možná z nějakého důvodu vypnul.';
$lang['i_phpver'] = 'Verze vaší instalace PHP <code>%s</code> je nižší než požadovaná <code>%s</code>. Budete muset aktualizovat svou instalaci PHP.';
$lang['i_mbfuncoverload'] = 'mbstring.func_overload musí být vypnut v php.ini pro běh DokuWiki.';
$lang['i_permfail'] = 'DokuWiki nemůže zapisovat do <code>%s</code>. Budete muset opravit práva k tomuto adresáři.';
$lang['i_confexists'] = '<code>%s</code> již existuje';
$lang['i_writeerr'] = 'Nelze vytvořit <code>%s</code>. Budete muset zkontrolovat práva k souborům či adresářům a vytvořit tento soubor ručně.';
@ -344,7 +346,10 @@ $lang['media_perm_read'] = 'Bohužel, nemáte práva číst soubory.';
$lang['media_perm_upload'] = 'Bohužel, nemáte práva nahrávat soubory.';
$lang['media_update'] = 'Nahrát novou verzi';
$lang['media_restore'] = 'Obnovit tuto verzi';
$lang['media_acl_warning'] = 'Tento seznam nemusí být úplný z důvodu omezení práv ACL a skrytým stránkám.';
$lang['currentns'] = 'Aktuální jmenný prostor';
$lang['searchresult'] = 'Výsledek hledání';
$lang['plainhtml'] = 'Čisté HTML';
$lang['wikimarkup'] = 'Wiki jazyk';
$lang['page_nonexist_rev'] = 'Stránka neexistovala na %s. Byla vytvořena dodatečne na <a href="%s">%s</a>.';
$lang['unable_to_parse_date'] = 'Nelze rozebrat parametr "%s".';

View file

@ -13,5 +13,5 @@ Uživatel : @USER@
--
Tento email byl automaticky vygenerován systémem DokuWiki
Tento e-mail byl automaticky vygenerován systémem DokuWiki
@DOKUWIKIURL@

View file

@ -1,4 +1,4 @@
Dobrý den,
Dobrý den!
Zde jsou přihlašovací informace pro wiki @TITLE@ (@DOKUWIKIURL@)
@ -7,5 +7,5 @@ Uživatelské jméno : @LOGIN@
Heslo : @PASSWORD@
--
Tento email byl automaticky vygenerován systémem DokuWiki
Tento e-mail byl automaticky vygenerován systémem DokuWiki
@DOKUWIKIURL@

View file

@ -1,13 +1,13 @@
Dobrý den,
Dobrý den!
Někdo požádal o nové heslo k vašemu uživatelskému účtu na wiki @TITLE@ (@DOKUWIKIURL@)
Pokud jste o nové heslo nežádali, ignorujte prosím tento email.
Pokud jste o nové heslo nežádali, ignorujte prosím tento e-mail.
Pro potvrzení, že jste tento požadavek poslali opravdu vy, prosím otevřete následující odkaz.
@CONFIRM@
--
Tento email byl automaticky vygenerován systémem DokuWiki
Tento e-mail byl automaticky vygenerován systémem DokuWiki
@DOKUWIKIURL@

View file

@ -10,5 +10,5 @@ IP adresa : @IPADDRESS@
Hostitel : @HOSTNAME@
--
Tento email byl automaticky vygenerován systémem DokuWiki
Tento e-mail byl automaticky vygenerován systémem DokuWiki
@DOKUWIKIURL@

View file

@ -1,3 +1,3 @@
====== Zaslat nové heslo ======
Abyste získali nové heslo k vašemu učtu v této wiki, vyplňte všechny níže uvedené informace . Vaše nové heslo bude zasláno na emailovou adresu, kterou jste zadali při registraci. Uživatelské jméno by mělo být stejné jako vaše uživatelské jméno, s nímž se přihlašujete do této wiki.
Abyste získali nové heslo ke svému účtu v této wiki, vyplňte všechny níže uvedené informace. Nové heslo bude zasláno na e-mailovou adresu, kterou jste zadali při registraci. Uživatelské jméno by mělo být stejné jako vaše uživatelské jméno, s nímž se přihlašujete do této wiki.

View file

@ -11,12 +11,12 @@ Stará revize: @OLDPAGE@
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
se prosím přihlašte do wiki na adrese
@DOKUWIKIURL@, pak navštivte
@SUBSCRIBE@
a odhlaště se z odebírání změn na stránce či
a odhlaste se z odebírání změn na stránce či
ve jmenném prostoru.
--
Tento email byl automaticky vygenerován systémem DokuWiki
Tento e-mail byl automaticky vygenerován systémem DokuWiki
@DOKUWIKIURL@

View file

@ -11,9 +11,9 @@ Pro odhlášení z odebírání změn
se prosím příhlašte do wiki na adrese
@DOKUWIKIURL@, pak navštivte
@SUBSCRIBE@
a odhlaště se z odebírání změn na stránce či
a odhlaste se z odebírání změn na stránce či
ve jmenném prostoru.
--
Tento email byl automaticky vygenerován systémem DokuWiki
Tento e-mail byl automaticky vygenerován systémem DokuWiki
@DOKUWIKIURL@

View file

@ -14,12 +14,12 @@ Stará revize: @OLDPAGE@
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
se prosím přihlašte do wiki na adrese
@DOKUWIKIURL@, pak navštivte
@SUBSCRIBE@
a odhlaště se z odebírání změn na stránce či
a odhlaste se z odebírání změn na stránce či
ve jmenném prostoru.
--
Tento email byl automaticky vygenerován systémem DokuWiki
Tento e-mail byl automaticky vygenerován systémem DokuWiki
@DOKUWIKIURL@

View file

@ -1,4 +1,4 @@
Do vaší DokuWiki byl nahrán nový dokument. Tady jsou detaily:
Do DokuWiki byl nahrán nový dokument. Tady jsou detaily:
Soubor : @MEDIA@
Datum : @DATE@
@ -10,5 +10,5 @@ MIME typ : @MIME@
Uživatel : @USER@
--
Tento email byl automaticky vygenerován systémem DokuWiki
Tento e-mail byl automaticky vygenerován systémem DokuWiki
@DOKUWIKIURL@

View file

@ -1,3 +1,3 @@
====== Adgang nægtet! ======
====== Adgang nægtet ======
Du har ikke rettigheder til at fortsætte.

View file

@ -17,6 +17,9 @@
* @author Soren Birk <soer9648@hotmail.com>
* @author Jens Hyllegaard <jens.hyllegaard@gmail.com>
* @author soer9648 <soer9648@eucl.dk>
* @author Søren Birk <sbi@eucl.dk>
* @author Søren Birk <soer9648@eucl.dk>
* @author Jacob Palm <mail@jacobpalm.dk>
*/
$lang['encoding'] = 'utf-8';
$lang['direction'] = 'ltr';
@ -48,7 +51,6 @@ $lang['btn_update'] = 'Opdatér';
$lang['btn_delete'] = 'Slet';
$lang['btn_back'] = 'Tilbage';
$lang['btn_backlink'] = 'Henvisninger bagud';
$lang['btn_backtomedia'] = 'Tilbage til valg af mediefil';
$lang['btn_subscribe'] = 'Abonnér på ændringer';
$lang['btn_profile'] = 'Opdatér profil';
$lang['btn_reset'] = 'Nulstil';
@ -56,11 +58,13 @@ $lang['btn_resendpwd'] = 'Vælg ny adgangskode';
$lang['btn_draft'] = 'Redigér kladde';
$lang['btn_recover'] = 'Gendan kladde';
$lang['btn_draftdel'] = 'Slet kladde';
$lang['btn_revert'] = 'Reetablér';
$lang['btn_revert'] = 'Gendan';
$lang['btn_register'] = 'Registrér';
$lang['btn_apply'] = 'Anvend';
$lang['btn_media'] = 'Media Manager';
$lang['btn_deleteuser'] = 'Fjern Min Konto';
$lang['btn_img_backto'] = 'Tilbage til %s';
$lang['btn_mediaManager'] = 'Vis i Media Manager';
$lang['loggedinas'] = 'Logget ind som:';
$lang['user'] = 'Brugernavn';
$lang['pass'] = 'Adgangskode';
@ -72,11 +76,11 @@ $lang['fullname'] = 'Fulde navn';
$lang['email'] = 'E-mail';
$lang['profile'] = 'Brugerprofil';
$lang['badlogin'] = 'Brugernavn eller adgangskode var forkert.';
$lang['badpassconfirm'] = 'Kodeordet var desværre forkert';
$lang['badpassconfirm'] = 'Adgangkode var desværre forkert';
$lang['minoredit'] = 'Mindre ændringer';
$lang['draftdate'] = 'Kladde automatisk gemt d.';
$lang['nosecedit'] = 'Siden blev ændret i mellemtiden, sektions information var for gammel, hentede hele siden i stedet.';
$lang['searchcreatepage'] = "Hvis resultaterne ikke indeholder det du søgte efter kan du oprette et nyt dokument med samme navn som søgningen ved at trykke på knappen **''[Opret dette dokument]''**.";
$lang['searchcreatepage'] = 'Hvis resultaterne ikke indeholder det du søgte efter kan du oprette et nyt dokument med samme navn som søgningen ved at trykke på knappen **\'\'[Opret dette dokument]\'\'**.';
$lang['regmissing'] = 'Du skal udfylde alle felter.';
$lang['reguexists'] = 'Dette brugernavn er allerede i brug.';
$lang['regsuccess'] = 'Du er nu oprettet som bruger. Dit adgangskode bliver sendt til dig i en e-mail.';
@ -84,26 +88,26 @@ $lang['regsuccess2'] = 'Du er nu oprettet som bruger.';
$lang['regmailfail'] = 'Dit adgangskode blev ikke sendt. Kontakt venligst administratoren.';
$lang['regbadmail'] = 'E-mail-adressen er ugyldig. Kontakt venligst administratoren, hvis du mener dette er en fejl.';
$lang['regbadpass'] = 'De to adgangskoder er ikke ens, vær venlig at prøve igen.';
$lang['regpwmail'] = 'Dit DokuWiki password';
$lang['regpwmail'] = 'Dit adgangskode til DokuWiki';
$lang['reghere'] = 'Opret en DokuWiki-konto her';
$lang['profna'] = 'Denne wiki understøtter ikke ændring af profiler';
$lang['profnochange'] = 'Ingen ændringer, intet modificeret.';
$lang['profnoempty'] = 'Tomt navn eller e-mail adresse er ikke tilladt.';
$lang['profchanged'] = 'Brugerprofil opdateret korrekt.';
$lang['profnodelete'] = 'Denne wiki supporterer ikke sletning af brugere';
$lang['profdeleteuser'] = 'Slet Konto';
$lang['profnodelete'] = 'Denne wiki understøtter ikke sletning af brugere';
$lang['profdeleteuser'] = 'Slet konto';
$lang['profdeleted'] = 'Din brugerkonto er blevet slettet fra denne wiki';
$lang['profconfdelete'] = 'Jeg ønsker at slette min konto fra denne wiki. <br/> Denne handling kan ikke fortrydes.';
$lang['pwdforget'] = 'Har du glemt dit adgangskode? Få et nyt';
$lang['resendna'] = 'Denne wiki understøtter ikke udsendelse af nyt adgangskode.';
$lang['resendpwd'] = 'Vælg ny adgangskode for';
$lang['pwdforget'] = 'Har du glemt dit adgangskode? Få en ny';
$lang['resendna'] = 'Denne wiki understøtter ikke udsendelse af ny adgangskode.';
$lang['resendpwd'] = 'Vælg en ny adgangskode for';
$lang['resendpwdmissing'] = 'Du skal udfylde alle felter.';
$lang['resendpwdnouser'] = 'Vi kan ikke finde denne bruger i vores database.';
$lang['resendpwdbadauth'] = 'Beklager, denne autoriseringskode er ikke gyldig. Kontroller venligst at du benyttede det fulde link til bekræftelse.';
$lang['resendpwdconfirm'] = 'Et henvisning med bekræftelse er blevet sendt med email.';
$lang['resendpwdsuccess'] = 'Dit nye adgangskode er blevet sendt med e-mail.';
$lang['license'] = 'Med mindre andet angivet, vil indhold på denne wiki blive frigjort under følgende licens:';
$lang['licenseok'] = 'Note: ved at ændre denne side, acceptere du at dit indhold bliver frigivet under følgende licens:';
$lang['resendpwdconfirm'] = 'En e-mail med et link til bekræftelse er blevet sendt.';
$lang['resendpwdsuccess'] = 'Din nye adgangskode er blevet sendt med e-mail.';
$lang['license'] = 'Med mindre andet angivet, vil indhold på denne wiki blive udgivet under følgende licens:';
$lang['licenseok'] = 'Bemærk - ved at redigere denne side, accepterer du at dit indhold bliver frigivet under følgende licens:';
$lang['searchmedia'] = 'Søg filnavn';
$lang['searchmedia_in'] = 'Søg i %s';
$lang['txt_upload'] = 'Vælg den fil der skal overføres:';
@ -113,75 +117,75 @@ $lang['maxuploadsize'] = 'Upload max. %s pr. fil.';
$lang['lockedby'] = 'Midlertidig låst af:';
$lang['lockexpire'] = 'Lås udløber kl:.';
$lang['js']['willexpire'] = 'Din lås på dette dokument udløber om et minut.\nTryk på Forhåndsvisning-knappen for at undgå konflikter.';
$lang['js']['notsavedyet'] = 'Ugemte ændringer vil blive mistet
$lang['js']['notsavedyet'] = 'Ugemte ændringer vil blive mistet.
Fortsæt alligevel?';
$lang['js']['searchmedia'] = 'Søg efter filer';
$lang['js']['keepopen'] = 'Hold vindue åbent ved valg';
$lang['js']['hidedetails'] = 'Skjul detaljer';
$lang['js']['mediatitle'] = 'Link indstillinger';
$lang['js']['mediadisplay'] = 'Link type';
$lang['js']['mediaalign'] = 'Juster';
$lang['js']['mediaalign'] = 'Justering';
$lang['js']['mediasize'] = 'Billede størrelse';
$lang['js']['mediatarget'] = 'Link mål';
$lang['js']['mediatarget'] = 'Link destination';
$lang['js']['mediaclose'] = 'Luk';
$lang['js']['mediainsert'] = 'Indsæt';
$lang['js']['mediadisplayimg'] = 'Vis billedet';
$lang['js']['mediadisplaylnk'] = 'Vis kun linket';
$lang['js']['mediasmall'] = 'Lille version';
$lang['js']['mediamedium'] = 'Medium version';
$lang['js']['mediamedium'] = 'Mellem version';
$lang['js']['medialarge'] = 'Stor version';
$lang['js']['mediaoriginal'] = 'Original version';
$lang['js']['medialnk'] = 'Link til detajle side';
$lang['js']['mediadirect'] = 'Direkte link til originalen';
$lang['js']['medianolnk'] = 'Intet link';
$lang['js']['medianolink'] = 'Link ikke billedet';
$lang['js']['medianolink'] = 'Link ikke til billedet';
$lang['js']['medialeft'] = 'Juster billedet til venstre';
$lang['js']['mediaright'] = 'Juster billedet til højre';
$lang['js']['mediacenter'] = 'Centreret';
$lang['js']['medianoalign'] = 'Brug ingen justering';
$lang['js']['nosmblinks'] = 'Henvisninger til Windows shares virker kun i Microsoft Internet Explorer.
Du kan stadig kopiere og indsætte linket.';
$lang['js']['linkwiz'] = 'guiden til henvisninger';
$lang['js']['linkto'] = 'Henvise til:';
$lang['js']['linkwiz'] = 'Guiden til henvisninger';
$lang['js']['linkto'] = 'Henvis til:';
$lang['js']['del_confirm'] = 'Slet valgte post(er)?';
$lang['js']['restore_confirm'] = 'Vil du virkeligt genskabe denne version?';
$lang['js']['restore_confirm'] = 'Er du sikker på at du vil genskabe denne version?';
$lang['js']['media_diff'] = 'Vis forskelle:';
$lang['js']['media_diff_both'] = 'Side ved Side';
$lang['js']['media_diff_opacity'] = 'Skin-igennem';
$lang['js']['media_diff_opacity'] = 'Skin igennem';
$lang['js']['media_diff_portions'] = 'Skub';
$lang['js']['media_select'] = 'Vælg filer...';
$lang['js']['media_upload_btn'] = 'Upload';
$lang['js']['media_upload_btn'] = 'Overfør';
$lang['js']['media_done_btn'] = 'Færdig';
$lang['js']['media_drop'] = 'Drop filer her for at uploade';
$lang['js']['media_drop'] = 'Træk filer hertil for at overføre';
$lang['js']['media_cancel'] = 'fjern';
$lang['js']['media_overwrt'] = 'Overskriv eksisterende filer';
$lang['rssfailed'] = 'Der opstod en fejl ved indhentning af: ';
$lang['rssfailed'] = 'Der opstod en fejl ved hentning af dette feed: ';
$lang['nothingfound'] = 'Søgningen gav intet resultat.';
$lang['mediaselect'] = 'Vælg mediefil';
$lang['fileupload'] = 'Overføre mediefil';
$lang['uploadsucc'] = 'Overførelse var en succes';
$lang['uploadfail'] = 'Overførelse fejlede. Der er muligvis problemer med rettighederne.';
$lang['uploadwrong'] = 'Overførelse afvist. Filtypen er ikke tilladt.';
$lang['uploadsucc'] = 'Overførels blev fuldført';
$lang['uploadfail'] = 'Overførslen fejlede. Der er muligvis problemer med rettighederne.';
$lang['uploadwrong'] = 'Overførslen blev afvist. Filtypen er ikke tilladt.';
$lang['uploadexist'] = 'Filen eksisterer allerede.';
$lang['uploadbadcontent'] = 'Overføret indhold tilsvaret ikke til %s fil-endelsen.';
$lang['uploadbadcontent'] = 'Det overført indhold svarer ikke til %s fil-endelsen.';
$lang['uploadspam'] = 'Overførelsen blev blokeret af spam sortlisten.';
$lang['uploadxss'] = 'Overførelsen blev blokeret på grund af mulig skadeligt indhold.';
$lang['uploadsize'] = 'Den overføret fil var for stor (max. %s)';
$lang['uploadsize'] = 'Den overførte fil var for stor (maksimal størrelse %s)';
$lang['deletesucc'] = 'Filen "%s" er blevet slettet.';
$lang['deletefail'] = '"%s" kunne ikke slettes - check rettighederne.';
$lang['mediainuse'] = 'Filen "%s" er ikke slettet - den er stadig i brug.';
$lang['deletefail'] = '"%s" kunne ikke slettes - kontroller rettighederne.';
$lang['mediainuse'] = 'Filen "%s" kan ikke slettes - den er stadig i brug.';
$lang['namespaces'] = 'Navnerum';
$lang['mediafiles'] = 'Tilgængelige filer i';
$lang['accessdenied'] = 'Du har ikke tilladelse til at se denne side';
$lang['accessdenied'] = 'Du har ikke tilladelse til at se denne side.';
$lang['mediausage'] = 'Brug den følgende syntaks til at henvise til denne fil:';
$lang['mediaview'] = 'Vis oprindelig fil';
$lang['mediaroot'] = 'rod';
$lang['mediaupload'] = 'Overføre en fil til det nuværende navnerum her. For at oprette under-navnerum, tilføj dem til "Overføre som" filnavnet, adskilt af kolontegn.';
$lang['mediaextchange'] = 'Filudvidelse ændret fra .%s til .%s!';
$lang['mediaextchange'] = 'Filtype ændret fra .%s til .%s!';
$lang['reference'] = 'Henvisning til';
$lang['ref_inuse'] = 'Filen kan ikke slettes, da den stadig er i brug på følgende sider:';
$lang['ref_hidden'] = 'Nogle henvisninger er i dokumenter du ikke har læserettigheder til';
$lang['ref_hidden'] = 'Nogle henvisninger er på sider du ikke har læserettigheder til';
$lang['hits'] = 'Besøg';
$lang['quickhits'] = 'Tilsvarende dokumentnavne';
$lang['quickhits'] = 'Tilsvarende sidenavne';
$lang['toc'] = 'Indholdsfortegnelse';
$lang['current'] = 'nuværende';
$lang['yours'] = 'Din version';
@ -190,7 +194,12 @@ $lang['diff2'] = 'Vis forskelle i forhold til de valgte revision
$lang['difflink'] = 'Link til denne sammenlinings vising';
$lang['diff_type'] = 'Vis forskelle:';
$lang['diff_inline'] = 'Indeni';
$lang['diff_side'] = 'Side ved Side';
$lang['diff_side'] = 'Side ved side';
$lang['diffprevrev'] = 'Forrige revision';
$lang['diffnextrev'] = 'Næste revision';
$lang['difflastrev'] = 'Sidste revision';
$lang['diffbothprevrev'] = 'Begge sider forrige revision';
$lang['diffbothnextrev'] = 'Begge sider næste revision';
$lang['line'] = 'Linje';
$lang['breadcrumb'] = 'Sti:';
$lang['youarehere'] = 'Du er her:';
@ -198,26 +207,26 @@ $lang['lastmod'] = 'Sidst ændret:';
$lang['by'] = 'af';
$lang['deleted'] = 'slettet';
$lang['created'] = 'oprettet';
$lang['restored'] = 'gammel udgave reetableret (%s)';
$lang['restored'] = 'gammel udgave gendannet (%s)';
$lang['external_edit'] = 'ekstern redigering';
$lang['summary'] = 'Redigerings resumé';
$lang['noflash'] = 'Den <a href="http://www.adobe.com/products/flashplayer/">Adobe Flash Plugin</a> er nødvendig til at vise denne indehold.';
$lang['download'] = 'Hente kodestykke';
$lang['summary'] = 'Resumé af ændrigner';
$lang['noflash'] = 'Du skal installere <a href="http://www.adobe.com/products/flashplayer/">Adobe Flash Player</a> for at kunne se dette indhold.';
$lang['download'] = 'Hent kodestykke';
$lang['tools'] = 'Værktøjer';
$lang['user_tools'] = 'Brugerværktøjer';
$lang['site_tools'] = 'Webstedsværktøjer';
$lang['page_tools'] = 'Sideværktøjer';
$lang['skip_to_content'] = 'hop til indhold';
$lang['sidebar'] = 'Sidebjælke';
$lang['mail_newpage'] = 'dokument tilføjet:';
$lang['mail_changed'] = 'dokument ændret:';
$lang['mail_subscribe_list'] = 'sider ændret i navnerum';
$lang['mail_newpage'] = 'side tilføjet:';
$lang['mail_changed'] = 'side ændret:';
$lang['mail_subscribe_list'] = 'sider ændret i navnerum:';
$lang['mail_new_user'] = 'Ny bruger';
$lang['mail_upload'] = 'fil overføret:';
$lang['mail_upload'] = 'fil overført:';
$lang['changes_type'] = 'Vis ændringer af';
$lang['pages_changes'] = 'Sider';
$lang['media_changes'] = 'Media filer';
$lang['both_changes'] = 'Både sider og media filer';
$lang['media_changes'] = 'Mediefiler';
$lang['both_changes'] = 'Både sider og medie filer';
$lang['qb_bold'] = 'Fed';
$lang['qb_italic'] = 'Kursiv';
$lang['qb_underl'] = 'Understregning';
@ -229,7 +238,7 @@ $lang['qb_h3'] = 'Niveau 3 overskrift';
$lang['qb_h4'] = 'Niveau 4 overskrift';
$lang['qb_h5'] = 'Niveau 5 overskrift';
$lang['qb_h'] = 'Overskrift';
$lang['qb_hs'] = 'Vælg overskriften';
$lang['qb_hs'] = 'Vælg overskrift';
$lang['qb_hplus'] = 'Højere overskriftsniveau';
$lang['qb_hminus'] = 'Lavere overskriftsniveau';
$lang['qb_hequal'] = 'Samme overskriftsniveau';
@ -237,17 +246,15 @@ $lang['qb_link'] = 'Intern henvisning';
$lang['qb_extlink'] = 'Ekstern henvisning';
$lang['qb_hr'] = 'Vandret linje';
$lang['qb_ol'] = 'Nummereret liste';
$lang['qb_ul'] = 'Unummereret liste';
$lang['qb_ul'] = 'Punktopstilling';
$lang['qb_media'] = 'Tilføj billeder og andre filer';
$lang['qb_sig'] = 'Indsæt signatur';
$lang['qb_smileys'] = 'Smileys';
$lang['qb_chars'] = 'Specialtegn';
$lang['upperns'] = 'Gå til overordnet navnerum';
$lang['admin_register'] = 'Tilføj ny bruger';
$lang['metaedit'] = 'Rediger metadata';
$lang['metasaveerr'] = 'Skrivning af metadata fejlede';
$lang['metasaveerr'] = 'Fejl under skrivning af metadata';
$lang['metasaveok'] = 'Metadata gemt';
$lang['btn_img_backto'] = 'Tilbage til %s';
$lang['img_title'] = 'Titel:';
$lang['img_caption'] = 'Billedtekst:';
$lang['img_date'] = 'Dato:';
@ -260,7 +267,6 @@ $lang['img_camera'] = 'Kamera:';
$lang['img_keywords'] = 'Emneord:';
$lang['img_width'] = 'Bredde:';
$lang['img_height'] = 'Højde:';
$lang['btn_mediaManager'] = 'Vis i Media Manager';
$lang['subscr_subscribe_success'] = 'Tilføjede %s til abonnement listen for %s';
$lang['subscr_subscribe_error'] = 'Fejl ved tilføjelse af %s til abonnement listen for %s';
$lang['subscr_subscribe_noaddress'] = 'Der er ikke nogen addresse forbundet til din bruger, så du kan ikke blive tilføjet til abonnement listen';
@ -278,7 +284,6 @@ $lang['subscr_style_every'] = 'email på hver ændring';
$lang['subscr_style_digest'] = 'opsummeringsmail med ændringer for hver side (hver %.2f dage)';
$lang['subscr_style_list'] = 'list af ændrede sider siden sidste email (hver %.2f dage)';
$lang['authtempfail'] = 'Brugervalidering er midlertidigt ude af drift. Hvis dette er vedvarende, kontakt venligst wikiens administrator.';
$lang['authpwdexpire'] = 'Din adgangskode vil udløbe om %d dage, du bør ændre det snart.';
$lang['i_chooselang'] = 'Vælg dit sprog';
$lang['i_installer'] = 'DokuWiki Installer';
$lang['i_wikiname'] = 'Wiki Navn';
@ -290,6 +295,7 @@ Du burde enten gen-udpakke filerne fra den hentede pakke eller tjekke den fuldst
<a href="http://dokuwiki.org/install">DokuWiki installations instruktioner</a>';
$lang['i_funcna'] = 'PHP funtionen <code>%s</code> er ikke tilgængelig. Måske har din udbyder slået det fra af en eller anden grund?';
$lang['i_phpver'] = 'Din PHP version <code>%s</code> er mindre en den nødvendige <code>%s</code>. Du er nød til at opgradere din PHP installation.';
$lang['i_mbfuncoverload'] = 'mbstring.func_overload skal være deaktiveret i php.ini for at køre DokuWiki.';
$lang['i_permfail'] = 'DokuWiki kan ikke skrive til <code>%s</code>. Du er nød til at rette tilladelses indstillingerne for denne mappe!';
$lang['i_confexists'] = '<code>%s</code> eksisterer allerede';
$lang['i_writeerr'] = 'Kunne ikke oprette <code>%s</code>. Du bliver nød til at tjekke mappe/fil- tilladelserne og oprette filen manuelt.';
@ -301,10 +307,12 @@ $lang['i_policy'] = 'Begyndende ACL politik';
$lang['i_pol0'] = 'Åben Wiki (alle kan læse, skrive og uploade)';
$lang['i_pol1'] = 'Offentlig Wiki (alle kan læse, kun registrerede brugere kan skrive og overføre)';
$lang['i_pol2'] = 'Lukket Wiki (kun for registerede brugere kan læse, skrive og overføre)';
$lang['i_allowreg'] = 'Tillad at brugere kan registrere sig selv';
$lang['i_retry'] = 'Forsøg igen';
$lang['i_license'] = 'Vælg venligst licensen du vil tilføje dit indhold under:';
$lang['i_license_none'] = 'Vis ikke licensinformationer';
$lang['i_pop_field'] = 'Hjælp os venligst med at forbedre oplevelsen af DokuWiki:';
$lang['i_pop_label'] = 'Send anonymt brugsdata til DokuWikis udviklere, én gang om måneden';
$lang['recent_global'] = 'Du ser lige nu ændringerne i <b>%s</b> navnerummet. Du kan også <a href="%s">se de sidste ændringer for hele wiki siden </a>';
$lang['years'] = '%d år siden';
$lang['months'] = '%d måned siden';
@ -337,3 +345,8 @@ $lang['media_perm_read'] = 'Du har ikke nok rettigheder til at læse filer
$lang['media_perm_upload'] = 'Du har ikke nok rettigheder til at uploade filer.';
$lang['media_update'] = 'Upload ny version';
$lang['media_restore'] = 'Genskab denne version';
$lang['currentns'] = 'Nuværende navnerum';
$lang['searchresult'] = 'Søgsresultat';
$lang['plainhtml'] = 'Ren HTML';
$lang['wikimarkup'] = 'Wiki Opmærkning';
$lang['page_nonexist_rev'] = 'Siden blev ikke fundet ved %s. Den blev efterfølgende oprettet ved <a href="%s">%s</a>.';

View file

@ -22,6 +22,7 @@
* @author Frank Loizzi <contact@software.bacal.de>
* @author Volker Bödker <volker@boedker.de>
* @author Janosch <janosch@moinzen.de>
* @author rnck <dokuwiki@rnck.de>
*/
$lang['encoding'] = 'utf-8';
$lang['direction'] = 'ltr';
@ -53,7 +54,6 @@ $lang['btn_update'] = 'Updaten';
$lang['btn_delete'] = 'Löschen';
$lang['btn_back'] = 'Zurück';
$lang['btn_backlink'] = 'Links hierher';
$lang['btn_backtomedia'] = 'Zurück zur Dateiauswahl';
$lang['btn_subscribe'] = 'Aboverwaltung';
$lang['btn_profile'] = 'Benutzerprofil';
$lang['btn_reset'] = 'Zurücksetzen';
@ -66,6 +66,8 @@ $lang['btn_register'] = 'Registrieren';
$lang['btn_apply'] = 'Übernehmen';
$lang['btn_media'] = 'Medien-Manager';
$lang['btn_deleteuser'] = 'Benutzerprofil löschen';
$lang['btn_img_backto'] = 'Zurück zu %s';
$lang['btn_mediaManager'] = 'Im Medien-Manager anzeigen';
$lang['loggedinas'] = 'Angemeldet als:';
$lang['user'] = 'Benutzername';
$lang['pass'] = 'Passwort';
@ -81,11 +83,12 @@ $lang['badpassconfirm'] = 'Das Passwort war falsch.';
$lang['minoredit'] = 'Kleine Änderung';
$lang['draftdate'] = 'Entwurf gespeichert am';
$lang['nosecedit'] = 'Diese Seite wurde in der Zwischenzeit geändert, da das Sektionsinfo veraltet ist. Die ganze Seite wird stattdessen geladen.';
$lang['searchcreatepage'] = "Falls der gesuchte Begriff nicht gefunden wurde, kannst du direkt eine neue Seite für den Suchbegriff anlegen, indem du auf den Knopf **''[Seite anlegen]''** drückst.";
$lang['searchcreatepage'] = 'Falls der gesuchte Begriff nicht gefunden wurde, kannst du direkt eine neue Seite für den Suchbegriff anlegen, indem du auf den Knopf **\'\'[Seite anlegen]\'\'** drückst.';
$lang['regmissing'] = 'Alle Felder müssen ausgefüllt werden';
$lang['reguexists'] = 'Der Benutzername existiert leider schon.';
$lang['regsuccess'] = 'Der neue Benutzer wurde angelegt und das Passwort per E-Mail versandt.';
$lang['regsuccess2'] = 'Der neue Benutzer wurde angelegt.';
$lang['regfail'] = 'Der Benutzer konnte nicht erstellt werden.';
$lang['regmailfail'] = 'Offenbar ist ein Fehler beim Versenden der Passwortmail aufgetreten. Bitte wende dich an den Wiki-Admin.';
$lang['regbadmail'] = 'Die angegebene Mail-Adresse scheint ungültig zu sein. Falls dies ein Fehler ist, wende dich bitte an den Wiki-Admin.';
$lang['regbadpass'] = 'Die beiden eingegeben Passwörter stimmen nicht überein. Bitte versuche es noch einmal.';
@ -100,6 +103,7 @@ $lang['profdeleteuser'] = 'Benutzerprofil löschen';
$lang['profdeleted'] = 'Dein Benutzerprofil wurde im Wiki gelöscht.';
$lang['profconfdelete'] = 'Ich möchte mein Benutzerprofil löschen.<br/> Diese Aktion ist nicht umkehrbar.';
$lang['profconfdeletemissing'] = 'Bestätigungs-Checkbox wurde nicht angehakt.';
$lang['proffail'] = 'Das Benutzerprofil wurde nicht aktualisiert.';
$lang['pwdforget'] = 'Passwort vergessen? Fordere ein neues an';
$lang['resendna'] = 'Passwörter versenden ist in diesem Wiki nicht möglich.';
$lang['resendpwd'] = 'Neues Passwort setzen für';
@ -162,7 +166,6 @@ $lang['js']['media_overwrt'] = 'Existierende Dateien überschreiben';
$lang['rssfailed'] = 'Es ist ein Fehler beim Laden des Feeds aufgetreten: ';
$lang['nothingfound'] = 'Nichts gefunden.';
$lang['mediaselect'] = 'Dateiauswahl';
$lang['fileupload'] = 'Datei hochladen';
$lang['uploadsucc'] = 'Datei wurde erfolgreich hochgeladen';
$lang['uploadfail'] = 'Hochladen fehlgeschlagen. Keine Berechtigung?';
$lang['uploadwrong'] = 'Hochladen verweigert. Diese Dateiendung ist nicht erlaubt.';
@ -196,6 +199,11 @@ $lang['difflink'] = 'Link zu der Vergleichsansicht';
$lang['diff_type'] = 'Unterschiede anzeigen:';
$lang['diff_inline'] = 'Inline';
$lang['diff_side'] = 'Side by Side';
$lang['diffprevrev'] = 'Vorherige Überarbeitung';
$lang['diffnextrev'] = 'Nächste Überarbeitung';
$lang['difflastrev'] = 'Letzte Überarbeitung';
$lang['diffbothprevrev'] = 'Beide Seiten, vorherige Überarbeitung';
$lang['diffbothnextrev'] = 'Beide Seiten, nächste Überarbeitung';
$lang['line'] = 'Zeile';
$lang['breadcrumb'] = 'Zuletzt angesehen:';
$lang['youarehere'] = 'Du befindest dich hier:';
@ -248,11 +256,9 @@ $lang['qb_sig'] = 'Unterschrift einfügen';
$lang['qb_smileys'] = 'Smileys';
$lang['qb_chars'] = 'Sonderzeichen';
$lang['upperns'] = 'Gehe zum übergeordneten Namensraum';
$lang['admin_register'] = 'Neuen Benutzer anmelden';
$lang['metaedit'] = 'Metadaten bearbeiten';
$lang['metasaveerr'] = 'Die Metadaten konnten nicht gesichert werden';
$lang['metasaveok'] = 'Metadaten gesichert';
$lang['btn_img_backto'] = 'Zurück zu %s';
$lang['img_title'] = 'Titel:';
$lang['img_caption'] = 'Bildunterschrift:';
$lang['img_date'] = 'Datum:';
@ -265,7 +271,6 @@ $lang['img_camera'] = 'Kamera:';
$lang['img_keywords'] = 'Schlagwörter:';
$lang['img_width'] = 'Breite:';
$lang['img_height'] = 'Höhe:';
$lang['btn_mediaManager'] = 'Im Medien-Manager anzeigen';
$lang['subscr_subscribe_success'] = 'Die Seite %s wurde zur Abonnementliste von %s hinzugefügt';
$lang['subscr_subscribe_error'] = 'Fehler beim Hinzufügen von %s zur Abonnementliste von %s';
$lang['subscr_subscribe_noaddress'] = 'In deinem Account ist keine E-Mail-Adresse hinterlegt. Dadurch kann die Seite nicht abonniert werden';
@ -283,7 +288,6 @@ $lang['subscr_style_every'] = 'E-Mail bei jeder Änderung';
$lang['subscr_style_digest'] = 'E-Mail mit zusammengefasster Übersicht der Seitenänderungen (alle %.2f Tage)';
$lang['subscr_style_list'] = 'Auflistung aller geänderten Seiten seit der letzten E-Mail (alle %.2f Tage)';
$lang['authtempfail'] = 'Benutzerüberprüfung momentan nicht möglich. Falls das Problem andauert, wende dich an den Admin.';
$lang['authpwdexpire'] = 'Dein Passwort läuft in %d Tag(en) ab. Du solltest es es frühzeitig ändern.';
$lang['i_chooselang'] = 'Wähle deine Sprache';
$lang['i_installer'] = 'DokuWiki-Installation';
$lang['i_wikiname'] = 'Wiki-Name';
@ -293,6 +297,7 @@ $lang['i_problems'] = 'Das Installationsprogramm hat unten aufgeführ
$lang['i_modified'] = 'Aus Sicherheitsgründen arbeitet dieses Skript nur mit einer neuen bzw. nicht modifizierten DokuWiki-Installation. Du solltest entweder alle Dateien noch einmal frisch installieren oder die <a href="http://dokuwiki.org/install">Dokuwiki-Installationsanleitung</a> konsultieren.';
$lang['i_funcna'] = 'Die PHP-Funktion <code>%s</code> ist nicht verfügbar. Unter Umständen wurde sie von deinem Hoster deaktiviert?';
$lang['i_phpver'] = 'Deine PHP-Version <code>%s</code> ist niedriger als die benötigte Version <code>%s</code>. Bitte aktualisiere deine PHP-Installation.';
$lang['i_mbfuncoverload'] = 'mbstring.func_overload muss in php.in deaktiviert werden um DokuWiki auszuführen.';
$lang['i_permfail'] = '<code>%s</code> ist nicht durch DokuWiki beschreibbar. Du musst die Berechtigungen dieses Ordners ändern!';
$lang['i_confexists'] = '<code>%s</code> existiert bereits';
$lang['i_writeerr'] = '<code>%s</code> konnte nicht erzeugt werden. Du solltest die Verzeichnis-/Datei-Rechte überprüfen und die Datei manuell anlegen.';
@ -342,5 +347,9 @@ $lang['media_perm_read'] = 'Du besitzt nicht die notwendigen Berechtigunge
$lang['media_perm_upload'] = 'Du besitzt nicht die notwendigen Berechtigungen um Dateien hochzuladen.';
$lang['media_update'] = 'Neue Version hochladen';
$lang['media_restore'] = 'Diese Version wiederherstellen';
$lang['media_acl_warning'] = 'Diese Liste ist möglicherweise nicht vollständig. Versteckte und durch ACL gesperrte Seiten werden nicht angezeigt.';
$lang['currentns'] = 'Aktueller Namensraum';
$lang['searchresult'] = 'Suchergebnis';
$lang['plainhtml'] = 'Reines HTML';
$lang['wikimarkup'] = 'Wiki Markup';
$lang['page_nonexist_rev'] = 'Seite existierte nicht an der Stelle %s. Sie wurde an folgende Stelle erstellt: <a href="%s">%s</a>.';

View file

@ -27,6 +27,8 @@
* @author Simon <st103267@stud.uni-stuttgart.de>
* @author Hoisl <hoisl@gmx.at>
* @author Marcel Eickhoff <eickhoff.marcel@gmail.com>
* @author Pascal Schröder <Pascal1802@gmail.com>
* @author Hendrik Diel <diel.hendrik@gmail.com>
*/
$lang['encoding'] = 'utf-8';
$lang['direction'] = 'ltr';
@ -58,7 +60,6 @@ $lang['btn_update'] = 'Updaten';
$lang['btn_delete'] = 'Löschen';
$lang['btn_back'] = 'Zurück';
$lang['btn_backlink'] = 'Links hierher';
$lang['btn_backtomedia'] = 'Zurück zur Dateiauswahl';
$lang['btn_subscribe'] = 'Aboverwaltung';
$lang['btn_profile'] = 'Benutzerprofil';
$lang['btn_reset'] = 'Zurücksetzen';
@ -88,11 +89,12 @@ $lang['badpassconfirm'] = 'Das Passwort war falsch.';
$lang['minoredit'] = 'kleine Änderung';
$lang['draftdate'] = 'Entwurf gespeichert am';
$lang['nosecedit'] = 'Diese Seite wurde in der Zwischenzeit geändert, Sektionsinfo ist veraltet, lade stattdessen volle Seite.';
$lang['searchcreatepage'] = "Falls der gesuchte Begriff nicht gefunden wurde, können Sie direkt eine neue Seite für den Suchbegriff anlegen, indem Sie auf den **''[Seite anlegen]''** Knopf drücken.";
$lang['searchcreatepage'] = 'Falls der gesuchte Begriff nicht gefunden wurde, können Sie direkt eine neue Seite für den Suchbegriff anlegen, indem Sie auf den **\'\'[Seite anlegen]\'\'** Knopf drücken.';
$lang['regmissing'] = 'Alle Felder müssen ausgefüllt werden.';
$lang['reguexists'] = 'Der Benutzername existiert leider schon.';
$lang['regsuccess'] = 'Der neue Benutzer wurde angelegt und das Passwort per E-Mail versandt.';
$lang['regsuccess2'] = 'Der neue Benutzer wurde angelegt.';
$lang['regfail'] = 'Der Benutzer konnte nicht angelegt werden.';
$lang['regmailfail'] = 'Offenbar ist ein Fehler beim Versenden der Passwort-E-Mail aufgetreten. Bitte wenden Sie sich an den Wiki-Admin.';
$lang['regbadmail'] = 'Die angegebene E-Mail-Adresse scheint ungültig zu sein. Falls dies ein Fehler ist, wenden Sie sich bitte an den Wiki-Admin.';
$lang['regbadpass'] = 'Die beiden eingegeben Passwörter stimmen nicht überein. Bitte versuchen Sie es noch einmal.';
@ -107,6 +109,7 @@ $lang['profdeleteuser'] = 'Benutzerprofil löschen';
$lang['profdeleted'] = 'Ihr Benutzerprofil wurde im Wiki gelöscht.';
$lang['profconfdelete'] = 'Ich möchte mein Benutzerprofil löschen.<br/> Diese Aktion ist nicht umkehrbar.';
$lang['profconfdeletemissing'] = 'Bestätigungs-Checkbox wurde nicht angehakt.';
$lang['proffail'] = 'Das Benutzerkonto konnte nicht aktualisiert werden.';
$lang['pwdforget'] = 'Passwort vergessen? Fordere ein neues an';
$lang['resendna'] = 'Passwörter versenden ist in diesem Wiki nicht möglich.';
$lang['resendpwd'] = 'Neues Passwort setzen für';
@ -169,7 +172,6 @@ $lang['js']['media_overwrt'] = 'Existierende Dateien überschreiben';
$lang['rssfailed'] = 'Es ist ein Fehler beim Laden des Feeds aufgetreten: ';
$lang['nothingfound'] = 'Nichts gefunden.';
$lang['mediaselect'] = 'Dateiauswahl';
$lang['fileupload'] = 'Datei hochladen';
$lang['uploadsucc'] = 'Datei wurde erfolgreich hochgeladen';
$lang['uploadfail'] = 'Hochladen fehlgeschlagen. Keine Berechtigung?';
$lang['uploadwrong'] = 'Hochladen verweigert. Diese Dateiendung ist nicht erlaubt.';
@ -206,6 +208,8 @@ $lang['diff_side'] = 'Side by Side';
$lang['diffprevrev'] = 'Vorhergehende Überarbeitung';
$lang['diffnextrev'] = 'Nächste Überarbeitung';
$lang['difflastrev'] = 'Letzte Überarbeitung';
$lang['diffbothprevrev'] = 'Beide Seiten der vorigen Revision';
$lang['diffbothnextrev'] = 'Beide Seiten der Revision';
$lang['line'] = 'Zeile';
$lang['breadcrumb'] = 'Zuletzt angesehen:';
$lang['youarehere'] = 'Sie befinden sich hier:';
@ -258,7 +262,6 @@ $lang['qb_sig'] = 'Unterschrift einfügen';
$lang['qb_smileys'] = 'Smileys';
$lang['qb_chars'] = 'Sonderzeichen';
$lang['upperns'] = 'zum übergeordneten Namensraum springen';
$lang['admin_register'] = 'Neuen Benutzer anmelden';
$lang['metaedit'] = 'Metadaten bearbeiten';
$lang['metasaveerr'] = 'Die Metadaten konnten nicht gesichert werden';
$lang['metasaveok'] = 'Metadaten gesichert';
@ -291,7 +294,6 @@ $lang['subscr_style_every'] = 'E-Mail bei jeder Bearbeitung';
$lang['subscr_style_digest'] = 'Zusammenfassung der Änderungen für jede veränderte Seite (Alle %.2f Tage)';
$lang['subscr_style_list'] = 'Liste der geänderten Seiten (Alle %.2f Tage)';
$lang['authtempfail'] = 'Benutzerüberprüfung momentan nicht möglich. Falls das Problem andauert, wenden Sie sich an den Admin.';
$lang['authpwdexpire'] = 'Ihr Passwort läuft in %d Tag(en) ab. Sie sollten es frühzeitig ändern.';
$lang['i_chooselang'] = 'Wählen Sie Ihre Sprache';
$lang['i_installer'] = 'DokuWiki Installation';
$lang['i_wikiname'] = 'Wiki-Name';
@ -351,7 +353,10 @@ $lang['media_perm_read'] = 'Sie besitzen nicht die notwendigen Berechtigun
$lang['media_perm_upload'] = 'Sie besitzen nicht die notwendigen Berechtigungen um Dateien hochzuladen.';
$lang['media_update'] = 'Neue Version hochladen';
$lang['media_restore'] = 'Diese Version wiederherstellen';
$lang['media_acl_warning'] = 'Diese Liste ist möglicherweise nicht vollständig. Versteckte und durch ACL gesperrte Seiten werden nicht angezeigt.';
$lang['currentns'] = 'Aktueller Namensraum';
$lang['searchresult'] = 'Suchergebnisse';
$lang['plainhtml'] = 'HTML Klartext';
$lang['wikimarkup'] = 'Wiki Markup';
$lang['page_nonexist_rev'] = 'Die Seite exitiert nicht unter %s. Sie wurde aber unter <a href="%s">%s</a>';
$lang['unable_to_parse_date'] = 'Parameter "%s" kann nicht geparsed werden.';

View file

@ -16,7 +16,7 @@ datepicker.regional['el'] = {
closeText: 'Κλείσιμο',
prevText: 'Προηγούμενος',
nextText: 'Επόμενος',
currentText: 'Τρέχων Μήνας',
currentText: 'Σήμερα',
monthNames: ['Ιανουάριος','Φεβρουάριος','Μάρτιος','Απρίλιος','Μάιος','Ιούνιος',
'Ιούλιος','Αύγουστος','Σεπτέμβριος','Οκτώβριος','Νοέμβριος','Δεκέμβριος'],
monthNamesShort: ['Ιαν','Φεβ','Μαρ','Απρ','Μαι','Ιουν',

View file

@ -43,7 +43,6 @@ $lang['btn_update'] = 'Ενημέρωση';
$lang['btn_delete'] = 'Σβήσιμο';
$lang['btn_back'] = 'Πίσω';
$lang['btn_backlink'] = 'Σύνδεσμοι προς αυτή τη σελίδα';
$lang['btn_backtomedia'] = 'Επιστροφή στην επιλογή αρχείων';
$lang['btn_subscribe'] = 'Εγγραφή σε λήψη ενημερώσεων σελίδας';
$lang['btn_profile'] = 'Επεξεργασία προφίλ';
$lang['btn_reset'] = 'Ακύρωση';
@ -152,7 +151,6 @@ $lang['js']['media_overwrt'] = 'Αντικατάσταση υπάρχοντω
$lang['rssfailed'] = 'Παρουσιάστηκε κάποιο σφάλμα κατά την ανάγνωση αυτού του feed: ';
$lang['nothingfound'] = 'Δεν βρέθηκαν σχετικά αποτελέσματα.';
$lang['mediaselect'] = 'Επιλογή Αρχείων';
$lang['fileupload'] = 'Φόρτωση αρχείου';
$lang['uploadsucc'] = 'Επιτυχής φόρτωση';
$lang['uploadfail'] = 'Η μεταφόρτωση απέτυχε. Πιθανόν αυτό να οφείλεται στις ρυθμίσεις πρόσβασης του αρχείου.';
$lang['uploadwrong'] = 'Η μεταφόρτωση δεν έγινε δεκτή. Δεν επιτρέπονται αρχεία αυτού του τύπου!';
@ -237,7 +235,6 @@ $lang['qb_sig'] = 'Προσθήκη Υπογραφής';
$lang['qb_smileys'] = 'Smileys';
$lang['qb_chars'] = 'Ειδικοί Χαρακτήρες';
$lang['upperns'] = 'πήγαινε στον μητρικό φάκελο';
$lang['admin_register'] = 'Προσθήκη νέου χρήστη';
$lang['metaedit'] = 'Τροποποίηση metadata';
$lang['metasaveerr'] = 'Η αποθήκευση των metadata απέτυχε';
$lang['metasaveok'] = 'Επιτυχής αποθήκευση metadata';
@ -272,7 +269,6 @@ $lang['subscr_style_every'] = 'email σε κάθε αλλαγή';
$lang['subscr_style_digest'] = 'συνοπτικό email αλλαγών της σελίδας (κάθε %.2f μέρες)';
$lang['subscr_style_list'] = 'λίστα σελίδων με αλλαγές μετά από το τελευταίο email (κάθε %.2f μέρες)';
$lang['authtempfail'] = 'Η συνδεση χρηστών είναι απενεργοποιημένη αυτή την στιγμή. Αν αυτό διαρκέσει για πολύ, παρακαλούμε ενημερώστε τον διαχειριστή του wiki.';
$lang['authpwdexpire'] = 'Ο κωδικός πρόσβασης θα λήξει σε %d ημέρες. Προτείνουμε να τον αλλάξετε σύντομα.';
$lang['i_chooselang'] = 'Επιλογή γλώσσας';
$lang['i_installer'] = 'Οδηγός εγκατάστασης DokuWiki';
$lang['i_wikiname'] = 'Ονομασία wiki';
@ -288,8 +284,8 @@ $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. Συνεχίστε στο <a href="doku.php">νέο σας DokuWiki</a>.';
$lang['i_failure'] = 'Εμφανίστηκαν κάποια προβλήματα στη διαδικασία ανανέωσης των αρχείων ρυθμίσεων. Πιθανόν να χρειάζεται να τα τροποποιήσετε χειροκίνητα ώστε να μπορείτε να χρησιμοποιήσετε το <a href="doku.php">νέο σας DokuWiki</a>.';
$lang['i_success'] = 'Η εγκατάσταση ολοκληρώθηκε επιτυχώς. Μπορείτε πλέον να διαγράψετε το αρχείο install.php. Συνεχίστε στο <a href="doku.php?id=wiki:welcome">νέο σας DokuWiki</a>.';
$lang['i_failure'] = 'Εμφανίστηκαν κάποια προβλήματα στη διαδικασία ανανέωσης των αρχείων ρυθμίσεων. Πιθανόν να χρειάζεται να τα τροποποιήσετε χειροκίνητα ώστε να μπορείτε να χρησιμοποιήσετε το <a href="doku.php?id=wiki:welcome">νέο σας DokuWiki</a>.';
$lang['i_policy'] = 'Αρχική πολιτική Λίστας Δικαιωμάτων Πρόσβασης - ACL';
$lang['i_pol0'] = 'Ανοιχτό Wiki (όλοι μπορούν να διαβάσουν ή να δημιουργήσουν/τροποποιήσουν σελίδες και να μεταφορτώσουν αρχεία)';
$lang['i_pol1'] = 'Δημόσιο Wiki (όλοι μπορούν να διαβάσουν σελίδες αλλά μόνο οι εγγεγραμμένοι χρήστες μπορούν να δημιουργήσουν/τροποποιήσουν σελίδες και να μεταφορτώσουν αρχεία)';

Some files were not shown because too many files have changed in this diff Show more