Merge remote-tracking branch 'splitbrain/master'

This commit is contained in:
Gerry Weißbach 2014-12-22 10:31:30 +01:00
commit 8da2ebf4f4
307 changed files with 5216 additions and 1212 deletions

View File

@ -4,14 +4,13 @@ php:
- "5.5"
- "5.4"
- "5.3"
# PHP 5.6 is not yet released, allow failures
matrix:
allow_failures:
- php: "5.6"
notifications:
irc:
channels:
- "chat.freenode.net#dokuwiki"
on_success: change
on_failure: change
script: cd _test && phpunit --verbose --stderr
install:
- wget https://phar.phpunit.de/phpunit-4.3.5.phar -O _test/phpunit
- chmod 755 _test/phpunit
script: cd _test && ./phpunit --verbose --stderr

View File

@ -45,8 +45,6 @@ class TestRequest {
*/
public function execute($uri='/doku.php') {
global $INPUT;
global $ID;
global $INFO;
// save old environment
$server = $_SERVER;

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 970 B

Binary file not shown.

View File

@ -0,0 +1,127 @@
<?php
/**
* Tests for requesting revisioninfo of a revision of a page with getRevisionInfo()
*
* This class uses the files:
* - data/pages/mailinglist.txt
* - data/meta/mailinglist.changes
*/
class changelog_getlastrevisionat_test extends DokuWikiTest {
private $pageid = 'mailinglist';
function setup() {
parent::setup();
global $cache_revinfo;
$cache =& $cache_revinfo;
if(isset($cache['nonexist'])) {
unset($cache['nonexist']);
}
if(isset($cache['mailinglist'])) {
unset($cache['mailinglist']);
}
}
/**
* no nonexist.changes meta file available
*/
function test_changemetadatanotexists() {
$rev = 1362525899;
$id = 'nonexist';
$revsexpected = false;
$pagelog = new PageChangeLog($id, $chunk_size = 8192);
$revs = $pagelog->getLastRevisionAt($rev);
$this->assertEquals($revsexpected, $revs);
}
/**
* start at exact current revision of mailinglist page
*
*/
function test_startatexactcurrentrev() {
$rev = 1385051947;
$revsexpected = '';
//set a known timestamp
touch(wikiFN($this->pageid), $rev);
$pagelog = new PageChangeLog($this->pageid, $chunk_size = 8192);
$revs = $pagelog->getLastRevisionAt($rev);
$this->assertEquals($revsexpected, $revs);
}
/**
* test a future revision
*
*/
function test_futurerev() {
$rev = 1385051947;
$revsexpected = '';
//set a known timestamp
touch(wikiFN($this->pageid), $rev);
$rev +=1;
$pagelog = new PageChangeLog($this->pageid, $chunk_size = 8192);
$revs = $pagelog->getLastRevisionAt($rev);
$this->assertEquals($revsexpected, $revs);
}
/**
* start at exact last revision of mailinglist page
*
*/
function test_exactlastrev() {
$rev = 1360110636;
$revsexpected = 1360110636;
$pagelog = new PageChangeLog($this->pageid, $chunk_size = 8192);
$revs = $pagelog->getLastRevisionAt($rev);
$this->assertEquals($revsexpected, $revs);
}
/**
* Request not existing revision
*
*/
function test_olderrev() {
$rev = 1;
$revexpected = false;
$pagelog = new PageChangeLog($this->pageid, $chunk_size = 8192);
$revfound = $pagelog->getLastRevisionAt($rev);
$this->assertEquals($revexpected, $revfound);
}
/**
* Start at non existing revision somewhere between existing revisions
*/
function test_notexistingrev() {
$rev = 1362525890;
$revexpected = 1362525359;
$pagelog = new PageChangeLog($this->pageid, $chunk_size = 8192);
$revfound = $pagelog->getLastRevisionAt($rev);
$this->assertEquals($revexpected, $revfound);
}
/**
* request nonexisting page
*
*/
function test_notexistingpage() {
$rev = 1385051947;
$currentexpected = false;
$pagelog = new PageChangeLog('nonexistingpage', $chunk_size = 8192);
$current = $pagelog->getLastRevisionAt($rev);
$this->assertEquals($currentexpected, $current);
}
}

View File

@ -146,4 +146,15 @@ class common_ml_test extends DokuWikiTest {
$this->assertEquals($expect, ml($id, $args));
}
function test_ml_empty_rev() {
global $conf;
$conf['useslash'] = 0;
$conf['userewrite'] = 0;
$args = array('a' => 'b', 'c' => 'd', 'rev' => '');
$expect = DOKU_BASE . $this->script . '?a=b&amp;c=d&amp;media=some:img.jpg';
$this->assertEquals($expect, ml('some:img.jpg', $args));
}
}

View File

@ -142,6 +142,17 @@ class common_wl_test extends DokuWikiTest {
$expect = DOKU_BASE . DOKU_SCRIPT . '/some/one?a=b&c=d';
$this->assertEquals($expect, wl('some:one', 'a=b,c=d', false, '&'));
}
function test_wl_empty_rev() {
global $conf;
$conf['useslash'] = 0;
$conf['userewrite'] = 0;
$args = array('a' => 'b', 'c' => 'd', 'rev' => '');
$expect = DOKU_BASE . DOKU_SCRIPT . '?id=some:&amp;a=b&amp;c=d';
$this->assertEquals($expect, wl('some:', $args));
}

View File

@ -0,0 +1,81 @@
<?php
class init_checkssl_test extends DokuWikiTest {
/**
* Running behind an SSL proxy, HTTP between server and proxy
* HTTPS not set
* HTTP_X_FORWARDED_PROTO
* set to https
*/
function test1() {
$_SERVER['HTTP_X_FORWARDED_PROTO'] = 'https';
$this->assertEquals(is_ssl(), true);
}
/**
* Running behind a plain HTTP proxy, HTTP between server and proxy
* HTTPS not set
* HTTP_X_FORWARDED_PROTO set to http
*/
function test2() {
$_SERVER['HTTP_X_FORWARDED_PROTO'] = 'http';
$this->assertEquals(is_ssl(), false);
}
/**
* Running behind an SSL proxy, HTTP between server and proxy
* HTTPS set to off,
* HTTP_X_FORWARDED_PROTO set to https
*/
function test3() {
$_SERVER['HTTP_X_FORWARDED_PROTO'] = 'https';
$_SERVER['HTTPS'] = 'off';
$this->assertEquals(is_ssl(), true);
}
/**
* Not running behind a proxy, HTTPS server
* HTTPS set to on,
* HTTP_X_FORWARDED_PROTO not set
*/
function test4() {
$_SERVER['HTTPS'] = 'on';
$this->assertEquals(is_ssl(), true);
}
/**
* Not running behind a proxy, plain HTTP server
* HTTPS not set
* HTTP_X_FORWARDED_PROTO not set
*/
function test5() {
$this->assertEquals(is_ssl(), false);
}
/**
* Not running behind a proxy, plain HTTP server
* HTTPS set to off
* HTTP_X_FORWARDED_PROTO not set
*/
function test6() {
$_SERVER['HTTPS'] = 'off';
$this->assertEquals(is_ssl(), false);
}
/**
* Running behind an SSL proxy, SSL between proxy and HTTP server
* HTTPS set to on,
* HTTP_X_FORWARDED_PROTO set to https
*/
function test7() {
$_SERVER['HTTP_X_FORWARDED_PROTO'] = 'https';
$_SERVER['HTTPS'] = 'on';
$this->assertEquals(is_ssl(), true);
}
}

View File

@ -14,8 +14,58 @@ class input_test extends DokuWikiTest {
'empty' => '',
'emptya' => array(),
'do' => array('save' => 'Speichern'),
);
/**
* custom filter function
*
* @param $string
* @return mixed
*/
public function myfilter($string) {
$string = str_replace('foo', 'bar', $string);
$string = str_replace('baz', '', $string);
return $string;
}
public function test_filter() {
$_GET = array(
'foo' => 'foo',
'zstring'=> "foo\0bar",
'znull' => "\0",
'zint' => '42'."\0".'42',
'zintbaz'=> "baz42",
);
$_POST = $_GET;
$_REQUEST = $_GET;
$INPUT = new Input();
$filter = array($this,'myfilter');
$this->assertNotSame('foobar', $INPUT->str('zstring'));
$this->assertSame('foobar', $INPUT->filter()->str('zstring'));
$this->assertSame('bar', $INPUT->filter($filter)->str('foo'));
$this->assertSame('bar', $INPUT->filter()->str('znull', 'bar', true));
$this->assertNotSame('foobar', $INPUT->str('zstring')); // make sure original input is unmodified
$this->assertNotSame('foobar', $INPUT->get->str('zstring'));
$this->assertSame('foobar', $INPUT->get->filter()->str('zstring'));
$this->assertSame('bar', $INPUT->get->filter($filter)->str('foo'));
$this->assertSame('bar', $INPUT->get->filter()->str('znull', 'bar', true));
$this->assertNotSame('foobar', $INPUT->get->str('zstring')); // make sure original input is unmodified
$this->assertNotSame(4242, $INPUT->int('zint'));
$this->assertSame(4242, $INPUT->filter()->int('zint'));
$this->assertSame(42, $INPUT->filter($filter)->int('zintbaz'));
$this->assertSame(42, $INPUT->filter()->str('znull', 42, true));
$this->assertSame(true, $INPUT->bool('znull'));
$this->assertSame(false, $INPUT->filter()->bool('znull'));
$this->assertSame('foobar', $INPUT->filter()->valid('zstring', array('foobar', 'bang')));
}
public function test_str() {
$_REQUEST = $this->data;
$_POST = $this->data;

View File

@ -303,7 +303,7 @@ class TestOfDoku_Parser_Footnote extends TestOfDoku_Parser {
array('nest', array ( array (
array('footnote_open',array()),
array('listu_open',array()),
array('listitem_open',array(1)),
array('listitem_open',array(1,Doku_Handler_List::NODE)),
array('listcontent_open',array()),
array('cdata',array("A")),
array('listcontent_close',array()),

View File

@ -13,7 +13,7 @@ class TestOfDoku_Parser_Lists extends TestOfDoku_Parser {
$calls = array (
array('document_start',array()),
array('listu_open',array()),
array('listitem_open',array(1)),
array('listitem_open',array(1,Doku_Handler_List::NODE)),
array('listcontent_open',array()),
array('cdata',array("A")),
array('listcontent_close',array()),
@ -46,7 +46,7 @@ class TestOfDoku_Parser_Lists extends TestOfDoku_Parser {
$calls = array (
array('document_start',array()),
array('listo_open',array()),
array('listitem_open',array(1)),
array('listitem_open',array(1,Doku_Handler_List::NODE)),
array('listcontent_open',array()),
array('cdata',array("A")),
array('listcontent_close',array()),
@ -80,7 +80,7 @@ class TestOfDoku_Parser_Lists extends TestOfDoku_Parser {
$calls = array (
array('document_start',array()),
array('listo_open',array()),
array('listitem_open',array(1)),
array('listitem_open',array(1,Doku_Handler_List::NODE)),
array('listcontent_open',array()),
array('cdata',array("A")),
array('listcontent_close',array()),
@ -109,7 +109,7 @@ class TestOfDoku_Parser_Lists extends TestOfDoku_Parser {
$calls = array (
array('document_start',array()),
array('listu_open',array()),
array('listitem_open',array(1)),
array('listitem_open',array(1,Doku_Handler_List::NODE)),
array('listcontent_open',array()),
array('cdata',array("A")),
array('listcontent_close',array()),
@ -138,7 +138,7 @@ class TestOfDoku_Parser_Lists extends TestOfDoku_Parser {
$calls = array (
array('document_start',array()),
array('listo_open',array()),
array('listitem_open',array(1)),
array('listitem_open',array(1,Doku_Handler_List::NODE)),
array('listcontent_open',array()),
array('cdata',array("A")),
array('listcontent_close',array()),
@ -188,7 +188,7 @@ Bar');
array('cdata',array("Foo")),
array('p_close',array()),
array('listu_open',array()),
array('listitem_open',array(1)),
array('listitem_open',array(1,Doku_Handler_List::NODE)),
array('listcontent_open',array()),
array('cdata',array("A")),
array('listcontent_close',array()),
@ -227,7 +227,7 @@ Bar');
$calls = array (
array('document_start',array()),
array('listu_open',array()),
array('listitem_open',array(1)),
array('listitem_open',array(1,Doku_Handler_List::NODE)),
array('listcontent_open',array()),
array('strong_open',array()),
array('cdata',array("A")),
@ -262,7 +262,7 @@ Bar');
$calls = array (
array('document_start',array()),
array('listu_open',array()),
array('listitem_open',array(1)),
array('listitem_open',array(1,Doku_Handler_List::NODE)),
array('listcontent_open',array()),
array('unformatted',array("A")),
array('listcontent_close',array()),
@ -291,7 +291,7 @@ Bar');
$calls = array (
array('document_start',array()),
array('listu_open',array()),
array('listitem_open',array(1)),
array('listitem_open',array(1,Doku_Handler_List::NODE)),
array('listcontent_open',array()),
array('cdata',array("A")),
array('linebreak',array()),
@ -355,7 +355,7 @@ Bar');
$calls = array (
array('document_start',array()),
array('listu_open',array()),
array('listitem_open',array(1)),
array('listitem_open',array(1,Doku_Handler_List::NODE)),
array('listcontent_open',array()),
array('nest', array( array(
array('footnote_open',array()),

View File

@ -0,0 +1,103 @@
<?php
require_once 'parser.inc.php';
/**
* Tests for the implementation of audio and video files
*
* @author Michael Große <grosse@cosmocode.de>
*/
class TestOfDoku_Parser_Media extends TestOfDoku_Parser {
function testVideoOGVExternal() {
$file = 'http://some.where.far/away.ogv';
$parser_response = p_get_instructions('{{' . $file . '}}');
$calls = array (
array('document_start',array()),
array('p_open',array()),
array('externalmedia',array($file,null,null,null,null,'cache','details')),
array('cdata',array(null)),
array('p_close',array()),
array('document_end',array()),
);
$this->assertEquals(array_map('stripbyteindex',$parser_response),$calls);
$Renderer = new Doku_Renderer_xhtml();
$url = $Renderer->externalmedia($file,null,null,null,null,'cache','details',true);
//print_r("url: " . $url);
$video = '<video class="media" width="320" height="240" controls="controls">';
$this->assertEquals(substr($url,0,66),$video);
$source = '<source src="http://some.where.far/away.ogv" type="video/ogg" />';
$this->assertEquals(substr($url,67,64),$source);
// work around random token
$a_first_part = '<a href="/./lib/exe/fetch.php?cache=&amp;tok=';
$a_second_part = '&amp;media=http%3A%2F%2Fsome.where.far%2Faway.ogv" class="media mediafile mf_ogv" title="http://some.where.far/away.ogv">';
$this->assertEquals(substr($url,132,45),$a_first_part);
$this->assertEquals(substr($url,183,121),$a_second_part);
$rest = 'away.ogv</a></video>'."\n";
$this->assertEquals(substr($url,304),$rest);
}
/**
* unknown extension of external media file
*/
function testVideoVIDExternal() {
$file = 'http://some.where.far/away.vid';
$parser_response = p_get_instructions('{{' . $file . '}}');
$calls = array(
array('document_start', array()),
array('p_open', array()),
array('externalmedia', array($file, null, null, null, null, 'cache', 'details')),
array('cdata', array(null)),
array('p_close', array()),
array('document_end', array()),
);
$this->assertEquals(array_map('stripbyteindex', $parser_response), $calls);
$Renderer = new Doku_Renderer_xhtml();
$url = $Renderer->externalmedia($file, null, null, null, null, 'cache', 'details', true);
// work around random token
$a_first_part = '<a href="/./lib/exe/fetch.php?tok=';
$a_second_part = '&amp;media=http%3A%2F%2Fsome.where.far%2Faway.vid" class="media mediafile mf_vid" title="http://some.where.far/away.vid">';
$this->assertEquals(substr($url,0,34),$a_first_part);
$this->assertEquals(substr($url,40,121),$a_second_part);
$rest = 'away.vid</a>';
$this->assertEquals(substr($url,161),$rest);
}
function testVideoOGVInternal() {
$file = 'wiki:kind_zu_katze.ogv';
$parser_response = p_get_instructions('{{' . $file . '}}');
$calls = array (
array('document_start',array()),
array('p_open',array()),
array('internalmedia',array($file,null,null,null,null,'cache','details')),
array('cdata',array(null)),
array('p_close',array()),
array('document_end',array()),
);
$this->assertEquals(array_map('stripbyteindex',$parser_response),$calls);
$Renderer = new Doku_Renderer_xhtml();
$url = $Renderer->externalmedia($file,null,null,null,null,'cache','details',true);
$video = '<video class="media" width="320" height="240" controls="controls" poster="/./lib/exe/fetch.php?media=wiki:kind_zu_katze.png">';
$this->assertEquals(substr($url,0,125),$video);
$source_webm = '<source src="/./lib/exe/fetch.php?media=wiki:kind_zu_katze.webm" type="video/webm" />';
$this->assertEquals(substr($url,126,85),$source_webm);
$source_ogv = '<source src="/./lib/exe/fetch.php?media=wiki:kind_zu_katze.ogv" type="video/ogg" />';
$this->assertEquals(substr($url,212,83),$source_ogv);
$a_webm = '<a href="/./lib/exe/fetch.php?id=&amp;cache=&amp;media=wiki:kind_zu_katze.webm" class="media mediafile mf_webm" title="wiki:kind_zu_katze.webm (99.1 KB)">kind_zu_katze.webm</a>';
$a_ogv = '<a href="/./lib/exe/fetch.php?id=&amp;cache=&amp;media=wiki:kind_zu_katze.ogv" class="media mediafile mf_ogv" title="wiki:kind_zu_katze.ogv (44.8 KB)">kind_zu_katze.ogv</a>';
$this->assertEquals(substr($url,296,176),$a_webm);
$this->assertEquals(substr($url,472,172),$a_ogv);
$rest = '</video>'."\n";
$this->assertEquals(substr($url,644),$rest);
}
}

View File

@ -58,6 +58,18 @@ class js_js_compress_test extends DokuWikiTest {
$this->assertEquals(js_compress($text), 'text.replace(/"/,"//")');
}
function test_regex_after_and_with_slashes_outside_string(){
$text = 'if ( peng == bla && /pattern\//.test(url)) request = new Something();';
$this->assertEquals(js_compress($text),
'if(peng==bla&&/pattern\//.test(url))request=new Something();');
}
function test_regex_after_or_with_slashes_outside_string(){
$text = 'if ( peng == bla || /pattern\//.test(url)) request = new Something();';
$this->assertEquals(js_compress($text),
'if(peng==bla||/pattern\//.test(url))request=new Something();');
}
function test_dquot1(){
$text = 'var foo="Now what \\" \'do we//get /*here*/ ?";';
$this->assertEquals(js_compress($text), $text);
@ -145,6 +157,72 @@ EOF;
$this->assertEquals($out, js_compress($text));
}
function test_plusplus1(){
$text = 'a = 5 + ++b;';
$this->assertEquals('a=5+ ++b;',js_compress($text));
}
function test_plusplus2(){
$text = 'a = 5+ ++b;';
$this->assertEquals('a=5+ ++b;',js_compress($text));
}
function test_plusplus3(){
$text = 'a = 5++ + b;';
$this->assertEquals('a=5++ +b;',js_compress($text));
}
function test_plusplus4(){
$text = 'a = 5++ +b;';
$this->assertEquals('a=5++ +b;',js_compress($text));
}
function test_minusminus1(){
$text = 'a = 5 - --b;';
$this->assertEquals('a=5- --b;',js_compress($text));
}
function test_minusminus2(){
$text = 'a = 5- --b;';
$this->assertEquals('a=5- --b;',js_compress($text));
}
function test_minusminus3(){
$text = 'a = 5-- - b;';
$this->assertEquals('a=5-- -b;',js_compress($text));
}
function test_minusminus4(){
$text = 'a = 5-- -b;';
$this->assertEquals('a=5-- -b;',js_compress($text));
}
function test_minusplus1(){
$text = 'a = 5-- +b;';
$this->assertEquals('a=5--+b;',js_compress($text));
}
function test_minusplus2(){
$text = 'a = 5-- + b;';
$this->assertEquals('a=5--+b;',js_compress($text));
}
function test_plusminus1(){
$text = 'a = 5++ - b;';
$this->assertEquals('a=5++-b;',js_compress($text));
}
function test_plusminus2(){
$text = 'a = 5++ -b;';
$this->assertEquals('a=5++-b;',js_compress($text));
}
function test_unusual_signs(){
$text='var π = Math.PI, τ = 2 * π, halfπ = π / 2, ε = 1e-6, ε2 = ε * ε, radians = π / 180, degrees = 180 / π;';
$this->assertEquals(js_compress($text),
'var π=Math.PI,τ=2*π,halfπ=π/2,ε=1e-6,ε2=ε*ε,radians=π/180,degrees=180/π;');
}
/**
* Test the files provided with the original JsStrip
*/

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

@ -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

@ -9,12 +9,17 @@
*/
// update message version
$updateVersion = 45;
$updateVersion = 47;
// 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'])) {
@ -34,6 +39,7 @@ $QUERY = trim($INPUT->str('id'));
$ID = getID();
$REV = $INPUT->int('rev');
$DATE_AT = $INPUT->str('at');
$IDX = $INPUT->str('idx');
$DATE = $INPUT->int('date');
$RANGE = $INPUT->str('range');
@ -47,7 +53,41 @@ $PRE = cleanText(substr($INPUT->post->str('prefix'), 0, -1));
$SUF = cleanText($INPUT->post->str('suffix'));
$SUM = $INPUT->post->str('summary');
//make info about the selected page available
//parse DATE_AT
if($DATE_AT) {
$date_parse = strtotime($DATE_AT);
if($date_parse) {
$DATE_AT = $date_parse;
} else { // check for UNIX Timestamp
$date_parse = @date('Ymd',$DATE_AT);
if(!$date_parse || $date_parse === '19700101') {
msg(sprintf($lang['unable_to_parse_date'], $DATE_AT));
$DATE_AT = null;
}
}
}
//check for existing $REV related to $DATE_AT
if($DATE_AT) {
$pagelog = new PageChangeLog($ID);
$rev_t = $pagelog->getLastRevisionAt($DATE_AT);
if($rev_t === '') { //current revision
$REV = null;
$DATE_AT = null;
} else if ($rev_t === false) { //page did not exist
$rev_n = $pagelog->getRelativeRevision($DATE_AT,+1);
msg(sprintf($lang['page_nonexist_rev'],
strftime($conf['dformat'],$DATE_AT),
wl($ID, array('rev' => $rev_n)),
strftime($conf['dformat'],$rev_n)));
$REV = $DATE_AT; //will result in a page not exists message
} else {
$REV = $rev_t;
}
}
//make infos about the selected page available
$INFO = pageinfo();
//export minimal info to JS, plugins can add more

View File

@ -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

@ -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,7 +589,18 @@ 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 of older PHP versions having trouble with TLS (enable_crypto returns true, but
// the conection still borks) we try SSLv3 first
if (@stream_socket_enable_crypto($socket, true, STREAM_CRYPTO_METHOD_SSLv3_CLIENT)) {
$requesturl = $requestinfo['path'];
return true;
}
// If the proxy does not support SSLv3 we try TLS
if (@stream_socket_enable_crypto($socket, true, STREAM_CRYPTO_METHOD_TLS_CLIENT)) {
$requesturl = $requestinfo['path'];
return true;
}
@ -596,6 +616,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 +661,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 +711,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 +746,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 +762,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 +779,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 +790,8 @@ class HTTPClient {
/**
* Return current timestamp in microsecond resolution
*
* @return float
*/
static function _time(){
list($usec, $sec) = explode(" ", microtime());
@ -776,6 +804,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 +835,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 +852,8 @@ class HTTPClient {
* get cookies as http header string
*
* @author Andreas Goetz <cpuidle@gmx.de>
*
* @return string
*/
function _getCookies(){
$headers = '';
@ -833,6 +869,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 +882,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

@ -20,6 +20,11 @@ class Input {
protected $access;
/**
* @var Callable
*/
protected $filter;
/**
* Intilizes the Input class and it subcomponents
*/
@ -30,6 +35,32 @@ class Input {
$this->server = new ServerInput();
}
/**
* Apply the set filter to the given value
*
* @param string $data
* @return string
*/
protected function applyfilter($data){
if(!$this->filter) return $data;
return call_user_func($this->filter, $data);
}
/**
* Return a filtered copy of the input object
*
* Expects a callable that accepts one string parameter and returns a filtered string
*
* @param Callable|string $filter
* @return Input
*/
public function filter($filter='stripctl'){
$this->filter = $filter;
$clone = clone $this;
$this->filter = '';
return $clone;
}
/**
* Check if a parameter was set
*
@ -52,7 +83,6 @@ class Input {
*
* @see isset
* @param string $name Parameter name
* @return bool
*/
public function remove($name) {
if(isset($this->access[$name])) {
@ -77,8 +107,9 @@ class Input {
*/
public function param($name, $default = null, $nonempty = false) {
if(!isset($this->access[$name])) return $default;
if($nonempty && empty($this->access[$name])) return $default;
return $this->access[$name];
$value = $this->applyfilter($this->access[$name]);
if($nonempty && empty($value)) return $default;
return $value;
}
/**
@ -100,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]))) {
@ -114,33 +145,35 @@ 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
*/
public function int($name, $default = 0, $nonempty = false) {
if(!isset($this->access[$name])) return $default;
if(is_array($this->access[$name])) return $default;
if($this->access[$name] === '') return $default;
if($nonempty && empty($this->access[$name])) return $default;
$value = $this->applyfilter($this->access[$name]);
if($value === '') return $default;
if($nonempty && empty($value)) return $default;
return (int) $this->access[$name];
return (int) $value;
}
/**
* 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
*/
public function str($name, $default = '', $nonempty = false) {
if(!isset($this->access[$name])) return $default;
if(is_array($this->access[$name])) return $default;
if($nonempty && empty($this->access[$name])) return $default;
$value = $this->applyfilter($this->access[$name]);
if($nonempty && empty($value)) return $default;
return (string) $this->access[$name];
return (string) $value;
}
/**
@ -158,7 +191,8 @@ class Input {
public function valid($name, $valids, $default = null) {
if(!isset($this->access[$name])) return $default;
if(is_array($this->access[$name])) return $default; // we don't allow arrays
$found = array_search($this->access[$name], $valids);
$value = $this->applyfilter($this->access[$name]);
$found = array_search($value, $valids);
if($found !== false) return $valids[$found]; // return the valid value for type safety
return $default;
}
@ -176,10 +210,11 @@ class Input {
public function bool($name, $default = false, $nonempty = false) {
if(!isset($this->access[$name])) return $default;
if(is_array($this->access[$name])) return $default;
if($this->access[$name] === '') return $default;
if($nonempty && empty($this->access[$name])) return $default;
$value = $this->applyfilter($this->access[$name]);
if($value === '') return $default;
if($nonempty && empty($value)) return $default;
return (bool) $this->access[$name];
return (bool) $value;
}
/**
@ -210,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

@ -42,6 +42,7 @@
class JpegMeta {
var $_fileName;
var $_fp = null;
var $_fpout = null;
var $_type = 'unknown';
var $_markers;
@ -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,6 +928,9 @@ 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 == "") {
@ -1334,7 +1410,6 @@ class JpegMeta {
return false;
}
$pos = 0;
$this->_info['jfif'] = array();
$vmaj = $this->_getByte($data, 5);
@ -1420,7 +1495,6 @@ class JpegMeta {
break;
default:
return false;
break;
}
$this->_info['sof']['Format'] = $format;

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) {
@ -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;
@ -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

@ -53,6 +53,7 @@ class Tar {
protected $file = '';
protected $comptype = Tar::COMPRESS_AUTO;
/** @var resource|int */
protected $fh;
protected $memory = '';
protected $closed = true;
@ -105,6 +106,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 +274,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 +382,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 +404,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 +531,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 +545,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 +580,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 +600,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 +634,14 @@ class Tar {
}
}
/**
* Class TarIOException
*/
class TarIOException extends Exception {
}
/**
* Class TarIllegalCompressionException
*/
class TarIllegalCompressionException extends Exception {
}

View File

@ -16,6 +16,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 +28,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 +51,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 +72,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 +86,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 +101,8 @@ class ZipLib {
/**
* Returns the Zip file
*
* @return string
*/
function get_file() {
$data = implode('', $this -> datasec);
@ -94,6 +113,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 +139,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 +193,9 @@ class ZipLib {
return true;
}
/**
* @return int
*/
function DosTime() {
$timearray = getdate();
if ($timearray['year'] < 1980) {
@ -186,10 +216,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 +237,7 @@ class ZipLib {
return(-1);
}
$stat = array();
for ($i=0; $i<$cdir['entries']; $i++) {
@fseek($zip, $pos_entry);
$header = $this->ReadCentralFileHeaders($zip);
@ -218,6 +253,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 +294,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 +339,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 +369,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 +384,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 +470,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 +507,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 +551,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

@ -200,6 +200,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 +222,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 +249,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 +291,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 +339,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 +354,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 +387,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 +412,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 +428,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 +478,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 +502,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 +516,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 +554,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 +621,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 +633,6 @@ function act_export($act){
$pre = '';
$post = '';
$output = '';
$headers = array();
// search engines: never cache exported docs! (Google only currently)
@ -644,7 +676,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 +704,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 +754,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 +817,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

@ -95,9 +95,10 @@ function auth_setup() {
$INPUT->set('http_credentials', true);
}
// apply cleaning
// apply cleaning (auth specific user names, remove control chars)
if (true === $auth->success) {
$INPUT->set('u', $auth->cleanUser($INPUT->str('u')));
$INPUT->set('u', $auth->cleanUser(stripctl($INPUT->str('u'))));
$INPUT->set('p', stripctl($INPUT->str('p')));
}
if($INPUT->str('authtok')) {
@ -126,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() {
@ -172,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) {
@ -228,7 +230,7 @@ function auth_login($user, $pass, $sticky = false, $silent = false) {
if(!empty($user)) {
//usual login
if($auth->checkPass($user, $pass)) {
if(!empty($pass) && $auth->checkPass($user, $pass)) {
// make logininfo globally available
$INPUT->server->set('REMOTE_USER', $user);
$secret = auth_cookiesalt(!$sticky, true); //bind non-sticky to session
@ -279,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']) {
@ -306,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() {
@ -334,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);
@ -350,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
@ -377,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
*/
@ -443,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
@ -514,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) {
@ -554,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
@ -598,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
@ -612,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) {
@ -638,6 +647,7 @@ function auth_isMember($memberlist, $user, array $groups) {
// compare cleaned values
foreach($members as $member) {
if($member == '@ALL' ) return true;
if(!$auth->isCaseSensitive()) $member = utf8_strtolower($member);
if($member[0] == '@') {
$member = $auth->cleanGroup(substr($member, 1));
@ -676,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
@ -698,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
*/
@ -830,6 +842,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;
@ -911,6 +927,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
@ -922,7 +939,7 @@ function auth_sendPassword($user, $password) {
if(!$auth) return false;
$user = $auth->cleanUser($user);
$userinfo = $auth->getUserData($user);
$userinfo = $auth->getUserData($user, $requireGroups = false);
if(!$userinfo['mail']) return false;
@ -946,6 +963,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() {
@ -1127,6 +1145,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
@ -1184,7 +1203,7 @@ function act_resendpwd() {
}
$user = io_readfile($tfile);
$userinfo = $auth->getUserData($user);
$userinfo = $auth->getUserData($user, $requireGroups = false);
if(!$userinfo['mail']) {
msg($lang['resendpwdnouser'], -1);
return false;
@ -1236,7 +1255,7 @@ function act_resendpwd() {
$user = trim($auth->cleanUser($INPUT->post->str('login')));
}
$userinfo = $auth->getUserData($user);
$userinfo = $auth->getUserData($user, $requireGroups = false);
if(!$userinfo['mail']) {
msg($lang['resendpwdnouser'], -1);
return false;
@ -1277,6 +1296,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
@ -1301,6 +1321,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

@ -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());
}
@ -316,7 +316,7 @@ class cache_instructions extends cache_parser {
* 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'];
@ -725,8 +727,10 @@ 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();
@ -845,6 +849,25 @@ abstract class ChangeLog {
public function isCurrentRevision($rev) {
return $rev == @filemtime($this->getFilename());
}
/**
* 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)
*/
function getLastRevisionAt($date_at){
//requested date_at(timestamp) younger or equal then modified_time($this->id) => load current
if($date_at >= @filemtime($this->getFilename())) {
return '';
} else if ($rev = $this->getRelativeRevision($date_at+1, -1)) { //+1 to get also the requested date revision
return $rev;
} else {
return false;
}
}
/**
* Returns the next lines of the changelog of the chunck before head or after tail
@ -1072,3 +1095,4 @@ function getRevisions($id, $first, $num, $chunk_size = 8192, $media = false) {
}
return $changelog->getRevisions($first, $num);
}

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();

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')) {
@ -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
@ -438,6 +440,8 @@ function idfilter($id, $ue = true) {
function wl($id = '', $urlParameters = '', $absolute = false, $separator = '&amp;') {
global $conf;
if(is_array($urlParameters)) {
if(isset($urlParameters['rev']) && !$urlParameters['rev']) unset($urlParameters['rev']);
if(isset($urlParameters['at']) && $conf['date_at_format']) $urlParameters['at'] = date($conf['date_at_format'],$urlParameters['at']);
$urlParameters = buildURLparams($urlParameters, $separator);
} else {
$urlParameters = str_replace(',', $separator, $urlParameters);
@ -544,6 +548,7 @@ function ml($id = '', $more = '', $direct = true, $sep = '&amp;', $abs = false)
if(empty($more['w'])) unset($more['w']);
if(empty($more['h'])) unset($more['h']);
if(isset($more['id']) && $direct) unset($more['id']);
if(isset($more['rev']) && !$more['rev']) unset($more['rev']);
$more = buildURLparams($more, $sep);
} else {
$matches = array();
@ -685,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')) {
@ -968,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 = '') {
@ -1108,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);
@ -1119,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);
@ -1293,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>
@ -1373,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>
@ -1457,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) {
@ -1583,7 +1590,7 @@ function shorten($keep, $short, $max, $min = 9, $char = '…') {
}
/**
* Return the users realname or e-mail address for use
* Return the users real name or e-mail address for use
* in page footer and recent changes pages
*
* @param string|null $username or null when currently logged-in user should be used
@ -1641,22 +1648,20 @@ function userlink($username = null, $textonly = false) {
$evt = new Doku_Event('COMMON_USER_LINK', $data);
if($evt->advise_before(true)) {
if(empty($data['name'])) {
if($conf['showuseras'] == 'loginname') {
$data['name'] = $textonly ? $data['username'] : hsc($data['username']);
} else {
if($auth) $info = $auth->getUserData($username);
if(isset($info) && $info) {
switch($conf['showuseras']) {
case 'username':
case 'username_link':
$data['name'] = $textonly ? $info['name'] : hsc($info['name']);
break;
case 'email':
case 'email_link':
$data['name'] = obfuscate($info['mail']);
break;
}
if($auth) $info = $auth->getUserData($username);
if($conf['showuseras'] != 'loginname' && isset($info) && $info) {
switch($conf['showuseras']) {
case 'username':
case 'username_link':
$data['name'] = $textonly ? $info['name'] : hsc($info['name']);
break;
case 'email':
case 'email_link':
$data['name'] = obfuscate($info['mail']);
break;
}
} else {
$data['name'] = $textonly ? $data['username'] : hsc($data['username']);
}
}
@ -1823,6 +1828,8 @@ function send_redirect($url) {
} else {
header('Location: '.$url);
}
if(defined('DOKU_UNITTEST')) return; // no exits during unit tests
exit;
}
@ -1913,7 +1920,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

@ -33,4 +33,50 @@ if(!function_exists('ctype_digit')) {
if(preg_match('/^\d+$/', $text)) return true;
return false;
}
}
if(!function_exists('gzopen') && function_exists('gzopen64')) {
/**
* work around for PHP compiled against certain zlib versions #865
*
* @link http://stackoverflow.com/questions/23417519/php-zlib-gzopen-not-exists
*
* @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

@ -8,71 +8,75 @@
$config_cascade = array_merge(
array(
'main' => array(
'default' => array(DOKU_CONF.'dokuwiki.php'),
'local' => array(DOKU_CONF.'local.php'),
'protected' => array(DOKU_CONF.'local.protected.php'),
),
'acronyms' => array(
'default' => array(DOKU_CONF.'acronyms.conf'),
'local' => array(DOKU_CONF.'acronyms.local.conf'),
),
'entities' => array(
'default' => array(DOKU_CONF.'entities.conf'),
'local' => array(DOKU_CONF.'entities.local.conf'),
),
'default' => array(DOKU_CONF . 'dokuwiki.php'),
'local' => array(DOKU_CONF . 'local.php'),
'protected' => array(DOKU_CONF . 'local.protected.php'),
),
'acronyms' => array(
'default' => array(DOKU_CONF . 'acronyms.conf'),
'local' => array(DOKU_CONF . 'acronyms.local.conf'),
),
'entities' => array(
'default' => array(DOKU_CONF . 'entities.conf'),
'local' => array(DOKU_CONF . 'entities.local.conf'),
),
'interwiki' => array(
'default' => array(DOKU_CONF.'interwiki.conf'),
'local' => array(DOKU_CONF.'interwiki.local.conf'),
),
'default' => array(DOKU_CONF . 'interwiki.conf'),
'local' => array(DOKU_CONF . 'interwiki.local.conf'),
),
'license' => array(
'default' => array(DOKU_CONF.'license.php'),
'local' => array(DOKU_CONF.'license.local.php'),
),
'default' => array(DOKU_CONF . 'license.php'),
'local' => array(DOKU_CONF . 'license.local.php'),
),
'mediameta' => array(
'default' => array(DOKU_CONF.'mediameta.php'),
'local' => array(DOKU_CONF.'mediameta.local.php'),
),
'mime' => array(
'default' => array(DOKU_CONF.'mime.conf'),
'local' => array(DOKU_CONF.'mime.local.conf'),
),
'scheme' => array(
'default' => array(DOKU_CONF.'scheme.conf'),
'local' => array(DOKU_CONF.'scheme.local.conf'),
),
'smileys' => array(
'default' => array(DOKU_CONF.'smileys.conf'),
'local' => array(DOKU_CONF.'smileys.local.conf'),
),
'default' => array(DOKU_CONF . 'mediameta.php'),
'local' => array(DOKU_CONF . 'mediameta.local.php'),
),
'mime' => array(
'default' => array(DOKU_CONF . 'mime.conf'),
'local' => array(DOKU_CONF . 'mime.local.conf'),
),
'scheme' => array(
'default' => array(DOKU_CONF . 'scheme.conf'),
'local' => array(DOKU_CONF . 'scheme.local.conf'),
),
'smileys' => array(
'default' => array(DOKU_CONF . 'smileys.conf'),
'local' => array(DOKU_CONF . 'smileys.local.conf'),
),
'wordblock' => array(
'default' => array(DOKU_CONF.'wordblock.conf'),
'local' => array(DOKU_CONF.'wordblock.local.conf'),
),
'default' => array(DOKU_CONF . 'wordblock.conf'),
'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'
),
'acl' => array(
'default' => DOKU_CONF.'acl.auth.php',
),
'default' => array(DOKU_CONF . 'userscript.js')
),
'acl' => array(
'default' => DOKU_CONF . 'acl.auth.php',
),
'plainauth.users' => array(
'default' => DOKU_CONF.'users.auth.php',
),
'default' => DOKU_CONF . 'users.auth.php',
),
'plugins' => array(
'default' => array(DOKU_CONF.'plugins.php'),
'local' => array(DOKU_CONF.'plugins.local.php'),
'default' => array(DOKU_CONF . 'plugins.php'),
'local' => array(DOKU_CONF . 'plugins.local.php'),
'protected' => array(
DOKU_CONF.'plugins.required.php',
DOKU_CONF.'plugins.protected.php',
),
DOKU_CONF . 'plugins.required.php',
DOKU_CONF . 'plugins.protected.php',
),
),
$config_cascade
'lang' => array(
'core' => array(DOKU_CONF . 'lang/'),
'plugin' => array(DOKU_CONF . 'plugin_lang/'),
'template' => array(DOKU_CONF . 'template_lang/')
)
),
$config_cascade
);

View File

@ -14,6 +14,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

View File

@ -27,6 +27,9 @@ class Doku_Event {
/**
* event constructor
*
* @param string $name
* @param mixed $data
*/
function Doku_Event($name, &$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;
}
}
/**
@ -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

@ -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
@ -121,12 +122,13 @@ function rfc2231_encode($name, $value, $charset='utf-8', $lang='en') {
* 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;
@ -174,6 +176,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,6 +52,7 @@ 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) {
@ -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,6 +394,7 @@ 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()) {
@ -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,6 +755,9 @@ 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'].']" ' : '';
@ -708,6 +773,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 +797,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 +821,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 +847,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 +875,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 +904,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 +936,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 +965,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 +1013,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,10 +224,16 @@ 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'];
if (preg_match('/(?:^| )@(\w+)/', $id, $matches)) {
if (preg_match('/(?:^| )(?:@|ns:)([\w:]+)/', $id, $matches)) {
$ns = cleanID($matches[1]) . ':';
$id = str_replace($matches[0], '', $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

@ -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,6 +173,15 @@ 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){
global $conf;
@ -213,15 +234,18 @@ function html_btn($name,$id,$akey,$params,$method='get',$tooltip='',$label=false
}
/**
* 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;
global $REV;
global $HIGH;
global $INFO;
global $DATE_AT;
//disable section editing for old revisions or in preview
if($txt || $REV){
$secedit = false;
@ -241,8 +265,8 @@ function html_show($txt=null){
echo '</div></div>';
}else{
if ($REV) print p_locale_xhtml('showrev');
$html = p_wiki_xhtml($ID,$REV,true);
if ($REV||$DATE_AT) print p_locale_xhtml('showrev');
$html = p_wiki_xhtml($ID,$REV,true,$DATE_AT);
$html = html_secedit($html,$secedit);
if($INFO['prependTOC']) $html = tpl_toc(true).$html;
$html = html_hilight($html,$HIGH);
@ -281,6 +305,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;
@ -299,6 +327,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]);
@ -314,15 +345,17 @@ function html_hilight_callback($m) {
* @author Andreas Gohr <andi@splitbrain.org>
*/
function html_search(){
global $QUERY;
global $QUERY, $ID;
global $lang;
$intro = p_locale_xhtml('searchpage');
// allow use of placeholder in search intro
$pagecreateinfo = (auth_quickaclcheck($ID) >= AUTH_CREATE) ? $lang['searchcreatepage'] : '';
$intro = str_replace(
array('@QUERY@','@SEARCH@'),
array(hsc(rawurlencode($QUERY)),hsc($QUERY)),
$intro);
array('@QUERY@', '@SEARCH@', '@CREATEPAGEINFO@'),
array(hsc(rawurlencode($QUERY)), hsc($QUERY), $pagecreateinfo),
$intro
);
echo $intro;
flush();
@ -422,6 +455,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;
@ -643,6 +679,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;
@ -830,6 +869,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;
@ -858,6 +899,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;
@ -888,10 +932,23 @@ 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;
$class = '';
$id = '';
if($item['type'] == "f"){
return '<li class="level'.$item['level'].'">';
// scroll to the current item
if($item['id'] == $INFO['id']) {
$id = ' id="scroll__here"';
$class = ' bounce';
}
return '<li class="level'.$item['level'].$class.'" '.$id.'>';
}elseif($item['open']){
return '<li class="open">';
}else{
@ -903,6 +960,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'].'">';
@ -926,7 +986,7 @@ 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)
* @return string html of an unordered list
@ -1018,12 +1078,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;
@ -1479,7 +1540,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) {
@ -1518,6 +1579,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;
@ -1678,7 +1742,6 @@ function html_edit(){
global $lang;
global $conf;
global $TEXT;
global $RANGE;
if ($INPUT->has('changecheck')) {
$check = $INPUT->str('changecheck');
@ -1780,6 +1843,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) {
@ -1799,6 +1863,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;
@ -1899,6 +1965,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')) {
@ -2077,6 +2144,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 '';
@ -2095,6 +2165,9 @@ function html_TOC($toc){
/**
* Callback for html_buildlist
*
* @param array $item
* @return string html
*/
function html_list_toc($item){
if(isset($item['hid'])){
@ -2129,6 +2202,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
*/
@ -2141,6 +2215,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,6 +1070,7 @@ 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) {
@ -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,6 +1112,7 @@ 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) {
@ -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;
@ -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() {
@ -1312,7 +1356,8 @@ 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) {
@ -1441,6 +1486,10 @@ 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;
@ -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;
@ -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;
@ -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){
@ -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);
}
}
@ -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

@ -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();
@ -201,6 +193,14 @@ if (empty($plugin_controller_class)) $plugin_controller_class = 'Doku_Plugin_Con
// load libraries
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();
@ -259,17 +259,33 @@ function init_paths(){
$conf['media_changelog'] = $conf['metadir'].'/_media.changes';
}
/**
* Load the language strings
*
* @param string $langCode language code, as passed by event handler
*/
function init_lang($langCode) {
//prepare language array
global $lang;
global $lang, $config_cascade;
$lang = array();
//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')) {
include($config_file . 'en/lang.php');
}
}
if ($langCode && $langCode != 'en') {
if (file_exists(DOKU_INC."inc/lang/$langCode/lang.php")) {
require(DOKU_INC."inc/lang/$langCode/lang.php");
}
foreach ($config_cascade['lang']['core'] as $config_file) {
if (@file_exists($config_file . "$langCode/lang.php")) {
include($config_file . "$langCode/lang.php");
}
}
}
}
@ -456,10 +472,6 @@ function getBaseURL($abs=null){
$port = '';
}
if(!$port && isset($_SERVER['SERVER_PORT'])) {
$port = $_SERVER['SERVER_PORT'];
}
if(is_null($port)){
$port = '';
}
@ -490,6 +502,14 @@ function getBaseURL($abs=null){
* @returns bool true when SSL is active
*/
function is_ssl(){
// check if we are behind a reverse proxy
if (isset($_SERVER['HTTP_X_FORWARDED_PROTO'])) {
if ($_SERVER['HTTP_X_FORWARDED_PROTO'] == 'https') {
return true;
} else {
return false;
}
}
if (!isset($_SERVER['HTTPS']) ||
preg_match('/^(|off|false|disabled)$/i',$_SERVER['HTTPS'])){
return false;

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,6 +98,10 @@ 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
*/
function io_readFile($file,$clean=true){
$ret = '';
@ -108,9 +122,12 @@ function io_readFile($file,$clean=true){
}
/**
* Returns the content of a .bz2 compressed file as string
*
* @author marcel senf <marcel@rucksackreinigung.de>
*
* @param string $file filename
* @return string content
*/
function bzfile($file){
$bz = bzopen($file,"r");
$str = '';
@ -138,6 +155,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 +172,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) {
@ -168,7 +194,11 @@ 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;
@ -221,6 +251,10 @@ function io_saveFile($file,$content,$append=false){
* 2005-10-14 : added regex option -- Christopher Smith <chris@jalakai.co.uk>
*
* @author Steven Danz <steven-danz@kc.rr.com>
*
* @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){
@ -285,6 +319,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 +347,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 +369,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
@ -365,6 +406,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,6 +422,9 @@ 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;
@ -454,6 +500,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 +537,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 +567,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;
@ -563,6 +621,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 +644,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

@ -9,6 +9,7 @@
* @author uahello@gmail.com
* @author Ahmad Abd-Elghany <tolpa1@gmail.com>
* @author alhajr <alhajr300@gmail.com>
* @author Mohamed Belhsine <b.mohamed897@gmail.com>
*/
$lang['encoding'] = 'utf-8';
$lang['direction'] = 'rtl';
@ -53,6 +54,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'] = 'كلمة السر';
@ -68,6 +71,7 @@ $lang['badpassconfirm'] = 'عذراً,كلمة السر غير صحيحة
$lang['minoredit'] = 'تعديلات طفيفة';
$lang['draftdate'] = 'حفظ المسودات آليا مفعّل';
$lang['nosecedit'] = 'غُيرت الصفحة في هذه الأثناء، معلومات الجزء اصبحت قديمة. حُمُلت كل الصفحة بدلا.';
$lang['searchcreatepage'] = 'إن لم تجد ما تبحث عنه، يمكنك إنشاء صفحة جديدة بعنوان ما تبحث عنة بالضغط على زر "حرر هذه الصفحة".';
$lang['regmissing'] = 'عذرا، عليك ملء جميع الحقول.';
$lang['reguexists'] = 'عذرا، يوجد مشترك بنفس الاسم.';
$lang['regsuccess'] = 'أنشئ المستخدم و ارسلت كلمة السر بالبريد.';
@ -86,6 +90,7 @@ $lang['profdeleteuser'] = 'احذف حساب';
$lang['profdeleted'] = 'حسابك الخاص تم حذفه من هذه الموسوعة';
$lang['profconfdelete'] = 'أنا أرغب في حذف حسابي من هذه الموسوعة.<br/>
هذا الحدث غير ممكن.';
$lang['profconfdeletemissing'] = 'لم تقم بوضع علامة في مربع التأكيد';
$lang['pwdforget'] = 'أنسيت كلمة السر؟ احصل على واحدة جديدة';
$lang['resendna'] = 'هذه الويكي لا تدعم إعادة إرسال كلمة المرور.';
$lang['resendpwd'] = 'اضبط كلمة سر جديدة لـ';
@ -183,6 +188,11 @@ $lang['difflink'] = 'رابط إلى هذه المقارنة';
$lang['diff_type'] = 'أظهر الفروق:';
$lang['diff_inline'] = 'ضمنا';
$lang['diff_side'] = 'جنبا إلى جنب';
$lang['diffprevrev'] = 'المراجعة السابقة';
$lang['diffnextrev'] = 'المراجعة التالية';
$lang['difflastrev'] = 'المراجعة الأخيرة';
$lang['diffbothprevrev'] = 'جانبي المراجعة السابقة';
$lang['diffbothnextrev'] = 'جانبي المراجعة التالية';
$lang['line'] = 'سطر';
$lang['breadcrumb'] = 'أثر:';
$lang['youarehere'] = 'أنت هنا:';
@ -239,7 +249,6 @@ $lang['admin_register'] = 'أضف مستخدما جديدا';
$lang['metaedit'] = 'تحرير البيانات الشمولية ';
$lang['metasaveerr'] = 'فشلت كتابة البيانات الشمولية';
$lang['metasaveok'] = 'حُفظت البيانات الشمولية';
$lang['btn_img_backto'] = 'عودة إلى %s';
$lang['img_title'] = 'العنوان:';
$lang['img_caption'] = 'وصف:';
$lang['img_date'] = 'التاريخ:';
@ -252,7 +261,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'] = 'ليس هناك عنوان مرتبط بولوجك، لا يمكن اضافتك لقائمة الاشتراك';
@ -287,6 +295,7 @@ $lang['i_phpver'] = 'نسخة PHP التي لديك هي
وهي أقل من النسخة المطلوبة
<code>%s</code>
عليك تحديث نسخة PHP';
$lang['i_mbfuncoverload'] = 'يجب ايقاف تشغيل mbstring.func_overload في ملف php.ini لتشغيل دوكوويكي.';
$lang['i_permfail'] = 'إن <code>%s</code> غير قابل للكتابة بواسطة دوكو ويكي، عليك تعديل إعدادات الصلاحيات لهذا المجلد!';
$lang['i_confexists'] = 'إن <code>%s</code> موجود أصلاً';
$lang['i_writeerr'] = 'لا يمكن إنشاء <code>%s</code>، عليك التأكد من صلاحيات الملف أو المجلد وإنشاء الملف يدوياً.';
@ -340,4 +349,5 @@ $lang['media_update'] = 'ارفع إصدارا أحدث';
$lang['media_restore'] = 'استرجع هذه النسخة';
$lang['currentns'] = 'مساحة الاسم الحالية';
$lang['searchresult'] = 'نتيجة البحث';
$lang['plainhtml'] = 'نص HTML غير منسق';
$lang['wikimarkup'] = 'علامات الوكي';

View File

@ -1,5 +1,5 @@
====== بحث ======
نتائج البحث . إن لم تجد ما تبحث عنه، يمكنك إنشاء صفحة جديدة بعنوان ما تبحث عنة بالضغط على زر "حرر هذه الصفحة".
نتائج البحث . @CREATEPAGEINFO@
===== نتائج البحث =====

View File

@ -58,6 +58,7 @@ $lang['badlogin'] = 'Təssüf ki istifadəçi adı və ya şifrə s
$lang['minoredit'] = 'Az dəyişiklər';
$lang['draftdate'] = 'Qaralama yadda saxlandı';
$lang['nosecedit'] = 'Bu vaxt ərzində səhifə dəyişilmişdir, və bölmə haqqında məlumat köhnəlmişdir. Səhifənin tam versiyası yüklənmişdir.';
$lang['searchcreatepage'] = "Əgər Siz axtardığınızı tapa bilmədinizsə, onda Siz adı axtarışınız ilə uyğun düşən yeni səhifə yarada bilərsiniz. Bunu eləmək üçün, sadəcə ''Səhifəni yarat'' düyməsini sıxın.";
$lang['regmissing'] = 'Təssüf ki Siz bütün xanələri doldurmalısınız.';
$lang['reguexists'] = 'Təssüf ki bu ad ilə istifadəçi artıq mövcuddur.';
$lang['regsuccess'] = 'İstivadəci yaradıldı və şifrə sizin e-maila göndərildi.';

View File

@ -1,5 +1,5 @@
====== Axtarış ======
Qarşınızda - axtarışın nəticələridir. Əgər Siz axtardığınızı tapa bilmədinizsə, onda Siz adı axtarışınız ilə uyğun düşən yeni səhifə yarada bilərsiniz. Bunu eləmək üçün, sadəcə ''Səhifəni yarat'' düyməsini sıxın.
Qarşınızda - axtarışın nəticələridir. @CREATEPAGEINFO@
===== Nəticələr =====

View File

@ -66,6 +66,7 @@ $lang['badpassconfirm'] = 'За съжаление паролата е г
$lang['minoredit'] = 'Промените са незначителни';
$lang['draftdate'] = 'Черновата е автоматично записана на';
$lang['nosecedit'] = 'Страницата бе междувременно променена, презареждане на страницата поради неактуална информация.';
$lang['searchcreatepage'] = 'Ако не намирате каквото сте търсили, може да създадете или редактирате страница, кръстена на вашата заявка, чрез съответния бутон.';
$lang['regmissing'] = 'Моля, попълнете всички полета.';
$lang['reguexists'] = 'Вече съществува потребител с избраното име.';
$lang['regsuccess'] = 'Потребителят е създаден, а паролата е пратена по електронната поща.';

View File

@ -1,5 +1,5 @@
====== Търсене ======
Резултата от търсенето ще намерите по-долу. Ако не намирате каквото сте търсили, може да създадете или редактирате страница, кръстена на вашата заявка, чрез съответния бутон.
Резултата от търсенето ще намерите по-долу. @CREATEPAGEINFO@
===== Резултати =====

View File

@ -59,6 +59,7 @@ $lang['badlogin'] = 'Disculpe, pero el nom d\'usuari o la contrasen
$lang['minoredit'] = 'Canvis menors';
$lang['draftdate'] = 'Borrador gravat el';
$lang['nosecedit'] = 'La pàgina ha canviat mentres tant, l\'informació de la secció no estava al dia, s\'ha carregat la pàgina sancera.';
$lang['searchcreatepage'] = 'Si no ha trobat lo que buscava pot crear o editar una pàgina en el mateix nom que el text que ha buscat utilisant el botó corresponent.';
$lang['regmissing'] = 'Disculpe, pero deu omplir tots els camps.';
$lang['reguexists'] = 'Disculpe, pero ya existix un usuari en este nom.';
$lang['regsuccess'] = 'S\'ha creat l\'usuari i se li ha enviat la contrasenya per correu electrònic.';

View File

@ -1,5 +1,5 @@
====== Buscar ======
Pot vore els resultats de la busca ací avall. Si no ha trobat lo que buscava pot crear o editar una pàgina en el mateix nom que el text que ha buscat utilisant el botó corresponent.
Pot vore els resultats de la busca ací avall. @CREATEPAGEINFO@
===== Resultats =====

View File

@ -62,6 +62,7 @@ $lang['badlogin'] = 'Nom d\'usuari o contrasenya incorrectes.';
$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['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.';

View File

@ -1,5 +1,5 @@
====== Cerca ======
Heus ací els resultats de la cerca. Si no trobeu allò que buscàveu, podeu crear una pàgina nova per mitjà del botó ''Edita aquesta pàgina''.
Heus ací els resultats de la cerca. @CREATEPAGEINFO@
===== Resultats =====

View File

@ -17,6 +17,8 @@
* @author Zbyněk Křivka <krivka@fit.vutbr.cz>
* @author Petr Klíma <qaxi@seznam.cz>
* @author Radovan Buroň <radovan@buron.cz>
* @author Viktor Zavadil <vzavadil@newps.cz>
* @author Jaroslav Lichtblau <jlichtblau@seznam.cz>
*/
$lang['encoding'] = 'utf-8';
$lang['direction'] = 'ltr';
@ -49,7 +51,7 @@ $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';
@ -68,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';
@ -78,18 +80,19 @@ $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['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['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';
@ -102,8 +105,8 @@ $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:';
@ -194,6 +197,11 @@ $lang['difflink'] = 'Odkaz na výstup diff';
$lang['diff_type'] = 'Zobrazit rozdíly:';
$lang['diff_inline'] = 'Vložené';
$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í:';
@ -270,14 +278,14 @@ $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';
@ -289,6 +297,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ě.';
@ -342,3 +351,5 @@ $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

@ -1,5 +1,5 @@
====== Vyhledávání ======
Výsledky hledání můžete vidět níže. Pokud jste nenašli, co hledáte, zkuste požadovanou stránku sami vytvořit stisknutím tlačítka ''Vytvořit stránku''.
Výsledky hledání můžete vidět níže. @CREATEPAGEINFO@
===== Výsledky =====

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

@ -17,6 +17,8 @@
* @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>
*/
$lang['encoding'] = 'utf-8';
$lang['direction'] = 'ltr';
@ -61,6 +63,8 @@ $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';
@ -76,6 +80,7 @@ $lang['badpassconfirm'] = 'Kodeordet 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['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.';
@ -147,6 +152,7 @@ $lang['js']['restore_confirm'] = 'Vil du virkeligt 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_portions'] = 'Skub';
$lang['js']['media_select'] = 'Vælg filer...';
$lang['js']['media_upload_btn'] = 'Upload';
$lang['js']['media_done_btn'] = 'Færdig';
@ -190,6 +196,11 @@ $lang['difflink'] = 'Link til denne sammenlinings vising';
$lang['diff_type'] = 'Vis forskelle:';
$lang['diff_inline'] = 'Indeni';
$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:';
@ -246,7 +257,6 @@ $lang['admin_register'] = 'Tilføj ny bruger';
$lang['metaedit'] = 'Rediger metadata';
$lang['metasaveerr'] = 'Skrivning af metadata fejlede';
$lang['metasaveok'] = 'Metadata gemt';
$lang['btn_img_backto'] = 'Tilbage til %s';
$lang['img_title'] = 'Titel:';
$lang['img_caption'] = 'Billedtekst:';
$lang['img_date'] = 'Dato:';
@ -259,7 +269,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';
@ -289,6 +298,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.';
@ -300,10 +310,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';
@ -336,3 +348,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

@ -1,5 +1,5 @@
====== Søgning ======
Du kan se resultaterne af din søgning nedenunder. 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]''**.
Du kan se resultaterne af din søgning nedenunder. @CREATEPAGEINFO@
===== Søgeresultater =====

View File

@ -81,6 +81,7 @@ $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['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.';

View File

@ -1,6 +1,6 @@
====== Suche ======
Unten sind die Ergebnisse deiner Suche gelistet. 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.
Unten sind die Ergebnisse deiner Suche gelistet. @CREATEPAGEINFO@
===== Ergebnisse =====

View File

@ -1,5 +1,5 @@
====== Links hierher ======
Dies ist eine Liste der Seiten, welche zurück zur momentanen Seite verlinken.
Dies ist eine Liste der Seiten, welche zurück zur momentanen Seite führen.

View File

@ -26,6 +26,8 @@
* @author Joerg <scooter22@gmx.de>
* @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>
*/
$lang['encoding'] = 'utf-8';
$lang['direction'] = 'ltr';
@ -87,6 +89,7 @@ $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['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.';
@ -204,6 +207,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:';
@ -299,6 +304,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. Sie sollten 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 Ihrem Hoster deaktiviert?';
$lang['i_phpver'] = 'Ihre PHP-Version <code>%s</code> ist niedriger als die benötigte Version <code>%s</code>. Bitte aktualisieren Sie Ihre PHP-Installation.';
$lang['i_mbfuncoverload'] = 'Um DokuWiki zu starten muss mbstring.func_overload in php.ini ausgeschaltet sein.';
$lang['i_permfail'] = '<code>%s</code> ist nicht durch DokuWiki beschreibbar. Sie müssen die Berechtigungen dieses Ordners ändern!';
$lang['i_confexists'] = '<code>%s</code> existiert bereits';
$lang['i_writeerr'] = '<code>%s</code> konnte nicht erzeugt werden. Sie sollten die Verzeichnis-/Datei-Rechte überprüfen und die Datei manuell anlegen.';
@ -352,3 +358,5 @@ $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 herf="%s">%s</a>';
$lang['unable_to_parse_date'] = 'Parameter "%s" kann nicht geparsed werden.';

View File

@ -1,6 +1,6 @@
====== Suche ======
Unten sind die Ergebnisse Ihrer Suche gelistet. 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.
Unten sind die Ergebnisse Ihrer Suche gelistet. @CREATEPAGEINFO@
===== Ergebnisse =====

View File

@ -1,4 +1,4 @@
====== Αναζήτηση ======
Τα αποτελέσματα της αναζήτησής σας:
Τα αποτελέσματα της αναζήτησής σας. @CREATEPAGEINFO@

View File

@ -70,6 +70,7 @@ $lang['badpassconfirm'] = 'Sorry, the password was wrong';
$lang['minoredit'] = 'Minor Changes';
$lang['draftdate'] = 'Draft autosaved on'; // full dformat date will be added
$lang['nosecedit'] = 'The page was changed in the meantime, section info was out of date loaded full page instead.';
$lang['searchcreatepage'] = 'If you didn\'t find what you were looking for, you can create or edit the page named after your query with the appropriate tool.';
$lang['regmissing'] = 'Sorry, you must fill in all fields.';
$lang['reguexists'] = 'Sorry, a user with this login already exists.';
@ -367,4 +368,6 @@ $lang['currentns'] = 'Current namespace';
$lang['searchresult'] = 'Search Result';
$lang['plainhtml'] = 'Plain HTML';
$lang['wikimarkup'] = 'Wiki Markup';
$lang['page_nonexist_rev'] = 'Page did not exist at %s. It was subsequently created at <a href="%s">%s</a>.';
$lang['unable_to_parse_date'] = 'Unable to parse at parameter "%s".';
//Setup VIM: ex: et ts=2 :

View File

@ -1,5 +1,5 @@
====== Search ======
You can find the results of your search below. If you didn't find what you were looking for, you can create or edit the page named after your query with the appropriate tool.
You can find the results of your search below. @CREATEPAGEINFO@
===== Results =====

View File

@ -71,6 +71,7 @@ $lang['badpassconfirm'] = 'Pardonu, la pasvorto malĝustis';
$lang['minoredit'] = 'Etaj modifoj';
$lang['draftdate'] = 'Lasta konservo de la skizo:';
$lang['nosecedit'] = 'La paĝo ŝanĝiĝis intertempe, sekcio-informo estis malĝisdata, tial la tuta paĝo estas reŝargita.';
$lang['searchcreatepage'] = 'Se vi ne trovis tion, kion vi serĉis, vi povas krei novan paĝon kun necesa nomo per la koresponda butono.';
$lang['regmissing'] = 'Pardonu, vi devas plenigi ĉiujn kampojn.';
$lang['reguexists'] = 'Pardonu, ĉi tiu uzanto-nomo jam ekzistas.';
$lang['regsuccess'] = 'La uzanto kreiĝis kaj la pasvorto sendiĝis per retpoŝto.';

View File

@ -1,5 +1,5 @@
====== Serĉo ======
Sube estas rezultoj de serĉo en la retejo.\\ Se vi ne trovis tion, kion vi serĉis, vi povas krei novan paĝon kun necesa nomo per la koresponda butono.
Sube estas rezultoj de serĉo en la retejo.\\ @CREATEPAGEINFO@
===== Rezultoj =====

View File

@ -98,6 +98,7 @@ $lang['badpassconfirm'] = 'Lo siento, la contraseña es errónea';
$lang['minoredit'] = 'Cambios menores';
$lang['draftdate'] = 'Borrador guardado automáticamente:';
$lang['nosecedit'] = 'La página ha cambiado en el lapso, la información de sección estaba anticuada, en su lugar se cargó la página completa.';
$lang['searchcreatepage'] = "Si no has encontrado lo que buscabas, puedes crear una nueva página con tu consulta utilizando el botón ''Crea esta página''.";
$lang['regmissing'] = 'Lo siento, tienes que completar todos los campos.';
$lang['reguexists'] = 'Lo siento, ya existe un usuario con este nombre.';
$lang['regsuccess'] = 'El usuario ha sido creado y la contraseña se ha enviado por correo.';

View File

@ -1,5 +1,5 @@
====== Búsqueda ======
Puedes encontrar los resultados de tu búsqueda abajo. Si no has encontrado lo que buscabas, puedes crear una nueva página con tu consulta utilizando el botón ''Crea esta página''.
Puedes encontrar los resultados de tu búsqueda abajo. @CREATEPAGEINFO@
===== Resultados =====

View File

@ -69,6 +69,7 @@ $lang['badpassconfirm'] = 'Väär salasõna';
$lang['minoredit'] = 'Ebaolulised muudatused';
$lang['draftdate'] = 'Mustand automaatselt salvestatud';
$lang['nosecedit'] = 'Leht on vahepeal muutunud, jaotiste teave osutus aegunuks sestap laeti tervelehekülg.';
$lang['searchcreatepage'] = "Kui Sa otsitavat ei leidnud võid tekitada oma otsingu nimelise uue lehe kasutades ''Toimeta seda lehte'' nuppu.";
$lang['regmissing'] = 'Kõik väljad tuleb ära täita.';
$lang['reguexists'] = 'Tegelikult on sellise nimega kasutaja juba olemas.';
$lang['regsuccess'] = 'Kasutaja sai tehtud. Parool saadeti Sulle e-posti aadressil.';

View File

@ -1,5 +1,5 @@
====== Otsi ======
Leiad vasted oma otsingule. Kui Sa otsitavat ei leidnud võid tekitada oma otsingu nimelise uue lehe kasutades ''Toimeta seda lehte'' nuppu.
Leiad vasted oma otsingule. @CREATEPAGEINFO@
===== Vasted =====

View File

@ -1,11 +1,12 @@
<?php
/**
* Basque language file
*
* @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
*
* @author Xabi Ezpeleta <xezpeleta@mendikute.com>
* @author Inko Illarramendi <inko.i.a@gmail.com>
* @author Zigor Astarbe <astarbe@gmail.com>
* @author Yadav Gowda <yadav.gowda@gmail.com>
*/
$lang['encoding'] = 'utf-8';
$lang['direction'] = 'ltr';
@ -49,6 +50,9 @@ $lang['btn_revert'] = 'Berrezarri';
$lang['btn_register'] = 'Erregistratu';
$lang['btn_apply'] = 'Baieztatu';
$lang['btn_media'] = 'Media Kudeatzailea';
$lang['btn_deleteuser'] = 'Nire kontua kendu';
$lang['btn_img_backto'] = 'Atzera hona %s';
$lang['btn_mediaManager'] = 'Media kudeatzailean ikusi';
$lang['loggedinas'] = 'Erabiltzailea:';
$lang['user'] = 'Erabiltzailea';
$lang['pass'] = 'Pasahitza';
@ -63,6 +67,7 @@ $lang['badlogin'] = 'Barkatu, prozesuak huts egin du; saiatu berriz
$lang['minoredit'] = 'Aldaketa Txikiak';
$lang['draftdate'] = 'Zirriborroa automatikoki gorde da hemen:';
$lang['nosecedit'] = 'Orria aldatua izan da bitartean, info atala zaharkituta geratu da, orri osoa kargatu da horren ordez.';
$lang['searchcreatepage'] = 'Bilatzen zabiltzana aurkitu ez baduzu, zuk zeuk sortu dezakezu orri berri bat bilaketa ostean \'\'Sortu orri hau\'\' erabiliz.';
$lang['regmissing'] = 'Barkatu, hutsune guztiak bete behar dituzu.';
$lang['reguexists'] = 'Barkatu, izen bereko erabiltzailea existitzen da.';
$lang['regsuccess'] = 'Erabiltzailea sortu da. Pasahitza mailez bidaliko zaizu.';
@ -76,6 +81,7 @@ $lang['profna'] = 'Wiki honek ez du profilaren aldaketa ahalbidet
$lang['profnochange'] = 'Aldaketarik ez, ez dago egiteko ezer.';
$lang['profnoempty'] = 'Izen edota e-posta hutsa ez dago onartua.';
$lang['profchanged'] = 'Erabiltzaile profila arrakastaz eguneratua.';
$lang['profdeleteuser'] = 'Kontua ezabatu';
$lang['pwdforget'] = 'Pasahitza ahaztu duzu? Eskuratu berri bat';
$lang['resendna'] = 'Wiki honek ez du pasahitz berbidalketa onartzen.';
$lang['resendpwd'] = '-entzat pasahitza berria ezarri';
@ -227,7 +233,6 @@ $lang['admin_register'] = 'Erabiltzaile berria gehitu';
$lang['metaedit'] = 'Metadatua Aldatu';
$lang['metasaveerr'] = 'Metadatuaren idazketak huts egin du';
$lang['metasaveok'] = 'Metadatua gordea';
$lang['btn_img_backto'] = 'Atzera hona %s';
$lang['img_title'] = 'Izenburua:';
$lang['img_caption'] = 'Epigrafea:';
$lang['img_date'] = 'Data:';
@ -240,7 +245,6 @@ $lang['img_camera'] = 'Kamera:';
$lang['img_keywords'] = 'Hitz-gakoak:';
$lang['img_width'] = 'Zabalera:';
$lang['img_height'] = 'Altuera:';
$lang['btn_mediaManager'] = 'Media kudeatzailean ikusi';
$lang['subscr_subscribe_success'] = '%s gehitua %s-ren harpidetza zerrendara';
$lang['subscr_subscribe_error'] = 'Errorea %s gehitzen %s-ren harpidetza zerrendara';
$lang['subscr_subscribe_noaddress'] = 'Ez dago helbiderik zure login-arekin lotuta, ezin zara harpidetza zerrendara gehitua izan.';

View File

@ -1,5 +1,5 @@
====== Bilaketa ======
Emaitzak ondorengo aurkiketan bilatu ditzakezu. Bilatzen zabiltzana aurkitu ez baduzu, zuk zeuk sortu dezakezu orri berri bat bilaketa ostean ''Sortu orri hau'' erabiliz.
Emaitzak ondorengo aurkiketan bilatu ditzakezu. @CREATEPAGEINFO@
===== Bilaketa emaitzak: =====

View File

@ -12,6 +12,9 @@
* @author mehrdad <mehrdad.jafari.bojd@gmail.com>
* @author reza_khn <reza_khn@yahoo.com>
* @author Hamid <zarrabi@sharif.edu>
* @author Mohamad Mehdi Habibi <habibi.esf@gmail.com>
* @author Mohammad Sadegh <msdn2013@gmail.com>
* @author Omid Hezaveh <hezpublic@gmail.com>
*/
$lang['encoding'] = 'utf-8';
$lang['direction'] = 'rtl';
@ -73,6 +76,7 @@ $lang['badpassconfirm'] = 'متاسفم ، رمز عبور اشتباه
$lang['minoredit'] = 'این ویرایش خُرد است';
$lang['draftdate'] = 'ذخیره خودکار پیش‌نویس';
$lang['nosecedit'] = 'این صفحه در این میان تغییر کرده است، اطلاعات بخش قدیمی شده است، در عوض محتوای کل نمایش داده می‌شود.';
$lang['searchcreatepage'] = 'اگر به نتیجه‌ی مطلوبی نرسیده‌اید، می‌توانید صفحه‌ی مورد نظر را ایجاد کنید.';
$lang['regmissing'] = 'متاسفم، شما باید همه قسمت‌ها را پر کنید.';
$lang['reguexists'] = 'نام کاربری‌ای که وارد کردید قبلن استفاده شده است. خواهشمندیم یک نام دیگر انتخاب کنید.';
$lang['regsuccess'] = 'کاربر ساخته شد و گذرواژه به صورت ایمیل ارسال گردید.';

View File

@ -1,5 +1,5 @@
====== جستجو ======
نتایج جستجو در زیر آمده است. اگر به نتیجه‌ی مطلوبی نرسیده‌اید، می‌توانید صفحه‌ی مورد نظر را ایجاد کنید.
نتایج جستجو در زیر آمده است. @CREATEPAGEINFO@
===== نتایج =====

View File

@ -9,6 +9,7 @@
* @author Teemu Mattila <ghcsystems@gmail.com>
* @author Sami Olmari <sami@olmari.fi>
* @author Rami Lehti <rammer@ipi.fi>
* @author Jussi Takala <jussi.takala@live.fi>
*/
$lang['encoding'] = 'utf-8';
$lang['direction'] = 'ltr';
@ -53,6 +54,8 @@ $lang['btn_register'] = 'Rekisteröidy';
$lang['btn_apply'] = 'Toteuta';
$lang['btn_media'] = 'Media manager';
$lang['btn_deleteuser'] = 'Poista tilini';
$lang['btn_img_backto'] = 'Takaisin %s';
$lang['btn_mediaManager'] = 'Näytä mediamanagerissa';
$lang['loggedinas'] = 'Kirjautunut nimellä:';
$lang['user'] = 'Käyttäjänimi';
$lang['pass'] = 'Salasana';
@ -68,6 +71,7 @@ $lang['badpassconfirm'] = 'Valitan. Salasana oli väärin';
$lang['minoredit'] = 'Pieni muutos';
$lang['draftdate'] = 'Luonnos tallennettu automaattisesti';
$lang['nosecedit'] = 'Sivu on muuttunut välillä ja kappaleen tiedot olivat vanhentuneet. Koko sivu ladattu.';
$lang['searchcreatepage'] = 'Jos et löytänyt etsimääsi voit luoda uuden sivun tiedustelusi pohjalta käyttämällä \'\'Muokkaa tätä sivua\'\' -napilla.';
$lang['regmissing'] = 'Kaikki kentät tulee täyttää.';
$lang['reguexists'] = 'Käyttäjä tällä käyttäjänimellä on jo olemassa.';
$lang['regsuccess'] = 'Käyttäjä luotiin ja salasana lähetettiin sähköpostilla.';
@ -184,6 +188,9 @@ $lang['difflink'] = 'Linkki vertailunäkymään';
$lang['diff_type'] = 'Näytä eroavaisuudet:';
$lang['diff_inline'] = 'Sisäkkäin';
$lang['diff_side'] = 'Vierekkäin';
$lang['diffprevrev'] = 'Edellinen revisio';
$lang['diffnextrev'] = 'Seuraava revisio';
$lang['difflastrev'] = 'Viimeisin revisio';
$lang['line'] = 'Rivi';
$lang['breadcrumb'] = 'Jäljet:';
$lang['youarehere'] = 'Olet täällä:';
@ -240,7 +247,6 @@ $lang['admin_register'] = 'Lisää uusi käyttäjä';
$lang['metaedit'] = 'Muokkaa metadataa';
$lang['metasaveerr'] = 'Metadatan kirjoittaminen epäonnistui';
$lang['metasaveok'] = 'Metadata tallennettu';
$lang['btn_img_backto'] = 'Takaisin %s';
$lang['img_title'] = 'Otsikko:';
$lang['img_caption'] = 'Kuvateksti:';
$lang['img_date'] = 'Päivämäärä:';
@ -253,7 +259,6 @@ $lang['img_camera'] = 'Kamera:';
$lang['img_keywords'] = 'Avainsanat:';
$lang['img_width'] = 'Leveys:';
$lang['img_height'] = 'Korkeus:';
$lang['btn_mediaManager'] = 'Näytä mediamanagerissa';
$lang['subscr_subscribe_success'] = '%s lisätty %s tilauslistalle';
$lang['subscr_subscribe_error'] = 'Virhe lisättäessä %s tilauslistalle %s';
$lang['subscr_subscribe_noaddress'] = 'Login tiedoissasi ei ole sähköpostiosoitetta. Sinua ei voi lisätä tilaukseen';
@ -281,6 +286,7 @@ $lang['i_problems'] = 'Asennusohjelma löysi alla listattuja ongelmia
$lang['i_modified'] = 'Turvallisuussyistä tämä ohjelma toimii vain uusien ja muokkaamattomien Dokuwiki-asennusten kanssa. Pura tiedostot uudestaan asennuspaketista, tai lue <a href="http://dokuwiki.org/install">Dokuwikin asennusohje (englanniksi)</a>';
$lang['i_funcna'] = 'PHP:n funktio <code>%s</code> ei ole käytettävissä. Palveluntarjoajasi on saattanut poistaa sen jostain syystä.';
$lang['i_phpver'] = 'Käyttämäsi PHP-ohjelmiston versio <code>%s</code> on pienempi, kuin tarvitaan <code>%s</code>. PHP-asennuksesi pitää päivittää.';
$lang['i_mbfuncoverload'] = 'mbstring.func_overload pitää ottaa pois käytöstä php.ini -tiedostosta käyttääksesi DokuWikiä';
$lang['i_permfail'] = '<code>%s</code> ei ole DokuWikin kirjoitettavissa. Muokkaa hakemiston oikeuksia!';
$lang['i_confexists'] = '<code>%s</code> on jo olemassa';
$lang['i_writeerr'] = '<code>%s</code>n luonti epäonnistui. Tarkista hakemiston/tiedoston oikeudet ja luo tiedosto käsin.';
@ -334,3 +340,4 @@ $lang['currentns'] = 'Nykyinen nimiavaruus';
$lang['searchresult'] = 'Haun tulokset';
$lang['plainhtml'] = 'pelkkä HTML';
$lang['wikimarkup'] = 'Wiki markup';
$lang['unable_to_parse_date'] = 'Parametrin "%s" jäsennys ei onnistu.';

View File

@ -1,5 +1,5 @@
====== Etsi ======
Löydät etsinnän tulokset alta. Jos et löytänyt etsimääsi voit luoda uuden sivun tiedustelusi pohjalta käyttämällä ''Muokkaa tätä sivua'' -napilla.
Löydät etsinnän tulokset alta. @CREATEPAGEINFO@
===== Tulokset =====

View File

@ -59,6 +59,7 @@ $lang['badlogin'] = 'Skeivt brúkaranavn ella loyniorð.';
$lang['minoredit'] = 'Smærri broytingar';
$lang['draftdate'] = 'Goym kladdu sett frá';
$lang['nosecedit'] = 'Hendan síðan var broytt undir tilevnan, brotið var ikki rætt dagfest, heintaði fulla síðu í staðin';
$lang['searchcreatepage'] = "Um úrslitini ikki innihalda tað sum tú leitaði eftir kanst tú upprætta eitt nýtt skjal við sama navni sum leitingin við at trýsta á **''[Upprætta hetta skjal]''** knappin.";
$lang['regmissing'] = 'Tú skalt fylla út øll øki.';
$lang['reguexists'] = 'Hetta brúkaranavn er upptiki.';
$lang['regsuccess'] = 'Tú ert nú stovnavur sum brúkari. Títt loyniorð verður sent til tín í einum T-posti.';

View File

@ -1,5 +1,5 @@
====== Leiting ======
Tú kanst síggja úrslitini av tíni leiting niðanfyri. Um úrslitini ikki innihalda tað sum tú leitaði eftir kanst tú upprætta eitt nýtt skjal við sama navni sum leitingin við at trýsta á **''[Upprætta hetta skjal]''** knappin.
Tú kanst síggja úrslitini av tíni leiting niðanfyri. @CREATEPAGEINFO@
===== Leitiúrslit =====

View File

@ -1,4 +1,4 @@
====== Autorisation refusée ======
Désolé, vous n'avez pas suffisement d'autorisations pour poursuivre votre demande.
Désolé, vous n'avez pas suffisamment d'autorisations pour poursuivre votre demande.

View File

@ -35,6 +35,7 @@
* @author Caillot <remicaillot5@gmail.com>
* @author Schplurtz le Déboulonné <schplurtz@laposte.net>
* @author YoBoY <yoboy@ubuntu-fr.org>
* @author james <j.mccann@celcat.com>
*/
$lang['encoding'] = 'utf-8';
$lang['direction'] = 'ltr';
@ -77,7 +78,7 @@ $lang['btn_draftdel'] = 'Effacer le brouillon';
$lang['btn_revert'] = 'Restaurer';
$lang['btn_register'] = 'Créer un compte';
$lang['btn_apply'] = 'Appliquer';
$lang['btn_media'] = 'Gestionnaire de médias';
$lang['btn_media'] = 'Gestionnaire Multimédia';
$lang['btn_deleteuser'] = 'Supprimer mon compte';
$lang['btn_img_backto'] = 'Retour vers %s';
$lang['btn_mediaManager'] = 'Voir dans le gestionnaire de médias';
@ -96,6 +97,7 @@ $lang['badpassconfirm'] = 'Désolé, le mot de passe est erroné';
$lang['minoredit'] = 'Modification mineure';
$lang['draftdate'] = 'Brouillon enregistré automatiquement le';
$lang['nosecedit'] = 'La page a changé entre temps, les informations de la section sont obsolètes ; la page complète a été chargée à la place.';
$lang['searchcreatepage'] = 'Si vous n\'avez pas trouvé ce que vous cherchiez, vous pouvez créer ou modifier la page correspondante à votre requête en cliquant sur le bouton approprié.';
$lang['regmissing'] = 'Désolé, vous devez remplir tous les champs.';
$lang['reguexists'] = 'Désolé, ce nom d\'utilisateur est déjà pris.';
$lang['regsuccess'] = 'L\'utilisateur a été créé. Le mot de passe a été expédié par courriel.';
@ -360,7 +362,7 @@ $lang['media_perm_read'] = 'Désolé, vous n\'avez pas l\'autorisation de
$lang['media_perm_upload'] = 'Désolé, vous n\'avez pas l\'autorisation d\'envoyer des fichiers.';
$lang['media_update'] = 'Envoyer une nouvelle version';
$lang['media_restore'] = 'Restaurer cette version';
$lang['currentns'] = 'Namespace actuel';
$lang['currentns'] = 'Catégorie courante';
$lang['searchresult'] = 'Résultat de la recherche';
$lang['plainhtml'] = 'HTML brut';
$lang['wikimarkup'] = 'Wiki balise';

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