summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--_test/tests/inc/PageUtilsIsHiddenPage.test.php95
-rw-r--r--_test/tests/inc/parserutils_set_metadata_during_rendering.test.php3
-rw-r--r--inc/HTTPClient.php54
-rw-r--r--inc/SafeFN.class.php12
-rw-r--r--inc/events.php2
-rw-r--r--inc/fulltext.php15
-rw-r--r--inc/infoutils.php11
-rw-r--r--inc/lang/cs/lang.php2
-rw-r--r--inc/pageutils.php20
-rw-r--r--inc/parser/metadata.php41
-rw-r--r--inc/parser/renderer.php2
-rw-r--r--inc/parserutils.php2
-rw-r--r--inc/plugin.php2
-rw-r--r--inc/utf8.php19
-rw-r--r--lib/images/smileys/index.php48
-rw-r--r--lib/plugins/acl/lang/cs/lang.php1
-rw-r--r--lib/plugins/action.php2
-rw-r--r--lib/plugins/config/lang/cs/lang.php14
-rw-r--r--lib/plugins/plugin/lang/cs/lang.php1
-rw-r--r--lib/plugins/popularity/action.php2
-rw-r--r--lib/plugins/popularity/lang/cs/lang.php1
-rw-r--r--lib/plugins/revert/lang/cs/lang.php1
-rw-r--r--lib/plugins/safefnrecode/action.php2
-rw-r--r--lib/plugins/testing/action.php3
-rw-r--r--lib/plugins/usermanager/lang/cs/lang.php1
-rw-r--r--lib/scripts/compatibility.js8
-rw-r--r--lib/scripts/qsearch.js25
27 files changed, 283 insertions, 106 deletions
diff --git a/_test/tests/inc/PageUtilsIsHiddenPage.test.php b/_test/tests/inc/PageUtilsIsHiddenPage.test.php
new file mode 100644
index 000000000..a7077862e
--- /dev/null
+++ b/_test/tests/inc/PageUtilsIsHiddenPage.test.php
@@ -0,0 +1,95 @@
+<?php
+
+class PageUtilsIsHiddenPageTest extends DokuWikiTest {
+
+ function prepare($hidePages = '^:test$', $act = 'show') {
+ global $conf;
+ global $ACT;
+ $conf['hidepages'] = $hidePages;
+ $ACT = $act;
+ }
+
+ function testHiddenOff(){
+ $this->prepare('');
+
+ $this->assertFalse(isHiddenPage('test'));
+ }
+
+ function testHiddenOffAdmin(){
+ $this->prepare('^:test$', 'admin');
+
+ $this->assertFalse(isHiddenPage('test'));
+ }
+
+ function testHiddenOnMatch(){
+ $this->prepare();
+
+ $this->assertTrue(isHiddenPage('test'));
+ }
+
+ function testHiddenOnNoMatch(){
+ $this->prepare();
+
+ $this->assertFalse(isHiddenPage('another'));
+ }
+
+ function testEventHandlerBefore() {
+ global $EVENT_HANDLER;
+ $this->prepare();
+ $EVENT_HANDLER->register_hook('PAGEUTILS_ID_HIDEPAGE', 'BEFORE', $this, 'alwaysHide');
+
+ $this->assertTrue(isHiddenPage('another'));
+ }
+
+ function alwaysHide(Doku_Event &$event, $params) {
+ $event->data['hidden'] = true;
+ }
+
+ function testEventHandlerBeforeAndPrevent() {
+ global $EVENT_HANDLER;
+ $this->prepare();
+ $EVENT_HANDLER->register_hook('PAGEUTILS_ID_HIDEPAGE', 'BEFORE', $this, 'showBefore');
+
+ $this->assertFalse(isHiddenPage('test'));
+ }
+
+ function showBefore(Doku_Event &$event, $params) {
+ $event->data['hidden'] = false;
+ $event->preventDefault();
+ $event->stopPropagation();
+ }
+
+ function testEventHandlerAfter() {
+ global $EVENT_HANDLER;
+ $this->prepare();
+ $EVENT_HANDLER->register_hook('PAGEUTILS_ID_HIDEPAGE', 'AFTER', $this, 'alwaysHide');
+
+ $this->assertTrue(isHiddenPage('another'));
+ }
+
+ function testEventHandlerAfterHide() {
+ global $EVENT_HANDLER;
+ $this->prepare();
+ $EVENT_HANDLER->register_hook('PAGEUTILS_ID_HIDEPAGE', 'AFTER', $this, 'hideBeforeWithoutPrevent');
+
+ $this->assertTrue(isHiddenPage('another'));
+ }
+
+ function hideBeforeWithoutPrevent(Doku_Event &$event, $params) {
+ $event->data['hidden'] = true;
+ }
+
+ function testEventHandlerAfterShow() {
+ global $EVENT_HANDLER;
+ $this->prepare();
+ $EVENT_HANDLER->register_hook('PAGEUTILS_ID_HIDEPAGE', 'AFTER', $this, 'showAfter');
+
+ $this->assertFalse(isHiddenPage('test'));
+ }
+
+ function showAfter(Doku_Event &$event, $params) {
+ $event->data['hidden'] = false;
+ }
+
+}
+//Setup VIM: ex: et ts=4 :
diff --git a/_test/tests/inc/parserutils_set_metadata_during_rendering.test.php b/_test/tests/inc/parserutils_set_metadata_during_rendering.test.php
index 0683848f1..f08785ca2 100644
--- a/_test/tests/inc/parserutils_set_metadata_during_rendering.test.php
+++ b/_test/tests/inc/parserutils_set_metadata_during_rendering.test.php
@@ -50,7 +50,8 @@ class parserutils_set_metadata_during_rendering_test extends DokuWikiTest {
function helper_set_metadata($event, $meta) {
if ($this->active) {
p_set_metadata($this->id, $meta, false, true);
- $key = array_pop(array_keys($meta));
+ $keys = array_keys($meta);
+ $key = array_pop($keys);
$this->assertTrue(is_string($meta[$key])); // ensure we really have a key
// ensure that the metadata property hasn't been set previously
$this->assertNotEquals($meta[$key], p_get_metadata($this->id, $key));
diff --git a/inc/HTTPClient.php b/inc/HTTPClient.php
index a25846c31..c4cfcbf7c 100644
--- a/inc/HTTPClient.php
+++ b/inc/HTTPClient.php
@@ -509,15 +509,17 @@ class HTTPClient {
if(feof($socket))
throw new HTTPClientException("Socket disconnected while writing $message");
- // wait for stream ready or timeout
- self::selecttimeout($this->timeout - $time_used, $sec, $usec);
- if(@stream_select($sel_r, $sel_w, $sel_e, $sec, $usec) !== false){
- // write to stream
- $nbytes = fwrite($socket, substr($data,$written,4096));
- if($nbytes === false)
- throw new HTTPClientException("Failed writing to socket while sending $message", -100);
- $written += $nbytes;
+ // wait for stream ready or timeout (1sec)
+ if(@stream_select($sel_r,$sel_w,$sel_e,1) === false){
+ usleep(1000);
+ continue;
}
+
+ // write to stream
+ $nbytes = fwrite($socket, substr($data,$written,4096));
+ if($nbytes === false)
+ throw new HTTPClientException("Failed writing to socket while sending $message", -100);
+ $written += $nbytes;
}
}
@@ -556,15 +558,17 @@ class HTTPClient {
}
if ($to_read > 0) {
- // wait for stream ready or timeout
- self::selecttimeout($this->timeout - $time_used, $sec, $usec);
- if(@stream_select($sel_r, $sel_w, $sel_e, $sec, $usec) !== false){
- $bytes = fread($socket, $to_read);
- if($bytes === false)
- throw new HTTPClientException("Failed reading from socket while reading $message", -100);
- $r_data .= $bytes;
- $to_read -= strlen($bytes);
+ // wait for stream ready or timeout (1sec)
+ if(@stream_select($sel_r,$sel_w,$sel_e,1) === false){
+ usleep(1000);
+ continue;
}
+
+ $bytes = fread($socket, $to_read);
+ if($bytes === false)
+ throw new HTTPClientException("Failed reading from socket while reading $message", -100);
+ $r_data .= $bytes;
+ $to_read -= strlen($bytes);
}
} while ($to_read > 0 && strlen($r_data) < $nbytes);
return $r_data;
@@ -595,11 +599,13 @@ class HTTPClient {
if(feof($socket))
throw new HTTPClientException("Premature End of File (socket) while reading $message");
- // wait for stream ready or timeout
- self::selecttimeout($this->timeout - $time_used, $sec, $usec);
- if(@stream_select($sel_r, $sel_w, $sel_e, $sec, $usec) !== false){
- $r_data = fgets($socket, 1024);
+ // wait for stream ready or timeout (1sec)
+ if(@stream_select($sel_r,$sel_w,$sel_e,1) === false){
+ usleep(1000);
+ continue;
}
+
+ $r_data = fgets($socket, 1024);
} while (!preg_match('/\n$/',$r_data));
return $r_data;
}
@@ -630,14 +636,6 @@ class HTTPClient {
}
/**
- * Calculate seconds and microseconds
- */
- static function selecttimeout($time, &$sec, &$usec){
- $sec = floor($time);
- $usec = (int)(($time - $sec) * 1000000);
- }
-
- /**
* convert given header string to Header array
*
* All Keys are lowercased.
diff --git a/inc/SafeFN.class.php b/inc/SafeFN.class.php
index ab05b9eae..b9e4a2b2a 100644
--- a/inc/SafeFN.class.php
+++ b/inc/SafeFN.class.php
@@ -44,7 +44,7 @@ class SafeFN {
*
* @author Christopher Smith <chris@jalakai.co.uk>
*/
- public function encode($filename) {
+ public static function encode($filename) {
return self::unicode_to_safe(utf8_to_unicode($filename));
}
@@ -73,15 +73,15 @@ class SafeFN {
*
* @author Christopher Smith <chris@jalakai.co.uk>
*/
- public function decode($filename) {
+ public static function decode($filename) {
return unicode_to_utf8(self::safe_to_unicode(strtolower($filename)));
}
- public function validate_printable_utf8($printable_utf8) {
+ public static function validate_printable_utf8($printable_utf8) {
return !preg_match('#[\x01-\x1f]#',$printable_utf8);
}
- public function validate_safe($safe) {
+ public static function validate_safe($safe) {
return !preg_match('#[^'.self::$plain.self::$post_indicator.self::$pre_indicator.']#',$safe);
}
@@ -93,7 +93,7 @@ class SafeFN {
*
* @author Christopher Smith <chris@jalakai.co.uk>
*/
- private function unicode_to_safe($unicode) {
+ private static function unicode_to_safe($unicode) {
$safe = '';
$converted = false;
@@ -126,7 +126,7 @@ class SafeFN {
*
* @author Christopher Smith <chris@jalakai.co.uk>
*/
- private function safe_to_unicode($safe) {
+ private static function safe_to_unicode($safe) {
$unicode = array();
$split = preg_split('#(?=['.self::$post_indicator.self::$pre_indicator.'])#',$safe,-1,PREG_SPLIT_NO_EMPTY);
diff --git a/inc/events.php b/inc/events.php
index 4e81f85c8..f7b1a7a16 100644
--- a/inc/events.php
+++ b/inc/events.php
@@ -132,7 +132,7 @@ class Doku_Event_Handler {
$pluginlist = plugin_list('action');
foreach ($pluginlist as $plugin_name) {
- $plugin =& plugin_load('action',$plugin_name);
+ $plugin = plugin_load('action',$plugin_name);
if ($plugin !== null) $plugin->register($this);
}
diff --git a/inc/fulltext.php b/inc/fulltext.php
index eab8850dc..7ee386063 100644
--- a/inc/fulltext.php
+++ b/inc/fulltext.php
@@ -394,10 +394,17 @@ function ft_snippet_re_preprocess($term) {
return $term;
}
- // unicode word boundaries
- // see http://stackoverflow.com/a/2449017/172068
- $BL = '(?<!\pL)';
- $BR = '(?!\pL)';
+ if (UTF8_PROPERTYSUPPORT) {
+ // unicode word boundaries
+ // see http://stackoverflow.com/a/2449017/172068
+ $BL = '(?<!\pL)';
+ $BR = '(?!\pL)';
+ } else {
+ // not as correct as above, but at least won't break
+ $BL = '\b';
+ $BR = '\b';
+ }
+
if(substr($term,0,2) == '\\*'){
$term = substr($term,2);
diff --git a/inc/infoutils.php b/inc/infoutils.php
index 7ceeae8f1..a9c33acfd 100644
--- a/inc/infoutils.php
+++ b/inc/infoutils.php
@@ -25,12 +25,12 @@ function checkUpdateMessages(){
// check if new messages needs to be fetched
if($lm < time()-(60*60*24) || $lm < @filemtime(DOKU_INC.DOKU_SCRIPT)){
+ @touch($cf);
dbglog("checkUpdatesMessages(): downloading messages.txt");
$http = new DokuHTTPClient();
- $http->timeout = 8;
+ $http->timeout = 12;
$data = $http->get(DOKU_MESSAGEURL.$updateVersion);
io_saveFile($cf,$data);
- @touch($cf);
}else{
dbglog("checkUpdatesMessages(): messages.txt up to date");
$data = io_readFile($cf);
@@ -176,6 +176,13 @@ function check(){
msg('mb_string extension not available - PHP only replacements will be used',0);
}
+ if (!UTF8_PREGSUPPORT) {
+ msg('PHP is missing UTF-8 support in Perl-Compatible Regular Expressions (PCRE)', -1);
+ }
+ if (!UTF8_PROPERTYSUPPORT) {
+ msg('PHP is missing Unicode properties support in Perl-Compatible Regular Expressions (PCRE)', -1);
+ }
+
$loc = setlocale(LC_ALL, 0);
if(!$loc){
msg('No valid locale is set for your PHP setup. You should fix this',-1);
diff --git a/inc/lang/cs/lang.php b/inc/lang/cs/lang.php
index a53da327a..cfb8e8eb3 100644
--- a/inc/lang/cs/lang.php
+++ b/inc/lang/cs/lang.php
@@ -12,6 +12,7 @@
* @author Vojta Beran <xmamut@email.cz>
* @author zbynek.krivka@seznam.cz
* @author Bohumir Zamecnik <bohumir.zamecnik@gmail.com>
+ * @author Jakub A. Těšínský (j@kub.cz)
*/
$lang['encoding'] = 'utf-8';
$lang['direction'] = 'ltr';
@@ -197,6 +198,7 @@ $lang['user_tools'] = 'Uživatelské nástroje';
$lang['site_tools'] = 'Nástroje pro tento web';
$lang['page_tools'] = 'Nástroje pro stránku';
$lang['skip_to_content'] = 'jít k obsahu';
+$lang['sidebar'] = 'Postranní lišta';
$lang['mail_newpage'] = 'nová stránka:';
$lang['mail_changed'] = 'změna stránky:';
$lang['mail_subscribe_list'] = 'stránky změněné ve jmenném prostoru:';
diff --git a/inc/pageutils.php b/inc/pageutils.php
index 55cc081a1..3bb10883f 100644
--- a/inc/pageutils.php
+++ b/inc/pageutils.php
@@ -536,15 +536,25 @@ function getCacheName($data,$ext=''){
* @author Andreas Gohr <gohr@cosmocode.de>
*/
function isHiddenPage($id){
+ $data = array(
+ 'id' => $id,
+ 'hidden' => false
+ );
+ trigger_event('PAGEUTILS_ID_HIDEPAGE', $data, '_isHiddenPage');
+ return $data['hidden'];
+}
+
+function _isHiddenPage(&$data) {
global $conf;
global $ACT;
- if(empty($conf['hidepages'])) return false;
- if($ACT == 'admin') return false;
- if(preg_match('/'.$conf['hidepages'].'/ui',':'.$id)){
- return true;
+ if ($data['hidden']) return;
+ if(empty($conf['hidepages'])) return;
+ if($ACT == 'admin') return;
+
+ if(preg_match('/'.$conf['hidepages'].'/ui',':'.$data['id'])){
+ $data['hidden'] = true;
}
- return false;
}
/**
diff --git a/inc/parser/metadata.php b/inc/parser/metadata.php
index 8bfdc3b9c..8638ffa6a 100644
--- a/inc/parser/metadata.php
+++ b/inc/parser/metadata.php
@@ -133,27 +133,6 @@ class Doku_Renderer_metadata extends Doku_Renderer {
}
}
- function strong_open(){}
- function strong_close(){}
-
- function emphasis_open(){}
- function emphasis_close(){}
-
- function underline_open(){}
- function underline_close(){}
-
- function monospace_open(){}
- function monospace_close(){}
-
- function subscript_open(){}
- function subscript_close(){}
-
- function superscript_open(){}
- function superscript_close(){}
-
- function deleted_open(){}
- function deleted_close(){}
-
/**
* Callback for footnote start syntax
*
@@ -218,14 +197,6 @@ class Doku_Renderer_metadata extends Doku_Renderer {
if ($this->capture) $this->doc .= $text;
}
- function php($text){}
-
- function phpblock($text){}
-
- function html($text){}
-
- function htmlblock($text){}
-
function preformatted($text){
if ($this->capture) $this->doc .= $text;
}
@@ -393,18 +364,6 @@ class Doku_Renderer_metadata extends Doku_Renderer {
$params['refresh'];
}
- function table_open($maxcols = NULL, $numrows = NULL){}
- function table_close(){}
-
- function tablerow_open(){}
- function tablerow_close(){}
-
- function tableheader_open($colspan = 1, $align = NULL, $rowspan = 1){}
- function tableheader_close(){}
-
- function tablecell_open($colspan = 1, $align = NULL, $rowspan = 1){}
- function tablecell_close(){}
-
//----------------------------------------------------------
// Utils
diff --git a/inc/parser/renderer.php b/inc/parser/renderer.php
index 0923e6896..2c78f220a 100644
--- a/inc/parser/renderer.php
+++ b/inc/parser/renderer.php
@@ -62,7 +62,7 @@ class Doku_Renderer extends DokuWiki_Plugin {
//handle plugin rendering
function plugin($name,$data){
- $plugin =& plugin_load('syntax',$name);
+ $plugin = plugin_load('syntax',$name);
if($plugin != null){
$plugin->render($this->getFormat(),$this,$data);
}
diff --git a/inc/parserutils.php b/inc/parserutils.php
index 3dbfc726f..1733fcf09 100644
--- a/inc/parserutils.php
+++ b/inc/parserutils.php
@@ -579,7 +579,7 @@ function p_get_parsermodes(){
$obj = null;
foreach($pluginlist as $p){
/** @var DokuWiki_Syntax_Plugin $obj */
- if(!$obj =& plugin_load('syntax',$p)) continue; //attempt to load plugin into $obj
+ if(!$obj = plugin_load('syntax',$p)) continue; //attempt to load plugin into $obj
$PARSER_MODES[$obj->getType()][] = "plugin_$p"; //register mode type
//add to modes
$modes[] = array(
diff --git a/inc/plugin.php b/inc/plugin.php
index d2fe3818d..b0518346d 100644
--- a/inc/plugin.php
+++ b/inc/plugin.php
@@ -191,7 +191,7 @@ class DokuWiki_Plugin {
*/
function loadHelper($name, $msg){
if (!plugin_isdisabled($name)){
- $obj =& plugin_load('helper',$name);
+ $obj = plugin_load('helper',$name);
}else{
$obj = null;
}
diff --git a/inc/utf8.php b/inc/utf8.php
index 6fab8502c..c944667f7 100644
--- a/inc/utf8.php
+++ b/inc/utf8.php
@@ -17,6 +17,25 @@ if(!defined('UTF8_MBSTRING')){
}
}
+/**
+ * Check if PREG was compiled with UTF-8 support
+ *
+ * Without this many of the functions below will not work, so this is a minimal requirement
+ */
+if(!defined('UTF8_PREGSUPPORT')){
+ define('UTF8_PREGSUPPORT', (bool) @preg_match('/^.$/u', 'ñ'));
+}
+
+/**
+ * Check if PREG was compiled with Unicode Property support
+ *
+ * This is not required for the functions below, but might be needed in a UTF-8 aware application
+ */
+if(!defined('UTF8_PROPERTYSUPPORT')){
+ define('UTF8_PROPERTYSUPPORT', (bool) @preg_match('/^\pL$/u', 'ñ'));
+}
+
+
if(UTF8_MBSTRING){ mb_internal_encoding('UTF-8'); }
if(!function_exists('utf8_isASCII')){
diff --git a/lib/images/smileys/index.php b/lib/images/smileys/index.php
new file mode 100644
index 000000000..9a2905b33
--- /dev/null
+++ b/lib/images/smileys/index.php
@@ -0,0 +1,48 @@
+<!DOCTYPE html>
+<html lang="en" dir="ltr">
+<head>
+ <title>simleys</title>
+
+ <style type="text/css">
+ body {
+ background-color: #ccc;
+ font-family: Arial;
+ }
+
+ .box {
+ width: 200px;
+ float:left;
+ padding: 0.5em;
+ margin: 0;
+ }
+
+ .white {
+ background-color: #fff;
+ }
+
+ .black {
+ background-color: #000;
+ }
+ </style>
+
+</head>
+<body>
+
+<div class="white box">
+<?php
+foreach (glob('*.gif') as $img) {
+ echo '<img src="'.$img.'" alt="'.$img.'" title="'.$img.'" /> ';
+}
+?>
+</div>
+
+<div class="black box">
+<?php
+foreach (glob('*.gif') as $img) {
+ echo '<img src="'.$img.'" alt="'.$img.'" title="'.$img.'" /> ';
+}
+?>
+</div>
+
+</body>
+</html>
diff --git a/lib/plugins/acl/lang/cs/lang.php b/lib/plugins/acl/lang/cs/lang.php
index a1dce0369..feb160a02 100644
--- a/lib/plugins/acl/lang/cs/lang.php
+++ b/lib/plugins/acl/lang/cs/lang.php
@@ -11,6 +11,7 @@
* @author Vojta Beran <xmamut@email.cz>
* @author zbynek.krivka@seznam.cz
* @author Bohumir Zamecnik <bohumir.zamecnik@gmail.com>
+ * @author Jakub A. Těšínský (j@kub.cz)
*/
$lang['admin_acl'] = 'Správa přístupových práv';
$lang['acl_group'] = 'Skupina';
diff --git a/lib/plugins/action.php b/lib/plugins/action.php
index 885bd7c96..a2ad969d7 100644
--- a/lib/plugins/action.php
+++ b/lib/plugins/action.php
@@ -17,7 +17,7 @@ class DokuWiki_Action_Plugin extends DokuWiki_Plugin {
/**
* Registers a callback function for a given event
*/
- function register($controller) {
+ function register(Doku_Event_Handler $controller) {
trigger_error('register() not implemented in '.get_class($this), E_USER_WARNING);
}
}
diff --git a/lib/plugins/config/lang/cs/lang.php b/lib/plugins/config/lang/cs/lang.php
index d2ec5035a..383afebb4 100644
--- a/lib/plugins/config/lang/cs/lang.php
+++ b/lib/plugins/config/lang/cs/lang.php
@@ -11,6 +11,7 @@
* @author Vojta Beran <xmamut@email.cz>
* @author zbynek.krivka@seznam.cz
* @author Bohumir Zamecnik <bohumir.zamecnik@gmail.com>
+ * @author Jakub A. Těšínský (j@kub.cz)
*/
$lang['menu'] = 'Správa nastavení';
$lang['error'] = 'Nastavení nebyla změněna kvůli alespoň jedné neplatné položce,
@@ -36,6 +37,8 @@ $lang['_anti_spam'] = 'Protispamová nastavení';
$lang['_editing'] = 'Nastavení editace';
$lang['_links'] = 'Nastavení odkazů';
$lang['_media'] = 'Nastavení médií';
+$lang['_notifications'] = 'Nastavení upozornění';
+$lang['_syndication'] = 'Nastavení syndikace';
$lang['_advanced'] = 'Pokročilá nastavení';
$lang['_network'] = 'Nastavení sítě';
$lang['_plugin_sufix'] = 'Nastavení pluginů ';
@@ -47,6 +50,8 @@ $lang['title'] = 'Název celé wiki';
$lang['start'] = 'Název úvodní stránky';
$lang['lang'] = 'Jazyk';
$lang['template'] = 'Šablona';
+$lang['tagline'] = 'Slogan (pokud ho šablona podporuje)';
+$lang['sidebar'] = 'Jméno stránky s obsahem postranní lišty (pokud ho šablona podporuje). Prázdné pole postranní lištu deaktivuje.';
$lang['license'] = 'Pod jakou licencí má být tento obsah publikován?';
$lang['savedir'] = 'Adresář pro ukládání dat';
$lang['basedir'] = 'Kořenový adresář (např. <code>/dokuwiki/</code>). Pro autodetekci nechte prázdné.';
@@ -55,8 +60,8 @@ $lang['cookiedir'] = 'Cesta pro cookie. Není-li vyplněno, použije
$lang['dmode'] = 'Přístupová práva pro vytváření adresářů';
$lang['fmode'] = 'Přístupová práva pro vytváření souborů';
$lang['allowdebug'] = 'Povolit debugování. <b>Vypněte, pokud to nepotřebujete!</b>';
-$lang['recent'] = 'Nedávné změny';
-$lang['recent_days'] = 'Jak staré nedávných změny uchovávat (ve dnech)';
+$lang['recent'] = 'Počet položek v nedávných změnách';
+$lang['recent_days'] = 'Jak staré nedávné změny zobrazovat (ve dnech)';
$lang['breadcrumbs'] = 'Počet odkazů na navštívené stránky';
$lang['youarehere'] = 'Hierarchická "drobečková" navigace';
$lang['fullpath'] = 'Ukazovat plnou cestu ke stránkám v patičce';
@@ -94,6 +99,8 @@ $lang['disableactions_wikicode'] = 'Prohlížet zdrojové kódy/Export wiki text
$lang['disableactions_other'] = 'Další akce (oddělené čárkou)';
$lang['auth_security_timeout'] = 'Časový limit pro autentikaci (v sekundách)';
$lang['securecookie'] = 'Má prohlížeč posílat cookies nastavené přes HTTPS opět jen přes HTTPS? Vypněte tuto volbu, pokud chcete, aby bylo pomocí SSL zabezpečeno pouze přihlašování do wiki, ale obsah budete prohlížet nezabezpečeně.';
+$lang['remote'] = 'Zapne API systému, umožňující jiným aplikacím vzdálený přístup k wiki pomoci XML-RPC nebo jiných mechanizmů.';
+$lang['remoteuser'] = 'Omezit přístup k API na tyto uživatelské skupiny či uživatele (seznam oddělený čárkami). Prázdné pole povolí přístup všem.';
$lang['usewordblock'] = 'Blokovat spam za použití seznamu známých spamových slov';
$lang['relnofollow'] = 'Používat rel="nofollow" na externí odkazy';
$lang['indexdelay'] = 'Časová prodleva před indexací (v sekundách)';
@@ -109,6 +116,7 @@ $lang['target____interwiki'] = 'Cílové okno pro interwiki odkazy';
$lang['target____extern'] = 'Cílové okno pro externí odkazy';
$lang['target____media'] = 'Cílové okno pro odkazy na média';
$lang['target____windows'] = 'Cílové okno pro odkazy na windows sdílení';
+$lang['mediarevisions'] = 'Aktivovat revize souborů';
$lang['refcheck'] = 'Kontrolovat odkazy na média (před vymazáním)';
$lang['refshow'] = 'Počet zobrazených odkazů na média';
$lang['gdlib'] = 'Verze GD knihovny';
@@ -121,12 +129,14 @@ $lang['notify'] = 'Posílat oznámení o změnách na následují
$lang['registernotify'] = 'Posílat informace o nově registrovaných uživatelích na tuto mailovou adresu';
$lang['mailfrom'] = 'E-mailová adresa, která se bude používat pro automatické maily';
$lang['mailprefix'] = 'Předpona předmětu e-mailu, která se bude používat pro automatické maily';
+$lang['htmlmail'] = 'Posílat emaily v HTML (hezčí ale větší). Při vypnutí budou posílány jen textové emaily.';
$lang['sitemap'] = 'Generovat Google sitemap (interval ve dnech)';
$lang['rss_type'] = 'Typ XML kanálu';
$lang['rss_linkto'] = 'XML kanál odkazuje na';
$lang['rss_content'] = 'Co zobrazovat v položkách XML kanálu?';
$lang['rss_update'] = 'Interval aktualizace XML kanálu (v sekundách)';
$lang['rss_show_summary'] = 'XML kanál ukazuje souhrn v titulku';
+$lang['rss_media'] = 'Jaký typ změn má být uveden v kanálu XML';
$lang['updatecheck'] = 'Kontrolovat aktualizace a bezpečnostní varování? DokuWiki potřebuje pro tuto funkci přístup k update.dokuwiki.org';
$lang['userewrite'] = 'Používat "pěkná" URL';
$lang['useslash'] = 'Používat lomítko jako oddělovač jmenných prostorů v URL';
diff --git a/lib/plugins/plugin/lang/cs/lang.php b/lib/plugins/plugin/lang/cs/lang.php
index 1fd360dca..20a015cd4 100644
--- a/lib/plugins/plugin/lang/cs/lang.php
+++ b/lib/plugins/plugin/lang/cs/lang.php
@@ -12,6 +12,7 @@
* @author Vojta Beran <xmamut@email.cz>
* @author zbynek.krivka@seznam.cz
* @author Bohumir Zamecnik <bohumir.zamecnik@gmail.com>
+ * @author Jakub A. Těšínský (j@kub.cz)
*/
$lang['menu'] = 'Správa pluginů';
$lang['download'] = 'Stáhnout a instalovat plugin';
diff --git a/lib/plugins/popularity/action.php b/lib/plugins/popularity/action.php
index bf11efba6..1c7a2f65d 100644
--- a/lib/plugins/popularity/action.php
+++ b/lib/plugins/popularity/action.php
@@ -18,7 +18,7 @@ class action_plugin_popularity extends Dokuwiki_Action_Plugin {
/**
* Register its handlers with the dokuwiki's event controller
*/
- function register(&$controller) {
+ function register(Doku_Event_Handler $controller) {
$controller->register_hook('INDEXER_TASKS_RUN', 'AFTER', $this, '_autosubmit', array());
}
diff --git a/lib/plugins/popularity/lang/cs/lang.php b/lib/plugins/popularity/lang/cs/lang.php
index d7c58af2e..0b0dbae7f 100644
--- a/lib/plugins/popularity/lang/cs/lang.php
+++ b/lib/plugins/popularity/lang/cs/lang.php
@@ -9,6 +9,7 @@
* @author Vojta Beran <xmamut@email.cz>
* @author zbynek.krivka@seznam.cz
* @author Bohumir Zamecnik <bohumir.zamecnik@gmail.com>
+ * @author Jakub A. Těšínský (j@kub.cz)
*/
$lang['name'] = 'Průzkum používání (může chviličku trvat, než se natáhne)';
$lang['submit'] = 'Odeslat data';
diff --git a/lib/plugins/revert/lang/cs/lang.php b/lib/plugins/revert/lang/cs/lang.php
index 5414ea1e5..dd8d7845c 100644
--- a/lib/plugins/revert/lang/cs/lang.php
+++ b/lib/plugins/revert/lang/cs/lang.php
@@ -12,6 +12,7 @@
* @author Vojta Beran <xmamut@email.cz>
* @author zbynek.krivka@seznam.cz
* @author Bohumir Zamecnik <bohumir.zamecnik@gmail.com>
+ * @author Jakub A. Těšínský (j@kub.cz)
*/
$lang['menu'] = 'Obnova zaspamovaných stránek';
$lang['filter'] = 'Hledat zaspamované stránky';
diff --git a/lib/plugins/safefnrecode/action.php b/lib/plugins/safefnrecode/action.php
index 5d3eaae3a..aae11c437 100644
--- a/lib/plugins/safefnrecode/action.php
+++ b/lib/plugins/safefnrecode/action.php
@@ -13,7 +13,7 @@ require_once DOKU_PLUGIN.'action.php';
class action_plugin_safefnrecode extends DokuWiki_Action_Plugin {
- public function register(Doku_Event_Handler &$controller) {
+ public function register(Doku_Event_Handler $controller) {
$controller->register_hook('INDEXER_TASKS_RUN', 'BEFORE', $this, 'handle_indexer_tasks_run');
diff --git a/lib/plugins/testing/action.php b/lib/plugins/testing/action.php
index e829847b6..a242ab0b7 100644
--- a/lib/plugins/testing/action.php
+++ b/lib/plugins/testing/action.php
@@ -7,7 +7,8 @@
* @author Tobias Sarnowski <tobias@trustedco.de>
*/
class action_plugin_testing extends DokuWiki_Action_Plugin {
- function register(&$controller) {
+
+ function register(Doku_Event_Handler $controller) {
$controller->register_hook('DOKUWIKI_STARTED', 'AFTER', $this, 'dokuwikiStarted');
}
diff --git a/lib/plugins/usermanager/lang/cs/lang.php b/lib/plugins/usermanager/lang/cs/lang.php
index 8351c190b..6de408e14 100644
--- a/lib/plugins/usermanager/lang/cs/lang.php
+++ b/lib/plugins/usermanager/lang/cs/lang.php
@@ -11,6 +11,7 @@
* @author Vojta Beran <xmamut@email.cz>
* @author zbynek.krivka@seznam.cz
* @author Bohumir Zamecnik <bohumir.zamecnik@gmail.com>
+ * @author Jakub A. Těšínský (j@kub.cz)
*/
$lang['menu'] = 'Správa uživatelů';
$lang['noauth'] = '(autentizace uživatelů není k dispozici)';
diff --git a/lib/scripts/compatibility.js b/lib/scripts/compatibility.js
index 385e45854..76b135b23 100644
--- a/lib/scripts/compatibility.js
+++ b/lib/scripts/compatibility.js
@@ -165,13 +165,13 @@ toggleWrap = DEPRECATED_WRAP(dw_editor.toggleWrap);
setWrap = DEPRECATED_WRAP(dw_editor.setWrap);
function findPosX(object){
- DEPRECATED('Use jQuery.position() instead');
- return jQuery(object).position().left;
+ DEPRECATED('Use jQuery.offset() instead');
+ return jQuery(object).offset().left;
}
function findPosY(object){
- DEPRECATED('Use jQuery.position() instead');
- return jQuery(object).position().top;
+ DEPRECATED('Use jQuery.offset() instead');
+ return jQuery(object).offset().top;
}
function getElementsByClass(searchClass,node,tag){
diff --git a/lib/scripts/qsearch.js b/lib/scripts/qsearch.js
index a309f9e29..c3d0d94fb 100644
--- a/lib/scripts/qsearch.js
+++ b/lib/scripts/qsearch.js
@@ -92,12 +92,18 @@ var dw_qsearch = {
.show()
.css('white-space', 'nowrap');
- // shorten namespaces if too long
- max = dw_qsearch.$outObj[0].clientWidth;
+ // disable overflow during shortening
+ dw_qsearch.$outObj.find('li').css('overflow', 'visible');
+
$links = dw_qsearch.$outObj.find('a');
- too_big = (document.documentElement.dir === 'rtl')
- ? function (l) { return l.offsetLeft < 0; }
- : function (l) { return l.offsetWidth + l.offsetLeft > max; };
+ max = dw_qsearch.$outObj[0].clientWidth; // maximum width allowed (but take away paddings below)
+ if(document.documentElement.dir === 'rtl'){
+ max -= parseInt(dw_qsearch.$outObj.css('padding-left'));
+ too_big = function (l) { return l.offsetLeft < 0; };
+ }else{
+ max -= parseInt(dw_qsearch.$outObj.css('padding-right'));
+ too_big = function (l) { return l.offsetWidth + l.offsetLeft > max; };
+ }
$links.each(function () {
var start, length, replace, nsL, nsR, eli, runaway;
@@ -106,6 +112,12 @@ var dw_qsearch = {
return;
}
+ // make IE's innerText available to W3C conform browsers
+ if(this.textContent){
+ this.__defineGetter__('innerText', function(){ return this.textContent });
+ this.__defineSetter__('innerText', function(val){ this.textContent = val });
+ }
+
nsL = this.innerText.indexOf('(');
nsR = this.innerText.indexOf(')');
eli = 0;
@@ -138,6 +150,9 @@ var dw_qsearch = {
nsR = this.innerText.indexOf(')');
}
});
+
+ // reenable overflow
+ dw_qsearch.$outObj.find('li').css('overflow', 'hidden').css('text-overflow','ellipsis');
}
};