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(-) 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(-) 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 8c4c7aef443f4c16d78ba8c3ff1e41c7befcb223 Mon Sep 17 00:00:00 2001 From: Tom N Harris Date: Tue, 22 Mar 2011 18:40:11 -0400 Subject: Remove config for external tokenizer --- conf/dokuwiki.php | 2 -- 1 file changed, 2 deletions(-) diff --git a/conf/dokuwiki.php b/conf/dokuwiki.php index 629e7c0c6..538b9f9da 100644 --- a/conf/dokuwiki.php +++ b/conf/dokuwiki.php @@ -134,8 +134,6 @@ $conf['broken_iua'] = 0; //Platform with broken ignore_user_abor $conf['xsendfile'] = 0; //Use X-Sendfile (1 = lighttpd, 2 = standard) $conf['renderer_xhtml'] = 'xhtml'; //renderer to use for main page generation $conf['rememberme'] = 1; //Enable/disable remember me on login -$conf['external_tokenizer'] = 0; //Use an external program to split pages into words for indexing -$conf['tokenizer_cmd'] = '/usr/bin/mecab -O wakati'; //Set target to use when creating links - leave empty for same window $conf['target']['wiki'] = ''; -- 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(-) 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(-) 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. --- conf/.htaccess | 7 ++++--- data/.htaccess | 1 + inc/.htaccess | 7 ++++--- inc/lang/.htaccess | 7 ++++--- lib/_fla/.htaccess | 1 + 5 files changed, 14 insertions(+), 9 deletions(-) diff --git a/conf/.htaccess b/conf/.htaccess index 763ebf2ee..f5dda6086 100644 --- a/conf/.htaccess +++ b/conf/.htaccess @@ -1,3 +1,4 @@ -## no access to the conf directory -order allow,deny -deny from all +## no access to the conf directory +order allow,deny +deny from all +Satisfy All diff --git a/data/.htaccess b/data/.htaccess index 281d5c33d..2cbb757e7 100644 --- a/data/.htaccess +++ b/data/.htaccess @@ -1,2 +1,3 @@ order allow,deny deny from all +Satisfy All 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 diff --git a/lib/_fla/.htaccess b/lib/_fla/.htaccess index 9a7d38c12..055d099c7 100644 --- a/lib/_fla/.htaccess +++ b/lib/_fla/.htaccess @@ -1,3 +1,4 @@ ## no access to the fla directory order allow,deny deny from all +Satisfy All -- cgit v1.2.3 From 344763ad4e90e41c8a94b0a69a527ff2d6319ab5 Mon Sep 17 00:00:00 2001 From: Christopher Smith Date: Sat, 2 Apr 2011 03:32:13 +0100 Subject: FS#2122 alter SafeFN safe and post indicator characters. Note, any filenames encoded with the previous SafeFN scheme will need to be converted to the new scheme. Users of the old SafeFN scheme should not use this new scheme until after converting their filenames. --- _test/cases/inc/safefn.test.php | 35 ++++++++++++++++++++++++----------- inc/SafeFN.class.php | 6 +++--- 2 files changed, 27 insertions(+), 14 deletions(-) diff --git a/_test/cases/inc/safefn.test.php b/_test/cases/inc/safefn.test.php index c789875ba..1227e5578 100644 --- a/_test/cases/inc/safefn.test.php +++ b/_test/cases/inc/safefn.test.php @@ -10,19 +10,23 @@ class safeFN_test extends UnitTestCase { function test1(){ // we test multiple cases here - format: string, repl, additional, test $tests = array(); - $tests[] = array('äa.txt', '%5g.a.txt'); - $tests[] = array('ä.', '%5g..'); + $tests[] = array('äa.txt', '%5g]a.txt'); + $tests[] = array('ä.', '%5g].'); $tests[] = array('asciistring','asciistring'); $tests[] = array('ascii-_/.string','ascii-_/.string'); - $tests[] = array('AName','%x%1a.ame'); - $tests[] = array('A Name','%x%0%1a.ame'); - $tests[] = array('Another...Name','%x.nother...%1a.ame'); - $tests[] = array('Aß∂ƒName','%x%5b%6oy%aa%1a.ame'); - $tests[] = array('A%ß-∂_.ƒName','%x%%5b.-%6oy._.%aa%1a.ame'); - $tests[] = array('A%%ß-∂_.ƒName','%x%%%5b.-%6oy._.%aa%1a.ame'); - $tests[] = array('데이터도 함께 복원됩니다. 강력한','%zf4%13dg%15ao%zhg%0%164o%yig%0%11at%138w%zk9%zag%zb8..%0%xyt%10cl%164c.'); - $tests[] = array('совместимая','%td%ta%sy%t8%t1%td%te%t4%t8%sw%tr.'); - $tests[] = array('нехватка_файлового_пространства_на_сервере_p0-squid.some.domain.1270211897.txt.gz','%t9%t1%th%sy%sw%te%t6%sw._%tg%sw%t5%t7%ta%sy%ta%sz%ta._%tb%tc%ta%td%te%tc%sw%t9%td%te%sy%sw._%t9%sw._%td%t1%tc%sy%t1%tc%t1._p0-squid.some.domain.1270211897.txt.gz'); + $tests[] = array('AName','%x%1a]ame'); + $tests[] = array('A Name','%x%0%1a]ame'); + $tests[] = array('Another...Name','%x]nother...%1a]ame'); + $tests[] = array('Aß∂ƒName','%x%5b%6oy%aa%1a]ame'); + $tests[] = array('A%ß-∂_.ƒName','%x%%5b]-%6oy]_.%aa%1a]ame'); + $tests[] = array('A%%ß-∂_.ƒName','%x%%%5b]-%6oy]_.%aa%1a]ame'); + $tests[] = array('데이터도 함께 복원됩니다. 강력한','%zf4%13dg%15ao%zhg%0%164o%yig%0%11at%138w%zk9%zag%zb8].%0%xyt%10cl%164c]'); + $tests[] = array('совместимая','%td%ta%sy%t8%t1%td%te%t4%t8%sw%tr]'); + $tests[] = array('нехватка_файлового_пространства_на_сервере_p0-squid.some.domain.1270211897.txt.gz','%t9%t1%th%sy%sw%te%t6%sw]_%tg%sw%t5%t7%ta%sy%ta%sz%ta]_%tb%tc%ta%td%te%tc%sw%t9%td%te%sy%sw]_%t9%sw]_%td%t1%tc%sy%t1%tc%t1]_p0-squid.some.domain.1270211897.txt.gz'); + + $tests[] = array('name[1]','name[1]'); + $tests[] = array('Name[1]','%1a]ame[1]'); + $tests[] = array('Name[A]','%1a]ame[%x]]'); foreach($tests as $test){ list($utf8,$safe) = $test; @@ -30,6 +34,15 @@ class safeFN_test extends UnitTestCase { $this->assertEqual(SafeFN::decode($safe),$utf8); } } + + function test2(){ + $tests[] = array('совместимая','%td%ta%sy%t8%t1%td%te%t4%t8%sw%tr'); + + foreach($tests as $test){ + list($utf8,$safe) = $test; + $this->assertEqual(SafeFN::decode($safe),$utf8); + } + } } //Setup VIM: ex: et ts=4 : diff --git a/inc/SafeFN.class.php b/inc/SafeFN.class.php index ac6698a63..43b19e9ab 100644 --- a/inc/SafeFN.class.php +++ b/inc/SafeFN.class.php @@ -16,9 +16,9 @@ class SafeFN { // 'safe' characters are a superset of $plain, $pre_indicator and $post_indicator - private static $plain = '-/_0123456789abcdefghijklmnopqrstuvwxyz'; // these characters aren't converted + private static $plain = '-./[_0123456789abcdefghijklmnopqrstuvwxyz'; // these characters aren't converted private static $pre_indicator = '%'; - private static $post_indicator = '.'; + private static $post_indicator = ']'; /** * Convert an UTF-8 string to a safe ASCII String @@ -37,7 +37,7 @@ class SafeFN { * - reduce codepoint value for non-printable ASCII characters (0x00 - 0x1f). Space becomes our zero. * - convert reduced value to base36 (0-9a-z) * - append $pre_indicator characater followed by base36 string to output, set converted flag - * continue to next character) + * (continue to next character) * * @param string $filename a utf8 string, should only include printable characters - not 0x00-0x1f * @return string an encoded representation of $filename using only 'safe' ASCII characters -- cgit v1.2.3 From b9d65e9d8e82713e04ebf1172d9c94fddb38df83 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Sun, 3 Apr 2011 21:55:50 +0200 Subject: Temporary conversion plugin for new fnencode FS#2197 This plugin converts existing filenames that were stored using the option "safe" in fnencode from using the dot (.) as post_indicator to using a bracket (]) as post_insdicator. It will also add a post_indicator at the end of the file name should it be missing (Bug FS#2122). This plugin needs testing by people using the safe encode option! --- lib/plugins/safefnrecode/action.php | 68 ++++++++++++++++++++++++++++++++ lib/plugins/safefnrecode/plugin.info.txt | 7 ++++ 2 files changed, 75 insertions(+) create mode 100644 lib/plugins/safefnrecode/action.php create mode 100644 lib/plugins/safefnrecode/plugin.info.txt diff --git a/lib/plugins/safefnrecode/action.php b/lib/plugins/safefnrecode/action.php new file mode 100644 index 000000000..6d869c532 --- /dev/null +++ b/lib/plugins/safefnrecode/action.php @@ -0,0 +1,68 @@ + + */ + +// must be run within Dokuwiki +if (!defined('DOKU_INC')) die(); + +require_once DOKU_PLUGIN.'action.php'; + +class action_plugin_safefnrecode extends DokuWiki_Action_Plugin { + + public function register(Doku_Event_Handler &$controller) { + + $controller->register_hook('INDEXER_TASKS_RUN', 'BEFORE', $this, 'handle_indexer_tasks_run'); + + } + + public function handle_indexer_tasks_run(Doku_Event &$event, $param) { + global $conf; + if($conf['fnencode'] != 'safe') return; + + if(!file_exists($conf['datadir'].'_safefn.recoded')){ + $this->recode($conf['datadir']); + touch($conf['datadir'].'_safefn.recoded'); + } + + if(!file_exists($conf['olddir'].'_safefn.recoded')){ + $this->recode($conf['olddir']); + touch($conf['olddir'].'_safefn.recoded'); + } + + if(!file_exists($conf['metadir'].'_safefn.recoded')){ + $this->recode($conf['metadir']); + touch($conf['metadir'].'_safefn.recoded'); + } + + if(!file_exists($conf['mediadir'].'_safefn.recoded')){ + $this->recode($conf['metadir']); + touch($conf['metadir'].'_safefn.recoded'); + } + + } + + /** + * Recursive function to rename all safe encoded files to use the new + * square bracket post indicator + */ + private function recode($dir){ + $dh = opendir($dir); + if(!$dh) return; + while (($file = readdir($dh)) !== false) { + if($file == '.' || $file == '..') continue; # cur and upper dir + if(is_dir("$dir/$file")) $this->recode("$dir/$file"); #recurse + if(strpos('%',$file) === false) continue; # no encoding used + $new = preg_replace('/(%.*?)\./','\1]',$file); # new post indicator + if(preg_match('/%[^\.]+$/',$new)) $new .= ']'; # fix end FS#2122 + rename("$dir/$file","$dir/$new"); # rename it + } + closedir($dh); + } + +} + +// vim:ts=4:sw=4:et: diff --git a/lib/plugins/safefnrecode/plugin.info.txt b/lib/plugins/safefnrecode/plugin.info.txt new file mode 100644 index 000000000..b1600060c --- /dev/null +++ b/lib/plugins/safefnrecode/plugin.info.txt @@ -0,0 +1,7 @@ +base safefnrecode +author Andreas Gohr +email andi@splitbrain.org +date 2011-04-03 +name safefnrecode plugin +desc Changes existing page and foldernames for the change in the safe filename encoding +url http://www.dokuwiki.org/plugin:safefnrecode -- cgit v1.2.3 From aa235a708b8f394fab1d95f4c5a3cf23cabffd02 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Sun, 3 Apr 2011 22:02:27 +0200 Subject: fix end indicator fix --- lib/plugins/safefnrecode/action.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/plugins/safefnrecode/action.php b/lib/plugins/safefnrecode/action.php index 6d869c532..4fa5530df 100644 --- a/lib/plugins/safefnrecode/action.php +++ b/lib/plugins/safefnrecode/action.php @@ -57,7 +57,7 @@ class action_plugin_safefnrecode extends DokuWiki_Action_Plugin { if(is_dir("$dir/$file")) $this->recode("$dir/$file"); #recurse if(strpos('%',$file) === false) continue; # no encoding used $new = preg_replace('/(%.*?)\./','\1]',$file); # new post indicator - if(preg_match('/%[^\.]+$/',$new)) $new .= ']'; # fix end FS#2122 + if(preg_match('/%[^\]]+$/',$new)) $new .= ']'; # fix end FS#2122 rename("$dir/$file","$dir/$new"); # rename it } closedir($dh); -- cgit v1.2.3 From 903e5bc8f1bbb8bd5c9238c020882b571bb8ea85 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Sun, 3 Apr 2011 22:06:34 +0200 Subject: safefnrecode: don't double fix filenames --- lib/plugins/safefnrecode/action.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/plugins/safefnrecode/action.php b/lib/plugins/safefnrecode/action.php index 4fa5530df..76d02e4c7 100644 --- a/lib/plugins/safefnrecode/action.php +++ b/lib/plugins/safefnrecode/action.php @@ -56,7 +56,7 @@ class action_plugin_safefnrecode extends DokuWiki_Action_Plugin { if($file == '.' || $file == '..') continue; # cur and upper dir if(is_dir("$dir/$file")) $this->recode("$dir/$file"); #recurse if(strpos('%',$file) === false) continue; # no encoding used - $new = preg_replace('/(%.*?)\./','\1]',$file); # new post indicator + $new = preg_replace('/(%[^\]]*?)\./','\1]',$file); # new post indicator if(preg_match('/%[^\]]+$/',$new)) $new .= ']'; # fix end FS#2122 rename("$dir/$file","$dir/$new"); # rename it } -- cgit v1.2.3 From f7f0e633f735842dfb466878eef440245a9bd3e1 Mon Sep 17 00:00:00 2001 From: Myron Turner Date: Wed, 6 Apr 2011 22:00:00 +0200 Subject: fixed two errors in safefnrecode plugin --- lib/plugins/safefnrecode/action.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/plugins/safefnrecode/action.php b/lib/plugins/safefnrecode/action.php index 76d02e4c7..5d3eaae3a 100644 --- a/lib/plugins/safefnrecode/action.php +++ b/lib/plugins/safefnrecode/action.php @@ -39,8 +39,8 @@ class action_plugin_safefnrecode extends DokuWiki_Action_Plugin { } if(!file_exists($conf['mediadir'].'_safefn.recoded')){ - $this->recode($conf['metadir']); - touch($conf['metadir'].'_safefn.recoded'); + $this->recode($conf['mediadir']); + touch($conf['mediadir'].'_safefn.recoded'); } } @@ -55,7 +55,7 @@ class action_plugin_safefnrecode extends DokuWiki_Action_Plugin { while (($file = readdir($dh)) !== false) { if($file == '.' || $file == '..') continue; # cur and upper dir if(is_dir("$dir/$file")) $this->recode("$dir/$file"); #recurse - if(strpos('%',$file) === false) continue; # no encoding used + if(strpos($file,'%') === false) continue; # no encoding used $new = preg_replace('/(%[^\]]*?)\./','\1]',$file); # new post indicator if(preg_match('/%[^\]]+$/',$new)) $new .= ']'; # fix end FS#2122 rename("$dir/$file","$dir/$new"); # rename it -- cgit v1.2.3 From c006739e4780df86d205d5ebc6f39af141cbc3eb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Izidor=20Matu=C5=A1ov?= Date: Sun, 20 Mar 2011 23:03:20 +0100 Subject: If the page link is empty, it should link to current page -- FS#2178 --- inc/pageutils.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/inc/pageutils.php b/inc/pageutils.php index cd01dcae7..c9bf60135 100644 --- a/inc/pageutils.php +++ b/inc/pageutils.php @@ -423,8 +423,14 @@ function resolve_mediaid($ns,&$page,&$exists){ */ function resolve_pageid($ns,&$page,&$exists){ global $conf; + global $ID; $exists = false; + //empty address should point to current page + if ($page === "") { + $page = $ID; + } + //keep hashlink if exists then clean both parts if (strpos($page,'#')) { list($page,$hash) = explode('#',$page,2); -- cgit v1.2.3 From 4ab823396c3a43defae8363fec0e0eceb90720e6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Izidor=20Matu=C5=A1ov?= Date: Mon, 4 Apr 2011 11:06:40 +0200 Subject: Unit test cases for FS 2178 --- _test/cases/inc/parser/xhtml_links.test.php | 89 +++++++++++++++++++++++++++++ 1 file changed, 89 insertions(+) diff --git a/_test/cases/inc/parser/xhtml_links.test.php b/_test/cases/inc/parser/xhtml_links.test.php index 0ad96c793..4954086a2 100644 --- a/_test/cases/inc/parser/xhtml_links.test.php +++ b/_test/cases/inc/parser/xhtml_links.test.php @@ -41,4 +41,93 @@ class xhtml_links_test extends UnitTestCase { $this->assertEqual($p->doc,$expect); } + /** + * Produced by syntax like [[ ]] + */ + function test_empty_internallink(){ + global $ID; + $ID = 'my:space'; + + $p = new Doku_Renderer_xhtml(); + $p->internallink(''); + + $expect = 'start'; + + $this->assertEqual($p->doc, $expect); + } + + /** + * Produced by syntax like [[ |my caption]] + */ + function test_empty_internallink_with_caption(){ + global $ID; + $ID = 'my:space'; + + $p = new Doku_Renderer_xhtml(); + $p->internallink('', 'my caption'); + + $expect = 'my caption'; + + $this->assertEqual($p->doc, $expect); + } + + /** + * Produced by syntax like [[?do=index]] + */ + function test_empty_internallink_index(){ + global $ID; + $ID = 'my:space'; + + $p = new Doku_Renderer_xhtml(); + $p->internallink('?do=index'); + + $expect = 'start'; + + $this->assertEqual($p->doc, $expect); + } + + /** + * Produced by syntax like [[?do=index|my caption]] + */ + function test_empty_internallink_index_with_caption(){ + global $ID; + $ID = 'my:space'; + + $p = new Doku_Renderer_xhtml(); + $p->internallink('?do=index', 'my caption'); + + $expect = 'my caption'; + + $this->assertEqual($p->doc, $expect); + } + + /** + * Produced by syntax like [[#test]] + */ + function test_empty_locallink(){ + global $ID; + $ID = 'my:space'; + + $p = new Doku_Renderer_xhtml(); + $p->locallink('test'); + + $expect = 'test'; + + $this->assertEqual($p->doc, $expect); + } + + /** + * Produced by syntax like [[#test|my caption]] + */ + function test_empty_locallink_with_caption(){ + global $ID; + $ID = 'my:space'; + + $p = new Doku_Renderer_xhtml(); + $p->locallink('test', 'my caption'); + + $expect = 'my caption'; + + $this->assertEqual($p->doc, $expect); + } } -- cgit v1.2.3 From 38574c3529746542183c68d28c6ad6fc1de2d6dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Izidor=20Matu=C5=A1ov?= Date: Thu, 7 Apr 2011 11:44:16 +0200 Subject: Added configuration variables for empty link testcases and added testcases for resolve_pageid --- _test/cases/inc/pageutils_resolve_pageid.test.php | 22 ++++++++++ _test/cases/inc/parser/xhtml_links.test.php | 50 +++++++++++++++++++++-- 2 files changed, 68 insertions(+), 4 deletions(-) diff --git a/_test/cases/inc/pageutils_resolve_pageid.test.php b/_test/cases/inc/pageutils_resolve_pageid.test.php index d9ea89869..c65ed1866 100644 --- a/_test/cases/inc/pageutils_resolve_pageid.test.php +++ b/_test/cases/inc/pageutils_resolve_pageid.test.php @@ -50,6 +50,10 @@ class init_resolve_pageid_test extends UnitTestCase { $tests[] = array('foo','foo:','foo:start'); $tests[] = array('foo','playground:','playground:playground'); + // empty $page + global $ID; + $ID = 'my:space'; + $tests[] = array('my', '', 'my:space'); foreach($tests as $test){ $page = $test[1]; @@ -59,5 +63,23 @@ class init_resolve_pageid_test extends UnitTestCase { } } + /** + * Empty page on homepage should resolve to start page + */ + function test_resolve_pageid_empty_homepage() { + global $ID; + $ID = ''; + + global $conf; + $conf['start'] = 'someverystrangestartname'; + + $ns = ''; + $page = ''; + $exist = true; + + resolve_pageid($ns, $page, $exist); + $this->assertEqual($page, $conf['start']); + } + } //Setup VIM: ex: et ts=4 : diff --git a/_test/cases/inc/parser/xhtml_links.test.php b/_test/cases/inc/parser/xhtml_links.test.php index 4954086a2..11883dd9c 100644 --- a/_test/cases/inc/parser/xhtml_links.test.php +++ b/_test/cases/inc/parser/xhtml_links.test.php @@ -48,10 +48,17 @@ class xhtml_links_test extends UnitTestCase { global $ID; $ID = 'my:space'; + global $conf; + $conf['basedir'] = '/'; + $conf['useheading'] = 0; + $conf['userewrite'] = 0; + $conf['useslash'] = 0; + $conf['canonical'] = 0; + $p = new Doku_Renderer_xhtml(); $p->internallink(''); - $expect = 'start'; + $expect = 'start'; $this->assertEqual($p->doc, $expect); } @@ -63,10 +70,17 @@ class xhtml_links_test extends UnitTestCase { global $ID; $ID = 'my:space'; + global $conf; + $conf['basedir'] = '/'; + $conf['useheading'] = 0; + $conf['userewrite'] = 0; + $conf['useslash'] = 0; + $conf['canonical'] = 0; + $p = new Doku_Renderer_xhtml(); $p->internallink('', 'my caption'); - $expect = 'my caption'; + $expect = 'my caption'; $this->assertEqual($p->doc, $expect); } @@ -78,10 +92,17 @@ class xhtml_links_test extends UnitTestCase { global $ID; $ID = 'my:space'; + global $conf; + $conf['basedir'] = '/'; + $conf['useheading'] = 0; + $conf['userewrite'] = 0; + $conf['useslash'] = 0; + $conf['canonical'] = 0; + $p = new Doku_Renderer_xhtml(); $p->internallink('?do=index'); - $expect = 'start'; + $expect = 'start'; $this->assertEqual($p->doc, $expect); } @@ -93,10 +114,17 @@ class xhtml_links_test extends UnitTestCase { global $ID; $ID = 'my:space'; + global $conf; + $conf['basedir'] = '/'; + $conf['useheading'] = 0; + $conf['userewrite'] = 0; + $conf['useslash'] = 0; + $conf['canonical'] = 0; + $p = new Doku_Renderer_xhtml(); $p->internallink('?do=index', 'my caption'); - $expect = 'my caption'; + $expect = 'my caption'; $this->assertEqual($p->doc, $expect); } @@ -108,6 +136,13 @@ class xhtml_links_test extends UnitTestCase { global $ID; $ID = 'my:space'; + global $conf; + $conf['basedir'] = '/'; + $conf['useheading'] = 0; + $conf['userewrite'] = 0; + $conf['useslash'] = 0; + $conf['canonical'] = 0; + $p = new Doku_Renderer_xhtml(); $p->locallink('test'); @@ -123,6 +158,13 @@ class xhtml_links_test extends UnitTestCase { global $ID; $ID = 'my:space'; + global $conf; + $conf['basedir'] = '/'; + $conf['useheading'] = 0; + $conf['userewrite'] = 0; + $conf['useslash'] = 0; + $conf['canonical'] = 0; + $p = new Doku_Renderer_xhtml(); $p->locallink('test', 'my caption'); -- cgit v1.2.3 From fda14ffc7c57c4451df9196e8125cd39b1d5c134 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Izidor=20Matu=C5=A1ov?= Date: Thu, 7 Apr 2011 19:44:54 +0200 Subject: Check if link exists and set right caption --- _test/cases/inc/parser/xhtml_links.test.php | 94 ++++++++++++++++++++++++----- inc/parser/xhtml.php | 9 +++ 2 files changed, 88 insertions(+), 15 deletions(-) diff --git a/_test/cases/inc/parser/xhtml_links.test.php b/_test/cases/inc/parser/xhtml_links.test.php index 11883dd9c..74c39353e 100644 --- a/_test/cases/inc/parser/xhtml_links.test.php +++ b/_test/cases/inc/parser/xhtml_links.test.php @@ -1,6 +1,7 @@ internallink(''); - $expect = 'start'; + + if (page_exists($page)) { + $class = 'wikilink1'; + $rel = ''; + } + else { + $class = 'wikilink2'; + $rel = ' rel="nofollow"'; + } + + $parts = split(':', $page); + $caption = $parts[count($parts)-1]; + + $expect = ''.$caption.''; $this->assertEqual($p->doc, $expect); } @@ -67,8 +86,11 @@ class xhtml_links_test extends UnitTestCase { * Produced by syntax like [[ |my caption]] */ function test_empty_internallink_with_caption(){ + $page = 'my:space'; + $caption = 'my caption'; + global $ID; - $ID = 'my:space'; + $ID = $page; global $conf; $conf['basedir'] = '/'; @@ -78,9 +100,18 @@ class xhtml_links_test extends UnitTestCase { $conf['canonical'] = 0; $p = new Doku_Renderer_xhtml(); - $p->internallink('', 'my caption'); + $p->internallink('', $caption); + + if (page_exists($page)) { + $class = 'wikilink1'; + $rel = ''; + } + else { + $class = 'wikilink2'; + $rel = ' rel="nofollow"'; + } - $expect = 'my caption'; + $expect = ''.$caption.''; $this->assertEqual($p->doc, $expect); } @@ -89,8 +120,13 @@ class xhtml_links_test extends UnitTestCase { * Produced by syntax like [[?do=index]] */ function test_empty_internallink_index(){ + $page = 'my:space'; + global $ID; - $ID = 'my:space'; + $ID = $page; + + global $conf; + $conf['start'] = 'start'; global $conf; $conf['basedir'] = '/'; @@ -102,7 +138,19 @@ class xhtml_links_test extends UnitTestCase { $p = new Doku_Renderer_xhtml(); $p->internallink('?do=index'); - $expect = 'start'; + if (page_exists($page)) { + $class = 'wikilink1'; + $rel = ''; + } + else { + $class = 'wikilink2'; + $rel = ' rel="nofollow"'; + } + + $parts = split(':', $page); + $caption = $parts[count($parts)-1]; + + $expect = ''.$caption.''; $this->assertEqual($p->doc, $expect); } @@ -111,8 +159,11 @@ class xhtml_links_test extends UnitTestCase { * Produced by syntax like [[?do=index|my caption]] */ function test_empty_internallink_index_with_caption(){ + $page = 'my:space'; + $caption = 'my caption'; + global $ID; - $ID = 'my:space'; + $ID = $page; global $conf; $conf['basedir'] = '/'; @@ -122,9 +173,18 @@ class xhtml_links_test extends UnitTestCase { $conf['canonical'] = 0; $p = new Doku_Renderer_xhtml(); - $p->internallink('?do=index', 'my caption'); + $p->internallink('?do=index', $caption); - $expect = 'my caption'; + if (page_exists($page)) { + $class = 'wikilink1'; + $rel = ''; + } + else { + $class = 'wikilink2'; + $rel = ' rel="nofollow"'; + } + + $expect = ''.$caption.''; $this->assertEqual($p->doc, $expect); } @@ -133,8 +193,9 @@ class xhtml_links_test extends UnitTestCase { * Produced by syntax like [[#test]] */ function test_empty_locallink(){ + $page = 'my:spacex'; global $ID; - $ID = 'my:space'; + $ID = $page; global $conf; $conf['basedir'] = '/'; @@ -146,7 +207,7 @@ class xhtml_links_test extends UnitTestCase { $p = new Doku_Renderer_xhtml(); $p->locallink('test'); - $expect = 'test'; + $expect = 'test'; $this->assertEqual($p->doc, $expect); } @@ -155,8 +216,11 @@ class xhtml_links_test extends UnitTestCase { * Produced by syntax like [[#test|my caption]] */ function test_empty_locallink_with_caption(){ + $page = 'my:spacex'; + $caption = 'my caption'; + global $ID; - $ID = 'my:space'; + $ID = $page; global $conf; $conf['basedir'] = '/'; @@ -166,9 +230,9 @@ class xhtml_links_test extends UnitTestCase { $conf['canonical'] = 0; $p = new Doku_Renderer_xhtml(); - $p->locallink('test', 'my caption'); + $p->locallink('test', $caption); - $expect = 'my caption'; + $expect = ''.$caption.''; $this->assertEqual($p->doc, $expect); } diff --git a/inc/parser/xhtml.php b/inc/parser/xhtml.php index 9405d9420..ab295dd01 100644 --- a/inc/parser/xhtml.php +++ b/inc/parser/xhtml.php @@ -574,11 +574,20 @@ class Doku_Renderer_xhtml extends Doku_Renderer { $params = $parts[1]; } + // For empty $id we need to know the current $ID + // We need this check because _simpleTitle needs + // correct $id and resolve_pageid() use cleanID($id) + // (some things could be lost) + if ($id === '') { + $id = $ID; + } + // default name is based on $id as given $default = $this->_simpleTitle($id); // now first resolve and clean up the $id resolve_pageid(getNS($ID),$id,$exists); + $name = $this->_getLinkTitle($name, $default, $isImage, $id, $linktype); if ( !$isImage ) { if ( $exists ) { -- cgit v1.2.3 From 0c28bbb66296d814d8969a62c54001516ed3e0ad Mon Sep 17 00:00:00 2001 From: Adrian Lang Date: Sat, 9 Apr 2011 13:30:34 +0200 Subject: Fix page ID test cases & make them more robust --- _test/cases/inc/pageutils_getid.test.php | 2 +- _test/cases/inc/parser/xhtml_links.test.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/_test/cases/inc/pageutils_getid.test.php b/_test/cases/inc/pageutils_getid.test.php index 7fccc3a60..6eddeb5ea 100644 --- a/_test/cases/inc/pageutils_getid.test.php +++ b/_test/cases/inc/pageutils_getid.test.php @@ -99,7 +99,7 @@ class init_getID_test extends UnitTestCase { $_SERVER['PATH_TRANSLATED'] = '/var/www/index.html'; $_SERVER['PHP_SELF'] = '/dokuwiki/doku.php/'; - $this->assertEqual(getID(), 'start'); + $this->assertEqual(getID(), cleanID($conf['start'])); } } diff --git a/_test/cases/inc/parser/xhtml_links.test.php b/_test/cases/inc/parser/xhtml_links.test.php index 74c39353e..a9a6dfdbc 100644 --- a/_test/cases/inc/parser/xhtml_links.test.php +++ b/_test/cases/inc/parser/xhtml_links.test.php @@ -232,7 +232,7 @@ class xhtml_links_test extends UnitTestCase { $p = new Doku_Renderer_xhtml(); $p->locallink('test', $caption); - $expect = ''.$caption.''; + $expect = ''.$caption.''; $this->assertEqual($p->doc, $expect); } -- cgit v1.2.3 From 32ed2b361abb0cb00bee6572d022684260f0edd2 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Mon, 11 Apr 2011 17:21:36 +0200 Subject: stay logged in when updating your password This functionality broke in recent updates to the cookie handling. This patch makes it work again. Binding to the session is now a functionality of auth_cookiesalt() --- inc/auth.php | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/inc/auth.php b/inc/auth.php index 53376be34..a480a4a8a 100644 --- a/inc/auth.php +++ b/inc/auth.php @@ -189,8 +189,7 @@ function auth_login($user,$pass,$sticky=false,$silent=false){ if ($auth->checkPass($user,$pass)){ // make logininfo globally available $_SERVER['REMOTE_USER'] = $user; - $secret = auth_cookiesalt(); - if(!$sticky) $secret .= session_id; //bind non-sticky to session + $secret = auth_cookiesalt(!$sticky); //bind non-sticky to session auth_setCookie($user,PMA_blowfish_encrypt($pass,$secret),$sticky); return true; }else{ @@ -220,8 +219,7 @@ function auth_login($user,$pass,$sticky=false,$silent=false){ return true; } // no we don't trust it yet - recheck pass but silent - $secret = auth_cookiesalt(); - if(!$sticky) $secret .= session_id(); //bind non-sticky to session + $secret = auth_cookiesalt(!$sticky); //bind non-sticky to session $pass = PMA_blowfish_decrypt($pass,$secret); return auth_login($user,$pass,$sticky,true); } @@ -303,10 +301,10 @@ function auth_browseruid(){ * and stored in this file. * * @author Andreas Gohr - * + * @param bool $addsession if true, the sessionid is added to the salt * @return string */ -function auth_cookiesalt(){ +function auth_cookiesalt($addsession=false){ global $conf; $file = $conf['metadir'].'/_htcookiesalt'; $salt = io_readFile($file); @@ -314,6 +312,9 @@ function auth_cookiesalt(){ $salt = uniqid(rand(),true); io_saveFile($file,$salt); } + if($addsession){ + $salt .= session_id(); + } return $salt; } @@ -814,11 +815,11 @@ function updateprofile() { if ($result = $auth->triggerUserMod('modify', array($_SERVER['REMOTE_USER'], $changes))) { // update cookie and session with the changed data - $cookie = base64_decode($_COOKIE[DOKU_COOKIE]); - list($user,$sticky,$pass) = explode('|',$cookie,3); - if ($changes['pass']) $pass = PMA_blowfish_encrypt($changes['pass'],auth_cookiesalt()); - - auth_setCookie($_SERVER['REMOTE_USER'],$pass,(bool)$sticky); + if ($changes['pass']){ + list($user,$sticky,$pass) = auth_getCookie(); + $pass = PMA_blowfish_encrypt($changes['pass'],auth_cookiesalt(!$sticky)); + auth_setCookie($_SERVER['REMOTE_USER'],$pass,(bool)$sticky); + } return true; } } -- cgit v1.2.3 From c6792be7965e27a806043ef0dc82c3c0ed7b4060 Mon Sep 17 00:00:00 2001 From: Tanguy Ortolo Date: Wed, 13 Apr 2011 22:22:15 +0200 Subject: chmod -x inc/lang/az/* These regular files were executable for no reason. They needed a special rule for the Debian package, better to fix it upstream. --- inc/lang/az/admin.txt | 0 inc/lang/az/adminplugins.txt | 0 inc/lang/az/backlinks.txt | 0 inc/lang/az/conflict.txt | 0 inc/lang/az/denied.txt | 0 inc/lang/az/diff.txt | 0 inc/lang/az/draft.txt | 0 inc/lang/az/edit.txt | 0 inc/lang/az/editrev.txt | 0 inc/lang/az/index.txt | 0 inc/lang/az/install.html | 0 inc/lang/az/locked.txt | 0 inc/lang/az/login.txt | 0 inc/lang/az/mailtext.txt | 0 inc/lang/az/newpage.txt | 0 inc/lang/az/norev.txt | 0 inc/lang/az/password.txt | 0 inc/lang/az/preview.txt | 0 inc/lang/az/pwconfirm.txt | 0 inc/lang/az/read.txt | 0 inc/lang/az/recent.txt | 0 inc/lang/az/register.txt | 0 inc/lang/az/registermail.txt | 0 inc/lang/az/resendpwd.txt | 0 inc/lang/az/revisions.txt | 0 inc/lang/az/searchpage.txt | 0 inc/lang/az/showrev.txt | 0 inc/lang/az/stopwords.txt | 0 inc/lang/az/updateprofile.txt | 0 inc/lang/az/uploadmail.txt | 0 inc/lang/az/wordblock.txt | 0 31 files changed, 0 insertions(+), 0 deletions(-) mode change 100755 => 100644 inc/lang/az/admin.txt mode change 100755 => 100644 inc/lang/az/adminplugins.txt mode change 100755 => 100644 inc/lang/az/backlinks.txt mode change 100755 => 100644 inc/lang/az/conflict.txt mode change 100755 => 100644 inc/lang/az/denied.txt mode change 100755 => 100644 inc/lang/az/diff.txt mode change 100755 => 100644 inc/lang/az/draft.txt mode change 100755 => 100644 inc/lang/az/edit.txt mode change 100755 => 100644 inc/lang/az/editrev.txt mode change 100755 => 100644 inc/lang/az/index.txt mode change 100755 => 100644 inc/lang/az/install.html mode change 100755 => 100644 inc/lang/az/locked.txt mode change 100755 => 100644 inc/lang/az/login.txt mode change 100755 => 100644 inc/lang/az/mailtext.txt mode change 100755 => 100644 inc/lang/az/newpage.txt mode change 100755 => 100644 inc/lang/az/norev.txt mode change 100755 => 100644 inc/lang/az/password.txt mode change 100755 => 100644 inc/lang/az/preview.txt mode change 100755 => 100644 inc/lang/az/pwconfirm.txt mode change 100755 => 100644 inc/lang/az/read.txt mode change 100755 => 100644 inc/lang/az/recent.txt mode change 100755 => 100644 inc/lang/az/register.txt mode change 100755 => 100644 inc/lang/az/registermail.txt mode change 100755 => 100644 inc/lang/az/resendpwd.txt mode change 100755 => 100644 inc/lang/az/revisions.txt mode change 100755 => 100644 inc/lang/az/searchpage.txt mode change 100755 => 100644 inc/lang/az/showrev.txt mode change 100755 => 100644 inc/lang/az/stopwords.txt mode change 100755 => 100644 inc/lang/az/updateprofile.txt mode change 100755 => 100644 inc/lang/az/uploadmail.txt mode change 100755 => 100644 inc/lang/az/wordblock.txt diff --git a/inc/lang/az/admin.txt b/inc/lang/az/admin.txt old mode 100755 new mode 100644 diff --git a/inc/lang/az/adminplugins.txt b/inc/lang/az/adminplugins.txt old mode 100755 new mode 100644 diff --git a/inc/lang/az/backlinks.txt b/inc/lang/az/backlinks.txt old mode 100755 new mode 100644 diff --git a/inc/lang/az/conflict.txt b/inc/lang/az/conflict.txt old mode 100755 new mode 100644 diff --git a/inc/lang/az/denied.txt b/inc/lang/az/denied.txt old mode 100755 new mode 100644 diff --git a/inc/lang/az/diff.txt b/inc/lang/az/diff.txt old mode 100755 new mode 100644 diff --git a/inc/lang/az/draft.txt b/inc/lang/az/draft.txt old mode 100755 new mode 100644 diff --git a/inc/lang/az/edit.txt b/inc/lang/az/edit.txt old mode 100755 new mode 100644 diff --git a/inc/lang/az/editrev.txt b/inc/lang/az/editrev.txt old mode 100755 new mode 100644 diff --git a/inc/lang/az/index.txt b/inc/lang/az/index.txt old mode 100755 new mode 100644 diff --git a/inc/lang/az/install.html b/inc/lang/az/install.html old mode 100755 new mode 100644 diff --git a/inc/lang/az/locked.txt b/inc/lang/az/locked.txt old mode 100755 new mode 100644 diff --git a/inc/lang/az/login.txt b/inc/lang/az/login.txt old mode 100755 new mode 100644 diff --git a/inc/lang/az/mailtext.txt b/inc/lang/az/mailtext.txt old mode 100755 new mode 100644 diff --git a/inc/lang/az/newpage.txt b/inc/lang/az/newpage.txt old mode 100755 new mode 100644 diff --git a/inc/lang/az/norev.txt b/inc/lang/az/norev.txt old mode 100755 new mode 100644 diff --git a/inc/lang/az/password.txt b/inc/lang/az/password.txt old mode 100755 new mode 100644 diff --git a/inc/lang/az/preview.txt b/inc/lang/az/preview.txt old mode 100755 new mode 100644 diff --git a/inc/lang/az/pwconfirm.txt b/inc/lang/az/pwconfirm.txt old mode 100755 new mode 100644 diff --git a/inc/lang/az/read.txt b/inc/lang/az/read.txt old mode 100755 new mode 100644 diff --git a/inc/lang/az/recent.txt b/inc/lang/az/recent.txt old mode 100755 new mode 100644 diff --git a/inc/lang/az/register.txt b/inc/lang/az/register.txt old mode 100755 new mode 100644 diff --git a/inc/lang/az/registermail.txt b/inc/lang/az/registermail.txt old mode 100755 new mode 100644 diff --git a/inc/lang/az/resendpwd.txt b/inc/lang/az/resendpwd.txt old mode 100755 new mode 100644 diff --git a/inc/lang/az/revisions.txt b/inc/lang/az/revisions.txt old mode 100755 new mode 100644 diff --git a/inc/lang/az/searchpage.txt b/inc/lang/az/searchpage.txt old mode 100755 new mode 100644 diff --git a/inc/lang/az/showrev.txt b/inc/lang/az/showrev.txt old mode 100755 new mode 100644 diff --git a/inc/lang/az/stopwords.txt b/inc/lang/az/stopwords.txt old mode 100755 new mode 100644 diff --git a/inc/lang/az/updateprofile.txt b/inc/lang/az/updateprofile.txt old mode 100755 new mode 100644 diff --git a/inc/lang/az/uploadmail.txt b/inc/lang/az/uploadmail.txt old mode 100755 new mode 100644 diff --git a/inc/lang/az/wordblock.txt b/inc/lang/az/wordblock.txt old mode 100755 new mode 100644 -- cgit v1.2.3 From 45a0fa152ba78aed840341ef83613c58c0ea706e Mon Sep 17 00:00:00 2001 From: Adrian Lang Date: Thu, 14 Apr 2011 07:57:49 +0200 Subject: Support the empty link [[]] --- _test/cases/inc/parser/parser_links.test.php | 15 +++++++++++++++ inc/parser/parser.php | 2 +- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/_test/cases/inc/parser/parser_links.test.php b/_test/cases/inc/parser/parser_links.test.php index a4a8c5826..53871e110 100644 --- a/_test/cases/inc/parser/parser_links.test.php +++ b/_test/cases/inc/parser/parser_links.test.php @@ -221,6 +221,21 @@ class TestOfDoku_Parser_Links extends TestOfDoku_Parser { $this->assertEqual(array_map('stripByteIndex',$this->H->calls),$calls); } + function testInternalLinkNoChar() { + $this->P->addMode('internallink',new Doku_Parser_Mode_InternalLink()); + $this->P->parse("Foo [[]] Bar"); + $calls = array ( + array('document_start',array()), + array('p_open',array()), + array('cdata',array("\n".'Foo ')), + array('internallink',array('',NULL)), + array('cdata',array(' Bar')), + array('p_close',array()), + array('document_end',array()), + ); + $this->assertEqual(array_map('stripByteIndex',$this->H->calls),$calls); + } + function testInternalLinkNamespaceNoTitle() { $this->P->addMode('internallink',new Doku_Parser_Mode_InternalLink()); $this->P->parse("Foo [[foo:bar]] Bar"); diff --git a/inc/parser/parser.php b/inc/parser/parser.php index e47ce56fa..68d4e4569 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 8e65cd510bfa93eba1b847b6cbea1764fad480af Mon Sep 17 00:00:00 2001 From: Otto Vainio Date: Fri, 1 Apr 2011 19:56:32 +0200 Subject: Finnish language update --- inc/lang/fi/lang.php | 3 +++ inc/lang/fi/stopwords.txt | 12 ++++++++++++ lib/plugins/config/lang/fi/lang.php | 2 +- lib/plugins/plugin/lang/fi/lang.php | 2 +- lib/plugins/popularity/lang/fi/lang.php | 5 +++++ lib/plugins/popularity/lang/fi/submitted.txt | 3 +++ 6 files changed, 25 insertions(+), 2 deletions(-) create mode 100644 lib/plugins/popularity/lang/fi/submitted.txt diff --git a/inc/lang/fi/lang.php b/inc/lang/fi/lang.php index bc52625e0..f8042a645 100644 --- a/inc/lang/fi/lang.php +++ b/inc/lang/fi/lang.php @@ -159,6 +159,9 @@ $lang['yours'] = 'Sinun versiosi'; $lang['diff'] = 'Näytä eroavaisuudet nykyiseen versioon'; $lang['diff2'] = 'Näytä eroavaisuudet valittuun versioon'; $lang['difflink'] = 'Linkki vertailunäkymään'; +$lang['diff_type'] = 'Näytä erot:'; +$lang['diff_inline'] = 'Sisäkkäin'; +$lang['diff_side'] = 'Vierekkäin'; $lang['line'] = 'Rivi'; $lang['breadcrumb'] = 'Jäljet'; $lang['youarehere'] = 'Olet täällä'; diff --git a/inc/lang/fi/stopwords.txt b/inc/lang/fi/stopwords.txt index 82d3daa44..509dd0d03 100644 --- a/inc/lang/fi/stopwords.txt +++ b/inc/lang/fi/stopwords.txt @@ -5,7 +5,19 @@ www eli tai +minä sinä +hän +tämä +tuo +nämä +nuo +kuka +mikä +kumpi sinun com oli +jos +kun +joka diff --git a/lib/plugins/config/lang/fi/lang.php b/lib/plugins/config/lang/fi/lang.php index b033e312b..5a167c9aa 100644 --- a/lib/plugins/config/lang/fi/lang.php +++ b/lib/plugins/config/lang/fi/lang.php @@ -97,7 +97,7 @@ $lang['canonical'] = 'Käytä kanonisoituja URLeja'; $lang['fnencode'] = 'Muita kuin ASCII merkkejä sisältävien tiedostonimien koodaustapa.'; $lang['autoplural'] = 'Etsi monikkomuotoja linkeistä'; $lang['compression'] = 'Attic-tiedostojen pakkausmenetelmä'; -$lang['cachetime'] = 'Välimuisti-tiedostojen maksimi-ikä (sek)'; +$lang['cachetime'] = 'Välimuisti-tiedostojen maksimi ikä (sek)'; $lang['locktime'] = 'Lukitustiedostojen maksimi-ikä (sek)'; $lang['fetchsize'] = 'Suurin koko (bytejä), jonka fetch.php voi ladata ulkopuolisesta lähteestä'; $lang['notify'] = 'Lähetä muutosilmoitukset tähän osoitteeseen'; diff --git a/lib/plugins/plugin/lang/fi/lang.php b/lib/plugins/plugin/lang/fi/lang.php index 817b4f20a..b4c95c56d 100644 --- a/lib/plugins/plugin/lang/fi/lang.php +++ b/lib/plugins/plugin/lang/fi/lang.php @@ -44,7 +44,7 @@ $lang['error_download'] = 'Liitännäistiedoston %s latauksessa tapahtui $lang['error_badurl'] = 'URL vaikuttaa olleen virheellinen. Siitä ei pystytty päättelemään tiedoston nimeä'; $lang['error_dircreate'] = 'Ei pystytty luomaan väliaikaista hakemistoa latausta varten'; $lang['error_decompress'] = 'Liitännäishallinta ei pystynyt purkamaan ladattua tiedostoa. Lataus voi olla epäonnistunut. Siinä tapauksessa voit yrittää uudestaan. Pakkaustapa voi myös olla tuntematon. Siinä tapauksessa sinun pitää ladata ja asentaa liitännäinen käsin.'; -$lang['error_copy'] = 'Tiedoston kopioinnissa tapahtui liitännäisen %s asennuksen aikana virhe. Levy voi olla täynnä tai kansioiden oikeudet voivat olla väärin. Liitännäinen voi olla osittain asennettu ja tämä voi jättää wikiasennukseesi epävakaaseen tilaan.'; +$lang['error_copy'] = 'Tiedoston kopioinnissa tapahtui liitännäisen %s asennuksen aikana virhe. Levy voi olla täynnä tai kansioiden oikeudet voivat olla väärin. Liitännäinen voi olla osittain asennettu ja tämä voi jättää wikisi epävakaaseen tilaan.'; $lang['error_delete'] = 'Liitännäisen %s poistossa tapahtui virhe. Todennäköisin syy on puutteelliset tiedoston tai hakemiston oikeudet'; $lang['enabled'] = 'Liitännäinen %s käytössä'; $lang['notenabled'] = 'Liitännäistä %s ei voitu ottaa käyttöön. Tarkista tiedostojen oikeudet.'; diff --git a/lib/plugins/popularity/lang/fi/lang.php b/lib/plugins/popularity/lang/fi/lang.php index 3aa5dc23b..dca4aa909 100644 --- a/lib/plugins/popularity/lang/fi/lang.php +++ b/lib/plugins/popularity/lang/fi/lang.php @@ -7,3 +7,8 @@ */ $lang['name'] = 'Suosion palaute (voi kestää jonkun aikaa latautua)'; $lang['submit'] = 'Lähetä tiedot'; +$lang['autosubmit'] = 'Lähetä tiedot automaattisesti kerran kuussa'; +$lang['submissionFailed'] = 'Tietoja ei voitu lähettää seuraavan virheen vuoksi:'; +$lang['submitDirectly'] = 'Voit lähettää tiedot manuaalisesti.'; +$lang['autosubmitError'] = 'Edellinen automaattinen lähetys epäonnistui seuraavan virheen vuoksi:'; +$lang['lastSent'] = 'Tiedot on nyt lähettetty.'; diff --git a/lib/plugins/popularity/lang/fi/submitted.txt b/lib/plugins/popularity/lang/fi/submitted.txt new file mode 100644 index 000000000..b36e7eb23 --- /dev/null +++ b/lib/plugins/popularity/lang/fi/submitted.txt @@ -0,0 +1,3 @@ +====== Suosion palaute ====== + +Tiedot on nyt lähetetty onnistuneesti. \ No newline at end of file -- cgit v1.2.3 From dd5aedfa30ea1210c38697bb39fb945033cf806b Mon Sep 17 00:00:00 2001 From: Constantinos Xanthopoulos Date: Sat, 16 Apr 2011 09:17:55 +0200 Subject: French language update --- lib/plugins/config/lang/fr/lang.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/plugins/config/lang/fr/lang.php b/lib/plugins/config/lang/fr/lang.php index 99e140af5..f5a8da0e2 100644 --- a/lib/plugins/config/lang/fr/lang.php +++ b/lib/plugins/config/lang/fr/lang.php @@ -103,7 +103,7 @@ $lang['useslash'] = 'Utiliser « / » comme séparateur de catég $lang['usedraft'] = 'Enregistrer automatiquement un brouillon pendant l\'édition'; $lang['sepchar'] = 'Séparateur de mots dans les noms de page'; $lang['canonical'] = 'Utiliser des URL canoniques'; -$lang['fnencode'] = 'Méhtode pou r l\'encodage des fichiers non-ASCII'; +$lang['fnencode'] = 'Méthode pour l\'encodage des fichiers non-ASCII'; $lang['autoplural'] = 'Rechercher les formes plurielles dans les liens'; $lang['compression'] = 'Méthode de compression pour les fichiers dans attic'; $lang['cachetime'] = 'Âge maximum d\'un fichier en cache (en secondes)'; -- cgit v1.2.3 From 7b89361c0d7aaa6bdf28c200aa93fc8f1435cad9 Mon Sep 17 00:00:00 2001 From: Otto Vainio Date: Sat, 16 Apr 2011 09:18:56 +0200 Subject: Finnish language update --- inc/lang/fi/lang.php | 2 +- inc/lang/fi/stopwords.txt | 12 ------------ lib/plugins/config/lang/fi/lang.php | 3 ++- lib/plugins/plugin/lang/fi/lang.php | 2 +- lib/plugins/popularity/lang/fi/lang.php | 6 +++--- lib/plugins/popularity/lang/fi/submitted.txt | 2 +- 6 files changed, 8 insertions(+), 19 deletions(-) diff --git a/inc/lang/fi/lang.php b/inc/lang/fi/lang.php index f8042a645..35f7b3c09 100644 --- a/inc/lang/fi/lang.php +++ b/inc/lang/fi/lang.php @@ -159,7 +159,7 @@ $lang['yours'] = 'Sinun versiosi'; $lang['diff'] = 'Näytä eroavaisuudet nykyiseen versioon'; $lang['diff2'] = 'Näytä eroavaisuudet valittuun versioon'; $lang['difflink'] = 'Linkki vertailunäkymään'; -$lang['diff_type'] = 'Näytä erot:'; +$lang['diff_type'] = 'Näytä eroavaisuudet:'; $lang['diff_inline'] = 'Sisäkkäin'; $lang['diff_side'] = 'Vierekkäin'; $lang['line'] = 'Rivi'; diff --git a/inc/lang/fi/stopwords.txt b/inc/lang/fi/stopwords.txt index 509dd0d03..82d3daa44 100644 --- a/inc/lang/fi/stopwords.txt +++ b/inc/lang/fi/stopwords.txt @@ -5,19 +5,7 @@ www eli tai -minä sinä -hän -tämä -tuo -nämä -nuo -kuka -mikä -kumpi sinun com oli -jos -kun -joka diff --git a/lib/plugins/config/lang/fi/lang.php b/lib/plugins/config/lang/fi/lang.php index 5a167c9aa..a4c0fbb85 100644 --- a/lib/plugins/config/lang/fi/lang.php +++ b/lib/plugins/config/lang/fi/lang.php @@ -97,12 +97,13 @@ $lang['canonical'] = 'Käytä kanonisoituja URLeja'; $lang['fnencode'] = 'Muita kuin ASCII merkkejä sisältävien tiedostonimien koodaustapa.'; $lang['autoplural'] = 'Etsi monikkomuotoja linkeistä'; $lang['compression'] = 'Attic-tiedostojen pakkausmenetelmä'; -$lang['cachetime'] = 'Välimuisti-tiedostojen maksimi ikä (sek)'; +$lang['cachetime'] = 'Välimuisti-tiedostojen maksimi-ikä (sek)'; $lang['locktime'] = 'Lukitustiedostojen maksimi-ikä (sek)'; $lang['fetchsize'] = 'Suurin koko (bytejä), jonka fetch.php voi ladata ulkopuolisesta lähteestä'; $lang['notify'] = 'Lähetä muutosilmoitukset tähän osoitteeseen'; $lang['registernotify'] = 'Lähetä ilmoitus uusista rekisteröitymisistä tähän osoitteeseen'; $lang['mailfrom'] = 'Sähköpostiosoite automaattisia postituksia varten'; +$lang['mailprefix'] = 'Etuliite automaattisesti lähetettyihin dähköposteihin'; $lang['gzip_output'] = 'Käytä gzip "Content-Encoding"-otsaketta xhtml-tiedostojen lähettämiseen'; $lang['gdlib'] = 'GD Lib versio'; $lang['im_convert'] = 'ImageMagick-muunnostyökalun polku'; diff --git a/lib/plugins/plugin/lang/fi/lang.php b/lib/plugins/plugin/lang/fi/lang.php index b4c95c56d..817b4f20a 100644 --- a/lib/plugins/plugin/lang/fi/lang.php +++ b/lib/plugins/plugin/lang/fi/lang.php @@ -44,7 +44,7 @@ $lang['error_download'] = 'Liitännäistiedoston %s latauksessa tapahtui $lang['error_badurl'] = 'URL vaikuttaa olleen virheellinen. Siitä ei pystytty päättelemään tiedoston nimeä'; $lang['error_dircreate'] = 'Ei pystytty luomaan väliaikaista hakemistoa latausta varten'; $lang['error_decompress'] = 'Liitännäishallinta ei pystynyt purkamaan ladattua tiedostoa. Lataus voi olla epäonnistunut. Siinä tapauksessa voit yrittää uudestaan. Pakkaustapa voi myös olla tuntematon. Siinä tapauksessa sinun pitää ladata ja asentaa liitännäinen käsin.'; -$lang['error_copy'] = 'Tiedoston kopioinnissa tapahtui liitännäisen %s asennuksen aikana virhe. Levy voi olla täynnä tai kansioiden oikeudet voivat olla väärin. Liitännäinen voi olla osittain asennettu ja tämä voi jättää wikisi epävakaaseen tilaan.'; +$lang['error_copy'] = 'Tiedoston kopioinnissa tapahtui liitännäisen %s asennuksen aikana virhe. Levy voi olla täynnä tai kansioiden oikeudet voivat olla väärin. Liitännäinen voi olla osittain asennettu ja tämä voi jättää wikiasennukseesi epävakaaseen tilaan.'; $lang['error_delete'] = 'Liitännäisen %s poistossa tapahtui virhe. Todennäköisin syy on puutteelliset tiedoston tai hakemiston oikeudet'; $lang['enabled'] = 'Liitännäinen %s käytössä'; $lang['notenabled'] = 'Liitännäistä %s ei voitu ottaa käyttöön. Tarkista tiedostojen oikeudet.'; diff --git a/lib/plugins/popularity/lang/fi/lang.php b/lib/plugins/popularity/lang/fi/lang.php index dca4aa909..a73f63501 100644 --- a/lib/plugins/popularity/lang/fi/lang.php +++ b/lib/plugins/popularity/lang/fi/lang.php @@ -9,6 +9,6 @@ $lang['name'] = 'Suosion palaute (voi kestää jonkun aikaa lat $lang['submit'] = 'Lähetä tiedot'; $lang['autosubmit'] = 'Lähetä tiedot automaattisesti kerran kuussa'; $lang['submissionFailed'] = 'Tietoja ei voitu lähettää seuraavan virheen vuoksi:'; -$lang['submitDirectly'] = 'Voit lähettää tiedot manuaalisesti.'; -$lang['autosubmitError'] = 'Edellinen automaattinen lähetys epäonnistui seuraavan virheen vuoksi:'; -$lang['lastSent'] = 'Tiedot on nyt lähettetty.'; +$lang['submitDirectly'] = 'Voit lähettää tiedot käsin seuraavan kaavakkeen avulla'; +$lang['autosubmitError'] = 'Edellinen automaattilähetys epäonnistui seuraavan virheen vuoksi:'; +$lang['lastSent'] = 'Tiedot on lähetetty'; diff --git a/lib/plugins/popularity/lang/fi/submitted.txt b/lib/plugins/popularity/lang/fi/submitted.txt index b36e7eb23..31059c880 100644 --- a/lib/plugins/popularity/lang/fi/submitted.txt +++ b/lib/plugins/popularity/lang/fi/submitted.txt @@ -1,3 +1,3 @@ ====== Suosion palaute ====== -Tiedot on nyt lähetetty onnistuneesti. \ No newline at end of file +Tiedot lähetettiin onnistuneesti. \ No newline at end of file -- cgit v1.2.3 From eeb828da84a0ee39a62c0c9bf4ecc3d006c6e6e9 Mon Sep 17 00:00:00 2001 From: Guy Brand Date: Sat, 16 Apr 2011 10:06:43 +0200 Subject: Update copyright year --- README | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README b/README index 76a7cf6cd..6bb9a3bd9 100644 --- a/README +++ b/README @@ -4,7 +4,7 @@ at http://www.dokuwiki.org/ For Installation Instructions see http://www.dokuwiki.org/install -DokuWiki - 2004-2010 (c) Andreas Gohr +DokuWiki - 2004-2011 (c) Andreas Gohr and the DokuWiki Community See COPYING and file headers for license info -- cgit v1.2.3 From 8dbd31e5a77929167c5dbba14c448c6acc0be95b Mon Sep 17 00:00:00 2001 From: Guy Brand Date: Sat, 16 Apr 2011 10:07:11 +0200 Subject: Fix broken link to config help page --- conf/dokuwiki.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conf/dokuwiki.php b/conf/dokuwiki.php index 538b9f9da..e90e4fc23 100644 --- a/conf/dokuwiki.php +++ b/conf/dokuwiki.php @@ -7,7 +7,7 @@ * * This is a piece of PHP code so PHP syntax applies! * - * For help with the configuration see http://www.splitbrain.org/dokuwiki/wiki:config + * For help with the configuration see http://www.dokuwiki.org/config */ -- cgit v1.2.3 From 116065d2d8aa1613c8b90b01606efacc4fe846d1 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Sat, 16 Apr 2011 11:54:47 +0200 Subject: fix ACL preview for users with special chars FS#2206 The user was nameencoded twice. --- lib/plugins/acl/admin.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/plugins/acl/admin.php b/lib/plugins/acl/admin.php index 3e7bd8121..8ca602533 100644 --- a/lib/plugins/acl/admin.php +++ b/lib/plugins/acl/admin.php @@ -17,7 +17,7 @@ if(!defined('DOKU_INC')) die(); class admin_plugin_acl extends DokuWiki_Admin_Plugin { var $acl = null; var $ns = null; - /** + /** * The currently selected item, associative array with id and type. * Populated from (in this order): * $_REQUEST['current_ns'] @@ -37,7 +37,7 @@ class admin_plugin_acl extends DokuWiki_Admin_Plugin { return array( 'author' => 'Andreas Gohr', 'email' => 'andi@splitbrain.org', - 'date' => '2010-01-17', + 'date' => '2011-04-16', 'name' => 'ACL Manager', 'desc' => 'Manage Page Access Control Lists', 'url' => 'http://dokuwiki.org/plugin:acl', @@ -449,7 +449,7 @@ class admin_plugin_acl extends DokuWiki_Admin_Plugin { $user = ''; $groups = array(ltrim($who,'@')); }else{ - $user = auth_nameencode($who); + $user = $who; $info = $auth->getUserData($user); if($info === false){ $groups = array(); @@ -521,7 +521,7 @@ class admin_plugin_acl extends DokuWiki_Admin_Plugin { } // highlight? - if( ($item['type']== $this->current_item['type'] && $item['id'] == $this->current_item['id'])) + if( ($item['type']== $this->current_item['type'] && $item['id'] == $this->current_item['id'])) $cl = ' cur'; // namespace or page? -- cgit v1.2.3 From e8af313f1b6657e3a1b32d6fdd40bc0133a2d371 Mon Sep 17 00:00:00 2001 From: Anika Henke Date: Sat, 16 Apr 2011 12:02:38 +0100 Subject: fixed invalid html in diff options --- inc/html.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/inc/html.php b/inc/html.php index fcfa54b6c..27f862219 100644 --- a/inc/html.php +++ b/inc/html.php @@ -1004,7 +1004,7 @@ function html_diff($text='',$intro=true,$type=null){ if($intro) print p_locale_xhtml('diff'); if (!$text) { - ptln('
'); $form = new Doku_Form(array('action'=>wl())); $form->addHidden('id',$ID); @@ -1030,8 +1030,8 @@ function html_diff($text='',$intro=true,$type=null){ 'rev2[1]' => $r_rev, 'difftype' => $type, )); - ptln('
'.$lang['difflink'].''); - ptln('

'); + ptln('

'.$lang['difflink'].'

'); + ptln('
'); } ?> -- cgit v1.2.3 From be62ff971ce968b0e42730e7316728d13abe3489 Mon Sep 17 00:00:00 2001 From: Anika Henke Date: Sat, 16 Apr 2011 12:08:10 +0100 Subject: removed nbsps from some clearer divs --- inc/html.php | 2 +- lib/tpl/default/main.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/inc/html.php b/inc/html.php index 27f862219..be4cb4f9c 100644 --- a/inc/html.php +++ b/inc/html.php @@ -355,7 +355,7 @@ function html_search(){ } print ' '; //clear float (see http://www.complexspiral.com/publications/containing-floats/) - print '
 
'; + print '
'; print ''; } flush(); diff --git a/lib/tpl/default/main.php b/lib/tpl/default/main.php index 754a6e482..94c2322aa 100644 --- a/lib/tpl/default/main.php +++ b/lib/tpl/default/main.php @@ -92,7 +92,7 @@ if (!defined('DOKU_INC')) die(); -
 
+
-- cgit v1.2.3 From ecd7c1d6b68a5f3eeef348295558dfaa14c471b2 Mon Sep 17 00:00:00 2001 From: Anika Henke Date: Sat, 16 Apr 2011 12:21:26 +0100 Subject: avoid empty optgroup in acl admin --- lib/plugins/acl/admin.php | 64 +++++++++++++++++++++++++---------------------- 1 file changed, 34 insertions(+), 30 deletions(-) diff --git a/lib/plugins/acl/admin.php b/lib/plugins/acl/admin.php index 8ca602533..c8b7b1e6e 100644 --- a/lib/plugins/acl/admin.php +++ b/lib/plugins/acl/admin.php @@ -800,38 +800,42 @@ class admin_plugin_acl extends DokuWiki_Admin_Plugin { echo ''.NL; return $inlist; } -- cgit v1.2.3 From 6cd259d7de1e82b753b5b7ce593637e58b36288b Mon Sep 17 00:00:00 2001 From: Anika Henke Date: Sat, 16 Apr 2011 12:25:08 +0100 Subject: closed hidden input in popularity plugin --- lib/plugins/popularity/admin.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/plugins/popularity/admin.php b/lib/plugins/popularity/admin.php index 40c3f5452..f9f6ceb65 100644 --- a/lib/plugins/popularity/admin.php +++ b/lib/plugins/popularity/admin.php @@ -137,8 +137,8 @@ class admin_plugin_popularity extends DokuWiki_Admin_Plugin { .($this->helper->isAutosubmitEnabled() ? 'checked' : '' ) .'/>' . $this->getLang('autosubmit') .'
' .'' - .'' - .''; + .'' + .''; } $form .= '' .'' -- cgit v1.2.3 From c2e7388603824fb21afecae11b46d07de5d1c54c Mon Sep 17 00:00:00 2001 From: Anika Henke Date: Sat, 16 Apr 2011 12:51:56 +0100 Subject: don't use form_makeTag() for blank.gif as empty attributes are not passed on (which resulted in a missing alt attribute) --- inc/html.php | 18 +++--------------- 1 file changed, 3 insertions(+), 15 deletions(-) diff --git a/inc/html.php b/inc/html.php index be4cb4f9c..0774086f9 100644 --- a/inc/html.php +++ b/inc/html.php @@ -457,11 +457,7 @@ function html_revisions($first=0){ $form->addElement($date); $form->addElement(form_makeCloseTag('span')); - $form->addElement(form_makeTag('img', array( - 'src' => DOKU_BASE.'lib/images/blank.gif', - 'width' => '15', - 'height' => '11', - 'alt' => ''))); + $form->addElement(''); $form->addElement(form_makeOpenTag('a', array( 'class' => 'wikilink1', @@ -499,11 +495,7 @@ function html_revisions($first=0){ 'name' => 'rev2[]', 'value' => $rev))); }else{ - $form->addElement(form_makeTag('img', array( - 'src' => DOKU_BASE.'lib/images/blank.gif', - 'width' => 14, - 'height' => 11, - 'alt' => ''))); + $form->addElement(''); } $form->addElement(form_makeOpenTag('span', array('class' => 'date'))); @@ -524,11 +516,7 @@ function html_revisions($first=0){ $form->addElement($ID); $form->addElement(form_makeCloseTag('a')); }else{ - $form->addElement(form_makeTag('img', array( - 'src' => DOKU_BASE.'lib/images/blank.gif', - 'width' => '15', - 'height' => '11', - 'alt' => ''))); + $form->addElement(''); $form->addElement($ID); } -- cgit v1.2.3 From d8f5fe8a1b2231ff584f43c25217b16950600656 Mon Sep 17 00:00:00 2001 From: lupo49 Date: Sat, 16 Apr 2011 14:37:13 +0200 Subject: eo: updates for esperanto language --- inc/lang/eo/lang.php | 3 +++ lib/plugins/config/lang/eo/lang.php | 1 + lib/plugins/popularity/lang/eo/lang.php | 5 +++++ 3 files changed, 9 insertions(+) diff --git a/inc/lang/eo/lang.php b/inc/lang/eo/lang.php index 305c080f1..4bb1c005d 100644 --- a/inc/lang/eo/lang.php +++ b/inc/lang/eo/lang.php @@ -161,6 +161,9 @@ $lang['yours'] = 'Via Versio'; $lang['diff'] = 'Montri diferencojn el la aktuala versio'; $lang['diff2'] = 'Montri diferencojn inter la elektitaj revizioj'; $lang['difflink'] = 'Ligilo al kompara rigardo'; +$lang['diff_type'] = 'Rigardi malsamojn:'; +$lang['diff_inline'] = 'Samlinie'; +$lang['diff_side'] = 'Apude'; $lang['line'] = 'Linio'; $lang['breadcrumb'] = 'Paŝoj'; $lang['youarehere'] = 'Vi estas ĉi tie'; diff --git a/lib/plugins/config/lang/eo/lang.php b/lib/plugins/config/lang/eo/lang.php index b519aa4e3..a3b74691f 100644 --- a/lib/plugins/config/lang/eo/lang.php +++ b/lib/plugins/config/lang/eo/lang.php @@ -108,6 +108,7 @@ $lang['fetchsize'] = 'Maksimuma grandeco (bitokoj) permesita al "fet $lang['notify'] = 'Sendi avizojn pri ŝanĝoj al tiu ĉi retadreso'; $lang['registernotify'] = 'Sendi informon pri ĵus aliĝintoj al tiu ĉi retadreso'; $lang['mailfrom'] = 'Retadreso uzota por aŭtomataj retmesaĝoj '; +$lang['mailprefix'] = 'Retpoŝta temo-prefikso por uzi en aŭtomataj mesaĝoj'; $lang['gzip_output'] = 'Uzi gzip-a enhav-enkodigo por XHTML'; $lang['gdlib'] = 'Versio de GD Lib'; $lang['im_convert'] = 'Pado al la konvertilo de ImageMagick'; diff --git a/lib/plugins/popularity/lang/eo/lang.php b/lib/plugins/popularity/lang/eo/lang.php index 9326cc741..a7c124f51 100644 --- a/lib/plugins/popularity/lang/eo/lang.php +++ b/lib/plugins/popularity/lang/eo/lang.php @@ -12,3 +12,8 @@ */ $lang['name'] = 'Populareca enketo (eble la ŝargo prokrastos iomete)'; $lang['submit'] = 'Sendi datenaron'; +$lang['autosubmit'] = 'Aŭtomate sendi datumaron monate'; +$lang['submissionFailed'] = 'La datumaro ne povis esti sendata pro la jena eraro:'; +$lang['submitDirectly'] = 'Vi povas sendi vi mem la datumaron per la sekva informilo.'; +$lang['autosubmitError'] = 'La lasta aŭtomata sendo malsukcesis, pro la jena eraro:'; +$lang['lastSent'] = 'La datumaro estas sendita'; -- cgit v1.2.3 From f4ca4fedd6f501293173d2ab4b4a730f75d4c467 Mon Sep 17 00:00:00 2001 From: Guy Brand Date: Sat, 16 Apr 2011 15:14:19 +0200 Subject: Removed hard coded strings from plugin manager --- lib/plugins/plugin/classes/ap_delete.class.php | 2 +- lib/plugins/plugin/classes/ap_download.class.php | 2 +- lib/plugins/plugin/lang/en/lang.php | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/plugins/plugin/classes/ap_delete.class.php b/lib/plugins/plugin/classes/ap_delete.class.php index 231147479..581a6295f 100644 --- a/lib/plugins/plugin/classes/ap_delete.class.php +++ b/lib/plugins/plugin/classes/ap_delete.class.php @@ -6,7 +6,7 @@ class ap_delete extends ap_manage { if (!$this->dir_delete(DOKU_PLUGIN.plugin_directory($this->manager->plugin))) { $this->manager->error = sprintf($this->lang['error_delete'],$this->manager->plugin); } else { - msg("Plugin {$this->manager->plugin} successfully deleted."); + msg(sprintf($this->lang['deleted'],$this->plugin)); $this->refresh(); } } diff --git a/lib/plugins/plugin/classes/ap_download.class.php b/lib/plugins/plugin/classes/ap_download.class.php index 784095aaf..e3afd142a 100644 --- a/lib/plugins/plugin/classes/ap_download.class.php +++ b/lib/plugins/plugin/classes/ap_download.class.php @@ -114,7 +114,7 @@ class ap_download extends ap_manage { if ($tmp) $this->dir_delete($tmp); if (!$this->manager->error) { - msg('Plugin package ('.count($this->downloaded).' plugin'.(count($this->downloaded) != 1?'s':'').': '.join(',',$this->downloaded).') successfully installed.',1); + msg(sprintf($this->lang['packageinstalled'], count($this->downloaded), (count($this->downloaded) != 1?'s':''), join(',',$this->downloaded)),1); $this->refresh(); return true; } diff --git a/lib/plugins/plugin/lang/en/lang.php b/lib/plugins/plugin/lang/en/lang.php index ccbd207e9..437c168bd 100644 --- a/lib/plugins/plugin/lang/en/lang.php +++ b/lib/plugins/plugin/lang/en/lang.php @@ -73,5 +73,6 @@ $lang['enabled'] = 'Plugin %s enabled.'; $lang['notenabled'] = 'Plugin %s could not be enabled, check file permissions.'; $lang['disabled'] = 'Plugin %s disabled.'; $lang['notdisabled'] = 'Plugin %s could not be disabled, check file permissions.'; +$lang['packageinstalled'] = 'Plugin package (%d plugin%s: %s) successfully installed.'; //Setup VIM: ex: et ts=4 : -- cgit v1.2.3 From ff9a8d11b604e75395a9dd4d0d3700653a2adf1f Mon Sep 17 00:00:00 2001 From: Guy Brand Date: Sat, 16 Apr 2011 15:15:25 +0200 Subject: French strings update --- lib/plugins/plugin/lang/fr/lang.php | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/plugins/plugin/lang/fr/lang.php b/lib/plugins/plugin/lang/fr/lang.php index 5daf3b3ad..618e7a75b 100644 --- a/lib/plugins/plugin/lang/fr/lang.php +++ b/lib/plugins/plugin/lang/fr/lang.php @@ -61,3 +61,4 @@ $lang['enabled'] = 'Module %s activé.'; $lang['notenabled'] = 'Le module %s n\'a pas pu être activé, vérifiez le fichier des permissions.'; $lang['disabled'] = 'Module %s désactivé.'; $lang['notdisabled'] = 'Le module %s n\'a pas pu être désactivé, vérifiez le fichier des permissions.'; +$lang['packageinstalled'] = 'Ensemble de modules (%d module%s: %s) installé avec succès.'; -- cgit v1.2.3 From cfcd890b39045ce68b2589654b508b4d8d62a802 Mon Sep 17 00:00:00 2001 From: Anika Henke Date: Sat, 16 Apr 2011 20:16:25 +0100 Subject: removed incorrect nbsps in diff view (FS#2223) --- inc/DifferenceEngine.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inc/DifferenceEngine.php b/inc/DifferenceEngine.php index 2578d07ee..6e1d07382 100644 --- a/inc/DifferenceEngine.php +++ b/inc/DifferenceEngine.php @@ -1021,7 +1021,7 @@ class TableDiffFormatter extends DiffFormatter { $l1 = $lang['line'].' '.$xbeg; $l2 = $lang['line'].' '.$ybeg; $r = '
\n". - ' \n". + '\n". "\n"; return $r; } -- cgit v1.2.3 From 23ae1b94a29fd9c3219a8cb37f3f2e21fbe03bc6 Mon Sep 17 00:00:00 2001 From: Kiril Velikov Date: Sun, 17 Apr 2011 08:55:59 +0200 Subject: Bulgarian language update --- inc/lang/bg/install.html | 9 ++++----- inc/lang/bg/lang.php | 4 ++-- inc/lang/bg/pwconfirm.txt | 2 +- lib/plugins/acl/lang/bg/lang.php | 2 +- lib/plugins/config/lang/bg/lang.php | 8 ++++---- lib/plugins/plugin/lang/bg/admin_plugin.txt | 2 +- lib/plugins/revert/lang/bg/intro.txt | 2 +- lib/plugins/usermanager/lang/bg/lang.php | 4 ++-- lib/plugins/usermanager/lang/bg/list.txt | 2 +- 9 files changed, 17 insertions(+), 18 deletions(-) diff --git a/inc/lang/bg/install.html b/inc/lang/bg/install.html index 6dde7e4ce..9d275d82a 100644 --- a/inc/lang/bg/install.html +++ b/inc/lang/bg/install.html @@ -7,12 +7,11 @@ За да функционира нормално DokuWiki трябва да има право за писане в директориите, които съдържат тези файлове. Инсталаторът не може да настройва правата на директориите. -Обикновено трябва да направите това директно от командният ред или ако -ползвате хостинг - през FTP или контролния панела на хоста (примерно cPanel).

+Вие трябва да направите това директно от командният ред или ако ползвате хостинг през FTP или контролния панела на хоста (примерно cPanel).

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

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

-

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

+

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

diff --git a/inc/lang/bg/lang.php b/inc/lang/bg/lang.php index c7c52b70f..1acf39acb 100644 --- a/inc/lang/bg/lang.php +++ b/inc/lang/bg/lang.php @@ -134,7 +134,7 @@ $lang['uploadexist'] = 'Файлът вече съществува. Н $lang['uploadbadcontent'] = 'Каченото съдържание не съответства на файлово разширение %s .'; $lang['uploadspam'] = 'Качването е блокирано от SPAM списъка.'; $lang['uploadxss'] = 'Качването е блокирано, поради възможно зловредно съдържание.'; -$lang['uploadsize'] = 'Файльт за качване е прекалено голям. (макс. %s)'; +$lang['uploadsize'] = 'Файлът за качване е прекалено голям. (макс. %s)'; $lang['deletesucc'] = 'Файлът "%s" бе изтрит.'; $lang['deletefail'] = '"%s" не може да бъде изтрит - проверете правата.'; $lang['mediainuse'] = 'Файлът "%s" не бе изтрит - все още се ползва.'; @@ -241,7 +241,7 @@ $lang['i_wikiname'] = 'Име на Wiki-то'; $lang['i_enableacl'] = 'Ползване на списък за достъп (ACL) [препоръчително]'; $lang['i_superuser'] = 'Супер потребител'; $lang['i_problems'] = 'Открити са проблеми, които възпрепятстват инсталирането. Ще можете да продължите след като отстраните долуизброените проблеми.'; -$lang['i_modified'] = 'Поради мерки за сигурност скрипта ще работи само с нова и непроменена инсталация на Dokuwiki. Трябва да разархивирате отново файловете от сваления архив или да се посъветвате с Инструкциите за инсталация на Dokuwiki.'; +$lang['i_modified'] = 'Поради мерки за сигурност инсталатора работи само с нова и непроменена инсталация на Dokuwiki. Трябва да разархивирате отново файловете от сваления архив или да се посъветвате с Инструкциите за инсталиране на Dokuwiki.'; $lang['i_funcna'] = 'PHP функцията %s не е достъпна. Може би е забранена от доставчика на хостинг.'; $lang['i_phpver'] = 'Инсталираната версия %s на PHP е по-стара от необходимата %s. Актуализирайте PHP инсталацията.'; $lang['i_permfail'] = '%s не е достъпна за писане от DokuWiki. Трябва да промените правата за достъп до директорията!'; diff --git a/inc/lang/bg/pwconfirm.txt b/inc/lang/bg/pwconfirm.txt index 2c4252e15..802153fd4 100644 --- a/inc/lang/bg/pwconfirm.txt +++ b/inc/lang/bg/pwconfirm.txt @@ -3,7 +3,7 @@ Някой е поискал нова парола за потребител @TITLE@ на @DOKUWIKIURL@ -Ако не сте поискали нова парола, товава просто игнорирайте това писмо. +Ако не сте поискали нова парола, тогава просто игнорирайте това писмо. За да потвърдите, че искането е наистина от вас, моля ползвайте следния линк: diff --git a/lib/plugins/acl/lang/bg/lang.php b/lib/plugins/acl/lang/bg/lang.php index 2b956deba..0746e32c9 100644 --- a/lib/plugins/acl/lang/bg/lang.php +++ b/lib/plugins/acl/lang/bg/lang.php @@ -24,7 +24,7 @@ $lang['p_inherited'] = 'Бележка: Тези разрешения $lang['p_isadmin'] = 'Бележка: Избраната група или потребител има всички права, защото е определен за суперпотребител.'; $lang['p_include'] = 'Висши права включват по-нисшите такива. Правата за създаване, качване и изтриване са приложими само за именни пространства, но не за страници.'; $lang['current'] = 'Текущи ACL права'; -$lang['where'] = 'Страница/Именно постранство'; +$lang['where'] = 'Страница/Именно пространство'; $lang['who'] = 'Потребител/Група'; $lang['perm'] = 'Права'; $lang['acl_perm0'] = 'Никакви'; diff --git a/lib/plugins/config/lang/bg/lang.php b/lib/plugins/config/lang/bg/lang.php index eb2c3a426..5f9088c3e 100644 --- a/lib/plugins/config/lang/bg/lang.php +++ b/lib/plugins/config/lang/bg/lang.php @@ -8,11 +8,11 @@ * @author Kiril */ $lang['menu'] = 'Настройки'; -$lang['error'] = 'Обновяването на настройките е невъзможно, поради невалидна стойност, моля, прегледайте промените си и пробвайте отново. +$lang['error'] = 'Обновяването на настройките не е възможно, поради невалидна стойност, моля, прегледайте промените си и пробвайте отново.
Неверните стойности ще бъдат обградени с червена рамка.'; $lang['updated'] = 'Обновяването на настройките е успешно.'; $lang['nochoice'] = '(няма друг възможен избор)'; -$lang['locked'] = 'Обновяването на файла с настройките е невъзможно, ако това не е нарочно, проверете,
дали името на локалния файл с настройки и правата са верни.'; +$lang['locked'] = 'Обновяването на файла с настройките не е възможно, ако това не е нарочно, проверете,
дали името на локалния файл с настройки и правата са верни.'; $lang['danger'] = 'Внимание: промяна на опцията може да направи wiki-то и менюто за настройване недостъпни.'; $lang['warning'] = 'Предупреждение: промяна на опцията може предизвика нежелани последици.'; $lang['security'] = 'Предупреждение: промяна на опцията може да представлява риск за сигурността.'; @@ -84,8 +84,8 @@ $lang['disableactions_subscription'] = 'Записване/Отписване'; $lang['disableactions_wikicode'] = 'Преглед на кода/Експортиране на оригинална версия'; $lang['disableactions_other'] = 'Други действия (разделени със запетая)'; $lang['sneaky_index'] = 'Стандартно DokuWiki ще показва всички именни пространства в индекса. Опцията скрива тези, за които потребителят няма права за четене. Това може да доведе и до скриване на иначе достъпни подименни пространства. С определени настройки на списъците за контрол на достъпа (ACL) може да направи индекса неизползваем. '; -$lang['auth_security_timeout'] = 'Считане на вписване за неуспешно след (сек)'; -$lang['securecookie'] = 'Да се изпращат ли бисквитките зададени чрез HTTPS, само чрез HTTPS от браузъра? Изключете опцията, когато SSL се ползва само за вписване в системата, а четенето е възможно и без SSL. +$lang['auth_security_timeout'] = 'Автоматично проверяване на удостоверяването всеки (сек)'; +$lang['securecookie'] = 'Да се изпращат ли бисквитките зададени чрез HTTPS, само чрез HTTPS от браузъра? Изключете опцията, когато SSL се ползва само за вписване, а четенето е без SSL. '; $lang['xmlrpc'] = 'Включване/Изключване на интерфейса XML-RPC.'; $lang['xmlrpcuser'] = 'Ограничаване на XML-RPC достъпа до отделени със запетая групи или потребители. Оставете празно, за да даде достъп на всеки.'; diff --git a/lib/plugins/plugin/lang/bg/admin_plugin.txt b/lib/plugins/plugin/lang/bg/admin_plugin.txt index 0227d6fe8..bad73e136 100644 --- a/lib/plugins/plugin/lang/bg/admin_plugin.txt +++ b/lib/plugins/plugin/lang/bg/admin_plugin.txt @@ -1,3 +1,3 @@ ====== Управление на приставките ====== -На тази страница можете на управлявате всичко свързано с [[doku>plugins|приставките]] на Dokuwiki. За да можете да свалите и инсталирате приставка, е необходимо писането в директорията plugin да е позволено на сървъра. +От тази страница можете на управлявате [[doku>plugins|приставките]] на Dokuwiki. За да свалите и инсталирате приставка, е необходимо писането в директорията .../lib/plugins/ да е позволено на сървъра. diff --git a/lib/plugins/revert/lang/bg/intro.txt b/lib/plugins/revert/lang/bg/intro.txt index 791c96857..44d5a0938 100644 --- a/lib/plugins/revert/lang/bg/intro.txt +++ b/lib/plugins/revert/lang/bg/intro.txt @@ -1,4 +1,4 @@ ====== Възстановяване ====== -Страницата помага за автоматично възстановяване след SPAM атака. За да намерите списък със спамнати страници, въведете текст за търсене (напр. линк от SPAM съобщението), след това потвърдете, че намерените страници са наистина SPAM и възстановете старите версии. +Страницата помага за автоматично възстановяване след SPAM атака. За да намерите спамнатите страници, въведете текст за търсене (напр. линк от SPAM съобщението), след това потвърдете, че намерените страници са наистина SPAM и възстановете старите им версии. diff --git a/lib/plugins/usermanager/lang/bg/lang.php b/lib/plugins/usermanager/lang/bg/lang.php index 909c1e8fe..9ed27f42a 100644 --- a/lib/plugins/usermanager/lang/bg/lang.php +++ b/lib/plugins/usermanager/lang/bg/lang.php @@ -45,5 +45,5 @@ $lang['note_group'] = 'Новите потребители биват $lang['note_pass'] = 'Паролата ще бъде генерирана автоматично, ако оставите полето празно и функцията за уведомяване на потребителя е включена.'; $lang['add_ok'] = 'Добавянето на потребителя е успешно'; $lang['add_fail'] = 'Добавянето на потребителя се провали'; -$lang['notify_ok'] = 'Осведомително е-писмо бе изпратено'; -$lang['notify_fail'] = 'Пращането на осведомително е-писмо е невъзможно'; +$lang['notify_ok'] = 'Изпратено е осведомително ел. писмо'; +$lang['notify_fail'] = 'Изпращането на осведомително ел. писмо не е възможно'; diff --git a/lib/plugins/usermanager/lang/bg/list.txt b/lib/plugins/usermanager/lang/bg/list.txt index e90205fe6..106856c0e 100644 --- a/lib/plugins/usermanager/lang/bg/list.txt +++ b/lib/plugins/usermanager/lang/bg/list.txt @@ -1 +1 @@ -===== Списък с потребителите ===== +===== Списък на потребителите ===== -- cgit v1.2.3 From 02097e2a6cbd4191438781890d484326aa60af19 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Sun, 17 Apr 2011 09:09:10 +0200 Subject: attach textChanged property to window attempt to fix FS#2196 --- lib/scripts/edit.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/scripts/edit.js b/lib/scripts/edit.js index 45c1fb111..eaa3030e9 100644 --- a/lib/scripts/edit.js +++ b/lib/scripts/edit.js @@ -261,7 +261,7 @@ function currentHeadlineLevel(textboxId){ /** * global var used for not saved yet warning */ -var textChanged = false; +window.textChanged = false; /** * Delete the draft before leaving the page @@ -305,14 +305,14 @@ addInitEvent(function (){ } var checkfunc = function(){ - textChanged = true; //global var + window.textChanged = true; //global var summaryCheck(); }; addEvent(editform, 'change', checkfunc); addEvent(editform, 'keydown', checkfunc); window.onbeforeunload = function(){ - if(textChanged) { + if(window.textChanged) { return LANG.notsavedyet; } }; @@ -320,17 +320,17 @@ addInitEvent(function (){ // reset change memory var on submit addEvent($('edbtn__save'), 'click', function(){ - textChanged = false; + window.textChanged = false; }); addEvent($('edbtn__preview'), 'click', function(){ - textChanged = false; + window.textChanged = false; window.keepDraft = true; // needed to keep draft on page unload }); var summary = $('edit__summary'); addEvent(summary, 'change', summaryCheck); addEvent(summary, 'keyup', summaryCheck); - if (textChanged) summaryCheck(); + if (window.textChanged) summaryCheck(); }); /** -- cgit v1.2.3 From 9f09385fc680aa6ef95555c50854d5867ea7831c Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Sun, 17 Apr 2011 09:18:10 +0200 Subject: do not strip empty form parameters FS#2222 --- inc/form.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inc/form.php b/inc/form.php index 30e16b626..e74c52c5d 100644 --- a/inc/form.php +++ b/inc/form.php @@ -252,7 +252,7 @@ class Doku_Form { global $lang; $form = ''; $this->params['accept-charset'] = $lang['encoding']; - $form .= '
params,true) . '>
' . DOKU_LF; + $form .= 'params,false) . '>
' . DOKU_LF; if (!empty($this->_hidden)) { foreach ($this->_hidden as $name=>$value) $form .= form_hidden(array('name'=>$name, 'value'=>$value)); -- cgit v1.2.3 From 90f84a7bade2815d67930b18333a327777e22e53 Mon Sep 17 00:00:00 2001 From: Anika Henke Date: Sun, 17 Apr 2011 10:41:35 +0100 Subject: removed empty id in register form (FS#2222) --- inc/html.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inc/html.php b/inc/html.php index 0774086f9..4c206327d 100644 --- a/inc/html.php +++ b/inc/html.php @@ -1097,7 +1097,7 @@ function html_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'))); + $form->addElement(form_makeTextField('login', $_POST['login'], $lang['user'], '', 'block', array('size'=>'50'))); if (!$conf['autopasswd']) { $form->addElement(form_makePasswordField('pass', $lang['pass'], '', 'block', array('size'=>'50'))); $form->addElement(form_makePasswordField('passchk', $lang['passchk'], '', 'block', array('size'=>'50'))); -- cgit v1.2.3 From f24af5915f464b0df29700b68b51a16ac41aeabf Mon Sep 17 00:00:00 2001 From: Anika Henke Date: Sun, 17 Apr 2011 11:14:45 +0100 Subject: tiny fixes for xhtml strict --- inc/html.php | 2 +- lib/plugins/config/admin.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/inc/html.php b/inc/html.php index 4c206327d..6e187ebe1 100644 --- a/inc/html.php +++ b/inc/html.php @@ -1424,7 +1424,7 @@ function html_admin(){ // data security check // @todo: could be checked and only displayed if $conf['savedir'] is under the web root - echo ' Your data directory seems to be protected properly.'; diff --git a/lib/plugins/config/admin.php b/lib/plugins/config/admin.php index d245d3fce..e24f3b87b 100644 --- a/lib/plugins/config/admin.php +++ b/lib/plugins/config/admin.php @@ -113,7 +113,7 @@ class admin_plugin_config extends DokuWiki_Admin_Plugin { // rewrite config is broken. Add $ID as hidden field to remember // current ID in most cases. ptln(''); - ptln(''); + ptln('
'); formSecurityToken(); $this->_print_h1('dokuwiki_settings', $this->getLang('_header_dokuwiki')); -- cgit v1.2.3 From 7d643c17962849f1c9953b0936b37e8d2175a9d6 Mon Sep 17 00:00:00 2001 From: Guy Brand Date: Sun, 17 Apr 2011 16:04:10 +0200 Subject: Trap onbeforeunload when event fired (attempt to fix FS#2196) --- lib/scripts/edit.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/scripts/edit.js b/lib/scripts/edit.js index eaa3030e9..e8a59deb9 100644 --- a/lib/scripts/edit.js +++ b/lib/scripts/edit.js @@ -320,9 +320,11 @@ addInitEvent(function (){ // reset change memory var on submit addEvent($('edbtn__save'), 'click', function(){ + window.onbeforeunload = ''; window.textChanged = false; }); addEvent($('edbtn__preview'), 'click', function(){ + window.onbeforeunload = ''; window.textChanged = false; window.keepDraft = true; // needed to keep draft on page unload }); -- cgit v1.2.3 From f76f425eb307e0ab1a44dc2808da622fd752ae36 Mon Sep 17 00:00:00 2001 From: Yuji TAKENAKA Date: Sun, 17 Apr 2011 16:17:48 +0200 Subject: Japanese update Signed-off-by: Guy Brand --- inc/lang/ja/lang.php | 3 +++ lib/plugins/config/lang/ja/lang.php | 1 + lib/plugins/plugin/lang/ja/lang.php | 1 + lib/plugins/popularity/lang/ja/lang.php | 5 +++++ 4 files changed, 10 insertions(+) diff --git a/inc/lang/ja/lang.php b/inc/lang/ja/lang.php index d503bae31..e8999e05b 100644 --- a/inc/lang/ja/lang.php +++ b/inc/lang/ja/lang.php @@ -158,6 +158,9 @@ $lang['yours'] = 'あなたのバージョン'; $lang['diff'] = '現在のリビジョンとの差分を表示'; $lang['diff2'] = '選択したリビジョン間の差分を表示'; $lang['difflink'] = 'この比較画面にリンクする'; +$lang['diff_type'] = '差分の表示方法:'; +$lang['diff_inline'] = 'インライン'; +$lang['diff_side'] = '横に並べる'; $lang['line'] = 'ライン'; $lang['breadcrumb'] = 'トレース'; $lang['youarehere'] = '現在位置'; diff --git a/lib/plugins/config/lang/ja/lang.php b/lib/plugins/config/lang/ja/lang.php index 9ec416196..35f288b03 100644 --- a/lib/plugins/config/lang/ja/lang.php +++ b/lib/plugins/config/lang/ja/lang.php @@ -106,6 +106,7 @@ $lang['fetchsize'] = '外部からのダウンロード最大サイ $lang['notify'] = '変更を通知するメールアドレス'; $lang['registernotify'] = '新規ユーザー登録を通知するメールアドレス'; $lang['mailfrom'] = 'メール送信時の送信元アドレス'; +$lang['mailprefix'] = '自動メールの題名に使用する接頭語'; $lang['gzip_output'] = 'xhtmlに対するコンテンツ圧縮(gzip)を使用'; $lang['gdlib'] = 'GDlibバージョン'; $lang['im_convert'] = 'ImageMagick変換ツールへのパス'; diff --git a/lib/plugins/plugin/lang/ja/lang.php b/lib/plugins/plugin/lang/ja/lang.php index 0deb420c9..56a827b7e 100644 --- a/lib/plugins/plugin/lang/ja/lang.php +++ b/lib/plugins/plugin/lang/ja/lang.php @@ -53,3 +53,4 @@ $lang['enabled'] = 'プラグイン %s が有効です。'; $lang['notenabled'] = 'プラグイン %s を有効にすることができません。権限を確認してください。'; $lang['disabled'] = 'プラグイン %s が無効です。'; $lang['notdisabled'] = 'プラグイン %s を無効にすることができません。権限を確認してください。'; +$lang['packageinstalled'] = 'プラグインパッケージ(%d plugin%s: %s)は正しくインストールされました。'; diff --git a/lib/plugins/popularity/lang/ja/lang.php b/lib/plugins/popularity/lang/ja/lang.php index 1e0dbdc3f..736924bb1 100644 --- a/lib/plugins/popularity/lang/ja/lang.php +++ b/lib/plugins/popularity/lang/ja/lang.php @@ -9,3 +9,8 @@ */ $lang['name'] = '利用状況調査(ロードに少し時間が掛かります)'; $lang['submit'] = 'データ送信'; +$lang['autosubmit'] = '月に一度は自動的にデータを送付'; +$lang['submissionFailed'] = '次のエラーによりデータが送信できませんでした:'; +$lang['submitDirectly'] = '次のフォームを使ってデータを手動で送信することができます。'; +$lang['autosubmitError'] = '以下のエラーにより最後の自動送信に失敗しました:'; +$lang['lastSent'] = 'データを送信しました。'; -- cgit v1.2.3 From ee379b013d58938f9f5b9372979b40a4d6f58ccf Mon Sep 17 00:00:00 2001 From: Yuji TAKENAKA Date: Sun, 17 Apr 2011 16:38:50 +0200 Subject: Japanese update (missing file) Signed-off-by: Guy Brand --- lib/plugins/popularity/lang/ja/submitted.txt | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 lib/plugins/popularity/lang/ja/submitted.txt diff --git a/lib/plugins/popularity/lang/ja/submitted.txt b/lib/plugins/popularity/lang/ja/submitted.txt new file mode 100644 index 000000000..604f8e55f --- /dev/null +++ b/lib/plugins/popularity/lang/ja/submitted.txt @@ -0,0 +1,3 @@ +====== 利用状況調査 ====== + +データの送信に成功しました。 \ No newline at end of file -- cgit v1.2.3 From 7349aca1eff0f1fce77cdcd87b62e6729867ad82 Mon Sep 17 00:00:00 2001 From: Guy Brand Date: Sun, 17 Apr 2011 16:39:28 +0200 Subject: Don't ignore bundled plugin paths --- .gitignore | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/.gitignore b/.gitignore index 4fb846732..b96a0554b 100644 --- a/.gitignore +++ b/.gitignore @@ -23,3 +23,15 @@ /data/tmp/* /lib/tpl/* /lib/plugins/* +!/lib/plugins/acl +!/lib/plugins/config +!/lib/plugins/info +!/lib/plugins/plugin +!/lib/plugins/popularity +!/lib/plugins/revert +!/lib/plugins/safefnrecode +!/lib/plugins/usermanager +!/lib/plugins/action.php +!/lib/plugins/admin.php +!/lib/plugins/index.html +!/lib/plugins/syntax.php -- cgit v1.2.3 From 53b4f65b95e301c1dbd4894b6b26d85bba94d289 Mon Sep 17 00:00:00 2001 From: Shuo-Ting Jian Date: Sun, 17 Apr 2011 20:29:39 +0200 Subject: Traditional Chinese update --- lib/plugins/plugin/lang/zh-tw/lang.php | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/plugins/plugin/lang/zh-tw/lang.php b/lib/plugins/plugin/lang/zh-tw/lang.php index 77e692fcf..54234212d 100644 --- a/lib/plugins/plugin/lang/zh-tw/lang.php +++ b/lib/plugins/plugin/lang/zh-tw/lang.php @@ -54,3 +54,4 @@ $lang['enabled'] = '插件 %s 已啟用。'; $lang['notenabled'] = '插件 %s 無法啟用,請檢查檔案權限。'; $lang['disabled'] = '插件 %s 已停用。'; $lang['notdisabled'] = '插件 %s 無法停用,請檢查檔案權限。'; +$lang['packageinstalled'] = '插件 (%d 插件%s: %s) 已成功地安裝。'; -- cgit v1.2.3 From 342e58c8c048bfd5f57f10bd88cee95aa2732e96 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Sun, 17 Apr 2011 22:39:21 +0200 Subject: correctly disable unfinished media options popup We disabled the media options shortly before the last release because of an unfixed bug. The disabling was not complete which caused problems with templates not incorporating the needed CSS. Since the option dialog hasn't been fixed yet, this patch also disables the creation of the corresponding HTML to avoid the mentioned template problems. --- lib/scripts/media.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/scripts/media.js b/lib/scripts/media.js index 57f599163..530e93055 100644 --- a/lib/scripts/media.js +++ b/lib/scripts/media.js @@ -774,6 +774,6 @@ addInitEvent(function(){ media_manager.selectorattach($('media__content')); media_manager.confirmattach($('media__content')); media_manager.attachoptions($('media__opts')); - media_manager.initpopup(); + //media_manager.initpopup(); media_manager.initFlashUpload(); }); -- cgit v1.2.3
'.$l1.":'.$l2.":'.$l2.":