From 3a1a171b951828395a7578475e86e622f9a7205c Mon Sep 17 00:00:00 2001 From: Tom N Harris Date: Sun, 14 Nov 2010 14:17:52 -0500 Subject: Remove unused idx_touchIndex function --- inc/indexer.php | 16 ---------------- 1 file changed, 16 deletions(-) (limited to 'inc') diff --git a/inc/indexer.php b/inc/indexer.php index f5330040a..7a8bb3ff8 100644 --- a/inc/indexer.php +++ b/inc/indexer.php @@ -103,22 +103,6 @@ function idx_getIndex($pre, $wlen){ return file($fn); } -/** - * Create an empty index file if it doesn't exist yet. - * - * FIXME: This function isn't currently used. It will probably be removed soon. - * - * @author Tom N Harris - */ -function idx_touchIndex($pre, $wlen){ - global $conf; - $fn = $conf['indexdir'].'/'.$pre.$wlen.'.idx'; - if(!@file_exists($fn)){ - touch($fn); - if($conf['fperm']) chmod($fn, $conf['fperm']); - } -} - /** * Read a line ending with \n. * Returns false on EOF. -- cgit v1.2.3 From 4b9792c696658fe0cbedc187198fa463b6ff83fc Mon Sep 17 00:00:00 2001 From: Tom N Harris Date: Sun, 14 Nov 2010 14:22:08 -0500 Subject: Measure length of multi-character Asian words --- inc/indexer.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'inc') diff --git a/inc/indexer.php b/inc/indexer.php index 7a8bb3ff8..d9eccac76 100644 --- a/inc/indexer.php +++ b/inc/indexer.php @@ -52,8 +52,10 @@ function wordlen($w){ $l = strlen($w); // If left alone, all chinese "words" will get put into w3.idx // So the "length" of a "word" is faked - if(preg_match('/'.IDX_ASIAN2.'/u',$w)) - $l += ord($w) - 0xE1; // Lead bytes from 0xE2-0xEF + if(preg_match_all('/[\xE2-\xEF]/',$w,$leadbytes)) { + foreach($leadbytes[0] as $b) + $l += ord($b) - 0xE1; + } return $l; } -- cgit v1.2.3 From 4e1bf408de9297d5773cd8bfe1af997c83eab1a2 Mon Sep 17 00:00:00 2001 From: Tom N Harris Date: Sun, 14 Nov 2010 14:32:23 -0500 Subject: Refactor tokenizer to avoid splitting multiple times --- inc/indexer.php | 69 ++++++++++++++++++++++++++++++++++----------------------- 1 file changed, 41 insertions(+), 28 deletions(-) (limited to 'inc') diff --git a/inc/indexer.php b/inc/indexer.php index d9eccac76..56d80b7fa 100644 --- a/inc/indexer.php +++ b/inc/indexer.php @@ -203,8 +203,7 @@ function idx_getPageWords($page){ list($page,$body) = $data; - $body = strtr($body, "\r\n\t", ' '); - $tokens = explode(' ', $body); + $tokens = idx_tokenizer($body, $stopwords); $tokens = array_count_values($tokens); // count the frequency of each token // ensure the deaccented or romanised page names of internal links are added to the token array @@ -225,16 +224,12 @@ function idx_getPageWords($page){ } $words = array(); - foreach ($tokens as $word => $count) { - $arr = idx_tokenizer($word,$stopwords); - $arr = array_count_values($arr); - foreach ($arr as $w => $c) { - $l = wordlen($w); - if(isset($words[$l])){ - $words[$l][$w] = $c * $count + (isset($words[$l][$w]) ? $words[$l][$w] : 0); - }else{ - $words[$l] = array($w => $c * $count); - } + foreach ($tokens as $w => $c) { + $l = wordlen($w); + if(isset($words[$l])){ + $words[$l][$w] = $c + (isset($words[$l][$w]) ? $words[$l][$w] : 0); + }else{ + $words[$l] = array($w => $c); } } @@ -655,33 +650,51 @@ function idx_parseIndexLine(&$page_idx,$line){ * Tokenizes a string into an array of search words * * Uses the same algorithm as idx_getPageWords() + * Takes an arbitrarily complex string and returns a list of words + * suitable for indexing. The string may include spaces and line + * breaks * * @param string $string the query as given by the user * @param arrayref $stopwords array of stopwords * @param boolean $wc are wildcards allowed? + * @return array list of indexable words + * @author Tom N Harris + * @author Andreas Gohr */ function idx_tokenizer($string,&$stopwords,$wc=false){ $words = array(); $wc = ($wc) ? '' : $wc = '\*'; - if(preg_match('/[^0-9A-Za-z]/u', $string)){ - // handle asian chars as single words (may fail on older PHP version) - $asia = @preg_replace('/('.IDX_ASIAN.')/u',' \1 ',$string); - if(!is_null($asia)) $string = $asia; //recover from regexp failure - - $arr = explode(' ', utf8_stripspecials($string,' ','\._\-:'.$wc)); - foreach ($arr as $w) { - if (!is_numeric($w) && strlen($w) < IDX_MINWORDLENGTH) continue; - $w = utf8_strtolower($w); - if($stopwords && is_int(array_search("$w\n",$stopwords))) continue; + if (!$stopwords) + $sw = array(); + else + $sw =& $stopwords; + + $string = strtr($string, "\r\n\t", ' '); + if(preg_match('/[^0-9A-Za-z ]/u', $string)) + $string = utf8_stripspecials($string, ' ', '\._\-:'.$wc); + + $wordlist = explode(' ', $string); + foreach ($wordlist as $word) { + if(preg_match('/[^0-9A-Za-z]/u', $word)){ + // handle asian chars as single words (may fail on older PHP version) + $asia = @preg_replace('/('.IDX_ASIAN.')/u',' \1 ',$word); + if(!is_null($asia)) $word = $asia; //recover from regexp failure + + $arr = explode(' ', $word); + foreach ($arr as $w) { + if (!is_numeric($w) && strlen($w) < IDX_MINWORDLENGTH) continue; + $w = utf8_strtolower($w); + if(is_int(array_search("$w\n",$stopwords))) continue; + $words[] = $w; + } + }else{ + $w = $word; + if (!is_numeric($w) && strlen($w) < IDX_MINWORDLENGTH) return $words; + $w = strtolower($w); + if(is_int(array_search("$w\n",$stopwords))) return $words; $words[] = $w; } - }else{ - $w = $string; - if (!is_numeric($w) && strlen($w) < IDX_MINWORDLENGTH) return $words; - $w = strtolower($w); - if(is_int(array_search("$w\n",$stopwords))) return $words; - $words[] = $w; } return $words; -- cgit v1.2.3 From 5bcab0c47360e5b31237885cff4583e0eba479f8 Mon Sep 17 00:00:00 2001 From: Tom N Harris Date: Mon, 15 Nov 2010 15:48:31 -0500 Subject: tokenizer was returning prematurely --- inc/indexer.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'inc') diff --git a/inc/indexer.php b/inc/indexer.php index 56d80b7fa..b3e10a548 100644 --- a/inc/indexer.php +++ b/inc/indexer.php @@ -690,9 +690,9 @@ function idx_tokenizer($string,&$stopwords,$wc=false){ } }else{ $w = $word; - if (!is_numeric($w) && strlen($w) < IDX_MINWORDLENGTH) return $words; + if (!is_numeric($w) && strlen($w) < IDX_MINWORDLENGTH) continue; $w = strtolower($w); - if(is_int(array_search("$w\n",$stopwords))) return $words; + if(is_int(array_search("$w\n",$stopwords))) continue; $words[] = $w; } } -- cgit v1.2.3 From 06af2d035180c4fb746a9b88c11178c516c88092 Mon Sep 17 00:00:00 2001 From: Michael Hamann Date: Mon, 15 Nov 2010 22:08:06 +0100 Subject: Indexer speed improvement: joined array vs. single lines From my experience with a benchmark of the indexer it is faster to first join the array of all index entries and then write them back together instead of writing every single entry. This might increase memory usage, but I couldn't see a significant increase and this function is also only used for the small index files, not for the large pagewords index. --- inc/indexer.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'inc') diff --git a/inc/indexer.php b/inc/indexer.php index f5330040a..0a7e2265e 100644 --- a/inc/indexer.php +++ b/inc/indexer.php @@ -67,9 +67,7 @@ function idx_saveIndex($pre, $wlen, &$idx){ $fn = $conf['indexdir'].'/'.$pre.$wlen; $fh = @fopen($fn.'.tmp','w'); if(!$fh) return false; - foreach ($idx as $line) { - fwrite($fh,$line); - } + fwrite($fh,join('', $idx)); fclose($fh); if(isset($conf['fperm'])) chmod($fn.'.tmp', $conf['fperm']); io_rename($fn.'.tmp', $fn.'.idx'); -- cgit v1.2.3 From 037b55733d384c194f7554c832f95a5e566c5884 Mon Sep 17 00:00:00 2001 From: Michael Hamann Date: Mon, 15 Nov 2010 22:13:36 +0100 Subject: Indexer improvement: replace _freadline by fgets In PHP versions newer than 4.3.0 fgets reads a whole line regardless of its length when no length is given. Thus the loop in _freadline isn't needed. This increases the speed significantly as _freadline was called very often. --- inc/indexer.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'inc') diff --git a/inc/indexer.php b/inc/indexer.php index 0a7e2265e..a07c3b89a 100644 --- a/inc/indexer.php +++ b/inc/indexer.php @@ -149,7 +149,7 @@ function idx_saveIndexLine($pre, $wlen, $idx, $line){ $ih = @fopen($fn.'.idx','r'); if ($ih) { $ln = -1; - while (($curline = _freadline($ih)) !== false) { + while (($curline = fgets($ih)) !== false) { if (++$ln == $idx) { fwrite($fh, $line); } else { @@ -181,7 +181,7 @@ function idx_getIndexLine($pre, $wlen, $idx){ $fh = @fopen($fn,'r'); if(!$fh) return ''; $ln = -1; - while (($line = _freadline($fh)) !== false) { + while (($line = fgets($fh)) !== false) { if (++$ln == $idx) break; } fclose($fh); -- cgit v1.2.3 From e5e503830f067ce7305e22eac58c78c2f4a007d2 Mon Sep 17 00:00:00 2001 From: Michael Hamann Date: Mon, 15 Nov 2010 22:16:33 +0100 Subject: Indexer improvement: Only write the words index when needed This adds a simple boolean variable that tracks if new words have been added. When editing a page in many cases all words have already been used somewhere else or just one or two words are new. Until this change all words indexes read were always written, now only the changed ones are written. The overhead of the new boolean variable should be low. --- inc/indexer.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'inc') diff --git a/inc/indexer.php b/inc/indexer.php index a07c3b89a..8174f73d0 100644 --- a/inc/indexer.php +++ b/inc/indexer.php @@ -252,6 +252,8 @@ function idx_getPageWords($page){ // arrive here with $words = array(wordlen => array(word => frequency)) + $word_idx_modified = false; + $index = array(); //resulting index foreach (array_keys($words) as $wlen){ $word_idx = idx_getIndex('w',$wlen); @@ -260,6 +262,7 @@ function idx_getPageWords($page){ if(!is_int($wid)){ $wid = count($word_idx); $word_idx[] = "$word\n"; + $word_idx_modified = true; } if(!isset($index[$wlen])) $index[$wlen] = array(); @@ -267,7 +270,7 @@ function idx_getPageWords($page){ } // save back word index - if(!idx_saveIndex('w',$wlen,$word_idx)){ + if($word_idx_modified && !idx_saveIndex('w',$wlen,$word_idx)){ trigger_error("Failed to write word index", E_USER_ERROR); return false; } -- cgit v1.2.3 From 4753bcc0e2fd9417e885e128e8c9ab4bfc566c32 Mon Sep 17 00:00:00 2001 From: Michael Hamann Date: Mon, 15 Nov 2010 22:36:26 +0100 Subject: Indexer improvement: regex instead of arrays for lines When updating a single line that line was split into an array and in a loop over that array one entry was removed and afterwards a new one added. Tests have shown that using a regex for doing that is much faster which can be easily explained as that regex is very simple to match while a loop over an array isn't that fast. As that update function is called for every word in a page the impact of this change is significant. --- inc/indexer.php | 27 ++++++++++----------------- 1 file changed, 10 insertions(+), 17 deletions(-) (limited to 'inc') diff --git a/inc/indexer.php b/inc/indexer.php index 8174f73d0..954512673 100644 --- a/inc/indexer.php +++ b/inc/indexer.php @@ -391,26 +391,19 @@ function idx_writeIndexLine($fh,$line,$pid,$count){ * @author Andreas Gohr */ function idx_updateIndexLine($line,$pid,$count){ - $line = trim($line); - $updated = array(); - if($line != ''){ - $parts = explode(':',$line); - // remove doc from given line - foreach($parts as $part){ - if($part == '') continue; - list($doc,$cnt) = explode('*',$part); - if($doc != $pid){ - $updated[] = $part; - } - } + if ($line == ''){ + $newLine = "\n"; + }else{ + $newLine = preg_replace('/(^|:)'.preg_quote($pid, '/').'\*\d*/', '', $line); } - - // add doc if ($count){ - $updated[] = "$pid*$count"; + if (strlen($newLine) > 1){ + return "$pid*$count:".$newLine; + }else{ + return "$pid*$count".$newLine; + } } - - return join(':',$updated)."\n"; + return $newLine; } /** -- cgit v1.2.3 From 6c528220aaf62f4ba5890483797d6661352500bb Mon Sep 17 00:00:00 2001 From: Tom N Harris Date: Tue, 16 Nov 2010 17:58:28 -0500 Subject: Repurpose io_runcmd for pipes --- inc/io.php | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) (limited to 'inc') diff --git a/inc/io.php b/inc/io.php index 1d69dabc9..9b797ebf2 100644 --- a/inc/io.php +++ b/inc/io.php @@ -533,17 +533,20 @@ function io_rename($from,$to){ * * @author Harry Brueckner * @author Andreas Gohr - * @deprecated */ -function io_runcmd($cmd){ - $fh = popen($cmd, "r"); - if(!$fh) return false; - $ret = ''; - while (!feof($fh)) { - $ret .= fread($fh, 8192); - } - pclose($fh); - return $ret; +function io_runcmd($cmd, $input, &$output){ + $descspec = array( + 0=>array("pipe","r"), + 1=>array("pipe","w"), + 2=>array("pipe","w")); + $ph = proc_open($cmd, $descspec, $pipes); + if(!$ph) return -1; + fclose($pipes[2]); // ignore stderr + fwrite($pipes[0], $input); + fclose($pipes[0]); + $output = stream_get_contents($pipes[1]); + fclose($pipes[1]); + return proc_close($ph); } /** -- cgit v1.2.3 From 1c07b9e622d139fa815c955c89569f96342475fb Mon Sep 17 00:00:00 2001 From: Tom N Harris Date: Tue, 16 Nov 2010 18:09:53 -0500 Subject: Use external program to split pages into words An external tokenizer inserts extra spaces to mark words in the input text. The text is sent through STDIN and STDOUT file handles. A good choice for Chinese and Japanese is MeCab. http://sourceforge.net/projects/mecab/ With the command line 'mecab -O wakati' --- inc/indexer.php | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) (limited to 'inc') diff --git a/inc/indexer.php b/inc/indexer.php index b3e10a548..1c955a99d 100644 --- a/inc/indexer.php +++ b/inc/indexer.php @@ -662,6 +662,7 @@ function idx_parseIndexLine(&$page_idx,$line){ * @author Andreas Gohr */ function idx_tokenizer($string,&$stopwords,$wc=false){ + global $conf; $words = array(); $wc = ($wc) ? '' : $wc = '\*'; @@ -670,6 +671,16 @@ function idx_tokenizer($string,&$stopwords,$wc=false){ else $sw =& $stopwords; + if ($conf['external_tokenizer']) { + if (0 == io_runcmd($conf['tokenizer_cmd'], $string, $output)) + $string = $output; + } else { + if(preg_match('/[^0-9A-Za-z ]/u', $string)) { + // handle asian chars as single words (may fail on older PHP version) + $asia = @preg_replace('/('.IDX_ASIAN.')/u',' \1 ',$string); + if(!is_null($asia)) $string = $asia; //recover from regexp failure + } + } $string = strtr($string, "\r\n\t", ' '); if(preg_match('/[^0-9A-Za-z ]/u', $string)) $string = utf8_stripspecials($string, ' ', '\._\-:'.$wc); @@ -677,24 +688,13 @@ function idx_tokenizer($string,&$stopwords,$wc=false){ $wordlist = explode(' ', $string); foreach ($wordlist as $word) { if(preg_match('/[^0-9A-Za-z]/u', $word)){ - // handle asian chars as single words (may fail on older PHP version) - $asia = @preg_replace('/('.IDX_ASIAN.')/u',' \1 ',$word); - if(!is_null($asia)) $word = $asia; //recover from regexp failure - - $arr = explode(' ', $word); - foreach ($arr as $w) { - if (!is_numeric($w) && strlen($w) < IDX_MINWORDLENGTH) continue; - $w = utf8_strtolower($w); - if(is_int(array_search("$w\n",$stopwords))) continue; - $words[] = $w; - } + $word = utf8_strtolower($word); }else{ - $w = $word; - if (!is_numeric($w) && strlen($w) < IDX_MINWORDLENGTH) continue; - $w = strtolower($w); - if(is_int(array_search("$w\n",$stopwords))) continue; - $words[] = $w; + $word = strtolower($word); } + if (!is_numeric($word) && strlen($word) < IDX_MINWORDLENGTH) continue; + if(is_int(array_search("$word\n",$stopwords))) continue; + $words[] = $word; } return $words; -- cgit v1.2.3 From 7c2ef4e8d524fb9262c5a08831220f9fb2dc11fe Mon Sep 17 00:00:00 2001 From: Tom N Harris Date: Wed, 17 Nov 2010 17:02:31 -0500 Subject: Use a different indexer version when external tokenizer is enabled --- inc/indexer.php | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'inc') diff --git a/inc/indexer.php b/inc/indexer.php index 1c955a99d..4914c9fc6 100644 --- a/inc/indexer.php +++ b/inc/indexer.php @@ -8,6 +8,9 @@ if(!defined('DOKU_INC')) die('meh.'); +// Version tag used to force rebuild on upgrade +define('INDEXER_VERSION', 2); + // set the minimum token length to use in the index (note, this doesn't apply to numeric tokens) if (!defined('IDX_MINWORDLENGTH')) define('IDX_MINWORDLENGTH',2); @@ -42,6 +45,20 @@ define('IDX_ASIAN3','['. // Hiragana/Katakana (can be two charact ']?'); define('IDX_ASIAN', '(?:'.IDX_ASIAN1.'|'.IDX_ASIAN2.'|'.IDX_ASIAN3.')'); +/** + * Version of the indexer taking into consideration the external tokenizer. + * The indexer is only compatible with data written by the same version. + * + * @author Tom N Harris + */ +function idx_get_version(){ + global $conf; + if($conf['external_tokenizer']) + return INDEXER_VERSION . '+' . trim($conf['tokenizer_cmd']); + else + return INDEXER_VERSION; +} + /** * Measure the length of a string. * Differs from strlen in handling of asian characters. -- cgit v1.2.3 From 420edfd639fb3d0a0f6a2504ecb2f8f6b68be1f7 Mon Sep 17 00:00:00 2001 From: Tom N Harris Date: Thu, 18 Nov 2010 13:55:55 -0500 Subject: Restore io_runcmd, use io_exec for exec with pipes --- inc/indexer.php | 4 ++-- inc/io.php | 22 ++++++++++++++++++++-- 2 files changed, 22 insertions(+), 4 deletions(-) (limited to 'inc') diff --git a/inc/indexer.php b/inc/indexer.php index 4914c9fc6..32fbf4a1a 100644 --- a/inc/indexer.php +++ b/inc/indexer.php @@ -484,7 +484,7 @@ function idx_indexLengths(&$filter){ } else { $lengths = idx_listIndexLengths(); foreach ( $lengths as $key => $length) { - // we keep all the values equal or superior + // we keep all the values equal or superior if ((int)$length >= (int)$filter) { $idx[] = $length; } @@ -689,7 +689,7 @@ function idx_tokenizer($string,&$stopwords,$wc=false){ $sw =& $stopwords; if ($conf['external_tokenizer']) { - if (0 == io_runcmd($conf['tokenizer_cmd'], $string, $output)) + if (0 == io_exec($conf['tokenizer_cmd'], $string, $output)) $string = $output; } else { if(preg_match('/[^0-9A-Za-z ]/u', $string)) { diff --git a/inc/io.php b/inc/io.php index 9b797ebf2..a0be00da3 100644 --- a/inc/io.php +++ b/inc/io.php @@ -529,12 +529,30 @@ function io_rename($from,$to){ /** - * Runs an external command and returns it's output as string + * Runs an external command and returns its output as string * * @author Harry Brueckner * @author Andreas Gohr + * @deprecated */ -function io_runcmd($cmd, $input, &$output){ +function io_runcmd($cmd){ + $fh = popen($cmd, "r"); + if(!$fh) return false; + $ret = ''; + while (!feof($fh)) { + $ret .= fread($fh, 8192); + } + pclose($fh); + return $ret; +} + +/** + * Runs an external command with input and output pipes. + * Returns the exit code from the process. + * + * @author Tom N Harris + */ +function io_exec($cmd, $input, &$output){ $descspec = array( 0=>array("pipe","r"), 1=>array("pipe","w"), -- cgit v1.2.3 From 00803e562833be06ab5a869541581314b9b84d58 Mon Sep 17 00:00:00 2001 From: Tom N Harris Date: Mon, 27 Dec 2010 20:30:46 -0500 Subject: Indexer v3 Rewrite part one (unstable) The indexer functions have been converted to a class interface. Use the Doku_Indexer class to access the indexer with these public methods: addPageWords addMetaKeys deletePage tokenizer lookup lookupKey getPages histogram These functions are provided for general use: idx_get_version idx_get_indexer idx_get_stopwords idx_addPage idx_lookup idx_tokenizer These functions are still available, but are deprecated: idx_getIndex idx_indexLengths All other old idx_ functions are unsupported and have been removed. --- inc/indexer.php | 1288 +++++++++++++++++++++++++++++++++---------------------- 1 file changed, 786 insertions(+), 502 deletions(-) (limited to 'inc') diff --git a/inc/indexer.php b/inc/indexer.php index d4432026e..099b7e9fc 100644 --- a/inc/indexer.php +++ b/inc/indexer.php @@ -4,12 +4,13 @@ * * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * @author Andreas Gohr + * @author Tom N Harris */ if(!defined('DOKU_INC')) die('meh.'); // Version tag used to force rebuild on upgrade -define('INDEXER_VERSION', 2); +define('INDEXER_VERSION', 3); // set the minimum token length to use in the index (note, this doesn't apply to numeric tokens) if (!defined('IDX_MINWORDLENGTH')) define('IDX_MINWORDLENGTH',2); @@ -77,335 +78,827 @@ function wordlen($w){ } /** - * Write a list of strings to an index file. + * Class that encapsulates operations on the indexer database. * * @author Tom N Harris */ -function idx_saveIndex($pre, $wlen, &$idx){ - global $conf; - $fn = $conf['indexdir'].'/'.$pre.$wlen; - $fh = @fopen($fn.'.tmp','w'); - if(!$fh) return false; - fwrite($fh,join('', $idx)); - fclose($fh); - if(isset($conf['fperm'])) chmod($fn.'.tmp', $conf['fperm']); - io_rename($fn.'.tmp', $fn.'.idx'); - return true; -} - -/** - * Append a given line to an index file. - * - * @author Andreas Gohr - */ -function idx_appendIndex($pre, $wlen, $line){ - global $conf; - $fn = $conf['indexdir'].'/'.$pre.$wlen; - $fh = @fopen($fn.'.idx','a'); - if(!$fh) return false; - fwrite($fh,$line); - fclose($fh); - return true; -} +class Doku_Indexer { + + /** + * Adds the contents of a page to the fulltext index + * + * The added text replaces previous words for the same page. + * An empty value erases the page. + * + * @param string $page a page name + * @param string $text the body of the page + * @return boolean the function completed successfully + * @author Tom N Harris + * @author Andreas Gohr + */ + public function addPageWords($page, $text) { + $this->_lock(); + + // load known documents + $page_idx = $this->_addIndexKey('page', '', $page); + if ($page_idx === false) { + $this->_unlock(); + return false; + } -/** - * Read the list of words in an index (if it exists). - * - * @author Tom N Harris - */ -function idx_getIndex($pre, $wlen){ - global $conf; - $fn = $conf['indexdir'].'/'.$pre.$wlen.'.idx'; - if(!@file_exists($fn)) return array(); - return file($fn); -} + $pagewords = array(); + // get word usage in page + $words = $this->_getPageWords($text); + if ($words === false) { + $this->_unlock(); + return false; + } -/** - * Read a line ending with \n. - * Returns false on EOF. - * - * @author Tom N Harris - */ -function _freadline($fh) { - if (feof($fh)) return false; - $ln = ''; - while (($buf = fgets($fh,4096)) !== false) { - $ln .= $buf; - if (substr($buf,-1) == "\n") break; - } - if ($ln === '') return false; - if (substr($ln,-1) != "\n") $ln .= "\n"; - return $ln; -} + if (!empty($words)) { + foreach (array_keys($words) as $wlen) { + $index = $this->_getIndex('i', $wlen); + foreach ($words[$wlen] as $wid => $freq) { + $idx = ($wid_updateTuple($idx, $pid, $freq); + $pagewords[] = "$wlen*$wid"; + } + if (!$this->_saveIndex('i', $wlen, $index)) { + $this->_unlock(); + return false; + } + } + } -/** - * Write a line to an index file. - * - * @author Tom N Harris - */ -function idx_saveIndexLine($pre, $wlen, $idx, $line){ - global $conf; - if(substr($line,-1) != "\n") $line .= "\n"; - $fn = $conf['indexdir'].'/'.$pre.$wlen; - $fh = @fopen($fn.'.tmp','w'); - if(!$fh) return false; - $ih = @fopen($fn.'.idx','r'); - if ($ih) { - $ln = -1; - while (($curline = fgets($ih)) !== false) { - if (++$ln == $idx) { - fwrite($fh, $line); - } else { - fwrite($fh, $curline); + // Remove obsolete index entries + $pageword_idx = $this->_getIndexKey('pageword', '', $pid); + if ($pageword_idx !== '') { + $oldwords = explode(':',$pageword_idx); + $delwords = array_diff($oldwords, $pagewords); + $upwords = array(); + foreach ($delwords as $word) { + if ($word != '') { + list($wlen,$wid) = explode('*', $word); + $wid = (int)$wid; + $upwords[$wlen][] = $wid; + } + } + foreach ($upwords as $wlen => $widx) { + $index = $this->_getIndex('i', $wlen); + foreach ($widx as $wid) { + $index[$wid] = $this->_updateTuple($index[$wid], $pid, 0); + } + $this->_saveIndex('i', $wlen, $index); } } - if ($idx > $ln) { - fwrite($fh,$line); + // Save the reverse index + $pageword_idx = join(':', $pagewords); + if (!$this->_saveIndexKey('pageword', '', $pid, $pageword_idx)) { + $this->_unlock(); + return false; } - fclose($ih); - } else { - fwrite($fh,$line); - } - fclose($fh); - if($conf['fperm']) chmod($fn.'.tmp', $conf['fperm']); - io_rename($fn.'.tmp', $fn.'.idx'); - return true; -} -/** - * Read a single line from an index (if it exists). - * - * @author Tom N Harris - */ -function idx_getIndexLine($pre, $wlen, $idx){ - global $conf; - $fn = $conf['indexdir'].'/'.$pre.$wlen.'.idx'; - if(!@file_exists($fn)) return ''; - $fh = @fopen($fn,'r'); - if(!$fh) return ''; - $ln = -1; - while (($line = fgets($fh)) !== false) { - if (++$ln == $idx) break; + $this->_unlock(); + return true; } - fclose($fh); - return "$line"; -} -/** - * Split a page into words - * - * Returns an array of word counts, false if an error occurred. - * Array is keyed on the word length, then the word index. - * - * @author Andreas Gohr - * @author Christopher Smith - */ -function idx_getPageWords($page){ - global $conf; - $swfile = DOKU_INC.'inc/lang/'.$conf['lang'].'/stopwords.txt'; - if(@file_exists($swfile)){ - $stopwords = file($swfile); - }else{ - $stopwords = array(); - } + /** + * Split the words in a page and add them to the index. + * + * @author Andreas Gohr + * @author Christopher Smith + * @author Tom N Harris + */ + private function _getPageWords($text) { + global $conf; + + $tokens = $this->tokenizer($text); + $tokens = array_count_values($tokens); // count the frequency of each token + + $words = array(); + foreach ($tokens as $w=>$c) { + $l = wordlen($w); + if (isset($words[$l])){ + $words[$l][$w] = $c + (isset($words[$l][$w]) ? $words[$l][$w] : 0); + }else{ + $words[$l] = array($w => $c); + } + } - $body = ''; - $data = array($page, $body); - $evt = new Doku_Event('INDEXER_PAGE_ADD', $data); - if ($evt->advise_before()) $data[1] .= rawWiki($page); - $evt->advise_after(); - unset($evt); + // arrive here with $words = array(wordlen => array(word => frequency)) + $word_idx_modified = false; + $index = array(); //resulting index + foreach (array_keys($words) as $wlen) { + $word_idx = $this->_getIndex('w', $wlen); + foreach ($words[$wlen] as $word => $freq) { + $wid = array_search($word, $word_idx); + if ($wid === false) { + $wid = count($word_idx); + $word_idx[] = $word; + $word_idx_modified = true; + } + if (!isset($index[$wlen])) + $index[$wlen] = array(); + $index[$wlen][$wid] = $freq; + } + // save back the word index + if ($word_idx_modified && !$this->_saveIndex('w', $wlen, $word_idx)) + return false; + } - list($page,$body) = $data; + return $index; + } - $tokens = idx_tokenizer($body, $stopwords); - $tokens = array_count_values($tokens); // count the frequency of each token + /** + * Add keys to the metadata index. + * + * Adding new keys does not remove other keys for the page. + * An empty value will erase the key. + * The $key parameter can be an array to add multiple keys. $value will + * not be used if $key is an array. + * + * @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 + * @author Tom N Harris + */ + public function addMetaKeys($page, $key, $value=null) { + if (!is_array($key)) { + $key = array($key => $value); + } elseif (!is_null($value)) { + // $key is array, but $value is not null + trigger_error("array passed to addMetaKeys but value is not null", E_USER_WARNING); + } - // ensure the deaccented or romanised page names of internal links are added to the token array - // (this is necessary for the backlink function -- there maybe a better way!) - if ($conf['deaccent']) { - $links = p_get_metadata($page,'relation references'); + $this->_lock(); - if (!empty($links)) { - $tmp = join(' ',array_keys($links)); // make a single string - $tmp = strtr($tmp, ':', ' '); // replace namespace separator with a space - $link_tokens = array_unique(explode(' ', $tmp)); // break into tokens + // load known documents + $pid = $this->_addIndexKey('page', '', $page); + if ($pid === false) { + $this->_unlock(); + return false; + } - foreach ($link_tokens as $link_token) { - if (isset($tokens[$link_token])) continue; - $tokens[$link_token] = 1; + foreach ($key as $name => $values) { + $metaname = idx_cleanName($name); + $metaidx = $this->_getIndex($metaname, '_i'); + $metawords = $this->_getIndex($metaname, '_w'); + $addwords = false; + $update = array(); + if (!is_array($val)) $values = array($values); + foreach ($values as $val) { + $val = (string)$val; + if ($val !== "") { + $id = array_search($val, $metawords); + if ($id === false) { + $id = count($metawords); + $metawords[$id] = $val; + $addwords = true; + } + $metaidx[$id] = $this->_updateTuple($metaidx[$id], $pid, 1); + $update[$id] = 1; + } else { + $id = array_search($val, $metawords); + if ($id !== false) { + $metaidx[$id] = $this->_updateTuple($metaidx[$id], $pid, 0); + $update[$id] = 0; + } + } + } + if (!empty($update)) { + if ($addwords) + $this->_saveIndex($metaname.'_w', '', $metawords); + $this->_saveIndex($metaname.'_i', '', $metaidx); + $val_idx = $this->_getIndexKey($metaname, '_p', $pid); + $val_idx = array_flip(explode(':', $val_idx)); + foreach ($update as $id => $add) { + if ($add) $val_idx[$id] = 1; + else unset($val_idx[$id]); + } + $val_idx = array_keys($val_idx); + $this->_saveIndexKey($metaname.'_p', '', $pid, $val_idx); } + unset($metaidx); + unset($metawords); } + return true; } - $words = array(); - foreach ($tokens as $w => $c) { - $l = wordlen($w); - if(isset($words[$l])){ - $words[$l][$w] = $c + (isset($words[$l][$w]) ? $words[$l][$w] : 0); - }else{ - $words[$l] = array($w => $c); + /** + * Remove a page from the index + * + * Erases entries in all known indexes. + * + * @param string $page a page name + * @return boolean the function completed successfully + * @author Tom N Harris + */ + public function deletePage($page) { + } + + /** + * Split the text into words for fulltext search + * + * TODO: does this also need &$stopwords ? + * + * @param string $text plain text + * @param boolean $wc are wildcards allowed? + * @return array list of words in the text + * @author Tom N Harris + * @author Andreas Gohr + */ + public function tokenizer($text, $wc=false) { + global $conf; + $words = array(); + $wc = ($wc) ? '' : '\*'; + $stopwords =& idx_get_stopwords(); + + if ($conf['external_tokenizer'] && $conf['tokenizer_cmd'] != '') { + if (0 == io_exec($conf['tokenizer_cmd'], $text, $output)) + $text = $output; + } else { + if (preg_match('/[^0-9A-Za-z ]/u', $text)) { + // handle asian chars as single words (may fail on older PHP version) + $asia = @preg_replace('/('.IDX_ASIAN.')/u', ' \1 ', $text); + if (!is_null($asia)) $text = $asia; // recover from regexp falure + } + } + $text = strtr($text, "\r\n\t", ' '); + if (preg_match('/[^0-9A-Za-z ]/u', $text)) + $text = utf8_stripspecials($text, ' ', '\._\-:'.$wc); + + $wordlist = explode(' ', $text); + foreach ($wordlist as $word) { + $word = (preg_match('/[^0-9A-Za-z]/u', $word)) ? + utf8_strtolower($word) : strtolower($word); + if (!is_numeric($word) && strlen($word) < IDX_MINWORDLENGTH) continue; + if (array_search($word, $stopwords) !== false) continue; + $words[] = $word; } + return $words; } - // arrive here with $words = array(wordlen => array(word => frequency)) + /** + * Find pages in the fulltext index containing the words, + * + * The search words must be pre-tokenized, meaning only letters and + * numbers with an optional wildcard + * + * The returned array will have the original tokens as key. The values + * in the returned list is an array with the page names as keys and the + * number of times that token appeas on the page as value. + * + * @param array $tokens list of words to search for + * @return array list of page names with usage counts + * @author Tom N Harris + * @author Andreas Gohr + */ + public function lookup($tokens) { + $result = array(); + $wids = $this->_getIndexWords($tokens, $result); + if (empty($wids)) return array(); + // load known words and documents + $page_idx = $this->_getIndex('page', ''); + $docs = array(); + foreach (array_keys($wids) as $wlen) { + $wids[$wlen] = array_unique($wids[$wlen]); + $index = $this->_getIndex('i', $wlen); + foreach($wids[$wlen] as $ixid) { + if ($ixid < count($index)) + $docs["$wlen*$ixid"] = $this->_parseTuples($page_idx, $index[$ixid]); + } + } + // merge found pages into final result array + $final = array(); + foreach ($result as $word => $res) { + $final[$word] = array(); + foreach ($res as $wid) { + $hits = &$docs[$wid]; + foreach ($hits as $hitkey => $hitcnt) { + // make sure the document still exists + if (!page_exists($hitkey, '', false)) continue; + if (!isset($final[$word][$hitkey])) + $final[$word][$hitkey] = $hitcnt; + else + $final[$word][$hitkey] += $hitcnt; + } + } + } + return $final; + } - $word_idx_modified = false; + /** + * Find pages containing a metadata key. + * + * The metadata values are compared as case-sensitive strings. Pass a + * callback function that returns true or false to use a different + * comparison function + * + * @param string $key name of the metadata key to look for + * @param string $value search term to look for + * @param callback $func comparison function + * @return array list with page names + * @author Tom N Harris + */ + public function lookupKey($key, $value, $func=null) { + } - $index = array(); //resulting index - foreach (array_keys($words) as $wlen){ - $word_idx = idx_getIndex('w',$wlen); - foreach ($words[$wlen] as $word => $freq) { - $wid = array_search("$word\n",$word_idx); - if(!is_int($wid)){ - $wid = count($word_idx); - $word_idx[] = "$word\n"; - $word_idx_modified = true; + /** + * Find the index ID of each search term. + * + * The query terms should only contain valid characters, with a '*' at + * either the beginning or end of the word (or both). + * The $result parameter can be used to merge the index locations with + * the appropriate query term. + * + * @param array $words The query terms. + * @param arrayref $result Set to word => array("length*id" ...) + * @return array Set to length => array(id ...) + * @author Tom N Harris + */ + private function _getIndexWords($words, &$result) { + $tokens = array(); + $tokenlength = array(); + $tokenwild = array(); + foreach ($words as $word) { + $result[$word] = array(); + $caret = false; + $dollar = false; + $xword = $word; + $wlen = wordlen($word); + + // check for wildcards + if (substr($xword, 0, 1) == '*') { + $xword = substr($xword, 1); + $caret = true; + $wlen -= 1; + } + if (substr($xword, -1, 1) == '*') { + $xword = substr($xword, 0, -1); + $dollar = true; + $wlen -= 1; + } + if ($wlen < IDX_MINWORDLENGTH && !$caret && !$dollar && !is_numeric($xword)) + continue; + if (!isset($tokens[$xword])) + $tokenlength[$wlen][] = $xword; + if ($caret || $dollar) { + $re = preg_quote($xword, '/'); + if ($caret) $re = '^'.$re; + if ($dollar) $re = $re.'$'; + $tokens[$xword][] = array($word, '/'.$re.'/'); + if (!isset($tokenwild[$xword])) + $tokenwild[$xword] = $wlen; + } else { + $tokens[$xword][] = array($word, null); } - if(!isset($index[$wlen])) - $index[$wlen] = array(); - $index[$wlen][$wid] = $freq; } + asort($tokenwild); + // $tokens = array( base word => array( [ query term , regexp ] ... ) ... ) + // $tokenlength = array( base word length => base word ... ) + // $tokenwild = array( base word => base word length ... ) + $length_filter = empty($tokenwild) ? $tokenlength : min(array_keys($tokenlength)); + $indexes_known = $this->_indexLengths($length_filter); + if (!empty($tokenwild)) sort($indexes_known); + // get word IDs + $wids = array(); + foreach ($indexes_known as $ixlen) { + $word_idx = $this->_getIndex('w', $ixlen); + // handle exact search + if (isset($tokenlength[$ixlen])) { + foreach ($tokenlength[$ixlen] as $xword) { + $wid = array_search($xword, $word_idx); + if ($wid !== false) { + $wids[$ixlen][] = $wid; + foreach ($tokens[$xword] as $w) + $result[$w[0]][] = "$ixlen*$wid"; + } + } + } + // handle wildcard search + foreach ($tokenwild as $xword => $wlen) { + if ($wlen >= $ixlen) break; + foreach ($tokens[$xword] as $w) { + if (is_null($w[1])) continue; + foreach(array_keys(preg_grep($w[1], $word_idx)) as $wid) { + $wids[$ixlen][] = $wid; + $result[$w[0]][] = "$ixlen*$wid"; + } + } + } + } + return $wids; + } - // save back word index - if($word_idx_modified && !idx_saveIndex('w',$wlen,$word_idx)){ - trigger_error("Failed to write word index", E_USER_ERROR); - return false; + /** + * Return a list of all pages + * + * @param string $key list only pages containing the metadata key (optional) + * @return array list of page names + * @author Tom N Harris + */ + public function getPages($key=null) { + $page_idx = $this->_getIndex('page', ''); + if (is_null($key)) return $page_idx; + } + + /** + * Return a list of words sorted by number of times used + * + * @param int $min bottom frequency threshold + * @param int $max upper frequency limit. No limit if $max<$min + * @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 + */ + public function histogram($min=1, $max=0, $key=null) { + } + + /** + * Lock the indexer. + * + * @author Tom N Harris + */ + private function _lock() { + global $conf; + $status = true; + $lock = $conf['lockdir'].'/_indexer.lock'; + while (!@mkdir($lock, $conf['dmode'])) { + usleep(50); + if (time() - @filemtime($lock) > 60*5) { + // looks like a stale lock, remove it + @rmdir($lock); + $status = "stale lock removed"; + } else { + return false; + } } + if ($conf['dperm']) + chmod($lock, $conf['dperm']); + return $status; } - return $index; -} + /** + * Release the indexer lock. + * + * @author Tom N Harris + */ + private function _unlock() { + global $conf; + @rmdir($conf['lockdir'].'/_indexer.lock'); + return true; + } -/** - * Adds/updates the search for the given page - * - * This is the core function of the indexer which does most - * of the work. This function needs to be called with proper - * locking! - * - * @author Andreas Gohr - */ -function idx_addPage($page){ - global $conf; + /** + * Retrieve the entire index. + * + * @author Tom N Harris + */ + private function _getIndex($idx, $suffix) { + global $conf; + $fn = $conf['indexdir'].'/'.$idx.$suffix.'.idx'; + if (!@file_exists($fn, FILE_IGNORE_NEW_LINES)) return array(); + return file($fn); + } - // load known documents - $page_idx = idx_getIndex('page',''); + /** + * Replace the contents of the index with an array. + * + * @author Tom N Harris + */ + private function _saveIndex($idx, $suffix, &$lines) { + global $conf; + $fn = $conf['indexdir'].'/'.$idx.$suffix; + $fh = @fopen($fn.'.tmp', 'w'); + if (!$fh) return false; + fwrite($fh, join("\n", $lines)); + fclose($fh); + if (isset($conf['fperm'])) + chmod($fn.'.tmp', $conf['fperm']); + io_rename($fn.'.tmp', $fn.'.idx'); + if ($suffix !== '') + $this->_cacheIndexDir($idx, $suffix, empty($lines)); + return true; + } - // get page id (this is the linenumber in page.idx) - $pid = array_search("$page\n",$page_idx); - if(!is_int($pid)){ - $pid = count($page_idx); - // page was new - write back - if (!idx_appendIndex('page','',"$page\n")){ - trigger_error("Failed to write page index", E_USER_ERROR); - return false; + /** + * Retrieve a line from the index. + * + * @author Tom N Harris + */ + private function _getIndexKey($idx, $suffix, $id) { + global $conf; + $fn = $conf['indexdir'].'/'.$idx.$suffix.'.idx'; + if (!@file_exists($fn)) return ''; + $fh = @fopen($fn, 'r'); + if (!$fh) return ''; + $ln = -1; + while (($line = fgets($fh)) !== false) { + if (++$ln == $id) break; } + fclose($fh); + return rtrim((string)$line); } - unset($page_idx); // free memory - - idx_saveIndexLine('title', '', $pid, p_get_first_heading($page, false)); - - $pagewords = array(); - // get word usage in page - $words = idx_getPageWords($page); - if($words === false) return false; - - if(!empty($words)) { - foreach(array_keys($words) as $wlen){ - $index = idx_getIndex('i',$wlen); - foreach($words[$wlen] as $wid => $freq){ - if($wid + */ + private function _saveIndexKey($idx, $suffix, $id, $line) { + global $conf; + if (substr($line, -1) != "\n") + $line .= "\n"; + $fn = $conf['indexdir'].'/'.$idx.$suffix; + $fh = @fopen($fn.'.tmp', 'w'); + if (!fh) return false; + $ih = @fopen($fn.'.idx', 'r'); + if ($ih) { + $ln = -1; + while (($curline = fgets($ih)) !== false) { + fwrite($fh, (++$ln == $id) ? $line : $curline); } - // save back word index - if(!idx_saveIndex('i',$wlen,$index)){ - trigger_error("Failed to write index", E_USER_ERROR); + if ($id > $ln) + fwrite($fh, $line); + fclose($ih); + } else { + fwrite($fh, $line); + } + fclose($fh); + if (isset($conf['fperm'])) + chmod($fn.'.tmp', $conf['fperm']); + io_rename($fn.'.tmp', $fn.'.idx'); + if ($suffix !== '') + $this->_cacheIndexDir($idx, $suffix); + return true; + } + + /** + * Retrieve or insert a value in the index. + * + * @author Tom N Harris + */ + private function _addIndexKey($idx, $suffix, $value) { + $index = $this->_getIndex($idx, $suffix); + $id = array_search($value, $index); + if ($id === false) { + $id = count($index); + $index[$id] = $value; + if (!$this->_saveIndex($idx, $suffix, $index)) { + trigger_error("Failed to write $idx index", E_USER_ERROR); return false; } } + return $id; + } + + private function _cacheIndexDir($idx, $suffix, $delete=false) { + global $conf; + if ($idx == 'i') + $cachename = $conf['indexdir'].'/lengths'; + else + $cachename = $conf['indexdir'].'/'.$idx.'lengths'; + $lengths = @file($cachename.'.idx', FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES); + if ($lengths === false) $lengths = array(); + $old = array_search((string)$suffix, $lengths); + if (empty($lines)) { + if ($old === false) return; + unset($lengths[$old]); + } else { + if ($old !== false) return; + $lengths[] = $suffix; + sort($lengths); + } + $fh = @fopen($cachename.'.tmp', 'w'); + if (!$fh) { + trigger_error("Failed to write index cache", E_USER_ERROR); + return; + } + @fwrite($fh, implode("\n", $lengths)); + @fclose($fh); + if (isset($conf['fperm'])) + chmod($cachename.'.tmp', $conf['fperm']); + io_rename($cachename.'.tmp', $cachename.'.idx'); + } + + /** + * Get the list of lengths indexed in the wiki. + * + * Read the index directory or a cache file and returns + * a sorted array of lengths of the words used in the wiki. + * + * @author YoBoY + */ + private function _listIndexLengths() { + global $conf; + $cachename = $conf['indexdir'].'/lengths'; + clearstatcache(); + if (@file_exists($cachename.'.idx')) { + $lengths = @file($cachename.'.idx', FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES); + if ($lengths !== false) { + $idx = array(); + foreach ($lengths as $length) + $idx[] = (int)$length; + return $idx; + } + } + + $dir = @opendir($conf['indexdir']); + if ($dir === false) + return array(); + $lengths[] = array(); + while (($f = readdir($dir)) !== false) { + if (substr($f, 0, 1) == 'i' && substr($f, -4) == '.idx') { + $i = substr($f, 1, -4); + if (is_numeric($i)) + $lengths[] = (int)$i; + } + } + closedir($dir); + sort($lengths); + // save this in a file + $fh = @fopen($cachename.'.tmp', 'w'); + if (!$fh) { + trigger_error("Failed to write index cache", E_USER_ERROR); + return; + } + @fwrite($fh, implode("\n", $lengths)); + @fclose($fh); + if (isset($conf['fperm'])) + chmod($cachename.'.tmp', $conf['fperm']); + io_rename($cachename.'.tmp', $cachename.'.idx'); + + return $lengths; } - // Remove obsolete index entries - $pageword_idx = trim(idx_getIndexLine('pageword','',$pid)); - if ($pageword_idx !== '') { - $oldwords = explode(':',$pageword_idx); - $delwords = array_diff($oldwords, $pagewords); - $upwords = array(); - foreach ($delwords as $word) { - if($word=='') continue; - list($wlen,$wid) = explode('*',$word); - $wid = (int)$wid; - $upwords[$wlen][] = $wid; - } - foreach ($upwords as $wlen => $widx) { - $index = idx_getIndex('i',$wlen); - foreach ($widx as $wid) { - $index[$wid] = idx_updateIndexLine($index[$wid],$pid,0); + /** + * Get the word lengths that have been indexed. + * + * Reads the index directory and returns an array of lengths + * that there are indices for. + * + * @author YoBoY + */ + private function _indexLengths($filter) { + global $conf; + $idx = array(); + if (is_array($filter)) { + // testing if index files exist only + $path = $conf['indexdir']."/i"; + foreach ($filter as $key => $value) { + if (@file_exists($path.$key.'.idx')) + $idx[] = $key; + } + } else { + $lengths = idx_listIndexLengths(); + foreach ($lengths as $key => $length) { + // keep all the values equal or superior + if ((int)$length >= (int)$filter) + $idx[] = $length; } - idx_saveIndex('i',$wlen,$index); } + return $idx; } - // Save the reverse index - $pageword_idx = join(':',$pagewords)."\n"; - if(!idx_saveIndexLine('pageword','',$pid,$pageword_idx)){ - trigger_error("Failed to write word index", E_USER_ERROR); - return false; + + /** + * Insert or replace a tuple in a line. + * + * @author Tom N Harris + */ + private function _updateTuple($line, $id, $count) { + $newLine = $line; + if ($newLine !== '') + $newLine = preg_replace('/(^|:)'.preg_quote($id,'/').'\*\d*/', '', $newLine); + $newLine = trim($newLine, ':'); + if ($count) { + if ($strlen($newLine) > 0) + return "$id*$count:".$newLine; + else + return "$id*$count".$newLine; + } + return $newLine; } - return true; + /** + * Split a line into an array of tuples. + * + * @author Tom N Harris + * @author Andreas Gohr + */ + private function _parseTuples(&$keys, $line) { + $result = array(); + if ($line == '') return $result; + $parts = explode(':', $line); + foreach ($parts as $tuple) { + if ($tuple == '') continue; + list($key, $cnt) = explode('*', $tuple); + if (!$cnd) continue; + $key = $keys[$key]; + if (!$key) continue; + $result[$key] = $cnt; + } + return $result; + } } /** - * Write a new index line to the filehandle - * - * This function writes an line for the index file to the - * given filehandle. It removes the given document from - * the given line and readds it when $count is >0. + * Create an instance of the indexer. * - * @deprecated - see idx_updateIndexLine - * @author Andreas Gohr + * @return object a Doku_Indexer + * @author Tom N Harris */ -function idx_writeIndexLine($fh,$line,$pid,$count){ - fwrite($fh,idx_updateIndexLine($line,$pid,$count)); +function & idx_get_indexer() { + static $Indexer = null; + if (is_null($Indexer)) { + $Indexer = new Doku_Indexer(); + } + return $Indexer; } /** - * Modify an index line with new information - * - * This returns a line of the index. It removes the - * given document from the line and readds it if - * $count is >0. + * Returns words that will be ignored. * + * @return array list of stop words * @author Tom N Harris - * @author Andreas Gohr */ -function idx_updateIndexLine($line,$pid,$count){ - if ($line == ''){ - $newLine = "\n"; - }else{ - $newLine = preg_replace('/(^|:)'.preg_quote($pid, '/').'\*\d*/', '', $line); - } - if ($count){ - if (strlen($newLine) > 1){ - return "$pid*$count:".$newLine; +function & idx_get_stopwords() { + static $stopwords = null; + if (is_null($stopwords)) { + global $conf; + $swfile = DOKU_INC.'inc/lang/'.$conf['lang'].'/stopwords.txt'; + if(@file_exists($swfile)){ + $stopwords = file($swfile, FILE_IGNORE_NEW_LINES); }else{ - return "$pid*$count".$newLine; + $stopwords = array(); } } - return $newLine; + return $stopwords; +} + +/** + * Adds/updates the search index for the given page + * + * Locking is handled internally. + * + * @param string $page name of the page to index + * @return boolean the function completed successfully + * @author Tom N Harris + */ +function idx_addPage($page) { + $body = ''; + $data = array($page, $body); + $evt = new Doku_Event('INDEXER_PAGE_ADD', $data); + if ($evt->advise_before()) $data[1] = $data[1] . " " . rawWiki($page); + $evt->advise_after(); + unset($evt); + list($page,$body) = $data; + + $Indexer =& idx_get_indexer(); + return $Indexer->addPageWords($page, $body); +} + +/** + * Find tokens in the fulltext index + * + * Takes an array of words and will return a list of matching + * pages for each one. + * + * Important: No ACL checking is done here! All results are + * returned, regardless of permissions + * + * @param array $words list of words to search for + * @return array list of pages found, associated with the search terms + */ +function idx_lookup($words) { + $Indexer =& idx_get_indexer(); + return $Indexer->lookup($words); +} + +/** + * Split a string into tokens + * + */ +function idx_tokenizer($string, $wc=false) { + $Indexer =& idx_get_indexer(); + return $Indexer->tokenizer($string, $wc); } +/* For compatibility */ + /** - * Get the list of lenghts indexed in the wiki + * Read the list of words in an index (if it exists). + * + * @author Tom N Harris + */ +function idx_getIndex($idx, $suffix) { + global $conf; + $fn = $conf['indexdir'].'/'.$idx.$suffix.'.idx'; + if (!@file_exists($fn)) return array(); + return file($fn); +} + +/** + * Get the list of lengths indexed in the wiki. * * Read the index directory or a cache file and returns * a sorted array of lengths of the words used in the wiki. @@ -419,10 +912,11 @@ function idx_listIndexLengths() { $docache = false; } else { clearstatcache(); - if (@file_exists($conf['indexdir'].'/lengths.idx') and (time() < @filemtime($conf['indexdir'].'/lengths.idx') + $conf['readdircache'])) { - if (($lengths = @file($conf['indexdir'].'/lengths.idx', FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES) ) !== false) { + if (@file_exists($conf['indexdir'].'/lengths.idx') + && (time() < @filemtime($conf['indexdir'].'/lengths.idx') + $conf['readdircache'])) { + if (($lengths = @file($conf['indexdir'].'/lengths.idx', FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES)) !== false) { $idx = array(); - foreach ( $lengths as $length) { + foreach ($lengths as $length) { $idx[] = (int)$length; } return $idx; @@ -431,24 +925,24 @@ function idx_listIndexLengths() { $docache = true; } - if ($conf['readdircache'] == 0 or $docache ) { + if ($conf['readdircache'] == 0 || $docache) { $dir = @opendir($conf['indexdir']); - if($dir===false) + if ($dir === false) return array(); $idx[] = array(); while (($f = readdir($dir)) !== false) { - if (substr($f,0,1) == 'i' && substr($f,-4) == '.idx'){ - $i = substr($f,1,-4); + if (substr($f, 0, 1) == 'i' && substr($f, -4) == '.idx') { + $i = substr($f, 1, -4); if (is_numeric($i)) $idx[] = (int)$i; } } closedir($dir); sort($idx); - // we save this in a file. - if ($docache === true) { - $handle = @fopen($conf['indexdir'].'/lengths.idx','w'); - @fwrite($handle, implode("\n",$idx)); + // save this in a file + if ($docache) { + $handle = @fopen($conf['indexdir'].'/lengths.idx', 'w'); + @fwrite($handle, implode("\n", $idx)); @fclose($handle); } return $idx; @@ -465,250 +959,40 @@ function idx_listIndexLengths() { * * @author YoBoY */ -function idx_indexLengths(&$filter){ +function idx_indexLengths($filter) { global $conf; $idx = array(); - if (is_array($filter)){ - // testing if index files exists only + if (is_array($filter)) { + // testing if index files exist only + $path = $conf['indexdir']."/i"; foreach ($filter as $key => $value) { - if (@file_exists($conf['indexdir']."/i$key.idx")) { + if (@file_exists($path.$key.'.idx')) $idx[] = $key; - } } } else { $lengths = idx_listIndexLengths(); - foreach ( $lengths as $key => $length) { - // we keep all the values equal or superior - if ((int)$length >= (int)$filter) { + foreach ($lengths as $key => $length) { + // keep all the values equal or superior + if ((int)$length >= (int)$filter) $idx[] = $length; - } } } return $idx; } /** - * Find the the index number of each search term. + * Clean a name of a key for use as a file name. * - * This will group together words that appear in the same index. - * So it should perform better, because it only opens each index once. - * Actually, it's not that great. (in my experience) Probably because of the disk cache. - * And the sorted function does more work, making it slightly slower in some cases. - * - * @param array $words The query terms. Words should only contain valid characters, - * with a '*' at either the beginning or end of the word (or both) - * @param arrayref $result Set to word => array("length*id" ...), use this to merge the - * index locations with the appropriate query term. - * @return array Set to length => array(id ...) + * Romanizes non-latin characters, then strips away anything that's + * not a letter, number, or underscore. * * @author Tom N Harris */ -function idx_getIndexWordsSorted($words,&$result){ - // parse and sort tokens - $tokens = array(); - $tokenlength = array(); - $tokenwild = array(); - foreach($words as $word){ - $result[$word] = array(); - $wild = 0; - $xword = $word; - $wlen = wordlen($word); - - // check for wildcards - if(substr($xword,0,1) == '*'){ - $xword = substr($xword,1); - $wild |= 1; - $wlen -= 1; - } - if(substr($xword,-1,1) == '*'){ - $xword = substr($xword,0,-1); - $wild |= 2; - $wlen -= 1; - } - if ($wlen < IDX_MINWORDLENGTH && $wild == 0 && !is_numeric($xword)) continue; - if(!isset($tokens[$xword])){ - $tokenlength[$wlen][] = $xword; - } - if($wild){ - $ptn = preg_quote($xword,'/'); - if(($wild&1) == 0) $ptn = '^'.$ptn; - if(($wild&2) == 0) $ptn = $ptn.'$'; - $tokens[$xword][] = array($word, '/'.$ptn.'/'); - if(!isset($tokenwild[$xword])) $tokenwild[$xword] = $wlen; - }else - $tokens[$xword][] = array($word, null); - } - asort($tokenwild); - // $tokens = array( base word => array( [ query word , grep pattern ] ... ) ... ) - // $tokenlength = array( base word length => base word ... ) - // $tokenwild = array( base word => base word length ... ) - - $length_filter = empty($tokenwild) ? $tokenlength : min(array_keys($tokenlength)); - $indexes_known = idx_indexLengths($length_filter); - if(!empty($tokenwild)) sort($indexes_known); - // get word IDs - $wids = array(); - foreach($indexes_known as $ixlen){ - $word_idx = idx_getIndex('w',$ixlen); - // handle exact search - if(isset($tokenlength[$ixlen])){ - foreach($tokenlength[$ixlen] as $xword){ - $wid = array_search("$xword\n",$word_idx); - if(is_int($wid)){ - $wids[$ixlen][] = $wid; - foreach($tokens[$xword] as $w) - $result[$w[0]][] = "$ixlen*$wid"; - } - } - } - // handle wildcard search - foreach($tokenwild as $xword => $wlen){ - if($wlen >= $ixlen) break; - foreach($tokens[$xword] as $w){ - if(is_null($w[1])) continue; - foreach(array_keys(preg_grep($w[1],$word_idx)) as $wid){ - $wids[$ixlen][] = $wid; - $result[$w[0]][] = "$ixlen*$wid"; - } - } - } - } - return $wids; -} - -/** - * Lookup words in index - * - * Takes an array of word and will return a list of matching - * documents for each one. - * - * Important: No ACL checking is done here! All results are - * returned, regardless of permissions - * - * @author Andreas Gohr - */ -function idx_lookup($words){ - global $conf; - - $result = array(); - - $wids = idx_getIndexWordsSorted($words, $result); - if(empty($wids)) return array(); - - // load known words and documents - $page_idx = idx_getIndex('page',''); - - $docs = array(); // hold docs found - foreach(array_keys($wids) as $wlen){ - $wids[$wlen] = array_unique($wids[$wlen]); - $index = idx_getIndex('i',$wlen); - foreach($wids[$wlen] as $ixid){ - if($ixid < count($index)) - $docs["$wlen*$ixid"] = idx_parseIndexLine($page_idx,$index[$ixid]); - } - } - - // merge found pages into final result array - $final = array(); - foreach($result as $word => $res){ - $final[$word] = array(); - foreach($res as $wid){ - $hits = &$docs[$wid]; - foreach ($hits as $hitkey => $hitcnt) { - if (!isset($final[$word][$hitkey])) { - $final[$word][$hitkey] = $hitcnt; - } else { - $final[$word][$hitkey] += $hitcnt; - } - } - } - } - return $final; -} - -/** - * Returns a list of documents and counts from a index line - * - * It omits docs with a count of 0 and pages that no longer - * exist. - * - * @param array $page_idx The list of known pages - * @param string $line A line from the main index - * @author Andreas Gohr - */ -function idx_parseIndexLine(&$page_idx,$line){ - $result = array(); - - $line = trim($line); - if($line == '') return $result; - - $parts = explode(':',$line); - foreach($parts as $part){ - if($part == '') continue; - list($doc,$cnt) = explode('*',$part); - if(!$cnt) continue; - $doc = trim($page_idx[$doc]); - if(!$doc) continue; - // make sure the document still exists - if(!page_exists($doc,'',false)) continue; - - $result[$doc] = $cnt; - } - return $result; -} - -/** - * Tokenizes a string into an array of search words - * - * Uses the same algorithm as idx_getPageWords() - * Takes an arbitrarily complex string and returns a list of words - * suitable for indexing. The string may include spaces and line - * breaks - * - * @param string $string the query as given by the user - * @param arrayref $stopwords array of stopwords - * @param boolean $wc are wildcards allowed? - * @return array list of indexable words - * @author Tom N Harris - * @author Andreas Gohr - */ -function idx_tokenizer($string,&$stopwords,$wc=false){ - global $conf; - $words = array(); - $wc = ($wc) ? '' : $wc = '\*'; - - if (!$stopwords) - $sw = array(); - else - $sw =& $stopwords; - - if ($conf['external_tokenizer']) { - if (0 == io_exec($conf['tokenizer_cmd'], $string, $output)) - $string = $output; - } else { - if(preg_match('/[^0-9A-Za-z ]/u', $string)) { - // handle asian chars as single words (may fail on older PHP version) - $asia = @preg_replace('/('.IDX_ASIAN.')/u',' \1 ',$string); - if(!is_null($asia)) $string = $asia; //recover from regexp failure - } - } - $string = strtr($string, "\r\n\t", ' '); - if(preg_match('/[^0-9A-Za-z ]/u', $string)) - $string = utf8_stripspecials($string, ' ', '\._\-:'.$wc); - - $wordlist = explode(' ', $string); - foreach ($wordlist as $word) { - if(preg_match('/[^0-9A-Za-z]/u', $word)){ - $word = utf8_strtolower($word); - }else{ - $word = strtolower($word); - } - if (!is_numeric($word) && strlen($word) < IDX_MINWORDLENGTH) continue; - if(is_int(array_search("$word\n",$stopwords))) continue; - $words[] = $word; - } - - return $words; +function idx_cleanName($name) { + $name = utf8_romanize(trim((string)$name)); + $name = preg_replace('#[ \./\\:-]+#', '_', $name); + $name = preg_replace('/[^A-Za-z0-9_]/', '', $name); + return strtolower($name); } -//Setup VIM: ex: et ts=4 enc=utf-8 : +//Setup VIM: ex: et ts=4 : -- cgit v1.2.3 From 9b41be2446ea725a496f34b28ac4db84bece57c9 Mon Sep 17 00:00:00 2001 From: Tom N Harris Date: Wed, 29 Dec 2010 03:50:05 -0500 Subject: Indexer v3 Rewrite part two, update uses of indexer --- inc/Sitemapper.php | 2 +- inc/fulltext.php | 73 +++++++++++++++++++++++------------------------------- inc/indexer.php | 54 +++++++++++++++++++++++++++++----------- inc/init.php | 2 ++ 4 files changed, 74 insertions(+), 57 deletions(-) (limited to 'inc') diff --git a/inc/Sitemapper.php b/inc/Sitemapper.php index 47a3fedb5..bbe1caf26 100644 --- a/inc/Sitemapper.php +++ b/inc/Sitemapper.php @@ -45,7 +45,7 @@ class Sitemapper { dbglog("Sitemapper::generate(): using $sitemap"); // FIXME: Only in debug mode - $pages = idx_getIndex('page', ''); + $pages = idx_get_indexer()->getPages(); dbglog('Sitemapper::generate(): creating sitemap using '.count($pages).' pages'); $items = array(); diff --git a/inc/fulltext.php b/inc/fulltext.php index 7ace3a724..0411b9f99 100644 --- a/inc/fulltext.php +++ b/inc/fulltext.php @@ -36,19 +36,21 @@ function ft_pageSearch($query,&$highlight){ * @author Kazutaka Miyasaka */ function _ft_pageSearch(&$data) { + $Indexer = idx_get_indexer(); + // parse the given query - $q = ft_queryParser($data['query']); + $q = ft_queryParser($Indexer, $data['query']); $data['highlight'] = $q['highlight']; if (empty($q['parsed_ary'])) return array(); // lookup all words found in the query - $lookup = idx_lookup($q['words']); + $lookup = $Indexer->lookup($q['words']); // get all pages in this dokuwiki site (!: includes nonexistent pages) $pages_all = array(); - foreach (idx_getIndex('page', '') as $id) { - $pages_all[trim($id)] = 0; // base: 0 hit + foreach ($Indexer->getPages() as $id) { + $pages_all[$id] = 0; // base: 0 hit } // process the query @@ -126,15 +128,12 @@ function _ft_pageSearch(&$data) { * evaluates the instructions of the found pages */ function ft_backlinks($id){ - global $conf; - $swfile = DOKU_INC.'inc/lang/'.$conf['lang'].'/stopwords.txt'; - $stopwords = @file_exists($swfile) ? file($swfile) : array(); - $result = array(); // quick lookup of the pagename + // FIXME use metadata key lookup $page = noNS($id); - $matches = idx_lookup(idx_tokenizer($page,$stopwords)); // pagename may contain specials (_ or .) + $matches = idx_lookup(idx_tokenizer($page)); // pagename may contain specials (_ or .) $docs = array_keys(ft_resultCombine(array_values($matches))); $docs = array_filter($docs,'isVisiblePage'); // discard hidden pages if(!count($docs)) return $result; @@ -168,17 +167,14 @@ function ft_backlinks($id){ * Aborts after $max found results */ function ft_mediause($id,$max){ - global $conf; - $swfile = DOKU_INC.'inc/lang/'.$conf['lang'].'/stopwords.txt'; - $stopwords = @file_exists($swfile) ? file($swfile) : array(); - if(!$max) $max = 1; // need to find at least one $result = array(); // quick lookup of the mediafile + // FIXME use metadata key lookup $media = noNS($id); - $matches = idx_lookup(idx_tokenizer($media,$stopwords)); + $matches = idx_lookup(idx_tokenizer($media)); $docs = array_keys(ft_resultCombine(array_values($matches))); if(!count($docs)) return $result; @@ -229,7 +225,6 @@ function ft_pageLookup($id, $in_ns=false, $in_title=false){ } function _ft_pageLookup(&$data){ - global $conf; // split out original parameters $id = $data['id']; if (preg_match('/(?:^| )@(\w+)/', $id, $matches)) { @@ -239,29 +234,27 @@ function _ft_pageLookup(&$data){ $in_ns = $data['in_ns']; $in_title = $data['in_title']; + $cleaned = cleanID($id); - $pages = array_map('rtrim', idx_getIndex('page', '')); - $titles = array_map('rtrim', idx_getIndex('title', '')); - // check for corrupt title index #FS2076 - if(count($pages) != count($titles)){ - $titles = array_fill(0,count($pages),''); - @unlink($conf['indexdir'].'/title.idx'); // will be rebuilt in inc/init.php - } - $pages = array_combine($pages, $titles); + $Indexer = idx_get_indexer(); + $page_idx = $Indexer->getPages(); - $cleaned = cleanID($id); + $pages = array(); if ($id !== '' && $cleaned !== '') { - foreach ($pages as $p_id => $p_title) { - if ((strpos($in_ns ? $p_id : noNSorNS($p_id), $cleaned) === false) && - (!$in_title || (stripos($p_title, $id) === false)) ) { - unset($pages[$p_id]); + foreach ($page_idx as $p_id) { + if ((strpos($in_ns ? $p_id : noNSorNS($p_id), $cleaned) !== false)) { + if (!isset($pages[$p_id])) + $pages[$p_id] = p_get_first_heading($p_id, false); } } + //if ($in_title) + // $titles = $Indexer->lookupKey('title', "*$id*"); } if (isset($ns)) { - foreach (array_keys($pages) as $p_id) { - if (strpos($p_id, $ns) !== 0) { - unset($pages[$p_id]); + foreach ($page_idx as $p_id) { + if (strpos($p_id, $ns) === 0) { + if (!isset($pages[$p_id])) + $pages[$p_id] = p_get_first_heading($p_id, false); } } } @@ -494,11 +487,7 @@ function ft_resultComplement($args) { * @author Andreas Gohr * @author Kazutaka Miyasaka */ -function ft_queryParser($query){ - global $conf; - $swfile = DOKU_INC.'inc/lang/'.$conf['lang'].'/stopwords.txt'; - $stopwords = @file_exists($swfile) ? file($swfile) : array(); - +function ft_queryParser($Indexer, $query){ /** * parse a search query and transform it into intermediate representation * @@ -544,7 +533,7 @@ function ft_queryParser($query){ if (preg_match('/^(-?)"(.+)"$/u', $term, $matches)) { // phrase-include and phrase-exclude $not = $matches[1] ? 'NOT' : ''; - $parsed = $not.ft_termParser($matches[2], $stopwords, false, true); + $parsed = $not.ft_termParser($Indexer, $matches[2], false, true); } else { // fix incomplete phrase $term = str_replace('"', ' ', $term); @@ -591,10 +580,10 @@ function ft_queryParser($query){ $parsed .= '(N+:'.$matches[1].')'; } elseif (preg_match('/^-(.+)$/', $token, $matches)) { // word-exclude - $parsed .= 'NOT('.ft_termParser($matches[1], $stopwords).')'; + $parsed .= 'NOT('.ft_termParser($Indexer, $matches[1]).')'; } else { // word-include - $parsed .= ft_termParser($token, $stopwords); + $parsed .= ft_termParser($Indexer, $token); } } } @@ -728,18 +717,18 @@ function ft_queryParser($query){ * * @author Kazutaka Miyasaka */ -function ft_termParser($term, &$stopwords, $consider_asian = true, $phrase_mode = false) { +function ft_termParser($Indexer, $term, $consider_asian = true, $phrase_mode = false) { $parsed = ''; if ($consider_asian) { // successive asian characters need to be searched as a phrase $words = preg_split('/('.IDX_ASIAN.'+)/u', $term, -1, PREG_SPLIT_DELIM_CAPTURE | PREG_SPLIT_NO_EMPTY); foreach ($words as $word) { if (preg_match('/'.IDX_ASIAN.'/u', $word)) $phrase_mode = true; - $parsed .= ft_termParser($word, $stopwords, false, $phrase_mode); + $parsed .= ft_termParser($Indexer, $word, false, $phrase_mode); } } else { $term_noparen = str_replace(array('(', ')'), ' ', $term); - $words = idx_tokenizer($term_noparen, $stopwords, true); + $words = $Indexer->tokenizer($term_noparen, true); // W_: no need to highlight if (empty($words)) { diff --git a/inc/indexer.php b/inc/indexer.php index 099b7e9fc..a61f3772a 100644 --- a/inc/indexer.php +++ b/inc/indexer.php @@ -97,7 +97,8 @@ class Doku_Indexer { * @author Andreas Gohr */ public function addPageWords($page, $text) { - $this->_lock(); + if (!$this->_lock()) + return "locked"; // load known documents $page_idx = $this->_addIndexKey('page', '', $page); @@ -348,12 +349,12 @@ class Doku_Indexer { * in the returned list is an array with the page names as keys and the * number of times that token appeas on the page as value. * - * @param array $tokens list of words to search for + * @param arrayref $tokens list of words to search for * @return array list of page names with usage counts * @author Tom N Harris * @author Andreas Gohr */ - public function lookup($tokens) { + public function lookup(&$tokens) { $result = array(); $wids = $this->_getIndexWords($tokens, $result); if (empty($wids)) return array(); @@ -397,10 +398,11 @@ class Doku_Indexer { * @param string $key name of the metadata key to look for * @param string $value search term to look for * @param callback $func comparison function - * @return array list with page names + * @return array list with page names, keys are query values if more than one given * @author Tom N Harris */ public function lookupKey($key, $value, $func=null) { + return array(); } /** @@ -411,12 +413,12 @@ class Doku_Indexer { * The $result parameter can be used to merge the index locations with * the appropriate query term. * - * @param array $words The query terms. + * @param arrayref $words The query terms. * @param arrayref $result Set to word => array("length*id" ...) * @return array Set to length => array(id ...) * @author Tom N Harris */ - private function _getIndexWords($words, &$result) { + private function _getIndexWords(&$words, &$result) { $tokens = array(); $tokenlength = array(); $tokenwild = array(); @@ -807,7 +809,7 @@ class Doku_Indexer { * @return object a Doku_Indexer * @author Tom N Harris */ -function & idx_get_indexer() { +function idx_get_indexer() { static $Indexer = null; if (is_null($Indexer)) { $Indexer = new Doku_Indexer(); @@ -841,10 +843,23 @@ function & idx_get_stopwords() { * Locking is handled internally. * * @param string $page name of the page to index + * @param boolean $verbose print status messages * @return boolean the function completed successfully * @author Tom N Harris */ -function idx_addPage($page) { +function idx_addPage($page, $verbose=false) { + // check if indexing needed + $idxtag = metaFN($page,'.indexed'); + if(@file_exists($idxtag)){ + if(trim(io_readFile($idxtag)) == idx_get_version()){ + $last = @filemtime($idxtag); + if($last > @filemtime(wikiFN($ID))){ + if ($verbose) print("Indexer: index for $page up to date".DOKU_LF); + return false; + } + } + } + $body = ''; $data = array($page, $body); $evt = new Doku_Event('INDEXER_PAGE_ADD', $data); @@ -853,8 +868,19 @@ function idx_addPage($page) { unset($evt); list($page,$body) = $data; - $Indexer =& idx_get_indexer(); - return $Indexer->addPageWords($page, $body); + $Indexer = idx_get_indexer(); + $result = $Indexer->addPageWords($page, $body); + if ($result == "locked") { + if ($verbose) print("Indexer: locked".DOKU_LF); + return false; + } + if ($result) + io_saveFile(metaFN($page,'.indexed'), idx_get_version()); + if ($verbose) { + print("Indexer: finished".DOKU_LF); + return true; + } + return $result; } /** @@ -866,11 +892,11 @@ function idx_addPage($page) { * Important: No ACL checking is done here! All results are * returned, regardless of permissions * - * @param array $words list of words to search for + * @param arrayref $words list of words to search for * @return array list of pages found, associated with the search terms */ -function idx_lookup($words) { - $Indexer =& idx_get_indexer(); +function idx_lookup(&$words) { + $Indexer = idx_get_indexer(); return $Indexer->lookup($words); } @@ -879,7 +905,7 @@ function idx_lookup($words) { * */ function idx_tokenizer($string, $wc=false) { - $Indexer =& idx_get_indexer(); + $Indexer = idx_get_indexer(); return $Indexer->tokenizer($string, $wc); } diff --git a/inc/init.php b/inc/init.php index ed4409729..1dc31a31f 100644 --- a/inc/init.php +++ b/inc/init.php @@ -276,6 +276,7 @@ function init_files(){ } # create title index (needs to have same length as page.idx) + /* $file = $conf['indexdir'].'/title.idx'; if(!@file_exists($file)){ $pages = file($conf['indexdir'].'/page.idx'); @@ -290,6 +291,7 @@ function init_files(){ nice_die("$file is not writable. Check your permissions settings!"); } } + */ } /** -- cgit v1.2.3 From d64516f5d992bb47a765949743506d8433a07d55 Mon Sep 17 00:00:00 2001 From: Michael Hamann Date: Sat, 22 Jan 2011 23:01:56 +0100 Subject: Indexer v3 Rewrite: fix obvious typos and type errors --- inc/indexer.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'inc') diff --git a/inc/indexer.php b/inc/indexer.php index a61f3772a..087113587 100644 --- a/inc/indexer.php +++ b/inc/indexer.php @@ -277,7 +277,7 @@ class Doku_Indexer { else unset($val_idx[$id]); } $val_idx = array_keys($val_idx); - $this->_saveIndexKey($metaname.'_p', '', $pid, $val_idx); + $this->_saveIndexKey($metaname.'_p', '', $pid, implode(':', $val_idx)); } unset($metaidx); unset($metawords); @@ -559,8 +559,8 @@ class Doku_Indexer { private function _getIndex($idx, $suffix) { global $conf; $fn = $conf['indexdir'].'/'.$idx.$suffix.'.idx'; - if (!@file_exists($fn, FILE_IGNORE_NEW_LINES)) return array(); - return file($fn); + if (!@file_exists($fn)) return array(); + return file($fn, FILE_IGNORE_NEW_LINES); } /** @@ -773,7 +773,7 @@ class Doku_Indexer { $newLine = preg_replace('/(^|:)'.preg_quote($id,'/').'\*\d*/', '', $newLine); $newLine = trim($newLine, ':'); if ($count) { - if ($strlen($newLine) > 0) + if (strlen($newLine) > 0) return "$id*$count:".$newLine; else return "$id*$count".$newLine; @@ -794,7 +794,7 @@ class Doku_Indexer { foreach ($parts as $tuple) { if ($tuple == '') continue; list($key, $cnt) = explode('*', $tuple); - if (!$cnd) continue; + if (!$cnt) continue; $key = $keys[$key]; if (!$key) continue; $result[$key] = $cnt; -- cgit v1.2.3 From 4373c7b59390347515bcf9615f4e9133a5b88aee Mon Sep 17 00:00:00 2001 From: Michael Hamann Date: Sat, 22 Jan 2011 23:06:00 +0100 Subject: Indexer v3 Rewrite: _saveIndexKey now really writes on the desired line Now _saveIndexKey inserts empty lines when the index isn't long enough. This is necessary because the page ids are taken from the global page index, but there is not every page in the metadata key specific index so e.g. line 10 might be the first entry in the index. --- inc/indexer.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'inc') diff --git a/inc/indexer.php b/inc/indexer.php index 087113587..34ce0cdd0 100644 --- a/inc/indexer.php +++ b/inc/indexer.php @@ -620,10 +620,16 @@ class Doku_Indexer { while (($curline = fgets($ih)) !== false) { fwrite($fh, (++$ln == $id) ? $line : $curline); } - if ($id > $ln) + if ($id > $ln) { + while ($id > ++$ln) + fwrite($fh, "\n"); fwrite($fh, $line); + } fclose($ih); } else { + $ln = -1; + while ($id > ++$ln) + fwrite($fh, "\n"); fwrite($fh, $line); } fclose($fh); -- cgit v1.2.3 From cd763a5b1584197f6e9adf3bbb4f982b6bbaca05 Mon Sep 17 00:00:00 2001 From: Michael Hamann Date: Sat, 22 Jan 2011 23:10:01 +0100 Subject: Indexer v3 Rewrite: implement lookupKey() Saving and looking up metadata key/value pairs seems to work now at least with some basic tests. --- inc/indexer.php | 37 ++++++++++++++++++++++++++++++++++++- 1 file changed, 36 insertions(+), 1 deletion(-) (limited to 'inc') diff --git a/inc/indexer.php b/inc/indexer.php index 34ce0cdd0..4219dbe75 100644 --- a/inc/indexer.php +++ b/inc/indexer.php @@ -400,9 +400,44 @@ class Doku_Indexer { * @param callback $func comparison function * @return array list with page names, keys are query values if more than one given * @author Tom N Harris + * @author Michael Hamann */ public function lookupKey($key, $value, $func=null) { - return array(); + $metaname = idx_cleanName($key); + + // get all words in order to search the matching ids + $words = $this->_getIndex($metaname, '_w'); + + // the matching ids for the provided value(s) + $value_ids = array(); + + if (!is_array($value)) $value = array($value); + + foreach ($value as $val) { + if (is_null($func)) { + if (($i = array_search($val, $words)) !== false) + $value_ids[$i] = $val; + } else { + foreach ($words as $i => $word) { + if (call_user_func_array($func, array($word, $value))) + $value_ids[$i] = $val; + } + } + } + + unset($words); // free the used memory + + // load all lines and pages so the used lines can be taken and matched with the pages + $lines = $this->_getIndex($metaname, '_i'); + $page_idx = $this->_getIndex('page', ''); + + $result = array(); + foreach ($value_ids as $value_id => $val) { + // parse the tuples of the form page_id*1:page2_id*1 and so on, return value + // is an array with page_id => 1, page2_id => 1 etc. so take the keys only + $result[$val] = array_keys($this->_parseTuples($page_idx, $lines[$value_id])); + } + return $result; } /** -- cgit v1.2.3 From e1e1a7e012189660a2cfd7631e82234b5ae92f69 Mon Sep 17 00:00:00 2001 From: Michael Hamann Date: Sun, 23 Jan 2011 01:52:31 +0100 Subject: Indexer v3 Rewrite: fix addMetaKeys and locking This fixes addMetaKeys so it actually removes values. This also changes the functionality of the function: It now updates the key for the page with the current value instead of adding new values as this will be the default use case. A new parameter could be added to restore the "old" behavior when needed. addMetaKeys now only saves the index when the content has really been changed. Furthermore no empty number is added anymore to the reverse index when it has been empty previously. addMetaKeys now releases the lock again and really fails when the lock can't be gained. --- inc/indexer.php | 68 +++++++++++++++++++++++++++++++++++++-------------------- 1 file changed, 44 insertions(+), 24 deletions(-) (limited to 'inc') diff --git a/inc/indexer.php b/inc/indexer.php index 4219dbe75..d3d05ecd8 100644 --- a/inc/indexer.php +++ b/inc/indexer.php @@ -210,7 +210,7 @@ class Doku_Indexer { } /** - * Add keys to the metadata index. + * Add/update keys to/of the metadata index. * * Adding new keys does not remove other keys for the page. * An empty value will erase the key. @@ -222,6 +222,7 @@ class Doku_Indexer { * @param mixed $value the value or list of values * @return boolean the function completed successfully * @author Tom N Harris + * @author Michael Hamann */ public function addMetaKeys($page, $key, $value=null) { if (!is_array($key)) { @@ -231,7 +232,8 @@ class Doku_Indexer { trigger_error("array passed to addMetaKeys but value is not null", E_USER_WARNING); } - $this->_lock(); + if (!$this->_lock()) + return "locked"; // load known documents $pid = $this->_addIndexKey('page', '', $page); @@ -245,8 +247,19 @@ class Doku_Indexer { $metaidx = $this->_getIndex($metaname, '_i'); $metawords = $this->_getIndex($metaname, '_w'); $addwords = false; - $update = array(); - if (!is_array($val)) $values = array($values); + + if (!is_array($values)) $values = array($values); + + $val_idx = $this->_getIndexKey($metaname, '_p', $pid); + if ($val_idx != '') { + $val_idx = explode(':', $val_idx); + // -1 means remove, 0 keep, 1 add + $val_idx = array_combine($val_idx, array_fill(0, count($val_idx), -1)); + } else { + $val_idx = array(); + } + + foreach ($values as $val) { $val = (string)$val; if ($val !== "") { @@ -256,32 +269,39 @@ class Doku_Indexer { $metawords[$id] = $val; $addwords = true; } + // test if value is already in the index + if (isset($val_idx[$id]) && $val_idx[$id] <= 0) + $val_idx[$id] = 0; + else // else add it + $val_idx[$id] = 1; + } + } + + if ($addwords) + $this->_saveIndex($metaname.'_w', '', $metawords); + $vals_changed = false; + foreach ($val_idx as $id => $action) { + if ($action == -1) { + $metaidx[$id] = $this->_updateTuple($metaidx[$id], $pid, 0); + $vals_changed = true; + unset($val_idx[$id]); + } elseif ($action == 1) { $metaidx[$id] = $this->_updateTuple($metaidx[$id], $pid, 1); - $update[$id] = 1; - } else { - $id = array_search($val, $metawords); - if ($id !== false) { - $metaidx[$id] = $this->_updateTuple($metaidx[$id], $pid, 0); - $update[$id] = 0; - } + $vals_changed = true; } } - if (!empty($update)) { - if ($addwords) - $this->_saveIndex($metaname.'_w', '', $metawords); + + if ($vals_changed) { $this->_saveIndex($metaname.'_i', '', $metaidx); - $val_idx = $this->_getIndexKey($metaname, '_p', $pid); - $val_idx = array_flip(explode(':', $val_idx)); - foreach ($update as $id => $add) { - if ($add) $val_idx[$id] = 1; - else unset($val_idx[$id]); - } - $val_idx = array_keys($val_idx); - $this->_saveIndexKey($metaname.'_p', '', $pid, implode(':', $val_idx)); + $val_idx = implode(':', array_keys($val_idx)); + $this->_saveIndexKey($metaname.'_p', '', $pid, $val_idx); } + unset($metaidx); unset($metawords); } + + $this->_unlock(); return true; } @@ -398,7 +418,7 @@ class Doku_Indexer { * @param string $key name of the metadata key to look for * @param string $value search term to look for * @param callback $func comparison function - * @return array list with page names, keys are query values if more than one given + * @return array lists with page names, keys are query values * @author Tom N Harris * @author Michael Hamann */ @@ -911,7 +931,7 @@ function idx_addPage($page, $verbose=false) { $Indexer = idx_get_indexer(); $result = $Indexer->addPageWords($page, $body); - if ($result == "locked") { + if ($result === "locked") { if ($verbose) print("Indexer: locked".DOKU_LF); return false; } -- cgit v1.2.3 From 320f489ae6a653f52f9d489b84b9bdd26f4241ac Mon Sep 17 00:00:00 2001 From: Michael Hamann Date: Sun, 23 Jan 2011 02:00:32 +0100 Subject: Indexer v3 Rewrite: Use the metadata index for backlinks; add INDEXER_METADATA_INDEX event This new event allows plugins to add or modify the metadata that will be indexed. Collecting this metadata in an event allows plugins to see if other plugins have already added the metadata they need and leads to just one single indexer call thus fewer files are read and written. Plugins could also replace/prevent the metadata indexer call using this event. --- inc/fulltext.php | 19 +++---------------- inc/indexer.php | 19 +++++++++++++++++++ 2 files changed, 22 insertions(+), 16 deletions(-) (limited to 'inc') diff --git a/inc/fulltext.php b/inc/fulltext.php index 0411b9f99..35ee4ba34 100644 --- a/inc/fulltext.php +++ b/inc/fulltext.php @@ -124,26 +124,13 @@ function _ft_pageSearch(&$data) { /** * Returns the backlinks for a given page * - * Does a quick lookup with the fulltext index, then - * evaluates the instructions of the found pages + * Uses the metadata index. */ function ft_backlinks($id){ $result = array(); - // quick lookup of the pagename - // FIXME use metadata key lookup - $page = noNS($id); - $matches = idx_lookup(idx_tokenizer($page)); // pagename may contain specials (_ or .) - $docs = array_keys(ft_resultCombine(array_values($matches))); - $docs = array_filter($docs,'isVisiblePage'); // discard hidden pages - if(!count($docs)) return $result; - - // check metadata for matching links - foreach($docs as $match){ - // metadata relation reference links are already resolved - $links = p_get_metadata($match,'relation references'); - if (isset($links[$id])) $result[] = $match; - } + $result = idx_get_indexer()->lookupKey('relation_references', $id); + $result = $result[$id]; if(!count($result)) return $result; diff --git a/inc/indexer.php b/inc/indexer.php index d3d05ecd8..8859ada33 100644 --- a/inc/indexer.php +++ b/inc/indexer.php @@ -935,6 +935,25 @@ function idx_addPage($page, $verbose=false) { if ($verbose) print("Indexer: locked".DOKU_LF); return false; } + + if ($result) { + $data = array('page' => $page, 'metadata' => array()); + + if (($references = p_get_metadata($page, 'relation references')) !== null) + $data['metadata']['relation_references'] = array_keys($references); + + $evt = new Doku_Event('INDEXER_METADATA_INDEX', $data); + if ($evt->advise_before()) { + $result = $Indexer->addMetaKeys($page, $data['metadata']); + if ($result === "locked") { + if ($verbose) print("Indexer: locked".DOKU_LF); + return false; + } + } + $evt->advise_after(); + unset($evt); + } + if ($result) io_saveFile(metaFN($page,'.indexed'), idx_get_version()); if ($verbose) { -- cgit v1.2.3 From 8605afb1b4e2a6a9e11e21a7bf0775bbb0d5af03 Mon Sep 17 00:00:00 2001 From: Michael Hamann Date: Sun, 23 Jan 2011 20:23:26 +0100 Subject: Add INDEXER_VERSION_GET event so plugins can add their version This allows plugins to add their own version strings like plugin_tag=1 so pages can be reindexed when plugins update their index content. --- inc/indexer.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'inc') diff --git a/inc/indexer.php b/inc/indexer.php index 8859ada33..91d6842e4 100644 --- a/inc/indexer.php +++ b/inc/indexer.php @@ -51,13 +51,18 @@ define('IDX_ASIAN', '(?:'.IDX_ASIAN1.'|'.IDX_ASIAN2.'|'.IDX_ASIAN3.')'); * The indexer is only compatible with data written by the same version. * * @author Tom N Harris + * @author Michael Hamann */ function idx_get_version(){ global $conf; if($conf['external_tokenizer']) - return INDEXER_VERSION . '+' . trim($conf['tokenizer_cmd']); + $version = INDEXER_VERSION . '+' . trim($conf['tokenizer_cmd']); else - return INDEXER_VERSION; + $version = INDEXER_VERSION; + + $data = array($version); + trigger_event('INDEXER_VERSION_GET', $data, null, false); + return implode('+', $data); } /** -- cgit v1.2.3 From bbc85ee4bc98fadf89707309f923f8ae2c16f727 Mon Sep 17 00:00:00 2001 From: Tom N Harris Date: Mon, 24 Jan 2011 02:52:10 -0500 Subject: Indexer v3 Rewrite: streamline indexing of deleted or disabled pages --- inc/indexer.php | 73 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 72 insertions(+), 1 deletion(-) (limited to 'inc') diff --git a/inc/indexer.php b/inc/indexer.php index 8859ada33..5f37ec46c 100644 --- a/inc/indexer.php +++ b/inc/indexer.php @@ -315,6 +315,46 @@ class Doku_Indexer { * @author Tom N Harris */ public function deletePage($page) { + if (!$this->_lock()) + return "locked"; + + // load known documents + $page_idx = $this->_getIndexKey('page', '', $page); + if ($page_idx === false) { + $this->_unlock(); + return false; + } + + // Remove obsolete index entries + $pageword_idx = $this->_getIndexKey('pageword', '', $pid); + if ($pageword_idx !== '') { + $delwords = explode(':',$pageword_idx); + $upwords = array(); + foreach ($delwords as $word) { + if ($word != '') { + list($wlen,$wid) = explode('*', $word); + $wid = (int)$wid; + $upwords[$wlen][] = $wid; + } + } + foreach ($upwords as $wlen => $widx) { + $index = $this->_getIndex('i', $wlen); + foreach ($widx as $wid) { + $index[$wid] = $this->_updateTuple($index[$wid], $pid, 0); + } + $this->_saveIndex('i', $wlen, $index); + } + } + // Save the reverse index + if (!$this->_saveIndexKey('pageword', '', $pid, "")) { + $this->_unlock(); + return false; + } + + // XXX TODO: delete meta keys + + $this->_unlock(); + return true; } /** @@ -921,6 +961,36 @@ function idx_addPage($page, $verbose=false) { } } + if (!page_exists($page)) { + if (!@file_exists($idxtag)) { + if ($verbose) print("Indexer: $page does not exist, ignoring".DOKU_LF); + return false; + } + $Indexer = idx_get_indexer(); + $result = $Indexer->deletePage($page); + if ($result === "locked") { + if ($verbose) print("Indexer: locked".DOKU_LF); + return false; + } + @unlink($idxtag); + return $result; + } + $indexenabled = p_get_metadata($page, 'internal index', false); + if ($indexenabled === false) { + $result = false; + if (@file_exists($idxtag)) { + $Indexer = idx_get_indexer(); + $result = $Indexer->deletePage($page); + if ($result === "locked") { + if ($verbose) print("Indexer: locked".DOKU_LF); + return false; + } + @unlink($idxtag); + } + if ($verbose) print("Indexer: index disabled for $page".DOKU_LF); + return $result; + } + $body = ''; $data = array($page, $body); $evt = new Doku_Event('INDEXER_PAGE_ADD', $data); @@ -939,7 +1009,8 @@ function idx_addPage($page, $verbose=false) { if ($result) { $data = array('page' => $page, 'metadata' => array()); - if (($references = p_get_metadata($page, 'relation references')) !== null) + $data['metadata']['title'] = p_get_metadata($page, 'title', false); + if (($references = p_get_metadata($page, 'relation references', false)) !== null) $data['metadata']['relation_references'] = array_keys($references); $evt = new Doku_Event('INDEXER_METADATA_INDEX', $data); -- cgit v1.2.3 From f078bb0088870b4b68b348d546afa30a80a07e87 Mon Sep 17 00:00:00 2001 From: Tom N Harris Date: Mon, 24 Jan 2011 03:46:11 -0500 Subject: Indexer Rewrite v3: wildcards in lookupKey and automatically unwrap single result --- inc/fulltext.php | 9 ++++++--- inc/indexer.php | 48 +++++++++++++++++++++++++++++++++++------------- 2 files changed, 41 insertions(+), 16 deletions(-) (limited to 'inc') diff --git a/inc/fulltext.php b/inc/fulltext.php index 35ee4ba34..f477e826e 100644 --- a/inc/fulltext.php +++ b/inc/fulltext.php @@ -130,7 +130,6 @@ function ft_backlinks($id){ $result = array(); $result = idx_get_indexer()->lookupKey('relation_references', $id); - $result = $result[$id]; if(!count($result)) return $result; @@ -234,8 +233,12 @@ function _ft_pageLookup(&$data){ $pages[$p_id] = p_get_first_heading($p_id, false); } } - //if ($in_title) - // $titles = $Indexer->lookupKey('title', "*$id*"); + if ($in_title) { + foreach ($Indexer->lookupKey('title', "*$id*") as $p_id) { + if (!isset($pages[$p_id])) + $pages[$p_id] = p_get_first_heading($p_id, false); + } + } } if (isset($ns)) { foreach ($page_idx as $p_id) { diff --git a/inc/indexer.php b/inc/indexer.php index 5f37ec46c..6af2de15d 100644 --- a/inc/indexer.php +++ b/inc/indexer.php @@ -458,7 +458,7 @@ class Doku_Indexer { * @param string $key name of the metadata key to look for * @param string $value search term to look for * @param callback $func comparison function - * @return array lists with page names, keys are query values + * @return array lists with page names, keys are query values if $key is array * @author Tom N Harris * @author Michael Hamann */ @@ -471,15 +471,38 @@ class Doku_Indexer { // the matching ids for the provided value(s) $value_ids = array(); - if (!is_array($value)) $value = array($value); + if (!is_array($value)) + $value_array = array($value); + else + $value_array =& $value; - foreach ($value as $val) { - if (is_null($func)) { - if (($i = array_search($val, $words)) !== false) - $value_ids[$i] = $val; - } else { + if (!is_null($func)) { + foreach ($value_array as $val) { foreach ($words as $i => $word) { - if (call_user_func_array($func, array($word, $value))) + if (call_user_func_array($func, array($word, $val))) + $value_ids[$i] = $val; + } + } + } else { + foreach ($value_array as $val) { + $xval = $val; + $caret = false; + $dollar = false; + // check for wildcards + if (substr($xval, 0, 1) == '*') { + $xval = substr($xval, 1); + $caret = '^'; + } + if (substr($xval, -1, 1) == '*') { + $xval = substr($xval, 0, -1); + $dollar = '$'; + } + if ($caret || $dollar) { + $re = $caret.preg_quote($xval, '/').$dollar; + foreach(array_keys(preg_grep('/'.$re.'/', $words)) as $i) + $value_ids[$i] = $val; + } else { + if (($i = array_search($val, $words)) !== false) $value_ids[$i] = $val; } } @@ -497,6 +520,7 @@ class Doku_Indexer { // is an array with page_id => 1, page2_id => 1 etc. so take the keys only $result[$val] = array_keys($this->_parseTuples($page_idx, $lines[$value_id])); } + if (!is_array($value)) $result = $result[$value]; return $result; } @@ -527,12 +551,12 @@ class Doku_Indexer { // check for wildcards if (substr($xword, 0, 1) == '*') { $xword = substr($xword, 1); - $caret = true; + $caret = '^'; $wlen -= 1; } if (substr($xword, -1, 1) == '*') { $xword = substr($xword, 0, -1); - $dollar = true; + $dollar = '$'; $wlen -= 1; } if ($wlen < IDX_MINWORDLENGTH && !$caret && !$dollar && !is_numeric($xword)) @@ -540,9 +564,7 @@ class Doku_Indexer { if (!isset($tokens[$xword])) $tokenlength[$wlen][] = $xword; if ($caret || $dollar) { - $re = preg_quote($xword, '/'); - if ($caret) $re = '^'.$re; - if ($dollar) $re = $re.'$'; + $re = $caret.preg_quote($xword, '/').$dollar; $tokens[$xword][] = array($word, '/'.$re.'/'); if (!isset($tokenwild[$xword])) $tokenwild[$xword] = $wlen; -- cgit v1.2.3 From b5a0b131e99eb6028e5ca5fed9c798982cdfe168 Mon Sep 17 00:00:00 2001 From: Danny Lin Date: Wed, 26 Jan 2011 08:33:01 +0800 Subject: First attempt to improve rewrite blocks; also eliminates post-paragraph starting single linebreaks. --- inc/parser/handler.php | 124 +++++++++++++++++++------------------------------ 1 file changed, 49 insertions(+), 75 deletions(-) (limited to 'inc') diff --git a/inc/parser/handler.php b/inc/parser/handler.php index 4d0b56b44..3bd3a3b3c 100644 --- a/inc/parser/handler.php +++ b/inc/parser/handler.php @@ -1489,6 +1489,11 @@ class Doku_Handler_Block { } } + function openParagraph($pos){ + $this->calls[] = array('p_open',array(), $pos); + $this->inParagraph = true; + } + /** * Close a paragraph if needed * @@ -1548,7 +1553,7 @@ class Doku_Handler_Block { $this->closeParagraph($call[2]); } $this->calls[] = $call; - + $this->skipEolKey = $key+1; continue; } @@ -1561,104 +1566,73 @@ class Doku_Handler_Block { if ($this->removeFromStack()) { $this->calls[] = array('p_open',array(), $call[2]); } + $this->skipEolKey = $key+1; continue; } - if ( !$this->atStart ) { - - if ( $cname == 'eol' ) { - - // Check this isn't an eol instruction to skip... - if ( $this->skipEolKey != $key ) { - // Look to see if the next instruction is an EOL - if ( isset($calls[$key+1]) && $calls[$key+1][0] == 'eol' ) { - - if ( $this->inParagraph ) { - //$this->calls[] = array('p_close',array(), $call[2]); - $this->closeParagraph($call[2]); - } - - $this->calls[] = array('p_open',array(), $call[2]); - $this->inParagraph = true; - - - // Mark the next instruction for skipping - $this->skipEolKey = $key+1; - - }else{ - //if this is just a single eol make a space from it - $this->addCall(array('cdata',array(DOKU_PARSER_EOL), $call[2])); - } - } + // Always opens a paragraph on stack start + // If this is a block start, it will soon be closed later + if ( $this->atStart ) { + $this->openParagraph($call[2]); + $this->atStart = false; + $this->skipEolKey = $key; + } + if ( $cname == 'eol' ) { - } else { + // Check this isn't an eol instruction to skip... + if ( $this->skipEolKey != $key ) { + // Look to see if the next instruction is an EOL + if ( isset($calls[$key+1]) && $calls[$key+1][0] == 'eol' ) { - $storeCall = true; - if ( $this->inParagraph && (in_array($cname, $this->blockOpen) && (!$plugin || $plugin_open))) { - $this->closeParagraph($call[2]); - $this->calls[] = $call; - $storeCall = false; - } - - if ( in_array($cname, $this->blockClose) && (!$plugin || $plugin_close)) { if ( $this->inParagraph ) { $this->closeParagraph($call[2]); } - if ( $storeCall ) { - $this->calls[] = $call; - $storeCall = false; - } - - // This really sucks and suggests this whole class sucks but... - if ( isset($calls[$key+1])) { - $cname_plusone = $calls[$key+1][0]; - if ($cname_plusone == 'plugin') { - $cname_plusone = 'plugin'.$calls[$key+1][1][0]; - - // plugin test, true if plugin has a state which precludes it requiring blockOpen or blockClose - $plugin_plusone = true; - $plugin_test = ($call[$key+1][1][2] == DOKU_LEXER_MATCHED) || ($call[$key+1][1][2] == DOKU_LEXER_MATCHED); - } else { - $plugin_plusone = false; - } - if ((!in_array($cname_plusone, $this->blockOpen) && !in_array($cname_plusone, $this->blockClose)) || - ($plugin_plusone && $plugin_test) - ) { - - $this->calls[] = array('p_open',array(), $call[2]); - $this->inParagraph = true; - } - } - } - - if ( $storeCall ) { - $this->addCall($call); + $this->openParagraph($call[2]); + // Mark the next instruction for skipping + $this->skipEolKey = $key+1; + } else { + //if this is just a single eol make a space from it + $this->addCall(array('cdata',array(DOKU_PARSER_EOL), $call[2])); } - + } else { + $this->skipEolKey = $key+1; } } else { - // Unless there's already a block at the start, start a paragraph - if ( !in_array($cname,$this->blockOpen) ) { - $this->calls[] = array('p_open',array(), $call[2]); - if ( $call[0] != 'eol' ) { + $storeCall = true; + if ( $this->inParagraph && (in_array($cname, $this->blockOpen) && (!$plugin || $plugin_open))) { + $this->closeParagraph($call[2]); + $this->calls[] = $call; + $storeCall = false; + // Mark next eol(s) for skipping + $this->skipEolKey = $key+1; + } + + if ( in_array($cname, $this->blockClose) && (!$plugin || $plugin_close)) { + if ( $this->inParagraph ) { + $this->closeParagraph($call[2]); + } + if ( $storeCall ) { $this->calls[] = $call; + $storeCall = false; } - $this->atStart = false; - $this->inParagraph = true; - } else { + $this->openParagraph($call[2]); + // Mark next eol(s) for skipping + $this->skipEolKey = $key+1; + } + if ( $storeCall ) { $this->addCall($call); - $this->atStart = false; } - } } if ( $this->inParagraph ) { + $call = end($this->calls); + $cname = $call[0]; if ( $cname == 'p_open' ) { // Ditch the last call array_pop($this->calls); -- cgit v1.2.3 From 9569a107742372a9dcfac06600e3d59c289ba142 Mon Sep 17 00:00:00 2001 From: Danny Lin Date: Wed, 26 Jan 2011 11:06:41 +0800 Subject: Major rework of rewrite block in handler.php. (FS#2145) -Simplify the algorithm. May improve performance. -Treat footnote as pure block and section as pure stack. -Remove post-p-open and pre-p-close linefeeds. Affects the effect of xbr plugin. --- inc/parser/handler.php | 201 ++++++++++++++++--------------------------------- 1 file changed, 66 insertions(+), 135 deletions(-) (limited to 'inc') diff --git a/inc/parser/handler.php b/inc/parser/handler.php index 3bd3a3b3c..e7eb94dd2 100644 --- a/inc/parser/handler.php +++ b/inc/parser/handler.php @@ -1427,14 +1427,8 @@ class Doku_Handler_Table { * @author Harry Fuecks */ class Doku_Handler_Block { - var $calls = array(); - - var $blockStack = array(); - - var $inParagraph = false; - var $atStart = true; - var $skipEolKey = -1; + var $skipEol = false; // Blocks these should not be inside paragraphs var $blockOpen = array( @@ -1442,9 +1436,9 @@ class Doku_Handler_Block { 'listu_open','listo_open','listitem_open','listcontent_open', 'table_open','tablerow_open','tablecell_open','tableheader_open', 'quote_open', - 'section_open', // Needed to prevent p_open between header and section_open 'code','file','hr','preformatted','rss', 'htmlblock','phpblock', + 'footnote_open', ); var $blockClose = array( @@ -1452,18 +1446,18 @@ class Doku_Handler_Block { 'listu_close','listo_close','listitem_close','listcontent_close', 'table_close','tablerow_close','tablecell_close','tableheader_close', 'quote_close', - 'section_close', // Needed to prevent p_close after section_close 'code','file','hr','preformatted','rss', 'htmlblock','phpblock', + 'footnote_close', ); // Stacks can contain paragraphs var $stackOpen = array( - 'footnote_open','section_open', + 'section_open', ); var $stackClose = array( - 'footnote_close','section_close', + 'section_close', ); @@ -1489,9 +1483,11 @@ class Doku_Handler_Block { } } - function openParagraph($pos){ + function openParagraph($pos){ + if ($this->inParagraph) return; $this->calls[] = array('p_open',array(), $pos); - $this->inParagraph = true; + $this->inParagraph = true; + $this->skipEol = true; } /** @@ -1501,7 +1497,8 @@ class Doku_Handler_Block { * * @author Andreas Gohr */ - function closeParagraph($pos){ + function closeParagraph($pos){ + if (!$this->inParagraph) return; // look back if there was any content - we don't want empty paragraphs $content = ''; for($i=count($this->calls)-1; $i>=0; $i--){ @@ -1518,11 +1515,29 @@ class Doku_Handler_Block { if(trim($content)==''){ //remove the whole paragraph array_splice($this->calls,$i); - }else{ + }else{ + // remove ending linebreaks in the paragraph + $i=count($this->calls)-1; + if ($this->calls[$i][0] == 'cdata') $this->calls[$i][1][0] = rtrim($this->calls[$i][1][0],DOKU_PARSER_EOL); $this->calls[] = array('p_close',array(), $pos); } - $this->inParagraph = false; + $this->inParagraph = false; + $this->skipEol = true; + } + + function addCall($call) { + $key = count($this->calls); + if ($key and ($call[0] == 'cdata') and ($this->calls[$key-1][0] == 'cdata')) { + $this->calls[$key-1][1][0] .= $call[1][0]; + } else { + $this->calls[] = $call; + } + } + + // simple version of addCall, without checking cdata + function storeCall($call) { + $this->calls[] = $call; } /** @@ -1530,155 +1545,71 @@ class Doku_Handler_Block { * * @author Harry Fuecks * @author Andreas Gohr - * @todo This thing is really messy and should be rewritten */ function process($calls) { + // open first paragraph + $this->openParagraph(0); foreach ( $calls as $key => $call ) { $cname = $call[0]; - if($cname == 'plugin') { + if ($cname == 'plugin') { $cname='plugin_'.$call[1][0]; - $plugin = true; $plugin_open = (($call[1][2] == DOKU_LEXER_ENTER) || ($call[1][2] == DOKU_LEXER_SPECIAL)); $plugin_close = (($call[1][2] == DOKU_LEXER_EXIT) || ($call[1][2] == DOKU_LEXER_SPECIAL)); } else { $plugin = false; } - - // Process blocks which are stack like... (contain linefeeds) - if ( in_array($cname,$this->stackOpen ) && (!$plugin || $plugin_open) ) { - - // Hack - footnotes shouldn't immediately contain a p_open - if ($this->addToStack($cname != 'footnote_open')) { - $this->closeParagraph($call[2]); - } - $this->calls[] = $call; - $this->skipEolKey = $key+1; + /* stack */ + if ( in_array($cname,$this->stackClose ) && (!$plugin || $plugin_close)) { + $this->closeParagraph($call[2]); + $this->storeCall($call); + $this->openParagraph($call[2]); continue; } - - if ( in_array($cname,$this->stackClose ) && (!$plugin || $plugin_close)) { - - if ( $this->inParagraph ) { - $this->closeParagraph($call[2]); - } - $this->calls[] = $call; - if ($this->removeFromStack()) { - $this->calls[] = array('p_open',array(), $call[2]); - } - $this->skipEolKey = $key+1; + if ( in_array($cname,$this->stackOpen ) && (!$plugin || $plugin_open) ) { + $this->closeParagraph($call[2]); + $this->storeCall($call); + $this->openParagraph($call[2]); continue; } - - // Always opens a paragraph on stack start - // If this is a block start, it will soon be closed later - if ( $this->atStart ) { + /* block */ + // If it's a substition it opens and closes at the same call. + // To make sure next paragraph is correctly started, let close go first. + if ( in_array($cname, $this->blockClose) && (!$plugin || $plugin_close)) { + $this->closeParagraph($call[2]); + $this->storeCall($call); $this->openParagraph($call[2]); - $this->atStart = false; - $this->skipEolKey = $key; + continue; } - + if ( in_array($cname, $this->blockOpen) && (!$plugin || $plugin_open)) { + $this->closeParagraph($call[2]); + $this->storeCall($call); + continue; + } + /* eol */ if ( $cname == 'eol' ) { - // Check this isn't an eol instruction to skip... - if ( $this->skipEolKey != $key ) { - // Look to see if the next instruction is an EOL + if ( !$this->skipEol ) { + // Next is EOL => double eol => mark as paragraph if ( isset($calls[$key+1]) && $calls[$key+1][0] == 'eol' ) { - - if ( $this->inParagraph ) { - $this->closeParagraph($call[2]); - } + $this->closeParagraph($call[2]); $this->openParagraph($call[2]); - // Mark the next instruction for skipping - $this->skipEolKey = $key+1; } else { //if this is just a single eol make a space from it $this->addCall(array('cdata',array(DOKU_PARSER_EOL), $call[2])); } - } else { - $this->skipEolKey = $key+1; } - - - } else { - - $storeCall = true; - if ( $this->inParagraph && (in_array($cname, $this->blockOpen) && (!$plugin || $plugin_open))) { - $this->closeParagraph($call[2]); - $this->calls[] = $call; - $storeCall = false; - // Mark next eol(s) for skipping - $this->skipEolKey = $key+1; - } - - if ( in_array($cname, $this->blockClose) && (!$plugin || $plugin_close)) { - if ( $this->inParagraph ) { - $this->closeParagraph($call[2]); - } - if ( $storeCall ) { - $this->calls[] = $call; - $storeCall = false; - } - $this->openParagraph($call[2]); - // Mark next eol(s) for skipping - $this->skipEolKey = $key+1; - } - if ( $storeCall ) { - $this->addCall($call); - } - } - - } - - if ( $this->inParagraph ) { - $call = end($this->calls); - $cname = $call[0]; - if ( $cname == 'p_open' ) { - // Ditch the last call - array_pop($this->calls); - } else if ( !in_array($cname, $this->blockClose) ) { - //$this->calls[] = array('p_close',array(), $call[2]); - $this->closeParagraph($call[2]); - } else { - $last_call = array_pop($this->calls); - //$this->calls[] = array('p_close',array(), $call[2]); - $this->closeParagraph($call[2]); - $this->calls[] = $last_call; + continue; } + /* normal */ + $this->addCall($call); + $this->skipEol = false; } - + // close last paragraph + $call = end($this->calls); + $this->closeParagraph($call[2]); return $this->calls; } - - /** - * - * @return bool true when a p_close() is required - */ - function addToStack($newStart = true) { - $ret = $this->inParagraph; - $this->blockStack[] = array($this->atStart, $this->inParagraph); - $this->atStart = $newStart; - $this->inParagraph = false; - - return $ret; - } - - function removeFromStack() { - $state = array_pop($this->blockStack); - $this->atStart = $state[0]; - $this->inParagraph = $state[1]; - - return $this->inParagraph; - } - - function addCall($call) { - $key = count($this->calls); - if ($key and ($call[0] == 'cdata') and ($this->calls[$key-1][0] == 'cdata')) { - $this->calls[$key-1][1][0] .= $call[1][0]; - } else { - $this->calls[] = $call; - } - } } //Setup VIM: ex: et ts=4 : -- cgit v1.2.3 From 14739a206f851219daa577abdfd7489d86b0072b Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Sun, 6 Feb 2011 20:28:39 +0100 Subject: Revert "merged branch 'danny0838:rewrite_block' and resolved conflict" Anika's merge did not pul in the individual patches as one would expect. Then I messed up when trying to fix this by merging with danny's repo again but used the wrong branch. So we're still missing two patches. To have them apply cleanly I have to revert Anika's merge here. Another merge for the missing two patches will follow. This reverts commit b17e20ac9cca30b612968d02f06fa9c5df5c01f0. --- inc/parser/handler.php | 241 +++++++++++++++++++++++++++++++++--------------- inc/parser/metadata.php | 8 +- inc/parser/xhtml.php | 2 +- 3 files changed, 173 insertions(+), 78 deletions(-) (limited to 'inc') diff --git a/inc/parser/handler.php b/inc/parser/handler.php index 26a560c3c..85a353dca 100644 --- a/inc/parser/handler.php +++ b/inc/parser/handler.php @@ -1433,8 +1433,14 @@ class Doku_Handler_Table { * @author Harry Fuecks */ class Doku_Handler_Block { + var $calls = array(); - var $skipEol = false; + + var $blockStack = array(); + + var $inParagraph = false; + var $atStart = true; + var $skipEolKey = -1; // Blocks these should not be inside paragraphs var $blockOpen = array( @@ -1442,9 +1448,9 @@ class Doku_Handler_Block { 'listu_open','listo_open','listitem_open','listcontent_open', 'table_open','tablerow_open','tablecell_open','tableheader_open', 'quote_open', + 'section_open', // Needed to prevent p_open between header and section_open 'code','file','hr','preformatted','rss', 'htmlblock','phpblock', - 'footnote_open', ); var $blockClose = array( @@ -1452,18 +1458,18 @@ class Doku_Handler_Block { 'listu_close','listo_close','listitem_close','listcontent_close', 'table_close','tablerow_close','tablecell_close','tableheader_close', 'quote_close', + 'section_close', // Needed to prevent p_close after section_close 'code','file','hr','preformatted','rss', 'htmlblock','phpblock', - 'footnote_close', ); // Stacks can contain paragraphs var $stackOpen = array( - 'section_open', + 'footnote_open','section_open', ); var $stackClose = array( - 'section_close', + 'footnote_close','section_close', ); @@ -1489,13 +1495,6 @@ class Doku_Handler_Block { } } - function openParagraph($pos){ - if ($this->inParagraph) return; - $this->calls[] = array('p_open',array(), $pos); - $this->inParagraph = true; - $this->skipEol = true; - } - /** * Close a paragraph if needed * @@ -1504,7 +1503,6 @@ class Doku_Handler_Block { * @author Andreas Gohr */ function closeParagraph($pos){ - if (!$this->inParagraph) return; // look back if there was any content - we don't want empty paragraphs $content = ''; for($i=count($this->calls)-1; $i>=0; $i--){ @@ -1522,28 +1520,10 @@ class Doku_Handler_Block { //remove the whole paragraph array_splice($this->calls,$i); }else{ - // remove ending linebreaks in the paragraph - $i=count($this->calls)-1; - if ($this->calls[$i][0] == 'cdata') $this->calls[$i][1][0] = rtrim($this->calls[$i][1][0],DOKU_PARSER_EOL); $this->calls[] = array('p_close',array(), $pos); } $this->inParagraph = false; - $this->skipEol = true; - } - - function addCall($call) { - $key = count($this->calls); - if ($key and ($call[0] == 'cdata') and ($this->calls[$key-1][0] == 'cdata')) { - $this->calls[$key-1][1][0] .= $call[1][0]; - } else { - $this->calls[] = $call; - } - } - - // simple version of addCall, without checking cdata - function storeCall($call) { - $this->calls[] = $call; } /** @@ -1551,71 +1531,186 @@ class Doku_Handler_Block { * * @author Harry Fuecks * @author Andreas Gohr + * @todo This thing is really messy and should be rewritten */ function process($calls) { - // open first paragraph - $this->openParagraph(0); foreach ( $calls as $key => $call ) { $cname = $call[0]; - if ($cname == 'plugin') { + if($cname == 'plugin') { $cname='plugin_'.$call[1][0]; + $plugin = true; $plugin_open = (($call[1][2] == DOKU_LEXER_ENTER) || ($call[1][2] == DOKU_LEXER_SPECIAL)); $plugin_close = (($call[1][2] == DOKU_LEXER_EXIT) || ($call[1][2] == DOKU_LEXER_SPECIAL)); } else { $plugin = false; } - /* stack */ - if ( in_array($cname,$this->stackClose ) && (!$plugin || $plugin_close)) { - $this->closeParagraph($call[2]); - $this->storeCall($call); - $this->openParagraph($call[2]); - continue; - } + + // Process blocks which are stack like... (contain linefeeds) if ( in_array($cname,$this->stackOpen ) && (!$plugin || $plugin_open) ) { - $this->closeParagraph($call[2]); - $this->storeCall($call); - $this->openParagraph($call[2]); - continue; - } - /* block */ - // If it's a substition it opens and closes at the same call. - // To make sure next paragraph is correctly started, let close go first. - if ( in_array($cname, $this->blockClose) && (!$plugin || $plugin_close)) { - $this->closeParagraph($call[2]); - $this->storeCall($call); - $this->openParagraph($call[2]); + + // Hack - footnotes shouldn't immediately contain a p_open + if ($this->addToStack($cname != 'footnote_open')) { + $this->closeParagraph($call[2]); + } + $this->calls[] = $call; + continue; } - if ( in_array($cname, $this->blockOpen) && (!$plugin || $plugin_open)) { - $this->closeParagraph($call[2]); - $this->storeCall($call); + + if ( in_array($cname,$this->stackClose ) && (!$plugin || $plugin_close)) { + + if ( $this->inParagraph ) { + $this->closeParagraph($call[2]); + } + $this->calls[] = $call; + if ($this->removeFromStack()) { + $this->calls[] = array('p_open',array(), $call[2]); + } continue; } - /* eol */ - if ( $cname == 'eol' ) { - // Check this isn't an eol instruction to skip... - if ( !$this->skipEol ) { - // Next is EOL => double eol => mark as paragraph - if ( isset($calls[$key+1]) && $calls[$key+1][0] == 'eol' ) { + + if ( !$this->atStart ) { + + if ( $cname == 'eol' ) { + + // Check this isn't an eol instruction to skip... + if ( $this->skipEolKey != $key ) { + // Look to see if the next instruction is an EOL + if ( isset($calls[$key+1]) && $calls[$key+1][0] == 'eol' ) { + + if ( $this->inParagraph ) { + //$this->calls[] = array('p_close',array(), $call[2]); + $this->closeParagraph($call[2]); + } + + $this->calls[] = array('p_open',array(), $call[2]); + $this->inParagraph = true; + + + // Mark the next instruction for skipping + $this->skipEolKey = $key+1; + + }else{ + //if this is just a single eol make a space from it + $this->addCall(array('cdata',array(DOKU_PARSER_EOL), $call[2])); + } + } + + + } else { + + $storeCall = true; + if ( $this->inParagraph && (in_array($cname, $this->blockOpen) && (!$plugin || $plugin_open))) { $this->closeParagraph($call[2]); - $this->openParagraph($call[2]); - } else { - //if this is just a single eol make a space from it - $this->addCall(array('cdata',array(DOKU_PARSER_EOL), $call[2])); + $this->calls[] = $call; + $storeCall = false; } + + if ( in_array($cname, $this->blockClose) && (!$plugin || $plugin_close)) { + if ( $this->inParagraph ) { + $this->closeParagraph($call[2]); + } + if ( $storeCall ) { + $this->calls[] = $call; + $storeCall = false; + } + + // This really sucks and suggests this whole class sucks but... + if ( isset($calls[$key+1])) { + $cname_plusone = $calls[$key+1][0]; + if ($cname_plusone == 'plugin') { + $cname_plusone = 'plugin'.$calls[$key+1][1][0]; + + // plugin test, true if plugin has a state which precludes it requiring blockOpen or blockClose + $plugin_plusone = true; + $plugin_test = ($call[$key+1][1][2] == DOKU_LEXER_MATCHED) || ($call[$key+1][1][2] == DOKU_LEXER_MATCHED); + } else { + $plugin_plusone = false; + } + if ((!in_array($cname_plusone, $this->blockOpen) && !in_array($cname_plusone, $this->blockClose)) || + ($plugin_plusone && $plugin_test) + ) { + + $this->calls[] = array('p_open',array(), $call[2]); + $this->inParagraph = true; + } + } + } + + if ( $storeCall ) { + $this->addCall($call); + } + } - continue; + + + } else { + + // Unless there's already a block at the start, start a paragraph + if ( !in_array($cname,$this->blockOpen) ) { + $this->calls[] = array('p_open',array(), $call[2]); + if ( $call[0] != 'eol' ) { + $this->calls[] = $call; + } + $this->atStart = false; + $this->inParagraph = true; + } else { + $this->addCall($call); + $this->atStart = false; + } + } - /* normal */ - $this->addCall($call); - $this->skipEol = false; + } - // close last paragraph - $call = end($this->calls); - $this->closeParagraph($call[2]); + + if ( $this->inParagraph ) { + if ( $cname == 'p_open' ) { + // Ditch the last call + array_pop($this->calls); + } else if ( !in_array($cname, $this->blockClose) ) { + //$this->calls[] = array('p_close',array(), $call[2]); + $this->closeParagraph($call[2]); + } else { + $last_call = array_pop($this->calls); + //$this->calls[] = array('p_close',array(), $call[2]); + $this->closeParagraph($call[2]); + $this->calls[] = $last_call; + } + } + return $this->calls; } + + /** + * + * @return bool true when a p_close() is required + */ + function addToStack($newStart = true) { + $ret = $this->inParagraph; + $this->blockStack[] = array($this->atStart, $this->inParagraph); + $this->atStart = $newStart; + $this->inParagraph = false; + + return $ret; + } + + function removeFromStack() { + $state = array_pop($this->blockStack); + $this->atStart = $state[0]; + $this->inParagraph = $state[1]; + + return $this->inParagraph; + } + + function addCall($call) { + $key = count($this->calls); + if ($key and ($call[0] == 'cdata') and ($this->calls[$key-1][0] == 'cdata')) { + $this->calls[$key-1][1][0] .= $call[1][0]; + } else { + $this->calls[] = $call; + } + } } //Setup VIM: ex: et ts=4 : diff --git a/inc/parser/metadata.php b/inc/parser/metadata.php index bd396e2b4..fc2c8cbc5 100644 --- a/inc/parser/metadata.php +++ b/inc/parser/metadata.php @@ -455,16 +455,16 @@ class Doku_Renderer_metadata extends Doku_Renderer { global $conf; $isImage = false; - if (is_array($title)){ - if($title['title']) return '['.$title['title'].']'; - } else if (is_null($title) || trim($title)==''){ + if (is_null($title)){ if (useHeading('content') && $id){ $heading = p_get_first_heading($id,false); if ($heading) return $heading; } return $default; - } else { + } else if (is_string($title)){ return $title; + } else if (is_array($title)){ + if($title['title']) return '['.$title['title'].']'; } } diff --git a/inc/parser/xhtml.php b/inc/parser/xhtml.php index b502b4f6b..9405d9420 100644 --- a/inc/parser/xhtml.php +++ b/inc/parser/xhtml.php @@ -29,7 +29,7 @@ class Doku_Renderer_xhtml extends Doku_Renderer { var $doc = ''; // will contain the whole document var $toc = array(); // will contain the Table of Contents - var $sectionedits = array(); // A stack of section edit data + private $sectionedits = array(); // A stack of section edit data var $headers = array(); var $footnotes = array(); -- cgit v1.2.3 From 1a6a1c042a16fc7ed8be4d870dbf32d60c05560b Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Sun, 6 Feb 2011 20:50:58 +0100 Subject: Revert "use CRLF in quoted printable encoding FS#1755" This research suggests that, the change does not help, but in fact breaks previoulsy working setups: https://bugs.dokuwiki.org/index.php?do=details&task_id=1755#comment3446 I'm still at loss on how to fix this bug. This reverts commit 2ae68f97446ff6bae5fbbe463eb00312598be840. --- inc/mail.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'inc') diff --git a/inc/mail.php b/inc/mail.php index aa9d195d1..c45a7c57e 100644 --- a/inc/mail.php +++ b/inc/mail.php @@ -11,7 +11,6 @@ if(!defined('DOKU_INC')) die('meh.'); // end of line for mail lines - RFC822 says CRLF but postfix (and other MTAs?) // think different if(!defined('MAILHEADER_EOL')) define('MAILHEADER_EOL',"\n"); -if(!defined('QUOTEDPRINTABLE_EOL')) define('QUOTEDPRINTABLE_EOL',"\015\012"); #define('MAILHEADER_ASCIIONLY',1); /** @@ -290,11 +289,11 @@ function mail_quotedprintable_encode($sText,$maxlen=74,$bEmulate_imap_8bit=true) // but this wouldn't be caught by such an easy RegExp if($maxlen){ preg_match_all( '/.{1,'.($maxlen - 2).'}([^=]{0,2})?/', $sLine, $aMatch ); - $sLine = implode( '=' . QUOTEDPRINTABLE_EOL, $aMatch[0] ); // add soft crlf's + $sLine = implode( '=' . MAILHEADER_EOL, $aMatch[0] ); // add soft crlf's } } // join lines into text - return implode(QUOTEDPRINTABLE_EOL,$aLines); + return implode(MAILHEADER_EOL,$aLines); } -- cgit v1.2.3 From cca94fbcfc035dabe5597e8565671c84862268e9 Mon Sep 17 00:00:00 2001 From: Roland Hager Date: Sun, 6 Feb 2011 19:57:16 +0000 Subject: made config cascade more flexible --- inc/config_cascade.php | 5 ++++- inc/init.php | 9 ++++----- 2 files changed, 8 insertions(+), 6 deletions(-) (limited to 'inc') diff --git a/inc/config_cascade.php b/inc/config_cascade.php index 3ae68a000..32001be81 100644 --- a/inc/config_cascade.php +++ b/inc/config_cascade.php @@ -5,7 +5,8 @@ * This array configures the default locations of various files in the * DokuWiki directory hierarchy. It can be overriden in inc/preload.php */ -$config_cascade = array( +$config_cascade = array_merge( + array( 'main' => array( 'default' => array(DOKU_CONF.'dokuwiki.php'), 'local' => array(DOKU_CONF.'local.php'), @@ -62,5 +63,7 @@ $config_cascade = array( 'plainauth.users' => array( 'default' => DOKU_CONF.'users.auth.php', ), + ), + $config_cascade ); diff --git a/inc/init.php b/inc/init.php index 6f4ba1ca9..d632bd8f8 100644 --- a/inc/init.php +++ b/inc/init.php @@ -11,7 +11,7 @@ function delta_time($start=0) { define('DOKU_START_TIME', delta_time()); global $config_cascade; -$config_cascade = ''; +$config_cascade = array(); // if available load a preload config file $preload = fullpath(dirname(__FILE__)).'/preload.php'; @@ -52,10 +52,9 @@ global $cache_authname; global $cache_metadata; $cache_metadata = array(); -//set the configuration cascade - but only if its not already been set in preload.php -if (empty($config_cascade)) { - include(DOKU_INC.'inc/config_cascade.php'); -} +// always include 'inc/config_cascade.php' +// previously in preload.php set fields of $config_cascade will be merged with the defaults +include(DOKU_INC.'inc/config_cascade.php'); //prepare config array() global $conf; -- cgit v1.2.3 From 3d7ac595bb629f3ee3bf26cefe9309e1d20d4470 Mon Sep 17 00:00:00 2001 From: Michael Hamann Date: Mon, 7 Feb 2011 23:23:32 +0100 Subject: Fix namespace template loading (load $data['tplfile'] instead of $data['tpl']) --- inc/common.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'inc') diff --git a/inc/common.php b/inc/common.php index 23d9c7155..ac7ddd653 100644 --- a/inc/common.php +++ b/inc/common.php @@ -843,7 +843,7 @@ function pageTemplate($id){ } } // load the content - $data['tpl'] = io_readFile($data['tpl']); + $data['tpl'] = io_readFile($data['tplfile']); } if($data['doreplace']) parsePageTemplate(&$data); } -- cgit v1.2.3 From 714260d8366708d8d89e6d244980bc2cd6f9c2dc Mon Sep 17 00:00:00 2001 From: Georgios Petsagourakis Date: Mon, 7 Feb 2011 23:48:50 +0100 Subject: Greek language update --- inc/lang/el/lang.php | 3 +++ 1 file changed, 3 insertions(+) (limited to 'inc') diff --git a/inc/lang/el/lang.php b/inc/lang/el/lang.php index 83a869df0..aaf7f6421 100644 --- a/inc/lang/el/lang.php +++ b/inc/lang/el/lang.php @@ -159,6 +159,9 @@ $lang['yours'] = 'Η έκδοσή σας'; $lang['diff'] = 'προβολή διαφορών με την τρέχουσα έκδοση'; $lang['diff2'] = 'Προβολή διαφορών μεταξύ των επιλεγμένων εκδόσεων'; $lang['difflink'] = 'Σύνδεσμος σε αυτή την προβολή διαφορών.'; +$lang['diff_type'] = 'Προβολή διαφορών:'; +$lang['diff_inline'] = 'Σε σειρά'; +$lang['diff_side'] = 'Δίπλα-δίπλα'; $lang['line'] = 'Γραμμή'; $lang['breadcrumb'] = 'Ιστορικό'; $lang['youarehere'] = 'Είστε εδώ'; -- cgit v1.2.3 From f25fcf537e1a3223cce417ba01dc63d79b80a6f7 Mon Sep 17 00:00:00 2001 From: Michael Hamann Date: Wed, 9 Feb 2011 11:14:09 +0100 Subject: Make the regex for internal links more restrictive This fixes a PCRE backtrack error that occurred on large pages like :users on dokuwiki.org. --- inc/parser/parser.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'inc') diff --git a/inc/parser/parser.php b/inc/parser/parser.php index a7764ee9c..e47ce56fa 100644 --- a/inc/parser/parser.php +++ b/inc/parser/parser.php @@ -828,7 +828,7 @@ class Doku_Parser_Mode_internallink extends Doku_Parser_Mode { function connectTo($mode) { // Word boundaries? - $this->Lexer->addSpecialPattern("\[\[(?:(?:.*?\[.*?\])|.+?)\]\]",$mode,'internallink'); + $this->Lexer->addSpecialPattern("\[\[(?:(?:[^[\]]*?\[.*?\])|.+?)\]\]",$mode,'internallink'); } function getSort() { -- cgit v1.2.3 From 3ec19a6ad26bf02a10a848e2257c9d5a44e6f5e9 Mon Sep 17 00:00:00 2001 From: Windy Wanderer Date: Wed, 9 Feb 2011 18:37:58 +0100 Subject: Russian language update --- inc/lang/ru/lang.php | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'inc') diff --git a/inc/lang/ru/lang.php b/inc/lang/ru/lang.php index fc9e53b3a..977f7fde4 100644 --- a/inc/lang/ru/lang.php +++ b/inc/lang/ru/lang.php @@ -18,6 +18,7 @@ * @author Aleksey Osadchiy * @author Aleksandr Selivanov * @author Ladyko Andrey + * @author Eugene */ $lang['encoding'] = ' utf-8'; $lang['direction'] = 'ltr'; @@ -168,6 +169,9 @@ $lang['yours'] = 'Ваша версия'; $lang['diff'] = 'показать отличия от текущей версии'; $lang['diff2'] = 'Показать различия между ревизиями '; $lang['difflink'] = 'Ссылка на это сравнение'; +$lang['diff_type'] = 'Посмотреть отличия'; +$lang['diff_inline'] = 'Встроенный'; +$lang['diff_side'] = 'Бок о бок'; $lang['line'] = 'Строка'; $lang['breadcrumb'] = 'Вы посетили'; $lang['youarehere'] = 'Вы находитесь здесь'; -- cgit v1.2.3 From 7e8e923f9382c30776c2983fc4ae90eeadf0eb64 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Thu, 10 Feb 2011 14:16:44 +0100 Subject: Use Base64 encoding for long subjects FS#2169 Quoted-Printable specifies a maximum line length and some mail tools (Apple mail and Thunderbird) take this quite serious and will fail to decode subjects encoded with quoted-printable when the subject exceeds the length limit. The correct fix would be to wrap the header into multiple lines. But this seems not to be possible with mails() $subject variable. This patch switches to Base64 encoding for long subjects. A general decision if switching completely to Base64 is the best way to go is still open. (see bugreport) --- inc/mail.php | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'inc') diff --git a/inc/mail.php b/inc/mail.php index c45a7c57e..f991909d0 100644 --- a/inc/mail.php +++ b/inc/mail.php @@ -112,9 +112,16 @@ function _mail_send_action($data) { } if(!utf8_isASCII($subject)) { - $subject = '=?UTF-8?Q?'.mail_quotedprintable_encode($subject,0).'?='; + $enc_subj = '=?UTF-8?Q?'.mail_quotedprintable_encode($subject,0).'?='; // Spaces must be encoded according to rfc2047. Use the "_" shorthand - $subject = preg_replace('/ /', '_', $subject); + $enc_sub = preg_replace('/ /', '_', $enc_sub); + + // quoted printable has length restriction, use base64 if needed + if(strlen($subject) > 74){ + $enc_subj = '=?UTF-8?B?'.base64_encode($subject).'?='; + } + + $subject = $enc_subj; } $header = ''; -- cgit v1.2.3 From 52784dd85122f75ca221c53d4fd9dcc98bfd2450 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Thu, 10 Feb 2011 18:51:40 +0100 Subject: do not (re)render metadata in backlinks A page could have possibly hundreds of backlinks, when the cache is outdated they should not be rererendered at once --- inc/fulltext.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'inc') diff --git a/inc/fulltext.php b/inc/fulltext.php index 0f2414213..bb2647165 100644 --- a/inc/fulltext.php +++ b/inc/fulltext.php @@ -142,7 +142,7 @@ function ft_backlinks($id){ // check metadata for matching links foreach($docs as $match){ // metadata relation reference links are already resolved - $links = p_get_metadata($match,'relation references'); + $links = p_get_metadata($match,'relation references',false); if (isset($links[$id])) $result[] = $match; } -- cgit v1.2.3 From 0667123fd26e32f9e914b6bb4a2bfcd6f894c076 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Elan=20Ruusam=C3=A4e?= Date: Fri, 11 Feb 2011 11:10:53 +0100 Subject: correctly encode quoted email names --- inc/mail.php | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'inc') diff --git a/inc/mail.php b/inc/mail.php index f991909d0..bd6c0db6a 100644 --- a/inc/mail.php +++ b/inc/mail.php @@ -203,7 +203,16 @@ function mail_encode_address($string,$header='',$names=true){ } if(!utf8_isASCII($text)){ - $text = '=?UTF-8?Q?'.mail_quotedprintable_encode($text,0).'?='; + // put the quotes outside as in =?UTF-8?Q?"Elan Ruusam=C3=A4e"?= vs "=?UTF-8?Q?Elan Ruusam=C3=A4e?=" + if (preg_match('/^"(.+)"$/', $text, $matches)) { + $text = '"=?UTF-8?Q?'.mail_quotedprintable_encode($matches[1], 0).'?="'; + } else { + $text = '=?UTF-8?Q?'.mail_quotedprintable_encode($text, 0).'?='; + } + // additionally the space character should be encoded as =20 (or each + // word QP encoded separately). + // however this is needed only in mail headers, not globally in mail_quotedprintable_encode(). + $text = str_replace(" ", "=20", $text); } }else{ $text = ''; -- cgit v1.2.3 From e86ed94b44e3e250bf2cb97e784a4b7b1caf94aa Mon Sep 17 00:00:00 2001 From: Petsagourakis George Date: Sat, 12 Feb 2011 14:46:27 +0200 Subject: Greek translation revisited --- inc/lang/el/admin.txt | 2 +- inc/lang/el/adminplugins.txt | 2 +- inc/lang/el/conflict.txt | 7 ++- inc/lang/el/denied.txt | 2 +- inc/lang/el/draft.txt | 4 +- inc/lang/el/edit.txt | 4 +- inc/lang/el/index.txt | 2 +- inc/lang/el/install.html | 39 ++++++------- inc/lang/el/lang.php | 80 +++++++++++++-------------- inc/lang/el/locked.txt | 3 +- inc/lang/el/login.txt | 6 +- inc/lang/el/newpage.txt | 3 +- inc/lang/el/norev.txt | 5 +- inc/lang/el/password.txt | 4 +- inc/lang/el/preview.txt | 3 +- inc/lang/el/pwconfirm.txt | 6 +- inc/lang/el/read.txt | 3 +- inc/lang/el/recent.txt | 2 +- inc/lang/el/register.txt | 4 +- inc/lang/el/registermail.txt | 2 +- inc/lang/el/resendpwd.txt | 4 +- inc/lang/el/revisions.txt | 7 ++- inc/lang/el/searchpage.txt | 3 +- inc/lang/el/showrev.txt | 2 +- inc/lang/el/stopwords.txt | 126 +++++++++++++++++++++++++++++++++--------- inc/lang/el/subscr_digest.txt | 7 +-- inc/lang/el/subscr_list.txt | 9 ++- inc/lang/el/subscr_single.txt | 9 ++- inc/lang/el/updateprofile.txt | 3 +- 29 files changed, 224 insertions(+), 129 deletions(-) (limited to 'inc') diff --git a/inc/lang/el/admin.txt b/inc/lang/el/admin.txt index 49e6c657b..729004b05 100644 --- a/inc/lang/el/admin.txt +++ b/inc/lang/el/admin.txt @@ -1,3 +1,3 @@ ====== Διαχείριση ====== -Παρακάτω μπορείτε να βρείτε μια λίστα με τις δυνατότητες διαχείρισης στο DokuWiki +Παρακάτω μπορείτε να βρείτε μια λίστα με τις λειτουργίες διαχείρισης στο DokuWiki diff --git a/inc/lang/el/adminplugins.txt b/inc/lang/el/adminplugins.txt index ea00b959e..ef1a2853b 100644 --- a/inc/lang/el/adminplugins.txt +++ b/inc/lang/el/adminplugins.txt @@ -1 +1 @@ -===== Πρόσθετες συνδεόμενες υπομονάδες ===== \ No newline at end of file +===== Πρόσθετα ===== \ No newline at end of file diff --git a/inc/lang/el/conflict.txt b/inc/lang/el/conflict.txt index 27b80b397..a2065c0f3 100644 --- a/inc/lang/el/conflict.txt +++ b/inc/lang/el/conflict.txt @@ -1,5 +1,8 @@ ====== Υπάρχει μία νεώτερη έκδοση αυτής της σελίδας ====== -Υπάρχει μία νεώτερη έκδοση της σελίδας που τρoποποιήσατε. Αυτό συμβαίνει εάν κάποιος άλλος χρήστης τροποποίησε την ίδια σελίδα ενώ την τροποποιούσατε και εσείς. +Υπάρχει μία νεώτερη έκδοση της σελίδας που τρoποποιήσατε. +Αυτό συμβαίνει εάν κάποιος άλλος χρήστης τροποποίησε την ίδια σελίδα ενώ την επεξεργαζόσασταν και εσείς. -Ελέγξτε προσεκτικά τις διαφορές που παρουσιάζονται παρακάτω και έπειτα αποφασίστε ποια έκδοση θα κρατήσετε. Εάν επιλέξετε ''Αποθήκευση'', η δική σας έκδοση θα αποθηκευτεί. Εάν επιλέξετε ''Ακύρωση'', η νεώτερη έκδοση θα διατηρηθεί ως τρέχουσα. +Ελέγξτε προσεκτικά τις διαφορές που παρουσιάζονται παρακάτω και έπειτα αποφασίστε ποια έκδοση θα κρατήσετε. +Εάν επιλέξετε ''Αποθήκευση'', η δική σας έκδοση θα αποθηκευτεί. +Εάν επιλέξετε ''Ακύρωση'', η νεώτερη έκδοση θα διατηρηθεί ως τρέχουσα. diff --git a/inc/lang/el/denied.txt b/inc/lang/el/denied.txt index 71e9a04b8..36d7ae103 100644 --- a/inc/lang/el/denied.txt +++ b/inc/lang/el/denied.txt @@ -2,4 +2,4 @@ Συγγνώμη, αλλά δεν έχετε επαρκή δικαιώματα για την συγκεκριμένη ενέργεια. -Μήπως παραλείψατε να συνδεθείτε? +Μήπως παραλείψατε να συνδεθείτε; diff --git a/inc/lang/el/draft.txt b/inc/lang/el/draft.txt index 3bb15037f..5ca7b8dfa 100644 --- a/inc/lang/el/draft.txt +++ b/inc/lang/el/draft.txt @@ -1,6 +1,8 @@ ====== Βρέθηκε μία αυτόματα αποθηκευμένη σελίδα ====== -Η τελευταία τροποποίηση αυτής της σελίδας δεν ολοκληρώθηκε επιτυχώς. Η εφαρμογή αποθήκευσε αυτόματα μία εκδοχή της σελίδας την ώρα που την τροποποιούσατε και μπορείτε να την χρησιμοποιήσετε για να συνεχίσετε την εργασία σας. Παρακάτω φαίνεται αυτή η πιο πρόσφατη αυτόματα αποθηκευμένη σελίδα. +Η τελευταία τροποποίηση αυτής της σελίδας δεν ολοκληρώθηκε επιτυχώς. +Η εφαρμογή αποθήκευσε αυτόματα μία εκδοχή της σελίδας την ώρα που την επεξεργαζόσασταν και μπορείτε να την χρησιμοποιήσετε για να συνεχίσετε την εργασία σας. +Παρακάτω φαίνεται αυτή η πιο πρόσφατη αυτόματα αποθηκευμένη σελίδα. Μπορείτε να //επαναφέρετε// αυτή την αυτόματα αποθηκευμένη σελίδα ως τρέχουσα, να την //διαγράψετε// ή να //ακυρώσετε// τη διαδικασία τροποποίησης της τρέχουσας σελίδας. diff --git a/inc/lang/el/edit.txt b/inc/lang/el/edit.txt index 26b52f97a..8d9559fcc 100644 --- a/inc/lang/el/edit.txt +++ b/inc/lang/el/edit.txt @@ -1 +1,3 @@ -Τροποποιήστε την σελίδα **μόνο** εάν μπορείτε να την **βελτιώσετε**. Για να κάνετε δοκιμές με ασφάλεια ή να εξοικειωθείτε με το περιβάλλον χρησιμοποιήστε το [[:playground:playground|playground]]. Αφού τροποποιήστε την σελίδα επιλέξτε ''Αποθήκευση''. Δείτε τις [[:wiki:syntax|οδηγίες]] για την σωστή σύνταξη. +Τροποποιήστε την σελίδα **μόνο** εάν μπορείτε να την **βελτιώσετε**. +Για να κάνετε δοκιμές με ασφάλεια ή να εξοικειωθείτε με το περιβάλλον χρησιμοποιήστε το [[:playground:playground|playground]]. +Αφού τροποποιήστε την σελίδα επιλέξτε ''Αποθήκευση''. Δείτε τις [[:wiki:syntax|οδηγίες]] για την σωστή σύνταξη. diff --git a/inc/lang/el/index.txt b/inc/lang/el/index.txt index 51f1fc600..e2da3a85e 100644 --- a/inc/lang/el/index.txt +++ b/inc/lang/el/index.txt @@ -1,3 +1,3 @@ ====== Κατάλογος ====== -Αυτός είναι ένας κατάλογος όλων των διαθέσιμων σελίδων ταξινομημένων κατά [[doku>namespaces|φακέλους]]. +Εδώ βλέπετε τον κατάλογο όλων των διαθέσιμων σελίδων, ταξινομημένες κατά [[doku>namespaces|φακέλους]]. diff --git a/inc/lang/el/install.html b/inc/lang/el/install.html index 89429d55b..9487de7c7 100644 --- a/inc/lang/el/install.html +++ b/inc/lang/el/install.html @@ -1,25 +1,26 @@

Αυτή η σελίδα περιέχει πληροφορίες που βοηθούν στην αρχική εγκατάσταση και -ρύθμιση της εφαρμογής Dokuwiki. Περισσότερες -πληροφορίες υπάρχουν στη σελίδα τεκμηρίωσης -του οδηγού εγκατάστασης.

+ρύθμιση της εφαρμογής Dokuwiki. +Περισσότερες πληροφορίες υπάρχουν στη +σελίδα τεκμηρίωσης του οδηγού εγκατάστασης.

-

Η εφαρμογή DokuWiki χρησιμοποιεί απλά αρχεία για να αποθηκεύει τις σελίδες wiki -καθώς και πληροφορίες που σχετίζονται με αυτές (π.χ. εικόνες, καταλόγους αναζήτησης, -παλαιότερες εκδόσεις σελίδων, κλπ). Για να λειτουργεί σωστά η εφαρμογή DokuWiki -πρέπει να έχει δικαιώματα εγγραφής στους φακέλους που φιλοξενούν -αυτά τα αρχεία. Ο οδηγός εγκατάστασης δεν έχει την δυνατότητα να παραχωρήσει αυτά τα -δικαιώματα εγγραφής στους σχετικούς φακέλους. Ο κανονικός τρόπος για να γίνει αυτό είναι -είτε απευθείας σε περιβάλλον γραμμής εντολών ή, εάν δεν έχετε τέτοια πρόσβαση, μέσω FTP ή -του πίνακα ελέγχου του περιβάλλοντος φιλοξενίας (π.χ. cPanel).

+

Η εφαρμογή DokuWiki χρησιμοποιεί απλά αρχεία για να αποθηκεύει τις σελίδες +wiki καθώς και πληροφορίες που σχετίζονται με αυτές (π.χ. εικόνες, καταλόγους +αναζήτησης, παλαιότερες εκδόσεις σελίδων, κλπ). Για να λειτουργεί σωστά η εφαρμογή +DokuWiki πρέπει να έχει δικαιώματα εγγραφής στους φακέλους που +φιλοξενούν αυτά τα αρχεία. Ο οδηγός εγκατάστασης δεν έχει την δυνατότητα να +παραχωρήσει αυτά τα δικαιώματα εγγραφής στους σχετικούς φακέλους. Ο κανονικός +τρόπος για να γίνει αυτό είναι είτε απευθείας σε περιβάλλον γραμμής εντολών ή, +εάν δεν έχετε τέτοια πρόσβαση, μέσω FTP ή του πίνακα ελέγχου του περιβάλλοντος +φιλοξενίας (π.χ. cPanel).

Ο οδηγός εγκατάστασης θα ρυθμίσει την εφαρμογή DokuWiki ώστε να χρησιμοποιεί -ACL, με τρόπο ώστε ο διαχειριστής να -έχει δυνατότητα εισόδου και πρόσβαση στο μενού διαχείρισης της εφαρμογής για εγκατάσταση -επεκτάσεων, διαχείριση χρηστών, διαχείριση δικαιωμάτων πρόσβασης στις διάφορες σελίδες και -αλλαγή των ρυθμίσεων. Αυτό δεν είναι απαραίτητο για να λειτουργήσει η εφαρμογή, αλλά -κάνει την διαχείρισή της ευκολότερη.

+ACL, με τρόπο ώστε ο διαχειριστής +να έχει δυνατότητα εισόδου και πρόσβαση στο μενού διαχείρισης της εφαρμογής για +εγκατάσταση επεκτάσεων, διαχείριση χρηστών, διαχείριση δικαιωμάτων πρόσβασης στις +διάφορες σελίδες και αλλαγή των ρυθμίσεων. Αυτό δεν είναι απαραίτητο για να +λειτουργήσει η εφαρμογή, αλλά κάνει την διαχείρισή της ευκολότερη.

Οι έμπειροι χρήστες και οι χρήστες με ειδικές απαιτήσεις μπορούν να επισκεφθούν -τις σελίδες που περιέχουν λεπτομερείς -οδηγίες εγκατάστασης -και πληροφορίες για τις ρυθμίσεις.

+τις σελίδες που περιέχουν λεπτομερείς +οδηγίες εγκατάστασης και πληροφορίες +για τις ρυθμίσεις.

\ No newline at end of file diff --git a/inc/lang/el/lang.php b/inc/lang/el/lang.php index aaf7f6421..b8c8698f5 100644 --- a/inc/lang/el/lang.php +++ b/inc/lang/el/lang.php @@ -15,7 +15,7 @@ $lang['doublequoteclosing'] = '”'; $lang['singlequoteopening'] = '‘'; $lang['singlequoteclosing'] = '’'; $lang['apostrophe'] = '’'; -$lang['btn_edit'] = 'Τροποποίηση σελίδας'; +$lang['btn_edit'] = 'Επεξεργασία σελίδας'; $lang['btn_source'] = 'Προβολή κώδικα σελίδας'; $lang['btn_show'] = 'Προβολή σελίδας'; $lang['btn_create'] = 'Δημιουργία σελίδας'; @@ -30,20 +30,20 @@ $lang['btn_recent'] = 'Πρόσφατες αλλαγές σελίδω $lang['btn_upload'] = 'Φόρτωση'; $lang['btn_cancel'] = 'Ακύρωση'; $lang['btn_index'] = 'Κατάλογος'; -$lang['btn_secedit'] = 'Τροποποίηση'; -$lang['btn_login'] = 'Είσοδος χρήστη'; -$lang['btn_logout'] = 'Έξοδος χρήστη'; +$lang['btn_secedit'] = 'Επεξεργασία'; +$lang['btn_login'] = 'Σύνδεση χρήστη'; +$lang['btn_logout'] = 'Αποσύνδεση χρήστη'; $lang['btn_admin'] = 'Διαχείριση'; $lang['btn_update'] = 'Ενημέρωση'; $lang['btn_delete'] = 'Σβήσιμο'; $lang['btn_back'] = 'Πίσω'; -$lang['btn_backlink'] = 'Σύνδεσμοι προς την τρέχουσα σελίδα'; +$lang['btn_backlink'] = 'Σύνδεσμοι προς αυτή τη σελίδα'; $lang['btn_backtomedia'] = 'Επιστροφή στην επιλογή αρχείων'; $lang['btn_subscribe'] = 'Εγγραφή σε λήψη ενημερώσεων σελίδας'; -$lang['btn_profile'] = 'Τροποποίηση προφίλ'; +$lang['btn_profile'] = 'Επεξεργασία προφίλ'; $lang['btn_reset'] = 'Ακύρωση'; $lang['btn_resendpwd'] = 'Αποστολή νέου κωδικού'; -$lang['btn_draft'] = 'Τροποποίηση αυτόματα αποθηκευμένης σελίδας'; +$lang['btn_draft'] = 'Επεξεργασία αυτόματα αποθηκευμένης σελίδας'; $lang['btn_recover'] = 'Επαναφορά αυτόματα αποθηκευμένης σελίδας'; $lang['btn_draftdel'] = 'Διαγραφή αυτόματα αποθηκευμένης σελίδας'; $lang['btn_revert'] = 'Αποκατάσταση'; @@ -55,7 +55,7 @@ $lang['oldpass'] = 'Επιβεβαίωση τρέχοντος κω $lang['passchk'] = 'ακόμη μια φορά'; $lang['remember'] = 'Απομνημόνευση στοιχείων λογαριασμού'; $lang['fullname'] = 'Ονοματεπώνυμο'; -$lang['email'] = 'E-Mail'; +$lang['email'] = 'e-mail'; $lang['register'] = 'Εγγραφή'; $lang['profile'] = 'Προφίλ χρήστη'; $lang['badlogin'] = 'Συγνώμη, το όνομα χρήστη ή ο κωδικός ήταν λανθασμένο.'; @@ -67,15 +67,15 @@ $lang['reguexists'] = 'Αυτός ο λογαριασμός υπάρ $lang['regsuccess'] = 'Ο λογαριασμός δημιουργήθηκε και ο κωδικός εστάλει με e-mail.'; $lang['regsuccess2'] = 'Ο λογαριασμός δημιουργήθηκε.'; $lang['regmailfail'] = 'Φαίνεται να υπάρχει πρόβλημα με την αποστολή του κωδικού μέσω e-mail. Παρακαλούμε επικοινωνήστε μαζί μας!'; -$lang['regbadmail'] = 'Η διεύθυνση e-mail δεν δείχνει έγκυρη - εάν πιστεύετε ότι αυτό είναι λάθος, επικοινωνήστε μαζί μας'; +$lang['regbadmail'] = 'Η διεύθυνση e-mail δεν είναι έγκυρη - εάν πιστεύετε ότι αυτό είναι λάθος, επικοινωνήστε μαζί μας'; $lang['regbadpass'] = 'Οι δύο κωδικοί δεν είναι ίδιοι, προσπαθήστε ξανά.'; $lang['regpwmail'] = 'Ο κωδικός σας'; $lang['reghere'] = 'Δεν έχετε λογαριασμό ακόμη? Δημιουργήστε έναν'; -$lang['profna'] = 'Αυτό το wiki δεν υποστηρίζει την τροποποίηση προφίλ.'; +$lang['profna'] = 'Αυτό το wiki δεν υποστηρίζει την επεξεργασία προφίλ.'; $lang['profnochange'] = 'Καμία αλλαγή.'; $lang['profnoempty'] = 'Δεν επιτρέπεται κενό όνομα χρήστη η κενή διεύθυνση email.'; $lang['profchanged'] = 'Το προφίλ χρήστη τροποποιήθηκε επιτυχώς.'; -$lang['pwdforget'] = 'Ξεχάσατε το κωδικό σας? Αποκτήστε νέο.'; +$lang['pwdforget'] = 'Ξεχάσατε το κωδικό σας; Αποκτήστε νέο.'; $lang['resendna'] = 'Αυτό το wiki δεν υποστηρίζει την εκ\' νέου αποστολή κωδικών.'; $lang['resendpwd'] = 'Αποστολή νέων κωδικών για τον χρήστη'; $lang['resendpwdmissing'] = 'Πρέπει να συμπληρώσετε όλα τα πεδία.'; @@ -83,7 +83,7 @@ $lang['resendpwdnouser'] = 'Αυτός ο χρήστης δεν υπάρχ $lang['resendpwdbadauth'] = 'Αυτός ο κωδικός ενεργοποίησης δεν είναι έγκυρος.'; $lang['resendpwdconfirm'] = 'Ο σύνδεσμος προς την σελίδα ενεργοποίησης εστάλει με e-mail.'; $lang['resendpwdsuccess'] = 'Ο νέος σας κωδικός εστάλη με e-mail.'; -$lang['license'] = 'Εκτός εάν αναφέρεται διαφορετικά, το υλικό αυτού του wiki διατίθεται κάτω από την ακόλουθη άδεια:'; +$lang['license'] = 'Εκτός εάν αναφέρεται διαφορετικά, το περιεχόμενο σε αυτο το wiki διέπεται από την ακόλουθη άδεια:'; $lang['licenseok'] = 'Σημείωση: Τροποποιώντας αυτή την σελίδα αποδέχεστε την διάθεση του υλικού σας σύμφωνα με την ακόλουθη άδεια:'; $lang['searchmedia'] = 'Αναζήτηση αρχείου:'; $lang['searchmedia_in'] = 'Αναζήτηση σε %s'; @@ -92,9 +92,9 @@ $lang['txt_filename'] = 'Επιλέξτε νέο όνομα αρχεί $lang['txt_overwrt'] = 'Αντικατάσταση υπάρχοντος αρχείου'; $lang['lockedby'] = 'Προσωρινά κλειδωμένο από'; $lang['lockexpire'] = 'Το κλείδωμα λήγει στις'; -$lang['willexpire'] = 'Το κλείδωμά σας για την επεξεργασία αυτής της σελίδας θα λήξει σε ένα λεπτό.\n Για να το ανανεώσετε χρησιμοποιήστε την επιλογή Προεπισκόπηση.'; +$lang['willexpire'] = 'Το κλείδωμά σας για την επεξεργασία αυτής της σελίδας θα λήξει σε ένα λεπτό.\n Για να το ανανεώσετε χρησιμοποιήστε την Προεπισκόπηση.'; $lang['js']['notsavedyet'] = 'Οι μη αποθηκευμένες αλλαγές θα χαθούν. -Θέλετε να συνεχίσετε?'; +Θέλετε να συνεχίσετε;'; $lang['js']['searchmedia'] = 'Αναζήτηση για αρχεία'; $lang['js']['keepopen'] = 'Το παράθυρο να μην κλείνει'; $lang['js']['hidedetails'] = 'Απόκρυψη λεπτομερειών'; @@ -107,25 +107,25 @@ $lang['js']['mediaclose'] = 'Κλείσιμο'; $lang['js']['mediainsert'] = 'Εισαγωγή'; $lang['js']['mediadisplayimg'] = 'Προβολή εικόνας.'; $lang['js']['mediadisplaylnk'] = 'Προβολή μόνο του συνδέσμου.'; -$lang['js']['mediasmall'] = 'Μικρή έκδοση'; -$lang['js']['mediamedium'] = 'Μεσαία έκδοση'; -$lang['js']['medialarge'] = 'Μεγάλη έκδοση'; -$lang['js']['mediaoriginal'] = 'Κανονική έκδοση'; +$lang['js']['mediasmall'] = 'Μικρό μέγεθος'; +$lang['js']['mediamedium'] = 'Μεσαίο μέγεθος'; +$lang['js']['medialarge'] = 'Μεγάλο μέγεθος'; +$lang['js']['mediaoriginal'] = 'Αρχικό μέγεθος'; $lang['js']['medialnk'] = 'Σύνδεσμος στην σελίδα λεπτομερειών'; $lang['js']['mediadirect'] = 'Απευθείας σύνδεσμος στο αυθεντικό'; $lang['js']['medianolnk'] = 'Χωρίς σύνδεσμο'; $lang['js']['medianolink'] = 'Να μην γίνει σύνδεσμος η εικόνα'; -$lang['js']['medialeft'] = 'Στοίχιση της εικόνας αριστερά.'; -$lang['js']['mediaright'] = 'Στοίχιση της εικόνας δεξιά.'; -$lang['js']['mediacenter'] = 'Στοίχιση της εικόνας στη μέση.'; -$lang['js']['medianoalign'] = 'Να μην γίνει στοίχιση.'; +$lang['js']['medialeft'] = 'Αριστερή στοίχιση εικόνας.'; +$lang['js']['mediaright'] = 'Δεξιά στοίχιση εικόνας.'; +$lang['js']['mediacenter'] = 'Κέντρική στοίχιση εικόνας.'; +$lang['js']['medianoalign'] = 'Χωρίς στοίχηση.'; $lang['js']['nosmblinks'] = 'Οι σύνδεσμοι προς Windows shares δουλεύουν μόνο στον Microsoft Internet Explorer. Μπορείτε πάντα να κάνετε αντιγραφή και επικόλληση του συνδέσμου.'; $lang['js']['linkwiz'] = 'Αυτόματος Οδηγός Συνδέσμων'; $lang['js']['linkto'] = 'Σύνδεση σε:'; -$lang['js']['del_confirm'] = 'Να διαγραφεί?'; +$lang['js']['del_confirm'] = 'Να διαγραφεί;'; $lang['js']['mu_btn'] = 'Ταυτόχρονη φόρτωση πολλαπλών φακέλων'; -$lang['rssfailed'] = 'Εμφανίστηκε κάποιο σφάλμα κατά την ανάγνωση αυτού του feed: '; +$lang['rssfailed'] = 'Παρουσιάστηκε κάποιο σφάλμα κατά την ανάγνωση αυτού του feed: '; $lang['nothingfound'] = 'Δεν βρέθηκαν σχετικά αποτελέσματα.'; $lang['mediaselect'] = 'Επιλογή Αρχείων'; $lang['fileupload'] = 'Φόρτωση αρχείου'; @@ -156,7 +156,7 @@ $lang['quickhits'] = 'Σχετικές σελίδες'; $lang['toc'] = 'Πίνακας Περιεχομένων'; $lang['current'] = 'τρέχουσα'; $lang['yours'] = 'Η έκδοσή σας'; -$lang['diff'] = 'προβολή διαφορών με την τρέχουσα έκδοση'; +$lang['diff'] = 'Προβολή διαφορών με την τρέχουσα έκδοση'; $lang['diff2'] = 'Προβολή διαφορών μεταξύ των επιλεγμένων εκδόσεων'; $lang['difflink'] = 'Σύνδεσμος σε αυτή την προβολή διαφορών.'; $lang['diff_type'] = 'Προβολή διαφορών:'; @@ -221,12 +221,12 @@ $lang['img_camera'] = 'Camera'; $lang['img_keywords'] = 'Λέξεις-κλειδιά'; $lang['subscr_subscribe_success'] = 'Ο/η %s προστέθηκε στην λίστα ειδοποιήσεων για το %s'; $lang['subscr_subscribe_error'] = 'Σφάλμα κατά την προσθήκη του/της %s στην λίστα ειδοποιήσεων για το %s'; -$lang['subscr_subscribe_noaddress'] = 'Δεν υπάρχει διεύθυνση ταχυδρομείου, συσχετισμένη με το όνομα χρήστη σας, κατά συνέπεια δεν μπορείτε να προστεθείτε στην λίστα ειδοποιήσεων'; +$lang['subscr_subscribe_noaddress'] = 'Δεν υπάρχει διεύθυνση ταχυδρομείου συσχετισμένη με το όνομα χρήστη σας. Κατά συνέπεια δεν μπορείτε να προστεθείτε στην λίστα ειδοποιήσεων'; $lang['subscr_unsubscribe_success'] = 'Ο/η %s, απομακρύνθηκε από την λίστα ειδοποιήσεων για το %s'; $lang['subscr_unsubscribe_error'] = 'Σφάλμα κατά την απομάκρυνση του/της %s στην λίστα ειδοποιήσεων για το %s'; $lang['subscr_already_subscribed'] = 'Ο/η %s είναι ήδη στην λίστα ειδοποίησης για το %s'; $lang['subscr_not_subscribed'] = 'Ο/η %s δεν είναι στην λίστα ειδοποίησης για το %s'; -$lang['subscr_m_not_subscribed'] = 'Αυτήν την στιγμή, δεν είσαστε γραμμένος/η στην λίστα ειδοποίησης της τρέχουσας σελίδας ή φακέλου.'; +$lang['subscr_m_not_subscribed'] = 'Αυτήν την στιγμή, δεν είσαστε εγεγγραμμένος/η στην λίστα ειδοποίησης της τρέχουσας σελίδας ή φακέλου.'; $lang['subscr_m_new_header'] = 'Προσθήκη στην λίστα ειδοποίησης'; $lang['subscr_m_current_header'] = 'Τρέχουσες εγγραφές ειδοποιήσεων'; $lang['subscr_m_unsubscribe'] = 'Διαγραφή'; @@ -234,17 +234,17 @@ $lang['subscr_m_subscribe'] = 'Εγγραφή'; $lang['subscr_m_receive'] = 'Λήψη'; $lang['subscr_style_every'] = 'email σε κάθε αλλαγή'; $lang['subscr_style_digest'] = 'συνοπτικό email αλλαγών της σελίδας (κάθε %.2f μέρες)'; -$lang['subscr_style_list'] = 'λίστα αλλαγμένων σελίδων μετά από το τελευταίο email (κάθε %.2f μέρες)'; +$lang['subscr_style_list'] = 'λίστα σελίδων με αλλαγές μετά από το τελευταίο email (κάθε %.2f μέρες)'; $lang['authmodfailed'] = 'Κακή ρύθμιση λίστας χρηστών. Παρακαλούμε ενημερώστε τον διαχειριστή του wiki.'; -$lang['authtempfail'] = 'Η είσοδος χρηστών δεν λειτουργεί αυτή την στιγμή. Εάν αυτό διαρκεί για πολύ χρόνο, παρακαλούμε ενημερώστε τον διαχειριστή του wiki.'; +$lang['authtempfail'] = 'Η συνδεση χρηστών είναι απενεργοποιημένη αυτή την στιγμή. Αν αυτό διαρκέσει για πολύ, παρακαλούμε ενημερώστε τον διαχειριστή του wiki.'; $lang['i_chooselang'] = 'Επιλογή γλώσσας'; $lang['i_installer'] = 'Οδηγός εγκατάστασης DokuWiki'; $lang['i_wikiname'] = 'Ονομασία wiki'; -$lang['i_enableacl'] = 'Ενεργοποίηση Λίστας Δικαιωμάτων Πρόσβασης - ACL (συνιστάται)'; +$lang['i_enableacl'] = 'Ενεργοποίηση Λίστας Δικαιωμάτων Πρόσβασης - ACL (συνίσταται)'; $lang['i_superuser'] = 'Διαχειριστής'; $lang['i_problems'] = 'Ο οδηγός εγκατάστασης συνάντησε τα προβλήματα που αναφέρονται παρακάτω. Η εγκατάσταση δεν θα ολοκληρωθεί επιτυχώς μέχρι να επιλυθούν αυτά τα προβλήματα.'; $lang['i_modified'] = 'Για λόγους ασφαλείας, ο οδηγός εγκατάστασης λειτουργεί μόνο με νέες και μη τροποποιημένες εγκαταστάσεις Dokuwiki. -Πρέπει είτε να κάνετε νέα εγκατάσταση, χρησιμοποιώντας το αρχικό πακέτο εγκατάστασης, ή να συμβουλευτείτε τις οδηγίες εγκατάστασης της εφαρμογής.'; +Πρέπει είτε να κάνετε νέα εγκατάσταση, χρησιμοποιώντας το αρχικό πακέτο εγκατάστασης, ή να συμβουλευτείτε τις οδηγίες εγκατάστασης της εφαρμογής.'; $lang['i_funcna'] = 'Η λειτουργία %s της PHP δεν είναι διαθέσιμη. Πιθανόν να είναι απενεργοποιημένη στις ρυθμίσεις έναρξης της PHP'; $lang['i_phpver'] = 'Η έκδοση %s της PHP που έχετε είναι παλαιότερη της απαιτούμενης %s. Πρέπει να αναβαθμίσετε την PHP.'; $lang['i_permfail'] = 'Ο φάκελος %s δεν είναι εγγράψιμος από την εφαρμογή DokuWiki. Πρέπει να διορθώσετε τα δικαιώματα πρόσβασης αυτού του φακέλου!'; @@ -271,16 +271,16 @@ $lang['mu_ready'] = 'έτοιμο για φόρτωση'; $lang['mu_done'] = 'ολοκληρώθηκε'; $lang['mu_fail'] = 'απέτυχε'; $lang['mu_authfail'] = 'η συνεδρία έληξε'; -$lang['mu_progress'] = '@PCT@% φορτώθηκε'; +$lang['mu_progress'] = 'φορτώθηκε @PCT@%'; $lang['mu_filetypes'] = 'Επιτρεπτοί τύποι αρχείων'; $lang['mu_info'] = 'τα αρχεία ανέβηκαν.'; $lang['mu_lasterr'] = 'Τελευταίο σφάλμα:'; $lang['recent_global'] = 'Βλέπετε τις αλλαγές εντός του φακέλου %s. Μπορείτε επίσης να δείτε τις πρόσφατες αλλαγές σε όλο το wiki.'; -$lang['years'] = 'πριν από %d χρόνια'; -$lang['months'] = 'πριν από %d μήνες'; -$lang['weeks'] = 'πριν από %d εβδομάδες'; -$lang['days'] = 'πριν από %d ημέρες'; -$lang['hours'] = 'πριν από %d ώρες'; -$lang['minutes'] = 'πριν από %d λεπτά'; -$lang['seconds'] = 'πριν από %d δευτερόλεπτα'; -$lang['wordblock'] = 'Η αλλαγή σας δεν αποθηκεύτηκε γιατί περιείχε μπλοκαρισμένο κείμενο (spam).'; +$lang['years'] = 'πριν %d χρόνια'; +$lang['months'] = 'πριν %d μήνες'; +$lang['weeks'] = 'πριν %d εβδομάδες'; +$lang['days'] = 'πριν %d ημέρες'; +$lang['hours'] = 'πριν %d ώρες'; +$lang['minutes'] = 'πριν %d λεπτά'; +$lang['seconds'] = 'πριν %d δευτερόλεπτα'; +$lang['wordblock'] = 'Η αλλαγή σας δεν αποθηκεύτηκε γιατί περιείχε spam.'; \ No newline at end of file diff --git a/inc/lang/el/locked.txt b/inc/lang/el/locked.txt index d2f542c19..425c334f1 100644 --- a/inc/lang/el/locked.txt +++ b/inc/lang/el/locked.txt @@ -1,4 +1,5 @@ ====== Κλειδωμένη σελίδα ====== -Αυτή η σελίδα είναι προς το παρόν δεσμευμένη για τροποποίηση από άλλον χρήστη. Θα πρέπει να περιμένετε μέχρι ο συγκεκριμένος χρήστης να τελειώσει την τροποποίηση ή να εκπνεύσει το χρονικό όριο για το σχετικό κλείδωμα. +Αυτή η σελίδα είναι προς το παρόν δεσμευμένη για τροποποίηση από άλλον χρήστη. +Θα πρέπει να περιμένετε μέχρι ο συγκεκριμένος χρήστης να σταματήσει να την επεξεργάζεται ή να εκπνεύσει το χρονικό όριο για το σχετικό κλείδωμα. diff --git a/inc/lang/el/login.txt b/inc/lang/el/login.txt index 3839b7279..3021a19ea 100644 --- a/inc/lang/el/login.txt +++ b/inc/lang/el/login.txt @@ -1,3 +1,5 @@ -====== Είσοδος χρήστη ====== +====== Σύνδεση χρήστη ====== -Αυτή την στιγμή δεν έχετε συνδεθεί ως χρήστης! Για να συνδεθείτε, εισάγετε τα στοιχεία σας στην παρακάτω φόρμα. Πρέπει να έχετε ενεργοποιήσει τα cookies στον φυλλομετρητή σας. +Αυτή την στιγμή δεν έχετε συνδεθεί ως χρήστης! +Για να συνδεθείτε, εισάγετε τα στοιχεία σας στην παρακάτω φόρμα. +Πρέπει να έχετε ενεργοποιήσει τα cookies στο πρόγραμμα περιήγηση σας. diff --git a/inc/lang/el/newpage.txt b/inc/lang/el/newpage.txt index e8d65d6e5..3349ad90e 100644 --- a/inc/lang/el/newpage.txt +++ b/inc/lang/el/newpage.txt @@ -1,3 +1,4 @@ ====== Αυτή η σελίδα δεν υπάρχει ακόμη ====== -Η σελίδα που ζητάτε δεν υπάρχει ακόμη. Εάν όμως έχετε επαρκή δικαιώματα, μπορείτε να την δημιουργήσετε επιλέγοντας ''Δημιουργία σελίδας''. +Η σελίδα που ζητάτε δεν υπάρχει ακόμη. +Aν όμως έχετε επαρκή δικαιώματα, μπορείτε να την δημιουργήσετε επιλέγοντας ''Δημιουργία σελίδας''. diff --git a/inc/lang/el/norev.txt b/inc/lang/el/norev.txt index 9ce347948..2b13290ff 100644 --- a/inc/lang/el/norev.txt +++ b/inc/lang/el/norev.txt @@ -1,4 +1,5 @@ -====== Δεν υπάρχει τέτοια έκδοση ====== +====== Αυτή η έκδοση δεν υπάρχει ====== -Η έκδοση που αναζητήσατε δεν υπάρχει. Επιλέξτε ''Παλαιότερες εκδόσεις σελίδας'' για να δείτε την λίστα με τις παλαιότερες εκδόσεις της τρέχουσας σελίδας. +Η έκδοση που αναζητήσατε δεν υπάρχει. +Μπορείτε να δείτε λίστα με τις παλαιότερες εκδόσεις της τρέχουσας σελίδας πατώντας ''Παλαιότερες εκδόσεις σελίδας''. diff --git a/inc/lang/el/password.txt b/inc/lang/el/password.txt index 621a215f0..d27fbb3c3 100644 --- a/inc/lang/el/password.txt +++ b/inc/lang/el/password.txt @@ -2,8 +2,8 @@ Αυτά είναι τα στοιχεία εισόδου για το @TITLE@ στο @DOKUWIKIURL@ -Όνομα : @LOGIN@ -Κωδικός : @PASSWORD@ +Όνομα : @LOGIN@ +Συνθηματικό : @PASSWORD@ -- Αυτό το e-mail δημιουργήθηκε αυτόματα από την εφαρμογή DokuWiki στην διεύθυνση diff --git a/inc/lang/el/preview.txt b/inc/lang/el/preview.txt index f6709a441..aef65c974 100644 --- a/inc/lang/el/preview.txt +++ b/inc/lang/el/preview.txt @@ -1,4 +1,5 @@ ====== Προεπισκόπηση ====== -Αυτή είναι μια προεπισκόπηση του πως θα δείχνει η σελίδα. Θυμηθείτε: Οι αλλαγές σας **δεν έχουν αποθηκευθεί** ακόμη! +Αυτή είναι μια προεπισκόπηση του πως θα δείχνει η σελίδα. +Υπενθύμιση: Οι αλλαγές σας **δεν έχουν αποθηκευθεί** ακόμη! diff --git a/inc/lang/el/pwconfirm.txt b/inc/lang/el/pwconfirm.txt index 03f408819..a9e58be7d 100644 --- a/inc/lang/el/pwconfirm.txt +++ b/inc/lang/el/pwconfirm.txt @@ -1,11 +1,11 @@ Γεια σας @FULLNAME@! -Κάποιος ζήτησε τη δημιουργία νέου κωδικού για τον λογαριασμό @TITLE@ +Κάποιος ζήτησε τη δημιουργία νέου συνθηματικού για τον λογαριασμό @TITLE@ που διατηρείτε στο @DOKUWIKIURL@ -Εάν δεν ζητήσατε εσείς την δημιουργία νέου κωδικού απλά αγνοήστε αυτό το e-mail. +Αν δεν ζητήσατε εσείς την δημιουργία νέου συνθηματικού απλά αγνοήστε αυτό το e-mail. -Εάν όντως εσείς ζητήσατε την δημιουργία νέου κωδικού, ακολουθήστε τον παρακάτω σύνδεσμο για να το επιβεβαιώσετε. +Αν όντως εσείς ζητήσατε την δημιουργία νέου συνθηματικού, ακολουθήστε τον παρακάτω σύνδεσμο για να το επιβεβαιώσετε. @CONFIRM@ diff --git a/inc/lang/el/read.txt b/inc/lang/el/read.txt index 2d43c28fc..a620ab559 100644 --- a/inc/lang/el/read.txt +++ b/inc/lang/el/read.txt @@ -1 +1,2 @@ -Μπορείτε μόνο να διαβάσετε αυτή την σελίδα και όχι να την τροποποιήσετε. Εάν πιστεύετε ότι αυτό δεν είναι σωστό, απευθυνθείτε στον διαχειριστή της εφαρμογής. +Μπορείτε να διαβάσετε αυτή την σελίδα αλλά δεν μπορείτε να την τροποποιήσετε. +Αν πιστεύετε ότι αυτό δεν είναι σωστό, απευθυνθείτε στον διαχειριστή της εφαρμογής. diff --git a/inc/lang/el/recent.txt b/inc/lang/el/recent.txt index cc8051581..78c74a655 100644 --- a/inc/lang/el/recent.txt +++ b/inc/lang/el/recent.txt @@ -1,3 +1,3 @@ -====== Πρόσφατες αλλαγές σελίδων ====== +====== Πρόσφατες αλλαγές ====== Οι παρακάτω σελίδες τροποποιήθηκαν πρόσφατα: diff --git a/inc/lang/el/register.txt b/inc/lang/el/register.txt index 15d64cba3..6a4e963e4 100644 --- a/inc/lang/el/register.txt +++ b/inc/lang/el/register.txt @@ -1,3 +1,5 @@ ====== Εγγραφή νέου χρήστη ====== -Συμπληρώστε όλα τα παρακάτω πεδία για να δημιουργήσετε ένα νέο λογαριασμό σε αυτό το wiki. Πρέπει να δώσετε μια **υπαρκτή e-mail διεύθυνση** - ο κωδικός σας θα σας αποσταλεί σε αυτήν. Το όνομα χρήστη θα πρέπει να πληρεί τις ίδιες απαιτήσεις ονόματος που ισχύουν και για τους [[doku>pagename|φακέλους]]. +Συμπληρώστε όλα τα παρακάτω πεδία για να δημιουργήσετε ένα νέο λογαριασμό σε αυτό το wiki. +Πρέπει να δώσετε μια **υπαρκτή e-mail διεύθυνση** - ο κωδικός σας θα σας αποσταλεί σε αυτήν. +Το όνομα χρήστη θα πρέπει να πληρεί τις ίδιες απαιτήσεις ονόματος που ισχύουν και για τους [[doku>el:pagename|φακέλους]]. diff --git a/inc/lang/el/registermail.txt b/inc/lang/el/registermail.txt index 5d516ee31..0b3e0b78b 100644 --- a/inc/lang/el/registermail.txt +++ b/inc/lang/el/registermail.txt @@ -1,4 +1,4 @@ -Ένας νέος χρήστης εγγράφηκε. Αυτές είναι οι λεπτομέρειες: +Ένας νέος χρήστης εγγράφηκε. Ορίστε οι λεπτομέρειες: Χρήστης : @NEWUSER@ Όνομα : @NEWNAME@ diff --git a/inc/lang/el/resendpwd.txt b/inc/lang/el/resendpwd.txt index 2b91ed017..6b4f3bbca 100644 --- a/inc/lang/el/resendpwd.txt +++ b/inc/lang/el/resendpwd.txt @@ -1,4 +1,6 @@ ====== Αποστολή νέου κωδικού ====== -Συμπληρώστε όλα τα παρακάτω πεδία για να λάβετε ένα νέο κωδικό για τον λογαριασμό σας σε αυτό το wiki. Ο νέος κωδικός σας θα σταλεί στην e-mail διεύθυνση που έχετε ήδη δηλώσει. Το όνομα πρέπει να είναι αυτό που ισχύει για τον λογαριασμό σας σε αυτό το wiki. +Συμπληρώστε όλα τα παρακάτω πεδία για να λάβετε ένα νέο κωδικό για τον λογαριασμό σας σε αυτό το wiki. +Ο νέος κωδικός σας θα σταλεί στην e-mail διεύθυνση που έχετε ήδη δηλώσει. +Το όνομα πρέπει να είναι αυτό που ισχύει για τον λογαριασμό σας σε αυτό το wiki. diff --git a/inc/lang/el/revisions.txt b/inc/lang/el/revisions.txt index 7689c3b2b..955fa1703 100644 --- a/inc/lang/el/revisions.txt +++ b/inc/lang/el/revisions.txt @@ -1,3 +1,8 @@ ====== Παλαιότερες εκδόσεις σελίδας ====== -Οι παρακάτω είναι παλαιότερες εκδόσεις της τρέχουσας σελίδας. Εάν θέλετε να αντικαταστήσετε την τρέχουσα σελίδα με κάποια από τις παλαιότερες εκδόσεις της, επιλέξτε την σχετική έκδοση, επιλέξτε ''Τροποποίηση σελίδας'', κάνετε τυχόν αλλαγές και αποθηκεύστε την. +Οι παρακάτω είναι παλαιότερες εκδόσεις της τρέχουσας σελίδας. +Εάν θέλετε να αντικαταστήσετε την τρέχουσα σελίδα με κάποια από τις παλαιότερες εκδόσεις της κάντε τα παρακάτω: + * επιλέξτε την σχετική έκδοση + * επιλέξτε ''Τροποποίηση σελίδας'' + * κάνετε τυχόν αλλαγές + * αποθηκεύστε την diff --git a/inc/lang/el/searchpage.txt b/inc/lang/el/searchpage.txt index 87f396292..b52162b60 100644 --- a/inc/lang/el/searchpage.txt +++ b/inc/lang/el/searchpage.txt @@ -1,5 +1,4 @@ ====== Αναζήτηση ====== -Τα αποτελέσματα της αναζήτησής σας ακολουθούν. +Τα αποτελέσματα της αναζήτησής σας: -===== Αποτελέσματα ===== \ No newline at end of file diff --git a/inc/lang/el/showrev.txt b/inc/lang/el/showrev.txt index 212245420..a6ba3f99e 100644 --- a/inc/lang/el/showrev.txt +++ b/inc/lang/el/showrev.txt @@ -1,2 +1,2 @@ -**Αυτή είναι μια παλαιότερη έκδοση της σελίδας!** +**Βλέπετε μια παλαιότερη έκδοση της σελίδας!** ---- diff --git a/inc/lang/el/stopwords.txt b/inc/lang/el/stopwords.txt index bc6eb48ae..01d5103b3 100644 --- a/inc/lang/el/stopwords.txt +++ b/inc/lang/el/stopwords.txt @@ -1,29 +1,103 @@ # This is a list of words the indexer ignores, one word per line # When you edit this file be sure to use UNIX line endings (single newline) # No need to include words shorter than 3 chars - these are ignored anyway -# This list is based upon the ones found at http://www.ranks.nl/stopwords/ -about -are -and -you -your -them -their -com -for -from -into -how -that -the -this -was -what -when -where -who -will -with -und -the -www +# This list is provided by Fotis Lazarinis based on his research found at: http://lazarinf.teimes.gr/papers/J8.pdf +και +ήταν +το +ενός +να +πολύ +του +όμως +η +κατά +της +αυτή +με +όταν +που +μέσα +την +οποίο +από +πως +για +έτσι +τα +στους +είναι +μέσω +των +όλα +σε +καθώς +ο +αυτά +οι +προς +στο +ένας +θα +πριν +τη +μου +στην +όχι +τον +χωρίς +τους +επίσης +δεν +μεταξύ +τις +μέχρι +ένα +έναν +μια +μιας +ότι +αφού +ή +ακόμα +στη +όπου +στα +είχε +μας +δηλαδή +αλλά +τρόπος +στον +όσο +στις +ακόμη +αυτό +τόσο +όπως +έχουμε +αν +ώστε +μπορεί +αυτές +μετά +γιατί +σας +πάνω +δύο +τότε +τι +τώρα +ως +κάτι +κάθε +άλλο +πρέπει +μην +πιο +εδώ +οποία +είτε +μόνο +μη +ενώ \ No newline at end of file diff --git a/inc/lang/el/subscr_digest.txt b/inc/lang/el/subscr_digest.txt index 1a0f44d14..7dd0345d7 100644 --- a/inc/lang/el/subscr_digest.txt +++ b/inc/lang/el/subscr_digest.txt @@ -11,10 +11,9 @@ Νέα έκδοση: @NEWPAGE@ Για να σταματήσουν αυτές οι ειδοποιήσεις συνδεθείτε -στο wiki στην διεύθυνση @DOKUWIKIURL@ και στην -συνέχεια επισκεφθείτε το @SUBSCRIBE@ και -διαγραφείτε από τις ειδοποιήσεις της σελίδας ή -φακέλου. +στο wiki στην διεύθυνση @DOKUWIKIURL@ +και στην συνέχεια επισκεφθείτε το @SUBSCRIBE@ +και διαγραφείτε από τις ειδοποιήσεις της σελίδας ή του φακέλου. -- Αυτό το μήνυμα παράχθηκε απο το DokuWiki στην diff --git a/inc/lang/el/subscr_list.txt b/inc/lang/el/subscr_list.txt index f5cb8023d..97b8dc47d 100644 --- a/inc/lang/el/subscr_list.txt +++ b/inc/lang/el/subscr_list.txt @@ -10,11 +10,10 @@ @DIFF@ -------------------------------------------------------- -Για να σταματήσουν αυτές οι ειδοποιήσεις συνδεθείτε -στο wiki στην διεύθυνση @DOKUWIKIURL@ και στην -συνέχεια επισκεφθείτε το @SUBSCRIBE@ και -διαγραφείτε από τις ειδοποιήσεις της σελίδας ή -φακέλου. +Για να σταματήσουν αυτές οι ειδοποιήσεις συνδεθείτε στο wiki +στην διεύθυνση @DOKUWIKIURL@ +και στην συνέχεια επισκεφθείτε το @SUBSCRIBE@ +και διαγραφείτε από τις ειδοποιήσεις της σελίδας ή του φακέλου. -- Αυτό το μήνυμα παράχθηκε απο το DokuWiki στην diff --git a/inc/lang/el/subscr_single.txt b/inc/lang/el/subscr_single.txt index 9815cc0bb..610af49a2 100644 --- a/inc/lang/el/subscr_single.txt +++ b/inc/lang/el/subscr_single.txt @@ -12,11 +12,10 @@ Παλιά έκδοση: @OLDPAGE@ Νέα έκδοση: @NEWPAGE@ -Για να σταματήσουν αυτές οι ειδοποιήσεις συνδεθείτε -στο wiki στην διεύθυνση @DOKUWIKIURL@ και στην -συνέχεια επισκεφθείτε το @SUBSCRIBE@ και -διαγραφείτε από τις ειδοποιήσεις της σελίδας ή -φακέλου. +Για να σταματήσουν αυτές οι ειδοποιήσεις συνδεθείτε στο wiki +στην διεύθυνση @DOKUWIKIURL@ +και στην συνέχεια επισκεφθείτε το @SUBSCRIBE@ +και διαγραφείτε από τις ειδοποιήσεις της σελίδας ή του φακέλου. -- Αυτό το μήνυμα παράχθηκε απο το DokuWiki στην diff --git a/inc/lang/el/updateprofile.txt b/inc/lang/el/updateprofile.txt index ccb9596b6..56f176d37 100644 --- a/inc/lang/el/updateprofile.txt +++ b/inc/lang/el/updateprofile.txt @@ -1,3 +1,4 @@ ====== Τροποποίηση προφίλ ====== -Τροποποιήστε **μόνο** τα πεδία που θέλετε να αλλάξετε. Δεν μπορείτε να αλλάξετε το πεδίο ''Όνομα''. +Τροποποιήστε **μόνο** τα πεδία που θέλετε να αλλάξετε. +Δεν μπορείτε να αλλάξετε το πεδίο ''Όνομα''. -- cgit v1.2.3 From 02b284de4efc44cb4bf5024d4605d10b4fa895e3 Mon Sep 17 00:00:00 2001 From: Petsagourakis George Date: Sat, 12 Feb 2011 16:57:36 +0200 Subject: some more fixes on the Greek language --- inc/lang/el/lang.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'inc') diff --git a/inc/lang/el/lang.php b/inc/lang/el/lang.php index b8c8698f5..da79e5711 100644 --- a/inc/lang/el/lang.php +++ b/inc/lang/el/lang.php @@ -23,10 +23,10 @@ $lang['btn_search'] = 'Αναζήτηση'; $lang['btn_save'] = 'Αποθήκευση'; $lang['btn_preview'] = 'Προεπισκόπηση'; $lang['btn_top'] = 'Επιστροφή στην κορυφή της σελίδας'; -$lang['btn_newer'] = '<< πλέον πρόσφατες'; -$lang['btn_older'] = 'λιγότερο πρόσφατες >>'; +$lang['btn_newer'] = '<< πρόσφατες'; +$lang['btn_older'] = 'παλαιότερες >>'; $lang['btn_revs'] = 'Παλαιότερες εκδόσεις σελίδας'; -$lang['btn_recent'] = 'Πρόσφατες αλλαγές σελίδων'; +$lang['btn_recent'] = 'Πρόσφατες αλλαγές'; $lang['btn_upload'] = 'Φόρτωση'; $lang['btn_cancel'] = 'Ακύρωση'; $lang['btn_index'] = 'Κατάλογος'; -- cgit v1.2.3 From 6e464fc5163b79b488dd47223351210cb7af097a Mon Sep 17 00:00:00 2001 From: Guillaume Turri Date: Sun, 13 Feb 2011 18:47:27 +0100 Subject: French language update --- inc/lang/fr/lang.php | 3 +++ 1 file changed, 3 insertions(+) (limited to 'inc') diff --git a/inc/lang/fr/lang.php b/inc/lang/fr/lang.php index 17d35dfa9..b6be994c6 100644 --- a/inc/lang/fr/lang.php +++ b/inc/lang/fr/lang.php @@ -174,6 +174,9 @@ $lang['yours'] = 'Votre version'; $lang['diff'] = 'Différences avec la version actuelle'; $lang['diff2'] = 'Différences entre les versions sélectionnées'; $lang['difflink'] = 'Lien vers cette vue'; +$lang['diff_type'] = 'Voir les différences :'; +$lang['diff_inline'] = 'Sur une seule ligne'; +$lang['diff_side'] = 'Côte à côte'; $lang['line'] = 'Ligne'; $lang['breadcrumb'] = 'Piste'; $lang['youarehere'] = 'Vous êtes ici'; -- cgit v1.2.3 From d8443bf1e374c48ffa9c075003ad0bf52353455e Mon Sep 17 00:00:00 2001 From: Hakan Sandell Date: Mon, 14 Feb 2011 21:24:31 +0100 Subject: More failsafe XMP parsing in jpeg pictures --- inc/JpegMeta.php | 25 ++++++++++++++++--------- 1 file changed, 16 insertions(+), 9 deletions(-) (limited to 'inc') diff --git a/inc/JpegMeta.php b/inc/JpegMeta.php index fa05f6859..afa70168c 100644 --- a/inc/JpegMeta.php +++ b/inc/JpegMeta.php @@ -1466,16 +1466,21 @@ class JpegMeta { $parser = xml_parser_create(); xml_parser_set_option($parser, XML_OPTION_CASE_FOLDING, 0); xml_parser_set_option($parser, XML_OPTION_SKIP_WHITE, 1); - xml_parse_into_struct($parser, $data, $values, $tags); + $result = xml_parse_into_struct($parser, $data, $values, $tags); xml_parser_free($parser); + if ($result == 0) { + $this->_info['xmp'] = false; + return false; + } + $this->_info['xmp'] = array(); $count = count($values); for ($i = 0; $i < $count; $i++) { if ($values[$i]['tag'] == 'rdf:Description' && $values[$i]['type'] == 'open') { - while ($values[++$i]['tag'] != 'rdf:Description') { - $this->_parseXmpNode($values, $i, $this->_info['xmp'][$values[$i]['tag']]); + while ((++$i < $count) && ($values[$i]['tag'] != 'rdf:Description')) { + $this->_parseXmpNode($values, $i, $this->_info['xmp'][$values[$i]['tag']], $count); } } } @@ -1487,7 +1492,7 @@ class JpegMeta { * * @author Hakan Sandell */ - function _parseXmpNode($values, &$i, &$meta) { + function _parseXmpNode($values, &$i, &$meta, $count) { if ($values[$i]['type'] == 'close') return; if ($values[$i]['type'] == 'complete') { @@ -1497,11 +1502,13 @@ class JpegMeta { } $i++; + if ($i >= $count) return; + if ($values[$i]['tag'] == 'rdf:Bag' || $values[$i]['tag'] == 'rdf:Seq') { // Array property $meta = array(); while ($values[++$i]['tag'] == 'rdf:li') { - $this->_parseXmpNode($values, $i, $meta[]); + $this->_parseXmpNode($values, $i, $meta[], $count); } $i++; // skip closing Bag/Seq tag @@ -1509,8 +1516,8 @@ class JpegMeta { // Language Alternative property, only the first (default) value is used if ($values[$i]['type'] == 'open') { $i++; - $this->_parseXmpNode($values, $i, $meta); - while ($values[++$i]['tag'] != 'rdf:Alt'); + $this->_parseXmpNode($values, $i, $meta, $count); + while ((++$i < $count) && ($values[$i]['tag'] != 'rdf:Alt')); $i++; // skip closing Alt tag } @@ -1519,8 +1526,8 @@ class JpegMeta { $meta = array(); $startTag = $values[$i-1]['tag']; do { - $this->_parseXmpNode($values, $i, $meta[$values[$i]['tag']]); - } while ($values[++$i]['tag'] != $startTag); + $this->_parseXmpNode($values, $i, $meta[$values[$i]['tag']], $count); + } while ((++$i < $count) && ($values[$i]['tag'] != $startTag)); } } -- cgit v1.2.3 From e7327938e66f43615da3ec05a7f9a89d8dfc0c31 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Je=CC=81ro=CC=82me=20Tamarelle?= Date: Tue, 15 Feb 2011 00:10:41 +0100 Subject: Accept empty MySQL password for database auth. --- inc/auth/mysql.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'inc') diff --git a/inc/auth/mysql.class.php b/inc/auth/mysql.class.php index dbdfe5fda..653c725a3 100644 --- a/inc/auth/mysql.class.php +++ b/inc/auth/mysql.class.php @@ -46,7 +46,7 @@ class auth_mysql extends auth_basic { // set capabilities based upon config strings set if (empty($this->cnf['server']) || empty($this->cnf['user']) || - empty($this->cnf['password']) || empty($this->cnf['database'])){ + !isset($this->cnf['password']) || empty($this->cnf['database'])){ if ($this->cnf['debug']) msg("MySQL err: insufficient configuration.",-1,__LINE__,__FILE__); $this->success = false; -- cgit v1.2.3 From c1209673030dd03537a2ece21331203ff0a6bf34 Mon Sep 17 00:00:00 2001 From: Tom N Harris Date: Fri, 18 Feb 2011 18:30:49 -0500 Subject: Special handling of title metadata index --- inc/indexer.php | 86 +++++++++++++++++++++++++++++++++++++++++++++------------ 1 file changed, 68 insertions(+), 18 deletions(-) (limited to 'inc') diff --git a/inc/indexer.php b/inc/indexer.php index 3a0331302..b6a586985 100644 --- a/inc/indexer.php +++ b/inc/indexer.php @@ -247,6 +247,15 @@ class Doku_Indexer { return false; } + // Special handling for titles so the index file is simpler + if (array_key_exists('title', $key)) { + $value = $key['title']; + if (is_array($value)) + $value = $value[0]; + $this->_saveIndexKey('title', '', $pid, $value); + unset($key['title']); + } + foreach ($key as $name => $values) { $metaname = idx_cleanName($name); $metaidx = $this->_getIndex($metaname, '_i'); @@ -357,6 +366,7 @@ class Doku_Indexer { } // XXX TODO: delete meta keys + $this->_saveIndexKey('title', '', $pid, ""); $this->_unlock(); return true; @@ -468,24 +478,28 @@ class Doku_Indexer { * @author Michael Hamann */ public function lookupKey($key, $value, $func=null) { - $metaname = idx_cleanName($key); - - // get all words in order to search the matching ids - $words = $this->_getIndex($metaname, '_w'); - - // the matching ids for the provided value(s) - $value_ids = array(); - if (!is_array($value)) $value_array = array($value); else $value_array =& $value; + // the matching ids for the provided value(s) + $value_ids = array(); + + $metaname = idx_cleanName($key); + + // get all words in order to search the matching ids + if ($key == 'title') { + $words = $this->_getIndex('title', ''); + } else { + $words = $this->_getIndex($metaname, '_w'); + } + if (!is_null($func)) { foreach ($value_array as $val) { foreach ($words as $i => $word) { if (call_user_func_array($func, array($word, $val))) - $value_ids[$i] = $val; + $value_ids[$i][] = $val; } } } else { @@ -505,25 +519,42 @@ class Doku_Indexer { if ($caret || $dollar) { $re = $caret.preg_quote($xval, '/').$dollar; foreach(array_keys(preg_grep('/'.$re.'/', $words)) as $i) - $value_ids[$i] = $val; + $value_ids[$i][] = $val; } else { if (($i = array_search($val, $words)) !== false) - $value_ids[$i] = $val; + $value_ids[$i][] = $val; } } } unset($words); // free the used memory - // load all lines and pages so the used lines can be taken and matched with the pages - $lines = $this->_getIndex($metaname, '_i'); + $result = array(); $page_idx = $this->_getIndex('page', ''); - $result = array(); - foreach ($value_ids as $value_id => $val) { - // parse the tuples of the form page_id*1:page2_id*1 and so on, return value - // is an array with page_id => 1, page2_id => 1 etc. so take the keys only - $result[$val] = array_keys($this->_parseTuples($page_idx, $lines[$value_id])); + // Special handling for titles + if ($key == 'title') { + foreach ($value_ids as $pid => $val_list) { + $page = $page_idx[$pid]; + foreach ($val_list as $val) { + $result[$val][] = $page; + } + } + } else { + // load all lines and pages so the used lines can be taken and matched with the pages + $lines = $this->_getIndex($metaname, '_i'); + + foreach ($value_ids as $value_id => $val_list) { + // parse the tuples of the form page_id*1:page2_id*1 and so on, return value + // is an array with page_id => 1, page2_id => 1 etc. so take the keys only + $pages = array_keys($this->_parseTuples($page_idx, $lines[$value_id])); + foreach ($val_list as $val) { + if (!isset($result[$val])) + $result[$val] = $pages; + else + $result[$val] = array_merge($result[$val], $pages); + } + } } if (!is_array($value)) $result = $result[$value]; return $result; @@ -616,6 +647,7 @@ class Doku_Indexer { /** * Return a list of all pages + * Warning: pages may not exist! * * @param string $key list only pages containing the metadata key (optional) * @return array list of page names @@ -624,6 +656,24 @@ class Doku_Indexer { public function getPages($key=null) { $page_idx = $this->_getIndex('page', ''); if (is_null($key)) return $page_idx; + + $metaname = idx_cleanName($key); + + // Special handling for titles + if ($key == 'title') { + $title_idx = $this->_getIndex('title', ''); + array_splice($page_idx, count($title_idx)); + foreach ($title_idx as $i => $title) + if ($title === "") unset($page_idx[$i]); + return $page_idx; + } + + $pages = array(); + $lines = $this->_getIndex($metaname, '_i'); + foreach ($lines as $line) { + $pages = array_merge($pages, $this->_parseTuples($page_idx, $line)); + } + return array_keys($pages); } /** -- cgit v1.2.3 From 9a8fba1f4e040693794fc1b640787cbdeb71007e Mon Sep 17 00:00:00 2001 From: Edward H Date: Sat, 19 Feb 2011 08:54:36 +0100 Subject: Swedish language update --- inc/lang/sv/lang.php | 59 +++++++++++++++++++++++++++++++++++----------------- 1 file changed, 40 insertions(+), 19 deletions(-) (limited to 'inc') diff --git a/inc/lang/sv/lang.php b/inc/lang/sv/lang.php index 09dec8edd..9308bc6c8 100644 --- a/inc/lang/sv/lang.php +++ b/inc/lang/sv/lang.php @@ -49,10 +49,6 @@ $lang['btn_back'] = 'Tillbaka'; $lang['btn_backlink'] = 'Tillbakalänkar'; $lang['btn_backtomedia'] = 'Tillbaka till val av Mediafil'; $lang['btn_subscribe'] = 'Prenumerera på ändringar'; -$lang['btn_unsubscribe'] = 'Säg upp prenumeration på ändringar'; -$lang['btn_subscribens'] = 'Prenumerera på namnrymdsändringar'; -$lang['btn_unsubscribens'] = 'Sluta prenumerera på namnrymdsändringar -'; $lang['btn_profile'] = 'Uppdatera profil'; $lang['btn_reset'] = 'Återställ'; $lang['btn_resendpwd'] = 'Skicka nytt lösenord'; @@ -106,7 +102,35 @@ $lang['txt_overwrt'] = 'Skriv över befintlig fil'; $lang['lockedby'] = 'Låst av'; $lang['lockexpire'] = 'Lås upphör att gälla'; $lang['willexpire'] = 'Ditt redigeringslås för detta dokument kommer snart att upphöra.\nFör att undvika versionskonflikter bör du förhandsgranska ditt dokument för att förlänga redigeringslåset.'; -$lang['js']['notsavedyet'] = "Det finns ändringar som inte är sparade.\nÄr du säker på att du vill fortsätta?"; +$lang['js']['notsavedyet'] = 'Det finns ändringar som inte är sparade. +Är du säker på att du vill fortsätta?'; +$lang['js']['searchmedia'] = 'Sök efter filer'; +$lang['js']['keepopen'] = 'Lämna fönstret öppet efter val av fil'; +$lang['js']['hidedetails'] = 'Dölj detaljer'; +$lang['js']['mediatitle'] = 'Länkinställningar'; +$lang['js']['mediadisplay'] = 'Länktyp'; +$lang['js']['mediaalign'] = 'Justering'; +$lang['js']['mediasize'] = 'Bildstorlek'; +$lang['js']['mediatarget'] = 'Länköppning'; +$lang['js']['mediaclose'] = 'Stäng'; +$lang['js']['mediadisplayimg'] = 'Visa bilden.'; +$lang['js']['mediadisplaylnk'] = 'Visa endast länken.'; +$lang['js']['mediasmall'] = 'Liten storlek'; +$lang['js']['mediamedium'] = 'Mellanstor storlek'; +$lang['js']['medialarge'] = 'Stor storlek'; +$lang['js']['mediaoriginal'] = 'Originalstorlek'; +$lang['js']['mediadirect'] = 'Direktlänk till originalet'; +$lang['js']['medianolnk'] = 'Ingen länk'; +$lang['js']['medianolink'] = 'Länka inte bilden'; +$lang['js']['medialeft'] = 'Justera bilden till vänster.'; +$lang['js']['mediaright'] = 'Justera bilden till höger.'; +$lang['js']['mediacenter'] = 'Centrera bilden.'; +$lang['js']['nosmblinks'] = 'Länkning till Windowsresurser fungerar bara med Microsofts Internet Explorer. +Du kan fortfarande klippa och klistra in länken om du använder en annan webbläsare än MSIE.'; +$lang['js']['linkwiz'] = 'Snabbguide Länkar'; +$lang['js']['linkto'] = 'Länk till:'; +$lang['js']['del_confirm'] = 'Vill du verkligen radera?'; +$lang['js']['mu_btn'] = 'Ladda upp flera filer samtidigt'; $lang['rssfailed'] = 'Ett fel uppstod när detta RSS-flöde skulle hämtas: '; $lang['nothingfound'] = 'Inga filer hittades.'; $lang['mediaselect'] = 'Mediafiler'; @@ -124,15 +148,7 @@ $lang['deletefail'] = 'Kunde inte radera "%s" - kontrollera filskydd. $lang['mediainuse'] = 'Filen "%s" har inte raderats - den används fortfarande.'; $lang['namespaces'] = 'Namnrymder'; $lang['mediafiles'] = 'Tillgängliga filer i'; -$lang['js']['searchmedia'] = 'Sök efter filer'; -$lang['js']['keepopen'] = 'Lämna fönstret öppet efter val av fil'; -$lang['js']['hidedetails'] = 'Dölj detaljer'; -$lang['js']['nosmblinks'] = 'Länkning till Windowsresurser fungerar bara med Microsofts Internet Explorer. -Du kan fortfarande klippa och klistra in länken om du använder en annan webbläsare än MSIE.'; -$lang['js']['linkwiz'] = 'Snabbguide Länkar'; -$lang['js']['linkto'] = 'Länk till:'; -$lang['js']['del_confirm'] = 'Vill du verkligen radera?'; -$lang['js']['mu_btn'] = 'Ladda upp flera filer samtidigt'; +$lang['accessdenied'] = 'Du får inte läsa den här sidan.'; $lang['mediausage'] = 'Använd följande syntax för att referera till denna fil:'; $lang['mediaview'] = 'Visa originalfilen'; $lang['mediaroot'] = 'rot'; @@ -148,6 +164,9 @@ $lang['current'] = 'aktuell'; $lang['yours'] = 'Din version'; $lang['diff'] = 'visa skillnader mot aktuell version'; $lang['diff2'] = 'Visa skillnader mellan valda versioner'; +$lang['difflink'] = 'Länk till den här jämförelsesidan'; +$lang['diff_type'] = 'Visa skillnader:'; +$lang['diff_side'] = 'Sida vid sida'; $lang['line'] = 'Rad'; $lang['breadcrumb'] = 'Spår'; $lang['youarehere'] = 'Här är du'; @@ -204,11 +223,12 @@ $lang['img_copyr'] = 'Copyright'; $lang['img_format'] = 'Format'; $lang['img_camera'] = 'Kamera'; $lang['img_keywords'] = 'Nyckelord'; -$lang['subscribe_success'] = 'Lade till %s i prenumerationslistan för %s'; -$lang['subscribe_error'] = 'Fel vid tillägg av %s i prenumerationslistan för %s'; -$lang['subscribe_noaddress'] = 'Det finns ingen adress knuten till ditt konto, det går inte att lägga till dig i prenumerationslistan'; -$lang['unsubscribe_success'] = 'Tog bort %s från prenumerationslistan för %s'; -$lang['unsubscribe_error'] = 'Fel vid borttagning %s från prenumerationslistan list för %s'; +$lang['subscr_m_new_header'] = 'Lägg till prenumeration'; +$lang['subscr_m_current_header'] = 'Nuvarande prenumerationer'; +$lang['subscr_m_unsubscribe'] = 'Prenumerera'; +$lang['subscr_m_subscribe'] = 'Avsluta prenumeration'; +$lang['subscr_m_receive'] = 'Ta emot'; +$lang['subscr_style_every'] = 'skicka epost vid varje ändring'; $lang['authmodfailed'] = 'Felaktiga inställningar för användarautentisering. Var vänlig meddela wikiadministratören.'; $lang['authtempfail'] = 'Tillfälligt fel på användarautentisering. Om felet kvarstår, var vänlig meddela wikiadministratören.'; $lang['i_chooselang'] = 'Välj språk'; @@ -259,3 +279,4 @@ $lang['days'] = '%d dagar sedan'; $lang['hours'] = '%d timmar sedan'; $lang['minutes'] = '%d minuter sedan'; $lang['seconds'] = '%d sekunder sedan'; +$lang['wordblock'] = 'Din ändring sparades inte för att den innehåller otillåten text (spam).'; -- cgit v1.2.3 From 2b3f472a3afb7dce4cb305d08d99462eee9b9998 Mon Sep 17 00:00:00 2001 From: Hiphen Lee Date: Sat, 19 Feb 2011 08:55:44 +0100 Subject: Chinese Language update --- inc/lang/zh/lang.php | 2 ++ 1 file changed, 2 insertions(+) (limited to 'inc') diff --git a/inc/lang/zh/lang.php b/inc/lang/zh/lang.php index f819aff9a..52dda5986 100644 --- a/inc/lang/zh/lang.php +++ b/inc/lang/zh/lang.php @@ -11,6 +11,7 @@ * @author ben * @author lainme * @author caii + * @author Hiphen Lee */ $lang['encoding'] = 'utf-8'; $lang['direction'] = 'ltr'; @@ -163,6 +164,7 @@ $lang['yours'] = '您的版本'; $lang['diff'] = '显示与当前版本的差别'; $lang['diff2'] = '显示跟目前版本的差异'; $lang['difflink'] = '到此差别页面的链接'; +$lang['diff_type'] = '查看差异:'; $lang['line'] = '行'; $lang['breadcrumb'] = '您的足迹'; $lang['youarehere'] = '您在这里'; -- cgit v1.2.3 From bf413a4e50ea09a0345533c5fb1d07e963bd6368 Mon Sep 17 00:00:00 2001 From: Anika Henke Date: Sun, 20 Feb 2011 18:33:02 +0000 Subject: added 'register' and 'resendpwd' to action links and buttons Attention: $lang['register'] has been renamed to $lang['btn_register'], anyone using that in any plugin or template should adjust it. --- inc/html.php | 14 ++++---------- inc/lang/af/lang.php | 2 +- inc/lang/ar/lang.php | 3 +-- inc/lang/az/lang.php | 2 +- inc/lang/bg/lang.php | 2 +- inc/lang/ca-valencia/lang.php | 2 +- inc/lang/ca/lang.php | 2 +- inc/lang/cs/lang.php | 2 +- inc/lang/da/lang.php | 2 +- inc/lang/de-informal/lang.php | 2 +- inc/lang/de/lang.php | 2 +- inc/lang/el/lang.php | 2 +- inc/lang/en/lang.php | 4 ++-- inc/lang/eo/lang.php | 2 +- inc/lang/es/lang.php | 2 +- inc/lang/et/lang.php | 3 ++- inc/lang/eu/lang.php | 2 +- inc/lang/fa/lang.php | 2 +- inc/lang/fi/lang.php | 2 +- inc/lang/fo/lang.php | 2 +- inc/lang/fr/lang.php | 2 +- inc/lang/gl/lang.php | 2 +- inc/lang/he/lang.php | 2 +- inc/lang/hi/lang.php | 10 +++------- inc/lang/hr/lang.php | 2 +- inc/lang/hu/lang.php | 2 +- inc/lang/ia/lang.php | 2 +- inc/lang/id-ni/lang.php | 2 +- inc/lang/id/lang.php | 2 +- inc/lang/is/lang.php | 2 +- inc/lang/it/lang.php | 2 +- inc/lang/ja/lang.php | 2 +- inc/lang/km/lang.php | 2 +- inc/lang/ko/lang.php | 2 +- inc/lang/ku/lang.php | 2 +- inc/lang/la/lang.php | 2 +- inc/lang/lb/lang.php | 2 +- inc/lang/lt/lang.php | 2 +- inc/lang/lv/lang.php | 2 +- inc/lang/mg/lang.php | 2 +- inc/lang/mk/lang.php | 2 +- inc/lang/mr/lang.php | 2 +- inc/lang/ne/lang.php | 2 +- inc/lang/nl/lang.php | 2 +- inc/lang/no/lang.php | 2 +- inc/lang/pl/lang.php | 2 +- inc/lang/pt-br/lang.php | 2 +- inc/lang/pt/lang.php | 2 +- inc/lang/ro/lang.php | 2 +- inc/lang/ru/lang.php | 2 +- inc/lang/sk/lang.php | 2 +- inc/lang/sl/lang.php | 2 +- inc/lang/sq/lang.php | 2 +- inc/lang/sr/lang.php | 2 +- inc/lang/sv/lang.php | 2 +- inc/lang/th/lang.php | 2 +- inc/lang/tr/lang.php | 2 +- inc/lang/uk/lang.php | 2 +- inc/lang/vi/lang.php | 2 +- inc/lang/zh-tw/lang.php | 2 +- inc/lang/zh/lang.php | 2 +- inc/template.php | 12 +++++++++++- 62 files changed, 79 insertions(+), 79 deletions(-) (limited to 'inc') diff --git a/inc/html.php b/inc/html.php index c91888494..080beb01a 100644 --- a/inc/html.php +++ b/inc/html.php @@ -62,17 +62,11 @@ function html_login(){ $form->endFieldset(); if(actionOK('register')){ - $form->addElement('

' - . $lang['reghere'] - . ': '.$lang['register'].'' - . '

'); + $form->addElement('

'.$lang['reghere'].': '.tpl_actionlink('register','','','',true).'

'); } if (actionOK('resendpwd')) { - $form->addElement('

' - . $lang['pwdforget'] - . ': '.$lang['btn_resendpwd'].'' - . '

'); + $form->addElement('

'.$lang['pwdforget'].': '.tpl_actionlink('resendpwd','','','',true).'

'); } html_form('login', $form); @@ -1111,7 +1105,7 @@ function html_register(){ print p_locale_xhtml('register'); print '
'.NL; $form = new Doku_Form(array('id' => 'dw__register')); - $form->startFieldset($lang['register']); + $form->startFieldset($lang['btn_register']); $form->addHidden('do', 'register'); $form->addHidden('save', '1'); $form->addElement(form_makeTextField('login', $_POST['login'], $lang['user'], null, 'block', array('size'=>'50'))); @@ -1121,7 +1115,7 @@ function html_register(){ } $form->addElement(form_makeTextField('fullname', $_POST['fullname'], $lang['fullname'], '', 'block', array('size'=>'50'))); $form->addElement(form_makeTextField('email', $_POST['email'], $lang['email'], '', 'block', array('size'=>'50'))); - $form->addElement(form_makeButton('submit', '', $lang['register'])); + $form->addElement(form_makeButton('submit', '', $lang['btn_register'])); $form->endFieldset(); html_form('register', $form); diff --git a/inc/lang/af/lang.php b/inc/lang/af/lang.php index fce59d13e..6665196f4 100644 --- a/inc/lang/af/lang.php +++ b/inc/lang/af/lang.php @@ -26,6 +26,7 @@ $lang['btn_backlink'] = 'Wat skakel hierheen'; $lang['btn_subscribe'] = 'Hou bladsy dop'; $lang['btn_unsubscribe'] = 'Verwyder van bladsy dophoulys'; $lang['btn_resendpwd'] = 'E-pos nuwe wagwoord'; +$lang['btn_register'] = 'Skep gerus \'n rekening'; $lang['loggedinas'] = 'Ingeteken as'; $lang['user'] = 'Gebruikernaam'; $lang['pass'] = 'Wagwoord'; @@ -35,7 +36,6 @@ $lang['passchk'] = 'Herhaal wagwoord'; $lang['remember'] = 'Onthou my wagwoord oor sessies'; $lang['fullname'] = 'Regte naam'; $lang['email'] = 'E-pos'; -$lang['register'] = 'Skep gerus \'n rekening'; $lang['badlogin'] = 'Intekenfout'; $lang['minoredit'] = 'Klein wysiging'; $lang['reguexists'] = 'Die gebruikersnaam wat jy gebruik het, is alreeds gebruik. Kies asseblief \'n ander gebruikersnaam.'; diff --git a/inc/lang/ar/lang.php b/inc/lang/ar/lang.php index 0a2341b97..300ec3b9a 100644 --- a/inc/lang/ar/lang.php +++ b/inc/lang/ar/lang.php @@ -46,7 +46,7 @@ $lang['btn_draft'] = 'حرر المسودة'; $lang['btn_recover'] = 'استرجع المسودة'; $lang['btn_draftdel'] = 'احذف المسوّدة'; $lang['btn_revert'] = 'استعد -'; +$lang['btn_register'] = 'سجّل'; $lang['loggedinas'] = 'داخل باسم'; $lang['user'] = 'اسم المستخدم'; $lang['pass'] = 'كلمة السر'; @@ -56,7 +56,6 @@ $lang['passchk'] = 'مرة أخرى'; $lang['remember'] = 'تذكرني'; $lang['fullname'] = 'الاسم الحقيقي'; $lang['email'] = 'البريد الإلكتروني'; -$lang['register'] = 'سجّل'; $lang['profile'] = 'الملف الشخصي'; $lang['badlogin'] = 'عذرا، اسم المشترك أو كلمة السر غير صحيحة'; $lang['minoredit'] = 'تعديلات طفيفة'; diff --git a/inc/lang/az/lang.php b/inc/lang/az/lang.php index ca826c8e0..35b18d3a7 100644 --- a/inc/lang/az/lang.php +++ b/inc/lang/az/lang.php @@ -47,6 +47,7 @@ $lang['btn_draft'] = 'Qaralamada düzəliş etmək'; $lang['btn_recover'] = 'Qaralamanı qaytar'; $lang['btn_draftdel'] = 'Qaralamanı sil'; $lang['btn_revert'] = 'Qaytar'; +$lang['btn_register'] = 'Qeydiyyatdan keç'; $lang['loggedinas'] = 'İstifadəcinin adı'; $lang['user'] = 'istifadəci adı'; $lang['pass'] = 'Şifrə'; @@ -56,7 +57,6 @@ $lang['passchk'] = 'təkrarlayın'; $lang['remember'] = 'Məni yadda saxla'; $lang['fullname'] = 'Tam ad'; $lang['email'] = 'E-Mail'; -$lang['register'] = 'Qeydiyyatdan keç'; $lang['profile'] = 'İstifadəçi profili'; $lang['badlogin'] = 'Təssüf ki istifadəçi adı və ya şifrə səhvdir.'; $lang['minoredit'] = 'Az dəyişiklər'; diff --git a/inc/lang/bg/lang.php b/inc/lang/bg/lang.php index d3e86c41d..a45615ed8 100644 --- a/inc/lang/bg/lang.php +++ b/inc/lang/bg/lang.php @@ -46,6 +46,7 @@ $lang['btn_draft'] = 'Редактиране на чернова'; $lang['btn_recover'] = 'Възстановяване на чернова'; $lang['btn_draftdel'] = 'Изтриване на чернова'; $lang['btn_revert'] = 'Възстановяване'; +$lang['btn_register'] = 'Регистриране'; $lang['loggedinas'] = 'Вписани сте като'; $lang['user'] = 'Потребител'; $lang['pass'] = 'Парола'; @@ -55,7 +56,6 @@ $lang['passchk'] = 'още веднъж'; $lang['remember'] = 'Запомни ме'; $lang['fullname'] = 'Пълно име'; $lang['email'] = 'Електронна поща'; -$lang['register'] = 'Регистриране'; $lang['profile'] = 'Потребителски профил'; $lang['badlogin'] = 'Грешно потребителско име или парола'; $lang['minoredit'] = 'Незначителни промени'; diff --git a/inc/lang/ca-valencia/lang.php b/inc/lang/ca-valencia/lang.php index d49c900fa..04f7c32bf 100644 --- a/inc/lang/ca-valencia/lang.php +++ b/inc/lang/ca-valencia/lang.php @@ -49,6 +49,7 @@ $lang['btn_draft'] = 'Editar borrador'; $lang['btn_recover'] = 'Recuperar borrador'; $lang['btn_draftdel'] = 'Borrar borrador'; $lang['btn_revert'] = 'Recuperar'; +$lang['btn_register'] = 'Registrar-se'; $lang['loggedinas'] = 'Sessió de'; $lang['user'] = 'Nom d\'usuari'; $lang['pass'] = 'Contrasenya'; @@ -58,7 +59,6 @@ $lang['passchk'] = 'una atra volta'; $lang['remember'] = 'Recorda\'m'; $lang['fullname'] = 'Nom complet'; $lang['email'] = 'Correu electrònic'; -$lang['register'] = 'Registrar-se'; $lang['profile'] = 'Perfil d\'usuari'; $lang['badlogin'] = 'Disculpe, pero el nom d\'usuari o la contrasenya són incorrectes.'; $lang['minoredit'] = 'Canvis menors'; diff --git a/inc/lang/ca/lang.php b/inc/lang/ca/lang.php index 19fb7c556..8e627fc69 100644 --- a/inc/lang/ca/lang.php +++ b/inc/lang/ca/lang.php @@ -50,6 +50,7 @@ $lang['btn_draft'] = 'Edita esborrany'; $lang['btn_recover'] = 'Recupera esborrany'; $lang['btn_draftdel'] = 'Suprimeix esborrany'; $lang['btn_revert'] = 'Restaura'; +$lang['btn_register'] = 'Registra\'m'; $lang['loggedinas'] = 'Heu entrat com'; $lang['user'] = 'Nom d\'usuari'; $lang['pass'] = 'Contrasenya'; @@ -59,7 +60,6 @@ $lang['passchk'] = 'una altra vegada'; $lang['remember'] = 'Recorda\'m'; $lang['fullname'] = 'Nom complet'; $lang['email'] = 'Correu electrònic'; -$lang['register'] = 'Registra\'m'; $lang['profile'] = 'Perfil d\'usuari'; $lang['badlogin'] = 'Nom d\'usuari o contrasenya incorrectes.'; $lang['minoredit'] = 'Canvis menors'; diff --git a/inc/lang/cs/lang.php b/inc/lang/cs/lang.php index 749a41a5b..32d4692be 100644 --- a/inc/lang/cs/lang.php +++ b/inc/lang/cs/lang.php @@ -49,6 +49,7 @@ $lang['btn_draft'] = 'Upravit koncept'; $lang['btn_recover'] = 'Obnovit koncept'; $lang['btn_draftdel'] = 'Vymazat koncept'; $lang['btn_revert'] = 'Vrátit zpět'; +$lang['btn_register'] = 'Registrovat'; $lang['loggedinas'] = 'Přihlášen(a) jako'; $lang['user'] = 'Uživatelské jméno'; $lang['pass'] = 'Heslo'; @@ -58,7 +59,6 @@ $lang['passchk'] = 'ještě jednou'; $lang['remember'] = 'Přihlásit se nastálo'; $lang['fullname'] = 'Celé jméno'; $lang['email'] = 'E-mail'; -$lang['register'] = 'Registrovat'; $lang['profile'] = 'Uživatelský profil'; $lang['badlogin'] = 'Zadané uživatelské jméno a heslo není správně.'; $lang['minoredit'] = 'Drobné změny'; diff --git a/inc/lang/da/lang.php b/inc/lang/da/lang.php index 47b42be9d..80d55d6f5 100644 --- a/inc/lang/da/lang.php +++ b/inc/lang/da/lang.php @@ -53,6 +53,7 @@ $lang['btn_draft'] = 'Redigér kladde'; $lang['btn_recover'] = 'Gendan kladde'; $lang['btn_draftdel'] = 'Slet kladde'; $lang['btn_revert'] = 'Reetablér'; +$lang['btn_register'] = 'Registrér'; $lang['loggedinas'] = 'Logget ind som'; $lang['user'] = 'Brugernavn'; $lang['pass'] = 'Adgangskode'; @@ -62,7 +63,6 @@ $lang['passchk'] = 'Gentag ny adgangskode'; $lang['remember'] = 'Automatisk log ind'; $lang['fullname'] = 'Fulde navn'; $lang['email'] = 'E-mail'; -$lang['register'] = 'Registrér'; $lang['profile'] = 'Brugerprofil'; $lang['badlogin'] = 'Brugernavn eller adgangskode var forkert.'; $lang['minoredit'] = 'Mindre ændringer'; diff --git a/inc/lang/de-informal/lang.php b/inc/lang/de-informal/lang.php index b7c446656..cfb492dfb 100644 --- a/inc/lang/de-informal/lang.php +++ b/inc/lang/de-informal/lang.php @@ -58,6 +58,7 @@ $lang['btn_draft'] = 'Entwurf bearbeiten'; $lang['btn_recover'] = 'Entwurf wiederherstellen'; $lang['btn_draftdel'] = 'Entwurf löschen'; $lang['btn_revert'] = 'Wiederherstellen'; +$lang['btn_register'] = 'Registrieren'; $lang['loggedinas'] = 'Angemeldet als'; $lang['user'] = 'Benutzername'; $lang['pass'] = 'Passwort'; @@ -67,7 +68,6 @@ $lang['passchk'] = 'und nochmal'; $lang['remember'] = 'Angemeldet bleiben'; $lang['fullname'] = 'Voller Name'; $lang['email'] = 'E-Mail'; -$lang['register'] = 'Registrieren'; $lang['profile'] = 'Benutzerprofil'; $lang['badlogin'] = 'Nutzername oder Passwort sind falsch.'; $lang['minoredit'] = 'kleine Änderung'; diff --git a/inc/lang/de/lang.php b/inc/lang/de/lang.php index a353b98ed..4c5f642bb 100644 --- a/inc/lang/de/lang.php +++ b/inc/lang/de/lang.php @@ -59,6 +59,7 @@ $lang['btn_draft'] = 'Entwurf bearbeiten'; $lang['btn_recover'] = 'Entwurf wiederherstellen'; $lang['btn_draftdel'] = 'Entwurf löschen'; $lang['btn_revert'] = 'Wiederherstellen'; +$lang['btn_register'] = 'Registrieren'; $lang['loggedinas'] = 'Angemeldet als'; $lang['user'] = 'Benutzername'; $lang['pass'] = 'Passwort'; @@ -68,7 +69,6 @@ $lang['passchk'] = 'und nochmal'; $lang['remember'] = 'Angemeldet bleiben'; $lang['fullname'] = 'Voller Name'; $lang['email'] = 'E-Mail'; -$lang['register'] = 'Registrieren'; $lang['profile'] = 'Benutzerprofil'; $lang['badlogin'] = 'Nutzername oder Passwort sind falsch.'; $lang['minoredit'] = 'kleine Änderung'; diff --git a/inc/lang/el/lang.php b/inc/lang/el/lang.php index da79e5711..11c64285e 100644 --- a/inc/lang/el/lang.php +++ b/inc/lang/el/lang.php @@ -47,6 +47,7 @@ $lang['btn_draft'] = 'Επεξεργασία αυτόματα απ $lang['btn_recover'] = 'Επαναφορά αυτόματα αποθηκευμένης σελίδας'; $lang['btn_draftdel'] = 'Διαγραφή αυτόματα αποθηκευμένης σελίδας'; $lang['btn_revert'] = 'Αποκατάσταση'; +$lang['btn_register'] = 'Εγγραφή'; $lang['loggedinas'] = 'Συνδεδεμένος ως'; $lang['user'] = 'Όνομα χρήστη'; $lang['pass'] = 'Κωδικός'; @@ -56,7 +57,6 @@ $lang['passchk'] = 'ακόμη μια φορά'; $lang['remember'] = 'Απομνημόνευση στοιχείων λογαριασμού'; $lang['fullname'] = 'Ονοματεπώνυμο'; $lang['email'] = 'e-mail'; -$lang['register'] = 'Εγγραφή'; $lang['profile'] = 'Προφίλ χρήστη'; $lang['badlogin'] = 'Συγνώμη, το όνομα χρήστη ή ο κωδικός ήταν λανθασμένο.'; $lang['minoredit'] = 'Ασήμαντες αλλαγές'; diff --git a/inc/lang/en/lang.php b/inc/lang/en/lang.php index 8abd4314c..51fd8f645 100644 --- a/inc/lang/en/lang.php +++ b/inc/lang/en/lang.php @@ -46,7 +46,8 @@ $lang['btn_resendpwd'] = 'Send new password'; $lang['btn_draft'] = 'Edit draft'; $lang['btn_recover'] = 'Recover draft'; $lang['btn_draftdel'] = 'Delete draft'; -$lang['btn_revert'] = 'Restore'; +$lang['btn_revert'] = 'Restore'; +$lang['btn_register'] = 'Register'; $lang['loggedinas'] = 'Logged in as'; $lang['user'] = 'Username'; @@ -57,7 +58,6 @@ $lang['passchk'] = 'once again'; $lang['remember'] = 'Remember me'; $lang['fullname'] = 'Real name'; $lang['email'] = 'E-Mail'; -$lang['register'] = 'Register'; $lang['profile'] = 'User Profile'; $lang['badlogin'] = 'Sorry, username or password was wrong.'; $lang['minoredit'] = 'Minor Changes'; diff --git a/inc/lang/eo/lang.php b/inc/lang/eo/lang.php index a2457474b..dee12a670 100644 --- a/inc/lang/eo/lang.php +++ b/inc/lang/eo/lang.php @@ -54,6 +54,7 @@ $lang['btn_draft'] = 'Redakti skizon'; $lang['btn_recover'] = 'Restarigi skizon'; $lang['btn_draftdel'] = 'Forigi skizon'; $lang['btn_revert'] = 'Restarigi'; +$lang['btn_register'] = 'Registriĝi'; $lang['loggedinas'] = 'Ensalutita kiel'; $lang['user'] = 'Uzant-nomo'; $lang['pass'] = 'Pasvorto'; @@ -63,7 +64,6 @@ $lang['passchk'] = 'plian fojon'; $lang['remember'] = 'Rememoru min'; $lang['fullname'] = 'Kompleta nomo'; $lang['email'] = 'Retpoŝto'; -$lang['register'] = 'Registriĝi'; $lang['profile'] = 'Uzanto-profilo'; $lang['badlogin'] = 'Pardonu, uzant-nomo aŭ pasvorto estis erara.'; $lang['minoredit'] = 'Etaj modifoj'; diff --git a/inc/lang/es/lang.php b/inc/lang/es/lang.php index 04403c821..b329ffff4 100644 --- a/inc/lang/es/lang.php +++ b/inc/lang/es/lang.php @@ -64,6 +64,7 @@ $lang['btn_draft'] = 'Editar borrador'; $lang['btn_recover'] = 'Recuperar borrador'; $lang['btn_draftdel'] = 'Eliminar borrador'; $lang['btn_revert'] = 'Restaurar'; +$lang['btn_register'] = 'Registrarse'; $lang['loggedinas'] = 'Conectado como '; $lang['user'] = 'Usuario'; $lang['pass'] = 'Contraseña'; @@ -73,7 +74,6 @@ $lang['passchk'] = 'otra vez'; $lang['remember'] = 'Recordarme'; $lang['fullname'] = 'Nombre real'; $lang['email'] = 'E-Mail'; -$lang['register'] = 'Registrarse'; $lang['profile'] = 'Perfil del usuario'; $lang['badlogin'] = 'Lo siento, el usuario o la contraseña es incorrecto.'; $lang['minoredit'] = 'Cambios menores'; diff --git a/inc/lang/et/lang.php b/inc/lang/et/lang.php index ee765b5b5..5fc9c88d5 100644 --- a/inc/lang/et/lang.php +++ b/inc/lang/et/lang.php @@ -43,6 +43,8 @@ $lang['btn_resendpwd'] = 'Saada uus parool'; $lang['btn_draft'] = 'Toimeta mustandit'; $lang['btn_recover'] = 'Taata mustand'; $lang['btn_draftdel'] = 'Kustuta mustand'; +$lang['btn_register'] = 'Registreeri uus kasutaja'; + $lang['newpass'] = 'Uus parool'; $lang['oldpass'] = 'Vana parool'; $lang['passchk'] = 'Korda uut parooli'; @@ -131,7 +133,6 @@ $lang['pass'] = 'Parool'; $lang['remember'] = 'Pea mind meeles'; $lang['fullname'] = 'Täielik nimi'; $lang['email'] = 'E-post'; -$lang['register'] = 'Registreeri uus kasutaja'; $lang['badlogin'] = 'Oops, Sinu kasutajanimi või parool oli vale.'; $lang['regmissing'] = 'Kõik väljad tuleb ära täita.'; diff --git a/inc/lang/eu/lang.php b/inc/lang/eu/lang.php index 2efec00be..503b20b30 100644 --- a/inc/lang/eu/lang.php +++ b/inc/lang/eu/lang.php @@ -45,6 +45,7 @@ $lang['btn_draft'] = 'Editatu zirriborroa'; $lang['btn_recover'] = 'Berreskuratu zirriborroa'; $lang['btn_draftdel'] = 'Ezabatu zirriborroa'; $lang['btn_revert'] = 'Berrezarri'; +$lang['btn_register'] = 'Erregistratu'; $lang['loggedinas'] = 'Erabiltzailea'; $lang['user'] = 'Erabiltzailea'; $lang['pass'] = 'Pasahitza'; @@ -54,7 +55,6 @@ $lang['passchk'] = 'berriz'; $lang['remember'] = 'Gogoratu'; $lang['fullname'] = 'Izen Deiturak'; $lang['email'] = 'E-Maila'; -$lang['register'] = 'Erregistratu'; $lang['profile'] = 'Erabiltzaile Profila'; $lang['badlogin'] = 'Barkatu, prozesuak huts egin du; saiatu berriz'; $lang['minoredit'] = 'Aldaketa Txikiak'; diff --git a/inc/lang/fa/lang.php b/inc/lang/fa/lang.php index c5be8e1c0..cc79393bd 100644 --- a/inc/lang/fa/lang.php +++ b/inc/lang/fa/lang.php @@ -53,6 +53,7 @@ $lang['btn_draft'] = 'ویرایش پیش‌نویس'; $lang['btn_recover'] = 'بازیابی پیش‌نویس'; $lang['btn_draftdel'] = 'حذف پیش‌نویس'; $lang['btn_revert'] = 'بازیابی'; +$lang['btn_register'] = 'یک حساب جدید بسازید'; $lang['loggedinas'] = 'به عنوان کاربر روبرو وارد شده‌اید:'; $lang['user'] = 'نام کاربری:'; $lang['pass'] = 'گذرواژه‌ی شما'; @@ -62,7 +63,6 @@ $lang['passchk'] = 'گذرواژه را دوباره وارد کن $lang['remember'] = 'گذرواژه را به یاد بسپار.'; $lang['fullname'] = '*نام واقعی شما'; $lang['email'] = 'ایمیل شما*'; -$lang['register'] = 'یک حساب جدید بسازید'; $lang['profile'] = 'پروفایل کاربر'; $lang['badlogin'] = 'خطا در ورود به سیستم'; $lang['minoredit'] = 'این ویرایش خُرد است'; diff --git a/inc/lang/fi/lang.php b/inc/lang/fi/lang.php index 2b1ddfa6f..36bb1e911 100644 --- a/inc/lang/fi/lang.php +++ b/inc/lang/fi/lang.php @@ -48,6 +48,7 @@ $lang['btn_draft'] = 'Muokkaa luonnosta'; $lang['btn_recover'] = 'Palauta luonnos'; $lang['btn_draftdel'] = 'Poista luonnos'; $lang['btn_revert'] = 'palauta'; +$lang['btn_register'] = 'Rekisteröidy'; $lang['loggedinas'] = 'Kirjautunut nimellä'; $lang['user'] = 'Käyttäjänimi'; $lang['pass'] = 'Salasana'; @@ -57,7 +58,6 @@ $lang['passchk'] = 'uudelleen'; $lang['remember'] = 'Muista minut'; $lang['fullname'] = 'Koko nimi'; $lang['email'] = 'Sähköposti'; -$lang['register'] = 'Rekisteröidy'; $lang['profile'] = 'Käyttäjän profiili'; $lang['badlogin'] = 'Käyttäjänimi tai salasana oli väärä.'; $lang['minoredit'] = 'Pieni muutos'; diff --git a/inc/lang/fo/lang.php b/inc/lang/fo/lang.php index 2bc5c3d53..8b1cd41e5 100644 --- a/inc/lang/fo/lang.php +++ b/inc/lang/fo/lang.php @@ -45,6 +45,7 @@ $lang['btn_draft'] = 'Broyt kladdu'; $lang['btn_recover'] = 'Endurbygg kladdu'; $lang['btn_draftdel'] = 'Sletta'; $lang['btn_revert'] = 'Endurbygg'; +$lang['btn_register'] = 'Melda til'; $lang['loggedinas'] = 'Ritavur inn sum'; $lang['user'] = 'Brúkaranavn'; $lang['pass'] = 'Loyniorð'; @@ -54,7 +55,6 @@ $lang['passchk'] = 'Endurtak nýtt loyniorð'; $lang['remember'] = 'Minst til loyniorðið hjá mær'; $lang['fullname'] = 'Navn'; $lang['email'] = 'T-postur'; -$lang['register'] = 'Melda til'; $lang['profile'] = 'Brúkara vangamynd'; $lang['badlogin'] = 'Skeivt brúkaranavn ella loyniorð.'; $lang['minoredit'] = 'Smærri broytingar'; diff --git a/inc/lang/fr/lang.php b/inc/lang/fr/lang.php index b6be994c6..da0ffdea0 100644 --- a/inc/lang/fr/lang.php +++ b/inc/lang/fr/lang.php @@ -62,6 +62,7 @@ $lang['btn_draft'] = 'Modifier le brouillon'; $lang['btn_recover'] = 'Récupérer le brouillon'; $lang['btn_draftdel'] = 'Effacer le brouillon'; $lang['btn_revert'] = 'Restaurer'; +$lang['btn_register'] = 'S\'enregistrer'; $lang['loggedinas'] = 'Connecté en tant que '; $lang['user'] = 'Utilisateur'; $lang['pass'] = 'Mot de passe'; @@ -71,7 +72,6 @@ $lang['passchk'] = 'Répéter nouveau mot de passe'; $lang['remember'] = 'Mémoriser'; $lang['fullname'] = 'Nom'; $lang['email'] = 'Adresse de courriel'; -$lang['register'] = 'S\'enregistrer'; $lang['profile'] = 'Profil utilisateur'; $lang['badlogin'] = 'L\'utilisateur ou le mot de passe est incorrect.'; $lang['minoredit'] = 'Modification mineure'; diff --git a/inc/lang/gl/lang.php b/inc/lang/gl/lang.php index 9f1b48173..37cf55d22 100644 --- a/inc/lang/gl/lang.php +++ b/inc/lang/gl/lang.php @@ -44,6 +44,7 @@ $lang['btn_draft'] = 'Editar borrador'; $lang['btn_recover'] = 'Recuperar borrador'; $lang['btn_draftdel'] = 'Eliminar borrador'; $lang['btn_revert'] = 'Restaurar'; +$lang['btn_register'] = 'Rexístrate'; $lang['loggedinas'] = 'Iniciaches sesión como'; $lang['user'] = 'Nome de Usuario'; $lang['pass'] = 'Contrasinal'; @@ -53,7 +54,6 @@ $lang['passchk'] = 'de novo'; $lang['remember'] = 'Lémbrame'; $lang['fullname'] = 'Nome Completo'; $lang['email'] = 'Correo-e'; -$lang['register'] = 'Rexístrate'; $lang['profile'] = 'Perfil de Usuario'; $lang['badlogin'] = 'Sentímolo, mais o nome de usuario ou o contrasinal non son correctos.'; $lang['minoredit'] = 'Trocos Menores'; diff --git a/inc/lang/he/lang.php b/inc/lang/he/lang.php index 47310d4d1..47940ef53 100644 --- a/inc/lang/he/lang.php +++ b/inc/lang/he/lang.php @@ -51,6 +51,7 @@ $lang['btn_draft'] = 'עריכת טיוטה'; $lang['btn_recover'] = 'שחזור טיוטה'; $lang['btn_draftdel'] = 'מחיקת טיוטה'; $lang['btn_revert'] = 'שחזור'; +$lang['btn_register'] = 'הרשמה'; $lang['loggedinas'] = 'נכנסת בשם'; $lang['user'] = 'שם משתמש'; $lang['pass'] = 'ססמה'; @@ -60,7 +61,6 @@ $lang['passchk'] = 'פעם נוספת'; $lang['remember'] = 'שמירת הפרטים שלי'; $lang['fullname'] = 'שם מלא'; $lang['email'] = 'דוא״ל'; -$lang['register'] = 'הרשמה'; $lang['profile'] = 'פרופיל המשתמש'; $lang['badlogin'] = 'שם המשתמש או הססמה שגויים, עמך הסליחה'; $lang['minoredit'] = 'שינוים מזעריים'; diff --git a/inc/lang/hi/lang.php b/inc/lang/hi/lang.php index b8af3becd..00e5589d8 100644 --- a/inc/lang/hi/lang.php +++ b/inc/lang/hi/lang.php @@ -79,11 +79,8 @@ $lang['current'] = 'वर्तमान'; $lang['yours'] = 'आपका संस्करणः'; $lang['diff'] = 'वर्तमान संशोधन में मतभेद दिखाइये |'; $lang['diff2'] = 'चयनित संशोधन के बीच में मतभेद दिखाइये |'; -$lang['line'] = 'रेखा -'; -$lang['youarehere'] = 'आप यहाँ हैं | - -'; +$lang['line'] = 'रेखा'; +$lang['youarehere'] = 'आप यहाँ हैं |'; $lang['lastmod'] = 'अंतिम बार संशोधित'; $lang['by'] = 'के द्वारा'; $lang['deleted'] = 'हटाया'; @@ -121,8 +118,7 @@ $lang['i_superuser'] = 'महाउपयोगकर्ता'; $lang['i_retry'] = 'पुनःप्रयास'; $lang['mu_gridsize'] = 'आकार'; $lang['mu_gridstat'] = 'स्थिति'; -$lang['mu_browse'] = 'ब्राउज़ -'; +$lang['mu_browse'] = 'ब्राउज़'; $lang['mu_toobig'] = 'बहुत बड़ा'; $lang['mu_ready'] = 'अपलोड करने के लिए तैयार'; $lang['mu_done'] = 'पूर्ण'; diff --git a/inc/lang/hr/lang.php b/inc/lang/hr/lang.php index 545498dee..a42e8c96f 100644 --- a/inc/lang/hr/lang.php +++ b/inc/lang/hr/lang.php @@ -48,6 +48,7 @@ $lang['btn_resendpwd'] = 'Pošalji novu lozinku'; $lang['btn_draft'] = 'Uredi nacrt dokumenta'; $lang['btn_recover'] = 'Vrati prijašnji nacrt dokumenta'; $lang['btn_draftdel'] = 'Obriši nacrt dokumenta'; +$lang['btn_register'] = 'Registracija'; $lang['loggedinas'] = 'Prijavljen kao'; $lang['user'] = 'Korisničko ime'; $lang['pass'] = 'Lozinka'; @@ -57,7 +58,6 @@ $lang['passchk'] = 'Ponoviti'; $lang['remember'] = 'Zapamti me'; $lang['fullname'] = 'Ime i prezime'; $lang['email'] = 'Email'; -$lang['register'] = 'Registracija'; $lang['profile'] = 'Korisnički profil'; $lang['badlogin'] = 'Ne ispravno korisničko ime ili lozinka.'; $lang['minoredit'] = 'Manje izmjene'; diff --git a/inc/lang/hu/lang.php b/inc/lang/hu/lang.php index b3cd87c29..9f318ffec 100644 --- a/inc/lang/hu/lang.php +++ b/inc/lang/hu/lang.php @@ -50,6 +50,7 @@ $lang['btn_draft'] = 'Piszkozat szerkesztése'; $lang['btn_recover'] = 'Piszkozat folytatása'; $lang['btn_draftdel'] = 'Piszkozat törlése'; $lang['btn_revert'] = 'Helyreállítás'; +$lang['btn_register'] = 'Regisztráció'; $lang['loggedinas'] = 'Belépett felhasználó: '; $lang['user'] = 'Azonosító'; $lang['pass'] = 'Jelszó'; @@ -59,7 +60,6 @@ $lang['passchk'] = 'még egyszer'; $lang['remember'] = 'Emlékezz rám'; $lang['fullname'] = 'Teljes név'; $lang['email'] = 'E-Mail'; -$lang['register'] = 'Regisztráció'; $lang['profile'] = 'Személyes beállítások'; $lang['badlogin'] = 'Sajnáljuk, az azonosító, vagy a jelszó nem jó.'; $lang['minoredit'] = 'Apróbb változások'; diff --git a/inc/lang/ia/lang.php b/inc/lang/ia/lang.php index f68467543..bdfef88f4 100644 --- a/inc/lang/ia/lang.php +++ b/inc/lang/ia/lang.php @@ -50,6 +50,7 @@ $lang['btn_draft'] = 'Modificar version provisori'; $lang['btn_recover'] = 'Recuperar version provisori'; $lang['btn_draftdel'] = 'Deler version provisori'; $lang['btn_revert'] = 'Restaurar'; +$lang['btn_register'] = 'Crear conto'; $lang['loggedinas'] = 'Session aperite como'; $lang['user'] = 'Nomine de usator'; $lang['pass'] = 'Contrasigno'; @@ -59,7 +60,6 @@ $lang['passchk'] = 'un altere vice'; $lang['remember'] = 'Memorar me'; $lang['fullname'] = 'Nomine real'; $lang['email'] = 'E-mail'; -$lang['register'] = 'Crear conto'; $lang['profile'] = 'Profilo de usator'; $lang['badlogin'] = 'Le nomine de usator o le contrasigno es incorrecte.'; $lang['minoredit'] = 'Modificationes minor'; diff --git a/inc/lang/id-ni/lang.php b/inc/lang/id-ni/lang.php index 4e26677e0..9c04f0259 100644 --- a/inc/lang/id-ni/lang.php +++ b/inc/lang/id-ni/lang.php @@ -41,6 +41,7 @@ $lang['btn_reset'] = 'Fawu\'a'; $lang['btn_resendpwd'] = 'Fa\'ohe\'ö kode sibohou'; $lang['btn_draft'] = 'Fawu\'a wanura'; $lang['btn_draftdel'] = 'Heta zura'; +$lang['btn_register'] = 'Fasura\'ö'; $lang['loggedinas'] = 'Möi bakha zotöi'; $lang['user'] = 'Töi'; $lang['pass'] = 'Kode'; @@ -50,7 +51,6 @@ $lang['passchk'] = 'Sura sakalitö'; $lang['remember'] = 'Töngöni ndra\'o'; $lang['fullname'] = 'Töi safönu'; $lang['email'] = 'Imele'; -$lang['register'] = 'Fasura\'ö'; $lang['profile'] = 'Töi pörofile'; $lang['badlogin'] = 'Bologö dödöu, fasala döi faoma kode.'; $lang['minoredit'] = 'Famawu\'a ma\'ifu'; diff --git a/inc/lang/id/lang.php b/inc/lang/id/lang.php index 3ea1b394a..c1480f518 100644 --- a/inc/lang/id/lang.php +++ b/inc/lang/id/lang.php @@ -45,6 +45,7 @@ $lang['btn_reset'] = 'Reset'; $lang['btn_resendpwd'] = 'Kirim password baru'; $lang['btn_draft'] = 'Edit draft'; $lang['btn_draftdel'] = 'Hapus draft'; +$lang['btn_register'] = 'Daftar'; $lang['loggedinas'] = 'Login sebagai '; $lang['user'] = 'Username'; $lang['pass'] = 'Password'; @@ -54,7 +55,6 @@ $lang['passchk'] = 'sekali lagi'; $lang['remember'] = 'Ingat saya'; $lang['fullname'] = 'Nama lengkap'; $lang['email'] = 'E-Mail'; -$lang['register'] = 'Daftar'; $lang['profile'] = 'Profil User'; $lang['badlogin'] = 'Maaf, username atau password salah.'; $lang['minoredit'] = 'Perubahan Minor'; diff --git a/inc/lang/is/lang.php b/inc/lang/is/lang.php index ba1ab2c04..7388e6908 100644 --- a/inc/lang/is/lang.php +++ b/inc/lang/is/lang.php @@ -54,6 +54,7 @@ $lang['btn_draft'] = 'Breyta uppkasti'; $lang['btn_recover'] = 'Endurheimta uppkast'; $lang['btn_draftdel'] = 'Eyða uppkasti'; $lang['btn_revert'] = 'Endurheimta'; +$lang['btn_register'] = 'Skráning'; $lang['loggedinas'] = 'Innskráning sem'; $lang['user'] = 'Notendanafn'; $lang['pass'] = 'Aðgangsorð'; @@ -63,7 +64,6 @@ $lang['passchk'] = 'Aðgangsorð (aftur)'; $lang['remember'] = 'Muna.'; $lang['fullname'] = 'Fullt nafn þitt*'; $lang['email'] = 'Tölvupóstfangið þitt*'; -$lang['register'] = 'Skráning'; $lang['profile'] = 'Notendastillingar'; $lang['badlogin'] = 'Því miður, notandanafn eða aðgangsorð var rangur.'; $lang['minoredit'] = 'Minniháttar breyting'; diff --git a/inc/lang/it/lang.php b/inc/lang/it/lang.php index 419b7053b..99c09c710 100644 --- a/inc/lang/it/lang.php +++ b/inc/lang/it/lang.php @@ -55,6 +55,7 @@ $lang['btn_draft'] = 'Modifica bozza'; $lang['btn_recover'] = 'Ripristina bozza'; $lang['btn_draftdel'] = 'Elimina bozza'; $lang['btn_revert'] = 'Ripristina'; +$lang['btn_register'] = 'Registrazione'; $lang['loggedinas'] = 'Collegato come'; $lang['user'] = 'Nome utente'; $lang['pass'] = 'Password'; @@ -64,7 +65,6 @@ $lang['passchk'] = 'Ripeti password'; $lang['remember'] = 'Memorizza nome utente e password'; $lang['fullname'] = 'Nome completo'; $lang['email'] = 'Email'; -$lang['register'] = 'Registrazione'; $lang['profile'] = 'Profilo utente'; $lang['badlogin'] = 'Il nome utente o la password non sono validi.'; $lang['minoredit'] = 'Modifiche minori'; diff --git a/inc/lang/ja/lang.php b/inc/lang/ja/lang.php index d9c02764a..d503bae31 100644 --- a/inc/lang/ja/lang.php +++ b/inc/lang/ja/lang.php @@ -47,6 +47,7 @@ $lang['btn_draft'] = 'ドラフトを編集'; $lang['btn_recover'] = 'ドラフトを復元'; $lang['btn_draftdel'] = 'ドラフトを削除'; $lang['btn_revert'] = '元に戻す'; +$lang['btn_register'] = 'ユーザー登録'; $lang['loggedinas'] = 'ようこそ'; $lang['user'] = 'ユーザー名'; $lang['pass'] = 'パスワード'; @@ -56,7 +57,6 @@ $lang['passchk'] = '確認'; $lang['remember'] = 'ユーザー名とパスワードを記憶する'; $lang['fullname'] = 'フルネーム'; $lang['email'] = 'メールアドレス'; -$lang['register'] = 'ユーザー登録'; $lang['profile'] = 'ユーザー情報'; $lang['badlogin'] = 'ユーザー名かパスワードが違います。'; $lang['minoredit'] = '小変更'; diff --git a/inc/lang/km/lang.php b/inc/lang/km/lang.php index 3519a484e..24dd67045 100644 --- a/inc/lang/km/lang.php +++ b/inc/lang/km/lang.php @@ -46,6 +46,7 @@ $lang['btn_resendpwd'] = 'ផ្ញើពាក្សសម្ងាត់'; $lang['btn_draft'] = 'កែគំរោង'; $lang['btn_recover'] = 'ស្រោះគំរោងឡើង'; $lang['btn_draftdel'] = 'លុបគំរោង'; +$lang['btn_register'] = 'ចុះឈ្មោះ';//'Register'; $lang['loggedinas'] = 'អ្នកប្រើ'; $lang['user'] = 'នាមបម្រើ'; @@ -56,7 +57,6 @@ $lang['passchk'] = 'ម្ដងទាត'; $lang['remember'] = 'ចំណាំខ្ញុំ'; $lang['fullname'] = 'នាមត្រគោល'; $lang['email'] = 'អ៊ីមែល'; -$lang['register'] = 'ចុះឈ្មោះ';//'Register'; $lang['profile'] = 'ប្រវត្តិរូប';// 'User Profile'; $lang['badlogin'] = 'សុំអាទោស​ នាមបំរើ ឬ ពាក្សសម្ងាតមិនត្រវទេ។'; $lang['minoredit'] = 'កែបបណ្តិចបណ្តួច';// 'Minor Changes'; diff --git a/inc/lang/ko/lang.php b/inc/lang/ko/lang.php index 3765dd011..482d233bd 100644 --- a/inc/lang/ko/lang.php +++ b/inc/lang/ko/lang.php @@ -49,6 +49,7 @@ $lang['btn_draft'] = '문서초안 편집'; $lang['btn_recover'] = '문서초안 복구'; $lang['btn_draftdel'] = '문서초안 삭제'; $lang['btn_revert'] = '복원'; +$lang['btn_register'] = '등록'; $lang['loggedinas'] = '다음 사용자로 로그인'; $lang['user'] = '사용자'; $lang['pass'] = '패스워드'; @@ -58,7 +59,6 @@ $lang['passchk'] = '패스워드 다시 확인'; $lang['remember'] = '기억하기'; $lang['fullname'] = '실제 이름'; $lang['email'] = '이메일'; -$lang['register'] = '등록'; $lang['profile'] = '개인 정보'; $lang['badlogin'] = '잘못된 사용자 이름이거나 패스워드입니다.'; $lang['minoredit'] = '일부 내용 변경'; diff --git a/inc/lang/ku/lang.php b/inc/lang/ku/lang.php index 0ff2ca4ca..9bed43cd1 100644 --- a/inc/lang/ku/lang.php +++ b/inc/lang/ku/lang.php @@ -34,6 +34,7 @@ $lang['btn_backlink'] = "Girêdanên paş"; $lang['btn_backtomedia'] = 'Back to Mediafile Selection'; $lang['btn_subscribe'] = 'Subscribe Changes'; $lang['btn_unsubscribe'] = 'Unsubscribe Changes'; +$lang['btn_register'] = 'Register'; $lang['loggedinas'] = 'Logged in as'; $lang['user'] = 'Username'; @@ -42,7 +43,6 @@ $lang['passchk'] = 'once again'; $lang['remember'] = 'Remember me'; $lang['fullname'] = 'Full name'; $lang['email'] = 'E-Mail'; -$lang['register'] = 'Register'; $lang['badlogin'] = 'Sorry, username or password was wrong.'; $lang['regmissing'] = 'Sorry, you must fill in all fields.'; diff --git a/inc/lang/la/lang.php b/inc/lang/la/lang.php index ec80ac4d1..d10c094f8 100644 --- a/inc/lang/la/lang.php +++ b/inc/lang/la/lang.php @@ -49,6 +49,7 @@ $lang['btn_draft'] = 'Propositum recensere'; $lang['btn_recover'] = 'Propositum reficere'; $lang['btn_draftdel'] = 'Propositum delere'; $lang['btn_revert'] = 'Reficere'; +$lang['btn_register'] = 'Te adscribere'; $lang['loggedinas'] = 'Nomen sodalis:'; $lang['user'] = 'Nomen sodalis:'; $lang['pass'] = 'Tessera tua'; @@ -58,7 +59,6 @@ $lang['passchk'] = 'Tesseram tuam adfirmare'; $lang['remember'] = 'Tesseram meam sodalitatis memento'; $lang['fullname'] = 'Nomen tuom uerum:'; $lang['email'] = 'Cursus interretialis:'; -$lang['register'] = 'Te adscribere'; $lang['profile'] = 'Tabella Sodalis'; $lang['badlogin'] = 'Error in ineundo est, rectum nomen uel tessera cedo.'; $lang['minoredit'] = 'Recensio minor'; diff --git a/inc/lang/lb/lang.php b/inc/lang/lb/lang.php index 7152b65b1..09fc41f08 100644 --- a/inc/lang/lb/lang.php +++ b/inc/lang/lb/lang.php @@ -41,6 +41,7 @@ $lang['btn_resendpwd'] = 'Nei Passwuert schécken'; $lang['btn_draft'] = 'Entworf änneren'; $lang['btn_recover'] = 'Entworf zeréckhuelen'; $lang['btn_draftdel'] = 'Entworf läschen'; +$lang['btn_register'] = 'Registréieren'; $lang['loggedinas'] = 'Ageloggt als'; $lang['user'] = 'Benotzernumm'; $lang['pass'] = 'Passwuert'; @@ -50,7 +51,6 @@ $lang['passchk'] = 'nach eng Kéier'; $lang['remember'] = 'Verhal mech'; $lang['fullname'] = 'Richtegen Numm'; $lang['email'] = 'E-Mail'; -$lang['register'] = 'Registréieren'; $lang['profile'] = 'Benotzerprofil'; $lang['badlogin'] = 'Entschëllegt, de Benotzernumm oder d\'Passwuert war falsch'; $lang['minoredit'] = 'Kleng Ännerungen'; diff --git a/inc/lang/lt/lang.php b/inc/lang/lt/lang.php index 639ad4749..ca2f2da6c 100644 --- a/inc/lang/lt/lang.php +++ b/inc/lang/lt/lang.php @@ -50,6 +50,7 @@ $lang['btn_resendpwd'] = 'Išsiųsti naują slaptažodį'; $lang['btn_draft'] = 'Redaguoti juodraštį'; $lang['btn_recover'] = 'Atkurti juodraštį'; $lang['btn_draftdel'] = 'Šalinti juodraštį'; +$lang['btn_register'] = 'Registruotis'; $lang['loggedinas'] = 'Prisijungęs kaip'; $lang['user'] = 'Vartotojo vardas'; $lang['pass'] = 'Slaptažodis'; @@ -59,7 +60,6 @@ $lang['passchk'] = 'dar kartą'; $lang['remember'] = 'Prisiminti mane'; $lang['fullname'] = 'Visas vardas'; $lang['email'] = 'El. pašto adresas'; -$lang['register'] = 'Registruotis'; $lang['profile'] = 'Vartotojo profilis'; $lang['badlogin'] = 'Nurodėte blogą vartotojo vardą arba slaptažodį.'; $lang['minoredit'] = 'Nedidelis pataisymas'; diff --git a/inc/lang/lv/lang.php b/inc/lang/lv/lang.php index 21c4606b3..73559c0f8 100644 --- a/inc/lang/lv/lang.php +++ b/inc/lang/lv/lang.php @@ -44,6 +44,7 @@ $lang['btn_draft'] = 'Labot melnrakstu'; $lang['btn_recover'] = 'Atjaunot melnrakstu'; $lang['btn_draftdel'] = 'Dzēst melnrakstu'; $lang['btn_revert'] = 'Atjaunot'; +$lang['btn_register'] = 'Reģistrēties'; $lang['loggedinas'] = 'Pieteicies kā'; $lang['user'] = 'Lietotājvārds'; $lang['pass'] = 'Parole'; @@ -53,7 +54,6 @@ $lang['passchk'] = 'vēlreiz'; $lang['remember'] = 'Atceries mani'; $lang['fullname'] = 'Pilns vārds'; $lang['email'] = 'E-pasts'; -$lang['register'] = 'Reģistrēties'; $lang['profile'] = 'Lietotāja vārds'; $lang['badlogin'] = 'Atvaino, lietotājvārds vai parole aplama.'; $lang['minoredit'] = 'Sīki labojumi'; diff --git a/inc/lang/mg/lang.php b/inc/lang/mg/lang.php index 3727cfe9a..8c95a9e02 100644 --- a/inc/lang/mg/lang.php +++ b/inc/lang/mg/lang.php @@ -28,6 +28,7 @@ $lang['btn_update'] = 'Update'; $lang['btn_delete'] = 'Fafao'; $lang['btn_back'] = 'Miverina'; $lang['btn_backtomedia'] = 'Fitsongana fichier Media'; +$lang['btn_register'] = 'Hisoratra'; $lang['loggedinas'] = 'Anaranao:'; $lang['user'] = 'Anarana'; @@ -36,7 +37,6 @@ $lang['passchk'] = 'Ataovy indray'; $lang['remember'] = 'Tsarovy'; $lang['fullname'] = 'Anarana feno'; $lang['email'] = 'Imailaka'; -$lang['register'] = 'Hisoratra'; $lang['badlogin'] = 'Miala tsiny fa misy diso ny anarana na ny alahidy.'; $lang['regmissing'] = 'Tsy maintsy fenoina ny saha rehetra.'; diff --git a/inc/lang/mk/lang.php b/inc/lang/mk/lang.php index ddd734e22..456a5a3d4 100644 --- a/inc/lang/mk/lang.php +++ b/inc/lang/mk/lang.php @@ -47,6 +47,7 @@ $lang['btn_draft'] = 'Уреди скица'; $lang['btn_recover'] = 'Поврати скица'; $lang['btn_draftdel'] = 'Избриши скица'; $lang['btn_revert'] = 'Обнови'; +$lang['btn_register'] = 'Регистрирај се'; $lang['loggedinas'] = 'Најавен/а како'; $lang['user'] = 'Корисничко име'; $lang['pass'] = 'Лозинка'; @@ -56,7 +57,6 @@ $lang['passchk'] = 'уште еднаш'; $lang['remember'] = 'Запомни ме'; $lang['fullname'] = 'Вистинско име'; $lang['email'] = 'Е-пошта'; -$lang['register'] = 'Регистрирај се'; $lang['profile'] = 'Кориснички профил'; $lang['badlogin'] = 'Жалам, корисничкото име или лозинката се погрешни.'; $lang['minoredit'] = 'Мали измени'; diff --git a/inc/lang/mr/lang.php b/inc/lang/mr/lang.php index 99561f064..d00d6d841 100644 --- a/inc/lang/mr/lang.php +++ b/inc/lang/mr/lang.php @@ -54,6 +54,7 @@ $lang['btn_resendpwd'] = 'कृपया परवलीचा नव $lang['btn_draft'] = 'प्रत संपादन'; $lang['btn_recover'] = 'प्रत परत मिळवा'; $lang['btn_draftdel'] = 'प्रत रद्द'; +$lang['btn_register'] = 'नोंदणी'; $lang['loggedinas'] = 'लॉगिन नाव'; $lang['user'] = 'वापरकर्ता'; $lang['pass'] = 'परवलीचा शब्द'; @@ -63,7 +64,6 @@ $lang['passchk'] = 'परत एकदा'; $lang['remember'] = 'लक्षात ठेवा'; $lang['fullname'] = 'पूर्ण नावं'; $lang['email'] = 'इमेल'; -$lang['register'] = 'नोंदणी'; $lang['profile'] = 'वापरकर्त्याची माहिती'; $lang['badlogin'] = 'माफ़ करा, वापरकर्ता नावात किंवा परवलीच्या शब्दात चूक झाली आहे.'; $lang['minoredit'] = 'छोटे बदल'; diff --git a/inc/lang/ne/lang.php b/inc/lang/ne/lang.php index 6c00610ea..11d9c01bd 100644 --- a/inc/lang/ne/lang.php +++ b/inc/lang/ne/lang.php @@ -47,6 +47,7 @@ $lang['btn_resendpwd'] = 'नयाँ प्रवेश शव्द( $lang['btn_draft'] = ' ड्राफ्ट सम्पादन गर्नुहोस् '; $lang['btn_recover'] = 'पहिलेको ड्राफ्ट हासिल गर्नुहोस '; $lang['btn_draftdel'] = ' ड्राफ्ट मेटाउनुहोस् '; +$lang['btn_register'] = 'दर्ता गर्नुहोस्'; $lang['loggedinas'] = 'प्रवेश गर्नुहोस् '; $lang['user'] = 'प्रयोगकर्ता '; $lang['pass'] = 'प्रवेशशव्द'; @@ -56,7 +57,6 @@ $lang['passchk'] = 'एकपटक पुन:'; $lang['remember'] = 'मलाई सम्झनु'; $lang['fullname'] = 'पूरा नाम'; $lang['email'] = 'इमेल'; -$lang['register'] = 'दर्ता गर्नुहोस्'; $lang['profile'] = 'प्रयोगकर्ताको प्रोफाइल'; $lang['badlogin'] = 'माफ गर्नुहोस् , प्रयोगकर्तानाम वा प्रवेशशव्द गलत भयो '; $lang['minoredit'] = 'सामान्य परिवर्तन'; diff --git a/inc/lang/nl/lang.php b/inc/lang/nl/lang.php index 9d81d0ff4..1ad653e78 100644 --- a/inc/lang/nl/lang.php +++ b/inc/lang/nl/lang.php @@ -55,6 +55,7 @@ $lang['btn_draft'] = 'Bewerk concept'; $lang['btn_recover'] = 'Herstel concept'; $lang['btn_draftdel'] = 'Verwijder concept'; $lang['btn_revert'] = 'Herstellen'; +$lang['btn_register'] = 'Registreren'; $lang['loggedinas'] = 'Ingelogd als'; $lang['user'] = 'Gebruikersnaam'; $lang['pass'] = 'Wachtwoord'; @@ -64,7 +65,6 @@ $lang['passchk'] = 'nogmaals'; $lang['remember'] = 'Bewaar'; $lang['fullname'] = 'Volledige naam'; $lang['email'] = 'E-mail'; -$lang['register'] = 'Registreren'; $lang['profile'] = 'Gebruikersprofiel'; $lang['badlogin'] = 'Sorry, gebruikersnaam of wachtwoord onjuist'; $lang['minoredit'] = 'Kleine wijziging'; diff --git a/inc/lang/no/lang.php b/inc/lang/no/lang.php index ca63c0094..a41cad51b 100644 --- a/inc/lang/no/lang.php +++ b/inc/lang/no/lang.php @@ -59,6 +59,7 @@ $lang['btn_draft'] = 'Rediger kladd'; $lang['btn_recover'] = 'Gjennvinn kladd'; $lang['btn_draftdel'] = 'Slett kladd'; $lang['btn_revert'] = 'Gjenopprette'; +$lang['btn_register'] = 'Registrer deg'; $lang['loggedinas'] = 'Innlogget som'; $lang['user'] = 'Brukernavn'; $lang['pass'] = 'Passord'; @@ -68,7 +69,6 @@ $lang['passchk'] = 'Bekreft passord'; $lang['remember'] = 'Husk meg'; $lang['fullname'] = 'Fullt navn'; $lang['email'] = 'E-post'; -$lang['register'] = 'Registrer deg'; $lang['profile'] = 'Brukerprofil'; $lang['badlogin'] = 'Ugyldig brukernavn og/eller passord.'; $lang['minoredit'] = 'Mindre endringer'; diff --git a/inc/lang/pl/lang.php b/inc/lang/pl/lang.php index 5a366fbb5..bc0509df3 100644 --- a/inc/lang/pl/lang.php +++ b/inc/lang/pl/lang.php @@ -51,6 +51,7 @@ $lang['btn_draft'] = 'Edytuj szkic'; $lang['btn_recover'] = 'Przywróć szkic'; $lang['btn_draftdel'] = 'Usuń szkic'; $lang['btn_revert'] = 'Przywróć'; +$lang['btn_register'] = 'Zarejestruj się!'; $lang['loggedinas'] = 'Zalogowany jako'; $lang['user'] = 'Użytkownik'; $lang['pass'] = 'Hasło'; @@ -60,7 +61,6 @@ $lang['passchk'] = 'Powtórz hasło'; $lang['remember'] = 'Zapamiętaj'; $lang['fullname'] = 'Imię i nazwisko'; $lang['email'] = 'E-mail'; -$lang['register'] = 'Zarejestruj się!'; $lang['profile'] = 'Profil użytkownika'; $lang['badlogin'] = 'Nazwa użytkownika lub hasło są nieprawidłowe.'; $lang['minoredit'] = 'Mniejsze zmiany'; diff --git a/inc/lang/pt-br/lang.php b/inc/lang/pt-br/lang.php index fb05361f0..b6f445012 100644 --- a/inc/lang/pt-br/lang.php +++ b/inc/lang/pt-br/lang.php @@ -58,6 +58,7 @@ $lang['btn_draft'] = 'Editar o rascunho'; $lang['btn_recover'] = 'Recuperar o rascunho'; $lang['btn_draftdel'] = 'Excluir o rascunho'; $lang['btn_revert'] = 'Restaure'; +$lang['btn_register'] = 'Registrar'; $lang['loggedinas'] = 'Autenticado(a) como'; $lang['user'] = 'Nome de usuário'; $lang['pass'] = 'Senha'; @@ -67,7 +68,6 @@ $lang['passchk'] = 'mais uma vez'; $lang['remember'] = 'Lembre-se de mim'; $lang['fullname'] = 'Nome completo'; $lang['email'] = 'E-mail'; -$lang['register'] = 'Registrar'; $lang['profile'] = 'Perfil do usuário'; $lang['badlogin'] = 'Desculpe, mas o nome de usuário ou a senha estão incorretos.'; $lang['minoredit'] = 'Alterações mínimas'; diff --git a/inc/lang/pt/lang.php b/inc/lang/pt/lang.php index 6b68c5fef..976077d40 100644 --- a/inc/lang/pt/lang.php +++ b/inc/lang/pt/lang.php @@ -48,6 +48,7 @@ $lang['btn_draft'] = 'Editar rascunho'; $lang['btn_recover'] = 'Recuperar rascunho'; $lang['btn_draftdel'] = 'Apagar rascunho'; $lang['btn_revert'] = 'Restaurar'; +$lang['btn_register'] = 'Registar'; $lang['loggedinas'] = 'Está em sessão como'; $lang['user'] = 'Utilizador'; $lang['pass'] = 'Senha'; @@ -57,7 +58,6 @@ $lang['passchk'] = 'Confirmar novamente'; $lang['remember'] = 'Memorizar?'; $lang['fullname'] = 'Nome completo'; $lang['email'] = 'Email'; -$lang['register'] = 'Registar'; $lang['profile'] = 'Perfil do Utilizador'; $lang['badlogin'] = 'O utilizador inválido ou senha inválida.'; $lang['minoredit'] = 'Alterações Menores'; diff --git a/inc/lang/ro/lang.php b/inc/lang/ro/lang.php index d21249d91..61e666765 100644 --- a/inc/lang/ro/lang.php +++ b/inc/lang/ro/lang.php @@ -50,6 +50,7 @@ $lang['btn_draft'] = 'Editează schiţă'; $lang['btn_recover'] = 'Recuperează schiţă'; $lang['btn_draftdel'] = 'Şterge schiţă'; $lang['btn_revert'] = 'Revenire'; +$lang['btn_register'] = 'Înregistrează'; $lang['loggedinas'] = 'Logat ca şi'; $lang['user'] = 'Utilizator'; $lang['pass'] = 'Parola'; @@ -59,7 +60,6 @@ $lang['passchk'] = 'încă o dată'; $lang['remember'] = 'Ţine-mă minte'; $lang['fullname'] = 'Nume complet'; $lang['email'] = 'E-Mail'; -$lang['register'] = 'Înregistrează'; $lang['profile'] = 'Profil Utilizator'; $lang['badlogin'] = 'Imi pare rău, utilizatorul şi/sau parola au fost greşite.'; $lang['minoredit'] = 'Modificare Minoră'; diff --git a/inc/lang/ru/lang.php b/inc/lang/ru/lang.php index 977f7fde4..1b599bc2f 100644 --- a/inc/lang/ru/lang.php +++ b/inc/lang/ru/lang.php @@ -59,6 +59,7 @@ $lang['btn_draft'] = 'Править черновик'; $lang['btn_recover'] = 'Восстановить черновик'; $lang['btn_draftdel'] = 'Удалить черновик'; $lang['btn_revert'] = 'Восстановить'; +$lang['btn_register'] = 'Зарегистрироваться'; $lang['loggedinas'] = 'Зашли как'; $lang['user'] = 'Логин'; $lang['pass'] = 'Пароль'; @@ -68,7 +69,6 @@ $lang['passchk'] = 'повторите'; $lang['remember'] = 'Запомнить меня'; $lang['fullname'] = 'Полное имя'; $lang['email'] = 'Эл. адрес'; -$lang['register'] = 'Зарегистрироваться'; $lang['profile'] = 'Профиль пользователя'; $lang['badlogin'] = 'Извините, неверное имя пользователя или пароль.'; $lang['minoredit'] = 'Небольшие изменения'; diff --git a/inc/lang/sk/lang.php b/inc/lang/sk/lang.php index dde10c543..eaef4b679 100644 --- a/inc/lang/sk/lang.php +++ b/inc/lang/sk/lang.php @@ -47,6 +47,7 @@ $lang['btn_draft'] = 'Upraviť koncept'; $lang['btn_recover'] = 'Obnoviť koncept'; $lang['btn_draftdel'] = 'Zmazať koncept'; $lang['btn_revert'] = 'Obnoviť'; +$lang['btn_register'] = 'Registrovať'; $lang['loggedinas'] = 'Prihlásený(á) ako'; $lang['user'] = 'Užívateľské meno'; $lang['pass'] = 'Heslo'; @@ -56,7 +57,6 @@ $lang['passchk'] = 'Ešte raz znovu'; $lang['remember'] = 'Zapamätaj si ma'; $lang['fullname'] = 'Celé meno'; $lang['email'] = 'E-Mail'; -$lang['register'] = 'Registrovať'; $lang['profile'] = 'Užívateľský profil'; $lang['badlogin'] = 'Zadané užívateľské meno a heslo nie je správne.'; $lang['minoredit'] = 'Menšie zmeny'; diff --git a/inc/lang/sl/lang.php b/inc/lang/sl/lang.php index ed6b6db81..41723f0ba 100644 --- a/inc/lang/sl/lang.php +++ b/inc/lang/sl/lang.php @@ -48,6 +48,7 @@ $lang['btn_draft'] = 'Uredi osnutek'; $lang['btn_recover'] = 'Obnovi osnutek'; $lang['btn_draftdel'] = 'Izbriši osnutek'; $lang['btn_revert'] = 'Povrni'; +$lang['btn_register'] = 'Vpis računa'; $lang['loggedinas'] = 'Prijava kot'; $lang['user'] = 'Uporabniško ime'; $lang['pass'] = 'Geslo'; @@ -57,7 +58,6 @@ $lang['passchk'] = 'znova'; $lang['remember'] = 'Zapomni si me'; $lang['fullname'] = 'Pravo ime'; $lang['email'] = 'Elektronski naslov'; -$lang['register'] = 'Vpis računa'; $lang['profile'] = 'Uporabniški profil'; $lang['badlogin'] = 'Uporabniško ime ali geslo je napačno.'; $lang['minoredit'] = 'Manjše spremembe'; diff --git a/inc/lang/sq/lang.php b/inc/lang/sq/lang.php index 0213ba28b..73290b687 100644 --- a/inc/lang/sq/lang.php +++ b/inc/lang/sq/lang.php @@ -49,6 +49,7 @@ $lang['btn_draft'] = 'Redakto skicën'; $lang['btn_recover'] = 'Rekupero skicën'; $lang['btn_draftdel'] = 'Fshi skicën'; $lang['btn_revert'] = 'Kthe si më parë'; +$lang['btn_register'] = 'Regjsitrohuni'; $lang['loggedinas'] = 'Regjistruar si '; $lang['user'] = 'Nofka e përdoruesit:'; $lang['pass'] = 'Fjalëkalimi'; @@ -58,7 +59,6 @@ $lang['passchk'] = 'Edhe një herë'; $lang['remember'] = 'Më mbaj mend'; $lang['fullname'] = 'Emri i vërtetë'; $lang['email'] = 'Adresa e email-it*'; -$lang['register'] = 'Regjsitrohuni'; $lang['profile'] = 'Profili i përdoruesit'; $lang['badlogin'] = 'Na vjen keq, emri ose fjalëkalimi është gabim.'; $lang['minoredit'] = 'Ndryshime të Vogla'; diff --git a/inc/lang/sr/lang.php b/inc/lang/sr/lang.php index 71dde4062..77eeb325b 100644 --- a/inc/lang/sr/lang.php +++ b/inc/lang/sr/lang.php @@ -47,6 +47,7 @@ $lang['btn_draft'] = 'Измени нацрт'; $lang['btn_recover'] = 'Опорави нацрт'; $lang['btn_draftdel'] = 'Обриши нацрт'; $lang['btn_revert'] = 'Врати на пређашњу верзију'; +$lang['btn_register'] = 'Региструј се'; $lang['loggedinas'] = 'Пријављен као'; $lang['user'] = 'Корисничко име'; $lang['pass'] = 'Лозинка'; @@ -56,7 +57,6 @@ $lang['passchk'] = 'поново'; $lang['remember'] = 'Запамти ме'; $lang['fullname'] = 'Име и презиме'; $lang['email'] = 'Е-адреса'; -$lang['register'] = 'Региструј се'; $lang['profile'] = 'Кориснички профил'; $lang['badlogin'] = 'Извините, није добро корисничко име или шифра.'; $lang['minoredit'] = 'Мала измена'; diff --git a/inc/lang/sv/lang.php b/inc/lang/sv/lang.php index 9308bc6c8..47b0e0b0d 100644 --- a/inc/lang/sv/lang.php +++ b/inc/lang/sv/lang.php @@ -56,6 +56,7 @@ $lang['btn_draft'] = 'Redigera utkast'; $lang['btn_recover'] = 'Återskapa utkast'; $lang['btn_draftdel'] = 'Radera utkast'; $lang['btn_revert'] = 'Återställ'; +$lang['btn_register'] = 'Registrera'; $lang['loggedinas'] = 'Inloggad som'; $lang['user'] = 'Användarnamn'; $lang['pass'] = 'Lösenord'; @@ -65,7 +66,6 @@ $lang['passchk'] = 'en gång till'; $lang['remember'] = 'Kom ihåg mig'; $lang['fullname'] = 'Namn'; $lang['email'] = 'E-post'; -$lang['register'] = 'Registrera'; $lang['profile'] = 'Användarprofil'; $lang['badlogin'] = 'Felaktigt användarnamn eller lösenord.'; $lang['minoredit'] = 'Små ändringar'; diff --git a/inc/lang/th/lang.php b/inc/lang/th/lang.php index ea27793b8..a878d1eaf 100644 --- a/inc/lang/th/lang.php +++ b/inc/lang/th/lang.php @@ -56,6 +56,7 @@ $lang['btn_draft'] = 'แก้ไขเอกสารฉบับ $lang['btn_recover'] = 'กู้คืนเอกสารฉบับร่าง'; $lang['btn_draftdel'] = 'ลบเอกสารฉบับร่าง'; $lang['btn_revert'] = 'กู้คืน'; +$lang['btn_register'] = 'สร้างบัญชีผู้ใช้'; $lang['loggedinas'] = 'ลงชื่อเข้าใช้เป็น'; $lang['user'] = 'ชื่อผู้ใช้:'; $lang['pass'] = 'รหัสผ่าน'; @@ -65,7 +66,6 @@ $lang['passchk'] = 'พิมพ์รหัสผ่านอี $lang['remember'] = 'จำชื่อและรหัสผ่าน'; $lang['fullname'] = 'ชื่อจริง:'; $lang['email'] = 'อีเมล:'; -$lang['register'] = 'สร้างบัญชีผู้ใช้'; $lang['profile'] = 'ข้อมูลส่วนตัวผู้ใช้'; $lang['badlogin'] = 'ขัดข้อง:'; $lang['minoredit'] = 'เป็นการแก้ไขเล็กน้อย'; diff --git a/inc/lang/tr/lang.php b/inc/lang/tr/lang.php index 0c8c1ff3f..0509113b0 100644 --- a/inc/lang/tr/lang.php +++ b/inc/lang/tr/lang.php @@ -48,6 +48,7 @@ $lang['btn_draft'] = 'Taslağı düzenle'; $lang['btn_recover'] = 'Taslağı geri yükle'; $lang['btn_draftdel'] = 'Taslağı sil'; $lang['btn_revert'] = 'Geri Yükle'; +$lang['btn_register'] = 'Kayıt ol'; $lang['loggedinas'] = 'Giriş ismi'; $lang['user'] = 'Kullanıcı ismi'; $lang['pass'] = 'Parola'; @@ -57,7 +58,6 @@ $lang['passchk'] = 'Bir kez daha girin'; $lang['remember'] = 'Beni hatırla'; $lang['fullname'] = 'Tam isim'; $lang['email'] = 'E-posta'; -$lang['register'] = 'Kayıt ol'; $lang['profile'] = 'Kullanıcı Bilgileri'; $lang['badlogin'] = 'Üzgünüz, Kullanıcı adı veya şifre yanlış oldu.'; $lang['minoredit'] = 'Küçük Değişiklikler'; diff --git a/inc/lang/uk/lang.php b/inc/lang/uk/lang.php index d3d5d7acf..9f5834881 100644 --- a/inc/lang/uk/lang.php +++ b/inc/lang/uk/lang.php @@ -49,6 +49,7 @@ $lang['btn_draft'] = 'Редагувати чернетку'; $lang['btn_recover'] = 'Відновити чернетку'; $lang['btn_draftdel'] = 'Знищити чернетку'; $lang['btn_revert'] = 'Відновити'; +$lang['btn_register'] = 'Реєстрація'; $lang['loggedinas'] = 'Ви'; $lang['user'] = 'Користувач'; $lang['pass'] = 'Пароль'; @@ -58,7 +59,6 @@ $lang['passchk'] = 'ще раз'; $lang['remember'] = 'Запам\'ятати мене'; $lang['fullname'] = 'Повне ім\'я'; $lang['email'] = 'E-Mail'; -$lang['register'] = 'Реєстрація'; $lang['profile'] = 'Профіль користувача'; $lang['badlogin'] = 'Вибачте, невірне ім\'я чи пароль.'; $lang['minoredit'] = 'Незначні зміни'; diff --git a/inc/lang/vi/lang.php b/inc/lang/vi/lang.php index 750433910..89c9e9cfc 100644 --- a/inc/lang/vi/lang.php +++ b/inc/lang/vi/lang.php @@ -27,6 +27,7 @@ $lang['btn_logout'] = 'Thoát'; $lang['btn_admin'] = 'Quản lý'; $lang['btn_update'] = 'Cập nhật'; $lang['btn_delete'] = 'Xoá'; +$lang['btn_register'] = 'Đăng ký'; $lang['loggedinas'] = 'Username đang dùng'; $lang['user'] = 'Username'; @@ -34,7 +35,6 @@ $lang['pass'] = 'Password'; $lang['remember'] = 'Lưu username/password lại'; $lang['fullname'] = 'Họ và tên'; $lang['email'] = 'E-Mail'; -$lang['register'] = 'Đăng ký'; $lang['badlogin'] = 'Username hoặc password không đúng.'; $lang['regmissing'] = 'Bạn cần điền vào tất cả các trường'; diff --git a/inc/lang/zh-tw/lang.php b/inc/lang/zh-tw/lang.php index 62996ea8a..90e111dde 100644 --- a/inc/lang/zh-tw/lang.php +++ b/inc/lang/zh-tw/lang.php @@ -50,6 +50,7 @@ $lang['btn_draft'] = '編輯草稿'; $lang['btn_recover'] = '復原草稿'; $lang['btn_draftdel'] = '捨棄草稿'; $lang['btn_revert'] = '復原'; +$lang['btn_register'] = '註冊'; $lang['loggedinas'] = '登入為'; $lang['user'] = '帳號'; $lang['pass'] = '密碼'; @@ -59,7 +60,6 @@ $lang['passchk'] = '確認密碼'; $lang['remember'] = '記住帳號密碼'; $lang['fullname'] = '真實姓名'; $lang['email'] = 'E-Mail'; -$lang['register'] = '註冊'; $lang['profile'] = '使用者個人資料'; $lang['badlogin'] = '很抱歉,您的使用者名稱或密碼可能有錯誤'; $lang['minoredit'] = '小修改'; diff --git a/inc/lang/zh/lang.php b/inc/lang/zh/lang.php index 52dda5986..d8749b5e0 100644 --- a/inc/lang/zh/lang.php +++ b/inc/lang/zh/lang.php @@ -52,6 +52,7 @@ $lang['btn_draft'] = '编辑草稿'; $lang['btn_recover'] = '恢复草稿'; $lang['btn_draftdel'] = '删除草稿'; $lang['btn_revert'] = '恢复'; +$lang['btn_register'] = '注册'; $lang['loggedinas'] = '登录为'; $lang['user'] = '用户名'; $lang['pass'] = '密码'; @@ -61,7 +62,6 @@ $lang['passchk'] = '请再输一次'; $lang['remember'] = '记住我'; $lang['fullname'] = '全名'; $lang['email'] = 'E-Mail'; -$lang['register'] = '注册'; $lang['profile'] = '用户信息'; $lang['badlogin'] = '对不起,用户名或密码错误。'; $lang['minoredit'] = '细微修改'; diff --git a/inc/template.php b/inc/template.php index 7ac3437fb..b873d818f 100644 --- a/inc/template.php +++ b/inc/template.php @@ -93,7 +93,7 @@ function tpl_content_core(){ break; case 'index': html_index($IDX); #FIXME can this be pulled from globals? is it sanitized correctly? - break; + break; case 'backlink': html_backlinks(); break; @@ -593,6 +593,16 @@ function tpl_get_action($type) { $type = 'logout'; } break; + case 'register': + if($_SERVER['REMOTE_USER']){ + return false; + } + break; + case 'resendpwd': + if($_SERVER['REMOTE_USER']){ + return false; + } + break; case 'admin': if(!$INFO['ismanager']){ return false; -- cgit v1.2.3 From 3240c7a0b3414f926ee76b2c4fff0a95ab33e916 Mon Sep 17 00:00:00 2001 From: Anika Henke Date: Sun, 20 Feb 2011 19:14:03 +0000 Subject: removed duplicate authors from language files --- inc/lang/bg/lang.php | 2 +- inc/lang/ca-valencia/lang.php | 1 - inc/lang/ca/lang.php | 2 -- inc/lang/cs/lang.php | 2 +- inc/lang/de/lang.php | 1 - inc/lang/eo/lang.php | 7 +------ inc/lang/es/lang.php | 3 +-- inc/lang/fa/lang.php | 1 - inc/lang/fi/lang.php | 1 - inc/lang/fo/lang.php | 2 +- inc/lang/fr/lang.php | 3 +-- inc/lang/he/lang.php | 1 - inc/lang/hu/lang.php | 2 -- inc/lang/it/lang.php | 8 +++----- inc/lang/km/lang.php | 3 --- inc/lang/ko/lang.php | 1 - inc/lang/lt/lang.php | 1 - inc/lang/mr/lang.php | 1 - inc/lang/ne/lang.php | 3 +-- inc/lang/nl/lang.php | 3 +-- inc/lang/no/lang.php | 5 ++--- inc/lang/pt-br/lang.php | 5 ++--- inc/lang/ro/lang.php | 3 --- inc/lang/ru/lang.php | 4 ++-- inc/lang/sq/lang.php | 2 +- inc/lang/sr/lang.php | 3 +-- inc/lang/sv/lang.php | 4 ++-- inc/lang/th/lang.php | 1 - inc/lang/uk/lang.php | 5 ++--- inc/lang/zh-tw/lang.php | 1 - inc/lang/zh/lang.php | 2 +- 31 files changed, 24 insertions(+), 59 deletions(-) (limited to 'inc') diff --git a/inc/lang/bg/lang.php b/inc/lang/bg/lang.php index a45615ed8..7bd93a4cc 100644 --- a/inc/lang/bg/lang.php +++ b/inc/lang/bg/lang.php @@ -5,7 +5,7 @@ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * @author Nikolay Vladimirov * @author Viktor Usunov - * @author Kiril neohidra@gmail.com + * @author Kiril */ $lang['encoding'] = 'utf-8'; $lang['direction'] = 'ltr'; diff --git a/inc/lang/ca-valencia/lang.php b/inc/lang/ca-valencia/lang.php index 04f7c32bf..c6a7dc27e 100644 --- a/inc/lang/ca-valencia/lang.php +++ b/inc/lang/ca-valencia/lang.php @@ -4,7 +4,6 @@ * * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * @author Bernat Arlandis i Mañó - * @author Bernat Arlandis * @author Bernat Arlandis */ $lang['encoding'] = 'utf-8'; diff --git a/inc/lang/ca/lang.php b/inc/lang/ca/lang.php index 8e627fc69..342257d11 100644 --- a/inc/lang/ca/lang.php +++ b/inc/lang/ca/lang.php @@ -5,8 +5,6 @@ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * @author Carles Bellver * @author Carles Bellver - * @author carles.bellver@gmail.com - * @author carles.bellver@cent.uji.es */ $lang['encoding'] = 'utf-8'; $lang['direction'] = 'ltr'; diff --git a/inc/lang/cs/lang.php b/inc/lang/cs/lang.php index 32d4692be..22aa00d7d 100644 --- a/inc/lang/cs/lang.php +++ b/inc/lang/cs/lang.php @@ -5,8 +5,8 @@ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * @author Bohumir Zamecnik * @author Tomas Valenta + * @author Tomas Valenta * @author Zbynek Krivka - * @author tomas@valenta.cz * @author Marek Sacha * @author Lefty */ diff --git a/inc/lang/de/lang.php b/inc/lang/de/lang.php index 4c5f642bb..3a3afdc16 100644 --- a/inc/lang/de/lang.php +++ b/inc/lang/de/lang.php @@ -15,7 +15,6 @@ * @author Arne Pelka * @author Dirk Einecke * @author Blitzi94@gmx.de - * @author Robert Bogenschneider * @author Robert Bogenschneider * @author Niels Lange * @author Christian Wichmann diff --git a/inc/lang/eo/lang.php b/inc/lang/eo/lang.php index dee12a670..305c080f1 100644 --- a/inc/lang/eo/lang.php +++ b/inc/lang/eo/lang.php @@ -4,16 +4,11 @@ * * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * @author Antono Vasiljev - * @author Felipe Castro + * @author Felipe Castro * @author Felipe Castro * @author Felipe Castro - * @author Felipe Castro - * @author Felipo Kastro * @author Robert Bogenschneider - * @author Erik Pedersen * @author Erik Pedersen - * @author Robert Bogenschneider - * @author Robert BOGENSCHNEIDER */ $lang['encoding'] = 'utf-8'; $lang['direction'] = 'ltr'; diff --git a/inc/lang/es/lang.php b/inc/lang/es/lang.php index b329ffff4..427f7e0a2 100644 --- a/inc/lang/es/lang.php +++ b/inc/lang/es/lang.php @@ -14,8 +14,7 @@ * @author oliver@samera.com.py * @author Enrico Nicoletto * @author Manuel Meco - * @author VictorCastelan - * @author Jordan Mero hack.jord@gmail.com + * @author Jordan Mero * @author Felipe Martinez * @author Javier Aranda * @author Zerial diff --git a/inc/lang/fa/lang.php b/inc/lang/fa/lang.php index cc79393bd..ceea28f8e 100644 --- a/inc/lang/fa/lang.php +++ b/inc/lang/fa/lang.php @@ -10,7 +10,6 @@ * @url http://svn.wikimedia.org/viewvc/mediawiki/trunk/phase3/languages/messages/MessagesFa.php?view=co * @author behrad eslamifar - * @author omidmr@gmail.com * @author Omid Mottaghi * @author Mohammad Reza Shoaei */ diff --git a/inc/lang/fi/lang.php b/inc/lang/fi/lang.php index 36bb1e911..bc52625e0 100644 --- a/inc/lang/fi/lang.php +++ b/inc/lang/fi/lang.php @@ -5,7 +5,6 @@ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * @author Petteri * @author Matti Pöllä - * @author otto@valjakko.net * @author Otto Vainio * @author Teemu Mattila */ diff --git a/inc/lang/fo/lang.php b/inc/lang/fo/lang.php index 8b1cd41e5..3d4d0455b 100644 --- a/inc/lang/fo/lang.php +++ b/inc/lang/fo/lang.php @@ -4,7 +4,7 @@ * * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * @author Poul J. Clementsen - * @author Einar Petersen einar.petersen@gmail.com + * @author Einar Petersen */ $lang['encoding'] = 'utf-8'; $lang['direction'] = 'ltr'; diff --git a/inc/lang/fr/lang.php b/inc/lang/fr/lang.php index da0ffdea0..40384fecb 100644 --- a/inc/lang/fr/lang.php +++ b/inc/lang/fr/lang.php @@ -12,7 +12,6 @@ * @author Stéphane Chamberland * @author Delassaux Julien * @author Maurice A. LeBlanc - * @author gb@isis.u-strasbg.fr * @author stephane.gully@gmail.com * @author Guillaume Turri * @author Erik Pedersen @@ -20,7 +19,7 @@ * @author Vincent Feltz * @author Philippe Bajoit * @author Florian Gaub - * @author Samuel Dorsaz samuel.dorsaz@novelion.net + * @author Samuel Dorsaz * @author Johan Guilbaud */ $lang['encoding'] = 'utf-8'; diff --git a/inc/lang/he/lang.php b/inc/lang/he/lang.php index 47940ef53..1a47ebcb8 100644 --- a/inc/lang/he/lang.php +++ b/inc/lang/he/lang.php @@ -6,7 +6,6 @@ * @link http://sourceforge.net/projects/hebdokuwiki/ * @author גיא שפר * @author Denis Simakov - * @author DoK * @author Dotan Kamber * @author Moshe Kaplan * @author Yaron Yogev diff --git a/inc/lang/hu/lang.php b/inc/lang/hu/lang.php index 9f318ffec..fc21d1c8b 100644 --- a/inc/lang/hu/lang.php +++ b/inc/lang/hu/lang.php @@ -5,10 +5,8 @@ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * @author Ziegler Gábor * @author Sandor TIHANYI - * @author Siaynoq Siaynoq * @author Siaynoq Mage * @author schilling.janos@gmail.com - * @author Szabó Dávid (szabo.david@gyumolcstarhely.hu) * @author Szabó Dávid */ $lang['encoding'] = 'utf-8'; diff --git a/inc/lang/it/lang.php b/inc/lang/it/lang.php index 99c09c710..682f5b8c2 100644 --- a/inc/lang/it/lang.php +++ b/inc/lang/it/lang.php @@ -4,16 +4,14 @@ * * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * @author Giorgio Vecchiocattivi - * @author Roberto Bolli + * @author Roberto Bolli [http://www.rbnet.it/] * @author Silvia Sargentoni * @author Diego Pierotto - * @author Diego Pierotto ita.translations@tiscali.it - * @author ita.translations@tiscali.it * @author Lorenzo Breda * @author snarchio@alice.it * @author robocap * @author Matteo Carnevali - * @author Osman Tekin osman.tekin93@hotmail.it + * @author Osman Tekin * @author Jacopo Corbetta */ $lang['encoding'] = 'utf-8'; @@ -248,7 +246,7 @@ $lang['i_enableacl'] = 'Abilita ACL (consigliato)'; $lang['i_superuser'] = 'Amministratore'; $lang['i_problems'] = 'Si sono verificati problemi durante l\'installazione, indicati di seguito. Non è possibile continuare finché non saranno risolti.'; $lang['i_modified'] = 'Per motivi di sicurezza questa procedura funziona solamente con un\'installazione Dokuwiki nuova e non modificata. -Prova a estrarre di nuovo i file dal pacchetto scaricato oppure consulta le +Prova a estrarre di nuovo i file dal pacchetto scaricato oppure consulta le istruzioni per l\'installazione di Dokuwiki'; $lang['i_funcna'] = 'La funzione PHP %s non è disponibile. Forse è stata disabilitata dal tuo provider per qualche motivo?'; $lang['i_phpver'] = 'La versione di PHP %s è inferiore a quella richiesta %s. Devi aggiornare l\'installazione di PHP.'; diff --git a/inc/lang/km/lang.php b/inc/lang/km/lang.php index 24dd67045..90cad3133 100644 --- a/inc/lang/km/lang.php +++ b/inc/lang/km/lang.php @@ -1,9 +1,6 @@ - * @author Anika Henke - * @author Matthias Grimm * @author Ratana Lim */ $lang['encoding'] = 'utf-8'; diff --git a/inc/lang/ko/lang.php b/inc/lang/ko/lang.php index 482d233bd..0b45c6ce0 100644 --- a/inc/lang/ko/lang.php +++ b/inc/lang/ko/lang.php @@ -7,7 +7,6 @@ * @author jk Lee * @author dongnak@gmail.com * @author Song Younghwan - * @author SONG Younghwan * @author Seung-Chul Yoo */ $lang['encoding'] = 'utf-8'; diff --git a/inc/lang/lt/lang.php b/inc/lang/lt/lang.php index ca2f2da6c..6ae5f6c73 100644 --- a/inc/lang/lt/lang.php +++ b/inc/lang/lt/lang.php @@ -7,7 +7,6 @@ * @author Edmondas Girkantas * @author Arūnas Vaitekūnas * @author audrius.klevas@gmail.com - * @author Arunas Vaitekunas */ $lang['encoding'] = 'utf-8'; $lang['direction'] = 'ltr'; diff --git a/inc/lang/mr/lang.php b/inc/lang/mr/lang.php index d00d6d841..d991d46cf 100644 --- a/inc/lang/mr/lang.php +++ b/inc/lang/mr/lang.php @@ -10,7 +10,6 @@ * @url http://svn.wikimedia.org/viewvc/mediawiki/trunk/phase3/languages/messages/MessagesMr.php?view=co * @author ghatothkach@hotmail.com * @author Padmanabh Kulkarni - * @author Padmanabh Kulkarni * @author shantanoo@gmail.com */ $lang['encoding'] = 'utf-8'; diff --git a/inc/lang/ne/lang.php b/inc/lang/ne/lang.php index 11d9c01bd..e5b30ceaf 100644 --- a/inc/lang/ne/lang.php +++ b/inc/lang/ne/lang.php @@ -3,8 +3,7 @@ * Nepali language file * * @author Saroj Kumar Dhakal - * @author SarojKumar Dhakal - * @author Saroj Dhakal + * @author Saroj Kumar Dhakal */ $lang['encoding'] = 'utf-8'; $lang['direction'] = 'ltr'; diff --git a/inc/lang/nl/lang.php b/inc/lang/nl/lang.php index 1ad653e78..95368223b 100644 --- a/inc/lang/nl/lang.php +++ b/inc/lang/nl/lang.php @@ -11,8 +11,7 @@ * @author John de Graaff * @author Dion Nicolaas * @author Danny Rotsaert - * @author Marijn Hofstra hofstra.m@gmail.com - * @author Matthias Carchon webmaster@c-mattic.be + * @author Matthias Carchon * @author Marijn Hofstra * @author Timon Van Overveldt */ diff --git a/inc/lang/no/lang.php b/inc/lang/no/lang.php index a41cad51b..d2be945e6 100644 --- a/inc/lang/no/lang.php +++ b/inc/lang/no/lang.php @@ -5,17 +5,16 @@ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * @author Reidar Mosvold * @author Jorge Barrera Grandon - * @author Rune Rasmussen http://www.syntaxerror.no/ + * @author Rune Rasmussen [http://www.syntaxerror.no/] * @author Thomas Nygreen * @author Arild Burud * @author Torkill Bruland * @author Rune M. Andersen - * @author Jakob Vad Nielsen (me@jakobnielsen.net) + * @author Jakob Vad Nielsen * @author Kjell Tore Næsgaard * @author Knut Staring * @author Lisa Ditlefsen * @author Erik Pedersen - * @author Erik Bjørn Pedersen */ $lang['encoding'] = 'utf-8'; $lang['direction'] = 'ltr'; diff --git a/inc/lang/pt-br/lang.php b/inc/lang/pt-br/lang.php index b6f445012..e3568b56b 100644 --- a/inc/lang/pt-br/lang.php +++ b/inc/lang/pt-br/lang.php @@ -13,10 +13,9 @@ * @author Jeferson Propheta * @author jair.henrique@gmail.com * @author Luis Dantas - * @author Frederico Guimarães - * @author Jair Henrique * @author Luis Dantas - * @author Sergio Motta sergio@cisne.com.br + * @author Jair Henrique + * @author Sergio Motta * @author Isaias Masiero Filho */ $lang['encoding'] = 'utf-8'; diff --git a/inc/lang/ro/lang.php b/inc/lang/ro/lang.php index 61e666765..f4a2210f0 100644 --- a/inc/lang/ro/lang.php +++ b/inc/lang/ro/lang.php @@ -5,11 +5,8 @@ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * @author Tiberiu Micu * @author Sergiu Baltariu - * @author s_baltariu@yahoo.com - * @author Emanuel-Emeric Andrasi * @author Emanuel-Emeric Andrași * @author Emanuel-Emeric Andraşi - * @author Emanuel-Emeric Andrasi */ $lang['encoding'] = 'utf-8'; $lang['direction'] = 'ltr'; diff --git a/inc/lang/ru/lang.php b/inc/lang/ru/lang.php index 1b599bc2f..1eaa488ec 100644 --- a/inc/lang/ru/lang.php +++ b/inc/lang/ru/lang.php @@ -8,10 +8,10 @@ * @author Denis Simakov * @author Kaens Bard * @author Andrew Pleshakov - * @author Змей Этерийский evil_snake@eternion.ru + * @author Змей Этерийский * @author Hikaru Nakajima * @author Alexei Tereschenko - * @author Irina Ponomareva irinaponomareva@webperfectionist.com + * @author Irina Ponomareva * @author Alexander Sorkin * @author Kirill Krasnov * @author Vlad Tsybenko diff --git a/inc/lang/sq/lang.php b/inc/lang/sq/lang.php index 73290b687..47a54d2ea 100644 --- a/inc/lang/sq/lang.php +++ b/inc/lang/sq/lang.php @@ -8,7 +8,7 @@ * lines starting with @author * * @url http://svn.wikimedia.org/viewvc/mediawiki/trunk/phase3/languages/messages/MessagesSq.php?view=co - * @author Leonard Elezi leonard.elezi@depinfo.info + * @author Leonard Elezi */ $lang['encoding'] = 'utf-8'; $lang['direction'] = 'ltr'; diff --git a/inc/lang/sr/lang.php b/inc/lang/sr/lang.php index 77eeb325b..b35956f03 100644 --- a/inc/lang/sr/lang.php +++ b/inc/lang/sr/lang.php @@ -4,8 +4,7 @@ * * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * @author Filip Brcic - * @author Иван Петровић petrovicivan@ubuntusrbija.org - * @author Ivan Petrovic + * @author Иван Петровић (Ivan Petrovic) * @author Miroslav Šolti */ $lang['encoding'] = 'utf-8'; diff --git a/inc/lang/sv/lang.php b/inc/lang/sv/lang.php index 47b0e0b0d..801e2d879 100644 --- a/inc/lang/sv/lang.php +++ b/inc/lang/sv/lang.php @@ -7,15 +7,15 @@ * @author Per Foreby * @author Nicklas Henriksson * @author Håkan Sandell + * @author Håkan Sandell * @author Dennis Karlsson * @author Tormod Otter Johansson + * @author Tormod Johansson * @author emil@sys.nu * @author Pontus Bergendahl - * @author Tormod Johansson tormod.otter.johansson@gmail.com * @author Emil Lind * @author Bogge Bogge * @author Peter Åström - * @author Håkan Sandell */ $lang['encoding'] = 'utf-8'; $lang['direction'] = 'ltr'; diff --git a/inc/lang/th/lang.php b/inc/lang/th/lang.php index a878d1eaf..d40f30f4a 100644 --- a/inc/lang/th/lang.php +++ b/inc/lang/th/lang.php @@ -9,7 +9,6 @@ * * @url http://svn.wikimedia.org/viewvc/mediawiki/trunk/phase3/languages/messages/MessagesTh.php?view=co * @author Komgrit Niyomrath - * @author Kittithat Arnontavilas mrtomyum@gmail.com * @author Arthit Suriyawongkul * @author Kittithat Arnontavilas * @author Thanasak Sompaisansin diff --git a/inc/lang/uk/lang.php b/inc/lang/uk/lang.php index 9f5834881..e5f14879f 100644 --- a/inc/lang/uk/lang.php +++ b/inc/lang/uk/lang.php @@ -5,10 +5,9 @@ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * @author Oleksiy Voronin * @author serg_stetsuk@ukr.net - * @author okunia@gmail.com * @author Oleksandr Kunytsia - * @author Uko uko@uar.net - * @author Ulrikhe Lukoie .com + * @author Uko + * @author Ulrikhe Lukoie */ $lang['encoding'] = 'utf-8'; $lang['direction'] = 'ltr'; diff --git a/inc/lang/zh-tw/lang.php b/inc/lang/zh-tw/lang.php index 90e111dde..5bf790a00 100644 --- a/inc/lang/zh-tw/lang.php +++ b/inc/lang/zh-tw/lang.php @@ -7,7 +7,6 @@ * @author Li-Jiun Huang * @author http://www.chinese-tools.com/tools/converter-simptrad.html * @author Wayne San - * @author Li-Jiun Huang * @author Cheng-Wei Chien * @author Danny Lin */ diff --git a/inc/lang/zh/lang.php b/inc/lang/zh/lang.php index d8749b5e0..ea677ac2e 100644 --- a/inc/lang/zh/lang.php +++ b/inc/lang/zh/lang.php @@ -5,7 +5,7 @@ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * @author ZDYX * @author http://www.chinese-tools.com/tools/converter-tradsimp.html - * @author George Sheraton guxd@163.com + * @author George Sheraton * @author Simon zhan * @author mr.jinyi@gmail.com * @author ben -- cgit v1.2.3 From d2437563b7573fdac463306c9e25cc24b3d80e0e Mon Sep 17 00:00:00 2001 From: Marijn Hofstra Date: Mon, 21 Feb 2011 18:50:35 +0100 Subject: Dutch language update --- inc/lang/nl/lang.php | 3 +++ 1 file changed, 3 insertions(+) (limited to 'inc') diff --git a/inc/lang/nl/lang.php b/inc/lang/nl/lang.php index 9d81d0ff4..411fdc844 100644 --- a/inc/lang/nl/lang.php +++ b/inc/lang/nl/lang.php @@ -167,6 +167,9 @@ $lang['yours'] = 'Jouw versie'; $lang['diff'] = 'Toon verschillen met huidige revisie'; $lang['diff2'] = 'Toon verschillen tussen geselecteerde revisies'; $lang['difflink'] = 'Link naar deze vergelijking'; +$lang['diff_type'] = 'Bekijk verschillen:'; +$lang['diff_inline'] = 'Inline'; +$lang['diff_side'] = 'Zij aan zij'; $lang['line'] = 'Regel'; $lang['breadcrumb'] = 'Spoor'; $lang['youarehere'] = 'Je bent hier'; -- cgit v1.2.3 From 84a355b61e53b5d8969c030679612a7b456777e9 Mon Sep 17 00:00:00 2001 From: Kiril Velikov Date: Mon, 21 Feb 2011 18:51:36 +0100 Subject: Bulgarian language update --- inc/lang/bg/admin.txt | 2 +- inc/lang/bg/backlinks.txt | 2 +- inc/lang/bg/denied.txt | 2 +- inc/lang/bg/draft.txt | 2 +- inc/lang/bg/install.html | 13 ++--- inc/lang/bg/lang.php | 127 ++++++++++++++++++++++++++---------------- inc/lang/bg/login.txt | 2 +- inc/lang/bg/mailtext.txt | 18 +++--- inc/lang/bg/newpage.txt | 2 +- inc/lang/bg/password.txt | 6 +- inc/lang/bg/pwconfirm.txt | 2 +- inc/lang/bg/read.txt | 2 +- inc/lang/bg/recent.txt | 2 +- inc/lang/bg/register.txt | 4 +- inc/lang/bg/registermail.txt | 16 +++--- inc/lang/bg/resendpwd.txt | 2 +- inc/lang/bg/stopwords.txt | 4 +- inc/lang/bg/subscr_digest.txt | 18 ++++++ inc/lang/bg/subscr_form.txt | 3 + inc/lang/bg/subscr_list.txt | 15 +++++ inc/lang/bg/subscr_single.txt | 22 ++++++++ inc/lang/bg/uploadmail.txt | 18 +++--- 22 files changed, 187 insertions(+), 97 deletions(-) create mode 100644 inc/lang/bg/subscr_digest.txt create mode 100644 inc/lang/bg/subscr_form.txt create mode 100644 inc/lang/bg/subscr_list.txt create mode 100644 inc/lang/bg/subscr_single.txt (limited to 'inc') diff --git a/inc/lang/bg/admin.txt b/inc/lang/bg/admin.txt index 8958997ae..d3c14a0da 100644 --- a/inc/lang/bg/admin.txt +++ b/inc/lang/bg/admin.txt @@ -1,3 +1,3 @@ ====== Администриране ====== -Долу ще намерите списъка с администраторски задачи в DokuWiki. \ No newline at end of file +Отдолу ще намерите списъка с администраторските задачи в DokuWiki. \ No newline at end of file diff --git a/inc/lang/bg/backlinks.txt b/inc/lang/bg/backlinks.txt index 70cb81dc3..dd633d94d 100644 --- a/inc/lang/bg/backlinks.txt +++ b/inc/lang/bg/backlinks.txt @@ -1,3 +1,3 @@ ====== Обратни препратки ====== -Това е списък на страници, които препращат обратно към текущата страница. +Това е списък на страниците, които препращат обратно към текущата страница. diff --git a/inc/lang/bg/denied.txt b/inc/lang/bg/denied.txt index 91a576077..45ce63769 100644 --- a/inc/lang/bg/denied.txt +++ b/inc/lang/bg/denied.txt @@ -1,4 +1,4 @@ ====== Отказан достъп ====== -Нямате достатъчно права да продължите. Може би сте забравили да се впишете? +Нямате достатъчно права, за да продължите. Може би сте забравили да се впишете? diff --git a/inc/lang/bg/draft.txt b/inc/lang/bg/draft.txt index 6d269a72f..a59201130 100644 --- a/inc/lang/bg/draft.txt +++ b/inc/lang/bg/draft.txt @@ -1,6 +1,6 @@ ====== Намерена чернова ====== -Последната редакционна сесия на страницата не е завършена правилно. Dokuwiki автоматично запазва чернова по време на редактирането, която може сега да ползвате, за да продължите работата си. Долу може да видите данните, които бяха запазени от последната сесия. +Последната редакционна сесия на страницата не е завършена правилно. Dokuwiki автоматично запазва чернова по време на редактирането, която можете да ползвате сега, за да продължите работата си. Отдолу може да видите данните, които бяха запазени от последната сесия. Моля решете, дали искате да //възстановите// последната си редакционна сесия, //изтриете// автоматично запазената чернова или //откажете// редакцията. diff --git a/inc/lang/bg/install.html b/inc/lang/bg/install.html index 392235ecd..6dde7e4ce 100644 --- a/inc/lang/bg/install.html +++ b/inc/lang/bg/install.html @@ -1,19 +1,18 @@

Страницата помага при първа инсталация и настройване на Dokuwiki. Повече информация -за инсталатора е достъпна в неговата собствена -документация.

+за инсталатора ще намерите в документацията му.

Dokuwiki ползва обикновени файлове за хранилище на страниците и друга информация свързана с тях (примерно картинки, търсене, стари версии, и др.). -За да използвате успешно DokuWiki -трябва да имате право за писане в директориите, които съдържат тези +За да функционира нормално DokuWiki +трябва да има право за писане в директориите, които съдържат тези файлове. Инсталаторът не може да настройва правата на директориите. Обикновено трябва да направите това директно от командният ред или ако ползвате хостинг - през FTP или контролния панела на хоста (примерно cPanel).

Инсталаторът ще настрои вашата DokuWiki конфигурация на -ACL, което ще позволи на администратора да се впише и ползва администраторското меню в DokuWiki за инсталиране на приставки, контролира -на потребители, управлява достъпа до страниците и променя останалите настройки. Това не е необходимо за функционирането на DokuWiki, но направи администрирането на DokuWiki по-лесно.

+ACL, което ще позволи на администратора да се впише и ползва администраторското меню в DokuWiki за инсталиране на приставки, контрол +на потребители, управление на достъпа до страниците и промяна на останалите настройки. Това не е необходимо за функционирането на DokuWiki, но направи администрирането на DokuWiki по-лесно.

-

Опитните потребители или потребителите със специални изисквания към настройките могат да ползват тези връзки за информация относно инсталацията +

Опитните потребители или потребителите със специални изисквания към настройките имат на разположение информация относно инсталацията и настройките.

diff --git a/inc/lang/bg/lang.php b/inc/lang/bg/lang.php index d3e86c41d..b95b0b72c 100644 --- a/inc/lang/bg/lang.php +++ b/inc/lang/bg/lang.php @@ -5,7 +5,7 @@ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * @author Nikolay Vladimirov * @author Viktor Usunov - * @author Kiril neohidra@gmail.com + * @author Kiril */ $lang['encoding'] = 'utf-8'; $lang['direction'] = 'ltr'; @@ -25,7 +25,7 @@ $lang['btn_top'] = 'Към началото'; $lang['btn_newer'] = '<< по-нови'; $lang['btn_older'] = 'по-стари >>'; $lang['btn_revs'] = 'История'; -$lang['btn_recent'] = 'Последни промени'; +$lang['btn_recent'] = 'Скорошни промени'; $lang['btn_upload'] = 'Качване'; $lang['btn_cancel'] = 'Отказ'; $lang['btn_index'] = 'Индекс'; @@ -33,12 +33,12 @@ $lang['btn_secedit'] = 'Редактиране'; $lang['btn_login'] = 'Вписване'; $lang['btn_logout'] = 'Отписване'; $lang['btn_admin'] = 'Настройки'; -$lang['btn_update'] = 'Обновяване'; +$lang['btn_update'] = 'Актуализиране'; $lang['btn_delete'] = 'Изтриване'; $lang['btn_back'] = 'Назад'; $lang['btn_backlink'] = 'Обратни препратки'; -$lang['btn_backtomedia'] = 'Назад към избор на медиен файл'; -$lang['btn_subscribe'] = 'Абониране за Промени'; +$lang['btn_backtomedia'] = 'Назад към избора на медиен файл'; +$lang['btn_subscribe'] = 'Абонаменти'; $lang['btn_profile'] = 'Профил'; $lang['btn_reset'] = 'Изчистване'; $lang['btn_resendpwd'] = 'Пращане на нова парола'; @@ -46,6 +46,7 @@ $lang['btn_draft'] = 'Редактиране на чернова'; $lang['btn_recover'] = 'Възстановяване на чернова'; $lang['btn_draftdel'] = 'Изтриване на чернова'; $lang['btn_revert'] = 'Възстановяване'; +$lang['register'] = 'Регистриране'; $lang['loggedinas'] = 'Вписани сте като'; $lang['user'] = 'Потребител'; $lang['pass'] = 'Парола'; @@ -53,74 +54,87 @@ $lang['newpass'] = 'Нова парола'; $lang['oldpass'] = 'Потвърждение на текуща парола'; $lang['passchk'] = 'още веднъж'; $lang['remember'] = 'Запомни ме'; -$lang['fullname'] = 'Пълно име'; +$lang['fullname'] = 'Истинско име'; $lang['email'] = 'Електронна поща'; -$lang['register'] = 'Регистриране'; $lang['profile'] = 'Потребителски профил'; -$lang['badlogin'] = 'Грешно потребителско име или парола'; +$lang['badlogin'] = 'Грешно потребителско име или парола.'; $lang['minoredit'] = 'Незначителни промени'; -$lang['draftdate'] = 'Черновата бе автоматично записана на'; +$lang['draftdate'] = 'Черновата е автоматично записана на'; $lang['nosecedit'] = 'Страницата бе междувременно променена, презареждане на страницата поради неактуална информация.'; $lang['regmissing'] = 'Моля, попълнете всички полета.'; $lang['reguexists'] = 'Вече съществува потребител с избраното име.'; -$lang['regsuccess'] = 'Потребителят бе създаден и паролата бе пратена по електронната поща.'; -$lang['regsuccess2'] = 'Потребителят бе създаден.'; +$lang['regsuccess'] = 'Потребителят е създаден, а паролата е пратена по електронната поща.'; +$lang['regsuccess2'] = 'Потребителят е създаден.'; $lang['regmailfail'] = 'Изглежда, че има проблем с пращането на писмото с паролата. Моля, свържете се с администратора!'; $lang['regbadmail'] = 'Въведеният адрес изглежда невалиден - ако мислите, че това е грешка, свържете се с администратора.'; $lang['regbadpass'] = 'Двете въведени пароли не съвпадат, моля опитайте отново.'; -$lang['regpwmail'] = 'Парола за DokuWiki'; +$lang['regpwmail'] = 'Паролата ви за DokuWiki'; $lang['reghere'] = 'Все още нямате профил? Направете си'; -$lang['profna'] = 'Това Wiki не поддържа промяна на профила'; +$lang['profna'] = 'Wiki-то не поддържа промяна на профила'; $lang['profnochange'] = 'Няма промени.'; -$lang['profnoempty'] = 'Въвеждането на име и ел. поща. е задължително'; -$lang['profchanged'] = 'Потребителският профил бе успешно обновен.'; +$lang['profnoempty'] = 'Въвеждането на име и ел. поща е задължително'; +$lang['profchanged'] = 'Потребителският профил е обновен успешно.'; $lang['pwdforget'] = 'Забравили сте паролата си? Получете нова'; -$lang['resendna'] = 'Това Wiki не поддържа повторно пращане на паролата.'; +$lang['resendna'] = 'Wiki-то не поддържа повторно пращане на паролата.'; $lang['resendpwd'] = 'Изпращане на нова парола за'; $lang['resendpwdmissing'] = 'Моля, попълнете всички полета.'; -$lang['resendpwdnouser'] = 'Потребителят не бе намерен в базата от данни.'; -$lang['resendpwdbadauth'] = 'Кодът за потвърждение е невалиден. Проверете дали сте използвали целият линк за потвърждение.'; -$lang['resendpwdconfirm'] = 'Линк за потвърждение бе пратен по електронната поща.'; -$lang['resendpwdsuccess'] = 'Паролата ви бе изпратена по електронната поща.'; -$lang['license'] = 'Освен ако не е посочено друго, съдържанието на това Wiki е лицензирано под следния лиценз:'; -$lang['licenseok'] = 'Имайте предвид, че при редактиране на страницата, Вие се съгласявате да лицензирате промените (които сте направили) под следния лиценз:'; +$lang['resendpwdnouser'] = 'Потребителят не е намерен в базата от данни.'; +$lang['resendpwdbadauth'] = 'Кодът за потвърждение е невалиден. Проверете дали сте използвали целия линк за потвърждение.'; +$lang['resendpwdconfirm'] = 'Линк за потвърждение е пратен по електронната поща.'; +$lang['resendpwdsuccess'] = 'Новата ви паролата е пратена по електронната поща.'; +$lang['license'] = 'Ако не е посочено друго, съдържанието на Wiki-то е лицензирано под следния лиценз:'; +$lang['licenseok'] = 'Бележка: Редактирайки страницата, вие се съгласявате да лицензирате промените (които сте направили) под следния лиценз:'; $lang['searchmedia'] = 'Търсене на файл: '; $lang['searchmedia_in'] = 'Търсене в %s'; $lang['txt_upload'] = 'Изберете файл за качване'; -$lang['txt_filename'] = 'Качване като (незадължително)'; +$lang['txt_filename'] = 'Качи като (незадължително)'; $lang['txt_overwrt'] = 'Презапиши съществуващите файлове'; $lang['lockedby'] = 'В момента е заключена от'; $lang['lockexpire'] = 'Ще бъде отключена на'; -$lang['willexpire'] = 'Страницата ще бъде отключена за редактиране след минута.\nЗа да избегнете конфликт, ползвайте бутон "Преглед", за рестартиране на брояча за заключване.'; +$lang['willexpire'] = 'Страницата ще бъде отключена за редактиране след минута.\nЗа предотвратяване на конфликти, ползвайте бутона "Преглед", за рестартиране на брояча за заключване.'; $lang['js']['notsavedyet'] = 'Незаписаните промени ще бъдат загубени. Желаете ли да продължите?'; $lang['js']['searchmedia'] = 'Търсене на файлове'; $lang['js']['keepopen'] = 'Без затваряне на прозореца след избор'; $lang['js']['hidedetails'] = 'Без подробности'; +$lang['js']['mediatitle'] = 'Настройки на препратката'; +$lang['js']['mediadisplay'] = 'Тип на препратката'; +$lang['js']['mediaalign'] = 'Подреждане'; $lang['js']['mediasize'] = 'Размер на изображението'; +$lang['js']['mediatarget'] = 'Препращане към'; $lang['js']['mediaclose'] = 'Затваряне'; $lang['js']['mediainsert'] = 'Вмъкване'; +$lang['js']['mediadisplayimg'] = 'Показвай изображението.'; +$lang['js']['mediadisplaylnk'] = 'Показвай само препратката.'; $lang['js']['mediasmall'] = 'Малка версия'; $lang['js']['mediamedium'] = 'Средна версия'; $lang['js']['medialarge'] = 'Голяма версия'; $lang['js']['mediaoriginal'] = 'Оригинална версия'; +$lang['js']['medialnk'] = 'Препратка към подробна страница'; +$lang['js']['mediadirect'] = 'Директна препратка към оригинала'; +$lang['js']['medianolnk'] = 'Без препратка'; +$lang['js']['medianolink'] = 'Без препратка към изображението'; +$lang['js']['medialeft'] = 'Подреди изображението отляво.'; +$lang['js']['mediaright'] = 'Подреди изображението отдясно.'; +$lang['js']['mediacenter'] = 'Подреди изображението по средата.'; +$lang['js']['medianoalign'] = 'Без подреждане.'; $lang['js']['nosmblinks'] = 'Връзките към Windows shares работят само под Internet Explorer. Можете да копирате и поставите връзката.'; -$lang['js']['linkwiz'] = 'Съветник за препратки'; +$lang['js']['linkwiz'] = 'Помощник за препратки'; $lang['js']['linkto'] = 'Препратка към: '; $lang['js']['del_confirm'] = 'Да бъдат ли изтрити избраните елементи?'; $lang['js']['mu_btn'] = 'Качване на няколко файла наведнъж'; -$lang['rssfailed'] = 'Възникна грешка при вземането на този feed: '; -$lang['nothingfound'] = 'Не е открито нищо.'; +$lang['rssfailed'] = 'Възникна грешка при получаването на емисията: '; +$lang['nothingfound'] = 'Нищо не е открито.'; $lang['mediaselect'] = 'Медийни файлове'; $lang['fileupload'] = 'Качване на медийни файлове'; -$lang['uploadsucc'] = 'Качването бе успешно'; -$lang['uploadfail'] = 'Качването бе неуспешно. Може би поради грешни права?'; -$lang['uploadwrong'] = 'Качването бе отказано. Това файлово разширение е забранено!'; -$lang['uploadexist'] = 'Файлът вече съществува. Нищо не бе направено.'; +$lang['uploadsucc'] = 'Качването е успешно'; +$lang['uploadfail'] = 'Качването се провали. Може би поради грешни права?'; +$lang['uploadwrong'] = 'Качването е отказано. Файлово разширение е забранено!'; +$lang['uploadexist'] = 'Файлът вече съществува. Нищо не е направено.'; $lang['uploadbadcontent'] = 'Каченото съдържание не съответства на файлово разширение %s .'; -$lang['uploadspam'] = 'Качването бе блокирано от SPAM списъка.'; -$lang['uploadxss'] = 'Качването бе блокирано, заради възможно зловредно съдържание.'; -$lang['uploadsize'] = 'Файльт за качване бе прекалено голям. (макс. %s)'; +$lang['uploadspam'] = 'Качването е блокирано от SPAM списъка.'; +$lang['uploadxss'] = 'Качването е блокирано, поради възможно зловредно съдържание.'; +$lang['uploadsize'] = 'Файльт за качване е прекалено голям. (макс. %s)'; $lang['deletesucc'] = 'Файлът "%s" бе изтрит.'; $lang['deletefail'] = '"%s" не може да бъде изтрит - проверете правата.'; $lang['mediainuse'] = 'Файлът "%s" не бе изтрит - все още се ползва.'; @@ -130,8 +144,8 @@ $lang['accessdenied'] = 'Нямате разрешение да пре $lang['mediausage'] = 'Ползвайте следния синтаксис, за да упоменете файла:'; $lang['mediaview'] = 'Преглед на оригиналния файл'; $lang['mediaroot'] = 'root'; -$lang['mediaupload'] = 'Качете файл в текущото именно пространство. За създаване на подимено пространство, добавите името му преди това на файла и да ги разделите с двоеточие в полето "Качване като"'; -$lang['mediaextchange'] = 'Разширението на файла бе сменено от .%s на .%s!'; +$lang['mediaupload'] = 'Качете файл в текущото именно пространство. За създаване на подимено пространство, добавете име преди това на файла като ги разделите с двоеточие в полето "Качи като"'; +$lang['mediaextchange'] = 'Разширението на файла е сменено от .%s на .%s!'; $lang['reference'] = 'Връзки за'; $lang['ref_inuse'] = 'Файлът не може да бъде изтрит, защото все още се ползва от следните страници:'; $lang['ref_hidden'] = 'Някои връзки са към страници, които нямате права да четете'; @@ -143,6 +157,9 @@ $lang['yours'] = 'Вашата версия'; $lang['diff'] = 'Преглед на разликите с текущата версия'; $lang['diff2'] = 'Показване на разликите между избрани версии'; $lang['difflink'] = 'Препратка към сравнението на версиите'; +$lang['diff_type'] = 'Преглед на разликите:'; +$lang['diff_inline'] = 'Вграден'; +$lang['diff_side'] = 'Един до друг'; $lang['line'] = 'Ред'; $lang['breadcrumb'] = 'Следа'; $lang['youarehere'] = 'Намирате се в'; @@ -187,8 +204,8 @@ $lang['qb_chars'] = 'Специални знаци'; $lang['upperns'] = 'към майчиното именно пространство'; $lang['admin_register'] = 'Добавяне на нов потребител'; $lang['metaedit'] = 'Редактиране на метаданни'; -$lang['metasaveerr'] = 'Метаданните не бяха запазени'; -$lang['metasaveok'] = 'Метаданните бяха запазени успешно'; +$lang['metasaveerr'] = 'Записването на метаданните се провали'; +$lang['metasaveok'] = 'Метаданните са запазени успешно'; $lang['img_backto'] = 'Назад към'; $lang['img_title'] = 'Заглавие'; $lang['img_caption'] = 'Надпис'; @@ -200,6 +217,22 @@ $lang['img_copyr'] = 'Авторско право'; $lang['img_format'] = 'Формат'; $lang['img_camera'] = 'Фотоапарат'; $lang['img_keywords'] = 'Ключови думи'; +$lang['subscr_subscribe_success'] = '%s е добавен към списъка с абониралите се за %s'; +$lang['subscr_subscribe_error'] = 'Грешка при добавянето на %s към списъка с абониралите се за %s'; +$lang['subscr_subscribe_noaddress'] = 'Добавянето ви към списъка с абонати не е възможно поради липсата на свързан адрес (на ел. поща) с профила ви.'; +$lang['subscr_unsubscribe_success'] = '%s е премахнат от списъка с абониралите се за %s'; +$lang['subscr_unsubscribe_error'] = 'Грешка при премахването на %s от списъка с абониралите се за %s'; +$lang['subscr_already_subscribed'] = '%s е вече абониран за %s'; +$lang['subscr_not_subscribed'] = '%s не е абониран за %s'; +$lang['subscr_m_not_subscribed'] = 'Не сте абониран за текущата страницата или именно пространство.'; +$lang['subscr_m_new_header'] = 'Добави абонамент'; +$lang['subscr_m_current_header'] = 'Текущи абонаменти'; +$lang['subscr_m_unsubscribe'] = 'Прекратяване на абонамента'; +$lang['subscr_m_subscribe'] = 'Абониране'; +$lang['subscr_m_receive'] = 'Получаване'; +$lang['subscr_style_every'] = 'на ел. писмо при всяка промяна'; +$lang['subscr_style_digest'] = 'на ел. писмо с обобщение на промените във всяка страница (всеки %.2f дни)'; +$lang['subscr_style_list'] = 'на списък с променените страници от последното ел. писмо (всеки %.2f дни)'; $lang['authmodfailed'] = 'Лоша настройки за удостоверяване. Моля, уведомете администратора на Wiki страницата.'; $lang['authtempfail'] = 'Удостоверяването на потребители не е възможно за момента. Ако продължи дълго, моля уведомете администратора на Wiki страницата.'; $lang['i_chooselang'] = 'Изберете вашия изик'; @@ -210,23 +243,23 @@ $lang['i_superuser'] = 'Супер потребител'; $lang['i_problems'] = 'Открити са проблеми, които възпрепятстват инсталирането. Ще можете да продължите след като отстраните долуизброените проблеми.'; $lang['i_modified'] = 'Поради мерки за сигурност скрипта ще работи само с нова и непроменена инсталация на Dokuwiki. Трябва да разархивирате отново файловете от сваления архив или да се посъветвате с Инструкциите за инсталация на Dokuwiki.'; $lang['i_funcna'] = 'PHP функцията %s не е достъпна. Може би е забранена от доставчика на хостинг.'; -$lang['i_phpver'] = 'Вашата PHP версия %s е по-стара от необходимата %s. Обновете PHP инсталацията си.'; +$lang['i_phpver'] = 'Инсталираната версия %s на PHP е по-стара от необходимата %s. Актуализирайте PHP инсталацията.'; $lang['i_permfail'] = '%s не е достъпна за писане от DokuWiki. Трябва да промените правата за достъп до директорията!'; $lang['i_confexists'] = '%s вече съществува'; $lang['i_writeerr'] = '%s не можа да бъде създаден. Трябва да проверите правата за достъп до директорията/файла и да създадете файла ръчно.'; $lang['i_badhash'] = 'Файлът dokuwiki.php не може да бъде разпознат или е променен (hash=%s)'; $lang['i_badval'] = '%s - непозволена или празна стойност'; $lang['i_success'] = 'Настройването приключи успешно. Вече можете да изтриете файла install.php. Продължете към Вашето ново DokuWiki.'; -$lang['i_failure'] = 'Възникнаха грешки при записването на файловете с настройки. Вероятно ще се наложи да ги поправите ръчно, за да можете да ползвате Вашето ново DokuWiki.'; +$lang['i_failure'] = 'Възникнаха грешки при записването на файловете с настройки. Вероятно ще се наложи да ги поправите ръчно, за да можете да ползвате Вашето ново DokuWiki.'; $lang['i_policy'] = 'Първоначална политика за достъп'; $lang['i_pol0'] = 'Отворено Wiki (всеки може да чете, пише и качва)'; -$lang['i_pol1'] = 'Публично Wiki (всеки може да чете, само регистрирани могат да пишат и качват)'; -$lang['i_pol2'] = 'Затворено Wiki (само регистрирани могат четат, пишат и качват)'; +$lang['i_pol1'] = 'Публично Wiki (всеки може да чете, само регистрирани пишат и качват)'; +$lang['i_pol2'] = 'Затворено Wiki (само регистрирани четат, пишат и качват)'; $lang['i_retry'] = 'Повторен опит'; -$lang['i_license'] = 'Моля, изберете лиценз под който желаете да публикувате съдържанието'; -$lang['mu_intro'] = 'От тук можете да качите няколко файла наведнъж. Натиснете бутон "Избиране", изберете файлове и натиснете "Качи". +$lang['i_license'] = 'Моля, изберете лиценз под който желаете да публикувате съдържанието:'; +$lang['mu_intro'] = 'От тук можете да качите няколко файла наведнъж. Натиснете бутона "Избиране", изберете файлове и натиснете "Качване". '; -$lang['mu_gridname'] = 'Име на файл'; +$lang['mu_gridname'] = 'Име на файла'; $lang['mu_gridsize'] = 'Големина'; $lang['mu_gridstat'] = 'Състояние'; $lang['mu_namespace'] = 'Именно пространство'; @@ -242,10 +275,10 @@ $lang['mu_info'] = 'качени файла.'; $lang['mu_lasterr'] = 'Последна грешка:'; $lang['recent_global'] = 'В момента преглеждате промените в именно пространство %s. Може да прегледате и промените в цялото Wiki.'; $lang['years'] = 'преди %d години'; -$lang['months'] = 'преди %d месеци'; +$lang['months'] = 'преди %d месеца'; $lang['weeks'] = 'преди %d седмици'; $lang['days'] = 'преди %d дни'; $lang['hours'] = 'преди %d часа'; $lang['minutes'] = 'преди %d минути'; $lang['seconds'] = 'преди %d секунди'; -$lang['wordblock'] = 'Направените от вас промени не бяха съхранени, защото съдържат забранен текст (SPAM).'; +$lang['wordblock'] = 'Направените от вас промени не са съхранени, защото съдържат забранен текст (SPAM).'; diff --git a/inc/lang/bg/login.txt b/inc/lang/bg/login.txt index 9cc85ce32..a6f53e95d 100644 --- a/inc/lang/bg/login.txt +++ b/inc/lang/bg/login.txt @@ -1,3 +1,3 @@ ====== Вписване ====== -Не сте се вписали! Въведете данните си долу, за да го направите. Бисквитките (cookies) трябва да са включени. +Не сте се вписали! Въведете данните си удостоверяване отдолу, за да го направите. Бисквитките (cookies) трябва да са включени. diff --git a/inc/lang/bg/mailtext.txt b/inc/lang/bg/mailtext.txt index 8c18767e5..ad0024a8d 100644 --- a/inc/lang/bg/mailtext.txt +++ b/inc/lang/bg/mailtext.txt @@ -1,16 +1,16 @@ -Страница във DokuWiki бе добавена или променена. Ето детайлите: +Страница във DokuWiki е добавена или променена. Ето детайлите: -Дата : @DATE@ -Браузър : @BROWSER@ -IP-адрес : @IPADDRESS@ -Име на хост : @HOSTNAME@ +Дата : @DATE@ +Браузър : @BROWSER@ +IP адрес : @IPADDRESS@ +Име на хоста : @HOSTNAME@ Стара версия: @OLDPAGE@ -Нова версия : @NEWPAGE@ -Обобщение : @SUMMARY@ -Потребител : @USER@ +Нова версия: @NEWPAGE@ +Обобщение: @SUMMARY@ +Потребител : @USER@ @DIFF@ -- -Това писмо е генерирано от DokuWiki на адрес @DOKUWIKIURL@ +Писмото е генерирано от DokuWiki на адрес @DOKUWIKIURL@ diff --git a/inc/lang/bg/newpage.txt b/inc/lang/bg/newpage.txt index bf67b2266..22d3bb6d1 100644 --- a/inc/lang/bg/newpage.txt +++ b/inc/lang/bg/newpage.txt @@ -1,4 +1,4 @@ ====== Несъществуваща тема ====== -Последвали сте препратка към тема, която все още не съществува. Ако правата Ви позволяват, може да я създадете чрез бутона ''Създаване на страница''. +Последвали сте препратка към тема, която не съществува. Ако правата ви позволяват, може да я създадете чрез бутона ''Създаване на страница''. diff --git a/inc/lang/bg/password.txt b/inc/lang/bg/password.txt index a3ee557e9..7a70ef1d8 100644 --- a/inc/lang/bg/password.txt +++ b/inc/lang/bg/password.txt @@ -1,9 +1,9 @@ Здравейте @FULLNAME@! -Това са Вашите потребителски данни за @TITLE@ от @DOKUWIKIURL@ +Вашите потребителски данни за @TITLE@ на @DOKUWIKIURL@ -Потребител: @LOGIN@ -Парола : @PASSWORD@ +Потребител : @LOGIN@ +Парола : @PASSWORD@ -- Писмото е генерирано от DokuWiki на адрес @DOKUWIKIURL@ \ No newline at end of file diff --git a/inc/lang/bg/pwconfirm.txt b/inc/lang/bg/pwconfirm.txt index beb56cca3..2c4252e15 100644 --- a/inc/lang/bg/pwconfirm.txt +++ b/inc/lang/bg/pwconfirm.txt @@ -5,7 +5,7 @@ Ако не сте поискали нова парола, товава просто игнорирайте това писмо. -За да потвърдите, че искането е наистина пратено от вас, моля ползвайте следния адрес. +За да потвърдите, че искането е наистина от вас, моля ползвайте следния линк: @CONFIRM@ diff --git a/inc/lang/bg/read.txt b/inc/lang/bg/read.txt index a3a15a07f..861d47fc5 100644 --- a/inc/lang/bg/read.txt +++ b/inc/lang/bg/read.txt @@ -1,2 +1,2 @@ -Тази страница е само за четене. Може да разглеждате кода, но не и да го променяте. Обърнете се съм администратора, ако смятате, че това не е редно. +Страницата е само за четене. Може да разглеждате кода, но не и да го променяте. Обърнете се съм администратора, ако смятате, че това не е редно. diff --git a/inc/lang/bg/recent.txt b/inc/lang/bg/recent.txt index 262979e34..c92029054 100644 --- a/inc/lang/bg/recent.txt +++ b/inc/lang/bg/recent.txt @@ -1,4 +1,4 @@ -====== Последни промени ====== +====== Скорошни промени ====== Следните страници са били променени наскоро. diff --git a/inc/lang/bg/register.txt b/inc/lang/bg/register.txt index b4076e89b..51fbb83fe 100644 --- a/inc/lang/bg/register.txt +++ b/inc/lang/bg/register.txt @@ -1,4 +1,4 @@ -====== Регистрирайте се като нов потребител ====== +====== Регистриране като нов потребител ====== -Моля, попълнете всичките полета, за да бъде създаден нов профил. Уверете се, че въведения **адрес на ел. поща е правилен**. Ако няма поле за парола, ще ви бъде изпратена такава на въведения адрес. Потребителското име трябва да бъде валидно [[doku>pagename|име на страница]]. +Моля, попълнете всичките полета отдолу, за да бъде създаден нов профил. Уверете се, че въведеният **адрес на ел. поща е правилен**. Ако няма поле за парола, ще ви бъде изпратена такава на въведения адрес. Потребителското име трябва да бъде валидно [[doku>pagename|име на страница]]. diff --git a/inc/lang/bg/registermail.txt b/inc/lang/bg/registermail.txt index 7839b0910..4b0828c7b 100644 --- a/inc/lang/bg/registermail.txt +++ b/inc/lang/bg/registermail.txt @@ -1,13 +1,13 @@ -Нов потребител беше регистриран. Ето детайлите: +Регистриран е нов потребител. Ето детайлите: Потребител : @NEWUSER@ -Пълно име : @NEWNAME@ -E-поща : @NEWEMAIL@ +Пълно име : @NEWNAME@ +E. поща : @NEWEMAIL@ -Дата : @DATE@ -Браузър : @BROWSER@ -IP-адрес : @IPADDRESS@ -Име на хоста: @HOSTNAME@ +Дата : @DATE@ +Браузър : @BROWSER@ +IP адрес : @IPADDRESS@ +Име на хоста : @HOSTNAME@ -- -Това писмо е генерирано от DokuWiki на адрес @DOKUWIKIURL@ \ No newline at end of file +Писмото е генерирано от DokuWiki на адрес @DOKUWIKIURL@ \ No newline at end of file diff --git a/inc/lang/bg/resendpwd.txt b/inc/lang/bg/resendpwd.txt index 4823fbf00..38e2d1fe4 100644 --- a/inc/lang/bg/resendpwd.txt +++ b/inc/lang/bg/resendpwd.txt @@ -1,3 +1,3 @@ ====== Пращане на нова парола ====== -Моля, въведете потребителското си име във формата по-долу, ако желаете да получите нова парола. Линк за потвърждение ще ви бъде пратен на адреса на ел. поща, с която сте се регистрирани. +Моля, въведете потребителското си име във формата по-долу, ако желаете да получите нова парола. По ел. поща ще получите линк, с който да потвърдите. diff --git a/inc/lang/bg/stopwords.txt b/inc/lang/bg/stopwords.txt index b1627bb9a..03fd13758 100644 --- a/inc/lang/bg/stopwords.txt +++ b/inc/lang/bg/stopwords.txt @@ -1,7 +1,7 @@ -# Това е списък на думи за игнориране, с една дума на ред +# Това е списък с думи за игнориране при индексиране, с една дума на ред # Когато редактирате този файл, не забравяйте да използвате UNIX символ за нов ред # Не е нужно да включвате думи по-кратки от 3 символа - те биват игнорирани така или иначе -# Този списък се основава на думи от http://www.ranks.nl/stopwords/ +# Списъкът се основава на думи от http://www.ranks.nl/stopwords/ about are and diff --git a/inc/lang/bg/subscr_digest.txt b/inc/lang/bg/subscr_digest.txt new file mode 100644 index 000000000..f0533daf4 --- /dev/null +++ b/inc/lang/bg/subscr_digest.txt @@ -0,0 +1,18 @@ +Здравейте! + +Страницата @PAGE@ в @TITLE@ wiki е променена. +Промените са по-долу: + +-------------------------------------------------------- +@DIFF@ +-------------------------------------------------------- + +Стара версия: @OLDPAGE@ +Нова версия: @NEWPAGE@ + +Ако желаете да прекратите уведомяването за страницата трябва да се впишете на адрес @DOKUWIKIURL@, да посетите +@SUBSCRIBE@ +и да прекратите абонамента за промени по страницата или именното пространство. + +-- +Писмото е генерирано от DokuWiki на адрес @DOKUWIKIURL@ \ No newline at end of file diff --git a/inc/lang/bg/subscr_form.txt b/inc/lang/bg/subscr_form.txt new file mode 100644 index 000000000..e32a5ec26 --- /dev/null +++ b/inc/lang/bg/subscr_form.txt @@ -0,0 +1,3 @@ +====== Диспечер на абонаменти ====== + +Страницата ви позволява да управлявате текущите си абонаменти за страници и именни пространства. \ No newline at end of file diff --git a/inc/lang/bg/subscr_list.txt b/inc/lang/bg/subscr_list.txt new file mode 100644 index 000000000..e9e65bc39 --- /dev/null +++ b/inc/lang/bg/subscr_list.txt @@ -0,0 +1,15 @@ +Здравейте! + +Променени са страници от именното пространство @PAGE@ от @TITLE@ wiki. +Ето променените страници: + +-------------------------------------------------------- +@DIFF@ +-------------------------------------------------------- + +Ако желаете да прекратите уведомяването за страницата трябва да се впишете на адрес @DOKUWIKIURL@, да посетите +@SUBSCRIBE@ +и да прекратите абонамента за промени по страницата или именното пространство. + +-- +Писмото е генерирано от DokuWiki на адрес @DOKUWIKIURL@ \ No newline at end of file diff --git a/inc/lang/bg/subscr_single.txt b/inc/lang/bg/subscr_single.txt new file mode 100644 index 000000000..7b26f8e96 --- /dev/null +++ b/inc/lang/bg/subscr_single.txt @@ -0,0 +1,22 @@ +Здравейте! + +Страницата @PAGE@ в @TITLE@ wiki е променена. +Промените са по-долу: + +-------------------------------------------------------- +@DIFF@ +-------------------------------------------------------- + +Дата : @DATE@ +Потребител : @USER@ +Обобщение: @SUMMARY@ +Стара версия: @OLDPAGE@ +Нова версия: @NEWPAGE@ + +Ако желаете да прекратите уведомяването за страницата трябва да се впишете на адрес @DOKUWIKIURL@, да посетите +@NEWPAGE@ +и да прекратите абонамента за промени по страницата или именното пространство. + +-- +Писмото е генерирано от DokuWiki на адрес +@DOKUWIKIURL@ \ No newline at end of file diff --git a/inc/lang/bg/uploadmail.txt b/inc/lang/bg/uploadmail.txt index 7373adcea..ebd8d9112 100644 --- a/inc/lang/bg/uploadmail.txt +++ b/inc/lang/bg/uploadmail.txt @@ -1,13 +1,13 @@ Качен е файл на вашето DokuWiki. Ето детайлите -Файл : @MEDIA@ -Дата : @DATE@ -Браузeр : @BROWSER@ -IP-Адрес : @IPADDRESS@ -Име на хост : @HOSTNAME@ -Размер : @SIZE@ -MIME Тип : @MIME@ -Потребител : @USER@ +Файл : @MEDIA@ +Дата : @DATE@ +Браузър : @BROWSER@ +IP адрес : @IPADDRESS@ +Име на хоста : @HOSTNAME@ +Размер : @SIZE@ +MIME тип : @MIME@ +Потребител : @USER@ -- -Tова писмо е генерирано от DokuWiki на адрес @DOKUWIKIURL@ \ No newline at end of file +Писмото е генерирано от DokuWiki на адрес @DOKUWIKIURL@ \ No newline at end of file -- cgit v1.2.3 From b00bd361a6fb93d2ef2433f18f3f238a7498c041 Mon Sep 17 00:00:00 2001 From: Tom N Harris Date: Tue, 22 Feb 2011 02:14:05 -0500 Subject: Indexer::lookupKey callback receives value reference as first arg --- inc/indexer.php | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'inc') diff --git a/inc/indexer.php b/inc/indexer.php index b6a586985..0e0340d40 100644 --- a/inc/indexer.php +++ b/inc/indexer.php @@ -422,7 +422,7 @@ class Doku_Indexer { * * The returned array will have the original tokens as key. The values * in the returned list is an array with the page names as keys and the - * number of times that token appeas on the page as value. + * number of times that token appears on the page as value. * * @param arrayref $tokens list of words to search for * @return array list of page names with usage counts @@ -468,16 +468,18 @@ class Doku_Indexer { * * The metadata values are compared as case-sensitive strings. Pass a * callback function that returns true or false to use a different - * comparison function + * comparison function. The function will be called with the $value being + * searched for as the first argument, and the word in the index as the + * second argument. * * @param string $key name of the metadata key to look for * @param string $value search term to look for * @param callback $func comparison function - * @return array lists with page names, keys are query values if $key is array + * @return array lists with page names, keys are query values if $value is array * @author Tom N Harris * @author Michael Hamann */ - public function lookupKey($key, $value, $func=null) { + public function lookupKey($key, &$value, $func=null) { if (!is_array($value)) $value_array = array($value); else @@ -496,9 +498,9 @@ class Doku_Indexer { } if (!is_null($func)) { - foreach ($value_array as $val) { + foreach ($value_array as &$val) { foreach ($words as $i => $word) { - if (call_user_func_array($func, array($word, $val))) + if (call_user_func_array($func, array(&$val, $word))) $value_ids[$i][] = $val; } } -- cgit v1.2.3 From 0604da3403f907227d3dfe13e6e58d2e78d0c855 Mon Sep 17 00:00:00 2001 From: Tom N Harris Date: Tue, 22 Feb 2011 02:31:20 -0500 Subject: Removing a page from the index deletes related metadata. Cache key names in index. --- inc/indexer.php | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'inc') diff --git a/inc/indexer.php b/inc/indexer.php index 0e0340d40..1809b1c8f 100644 --- a/inc/indexer.php +++ b/inc/indexer.php @@ -258,6 +258,7 @@ class Doku_Indexer { foreach ($key as $name => $values) { $metaname = idx_cleanName($name); + $this->_addIndexKey('metadata', '', $metaname); $metaidx = $this->_getIndex($metaname, '_i'); $metawords = $this->_getIndex($metaname, '_w'); $addwords = false; @@ -365,8 +366,17 @@ class Doku_Indexer { return false; } - // XXX TODO: delete meta keys $this->_saveIndexKey('title', '', $pid, ""); + $keyidx = $this->_getIndex('metadata', ''); + foreach ($keyidx as $metaname) { + $val_idx = explode(':', $this->_getIndexKey($metaname.'_p', '', $pid)); + $meta_idx = $this->_getIndex($metaname.'_i', ''); + foreach ($val_idx as $id) { + $meta_idx[$id] = $this->_updateTuple($meta_idx[$id], $pid, 0); + } + $this->_saveIndex($metaname.'_i', '', $meta_idx); + $this->_saveIndexKey($metaname.'_p', '', $pid, ''); + } $this->_unlock(); return true; -- cgit v1.2.3 From d0d6fe1be56ef474d844b3556af7ba2a5961d798 Mon Sep 17 00:00:00 2001 From: Tom N Harris Date: Tue, 22 Feb 2011 02:53:20 -0500 Subject: Indexer version tag should include plugin names --- inc/indexer.php | 32 +++++++++++++++++++++++--------- 1 file changed, 23 insertions(+), 9 deletions(-) (limited to 'inc') diff --git a/inc/indexer.php b/inc/indexer.php index 1809b1c8f..bcda2a9b9 100644 --- a/inc/indexer.php +++ b/inc/indexer.php @@ -50,19 +50,33 @@ define('IDX_ASIAN', '(?:'.IDX_ASIAN1.'|'.IDX_ASIAN2.'|'.IDX_ASIAN3.')'); * Version of the indexer taking into consideration the external tokenizer. * The indexer is only compatible with data written by the same version. * + * Triggers INDEXER_VERSION_GET + * Plugins that modify what gets indexed should hook this event and + * add their version info to the event data like so: + * $data[$plugin_name] = $plugin_version; + * * @author Tom N Harris * @author Michael Hamann */ function idx_get_version(){ - global $conf; - if($conf['external_tokenizer']) - $version = INDEXER_VERSION . '+' . trim($conf['tokenizer_cmd']); - else - $version = INDEXER_VERSION; - - $data = array($version); - trigger_event('INDEXER_VERSION_GET', $data, null, false); - return implode('+', $data); + static $indexer_version = null; + if ($indexer_version == null) { + global $conf; + if($conf['external_tokenizer']) + $version = INDEXER_VERSION . '+' . trim($conf['tokenizer_cmd']); + else + $version = INDEXER_VERSION; + + // DokuWiki version is included for the convenience of plugins + $data = array('dokuwiki'=>$version); + trigger_event('INDEXER_VERSION_GET', $data, null, false); + unset($data['dokuwiki']); // this needs to be first + ksort($data); + foreach ($data as $plugin=>$vers) + $version .= '+'.$plugin.'='.$vers; + $indexer_version = $version; + } + return $indexer_version; } /** -- cgit v1.2.3 From 175193d28ead34dd3a45395407813c080f1b2f25 Mon Sep 17 00:00:00 2001 From: Tom N Harris Date: Tue, 22 Feb 2011 03:38:22 -0500 Subject: Implement histogram method of indexer --- inc/indexer.php | 64 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 64 insertions(+) (limited to 'inc') diff --git a/inc/indexer.php b/inc/indexer.php index bcda2a9b9..c28f24f75 100644 --- a/inc/indexer.php +++ b/inc/indexer.php @@ -712,6 +712,54 @@ class Doku_Indexer { * @author Tom N Harris */ public function histogram($min=1, $max=0, $key=null) { + if ($min < 1) + $min = 1; + if ($max < $min) + $max = 0; + + $result = array(); + + if ($key == 'title') { + $index = $this->_getIndex('title', ''); + $index = array_count_values($index); + foreach ($index as $val => $cnt) { + if ($cnt >= $min && (!$max || $cnt <= $max)) + $result[$val] = $cnt; + } + } + elseif (!is_null($key)) { + $metaname = idx_cleanName($key); + $index = $this->_getIndex($metaname.'_i', ''); + $val_idx = array(); + foreach ($index as $wid => $line) { + $freq = $this->_countTuples($line); + if ($freq >= $min && (!$max || $freq <= $max)) + $val_idx[$wid] = $freq; + } + if (!empty($val_idx)) { + $words = $this->_getIndex($metaname.'_w', ''); + foreach ($val_idx as $wid => $freq) + $result[$words[$wid]] = $freq; + } + } + else { + $lengths = idx_listIndexLengths(); + foreach ($lengths as $length) { + $index = $this->_getIndex('i', $length); + $words = null; + foreach ($index as $wid => $line) { + $freq = $this->_countTuples($line); + if ($freq >= $min && (!$max || $freq <= $max)) { + if ($words === null) + $words = $this->_getIndex('w', $length); + $result[$words[$wid]] = $freq; + } + } + } + } + + arsort($result); + return $result; } /** @@ -1005,6 +1053,22 @@ class Doku_Indexer { } return $result; } + + /** + * Sum the counts in a list of tuples. + * + * @author Tom N Harris + */ + private function _countTuples($line) { + $freq = 0; + $parts = explode(':', $line); + foreach ($parts as $tuple) { + if ($tuple == '') continue; + list($pid, $cnt) = explode('*', $tuple); + $freq += (int)$cnt; + } + return $freq; + } } /** -- cgit v1.2.3 From 3a48618a538412994ec244d5a9fde5c4a6161d10 Mon Sep 17 00:00:00 2001 From: Anika Henke Date: Tue, 22 Feb 2011 23:04:53 +0000 Subject: improved actionOK and its use --- inc/auth.php | 13 +++---------- inc/confutils.php | 21 ++++++++++++++------- inc/template.php | 12 ++++-------- 3 files changed, 21 insertions(+), 25 deletions(-) (limited to 'inc') diff --git a/inc/auth.php b/inc/auth.php index 7449fd635..164ad3df9 100644 --- a/inc/auth.php +++ b/inc/auth.php @@ -686,9 +686,8 @@ function register(){ global $conf; global $auth; - if (!$auth) return false; if(!$_POST['save']) return false; - if(!$auth->canDo('addUser')) return false; + if(!actionOK('register')) return false; //clean username $_POST['login'] = trim($auth->cleanUser($_POST['login'])); @@ -764,12 +763,10 @@ function updateprofile() { global $lang; global $auth; - if (!$auth) return false; if(empty($_POST['save'])) return false; if(!checkSecurityToken()) return false; - // should not be able to get here without Profile being possible... - if(!$auth->canDo('Profile')) { + if(!actionOK('profile')) { msg($lang['profna'],-1); return false; } @@ -840,11 +837,7 @@ function act_resendpwd(){ global $conf; global $auth; - if(!actionOK('resendpwd')) return false; - if (!$auth) return false; - - // should not be able to get here without modPass being possible... - if(!$auth->canDo('modPass')) { + if(!actionOK('resendpwd')) { msg($lang['resendna'],-1); return false; } diff --git a/inc/confutils.php b/inc/confutils.php index 26ed4f087..b2d25fb65 100644 --- a/inc/confutils.php +++ b/inc/confutils.php @@ -241,17 +241,24 @@ function actionOK($action){ // prepare disabled actions array and handle legacy options $disabled = explode(',',$conf['disableactions']); $disabled = array_map('trim',$disabled); - if(isset($conf['openregister']) && !$conf['openregister']) $disabled[] = 'register'; - if(isset($conf['resendpasswd']) && !$conf['resendpasswd']) $disabled[] = 'resendpwd'; - if(isset($conf['subscribers']) && !$conf['subscribers']) { - $disabled[] = 'subscribe'; - } - if (is_null($auth) || !$auth->canDo('addUser')) { + if(!empty($conf['openregister']) || is_null($auth) || !$auth->canDo('addUser')) { $disabled[] = 'register'; } - if (is_null($auth) || !$auth->canDo('modPass')) { + if(!empty($conf['resendpasswd']) || is_null($auth) || !$auth->canDo('modPass')) { $disabled[] = 'resendpwd'; } + if(!empty($conf['subscribers']) || is_null($auth)) { + $disabled[] = 'subscribe'; + } + if (is_null($auth) || !$auth->canDo('Profile')) { + $disabled[] = 'profile'; + } + if (is_null($auth)) { + $disabled[] = 'login'; + } + if (is_null($auth) || !$auth->canDo('logout')) { + $disabled[] = 'logout'; + } $disabled = array_unique($disabled); } diff --git a/inc/template.php b/inc/template.php index b873d818f..d29e3e779 100644 --- a/inc/template.php +++ b/inc/template.php @@ -581,12 +581,9 @@ function tpl_get_action($type) { $accesskey = 'b'; break; case 'login': - if(!$conf['useacl'] || !$auth){ - return false; - } $params['sectok'] = getSecurityToken(); if(isset($_SERVER['REMOTE_USER'])){ - if (!$auth->canDo('logout')) { + if (!actionOK('logout')) { return false; } $params['do'] = 'logout'; @@ -619,20 +616,19 @@ function tpl_get_action($type) { $type = 'subscribe'; $params['do'] = 'subscribe'; case 'subscribe': - if(!$conf['useacl'] || !$auth || !$conf['subscribers'] || !$_SERVER['REMOTE_USER']){ + if(!$_SERVER['REMOTE_USER']){ return false; } break; case 'backlink': break; case 'profile': - if(!$conf['useacl'] || !$auth || !isset($_SERVER['REMOTE_USER']) || - !$auth->canDo('Profile')){ + if(!isset($_SERVER['REMOTE_USER'])){ return false; } break; case 'subscribens': - // Superseeded by subscribe/subscription + // Superseded by subscribe/subscription return ''; break; default: -- cgit v1.2.3 From bd07158f0f2569ae470f980dd49d69b7f1fd2c49 Mon Sep 17 00:00:00 2001 From: Anika Henke Date: Tue, 22 Feb 2011 23:11:13 +0000 Subject: deleted redundant line --- inc/actions.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'inc') diff --git a/inc/actions.php b/inc/actions.php index 016af4aea..321d928b3 100644 --- a/inc/actions.php +++ b/inc/actions.php @@ -244,7 +244,6 @@ function act_permcheck($act){ $permneed = AUTH_CREATE; } }elseif(in_array($act,array('login','search','recent','profile','index', 'sitemap'))){ - }elseif(in_array($act,array('login','search','recent','profile','sitemap'))){ $permneed = AUTH_NONE; }elseif($act == 'revert'){ $permneed = AUTH_ADMIN; @@ -610,7 +609,7 @@ function act_sitemap($act) { print "Sitemap generation is disabled."; exit; } - + $sitemap = Sitemapper::getFilePath(); if(strrchr($sitemap, '.') === '.gz'){ $mime = 'application/x-gzip'; -- cgit v1.2.3 From 5981eb09ea0468a670c1cdb238962bf54180c599 Mon Sep 17 00:00:00 2001 From: Tom N Harris Date: Tue, 22 Feb 2011 23:02:46 -0500 Subject: Fix variable name type in indexer --- inc/indexer.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'inc') diff --git a/inc/indexer.php b/inc/indexer.php index c28f24f75..5ab0ec002 100644 --- a/inc/indexer.php +++ b/inc/indexer.php @@ -120,8 +120,8 @@ class Doku_Indexer { return "locked"; // load known documents - $page_idx = $this->_addIndexKey('page', '', $page); - if ($page_idx === false) { + $pid = $this->_addIndexKey('page', '', $page); + if ($pid === false) { $this->_unlock(); return false; } @@ -348,8 +348,8 @@ class Doku_Indexer { return "locked"; // load known documents - $page_idx = $this->_getIndexKey('page', '', $page); - if ($page_idx === false) { + $pid = $this->_getIndexKey('page', '', $page); + if ($pid === false) { $this->_unlock(); return false; } -- cgit v1.2.3 From 287bc2877f03f25914816a266c305c6cf6c8c772 Mon Sep 17 00:00:00 2001 From: Tom N Harris Date: Wed, 23 Feb 2011 14:32:32 -0500 Subject: Increase version tag for new indexer --- inc/indexer.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'inc') diff --git a/inc/indexer.php b/inc/indexer.php index 5ab0ec002..2e36b6ed7 100644 --- a/inc/indexer.php +++ b/inc/indexer.php @@ -10,7 +10,7 @@ if(!defined('DOKU_INC')) die('meh.'); // Version tag used to force rebuild on upgrade -define('INDEXER_VERSION', 3); +define('INDEXER_VERSION', 4); // set the minimum token length to use in the index (note, this doesn't apply to numeric tokens) if (!defined('IDX_MINWORDLENGTH')) define('IDX_MINWORDLENGTH',2); -- cgit v1.2.3 From b8c040db1fdc0eee80963e57d95a15fd3813912d Mon Sep 17 00:00:00 2001 From: Tom N Harris Date: Wed, 23 Feb 2011 15:01:10 -0500 Subject: Add minimum length option to index histogram --- inc/indexer.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'inc') diff --git a/inc/indexer.php b/inc/indexer.php index 2e36b6ed7..6b21797af 100644 --- a/inc/indexer.php +++ b/inc/indexer.php @@ -707,11 +707,12 @@ class Doku_Indexer { * * @param int $min bottom frequency threshold * @param int $max upper frequency limit. No limit if $max<$min + * @param int $length 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 */ - public function histogram($min=1, $max=0, $key=null) { + public function histogram($min=1, $max=0, $minlen=3, $key=null) { if ($min < 1) $min = 1; if ($max < $min) @@ -723,7 +724,7 @@ class Doku_Indexer { $index = $this->_getIndex('title', ''); $index = array_count_values($index); foreach ($index as $val => $cnt) { - if ($cnt >= $min && (!$max || $cnt <= $max)) + if ($cnt >= $min && (!$max || $cnt <= $max) && strlen($val) >= $minlen) $result[$val] = $cnt; } } @@ -733,7 +734,7 @@ class Doku_Indexer { $val_idx = array(); foreach ($index as $wid => $line) { $freq = $this->_countTuples($line); - if ($freq >= $min && (!$max || $freq <= $max)) + if ($freq >= $min && (!$max || $freq <= $max) && strlen($val) >= $minlen) $val_idx[$wid] = $freq; } if (!empty($val_idx)) { @@ -745,6 +746,7 @@ class Doku_Indexer { else { $lengths = idx_listIndexLengths(); foreach ($lengths as $length) { + if ($length < $minlen) continue; $index = $this->_getIndex('i', $length); $words = null; foreach ($index as $wid => $line) { -- cgit v1.2.3 From 7233c152c0a107c0f12dbc09f5493022b264dddb Mon Sep 17 00:00:00 2001 From: Michael Hamann Date: Thu, 24 Feb 2011 23:53:51 +0100 Subject: Fix pass by reference error, always return an array in lookupKey() --- inc/fulltext.php | 3 ++- inc/indexer.php | 5 +++++ 2 files changed, 7 insertions(+), 1 deletion(-) (limited to 'inc') diff --git a/inc/fulltext.php b/inc/fulltext.php index 891558f96..8155325ee 100644 --- a/inc/fulltext.php +++ b/inc/fulltext.php @@ -234,7 +234,8 @@ function _ft_pageLookup(&$data){ } } if ($in_title) { - foreach ($Indexer->lookupKey('title', "*$id*") as $p_id) { + $wildcard_id = "*$id*"; + foreach ($Indexer->lookupKey('title', $wildcard_id) as $p_id) { if (!isset($pages[$p_id])) $pages[$p_id] = p_get_first_heading($p_id, false); } diff --git a/inc/indexer.php b/inc/indexer.php index 5aa321d46..eaab7736a 100644 --- a/inc/indexer.php +++ b/inc/indexer.php @@ -566,7 +566,12 @@ class Doku_Indexer { unset($words); // free the used memory + // initialize the result so it won't be null $result = array(); + foreach ($value_array as $val) { + $result[$val] = array(); + } + $page_idx = $this->_getIndex('page', ''); // Special handling for titles -- cgit v1.2.3 From 675bf41fb9fe7d43646c3ff2de5a1e701818ed2c Mon Sep 17 00:00:00 2001 From: Tom N Harris Date: Fri, 25 Feb 2011 17:56:21 -0500 Subject: Reduce memory footprint of tokenizer; make returned arrays use contiguous keys --- inc/indexer.php | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'inc') diff --git a/inc/indexer.php b/inc/indexer.php index eaab7736a..6913dd4e3 100644 --- a/inc/indexer.php +++ b/inc/indexer.php @@ -439,14 +439,14 @@ class Doku_Indexer { $text = utf8_stripspecials($text, ' ', '\._\-:'.$wc); $wordlist = explode(' ', $text); - foreach ($wordlist as $word) { + foreach ($wordlist as $i => &$word) { $word = (preg_match('/[^0-9A-Za-z]/u', $word)) ? utf8_strtolower($word) : strtolower($word); - if (!is_numeric($word) && strlen($word) < IDX_MINWORDLENGTH) continue; - if (array_search($word, $stopwords) !== false) continue; - $words[] = $word; + if ((!is_numeric($word) && strlen($word) < IDX_MINWORDLENGTH) + || array_search($word, $stopwords) !== false) + unset($wordlist[$i]); } - return $words; + return array_values($wordlist); } /** @@ -707,7 +707,7 @@ class Doku_Indexer { array_splice($page_idx, count($title_idx)); foreach ($title_idx as $i => $title) if ($title === "") unset($page_idx[$i]); - return $page_idx; + return array_values($page_idx); } $pages = array(); @@ -1068,7 +1068,7 @@ class Doku_Indexer { if ($line == '') return $result; $parts = explode(':', $line); foreach ($parts as $tuple) { - if ($tuple == '') continue; + if ($tuple === '') continue; list($key, $cnt) = explode('*', $tuple); if (!$cnt) continue; $key = $keys[$key]; @@ -1087,7 +1087,7 @@ class Doku_Indexer { $freq = 0; $parts = explode(':', $line); foreach ($parts as $tuple) { - if ($tuple == '') continue; + if ($tuple === '') continue; list($pid, $cnt) = explode('*', $tuple); $freq += (int)$cnt; } -- cgit v1.2.3 From 1538718db8939adf4ce057f2b7fb6d2eea309757 Mon Sep 17 00:00:00 2001 From: Tom N Harris Date: Fri, 25 Feb 2011 18:23:47 -0500 Subject: Restrict metadata values in indexer to string; skip unnecessary test --- inc/indexer.php | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) (limited to 'inc') diff --git a/inc/indexer.php b/inc/indexer.php index 6913dd4e3..fc7813ba1 100644 --- a/inc/indexer.php +++ b/inc/indexer.php @@ -505,10 +505,11 @@ class Doku_Indexer { * callback function that returns true or false to use a different * comparison function. The function will be called with the $value being * searched for as the first argument, and the word in the index as the - * second argument. + * second argument. The function preg_match can be used directly if the + * values are regexes. * * @param string $key name of the metadata key to look for - * @param string $value search term to look for + * @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 @@ -533,9 +534,9 @@ class Doku_Indexer { } if (!is_null($func)) { - foreach ($value_array as &$val) { + foreach ($value_array as $val) { foreach ($words as $i => $word) { - if (call_user_func_array($func, array(&$val, $word))) + if (call_user_func_array($func, array($val, $word))) $value_ids[$i][] = $val; } } @@ -591,10 +592,7 @@ class Doku_Indexer { // is an array with page_id => 1, page2_id => 1 etc. so take the keys only $pages = array_keys($this->_parseTuples($page_idx, $lines[$value_id])); foreach ($val_list as $val) { - if (!isset($result[$val])) - $result[$val] = $pages; - else - $result[$val] = array_merge($result[$val], $pages); + $result[$val] = array_merge($result[$val], $pages); } } } -- cgit v1.2.3 From aeb1fea310b2067fbd3e259b9a2822783a2b7221 Mon Sep 17 00:00:00 2001 From: Anika Henke Date: Sat, 26 Feb 2011 14:48:33 +0000 Subject: added missing user rtlstyle.css to config_cascade --- inc/config_cascade.php | 1 + 1 file changed, 1 insertion(+) (limited to 'inc') diff --git a/inc/config_cascade.php b/inc/config_cascade.php index 32001be81..b016de8a0 100644 --- a/inc/config_cascade.php +++ b/inc/config_cascade.php @@ -50,6 +50,7 @@ $config_cascade = array_merge( ), 'userstyle' => array( 'default' => DOKU_CONF.'userstyle.css', + 'rtl' => DOKU_CONF.'rtlstyle.css', 'print' => DOKU_CONF.'printstyle.css', 'feed' => DOKU_CONF.'feedstyle.css', 'all' => DOKU_CONF.'allstyle.css', -- cgit v1.2.3 From 318cd03ee91d3a5344bab636a77c3cb19c32c5b7 Mon Sep 17 00:00:00 2001 From: Anika Henke Date: Sat, 26 Feb 2011 21:22:14 +0000 Subject: improved css.php and core styles * code cleanup in lib/exe/css.php * renamed 'default' userstyle to 'screen' in config_cascade * splitted core lib/styles/style.css up into all.css, print.css and screen.css --- inc/config_cascade.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'inc') diff --git a/inc/config_cascade.php b/inc/config_cascade.php index b016de8a0..96cd5d4b5 100644 --- a/inc/config_cascade.php +++ b/inc/config_cascade.php @@ -49,7 +49,7 @@ $config_cascade = array_merge( 'local' => array(DOKU_CONF.'wordblock.local.conf'), ), 'userstyle' => array( - 'default' => DOKU_CONF.'userstyle.css', + 'screen' => DOKU_CONF.'userstyle.css', 'rtl' => DOKU_CONF.'rtlstyle.css', 'print' => DOKU_CONF.'printstyle.css', 'feed' => DOKU_CONF.'feedstyle.css', -- cgit v1.2.3 From 4e098b31e03d71843366023ea526608ff2377a80 Mon Sep 17 00:00:00 2001 From: Anika Henke Date: Sat, 26 Feb 2011 21:37:21 +0000 Subject: renamed userstyles In 09edb7113c19b07ca11a79c2b0571f45ed2cc2eb most of the old userstyles were wrongly named. This renames them back to what they were before that change. See also http://www.dokuwiki.org/devel:css#user_styles --- inc/config_cascade.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'inc') diff --git a/inc/config_cascade.php b/inc/config_cascade.php index 96cd5d4b5..48ed5a000 100644 --- a/inc/config_cascade.php +++ b/inc/config_cascade.php @@ -50,10 +50,10 @@ $config_cascade = array_merge( ), 'userstyle' => array( 'screen' => DOKU_CONF.'userstyle.css', - 'rtl' => DOKU_CONF.'rtlstyle.css', - 'print' => DOKU_CONF.'printstyle.css', - 'feed' => DOKU_CONF.'feedstyle.css', - 'all' => DOKU_CONF.'allstyle.css', + 'rtl' => DOKU_CONF.'userrtl.css', + 'print' => DOKU_CONF.'userprint.css', + 'feed' => DOKU_CONF.'userfeed.css', + 'all' => DOKU_CONF.'userall.css', ), 'userscript' => array( 'default' => DOKU_CONF.'userscript.js' -- cgit v1.2.3 From b6d540bdf1d129168ec20fb4c54956edb07c189b Mon Sep 17 00:00:00 2001 From: Tom N Harris Date: Sun, 27 Feb 2011 20:36:15 -0500 Subject: Fix wildcard search --- inc/indexer.php | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'inc') diff --git a/inc/indexer.php b/inc/indexer.php index fc7813ba1..270f717b5 100644 --- a/inc/indexer.php +++ b/inc/indexer.php @@ -543,18 +543,18 @@ class Doku_Indexer { } else { foreach ($value_array as $val) { $xval = $val; - $caret = false; - $dollar = false; + $caret = '^'; + $dollar = '$'; // check for wildcards if (substr($xval, 0, 1) == '*') { $xval = substr($xval, 1); - $caret = '^'; + $caret = ''; } if (substr($xval, -1, 1) == '*') { $xval = substr($xval, 0, -1); - $dollar = '$'; + $dollar = ''; } - if ($caret || $dollar) { + if (!$caret || !$dollar) { $re = $caret.preg_quote($xval, '/').$dollar; foreach(array_keys(preg_grep('/'.$re.'/', $words)) as $i) $value_ids[$i][] = $val; @@ -619,27 +619,27 @@ class Doku_Indexer { $tokenwild = array(); foreach ($words as $word) { $result[$word] = array(); - $caret = false; - $dollar = false; + $caret = '^'; + $dollar = '$'; $xword = $word; $wlen = wordlen($word); // check for wildcards if (substr($xword, 0, 1) == '*') { $xword = substr($xword, 1); - $caret = '^'; + $caret = ''; $wlen -= 1; } if (substr($xword, -1, 1) == '*') { $xword = substr($xword, 0, -1); - $dollar = '$'; + $dollar = ''; $wlen -= 1; } - if ($wlen < IDX_MINWORDLENGTH && !$caret && !$dollar && !is_numeric($xword)) + if ($wlen < IDX_MINWORDLENGTH && $caret && $dollar && !is_numeric($xword)) continue; if (!isset($tokens[$xword])) $tokenlength[$wlen][] = $xword; - if ($caret || $dollar) { + if (!$caret || !$dollar) { $re = $caret.preg_quote($xword, '/').$dollar; $tokens[$xword][] = array($word, '/'.$re.'/'); if (!isset($tokenwild[$xword])) -- cgit v1.2.3 From 94eef7c677ed8192fffb32bcc3ae1cb34d5fcb5d Mon Sep 17 00:00:00 2001 From: Anika Henke Date: Wed, 2 Mar 2011 10:14:57 +0000 Subject: FS#2191: fixed syntax error in ar/lang.php --- inc/lang/ar/lang.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'inc') diff --git a/inc/lang/ar/lang.php b/inc/lang/ar/lang.php index 300ec3b9a..cc2de9e8b 100644 --- a/inc/lang/ar/lang.php +++ b/inc/lang/ar/lang.php @@ -45,7 +45,7 @@ $lang['btn_resendpwd'] = 'ارسل كلمة سر جديدة'; $lang['btn_draft'] = 'حرر المسودة'; $lang['btn_recover'] = 'استرجع المسودة'; $lang['btn_draftdel'] = 'احذف المسوّدة'; -$lang['btn_revert'] = 'استعد +$lang['btn_revert'] = 'استعد'; $lang['btn_register'] = 'سجّل'; $lang['loggedinas'] = 'داخل باسم'; $lang['user'] = 'اسم المستخدم'; -- cgit v1.2.3 From 24ea6500cc5285aac7f02df7f535ea10f8f97729 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Fri, 4 Mar 2011 20:29:24 +0100 Subject: check manager/admin role earlier for admin plugins FS#2180 --- inc/actions.php | 12 ++++++++++-- inc/template.php | 11 +++-------- 2 files changed, 13 insertions(+), 10 deletions(-) (limited to 'inc') diff --git a/inc/actions.php b/inc/actions.php index 321d928b3..fa11bb7f1 100644 --- a/inc/actions.php +++ b/inc/actions.php @@ -18,6 +18,7 @@ if(!defined('DOKU_INC')) die('meh.'); function act_dispatch(){ global $ACT; global $ID; + global $INFO; global $QUERY; global $lang; global $conf; @@ -134,8 +135,15 @@ function act_dispatch(){ $pluginlist = plugin_list('admin'); if (in_array($_REQUEST['page'], $pluginlist)) { // attempt to load the plugin - if ($plugin =& plugin_load('admin',$_REQUEST['page']) !== null) - $plugin->handle(); + if ($plugin =& plugin_load('admin',$_REQUEST['page']) !== null){ + if($plugin->forAdminOnly() && !$INFO['isadmin']){ + // a manager tried to load a plugin that's for admins only + unset($_REQUEST['page']); + msg('For admins only',-1); + }else{ + $plugin->handle(); + } + } } } } diff --git a/inc/template.php b/inc/template.php index d29e3e779..0f0fb92a0 100644 --- a/inc/template.php +++ b/inc/template.php @@ -209,14 +209,9 @@ function tpl_admin(){ } if ($plugin !== null){ - if($plugin->forAdminOnly() && !$INFO['isadmin']){ - msg('For admins only',-1); - html_admin(); - }else{ - if(!is_array($TOC)) $TOC = $plugin->getTOC(); //if TOC wasn't requested yet - if($INFO['prependTOC']) tpl_toc(); - $plugin->html(); - } + if(!is_array($TOC)) $TOC = $plugin->getTOC(); //if TOC wasn't requested yet + if($INFO['prependTOC']) tpl_toc(); + $plugin->html(); }else{ html_admin(); } -- cgit v1.2.3 From 8d64d42d5876b358dcb69969a859ecb6cbcbf328 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Fri, 4 Mar 2011 20:56:43 +0100 Subject: give useful message for broken plugins FS#2068 --- inc/plugin.php | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'inc') diff --git a/inc/plugin.php b/inc/plugin.php index 628ae39b0..ec94433b6 100644 --- a/inc/plugin.php +++ b/inc/plugin.php @@ -33,7 +33,15 @@ class DokuWiki_Plugin { $parts = explode('_',get_class($this)); $info = DOKU_PLUGIN.'/'.$parts[2].'/plugin.info.txt'; if(@file_exists($info)) return confToHash($info); - trigger_error('getInfo() not implemented in '.get_class($this).' and '.$info.' not found', E_USER_WARNING); + + msg('getInfo() not implemented in '.get_class($this). + ' and '.$info.' not found.
This is a bug in the '. + $parts[2].' plugin and should be reported to the '. + 'plugin author.',-1); + return array( + 'date' => '0000-00-00', + 'name' => $parts[2].' plugin', + ); } // plugin introspection methods -- cgit v1.2.3 From 24a6c2354089305a4146c7f8802887aa895c2bd3 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Sat, 5 Mar 2011 16:20:05 +0100 Subject: avoid broken page on bad non-UTF8 highlight string --- inc/html.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'inc') diff --git a/inc/html.php b/inc/html.php index 080beb01a..fcfa54b6c 100644 --- a/inc/html.php +++ b/inc/html.php @@ -284,7 +284,8 @@ function html_hilight($html,$phrases){ $regex = join('|',array_map('ft_snippet_re_preprocess', array_map('preg_quote_cb',$phrases))); if ($regex === '') return $html; - $html = preg_replace_callback("/((<[^>]*)|$regex)/ui",'html_hilight_callback',$html); + if (!utf8_check($regex)) return $html; + $html = @preg_replace_callback("/((<[^>]*)|$regex)/ui",'html_hilight_callback',$html); return $html; } -- cgit v1.2.3 From 39d6fd3051102c9f2fb5436c7bcaf44d6068fde8 Mon Sep 17 00:00:00 2001 From: Michael Hamann Date: Sun, 6 Mar 2011 13:17:15 +0100 Subject: Merge the two indexer events and use string keys This merges the INDEXER_PAGE_ADD and INDEXER_METADATA_INDEX events and introduces the new string keys 'page', 'body' and 'metadata' in the event data. All plugins that use INDEXER_PAGE_ADD need to be adjusted to use the key 'page' instead of 0 and 'body' instead of 1. --- inc/indexer.php | 29 +++++++++++------------------ 1 file changed, 11 insertions(+), 18 deletions(-) (limited to 'inc') diff --git a/inc/indexer.php b/inc/indexer.php index 270f717b5..f0d951230 100644 --- a/inc/indexer.php +++ b/inc/indexer.php @@ -1181,12 +1181,16 @@ function idx_addPage($page, $verbose=false) { } $body = ''; - $data = array($page, $body); + $metadata = array(); + $metadata['title'] = p_get_metadata($page, 'title', false); + if (($references = p_get_metadata($page, 'relation references', false)) !== null) + $metadata['relation_references'] = array_keys($references); + $data = compact('page', 'body', 'metadata'); $evt = new Doku_Event('INDEXER_PAGE_ADD', $data); - if ($evt->advise_before()) $data[1] = $data[1] . " " . rawWiki($page); + if ($evt->advise_before()) $data['body'] = $data['body'] . " " . rawWiki($page); $evt->advise_after(); unset($evt); - list($page,$body) = $data; + extract($data); $Indexer = idx_get_indexer(); $result = $Indexer->addPageWords($page, $body); @@ -1196,22 +1200,11 @@ function idx_addPage($page, $verbose=false) { } if ($result) { - $data = array('page' => $page, 'metadata' => array()); - - $data['metadata']['title'] = p_get_metadata($page, 'title', false); - if (($references = p_get_metadata($page, 'relation references', false)) !== null) - $data['metadata']['relation_references'] = array_keys($references); - - $evt = new Doku_Event('INDEXER_METADATA_INDEX', $data); - if ($evt->advise_before()) { - $result = $Indexer->addMetaKeys($page, $data['metadata']); - if ($result === "locked") { - if ($verbose) print("Indexer: locked".DOKU_LF); - return false; - } + $result = $Indexer->addMetaKeys($page, $metadata); + if ($result === "locked") { + if ($verbose) print("Indexer: locked".DOKU_LF); + return false; } - $evt->advise_after(); - unset($evt); } if ($result) -- cgit v1.2.3 From a424180e36bd8d0d4699597c9be6f9985d943911 Mon Sep 17 00:00:00 2001 From: Michael Hamann Date: Tue, 8 Mar 2011 22:29:21 +0100 Subject: Remove relation_references from the index when it is missing --- inc/indexer.php | 2 ++ 1 file changed, 2 insertions(+) (limited to 'inc') diff --git a/inc/indexer.php b/inc/indexer.php index f0d951230..7cddb7c54 100644 --- a/inc/indexer.php +++ b/inc/indexer.php @@ -1185,6 +1185,8 @@ function idx_addPage($page, $verbose=false) { $metadata['title'] = p_get_metadata($page, 'title', false); if (($references = p_get_metadata($page, 'relation references', false)) !== null) $metadata['relation_references'] = array_keys($references); + else + $metadata['relation_references'] = array(); $data = compact('page', 'body', 'metadata'); $evt = new Doku_Event('INDEXER_PAGE_ADD', $data); if ($evt->advise_before()) $data['body'] = $data['body'] . " " . rawWiki($page); -- cgit v1.2.3 From 6937406a7e057dc250e7dfde389b76324363235b Mon Sep 17 00:00:00 2001 From: Matthias Schulte Date: Mon, 14 Mar 2011 19:02:25 +0100 Subject: de/de-informal: added and updated translations --- inc/lang/de-informal/denied.txt | 2 +- inc/lang/de-informal/lang.php | 7 +++++-- inc/lang/de-informal/resendpwd.txt | 2 +- inc/lang/de-informal/revisions.txt | 2 +- inc/lang/de/denied.txt | 2 +- inc/lang/de/lang.php | 25 ++++++++++++++----------- inc/lang/de/resendpwd.txt | 2 +- inc/lang/de/revisions.txt | 2 +- 8 files changed, 25 insertions(+), 19 deletions(-) (limited to 'inc') diff --git a/inc/lang/de-informal/denied.txt b/inc/lang/de-informal/denied.txt index 6d76891b1..0bc0e59a8 100644 --- a/inc/lang/de-informal/denied.txt +++ b/inc/lang/de-informal/denied.txt @@ -1,4 +1,4 @@ ====== Zugang verweigert ====== -Du hast nicht die erforderlichen Rechte, um diese Aktion durchzuführen. Eventuell bist du nicht am Wiki angemeldet? +Du hast nicht die erforderliche Berechtigung, um diese Aktion durchzuführen. Eventuell bist du nicht am Wiki angemeldet? diff --git a/inc/lang/de-informal/lang.php b/inc/lang/de-informal/lang.php index cfb492dfb..d39bf8152 100644 --- a/inc/lang/de-informal/lang.php +++ b/inc/lang/de-informal/lang.php @@ -88,7 +88,7 @@ $lang['profnoempty'] = 'Es muss ein Name oder eine E-Mail Adresse ange $lang['profchanged'] = 'Benutzerprofil erfolgreich geändert.'; $lang['pwdforget'] = 'Passwort vergessen? Fordere ein neues an'; $lang['resendna'] = 'Passwörter versenden ist in diesem Wiki nicht möglich.'; -$lang['resendpwd'] = 'Neues Passwort schicken für'; +$lang['resendpwd'] = 'Neues Passwort senden für'; $lang['resendpwdmissing'] = 'Es tut mir Leid, aber du musst alle Felder ausfüllen.'; $lang['resendpwdnouser'] = 'Es tut mir Leid, aber der Benutzer existiert nicht in unserer Datenbank.'; $lang['resendpwdbadauth'] = 'Es tut mir Leid, aber dieser Authentifizierungscode ist ungültig. Stelle sicher, dass du den kompletten Bestätigungslink verwendet haben.'; @@ -168,6 +168,9 @@ $lang['yours'] = 'Deine Version'; $lang['diff'] = 'Zeige Unterschiede zu aktueller Version'; $lang['diff2'] = 'Zeige Unterschiede der ausgewählten Versionen'; $lang['difflink'] = 'Link zu der Versionshistorie'; +$lang['diff_type'] = 'Unterschiede anzeigen:'; +$lang['diff_inline'] = 'Inline'; +$lang['diff_side'] = 'Side by Side'; $lang['line'] = 'Zeile'; $lang['breadcrumb'] = 'Zuletzt angesehen'; $lang['youarehere'] = 'Du befindest dich hier'; @@ -288,4 +291,4 @@ $lang['days'] = 'vor %d Tagen'; $lang['hours'] = 'vor %d Stunden'; $lang['minutes'] = 'vor %d Minuten'; $lang['seconds'] = 'vor %d Sekunden'; -$lang['wordblock'] = 'Deine Änderungen konnten nicht gespeichert werden, da Teile des Texts blockierte Wörter (Spam) enthalten.'; +$lang['wordblock'] = 'Deine Bearbeitung wurde nicht gespeichert, da sie gesperrten Text enthielt (Spam).'; diff --git a/inc/lang/de-informal/resendpwd.txt b/inc/lang/de-informal/resendpwd.txt index 4dcd4bb4d..a0a714218 100644 --- a/inc/lang/de-informal/resendpwd.txt +++ b/inc/lang/de-informal/resendpwd.txt @@ -1,3 +1,3 @@ ====== Neues Passwort anfordern ====== -Fülle alle Felder unten aus, um ein neues Passwort für deinen Zugang zu erhalten. Das neue Passwort wird an deine gespeicherte E-Mail-Adresse geschickt. Der Benutzername sollte dein Wiki-Benutzername sein. +Fülle alle Felder unten aus, um ein neues Passwort für deinen Zugang zu erhalten. Das neue Passwort wird an deine gespeicherte E-Mail-Adresse geschickt. Der Benutzername muss deinem Wiki-Benutzernamen entsprechen. diff --git a/inc/lang/de-informal/revisions.txt b/inc/lang/de-informal/revisions.txt index e4a7be8f1..b69169a4e 100644 --- a/inc/lang/de-informal/revisions.txt +++ b/inc/lang/de-informal/revisions.txt @@ -1,4 +1,4 @@ ====== Ältere Versionen ====== -Dies sind ältere Versionen des gewählten Dokuments. Um zu einer älteren Version zurückzukehren, wähle die entsprechende Version aus, klicke auf **''[Diese Seite bearbeiten]''** und speichere sie erneut ab. +Dies sind ältere Versionen der gewählten Seite. Um zu einer älteren Version zurückzukehren, wähle die entsprechende Version aus, klicke auf **''[Diese Seite bearbeiten]''** und speichere sie erneut ab. diff --git a/inc/lang/de/denied.txt b/inc/lang/de/denied.txt index b87965067..8efa81f1b 100644 --- a/inc/lang/de/denied.txt +++ b/inc/lang/de/denied.txt @@ -1,4 +1,4 @@ ====== Zugang verweigert ====== -Sie haben nicht die erforderlichen Rechte, um diese Aktion durchzuführen. Eventuell sind Sie nicht beim Wiki angemeldet? +Sie haben nicht die erforderliche Berechtigung, um diese Aktion durchzuführen. Eventuell sind Sie nicht am Wiki angemeldet? diff --git a/inc/lang/de/lang.php b/inc/lang/de/lang.php index 3a3afdc16..f9f250994 100644 --- a/inc/lang/de/lang.php +++ b/inc/lang/de/lang.php @@ -81,14 +81,14 @@ $lang['regmailfail'] = 'Offenbar ist ein Fehler beim Versenden der Pas $lang['regbadmail'] = 'Die angegebene E-Mail-Adresse scheint ungültig zu sein. Falls dies ein Fehler ist, wenden Sie sich bitte an den Wiki-Admin.'; $lang['regbadpass'] = 'Die beiden eingegeben Passwörter stimmen nicht überein. Bitte versuchen Sie es noch einmal.'; $lang['regpwmail'] = 'Ihr DokuWiki Passwort'; -$lang['reghere'] = 'Sie haben noch keinen Zugang? Hier anmelden'; +$lang['reghere'] = 'Sie haben noch keinen Zugang? Hier registrieren'; $lang['profna'] = 'Änderung des Benutzerprofils in diesem Wiki nicht möglich.'; $lang['profnochange'] = 'Keine Änderungen, nichts zu tun.'; -$lang['profnoempty'] = 'Es muß ein Name und eine E-Mail-Adresse angegeben werden.'; +$lang['profnoempty'] = 'Es muss ein Name und eine E-Mail-Adresse angegeben werden.'; $lang['profchanged'] = 'Benutzerprofil erfolgreich geändert.'; $lang['pwdforget'] = 'Passwort vergessen? Fordere ein neues an'; $lang['resendna'] = 'Passwörter versenden ist in diesem Wiki nicht möglich.'; -$lang['resendpwd'] = 'Neues Passwort schicken für'; +$lang['resendpwd'] = 'Neues Passwort senden für'; $lang['resendpwdmissing'] = 'Es tut mir Leid, aber Sie müssen alle Felder ausfüllen.'; $lang['resendpwdnouser'] = 'Es tut mir Leid, aber der Benutzer existiert nicht in unserer Datenbank.'; $lang['resendpwdbadauth'] = 'Es tut mir Leid, aber dieser Authentifizierungscode ist ungültig. Stellen Sie sicher, dass Sie den kompletten Bestätigungslink verwendet haben.'; @@ -113,13 +113,13 @@ $lang['js']['mediadisplay'] = 'Linktyp'; $lang['js']['mediaalign'] = 'Anordnung'; $lang['js']['mediasize'] = 'Bildgröße'; $lang['js']['mediatarget'] = 'Linkziel'; -$lang['js']['mediaclose'] = 'Schliessen'; +$lang['js']['mediaclose'] = 'Schließen'; $lang['js']['mediainsert'] = 'Einfügen'; $lang['js']['mediadisplayimg'] = 'Bild anzeigen.'; $lang['js']['mediadisplaylnk'] = 'Nur den Link anzeigen.'; $lang['js']['mediasmall'] = 'Kleine Version'; $lang['js']['mediamedium'] = 'Mittlere Version'; -$lang['js']['medialarge'] = 'Grosse Version'; +$lang['js']['medialarge'] = 'Große Version'; $lang['js']['mediaoriginal'] = 'Originalversion'; $lang['js']['medialnk'] = 'Link zur Detailseite'; $lang['js']['mediadirect'] = 'Direktlink zum Original'; @@ -169,6 +169,9 @@ $lang['yours'] = 'Ihre Version'; $lang['diff'] = 'Zeige Unterschiede zu aktueller Version'; $lang['diff2'] = 'Zeige Unterschiede der ausgewählten Versionen'; $lang['difflink'] = 'Link zu dieser Vergleichsansicht'; +$lang['diff_type'] = 'Unterschiede anzeigen:'; +$lang['diff_inline'] = 'Inline'; +$lang['diff_side'] = 'Side by Side'; $lang['line'] = 'Zeile'; $lang['breadcrumb'] = 'Zuletzt angesehen'; $lang['youarehere'] = 'Sie befinden sich hier'; @@ -179,10 +182,10 @@ $lang['created'] = 'angelegt'; $lang['restored'] = 'alte Version wieder hergestellt'; $lang['external_edit'] = 'Externe Bearbeitung'; $lang['summary'] = 'Zusammenfassung'; -$lang['noflash'] = 'Das Adobe Flash Plugin wird benötigt, um diesen Ihnalt anzuzeigen.'; +$lang['noflash'] = 'Das Adobe Flash Plugin wird benötigt, um diesen Inhalt anzuzeigen.'; $lang['download'] = 'Schnipsel herunterladen'; $lang['mail_newpage'] = 'Neue Seite:'; -$lang['mail_changed'] = 'Seite geaendert:'; +$lang['mail_changed'] = 'Seite geändert:'; $lang['mail_subscribe_list'] = 'Geänderte Seiten im Namensraum:'; $lang['mail_new_user'] = 'Neuer Benutzer:'; $lang['mail_upload'] = 'Datei hochgeladen:'; @@ -239,7 +242,7 @@ $lang['subscr_m_current_header'] = 'Aktuelle Abonnements'; $lang['subscr_m_unsubscribe'] = 'Löschen'; $lang['subscr_m_subscribe'] = 'Abonnieren'; $lang['subscr_m_receive'] = 'Benachrichtigung'; -$lang['subscr_style_every'] = 'Email bei jeder Bearbeitung'; +$lang['subscr_style_every'] = 'E-Mail bei jeder Bearbeitung'; $lang['subscr_style_digest'] = 'Zusammenfassung der Änderungen für jede veränderte Seite (Alle %.2f Tage)'; $lang['subscr_style_list'] = 'Liste der geänderten Seiten (Alle %.2f Tage)'; $lang['authmodfailed'] = 'Benutzerüberprüfung nicht möglich. Bitte wenden Sie sich an den Systembetreuer.'; @@ -251,7 +254,7 @@ $lang['i_enableacl'] = 'Zugangskontrolle (ACL) aktivieren (empfohlen)' $lang['i_superuser'] = 'Administrator Benutzername'; $lang['i_problems'] = 'Das Installationsprogramm hat unten aufgeführte Probleme festgestellt, die zunächst behoben werden müssen bevor Sie mit der Installation fortfahren können.'; $lang['i_modified'] = 'Aus Sicherheitsgründen arbeitet dieses Script nur mit einer neuen, unmodifizierten DokuWiki Installation. Sie sollten entweder alle Dateien noch einmal frisch installieren oder die Dokuwiki-Installationsanleitung konsultieren.'; -$lang['i_funcna'] = 'Die PHP Funktion %s ist nicht verfügbar. Unter Umständen wurde sie von Ihrem Hoster deaktiviert?'; +$lang['i_funcna'] = 'Die PHP-Funktion %s ist nicht verfügbar. Unter Umständen wurde sie von Ihrem Hoster deaktiviert?'; $lang['i_phpver'] = 'Ihre PHP-Version %s ist niedriger als die benötigte Version %s. Bitte aktualisieren Sie Ihre PHP-Installation.'; $lang['i_permfail'] = '%s ist nicht durch DokuWiki beschreibbar. Sie müssen die Berechtigungen dieses Ordners ändern!'; $lang['i_confexists'] = '%s existiert bereits'; @@ -273,7 +276,7 @@ $lang['mu_gridstat'] = 'Status'; $lang['mu_namespace'] = 'Namensraum'; $lang['mu_browse'] = 'Durchsuchen'; $lang['mu_toobig'] = 'zu groß'; -$lang['mu_ready'] = 'bereit zum hochladen'; +$lang['mu_ready'] = 'bereit zum Hochladen'; $lang['mu_done'] = 'fertig'; $lang['mu_fail'] = 'gescheitert'; $lang['mu_authfail'] = 'Sitzung abgelaufen'; @@ -289,4 +292,4 @@ $lang['days'] = 'vor %d Tagen'; $lang['hours'] = 'vor %d Stunden'; $lang['minutes'] = 'vor %d Minuten'; $lang['seconds'] = 'vor %d Sekunden'; -$lang['wordblock'] = 'Deine Bearbeitung wurde nicht gespeichert, da sie gesperrten Text enthielt (Spam).'; +$lang['wordblock'] = 'Ihre Bearbeitung wurde nicht gespeichert, da sie gesperrten Text enthielt (Spam).'; diff --git a/inc/lang/de/resendpwd.txt b/inc/lang/de/resendpwd.txt index 2ff639369..a63fd5d55 100644 --- a/inc/lang/de/resendpwd.txt +++ b/inc/lang/de/resendpwd.txt @@ -1,3 +1,3 @@ ====== Neues Passwort anfordern ====== -Füllen Sie alle Felder unten aus, um ein neues Passwort für Ihren Zugang zu erhalten. Das neue Passwort wird an Ihre gespeicherte E-Mail-Adresse geschickt. Der Benutzername sollte Ihr Wiki-Benutzername sein. +Füllen Sie alle Felder unten aus, um ein neues Passwort für Ihren Zugang zu erhalten. Das neue Passwort wird an Ihre gespeicherte E-Mail-Adresse geschickt. Der Benutzername muss Ihrem Wiki-Benutzernamen entsprechen. diff --git a/inc/lang/de/revisions.txt b/inc/lang/de/revisions.txt index e1bafdd2d..843c3f9f4 100644 --- a/inc/lang/de/revisions.txt +++ b/inc/lang/de/revisions.txt @@ -1,4 +1,4 @@ ====== Ältere Versionen ====== -Dies sind ältere Versionen des gewählten Dokuments. Um zu einer älteren Version zurückzukehren, wählen Sie die entsprechende Version aus, klicken auf **''[Diese Seite bearbeiten]''** und speichern Sie sie erneut ab. +Dies sind ältere Versionen der gewählten Seite. Um zu einer älteren Version zurückzukehren, wählen Sie die entsprechende Version aus, klicken auf **''[Diese Seite bearbeiten]''** und speichern Sie diese erneut ab. -- cgit v1.2.3 From 15965e387dfad6775563aebc18d38eda4fddf53b Mon Sep 17 00:00:00 2001 From: Shuo-Ting Jian Date: Fri, 18 Mar 2011 12:53:10 +0100 Subject: Traditional Chinese language update --- inc/lang/zh-tw/lang.php | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'inc') diff --git a/inc/lang/zh-tw/lang.php b/inc/lang/zh-tw/lang.php index 5bf790a00..074c510e9 100644 --- a/inc/lang/zh-tw/lang.php +++ b/inc/lang/zh-tw/lang.php @@ -9,6 +9,7 @@ * @author Wayne San * @author Cheng-Wei Chien * @author Danny Lin + * @author Shuo-Ting Jian */ $lang['encoding'] = 'utf-8'; $lang['direction'] = 'ltr'; @@ -160,6 +161,9 @@ $lang['yours'] = '您的版本'; $lang['diff'] = '顯示與目前版本的差異'; $lang['diff2'] = '顯示選擇版本間的差異'; $lang['difflink'] = '連向這個比對檢視'; +$lang['diff_type'] = '檢視差異:'; +$lang['diff_inline'] = '行內'; +$lang['diff_side'] = '並排'; $lang['line'] = '行'; $lang['breadcrumb'] = '足跡'; $lang['youarehere'] = '您在這裡'; -- cgit v1.2.3 From dddd93c42628711c42d87c1be06c9a64ca67101a Mon Sep 17 00:00:00 2001 From: Matej Urban Date: Fri, 18 Mar 2011 13:00:03 +0100 Subject: Slovak language update --- inc/lang/sl/admin.txt | 4 ++-- inc/lang/sl/backlinks.txt | 3 +-- inc/lang/sl/index.txt | 2 +- inc/lang/sl/install.html | 20 ++++++++++++++++++++ inc/lang/sl/lang.php | 10 +++++----- inc/lang/sl/login.txt | 2 +- inc/lang/sl/stopwords.txt | 18 ++++++++++++++++++ inc/lang/sl/subscr_single.txt | 22 ++++++++++++++++++++++ 8 files changed, 70 insertions(+), 11 deletions(-) create mode 100644 inc/lang/sl/install.html create mode 100644 inc/lang/sl/stopwords.txt create mode 100644 inc/lang/sl/subscr_single.txt (limited to 'inc') diff --git a/inc/lang/sl/admin.txt b/inc/lang/sl/admin.txt index 89b924e08..cee19deff 100644 --- a/inc/lang/sl/admin.txt +++ b/inc/lang/sl/admin.txt @@ -1,3 +1,3 @@ -===== Skrbnitvo ===== +===== Skrbništvo ===== -Spodaj je naveden seznam skrbnikih opravil sistema DokuWiki. \ No newline at end of file +Navedene možnosti omogočajo skrbniško prilagajanje nastavitev sistema DokuWiki. diff --git a/inc/lang/sl/backlinks.txt b/inc/lang/sl/backlinks.txt index 466f96cf4..5e4d8ffa7 100644 --- a/inc/lang/sl/backlinks.txt +++ b/inc/lang/sl/backlinks.txt @@ -1,4 +1,3 @@ ====== Povratne povezave ====== -Spodaj je naveden seznam strani, ki so povezane na trenutno stran. CamelCase povezave niso zaznane kot povratne povezave. - +Spodaj je naveden seznam strani, ki so povezane na trenutno stran. EnoBesedne povezave niso zaznane kot povratne povezave. diff --git a/inc/lang/sl/index.txt b/inc/lang/sl/index.txt index 81ccd47ad..dd54d2bed 100644 --- a/inc/lang/sl/index.txt +++ b/inc/lang/sl/index.txt @@ -1,4 +1,4 @@ ====== Kazalo ====== -Na spodnjem seznamu so izpisane vse wiki strani, ki so na voljo, urejene pa so skladno z [[doku>namespaces|imenskimi prostori]]. +Na spodnjem seznamu so izpisane vse wiki strani, ki so na voljo, razvrščene pa so po posameznih [[doku>namespaces|imenskih prostorih]]. diff --git a/inc/lang/sl/install.html b/inc/lang/sl/install.html new file mode 100644 index 000000000..6fb6bead3 --- /dev/null +++ b/inc/lang/sl/install.html @@ -0,0 +1,20 @@ +

Stran je namenjena pomoči pri prvi namestitvi in nastavitvi spletišča +Dokuwiki. Več podrobnosti o tem je mogoče najti na straneh dokumentacije +namestitve.

+ +

Sistem DokuWiki uporablja običajne besedilne datoteke za shranjevanje +wiki strani in drugih podrobnosti o teh straneh (npr. slike, kazalo, stare +različice in drugo). Za pravilno delovanje mora imeti sistem DokuWiki prost +dostop do map in datotek, zato je ključno, da so dovoljenja določena pravilno. +Z namestilnikom ni mogoče spreminjanje dovoljenj map. To je običajno najlažje +narediti v ukazni lupini ali pa, če spletišče Wiki gostuje na zunanjih +strežnikih, preko nadzornika FTP povezave (npr. cPanel).

+ +

Z namestilnikom lahko spremenite nastavitve dostopa sistema Dokuwiki +ACL, ki omogoča skrbniško prijavo in dostop do upravljanja z vstavki, +uporabniki, dovoljenji dostopa uporabnikov do določenih strani in do nekaterih +nastavitev. Za delovanje sistema ACL ni bistven, vendar pa močno vpliva na +enostavnost upravljanja strani in nastavitev.

+ +

Zahtevnejši uporabniki ali skrbniki s posebnimi zahtevami namestitve sistema +si lahko več podrobnosti ogledajo na straneh navodil namestitve in nastavitve.

\ No newline at end of file diff --git a/inc/lang/sl/lang.php b/inc/lang/sl/lang.php index 41723f0ba..0e6c0a706 100644 --- a/inc/lang/sl/lang.php +++ b/inc/lang/sl/lang.php @@ -10,7 +10,7 @@ * @author Matej Urbančič (mateju@svn.gnome.org) */ $lang['encoding'] = 'utf-8'; -$lang['direction'] = 'L-D'; +$lang['direction'] = 'ltr'; $lang['doublequoteopening'] = '„'; $lang['doublequoteclosing'] = '“'; $lang['singlequoteopening'] = '‚'; @@ -48,16 +48,16 @@ $lang['btn_draft'] = 'Uredi osnutek'; $lang['btn_recover'] = 'Obnovi osnutek'; $lang['btn_draftdel'] = 'Izbriši osnutek'; $lang['btn_revert'] = 'Povrni'; -$lang['btn_register'] = 'Vpis računa'; $lang['loggedinas'] = 'Prijava kot'; $lang['user'] = 'Uporabniško ime'; $lang['pass'] = 'Geslo'; $lang['newpass'] = 'Novo geslo'; $lang['oldpass'] = 'Potrdi trenutno geslo'; -$lang['passchk'] = 'znova'; +$lang['passchk'] = 'Ponovi novo geslo'; $lang['remember'] = 'Zapomni si me'; $lang['fullname'] = 'Pravo ime'; $lang['email'] = 'Elektronski naslov'; +$lang['register'] = 'Vpis računa'; $lang['profile'] = 'Uporabniški profil'; $lang['badlogin'] = 'Uporabniško ime ali geslo je napačno.'; $lang['minoredit'] = 'Manjše spremembe'; @@ -99,7 +99,7 @@ $lang['js']['searchmedia'] = 'Poišči datoteke'; $lang['js']['keepopen'] = 'Od izbiri ohrani okno odprto'; $lang['js']['hidedetails'] = 'Skrij podrobnosti'; $lang['js']['mediatitle'] = 'Nastavitve povezave'; -$lang['js']['mediadisplay'] = 'Vrsta povezaave'; +$lang['js']['mediadisplay'] = 'Vrsta povezave'; $lang['js']['mediaalign'] = 'Poravnava'; $lang['js']['mediasize'] = 'Velikost slike'; $lang['js']['mediatarget'] = 'Mesto povezave'; @@ -119,7 +119,7 @@ $lang['js']['medialeft'] = 'Poravnaj sliko na levo.'; $lang['js']['mediaright'] = 'Poravnaj sliko na desno.'; $lang['js']['mediacenter'] = 'Poravnaj sliko na sredini.'; $lang['js']['medianoalign'] = 'Ne uporabi poravnave.'; -$lang['js']['nosmblinks'] = 'Povezovanje do souporabenih datotek sistema Windows deluje le pri uporabi brskalnika Microsoft Internet Explorer. Povezavo je mogoče kopirati ročno.'; +$lang['js']['nosmblinks'] = 'Povezovanje do souporabnih datotek sistema Windows deluje le pri uporabi brskalnika Microsoft Internet Explorer. Povezavo je mogoče kopirati ročno.'; $lang['js']['linkwiz'] = 'Čarovnik za povezave'; $lang['js']['linkto'] = 'Poveži na:'; $lang['js']['del_confirm'] = 'Ali naj se res izbrišejo izbrani predmeti?'; diff --git a/inc/lang/sl/login.txt b/inc/lang/sl/login.txt index 297cd53f5..eeae0c96c 100644 --- a/inc/lang/sl/login.txt +++ b/inc/lang/sl/login.txt @@ -1,3 +1,3 @@ ====== Prijava ====== -Niste prijavljeni! Spodaj vnesite ustrezne podatke in se prijavite. Prijaviti se je mogoče, če so omogočeni piškotki. +Niste prijavljeni! Spodaj vnesite ustrezne podatke in se prijavite. Prijaviti se je mogoče le, če so omogočeni piškotki. diff --git a/inc/lang/sl/stopwords.txt b/inc/lang/sl/stopwords.txt new file mode 100644 index 000000000..5d61539e7 --- /dev/null +++ b/inc/lang/sl/stopwords.txt @@ -0,0 +1,18 @@ +# To je seznam besed, ki jih ustvarjalnik kazala prezre. Seznam je sestavljen iz +# besede, ki so zapisane vsaka v svoji vrstici. Datoteka mora biti zapisana s konnim +# UNIX znakom vrstice. Besede kraje od treh znakov so iz kazala izloene samodejno +# zaradi preglednosti. Seznam se s bo s asom spreminjal in dopolnjeval. +moja +moje +moji +mojo +njegovi +njegove +njegovo +njeno +njeni +njene +njihova +njihove +njihovi +njihovo diff --git a/inc/lang/sl/subscr_single.txt b/inc/lang/sl/subscr_single.txt new file mode 100644 index 000000000..9fd64be0e --- /dev/null +++ b/inc/lang/sl/subscr_single.txt @@ -0,0 +1,22 @@ +Pozdravljeni! + +Stran @PAGE@ na spletišču Wiki @TITLE@ je spremenjena. +Spremenjeno je: + +-------------------------------------------------------- +@DIFF@ +-------------------------------------------------------- + +Datum : @DATE@ +Uporabnik : @USER@ +Povzetek urejanja: @SUMMARY@ +Stara različica : @OLDPAGE@ +Nova različica : @NEWPAGE@ + +Preklic obveščanja o spremembah strani je mogoče določiti +na Wiki naslovu @DOKUWIKIURL@ in z obiskom @NEWPAGE@, +kjer se je mogoče odjaviti od spremljanja strani ali +imenskega prostora. + +-- +Sporočilo je samodejno ustvarjeno na spletišču @DOKUWIKIURL@ \ No newline at end of file -- cgit v1.2.3 From 04556a0aabe1497bd711ca45405b8cfa2888d427 Mon Sep 17 00:00:00 2001 From: Kristian Kankainen Date: Fri, 18 Mar 2011 13:04:30 +0100 Subject: Estonian language update --- inc/lang/et/lang.php | 418 ++++++++++++++++++++++++++------------------------- 1 file changed, 211 insertions(+), 207 deletions(-) (limited to 'inc') diff --git a/inc/lang/et/lang.php b/inc/lang/et/lang.php index 5fc9c88d5..c7060ebca 100644 --- a/inc/lang/et/lang.php +++ b/inc/lang/et/lang.php @@ -3,213 +3,217 @@ * Estonian language file * * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * @author Oliver S6ro - * @author Aari Juhanson - * @author Kaiko Kaur + * @author Oliver S6ro + * @author Aari Juhanson + * @author Kaiko Kaur + * @author kristian.kankainen@kuu.la */ -$lang['encoding'] = 'utf-8'; -$lang['direction'] = 'ltr'; -$lang['doublequoteopening'] = '„';//„ -$lang['doublequoteclosing'] = '“';//“ -$lang['singlequoteopening'] = '‚';//‚ -$lang['singlequoteclosing'] = '‘';//‘ - -$lang['btn_edit'] = 'Toimeta seda lehte'; -$lang['btn_source'] = 'Näita lehepõhja'; -$lang['btn_show'] = 'Näita lehte'; -$lang['btn_create'] = 'Tekita selle lingi alla leht'; -$lang['btn_search'] = 'Otsi'; -$lang['btn_save'] = 'Salvesta'; -$lang['btn_preview']= 'Eelvaade'; -$lang['btn_top'] = 'Tagasi lehe algusesse'; -$lang['btn_revs'] = 'Eelmised versioonid'; -$lang['btn_recent'] = 'Viimased muudatused'; -$lang['btn_upload'] = 'Lae üles'; -$lang['btn_cancel'] = 'Katkesta'; -$lang['btn_index'] = 'Sisukord'; -$lang['btn_secedit']= 'Toimeta'; -$lang['btn_login'] = 'Logi sisse'; -$lang['btn_logout'] = 'Logi välja'; -$lang['btn_admin'] = 'Administreeri'; -$lang['btn_update'] = 'Uuenda'; -$lang['btn_delete'] = 'Kustuta'; -$lang['btn_newer'] = '<< varajasemad'; -$lang['btn_older'] = '>> hilisemad'; -$lang['btn_back'] = 'Tagasi'; -$lang['btn_backtomedia'] = 'Tagasi faili valikusse'; -$lang['btn_profile'] = 'Minu info'; -$lang['btn_reset'] = 'Taasta'; -$lang['btn_resendpwd'] = 'Saada uus parool'; -$lang['btn_draft'] = 'Toimeta mustandit'; -$lang['btn_recover'] = 'Taata mustand'; -$lang['btn_draftdel'] = 'Kustuta mustand'; -$lang['btn_register'] = 'Registreeri uus kasutaja'; - -$lang['newpass'] = 'Uus parool'; -$lang['oldpass'] = 'Vana parool'; -$lang['passchk'] = 'Korda uut parooli'; -$lang['profile'] = 'Kasutaja info'; -$lang['minoredit'] = 'Ebaolulised muudatused'; -$lang['draftdate'] = 'Mustand automaatselt salvestatud'; -$lang['regsuccess2'] = 'Kasutaja sai tehtud.'; -$lang['regbadpass'] = 'Uus parool on kirjutatud erinevalt. Proovi uuesti.'; -$lang['uploadexist'] = 'Fail on juba olemas. Midagi ei muudetud.'; -$lang['deletesucc'] = 'Fail nimega "%s" sai kustutatud.'; -$lang['deletefail'] = 'Faili nimega "%s" ei kustutatud (kontrolli õigusi).'; -$lang['mediainuse'] = 'Faili nimega "%s" ei kustutatud, sest see on kasutuses.'; -$lang['js']['keepopen'] = 'Jäta aken peale valiku sooritamist avatuks'; -$lang['js']['hidedetails'] = 'Peida detailid'; -$lang['mediausage'] = 'Kasuta järgmist kirjapilti sellele failile viitamaks:'; -$lang['mediaview'] = 'Vaata faili algsel kujul.'; -$lang['mediaroot'] = 'juur'; -$lang['mediaupload'] = 'Lae fail sellesse nimeruumi (kataloogi). Et tekitada veel alam nimeruum kasuta koolonit Wiki nimes.'; -$lang['mediaextchange'] = 'Faili laiend .%s-st %s-ks!'; -$lang['ref_inuse'] = 'Seda faili ei saa kustutada, sest teda kasutavad järgmised lehed:'; -$lang['ref_hidden'] = 'Mõned viidad failile on lehtedel, millele sul ei ole ligipääsu'; -$lang['youarehere'] = 'Sa oled siin'; -$lang['mail_new_user'] = 'Uus kasutaja:'; -$lang['qb_strike'] = 'Läbijoonitud tekst'; -$lang['qb_smileys'] = 'Emotikonid'; -$lang['qb_chars'] = 'Erisümbolid'; -$lang['admin_register'] = 'Lisa kasutaja'; - - -#$lang['reference'] = ''; -#$lang['btn_backlink'] = ''; -#$lang['profna'] = ''; -$lang['btn_subscribe'] = 'Jälgi seda lehte (teated meilile)'; -$lang['btn_unsubscribe'] = 'Lõpeta lehe jälgimine'; -$lang['profnochange'] = 'Muutused puuduvad.'; -$lang['profnoempty'] = 'Tühi nimi ega meiliaadress pole lubatud.'; -$lang['profchanged'] = 'Kasutaja info edukalt muudetud'; -$lang['pwdforget'] = 'Unustasid parooli? Tee uus'; -$lang['resendna'] = 'See wiki ei toeta parooli taassaatmist.'; -$lang['resendpwd'] = 'Saada uus parool'; -$lang['resendpwdmissing'] = 'Khmm... Sa pead täitma kõik väljad.'; -$lang['resendpwdnouser'] = 'Aga sellist kasutajat ei ole.'; -$lang['resendpwdbadauth'] = 'See autentimiskood ei ole õige. Kontrolli, et kopeerisid terve lingi.'; -$lang['resendpwdconfirm'] = 'Kinnituslink saadeti meilile.'; -$lang['resendpwdsuccess'] = 'Uus parool saadeti Sinu meilile.'; -$lang['txt_overwrt'] = 'Kirjutan olemasoleva faili üle'; -$lang['metaedit'] = 'Muuda lisainfot'; -$lang['metasaveerr'] = 'Lisainfo salvestamine läks untsu.'; -$lang['metasaveok'] = 'Lisainfo salvestatud'; -$lang['img_backto'] = 'Tagasi'; -$lang['img_title'] = 'Tiitel'; -$lang['img_caption'] = 'Kirjeldus'; -$lang['img_date'] = 'Kuupäev'; -$lang['img_fname'] = 'Faili nimi'; -$lang['img_fsize'] = 'Suurus'; -$lang['img_artist'] = 'Autor'; -#$lang['img_copyr'] = ''; -$lang['img_format'] = 'Formaat'; -$lang['img_camera'] = 'Kaamera'; -$lang['img_keywords'] = 'Võtmesõnad'; - -$lang['i_chooselang'] = 'Vali keel'; -$lang['i_installer'] = 'DokuWiki paigaldaja'; -$lang['i_wikiname'] = 'Wiki nimi'; -$lang['i_enableacl'] = 'Kas lubada kasutajate haldus (soovitatav)'; -$lang['i_superuser'] = 'Superkasutaja'; -$lang['i_problems'] = 'Paigaldaja leidis mõned vead, mis on allpool välja toodud. Enne vigade eemaldamist ei saa jätkata.'; -$lang['i_modified'] = 'Õnnetuste vältimiseks läheb see skript käima ainult värskelt paigaldatud ja muutmata Dokuwiki peal. - Sa peaksid ilmselt kogu koodi uuesti lahti pakkima. Vaata ka Dokuwiki installeerimis juhendit'; -$lang['i_funcna'] = 'PHP funktsiooni %s ei ole olemas.võibolla sinu serveri hooldaja on selle mingil põhjusel keelanud?'; -$lang['i_permfail'] = 'Dokuwiki ei saa kirjutada faili %s. Kontrolli serveris failide õigused üle.'; -$lang['i_confexists'] = '%s on juba olemas'; -$lang['i_writeerr'] = 'Faili %s ei lubata tekitada. Kontrolli kataloogi ja faili õigusi.'; -#$lang['i_badhash'] = ''; -$lang['i_badval'] = '%s - lubamatu või tühi väärtus'; -$lang['i_success'] = 'Seadistamine on õnnelikult lõpule viidud. Sa võid nüüd kustutada faili install.php. Alusta oma uue DokuWiki täitmist.'; -$lang['i_failure'] = 'Konfiguratsiooni faili kirjutamisel esines vigu. Võimalik, et pead need käsitsi parandama enne uue DokuWiki täitma asumist.'; -$lang['i_policy'] = 'Wiki õiguste algne poliitika'; -$lang['i_pol0'] = 'Avatud (lugemine, kirjutamine ja üleslaadimine kõigile lubatud)'; -$lang['i_pol1'] = 'Avalikuks lugemiseks (lugeda saavad kõik, kirjutada ja üles laadida vaid registreeritud kasutajad)'; -$lang['i_pol2'] = 'Suletud (kõik õigused, kaasaarvatud lugemine on lubatud vaid registreeritud kasutajatele)'; - -$lang['loggedinas'] = 'Logis sisse kui'; -$lang['user'] = 'Kasutaja'; -$lang['pass'] = 'Parool'; -$lang['remember'] = 'Pea mind meeles'; -$lang['fullname'] = 'Täielik nimi'; -$lang['email'] = 'E-post'; -$lang['badlogin'] = 'Oops, Sinu kasutajanimi või parool oli vale.'; - -$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.'; -$lang['regmailfail']= 'Ilmselt tekkis e-posti teel parooli saatmisel mingi tõrge. Palun suhtle sel teemal +$lang['encoding'] = 'utf-8'; +$lang['direction'] = 'ltr'; +$lang['doublequoteopening'] = '„'; +$lang['doublequoteclosing'] = '“'; +$lang['singlequoteopening'] = '‚'; +$lang['singlequoteclosing'] = '‘'; +$lang['btn_edit'] = 'Toimeta seda lehte'; +$lang['btn_source'] = 'Näita lehepõhja'; +$lang['btn_show'] = 'Näita lehte'; +$lang['btn_create'] = 'Tekita selle lingi alla leht'; +$lang['btn_search'] = 'Otsi'; +$lang['btn_save'] = 'Salvesta'; +$lang['btn_preview'] = 'Eelvaade'; +$lang['btn_top'] = 'Tagasi lehe algusesse'; +$lang['btn_newer'] = '<< varajasemad'; +$lang['btn_older'] = '>> hilisemad'; +$lang['btn_revs'] = 'Eelmised versioonid'; +$lang['btn_recent'] = 'Viimased muudatused'; +$lang['btn_upload'] = 'Lae üles'; +$lang['btn_cancel'] = 'Katkesta'; +$lang['btn_index'] = 'Sisukord'; +$lang['btn_secedit'] = 'Toimeta'; +$lang['btn_login'] = 'Logi sisse'; +$lang['btn_logout'] = 'Logi välja'; +$lang['btn_admin'] = 'Administreeri'; +$lang['btn_update'] = 'Uuenda'; +$lang['btn_delete'] = 'Kustuta'; +$lang['btn_back'] = 'Tagasi'; +$lang['btn_backtomedia'] = 'Tagasi faili valikusse'; +$lang['btn_subscribe'] = 'Jälgi seda lehte (teated meilile)'; +$lang['btn_profile'] = 'Minu info'; +$lang['btn_reset'] = 'Taasta'; +$lang['btn_resendpwd'] = 'Saada uus parool'; +$lang['btn_draft'] = 'Toimeta mustandit'; +$lang['btn_recover'] = 'Taata mustand'; +$lang['btn_draftdel'] = 'Kustuta mustand'; +$lang['btn_revert'] = 'Taasta'; +$lang['btn_register'] = 'Registreeri uus kasutaja'; +$lang['loggedinas'] = 'Logis sisse kui'; +$lang['user'] = 'Kasutaja'; +$lang['pass'] = 'Parool'; +$lang['newpass'] = 'Uus parool'; +$lang['oldpass'] = 'Vana parool'; +$lang['passchk'] = 'Korda uut parooli'; +$lang['remember'] = 'Pea mind meeles'; +$lang['fullname'] = 'Täielik nimi'; +$lang['email'] = 'E-post'; +$lang['profile'] = 'Kasutaja info'; +$lang['badlogin'] = 'Oops, Sinu kasutajanimi või parool oli vale.'; +$lang['minoredit'] = 'Ebaolulised muudatused'; +$lang['draftdate'] = 'Mustand automaatselt salvestatud'; +$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.'; +$lang['regsuccess2'] = 'Kasutaja sai tehtud.'; +$lang['regmailfail'] = 'Ilmselt tekkis e-posti teel parooli saatmisel mingi tõrge. Palun suhtle sel teemal oma serveri administraatoriga!'; -$lang['regbadmail'] = 'Tundub, et Sinu antud e-posti aadress ei toimi - kui Sa arvad, et tegemist on +$lang['regbadmail'] = 'Tundub, et Sinu antud e-posti aadress ei toimi - kui Sa arvad, et tegemist on ekstitusega, suhtle oma serveri administraatoriga'; -$lang['regpwmail'] = 'Sinu DokuWiki parool'; -$lang['reghere'] = 'Sul ei olegi veel kasutajakontot? No aga tekita see siis endale!'; - -$lang['txt_upload'] = 'Vali fail, mida üles laadida'; -$lang['txt_filename'] = 'Siseta oma Wikinimi (soovituslik)'; -$lang['lockedby'] = 'Praegu on selle lukustanud'; -$lang['lockexpire'] = 'Lukustus aegub'; -$lang['willexpire'] = 'Teie lukustus selle lehe toimetamisele aegub umbes minuti pärast.\nIgasugu probleemide vältimiseks kasuta eelvaate nuppu, et lukustusarvesti taas tööle panna.'; - -$lang['js']['notsavedyet'] = "Sul on seal salvestamata muudatusi, mis kohe kõige kaduva teed lähevad.\nKas Sa ikka tahad edasi liikuda?"; -$lang['rssfailed'] = 'Sinu soovitud info ammutamisel tekkis viga: '; -$lang['nothingfound']= 'Oops, aga mitte muhvigi ei leitud.'; - -$lang['mediaselect'] = 'Hunnik faile'; -$lang['fileupload'] = 'Faili üleslaadimine'; -$lang['uploadsucc'] = 'Üleslaadimine läks ootuspäraselt hästi'; -$lang['uploadfail'] = 'Üleslaadimine läks nässu. Äkki pole Sa selleks lihtsalt piisavalt võimukas tegija?'; -$lang['uploadwrong'] = 'Ei saa Sa midagi üles laadida. Oops, aga seda tüüpi faili sul lihtsalt ei lubata üles laadida'; -$lang['namespaces'] = 'Alajaotus'; -$lang['mediafiles'] = 'Failid on Sulle kättesaadavad'; - -$lang['hits'] = 'Päringu tabamused'; -$lang['quickhits'] = 'Päringule vastavad lehed'; -$lang['toc'] = 'Sisujuht'; -$lang['current'] = 'Hetkel kehtiv'; -$lang['yours'] = 'Sinu versioon'; -$lang['diff'] = 'Näita erinevusi hetkel kehtiva versiooniga'; -$lang['line'] = 'Rida'; -$lang['breadcrumb'] = 'Käidud rada'; -$lang['lastmod'] = 'Viimati muutnud'; -$lang['by'] = 'persoon'; -$lang['deleted'] = 'eemaldatud'; -$lang['created'] = 'tekitatud'; -$lang['restored'] = 'vana versioon taastatud'; -$lang['summary'] = 'kokkuvõte muudatustest'; - -$lang['mail_newpage'] = 'leht lisatud:'; -$lang['mail_changed'] = 'leht muudetud'; - -$lang['nosmblinks'] = 'Windowsis võrguarvutiga ühendamine toimib ainult Internet Exploreris ja -sisevõrgus.\nAga Sa saad õnneks omale lingi kopeerida ja hiljem kuhugi kleepida.'; - -$lang['qb_bold'] = 'Rasvane kiri'; -$lang['qb_italic'] = 'Kaldkiri'; -$lang['qb_underl'] = 'Alajoonega kiri'; -$lang['qb_code'] = 'Koodi tekst'; -$lang['qb_h1'] = '1. astme pealkiri'; -$lang['qb_h2'] = '2. astme pealkiri'; -$lang['qb_h3'] = '3. astme pealkiri'; -$lang['qb_h4'] = '4. astme pealkiri'; -$lang['qb_h5'] = '5. astme pealkiri'; -$lang['qb_link'] = 'Siselink'; -$lang['qb_extlink'] = 'Välislink'; -$lang['qb_hr'] = 'Horisontaalne vahejoon'; -$lang['qb_ol'] = 'Nummerdatud nimikiri'; -$lang['qb_ul'] = 'Mummuga nimekiri'; -$lang['qb_media'] = 'Lisa pilte ja muid faile'; -$lang['qb_sig'] = 'Lisa allkiri!'; - -$lang['authmodfailed'] = 'Vigane kasutajate autentimise konfiguratsioon. Palun teavita sellest serveri haldajat.'; -$lang['authtempfail'] = 'Kasutajate autentimine on ajutiselt rivist väljas. Kui see olukord mõne aja jooksul ei parane, siis teavita sellest serveri haldajat.'; - -$lang['js']['del_confirm']= 'Kas kustutame selle kirje?'; - -#$lang['subscribe_success'] = ''; -#$lang['subscribe_error'] = ''; -#$lang['subscribe_noaddress'] = ''; -#$lang['unsubscribe_success'] = ''; -#$lang['unsubscribe_error'] = ''; - -//Setup VIM: ex: et ts=2 : +$lang['regbadpass'] = 'Uus parool on kirjutatud erinevalt. Proovi uuesti.'; +$lang['regpwmail'] = 'Sinu DokuWiki parool'; +$lang['reghere'] = 'Sul ei olegi veel kasutajakontot? No aga tekita see siis endale!'; +$lang['profna'] = 'Viki ei toeta profiili muudatusi'; +$lang['profnochange'] = 'Muutused puuduvad.'; +$lang['profnoempty'] = 'Tühi nimi ega meiliaadress pole lubatud.'; +$lang['profchanged'] = 'Kasutaja info edukalt muudetud'; +$lang['pwdforget'] = 'Unustasid parooli? Tee uus'; +$lang['resendna'] = 'See wiki ei toeta parooli taassaatmist.'; +$lang['resendpwd'] = 'Saada uus parool'; +$lang['resendpwdmissing'] = 'Khmm... Sa pead täitma kõik väljad.'; +$lang['resendpwdnouser'] = 'Aga sellist kasutajat ei ole.'; +$lang['resendpwdbadauth'] = 'See autentimiskood ei ole õige. Kontrolli, et kopeerisid terve lingi.'; +$lang['resendpwdconfirm'] = 'Kinnituslink saadeti meilile.'; +$lang['resendpwdsuccess'] = 'Uus parool saadeti Sinu meilile.'; +$lang['searchmedia'] = 'Otsi failinime:'; +$lang['searchmedia_in'] = 'Otsi %s'; +$lang['txt_upload'] = 'Vali fail, mida üles laadida'; +$lang['txt_filename'] = 'Siseta oma Wikinimi (soovituslik)'; +$lang['txt_overwrt'] = 'Kirjutan olemasoleva faili üle'; +$lang['lockedby'] = 'Praegu on selle lukustanud'; +$lang['lockexpire'] = 'Lukustus aegub'; +$lang['willexpire'] = 'Teie lukustus selle lehe toimetamisele aegub umbes minuti pärast.\nIgasugu probleemide vältimiseks kasuta eelvaate nuppu, et lukustusarvesti taas tööle panna.'; +$lang['js']['notsavedyet'] = 'Sul on seal salvestamata muudatusi, mis kohe kõige kaduva teed lähevad. +Kas Sa ikka tahad edasi liikuda?'; +$lang['js']['searchmedia'] = 'Otsi faile'; +$lang['js']['keepopen'] = 'Jäta aken peale valiku sooritamist avatuks'; +$lang['js']['hidedetails'] = 'Peida detailid'; +$lang['js']['mediatitle'] = 'Lingi sätted'; +$lang['js']['mediadisplay'] = 'Lingi liik'; +$lang['js']['mediaalign'] = 'Joondus'; +$lang['js']['mediasize'] = 'Pildi mõõtmed'; +$lang['js']['mediatarget'] = 'Lingi siht'; +$lang['js']['mediaclose'] = 'Sulge'; +$lang['js']['mediainsert'] = 'Sisesta'; +$lang['js']['mediadisplayimg'] = 'Näita pilti.'; +$lang['js']['mediadisplaylnk'] = 'Näita ainult linki.'; +$lang['js']['mediasmall'] = 'Väiksem suurus'; +$lang['js']['mediamedium'] = 'Keskmine suurus'; +$lang['js']['medialarge'] = 'Suurem suurus'; +$lang['js']['mediaoriginal'] = 'Originaali suurus'; +$lang['js']['medialnk'] = 'Link üksikasjadele'; +$lang['js']['mediadirect'] = 'Otselink originaalile'; +$lang['js']['medianolnk'] = 'Ilma lingita'; +$lang['js']['medianolink'] = 'Ära lingi pilti'; +$lang['js']['medialeft'] = 'Joonda pilt vasakule.'; +$lang['js']['mediaright'] = 'Joonda pilt paremale.'; +$lang['js']['mediacenter'] = 'Joonda pilt keskele.'; +$lang['js']['medianoalign'] = 'Ära joonda.'; +$lang['js']['nosmblinks'] = 'Lingid \'Windows shares\'ile töötab ainult Microsoft Internet Exploreriga. +Siiski võid kopeerida ja asetada lingi.'; +$lang['js']['linkwiz'] = 'Lingi nõustaja'; +$lang['js']['linkto'] = 'Lingi:'; +$lang['js']['del_confirm'] = 'Kas kustutame selle kirje?'; +$lang['js']['mu_btn'] = 'Laadi üles mittu faili'; +$lang['rssfailed'] = 'Sinu soovitud info ammutamisel tekkis viga: '; +$lang['nothingfound'] = 'Oops, aga mitte muhvigi ei leitud.'; +$lang['mediaselect'] = 'Hunnik faile'; +$lang['fileupload'] = 'Faili üleslaadimine'; +$lang['uploadsucc'] = 'Üleslaadimine läks ootuspäraselt hästi'; +$lang['uploadfail'] = 'Üleslaadimine läks nässu. Äkki pole Sa selleks lihtsalt piisavalt võimukas tegija?'; +$lang['uploadwrong'] = 'Ei saa Sa midagi üles laadida. Oops, aga seda tüüpi faili sul lihtsalt ei lubata üles laadida'; +$lang['uploadexist'] = 'Fail on juba olemas. Midagi ei muudetud.'; +$lang['uploadbadcontent'] = 'Üles laaditu ei sobinud %s faililaiendiga.'; +$lang['uploadsize'] = 'Üles laaditud fail on liiga suur (maksimaalne suurus on %s).'; +$lang['deletesucc'] = 'Fail nimega "%s" sai kustutatud.'; +$lang['deletefail'] = 'Faili nimega "%s" ei kustutatud (kontrolli õigusi).'; +$lang['mediainuse'] = 'Faili nimega "%s" ei kustutatud, sest see on kasutuses.'; +$lang['namespaces'] = 'Alajaotus'; +$lang['mediafiles'] = 'Failid on Sulle kättesaadavad'; +$lang['accessdenied'] = 'Ligipääs keelatud.'; +$lang['mediausage'] = 'Kasuta järgmist kirjapilti sellele failile viitamaks:'; +$lang['mediaview'] = 'Vaata faili algsel kujul.'; +$lang['mediaroot'] = 'juur'; +$lang['mediaupload'] = 'Lae fail sellesse nimeruumi (kataloogi). Et tekitada veel alam nimeruum kasuta koolonit Wiki nimes.'; +$lang['mediaextchange'] = 'Faili laiend .%s-st %s-ks!'; +$lang['ref_inuse'] = 'Seda faili ei saa kustutada, sest teda kasutavad järgmised lehed:'; +$lang['ref_hidden'] = 'Mõned viidad failile on lehtedel, millele sul ei ole ligipääsu'; +$lang['hits'] = 'Päringu tabamused'; +$lang['quickhits'] = 'Päringule vastavad lehed'; +$lang['toc'] = 'Sisujuht'; +$lang['current'] = 'Hetkel kehtiv'; +$lang['yours'] = 'Sinu versioon'; +$lang['diff'] = 'Näita erinevusi hetkel kehtiva versiooniga'; +$lang['line'] = 'Rida'; +$lang['breadcrumb'] = 'Käidud rada'; +$lang['youarehere'] = 'Sa oled siin'; +$lang['lastmod'] = 'Viimati muutnud'; +$lang['by'] = 'persoon'; +$lang['deleted'] = 'eemaldatud'; +$lang['created'] = 'tekitatud'; +$lang['restored'] = 'vana versioon taastatud'; +$lang['summary'] = 'kokkuvõte muudatustest'; +$lang['mail_newpage'] = 'leht lisatud:'; +$lang['mail_changed'] = 'leht muudetud'; +$lang['mail_new_user'] = 'Uus kasutaja:'; +$lang['qb_bold'] = 'Rasvane kiri'; +$lang['qb_italic'] = 'Kaldkiri'; +$lang['qb_underl'] = 'Alajoonega kiri'; +$lang['qb_code'] = 'Koodi tekst'; +$lang['qb_strike'] = 'Läbijoonitud tekst'; +$lang['qb_h1'] = '1. astme pealkiri'; +$lang['qb_h2'] = '2. astme pealkiri'; +$lang['qb_h3'] = '3. astme pealkiri'; +$lang['qb_h4'] = '4. astme pealkiri'; +$lang['qb_h5'] = '5. astme pealkiri'; +$lang['qb_link'] = 'Siselink'; +$lang['qb_extlink'] = 'Välislink'; +$lang['qb_hr'] = 'Horisontaalne vahejoon'; +$lang['qb_ol'] = 'Nummerdatud nimikiri'; +$lang['qb_ul'] = 'Mummuga nimekiri'; +$lang['qb_media'] = 'Lisa pilte ja muid faile'; +$lang['qb_sig'] = 'Lisa allkiri!'; +$lang['qb_smileys'] = 'Emotikonid'; +$lang['qb_chars'] = 'Erisümbolid'; +$lang['admin_register'] = 'Lisa kasutaja'; +$lang['metaedit'] = 'Muuda lisainfot'; +$lang['metasaveerr'] = 'Lisainfo salvestamine läks untsu.'; +$lang['metasaveok'] = 'Lisainfo salvestatud'; +$lang['img_backto'] = 'Tagasi'; +$lang['img_title'] = 'Tiitel'; +$lang['img_caption'] = 'Kirjeldus'; +$lang['img_date'] = 'Kuupäev'; +$lang['img_fname'] = 'Faili nimi'; +$lang['img_fsize'] = 'Suurus'; +$lang['img_artist'] = 'Autor'; +$lang['img_format'] = 'Formaat'; +$lang['img_camera'] = 'Kaamera'; +$lang['img_keywords'] = 'Võtmesõnad'; +$lang['authmodfailed'] = 'Vigane kasutajate autentimise konfiguratsioon. Palun teavita sellest serveri haldajat.'; +$lang['authtempfail'] = 'Kasutajate autentimine on ajutiselt rivist väljas. Kui see olukord mõne aja jooksul ei parane, siis teavita sellest serveri haldajat.'; +$lang['i_chooselang'] = 'Vali keel'; +$lang['i_installer'] = 'DokuWiki paigaldaja'; +$lang['i_wikiname'] = 'Wiki nimi'; +$lang['i_enableacl'] = 'Kas lubada kasutajate haldus (soovitatav)'; +$lang['i_superuser'] = 'Superkasutaja'; +$lang['i_problems'] = 'Paigaldaja leidis mõned vead, mis on allpool välja toodud. Enne vigade eemaldamist ei saa jätkata.'; +$lang['i_modified'] = 'Õnnetuste vältimiseks läheb see skript käima ainult värskelt paigaldatud ja muutmata Dokuwiki peal. + Sa peaksid ilmselt kogu koodi uuesti lahti pakkima. Vaata ka Dokuwiki installeerimis juhendit'; +$lang['i_funcna'] = 'PHP funktsiooni %s ei ole olemas.võibolla sinu serveri hooldaja on selle mingil põhjusel keelanud?'; +$lang['i_permfail'] = 'Dokuwiki ei saa kirjutada faili %s. Kontrolli serveris failide õigused üle.'; +$lang['i_confexists'] = '%s on juba olemas'; +$lang['i_writeerr'] = 'Faili %s ei lubata tekitada. Kontrolli kataloogi ja faili õigusi.'; +$lang['i_badval'] = '%s - lubamatu või tühi väärtus'; +$lang['i_success'] = 'Seadistamine on õnnelikult lõpule viidud. Sa võid nüüd kustutada faili install.php. Alusta oma uue DokuWiki täitmist.'; +$lang['i_failure'] = 'Konfiguratsiooni faili kirjutamisel esines vigu. Võimalik, et pead need käsitsi parandama enne uue DokuWiki täitma asumist.'; +$lang['i_policy'] = 'Wiki õiguste algne poliitika'; +$lang['i_pol0'] = 'Avatud (lugemine, kirjutamine ja üleslaadimine kõigile lubatud)'; +$lang['i_pol1'] = 'Avalikuks lugemiseks (lugeda saavad kõik, kirjutada ja üles laadida vaid registreeritud kasutajad)'; +$lang['i_pol2'] = 'Suletud (kõik õigused, kaasaarvatud lugemine on lubatud vaid registreeritud kasutajatele)'; -- cgit v1.2.3 From 74efffc3dc025c612dcdfa70f31ad24dccf36682 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Sat, 19 Mar 2011 14:16:50 +0100 Subject: warn about wrongly installed plugin When a plugin is installed in the wrong directory, the class loading will fail. This patch tries to find the correct directory from the plugin.info.txt (using the base key) and give a hint to the user on how to fix this. --- inc/plugincontroller.class.php | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'inc') diff --git a/inc/plugincontroller.class.php b/inc/plugincontroller.class.php index 6e361e172..cec5c73a9 100644 --- a/inc/plugincontroller.class.php +++ b/inc/plugincontroller.class.php @@ -96,7 +96,15 @@ class Doku_Plugin_Controller { //construct class and instantiate $class = $type.'_plugin_'.$name; - if (!class_exists($class)) return null; + if (!class_exists($class)){ + # the plugin might be in the wrong directory + $inf = confToHash(DOKU_PLUGIN."$dir/plugin.info.txt"); + if($inf['base'] && $inf['base'] != $plugin){ + msg("Plugin installed incorrectly. Rename plugin directory '". + hsc($plugin)."' to '".hsc($inf['base'])."'.",-1); + } + return null; + } $DOKU_PLUGINS[$type][$name] = new $class; return $DOKU_PLUGINS[$type][$name]; -- cgit v1.2.3 From 234ce57eac492a1f07414d42c0c406666f3fa887 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Sat, 19 Mar 2011 15:32:14 +0100 Subject: store session pass as hash This avoids having the blowfish encrypted pass stored together with the decryption key on the same server. --- inc/auth.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'inc') diff --git a/inc/auth.php b/inc/auth.php index 164ad3df9..85c8cfd7b 100644 --- a/inc/auth.php +++ b/inc/auth.php @@ -209,8 +209,9 @@ function auth_login($user,$pass,$sticky=false,$silent=false){ $auth->useSessionCache($user) && ($session['time'] >= time()-$conf['auth_security_timeout']) && ($session['user'] == $user) && - ($session['pass'] == $pass) && //still crypted + ($session['pass'] == sha1($pass)) && //still crypted ($session['buid'] == auth_browseruid()) ){ + // he has session, cookie and browser right - let him in $_SERVER['REMOTE_USER'] = $user; $USERINFO = $session['info']; //FIXME move all references to session @@ -979,7 +980,7 @@ function auth_setCookie($user,$pass,$sticky) { } // set session $_SESSION[DOKU_COOKIE]['auth']['user'] = $user; - $_SESSION[DOKU_COOKIE]['auth']['pass'] = $pass; + $_SESSION[DOKU_COOKIE]['auth']['pass'] = sha1($pass); $_SESSION[DOKU_COOKIE]['auth']['buid'] = auth_browseruid(); $_SESSION[DOKU_COOKIE]['auth']['info'] = $USERINFO; $_SESSION[DOKU_COOKIE]['auth']['time'] = time(); -- cgit v1.2.3 From e940aea40842bfcf6db8c09bba3135cb9cb5eef9 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Sat, 19 Mar 2011 19:21:52 +0100 Subject: bind non-sticky logins to the session id FS#2202 --- inc/auth.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'inc') diff --git a/inc/auth.php b/inc/auth.php index 85c8cfd7b..53376be34 100644 --- a/inc/auth.php +++ b/inc/auth.php @@ -189,7 +189,9 @@ function auth_login($user,$pass,$sticky=false,$silent=false){ if ($auth->checkPass($user,$pass)){ // make logininfo globally available $_SERVER['REMOTE_USER'] = $user; - auth_setCookie($user,PMA_blowfish_encrypt($pass,auth_cookiesalt()),$sticky); + $secret = auth_cookiesalt(); + if(!$sticky) $secret .= session_id; //bind non-sticky to session + auth_setCookie($user,PMA_blowfish_encrypt($pass,$secret),$sticky); return true; }else{ //invalid credentials - log off @@ -218,7 +220,9 @@ function auth_login($user,$pass,$sticky=false,$silent=false){ return true; } // no we don't trust it yet - recheck pass but silent - $pass = PMA_blowfish_decrypt($pass,auth_cookiesalt()); + $secret = auth_cookiesalt(); + if(!$sticky) $secret .= session_id(); //bind non-sticky to session + $pass = PMA_blowfish_decrypt($pass,$secret); return auth_login($user,$pass,$sticky,true); } } -- cgit v1.2.3 From 8cd4c12f3e3d5e9665f20afca85123145912c0e9 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Sat, 19 Mar 2011 19:52:51 +0100 Subject: replace tokenizer_cmd with action hook as discussed at http://www.freelists.org/post/dokuwiki/tokenizer-cmd-in-indexer,1 --- inc/indexer.php | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) (limited to 'inc') diff --git a/inc/indexer.php b/inc/indexer.php index 7cddb7c54..0fbd939be 100644 --- a/inc/indexer.php +++ b/inc/indexer.php @@ -54,7 +54,7 @@ define('IDX_ASIAN', '(?:'.IDX_ASIAN1.'|'.IDX_ASIAN2.'|'.IDX_ASIAN3.')'); * Version of the indexer taking into consideration the external tokenizer. * The indexer is only compatible with data written by the same version. * - * Triggers INDEXER_VERSION_GET + * @triggers INDEXER_VERSION_GET * Plugins that modify what gets indexed should hook this event and * add their version info to the event data like so: * $data[$plugin_name] = $plugin_version; @@ -66,10 +66,7 @@ function idx_get_version(){ static $indexer_version = null; if ($indexer_version == null) { global $conf; - if($conf['external_tokenizer']) - $version = INDEXER_VERSION . '+' . trim($conf['tokenizer_cmd']); - else - $version = INDEXER_VERSION; + $version = INDEXER_VERSION; // DokuWiki version is included for the convenience of plugins $data = array('dokuwiki'=>$version); @@ -405,6 +402,10 @@ class Doku_Indexer { * * TODO: does this also need &$stopwords ? * + * @triggers INDEXER_TEXT_PREPARE + * This event allows plugins to modify the text before it gets tokenized. + * Plugins intercepting this event should also intercept INDEX_VERSION_GET + * * @param string $text plain text * @param boolean $wc are wildcards allowed? * @return array list of words in the text @@ -417,16 +418,18 @@ class Doku_Indexer { $wc = ($wc) ? '' : '\*'; $stopwords =& idx_get_stopwords(); - if ($conf['external_tokenizer'] && $conf['tokenizer_cmd'] != '') { - if (0 == io_exec($conf['tokenizer_cmd'], $text, $output)) - $text = $output; - } else { + // prepare the text to be tokenized + $evt = new Doku_Event('INDEXER_TEXT_PREPARE', $text); + if ($evt->advise_before(true)) { if (preg_match('/[^0-9A-Za-z ]/u', $text)) { // handle asian chars as single words (may fail on older PHP version) $asia = @preg_replace('/('.IDX_ASIAN.')/u', ' \1 ', $text); if (!is_null($asia)) $text = $asia; // recover from regexp falure } } + $evt->advise_after(); + unset($evt); + $text = strtr($text, array( "\r" => ' ', -- cgit v1.2.3 From ac4be4d7b593a3b1762bd1ffb4f6ac9a5f22edd4 Mon Sep 17 00:00:00 2001 From: Piyush Mishra Date: Mon, 21 Mar 2011 19:18:34 +0530 Subject: Minor: Edited the delta_time function for php5 --- inc/init.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'inc') diff --git a/inc/init.php b/inc/init.php index 772f85c77..819d92bdc 100644 --- a/inc/init.php +++ b/inc/init.php @@ -5,8 +5,7 @@ // start timing Dokuwiki execution function delta_time($start=0) { - list($usec, $sec) = explode(" ", microtime()); - return ((float)$usec+(float)$sec)-((float)$start); + return microtime(true)-((float)$start); } define('DOKU_START_TIME', delta_time()); -- cgit v1.2.3 From e4eda66bb417c82549108e85453f87df5ba771fe Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Mon, 21 Mar 2011 20:37:05 +0100 Subject: fixed handling of legacy and subscriber config options FS#2208 This was broken in 3a48618a538412994ec244d5a9fde5c4a6161d10 --- inc/confutils.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'inc') diff --git a/inc/confutils.php b/inc/confutils.php index b2d25fb65..29ead1e9f 100644 --- a/inc/confutils.php +++ b/inc/confutils.php @@ -241,13 +241,13 @@ function actionOK($action){ // prepare disabled actions array and handle legacy options $disabled = explode(',',$conf['disableactions']); $disabled = array_map('trim',$disabled); - if(!empty($conf['openregister']) || is_null($auth) || !$auth->canDo('addUser')) { + if((isset($conf['openregister']) && !$conf['openregister']) || is_null($auth) || !$auth->canDo('addUser')) { $disabled[] = 'register'; } - if(!empty($conf['resendpasswd']) || is_null($auth) || !$auth->canDo('modPass')) { + if((isset($conf['resendpasswd']) && !$conf['resendpasswd']) || is_null($auth) || !$auth->canDo('modPass')) { $disabled[] = 'resendpwd'; } - if(!empty($conf['subscribers']) || is_null($auth)) { + if((isset($conf['subscribers']) && !$conf['subscribers']) || is_null($auth)) { $disabled[] = 'subscribe'; } if (is_null($auth) || !$auth->canDo('Profile')) { -- cgit v1.2.3 From ee1214abb2c14cf0f86ff6d9a5b49536c6b01e18 Mon Sep 17 00:00:00 2001 From: Florin Iacob Date: Mon, 21 Mar 2011 23:17:18 +0100 Subject: Romanian language update --- inc/lang/ro/lang.php | 3 +++ 1 file changed, 3 insertions(+) (limited to 'inc') diff --git a/inc/lang/ro/lang.php b/inc/lang/ro/lang.php index f4a2210f0..cbecf6f6c 100644 --- a/inc/lang/ro/lang.php +++ b/inc/lang/ro/lang.php @@ -159,6 +159,9 @@ $lang['yours'] = 'Versiunea ta'; $lang['diff'] = 'arată diferenţele faţă de versiunea curentă'; $lang['diff2'] = 'Arată diferenţele dintre versiunile selectate'; $lang['difflink'] = 'Link către această vizualizare comparativă'; +$lang['diff_type'] = 'Vezi diferențe:'; +$lang['diff_inline'] = 'Succesiv'; +$lang['diff_side'] = 'Alăturate'; $lang['line'] = 'Linia'; $lang['breadcrumb'] = 'Traseu'; $lang['youarehere'] = 'Sunteţi aici'; -- cgit v1.2.3 From 80fb93f63fa35a09c7a9a0c7ea7a64db609a9fd6 Mon Sep 17 00:00:00 2001 From: Tom N Harris Date: Tue, 22 Mar 2011 13:16:27 -0400 Subject: Change Doku_Indexer visibility from private to protected, and get rid of ugly underscores --- inc/indexer.php | 180 ++++++++++++++++++++++++++++---------------------------- 1 file changed, 90 insertions(+), 90 deletions(-) (limited to 'inc') diff --git a/inc/indexer.php b/inc/indexer.php index 0fbd939be..335b6e25f 100644 --- a/inc/indexer.php +++ b/inc/indexer.php @@ -117,41 +117,41 @@ class Doku_Indexer { * @author Andreas Gohr */ public function addPageWords($page, $text) { - if (!$this->_lock()) + if (!$this->lock()) return "locked"; // load known documents - $pid = $this->_addIndexKey('page', '', $page); + $pid = $this->addIndexKey('page', '', $page); if ($pid === false) { - $this->_unlock(); + $this->unlock(); return false; } $pagewords = array(); // get word usage in page - $words = $this->_getPageWords($text); + $words = $this->getPageWords($text); if ($words === false) { - $this->_unlock(); + $this->unlock(); return false; } if (!empty($words)) { foreach (array_keys($words) as $wlen) { - $index = $this->_getIndex('i', $wlen); + $index = $this->getIndex('i', $wlen); foreach ($words[$wlen] as $wid => $freq) { $idx = ($wid_updateTuple($idx, $pid, $freq); + $index[$wid] = $this->updateTuple($idx, $pid, $freq); $pagewords[] = "$wlen*$wid"; } - if (!$this->_saveIndex('i', $wlen, $index)) { - $this->_unlock(); + if (!$this->saveIndex('i', $wlen, $index)) { + $this->unlock(); return false; } } } // Remove obsolete index entries - $pageword_idx = $this->_getIndexKey('pageword', '', $pid); + $pageword_idx = $this->getIndexKey('pageword', '', $pid); if ($pageword_idx !== '') { $oldwords = explode(':',$pageword_idx); $delwords = array_diff($oldwords, $pagewords); @@ -164,21 +164,21 @@ class Doku_Indexer { } } foreach ($upwords as $wlen => $widx) { - $index = $this->_getIndex('i', $wlen); + $index = $this->getIndex('i', $wlen); foreach ($widx as $wid) { - $index[$wid] = $this->_updateTuple($index[$wid], $pid, 0); + $index[$wid] = $this->updateTuple($index[$wid], $pid, 0); } - $this->_saveIndex('i', $wlen, $index); + $this->saveIndex('i', $wlen, $index); } } // Save the reverse index $pageword_idx = join(':', $pagewords); - if (!$this->_saveIndexKey('pageword', '', $pid, $pageword_idx)) { - $this->_unlock(); + if (!$this->saveIndexKey('pageword', '', $pid, $pageword_idx)) { + $this->unlock(); return false; } - $this->_unlock(); + $this->unlock(); return true; } @@ -189,7 +189,7 @@ class Doku_Indexer { * @author Christopher Smith * @author Tom N Harris */ - private function _getPageWords($text) { + protected function getPageWords($text) { global $conf; $tokens = $this->tokenizer($text); @@ -209,7 +209,7 @@ class Doku_Indexer { $word_idx_modified = false; $index = array(); //resulting index foreach (array_keys($words) as $wlen) { - $word_idx = $this->_getIndex('w', $wlen); + $word_idx = $this->getIndex('w', $wlen); foreach ($words[$wlen] as $word => $freq) { $wid = array_search($word, $word_idx); if ($wid === false) { @@ -222,7 +222,7 @@ class Doku_Indexer { $index[$wlen][$wid] = $freq; } // save back the word index - if ($word_idx_modified && !$this->_saveIndex('w', $wlen, $word_idx)) + if ($word_idx_modified && !$this->saveIndex('w', $wlen, $word_idx)) return false; } @@ -252,13 +252,13 @@ class Doku_Indexer { trigger_error("array passed to addMetaKeys but value is not null", E_USER_WARNING); } - if (!$this->_lock()) + if (!$this->lock()) return "locked"; // load known documents - $pid = $this->_addIndexKey('page', '', $page); + $pid = $this->addIndexKey('page', '', $page); if ($pid === false) { - $this->_unlock(); + $this->unlock(); return false; } @@ -267,20 +267,20 @@ class Doku_Indexer { $value = $key['title']; if (is_array($value)) $value = $value[0]; - $this->_saveIndexKey('title', '', $pid, $value); + $this->saveIndexKey('title', '', $pid, $value); unset($key['title']); } foreach ($key as $name => $values) { $metaname = idx_cleanName($name); - $this->_addIndexKey('metadata', '', $metaname); - $metaidx = $this->_getIndex($metaname, '_i'); - $metawords = $this->_getIndex($metaname, '_w'); + $this->addIndexKey('metadata', '', $metaname); + $metaidx = $this->getIndex($metaname, '_i'); + $metawords = $this->getIndex($metaname, '_w'); $addwords = false; if (!is_array($values)) $values = array($values); - $val_idx = $this->_getIndexKey($metaname, '_p', $pid); + $val_idx = $this->getIndexKey($metaname, '_p', $pid); if ($val_idx != '') { $val_idx = explode(':', $val_idx); // -1 means remove, 0 keep, 1 add @@ -308,30 +308,30 @@ class Doku_Indexer { } if ($addwords) - $this->_saveIndex($metaname.'_w', '', $metawords); + $this->saveIndex($metaname.'_w', '', $metawords); $vals_changed = false; foreach ($val_idx as $id => $action) { if ($action == -1) { - $metaidx[$id] = $this->_updateTuple($metaidx[$id], $pid, 0); + $metaidx[$id] = $this->updateTuple($metaidx[$id], $pid, 0); $vals_changed = true; unset($val_idx[$id]); } elseif ($action == 1) { - $metaidx[$id] = $this->_updateTuple($metaidx[$id], $pid, 1); + $metaidx[$id] = $this->updateTuple($metaidx[$id], $pid, 1); $vals_changed = true; } } if ($vals_changed) { - $this->_saveIndex($metaname.'_i', '', $metaidx); + $this->saveIndex($metaname.'_i', '', $metaidx); $val_idx = implode(':', array_keys($val_idx)); - $this->_saveIndexKey($metaname.'_p', '', $pid, $val_idx); + $this->saveIndexKey($metaname.'_p', '', $pid, $val_idx); } unset($metaidx); unset($metawords); } - $this->_unlock(); + $this->unlock(); return true; } @@ -345,18 +345,18 @@ class Doku_Indexer { * @author Tom N Harris */ public function deletePage($page) { - if (!$this->_lock()) + if (!$this->lock()) return "locked"; // load known documents - $pid = $this->_getIndexKey('page', '', $page); + $pid = $this->getIndexKey('page', '', $page); if ($pid === false) { - $this->_unlock(); + $this->unlock(); return false; } // Remove obsolete index entries - $pageword_idx = $this->_getIndexKey('pageword', '', $pid); + $pageword_idx = $this->getIndexKey('pageword', '', $pid); if ($pageword_idx !== '') { $delwords = explode(':',$pageword_idx); $upwords = array(); @@ -368,32 +368,32 @@ class Doku_Indexer { } } foreach ($upwords as $wlen => $widx) { - $index = $this->_getIndex('i', $wlen); + $index = $this->getIndex('i', $wlen); foreach ($widx as $wid) { - $index[$wid] = $this->_updateTuple($index[$wid], $pid, 0); + $index[$wid] = $this->updateTuple($index[$wid], $pid, 0); } - $this->_saveIndex('i', $wlen, $index); + $this->saveIndex('i', $wlen, $index); } } // Save the reverse index - if (!$this->_saveIndexKey('pageword', '', $pid, "")) { - $this->_unlock(); + if (!$this->saveIndexKey('pageword', '', $pid, "")) { + $this->unlock(); return false; } - $this->_saveIndexKey('title', '', $pid, ""); - $keyidx = $this->_getIndex('metadata', ''); + $this->saveIndexKey('title', '', $pid, ""); + $keyidx = $this->getIndex('metadata', ''); foreach ($keyidx as $metaname) { - $val_idx = explode(':', $this->_getIndexKey($metaname.'_p', '', $pid)); - $meta_idx = $this->_getIndex($metaname.'_i', ''); + $val_idx = explode(':', $this->getIndexKey($metaname.'_p', '', $pid)); + $meta_idx = $this->getIndex($metaname.'_i', ''); foreach ($val_idx as $id) { - $meta_idx[$id] = $this->_updateTuple($meta_idx[$id], $pid, 0); + $meta_idx[$id] = $this->updateTuple($meta_idx[$id], $pid, 0); } - $this->_saveIndex($metaname.'_i', '', $meta_idx); - $this->_saveIndexKey($metaname.'_p', '', $pid, ''); + $this->saveIndex($metaname.'_i', '', $meta_idx); + $this->saveIndexKey($metaname.'_p', '', $pid, ''); } - $this->_unlock(); + $this->unlock(); return true; } @@ -469,17 +469,17 @@ class Doku_Indexer { */ public function lookup(&$tokens) { $result = array(); - $wids = $this->_getIndexWords($tokens, $result); + $wids = $this->getIndexWords($tokens, $result); if (empty($wids)) return array(); // load known words and documents - $page_idx = $this->_getIndex('page', ''); + $page_idx = $this->getIndex('page', ''); $docs = array(); foreach (array_keys($wids) as $wlen) { $wids[$wlen] = array_unique($wids[$wlen]); - $index = $this->_getIndex('i', $wlen); + $index = $this->getIndex('i', $wlen); foreach($wids[$wlen] as $ixid) { if ($ixid < count($index)) - $docs["$wlen*$ixid"] = $this->_parseTuples($page_idx, $index[$ixid]); + $docs["$wlen*$ixid"] = $this->parseTuples($page_idx, $index[$ixid]); } } // merge found pages into final result array @@ -531,9 +531,9 @@ class Doku_Indexer { // get all words in order to search the matching ids if ($key == 'title') { - $words = $this->_getIndex('title', ''); + $words = $this->getIndex('title', ''); } else { - $words = $this->_getIndex($metaname, '_w'); + $words = $this->getIndex($metaname, '_w'); } if (!is_null($func)) { @@ -576,7 +576,7 @@ class Doku_Indexer { $result[$val] = array(); } - $page_idx = $this->_getIndex('page', ''); + $page_idx = $this->getIndex('page', ''); // Special handling for titles if ($key == 'title') { @@ -588,12 +588,12 @@ class Doku_Indexer { } } else { // load all lines and pages so the used lines can be taken and matched with the pages - $lines = $this->_getIndex($metaname, '_i'); + $lines = $this->getIndex($metaname, '_i'); foreach ($value_ids as $value_id => $val_list) { // parse the tuples of the form page_id*1:page2_id*1 and so on, return value // is an array with page_id => 1, page2_id => 1 etc. so take the keys only - $pages = array_keys($this->_parseTuples($page_idx, $lines[$value_id])); + $pages = array_keys($this->parseTuples($page_idx, $lines[$value_id])); foreach ($val_list as $val) { $result[$val] = array_merge($result[$val], $pages); } @@ -616,7 +616,7 @@ class Doku_Indexer { * @return array Set to length => array(id ...) * @author Tom N Harris */ - private function _getIndexWords(&$words, &$result) { + protected function getIndexWords(&$words, &$result) { $tokens = array(); $tokenlength = array(); $tokenwild = array(); @@ -656,12 +656,12 @@ class Doku_Indexer { // $tokenlength = array( base word length => base word ... ) // $tokenwild = array( base word => base word length ... ) $length_filter = empty($tokenwild) ? $tokenlength : min(array_keys($tokenlength)); - $indexes_known = $this->_indexLengths($length_filter); + $indexes_known = $this->indexLengths($length_filter); if (!empty($tokenwild)) sort($indexes_known); // get word IDs $wids = array(); foreach ($indexes_known as $ixlen) { - $word_idx = $this->_getIndex('w', $ixlen); + $word_idx = $this->getIndex('w', $ixlen); // handle exact search if (isset($tokenlength[$ixlen])) { foreach ($tokenlength[$ixlen] as $xword) { @@ -697,14 +697,14 @@ class Doku_Indexer { * @author Tom N Harris */ public function getPages($key=null) { - $page_idx = $this->_getIndex('page', ''); + $page_idx = $this->getIndex('page', ''); if (is_null($key)) return $page_idx; $metaname = idx_cleanName($key); // Special handling for titles if ($key == 'title') { - $title_idx = $this->_getIndex('title', ''); + $title_idx = $this->getIndex('title', ''); array_splice($page_idx, count($title_idx)); foreach ($title_idx as $i => $title) if ($title === "") unset($page_idx[$i]); @@ -712,9 +712,9 @@ class Doku_Indexer { } $pages = array(); - $lines = $this->_getIndex($metaname, '_i'); + $lines = $this->getIndex($metaname, '_i'); foreach ($lines as $line) { - $pages = array_merge($pages, $this->_parseTuples($page_idx, $line)); + $pages = array_merge($pages, $this->parseTuples($page_idx, $line)); } return array_keys($pages); } @@ -738,7 +738,7 @@ class Doku_Indexer { $result = array(); if ($key == 'title') { - $index = $this->_getIndex('title', ''); + $index = $this->getIndex('title', ''); $index = array_count_values($index); foreach ($index as $val => $cnt) { if ($cnt >= $min && (!$max || $cnt <= $max) && strlen($val) >= $minlen) @@ -747,15 +747,15 @@ class Doku_Indexer { } elseif (!is_null($key)) { $metaname = idx_cleanName($key); - $index = $this->_getIndex($metaname.'_i', ''); + $index = $this->getIndex($metaname.'_i', ''); $val_idx = array(); foreach ($index as $wid => $line) { - $freq = $this->_countTuples($line); + $freq = $this->countTuples($line); if ($freq >= $min && (!$max || $freq <= $max) && strlen($val) >= $minlen) $val_idx[$wid] = $freq; } if (!empty($val_idx)) { - $words = $this->_getIndex($metaname.'_w', ''); + $words = $this->getIndex($metaname.'_w', ''); foreach ($val_idx as $wid => $freq) $result[$words[$wid]] = $freq; } @@ -764,13 +764,13 @@ class Doku_Indexer { $lengths = idx_listIndexLengths(); foreach ($lengths as $length) { if ($length < $minlen) continue; - $index = $this->_getIndex('i', $length); + $index = $this->getIndex('i', $length); $words = null; foreach ($index as $wid => $line) { - $freq = $this->_countTuples($line); + $freq = $this->countTuples($line); if ($freq >= $min && (!$max || $freq <= $max)) { if ($words === null) - $words = $this->_getIndex('w', $length); + $words = $this->getIndex('w', $length); $result[$words[$wid]] = $freq; } } @@ -786,7 +786,7 @@ class Doku_Indexer { * * @author Tom N Harris */ - private function _lock() { + protected function lock() { global $conf; $status = true; $run = 0; @@ -816,7 +816,7 @@ class Doku_Indexer { * * @author Tom N Harris */ - private function _unlock() { + protected function unlock() { global $conf; @rmdir($conf['lockdir'].'/_indexer.lock'); return true; @@ -827,7 +827,7 @@ class Doku_Indexer { * * @author Tom N Harris */ - private function _getIndex($idx, $suffix) { + protected function getIndex($idx, $suffix) { global $conf; $fn = $conf['indexdir'].'/'.$idx.$suffix.'.idx'; if (!@file_exists($fn)) return array(); @@ -839,7 +839,7 @@ class Doku_Indexer { * * @author Tom N Harris */ - private function _saveIndex($idx, $suffix, &$lines) { + protected function saveIndex($idx, $suffix, &$lines) { global $conf; $fn = $conf['indexdir'].'/'.$idx.$suffix; $fh = @fopen($fn.'.tmp', 'w'); @@ -850,7 +850,7 @@ class Doku_Indexer { chmod($fn.'.tmp', $conf['fperm']); io_rename($fn.'.tmp', $fn.'.idx'); if ($suffix !== '') - $this->_cacheIndexDir($idx, $suffix, empty($lines)); + $this->cacheIndexDir($idx, $suffix, empty($lines)); return true; } @@ -859,7 +859,7 @@ class Doku_Indexer { * * @author Tom N Harris */ - private function _getIndexKey($idx, $suffix, $id) { + protected function getIndexKey($idx, $suffix, $id) { global $conf; $fn = $conf['indexdir'].'/'.$idx.$suffix.'.idx'; if (!@file_exists($fn)) return ''; @@ -878,7 +878,7 @@ class Doku_Indexer { * * @author Tom N Harris */ - private function _saveIndexKey($idx, $suffix, $id, $line) { + protected function saveIndexKey($idx, $suffix, $id, $line) { global $conf; if (substr($line, -1) != "\n") $line .= "\n"; @@ -908,7 +908,7 @@ class Doku_Indexer { chmod($fn.'.tmp', $conf['fperm']); io_rename($fn.'.tmp', $fn.'.idx'); if ($suffix !== '') - $this->_cacheIndexDir($idx, $suffix); + $this->cacheIndexDir($idx, $suffix); return true; } @@ -917,13 +917,13 @@ class Doku_Indexer { * * @author Tom N Harris */ - private function _addIndexKey($idx, $suffix, $value) { - $index = $this->_getIndex($idx, $suffix); + protected function addIndexKey($idx, $suffix, $value) { + $index = $this->getIndex($idx, $suffix); $id = array_search($value, $index); if ($id === false) { $id = count($index); $index[$id] = $value; - if (!$this->_saveIndex($idx, $suffix, $index)) { + if (!$this->saveIndex($idx, $suffix, $index)) { trigger_error("Failed to write $idx index", E_USER_ERROR); return false; } @@ -931,7 +931,7 @@ class Doku_Indexer { return $id; } - private function _cacheIndexDir($idx, $suffix, $delete=false) { + protected function cacheIndexDir($idx, $suffix, $delete=false) { global $conf; if ($idx == 'i') $cachename = $conf['indexdir'].'/lengths'; @@ -968,7 +968,7 @@ class Doku_Indexer { * * @author YoBoY */ - private function _listIndexLengths() { + protected function listIndexLengths() { global $conf; $cachename = $conf['indexdir'].'/lengths'; clearstatcache(); @@ -1018,7 +1018,7 @@ class Doku_Indexer { * * @author YoBoY */ - private function _indexLengths($filter) { + protected function indexLengths($filter) { global $conf; $idx = array(); if (is_array($filter)) { @@ -1044,7 +1044,7 @@ class Doku_Indexer { * * @author Tom N Harris */ - private function _updateTuple($line, $id, $count) { + protected function updateTuple($line, $id, $count) { $newLine = $line; if ($newLine !== '') $newLine = preg_replace('/(^|:)'.preg_quote($id,'/').'\*\d*/', '', $newLine); @@ -1064,7 +1064,7 @@ class Doku_Indexer { * @author Tom N Harris * @author Andreas Gohr */ - private function _parseTuples(&$keys, $line) { + protected function parseTuples(&$keys, $line) { $result = array(); if ($line == '') return $result; $parts = explode(':', $line); @@ -1084,7 +1084,7 @@ class Doku_Indexer { * * @author Tom N Harris */ - private function _countTuples($line) { + protected function countTuples($line) { $freq = 0; $parts = explode(':', $line); foreach ($parts as $tuple) { -- cgit v1.2.3 From b9d8cc1e0b5aa06f2829aa0913283c2aca8a082c Mon Sep 17 00:00:00 2001 From: Tom N Harris Date: Tue, 22 Mar 2011 16:56:37 -0400 Subject: Clarify usage of some indexer methods --- inc/indexer.php | 36 ++++++++++++++++++++++++++++++------ 1 file changed, 30 insertions(+), 6 deletions(-) (limited to 'inc') diff --git a/inc/indexer.php b/inc/indexer.php index 335b6e25f..110901e58 100644 --- a/inc/indexer.php +++ b/inc/indexer.php @@ -185,6 +185,8 @@ class Doku_Indexer { /** * Split the words in a page and add them to the index. * + * @param string $text content of the page + * @return array list of word IDs and number of times used * @author Andreas Gohr * @author Christopher Smith * @author Tom N Harris @@ -274,13 +276,13 @@ class Doku_Indexer { foreach ($key as $name => $values) { $metaname = idx_cleanName($name); $this->addIndexKey('metadata', '', $metaname); - $metaidx = $this->getIndex($metaname, '_i'); - $metawords = $this->getIndex($metaname, '_w'); + $metaidx = $this->getIndex($metaname.'_i', ''); + $metawords = $this->getIndex($metaname.'_w', ''); $addwords = false; if (!is_array($values)) $values = array($values); - $val_idx = $this->getIndexKey($metaname, '_p', $pid); + $val_idx = $this->getIndexKey($metaname.'_p', '', $pid); if ($val_idx != '') { $val_idx = explode(':', $val_idx); // -1 means remove, 0 keep, 1 add @@ -533,7 +535,7 @@ class Doku_Indexer { if ($key == 'title') { $words = $this->getIndex('title', ''); } else { - $words = $this->getIndex($metaname, '_w'); + $words = $this->getIndex($metaname.'_w', ''); } if (!is_null($func)) { @@ -588,7 +590,7 @@ class Doku_Indexer { } } else { // load all lines and pages so the used lines can be taken and matched with the pages - $lines = $this->getIndex($metaname, '_i'); + $lines = $this->getIndex($metaname.'_i', ''); foreach ($value_ids as $value_id => $val_list) { // parse the tuples of the form page_id*1:page2_id*1 and so on, return value @@ -712,7 +714,7 @@ class Doku_Indexer { } $pages = array(); - $lines = $this->getIndex($metaname, '_i'); + $lines = $this->getIndex($metaname.'_i', ''); foreach ($lines as $line) { $pages = array_merge($pages, $this->parseTuples($page_idx, $line)); } @@ -825,6 +827,13 @@ class Doku_Indexer { /** * Retrieve the entire index. * + * The $suffix argument is for an index that is split into + * multiple parts. Different index files should use different + * base names. + * + * @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 */ protected function getIndex($idx, $suffix) { @@ -837,6 +846,9 @@ class Doku_Indexer { /** * Replace the contents of the index with an array. * + * @param string $idx name of the index + * @param string $suffix subpart identifier + * @param arrayref $linex list of lines without LF * @author Tom N Harris */ protected function saveIndex($idx, $suffix, &$lines) { @@ -857,6 +869,10 @@ class Doku_Indexer { /** * Retrieve a line from the index. * + * @param string $idx name of the index + * @param string $suffix subpart identifier + * @param int $id the line number + * @return string a line with trailing whitespace removed * @author Tom N Harris */ protected function getIndexKey($idx, $suffix, $id) { @@ -876,6 +892,10 @@ class Doku_Indexer { /** * Write a line into the index. * + * @param string $idx name of the index + * @param string $suffix subpart identifier + * @param int $id the line number + * @param string $line line to write * @author Tom N Harris */ protected function saveIndexKey($idx, $suffix, $id, $line) { @@ -915,6 +935,10 @@ class Doku_Indexer { /** * Retrieve or insert a value in the index. * + * @param string $idx name of the index + * @param string $suffix subpart identifier + * @param string $value line to find in the index + * @return int line number of the value in the index * @author Tom N Harris */ protected function addIndexKey($idx, $suffix, $value) { -- cgit v1.2.3 From 988c134016f0557947bd6811e22086919f98fa8e Mon Sep 17 00:00:00 2001 From: Piyush Mishra Date: Wed, 23 Mar 2011 09:43:38 +0530 Subject: Done with DifferenceEngine.php --- inc/DifferenceEngine.php | 99 +++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 89 insertions(+), 10 deletions(-) (limited to 'inc') diff --git a/inc/DifferenceEngine.php b/inc/DifferenceEngine.php index 906a17b2d..5473bf7e0 100644 --- a/inc/DifferenceEngine.php +++ b/inc/DifferenceEngine.php @@ -29,8 +29,14 @@ class _DiffOp { class _DiffOp_Copy extends _DiffOp { var $type = 'copy'; - + /** + * DONOT USE THIS. Its just to make sure nothing breaks because of the name change. + */ function _DiffOp_Copy($orig, $closing = false) { + $this->__construct($orig, $closing); + } + + function __construct($orig, $closing = false) { if (!is_array($closing)) $closing = $orig; $this->orig = $orig; @@ -44,8 +50,14 @@ class _DiffOp_Copy extends _DiffOp { class _DiffOp_Delete extends _DiffOp { var $type = 'delete'; - + /** + * DONOT USE THIS. Its just to make sure nothing breaks because of the name change. + */ function _DiffOp_Delete($lines) { + $this->__construct($lines); + } + + function __construct($lines) { $this->orig = $lines; $this->closing = false; } @@ -57,8 +69,14 @@ class _DiffOp_Delete extends _DiffOp { class _DiffOp_Add extends _DiffOp { var $type = 'add'; - + /** + * DONOT USE THIS. Its just to make sure nothing breaks because of the name change. + */ function _DiffOp_Add($lines) { + $this->__construct($lines); + } + + function __construct($lines) { $this->closing = $lines; $this->orig = false; } @@ -70,8 +88,14 @@ class _DiffOp_Add extends _DiffOp { class _DiffOp_Change extends _DiffOp { var $type = 'change'; - + /** + * DONOT USE THIS. Its just to make sure nothing breaks because of the name change. + */ function _DiffOp_Change($orig, $closing) { + $this->__construct($orig, $closing); + } + + function __construct($orig, $closing) { $this->orig = $orig; $this->closing = $closing; } @@ -490,6 +514,13 @@ class _DiffEngine { class Diff { var $edits; + + /** + * DONOT USE THIS. Its just to make sure nothing breaks because of the name change. + */ + function Diff($from_lines, $to_lines) { + $this->__construct($from_lines, $to_lines); + } /** * Constructor. @@ -499,7 +530,7 @@ class Diff { * (Typically these are lines from a file.) * @param $to_lines array An array of strings. */ - function Diff($from_lines, $to_lines) { + function __construct($from_lines, $to_lines) { $eng = new _DiffEngine; $this->edits = $eng->diff($from_lines, $to_lines); //$this->_check($from_lines, $to_lines); @@ -622,6 +653,13 @@ class Diff { * FIXME: bad name. */ class MappedDiff extends Diff { + /** + * DONOT USE THIS. Its just to make sure nothing breaks because of the name change. + */ + function MappedDiff($from_lines, $to_lines, $mapped_from_lines, $mapped_to_lines) { + $this->__construct($from_lines, $to_lines, $mapped_from_lines, $mapped_to_lines); + } + /** * Constructor. * @@ -645,12 +683,12 @@ class MappedDiff extends Diff { * @param $mapped_to_lines array This array should * have the same number of elements as $to_lines. */ - function MappedDiff($from_lines, $to_lines, $mapped_from_lines, $mapped_to_lines) { + function __construct($from_lines, $to_lines, $mapped_from_lines, $mapped_to_lines) { assert(count($from_lines) == count($mapped_from_lines)); assert(count($to_lines) == count($mapped_to_lines)); - $this->Diff($mapped_from_lines, $mapped_to_lines); + parent::__construct($mapped_from_lines, $mapped_to_lines); $xi = $yi = 0; $ecnt = count($this->edits); @@ -827,7 +865,14 @@ class DiffFormatter { define('NBSP', "\xC2\xA0"); // utf-8 non-breaking space. class _HWLDF_WordAccumulator { + /** + * DONOT USE THIS. Its just to make sure nothing breaks because of the name change. + */ function _HWLDF_WordAccumulator() { + $this->__construct(); + } + + function __construct() { $this->_lines = array(); $this->_line = ''; $this->_group = ''; @@ -882,11 +927,18 @@ class _HWLDF_WordAccumulator { class WordLevelDiff extends MappedDiff { + /** + * DONOT USE THIS. Its just to make sure nothing breaks because of the name change. + */ function WordLevelDiff($orig_lines, $closing_lines) { + $this->__construct($orig_lines, $closing_lines); + } + + function __construct($orig_lines, $closing_lines) { list ($orig_words, $orig_stripped) = $this->_split($orig_lines); list ($closing_words, $closing_stripped) = $this->_split($closing_lines); - $this->MappedDiff($orig_words, $closing_words, $orig_stripped, $closing_stripped); + parent::__construct($orig_words, $closing_words, $orig_stripped, $closing_stripped); } function _split($lines) { @@ -924,11 +976,18 @@ class WordLevelDiff extends MappedDiff { class InlineWordLevelDiff extends MappedDiff { + /** + * DONOT USE THIS. Its just to make sure nothing breaks because of the name change. + */ function InlineWordLevelDiff($orig_lines, $closing_lines) { + $this->__construct($orig_lines, $closing_lines); + } + + function __construct($orig_lines, $closing_lines) { list ($orig_words, $orig_stripped) = $this->_split($orig_lines); list ($closing_words, $closing_stripped) = $this->_split($closing_lines); - $this->MappedDiff($orig_words, $closing_words, $orig_stripped, $closing_stripped); + parent::__construct($orig_words, $closing_words, $orig_stripped, $closing_stripped); } function _split($lines) { @@ -965,7 +1024,14 @@ class InlineWordLevelDiff extends MappedDiff { */ class UnifiedDiffFormatter extends DiffFormatter { + /** + * DONOT USE THIS. Its just to make sure nothing breaks because of the name change. + */ function UnifiedDiffFormatter($context_lines = 4) { + $this->__construct($context_lines); + } + + function __construct($context_lines = 4) { $this->leading_context_lines = $context_lines; $this->trailing_context_lines = $context_lines; } @@ -996,7 +1062,14 @@ class UnifiedDiffFormatter extends DiffFormatter { */ class TableDiffFormatter extends DiffFormatter { + /** + * DONOT USE THIS. Its just to make sure nothing breaks because of the name change. + */ function TableDiffFormatter() { + $this->__construct(); + } + + function __construct() { $this->leading_context_lines = 2; $this->trailing_context_lines = 2; } @@ -1088,8 +1161,14 @@ class TableDiffFormatter extends DiffFormatter { */ class InlineDiffFormatter extends DiffFormatter { var $colspan = 4; - + /** + * DONOT USE THIS. Its just to make sure nothing breaks because of the name change. + */ function InlineDiffFormatter() { + $this->__construct(); + } + + function __construct() { $this->leading_context_lines = 2; $this->trailing_context_lines = 2; } -- cgit v1.2.3 From 5891862cf7012cf81a76ba0378b67c60f593507a Mon Sep 17 00:00:00 2001 From: Piyush Mishra Date: Wed, 23 Mar 2011 20:51:04 +0530 Subject: Using only __construct now --- inc/DifferenceEngine.php | 82 ++---------------------------------------------- 1 file changed, 2 insertions(+), 80 deletions(-) (limited to 'inc') diff --git a/inc/DifferenceEngine.php b/inc/DifferenceEngine.php index 5473bf7e0..2578d07ee 100644 --- a/inc/DifferenceEngine.php +++ b/inc/DifferenceEngine.php @@ -29,12 +29,6 @@ class _DiffOp { class _DiffOp_Copy extends _DiffOp { var $type = 'copy'; - /** - * DONOT USE THIS. Its just to make sure nothing breaks because of the name change. - */ - function _DiffOp_Copy($orig, $closing = false) { - $this->__construct($orig, $closing); - } function __construct($orig, $closing = false) { if (!is_array($closing)) @@ -50,12 +44,6 @@ class _DiffOp_Copy extends _DiffOp { class _DiffOp_Delete extends _DiffOp { var $type = 'delete'; - /** - * DONOT USE THIS. Its just to make sure nothing breaks because of the name change. - */ - function _DiffOp_Delete($lines) { - $this->__construct($lines); - } function __construct($lines) { $this->orig = $lines; @@ -69,12 +57,6 @@ class _DiffOp_Delete extends _DiffOp { class _DiffOp_Add extends _DiffOp { var $type = 'add'; - /** - * DONOT USE THIS. Its just to make sure nothing breaks because of the name change. - */ - function _DiffOp_Add($lines) { - $this->__construct($lines); - } function __construct($lines) { $this->closing = $lines; @@ -88,12 +70,6 @@ class _DiffOp_Add extends _DiffOp { class _DiffOp_Change extends _DiffOp { var $type = 'change'; - /** - * DONOT USE THIS. Its just to make sure nothing breaks because of the name change. - */ - function _DiffOp_Change($orig, $closing) { - $this->__construct($orig, $closing); - } function __construct($orig, $closing) { $this->orig = $orig; @@ -514,13 +490,6 @@ class _DiffEngine { class Diff { var $edits; - - /** - * DONOT USE THIS. Its just to make sure nothing breaks because of the name change. - */ - function Diff($from_lines, $to_lines) { - $this->__construct($from_lines, $to_lines); - } /** * Constructor. @@ -653,13 +622,6 @@ class Diff { * FIXME: bad name. */ class MappedDiff extends Diff { - /** - * DONOT USE THIS. Its just to make sure nothing breaks because of the name change. - */ - function MappedDiff($from_lines, $to_lines, $mapped_from_lines, $mapped_to_lines) { - $this->__construct($from_lines, $to_lines, $mapped_from_lines, $mapped_to_lines); - } - /** * Constructor. * @@ -865,13 +827,7 @@ class DiffFormatter { define('NBSP', "\xC2\xA0"); // utf-8 non-breaking space. class _HWLDF_WordAccumulator { - /** - * DONOT USE THIS. Its just to make sure nothing breaks because of the name change. - */ - function _HWLDF_WordAccumulator() { - $this->__construct(); - } - + function __construct() { $this->_lines = array(); $this->_line = ''; @@ -927,13 +883,6 @@ class _HWLDF_WordAccumulator { class WordLevelDiff extends MappedDiff { - /** - * DONOT USE THIS. Its just to make sure nothing breaks because of the name change. - */ - function WordLevelDiff($orig_lines, $closing_lines) { - $this->__construct($orig_lines, $closing_lines); - } - function __construct($orig_lines, $closing_lines) { list ($orig_words, $orig_stripped) = $this->_split($orig_lines); list ($closing_words, $closing_stripped) = $this->_split($closing_lines); @@ -975,13 +924,6 @@ class WordLevelDiff extends MappedDiff { } class InlineWordLevelDiff extends MappedDiff { - - /** - * DONOT USE THIS. Its just to make sure nothing breaks because of the name change. - */ - function InlineWordLevelDiff($orig_lines, $closing_lines) { - $this->__construct($orig_lines, $closing_lines); - } function __construct($orig_lines, $closing_lines) { list ($orig_words, $orig_stripped) = $this->_split($orig_lines); @@ -1024,13 +966,6 @@ class InlineWordLevelDiff extends MappedDiff { */ class UnifiedDiffFormatter extends DiffFormatter { - /** - * DONOT USE THIS. Its just to make sure nothing breaks because of the name change. - */ - function UnifiedDiffFormatter($context_lines = 4) { - $this->__construct($context_lines); - } - function __construct($context_lines = 4) { $this->leading_context_lines = $context_lines; $this->trailing_context_lines = $context_lines; @@ -1062,13 +997,6 @@ class UnifiedDiffFormatter extends DiffFormatter { */ class TableDiffFormatter extends DiffFormatter { - /** - * DONOT USE THIS. Its just to make sure nothing breaks because of the name change. - */ - function TableDiffFormatter() { - $this->__construct(); - } - function __construct() { $this->leading_context_lines = 2; $this->trailing_context_lines = 2; @@ -1161,13 +1089,7 @@ class TableDiffFormatter extends DiffFormatter { */ class InlineDiffFormatter extends DiffFormatter { var $colspan = 4; - /** - * DONOT USE THIS. Its just to make sure nothing breaks because of the name change. - */ - function InlineDiffFormatter() { - $this->__construct(); - } - + function __construct() { $this->leading_context_lines = 2; $this->trailing_context_lines = 2; -- cgit v1.2.3 From a3f9f75c2624b73c4a57bf2a346ae71bf6a5fb98 Mon Sep 17 00:00:00 2001 From: Marc Schiffbauer Date: Tue, 29 Mar 2011 23:48:47 +0200 Subject: Make .htaccess access protection work in more setups Before this patch with a .htaccess file on a higher level in the hierarchy with "Satisfy Any" it has been possible that the directory protection didn't work as expected. --- inc/.htaccess | 7 ++++--- inc/lang/.htaccess | 7 ++++--- 2 files changed, 8 insertions(+), 6 deletions(-) (limited to 'inc') diff --git a/inc/.htaccess b/inc/.htaccess index aebb21cd2..68ae43e72 100644 --- a/inc/.htaccess +++ b/inc/.htaccess @@ -1,3 +1,4 @@ -## no access to the inc directory -order allow,deny -deny from all +## no access to the inc directory +order allow,deny +deny from all +Satisfy All diff --git a/inc/lang/.htaccess b/inc/lang/.htaccess index 2ca129b12..572f5156f 100644 --- a/inc/lang/.htaccess +++ b/inc/lang/.htaccess @@ -1,3 +1,4 @@ -## no access to the lang directory -order allow,deny -deny from all +## no access to the lang directory +order allow,deny +deny from all +Satisfy All -- cgit v1.2.3