diff options
52 files changed, 729 insertions, 472 deletions
diff --git a/_test/bootstrap.php b/_test/bootstrap.php index 6c3d6aaa8..58ad6a0d7 100644 --- a/_test/bootstrap.php +++ b/_test/bootstrap.php @@ -82,7 +82,12 @@ if (getenv('PRESERVE_TMP') != 'true') { // populate default dirs TestUtils::rcopy(TMP_DIR, DOKU_INC.'/conf'); TestUtils::rcopy(TMP_DIR, dirname(__FILE__).'/conf'); -TestUtils::rcopy(TMP_DIR, dirname(__FILE__).'/data'); +mkdir(DOKU_TMP_DATA); +foreach(array( + 'attic', 'cache', 'index', 'locks', 'media', + 'media_attic', 'media_meta', 'meta', 'pages', 'tmp') as $dir){ + mkdir(DOKU_TMP_DATA.'/'.$dir); +} // disable all non-default plugins by default $dh = dir(DOKU_INC.'lib/plugins/'); diff --git a/_test/core/DokuWikiTest.php b/_test/core/DokuWikiTest.php index e47c06329..e51f1eeb1 100644 --- a/_test/core/DokuWikiTest.php +++ b/_test/core/DokuWikiTest.php @@ -19,6 +19,25 @@ abstract class DokuWikiTest extends PHPUnit_Framework_TestCase { protected $pluginsDisabled = array(); /** + * Setup the data directory + * + * This is ran before each test class + */ + public static function setUpBeforeClass() { + // just to be safe not to delete something undefined later + if(!defined('TMP_DIR')) die('no temporary directory'); + if(!defined('DOKU_TMP_DATA')) die('no temporary data directory'); + + // remove any leftovers from the last run + if(is_dir(DOKU_TMP_DATA)){ + TestUtils::rdelete(DOKU_TMP_DATA); + } + + // populate default dirs + TestUtils::rcopy(TMP_DIR, dirname(__FILE__).'/../data/'); + } + + /** * Reset the DokuWiki environment before each test run. Makes sure loaded config, * language and plugins are correct. * @@ -26,6 +45,7 @@ abstract class DokuWikiTest extends PHPUnit_Framework_TestCase { * @return void */ public function setUp() { + // reload config global $conf, $config_cascade; $conf = array(); diff --git a/_test/tests/inc/common_cleanText.test.php b/_test/tests/inc/common_cleanText.test.php index 00e70d4c7..9d4494332 100644 --- a/_test/tests/inc/common_cleanText.test.php +++ b/_test/tests/inc/common_cleanText.test.php @@ -3,11 +3,7 @@ class common_cleanText_test extends DokuWikiTest { function test_unix(){ - $unix = 'one - two - - three'; - + $unix = "one\n two\n\n three"; $this->assertEquals($unix,cleanText($unix)); } diff --git a/_test/tests/inc/httpclient_http.test.php b/_test/tests/inc/httpclient_http.test.php index 9cae3736a..9959a1f06 100644 --- a/_test/tests/inc/httpclient_http.test.php +++ b/_test/tests/inc/httpclient_http.test.php @@ -124,6 +124,11 @@ class httpclient_http_test extends DokuWikiTest { $http->max_bodysize = 250; $data = $http->get($this->server.'/stream/30'); $this->assertTrue($data === false, 'HTTP response'); + $http->max_bodysize_abort = false; + $data = $http->get($this->server.'/stream/30'); + $this->assertFalse($data === false, 'HTTP response'); + /* should read no more than max_bodysize+1 */ + $this->assertLessThanOrEqual(251,strlen($data)); } /** @@ -176,5 +181,15 @@ class httpclient_http_test extends DokuWikiTest { $this->assertArrayHasKey('foo',$http->resp_headers); $this->assertEquals('bar',$http->resp_headers['foo']); } + + /** + * @group internet + */ + function test_chunked(){ + $http = new HTTPClient(); + $data = $http->get('http://whoopdedo.org/cgi-bin/chunked/2550'); + $this->assertFalse($data === false, 'HTTP response'); + $this->assertEquals(2550,strlen($data)); + } } //Setup VIM: ex: et ts=4 : diff --git a/_test/tests/inc/pageutils_findnearest.test.php b/_test/tests/inc/pageutils_findnearest.test.php new file mode 100644 index 000000000..e129b5e58 --- /dev/null +++ b/_test/tests/inc/pageutils_findnearest.test.php @@ -0,0 +1,40 @@ +<?php + +class pageutils_findnearest_test extends DokuWikiTest { + function testNoSidebar() { + global $ID; + + $ID = 'foo:bar:baz:test'; + $sidebar = page_findnearest('sidebar'); + $this->assertEquals(false, $sidebar); + } + + function testExistingSidebars() { + global $ID; + + saveWikiText('sidebar', 'topsidebar-test', ''); + + $ID = 'foo:bar:baz:test'; + $sidebar = page_findnearest('sidebar'); + $this->assertEquals('sidebar', $sidebar); + + $ID = 'foo'; + $sidebar = page_findnearest('sidebar'); + $this->assertEquals('sidebar', $sidebar); + + saveWikiText('foo:bar:sidebar', 'bottomsidebar-test', ''); + + $ID = 'foo:bar:baz:test'; + $sidebar = page_findnearest('sidebar'); + $this->assertEquals('foo:bar:sidebar', $sidebar); + + $ID = 'foo:bar:test'; + $sidebar = page_findnearest('sidebar'); + $this->assertEquals('foo:bar:sidebar', $sidebar); + + $ID = 'foo'; + $sidebar = page_findnearest('sidebar'); + $this->assertEquals('sidebar', $sidebar); + } + +} diff --git a/_test/tests/inc/template_sidebar.test.php b/_test/tests/inc/template_sidebar.test.php new file mode 100644 index 000000000..56153894a --- /dev/null +++ b/_test/tests/inc/template_sidebar.test.php @@ -0,0 +1,40 @@ +<?php + +class template_sidebar_test extends DokuWikiTest { + function testNoSidebar() { + global $ID; + + $ID = 'foo:bar:baz:test'; + $sidebar = tpl_sidebar(false); + $this->assertEquals('',$sidebar); + } + + function testExistingSidebars() { + global $ID; + + saveWikiText('sidebar', 'topsidebar-test', ''); + + $ID = 'foo:bar:baz:test'; + $sidebar = tpl_sidebar(false); + $this->assertTrue(strpos($sidebar, 'topsidebar-test') > 0); + + $ID = 'foo'; + $sidebar = tpl_sidebar(false); + $this->assertTrue(strpos($sidebar, 'topsidebar-test') > 0); + + saveWikiText('foo:bar:sidebar', 'bottomsidebar-test', ''); + + $ID = 'foo:bar:baz:test'; + $sidebar = tpl_sidebar(false); + $this->assertTrue(strpos($sidebar, 'bottomsidebar-test') > 0); + + $ID = 'foo:bar:test'; + $sidebar = tpl_sidebar(false); + $this->assertTrue(strpos($sidebar, 'bottomsidebar-test') > 0); + + $ID = 'foo'; + $sidebar = tpl_sidebar(false); + $this->assertTrue(strpos($sidebar, 'topsidebar-test') > 0); + } + +} diff --git a/_test/tests/lib/exe/js_js_compress.test.php b/_test/tests/lib/exe/js_js_compress.test.php index aa8d82933..49f93cc54 100644 --- a/_test/tests/lib/exe/js_js_compress.test.php +++ b/_test/tests/lib/exe/js_js_compress.test.php @@ -111,12 +111,10 @@ class js_js_compress_test extends DokuWikiTest { } function test_multilinestring(){ - $text = 'var foo = "this is a \\ -multiline string";'; + $text = 'var foo = "this is a \\'."\n".'multiline string";'; $this->assertEquals('var foo="this is a multiline string";',js_compress($text)); - $text = "var foo = 'this is a \\ -multiline string';"; + $text = "var foo = 'this is a \\\nmultiline string';"; $this->assertEquals("var foo='this is a multiline string';",js_compress($text)); } diff --git a/inc/DifferenceEngine.php b/inc/DifferenceEngine.php index 0a7ce8e7c..1b68cf6d3 100644 --- a/inc/DifferenceEngine.php +++ b/inc/DifferenceEngine.php @@ -1039,8 +1039,8 @@ class TableDiffFormatter extends DiffFormatter { // Preserve whitespaces by converting some to non-breaking spaces. // Do not convert all of them to allow word-wrap. $val = parent::format($diff); - $val = str_replace(' ',' ', $val); - $val = preg_replace('/ (?=<)|(?<=[ >]) /', ' ', $val); + $val = str_replace(' ','  ', $val); + $val = preg_replace('/ (?=<)|(?<=[ >]) /', ' ', $val); return $val; } @@ -1078,7 +1078,7 @@ class TableDiffFormatter extends DiffFormatter { } function emptyLine() { - return '<td colspan="2"> </td>'; + return '<td colspan="2"> </td>'; } function contextLine($line) { @@ -1132,8 +1132,8 @@ class InlineDiffFormatter extends DiffFormatter { // Preserve whitespaces by converting some to non-breaking spaces. // Do not convert all of them to allow word-wrap. $val = parent::format($diff); - $val = str_replace(' ',' ', $val); - $val = preg_replace('/ (?=<)|(?<=[ >]) /', ' ', $val); + $val = str_replace(' ','  ', $val); + $val = preg_replace('/ (?=<)|(?<=[ >]) /', ' ', $val); return $val; } diff --git a/inc/HTTPClient.php b/inc/HTTPClient.php index 26bee52a7..a25846c31 100644 --- a/inc/HTTPClient.php +++ b/inc/HTTPClient.php @@ -61,6 +61,8 @@ class DokuHTTPClient extends HTTPClient { } +class HTTPClientException extends Exception { } + /** * This class implements a basic HTTP client * @@ -227,7 +229,7 @@ class HTTPClient { $path = $uri['path']; if(empty($path)) $path = '/'; if(!empty($uri['query'])) $path .= '?'.$uri['query']; - if(isset($uri['port']) && !empty($uri['port'])) $port = $uri['port']; + if(!empty($uri['port'])) $port = $uri['port']; if(isset($uri['user'])) $this->user = $uri['user']; if(isset($uri['pass'])) $this->pass = $uri['pass']; @@ -249,7 +251,7 @@ class HTTPClient { // prepare headers $headers = $this->headers; $headers['Host'] = $uri['host']; - if($uri['port']) $headers['Host'].= ':'.$uri['port']; + if(!empty($uri['port'])) $headers['Host'].= ':'.$uri['port']; $headers['User-Agent'] = $this->agent; $headers['Referer'] = $this->referer; if ($this->keep_alive) { @@ -279,16 +281,13 @@ class HTTPClient { $headers['Proxy-Authorization'] = 'Basic '.base64_encode($this->proxy_user.':'.$this->proxy_pass); } - // stop time - $start = time(); - // already connected? $connectionId = $this->_uniqueConnectionId($server,$port); - $this->_debug('connection pool', $this->connections); + $this->_debug('connection pool', self::$connections); $socket = null; - if (isset($this->connections[$connectionId])) { + if (isset(self::$connections[$connectionId])) { $this->_debug('reusing connection', $connectionId); - $socket = $this->connections[$connectionId]; + $socket = self::$connections[$connectionId]; } if (is_null($socket) || feof($socket)) { $this->_debug('opening connection', $connectionId); @@ -302,222 +301,161 @@ class HTTPClient { // keep alive? if ($this->keep_alive) { - $this->connections[$connectionId] = $socket; + self::$connections[$connectionId] = $socket; } else { - unset($this->connections[$connectionId]); - } - } - - //set blocking - stream_set_blocking($socket,1); - - // build request - $request = "$method $request_url HTTP/".$this->http.HTTP_NL; - $request .= $this->_buildHeaders($headers); - $request .= $this->_getCookies(); - $request .= HTTP_NL; - $request .= $data; - - $this->_debug('request',$request); - - // select parameters - $sel_r = null; - $sel_w = array($socket); - $sel_e = null; - - // send request - $towrite = strlen($request); - $written = 0; - while($written < $towrite){ - // check timeout - if(time()-$start > $this->timeout){ - $this->status = -100; - $this->error = sprintf('Timeout while sending request (%.3fs)',$this->_time() - $this->start); - unset($this->connections[$connectionId]); - return false; - } - - // wait for stream ready or timeout (1sec) - if(@stream_select($sel_r,$sel_w,$sel_e,1) === false){ - usleep(1000); - continue; - } - - // write to stream - $ret = fwrite($socket, substr($request,$written,4096)); - if($ret === false){ - $this->status = -100; - $this->error = 'Failed writing to socket'; - unset($this->connections[$connectionId]); - return false; + unset(self::$connections[$connectionId]); } - $written += $ret; } - // continue non-blocking - stream_set_blocking($socket,0); - - // read headers from socket - $r_headers = ''; - do{ - if(time()-$start > $this->timeout){ - $this->status = -100; - $this->error = sprintf('Timeout while reading headers (%.3fs)',$this->_time() - $this->start); - unset($this->connections[$connectionId]); - return false; - } - if(feof($socket)){ - $this->error = 'Premature End of File (socket)'; - unset($this->connections[$connectionId]); - return false; - } - usleep(1000); - $r_headers .= fgets($socket,1024); - }while(!preg_match('/\r?\n\r?\n$/',$r_headers)); - - $this->_debug('response headers',$r_headers); - - // check if expected body size exceeds allowance - if($this->max_bodysize && preg_match('/\r?\nContent-Length:\s*(\d+)\r?\n/i',$r_headers,$match)){ - if($match[1] > $this->max_bodysize){ - $this->error = 'Reported content length exceeds allowed response size'; - if ($this->max_bodysize_abort) - unset($this->connections[$connectionId]); - return false; + try { + //set non-blocking + stream_set_blocking($socket, false); + + // build request + $request = "$method $request_url HTTP/".$this->http.HTTP_NL; + $request .= $this->_buildHeaders($headers); + $request .= $this->_getCookies(); + $request .= HTTP_NL; + $request .= $data; + + $this->_debug('request',$request); + $this->_sendData($socket, $request, 'request'); + + // read headers from socket + $r_headers = ''; + do{ + $r_line = $this->_readLine($socket, 'headers'); + $r_headers .= $r_line; + }while($r_line != "\r\n" && $r_line != "\n"); + + $this->_debug('response headers',$r_headers); + + // check if expected body size exceeds allowance + if($this->max_bodysize && preg_match('/\r?\nContent-Length:\s*(\d+)\r?\n/i',$r_headers,$match)){ + if($match[1] > $this->max_bodysize){ + if ($this->max_bodysize_abort) + throw new HTTPClientException('Reported content length exceeds allowed response size'); + else + $this->error = 'Reported content length exceeds allowed response size'; + } } - } - // get Status - if (!preg_match('/^HTTP\/(\d\.\d)\s*(\d+).*?\n/', $r_headers, $m)) { - $this->error = 'Server returned bad answer'; - unset($this->connections[$connectionId]); - return false; - } - $this->status = $m[2]; - - // handle headers and cookies - $this->resp_headers = $this->_parseHeaders($r_headers); - if(isset($this->resp_headers['set-cookie'])){ - foreach ((array) $this->resp_headers['set-cookie'] as $cookie){ - list($cookie) = explode(';',$cookie,2); - list($key,$val) = explode('=',$cookie,2); - $key = trim($key); - if($val == 'deleted'){ - if(isset($this->cookies[$key])){ - unset($this->cookies[$key]); + // get Status + if (!preg_match('/^HTTP\/(\d\.\d)\s*(\d+).*?\n/', $r_headers, $m)) + throw new HTTPClientException('Server returned bad answer'); + + $this->status = $m[2]; + + // handle headers and cookies + $this->resp_headers = $this->_parseHeaders($r_headers); + if(isset($this->resp_headers['set-cookie'])){ + foreach ((array) $this->resp_headers['set-cookie'] as $cookie){ + list($cookie) = explode(';',$cookie,2); + list($key,$val) = explode('=',$cookie,2); + $key = trim($key); + if($val == 'deleted'){ + if(isset($this->cookies[$key])){ + unset($this->cookies[$key]); + } + }elseif($key){ + $this->cookies[$key] = $val; } - }elseif($key){ - $this->cookies[$key] = $val; } } - } - - $this->_debug('Object headers',$this->resp_headers); - // check server status code to follow redirect - if($this->status == 301 || $this->status == 302 ){ - // close the connection because we don't handle content retrieval here - // that's the easiest way to clean up the connection - fclose($socket); - unset($this->connections[$connectionId]); + $this->_debug('Object headers',$this->resp_headers); - if (empty($this->resp_headers['location'])){ - $this->error = 'Redirect but no Location Header found'; - return false; - }elseif($this->redirect_count == $this->max_redirect){ - $this->error = 'Maximum number of redirects exceeded'; - return false; - }else{ - $this->redirect_count++; - $this->referer = $url; - // handle non-RFC-compliant relative redirects - if (!preg_match('/^http/i', $this->resp_headers['location'])){ - if($this->resp_headers['location'][0] != '/'){ - $this->resp_headers['location'] = $uri['scheme'].'://'.$uri['host'].':'.$uri['port']. - dirname($uri['path']).'/'.$this->resp_headers['location']; - }else{ - $this->resp_headers['location'] = $uri['scheme'].'://'.$uri['host'].':'.$uri['port']. - $this->resp_headers['location']; + // check server status code to follow redirect + if($this->status == 301 || $this->status == 302 ){ + if (empty($this->resp_headers['location'])){ + throw new HTTPClientException('Redirect but no Location Header found'); + }elseif($this->redirect_count == $this->max_redirect){ + throw new HTTPClientException('Maximum number of redirects exceeded'); + }else{ + // close the connection because we don't handle content retrieval here + // that's the easiest way to clean up the connection + fclose($socket); + unset(self::$connections[$connectionId]); + + $this->redirect_count++; + $this->referer = $url; + // handle non-RFC-compliant relative redirects + if (!preg_match('/^http/i', $this->resp_headers['location'])){ + if($this->resp_headers['location'][0] != '/'){ + $this->resp_headers['location'] = $uri['scheme'].'://'.$uri['host'].':'.$uri['port']. + dirname($uri['path']).'/'.$this->resp_headers['location']; + }else{ + $this->resp_headers['location'] = $uri['scheme'].'://'.$uri['host'].':'.$uri['port']. + $this->resp_headers['location']; + } } + // perform redirected request, always via GET (required by RFC) + return $this->sendRequest($this->resp_headers['location'],array(),'GET'); } - // perform redirected request, always via GET (required by RFC) - return $this->sendRequest($this->resp_headers['location'],array(),'GET'); } - } - // check if headers are as expected - if($this->header_regexp && !preg_match($this->header_regexp,$r_headers)){ - $this->error = 'The received headers did not match the given regexp'; - unset($this->connections[$connectionId]); - return false; - } + // check if headers are as expected + if($this->header_regexp && !preg_match($this->header_regexp,$r_headers)) + throw new HTTPClientException('The received headers did not match the given regexp'); - //read body (with chunked encoding if needed) - $r_body = ''; - if(preg_match('/transfer\-(en)?coding:\s*chunked\r\n/i',$r_headers)){ - do { - unset($chunk_size); + //read body (with chunked encoding if needed) + $r_body = ''; + if((isset($this->resp_headers['transfer-encoding']) && $this->resp_headers['transfer-encoding'] == 'chunked') + || (isset($this->resp_headers['transfer-coding']) && $this->resp_headers['transfer-coding'] == 'chunked')){ + $abort = false; do { - if(feof($socket)){ - $this->error = 'Premature End of File (socket)'; - unset($this->connections[$connectionId]); - return false; + $chunk_size = ''; + while (preg_match('/^[a-zA-Z0-9]?$/',$byte=$this->_readData($socket,1,'chunk'))){ + // read chunksize until \r + $chunk_size .= $byte; + if (strlen($chunk_size) > 128) // set an abritrary limit on the size of chunks + throw new HTTPClientException('Allowed response size exceeded'); } - if(time()-$start > $this->timeout){ - $this->status = -100; - $this->error = sprintf('Timeout while reading chunk (%.3fs)',$this->_time() - $this->start); - unset($this->connections[$connectionId]); - return false; + $this->_readLine($socket, 'chunk'); // readtrailing \n + $chunk_size = hexdec($chunk_size); + + if($this->max_bodysize && $chunk_size+strlen($r_body) > $this->max_bodysize){ + if ($this->max_bodysize_abort) + throw new HTTPClientException('Allowed response size exceeded'); + $this->error = 'Allowed response size exceeded'; + $chunk_size = $this->max_bodysize - strlen($r_body); + $abort = true; } - $byte = fread($socket,1); - $chunk_size .= $byte; - } while (preg_match('/[a-zA-Z0-9]/',$byte)); // read chunksize including \r - - $byte = fread($socket,1); // readtrailing \n - $chunk_size = hexdec($chunk_size); - if ($chunk_size) { - $this_chunk = fread($socket,$chunk_size); - $r_body .= $this_chunk; - $byte = fread($socket,2); // read trailing \r\n - } - if($this->max_bodysize && strlen($r_body) > $this->max_bodysize){ - $this->error = 'Allowed response size exceeded'; - if ($this->max_bodysize_abort){ - unset($this->connections[$connectionId]); - return false; - } else { - break; + if ($chunk_size > 0) { + $r_body .= $this->_readData($socket, $chunk_size, 'chunk'); + $byte = $this->_readData($socket, 2, 'chunk'); // read trailing \r\n } - } - } while ($chunk_size); - }else{ - // read entire socket - while (!feof($socket)) { - if(time()-$start > $this->timeout){ - $this->status = -100; - $this->error = sprintf('Timeout while reading response (%.3fs)',$this->_time() - $this->start); - unset($this->connections[$connectionId]); - return false; - } - $r_body .= fread($socket,4096); - $r_size = strlen($r_body); - if($this->max_bodysize && $r_size > $this->max_bodysize){ - $this->error = 'Allowed response size exceeded'; + } while ($chunk_size && !$abort); + }elseif($this->max_bodysize){ + // read just over the max_bodysize + $r_body = $this->_readData($socket, $this->max_bodysize+1, 'response', true); + if(strlen($r_body) > $this->max_bodysize){ if ($this->max_bodysize_abort) { - unset($this->connections[$connectionId]); - return false; + throw new HTTPClientException('Allowed response size exceeded'); } else { - break; + $this->error = 'Allowed response size exceeded'; } } - if(isset($this->resp_headers['content-length']) && - !isset($this->resp_headers['transfer-encoding']) && - $this->resp_headers['content-length'] == $r_size){ - // we read the content-length, finish here - break; + }elseif(isset($this->resp_headers['content-length']) && + !isset($this->resp_headers['transfer-encoding'])){ + // read up to the content-length + $r_body = $this->_readData($socket, $this->resp_headers['content-length'], 'response', true); + }else{ + // read entire socket + $r_size = 0; + while (!feof($socket)) { + $r_body .= $this->_readData($socket, 4096, 'response', true); } } + + } catch (HTTPClientException $err) { + $this->error = $err->getMessage(); + if ($err->getCode()) + $this->status = $err->getCode(); + unset(self::$connections[$connectionId]); + fclose($socket); + return false; } if (!$this->keep_alive || @@ -525,7 +463,7 @@ class HTTPClient { // close socket $status = socket_get_status($socket); fclose($socket); - unset($this->connections[$connectionId]); + unset(self::$connections[$connectionId]); } // decode gzip if needed @@ -547,6 +485,126 @@ class HTTPClient { } /** + * Safely write data to a socket + * + * @param handle $socket An open socket handle + * @param string $data The data to write + * @param string $message Description of what is being read + * @author Tom N Harris <tnharris@whoopdedo.org> + */ + function _sendData($socket, $data, $message) { + // select parameters + $sel_r = null; + $sel_w = array($socket); + $sel_e = null; + + // send request + $towrite = strlen($data); + $written = 0; + while($written < $towrite){ + // check timeout + $time_used = $this->_time() - $this->start; + if($time_used > $this->timeout) + throw new HTTPClientException(sprintf('Timeout while sending %s (%.3fs)',$message, $time_used), -100); + 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; + } + } + } + + /** + * Safely read data from a socket + * + * Reads up to a given number of bytes or throws an exception if the + * response times out or ends prematurely. + * + * @param handle $socket An open socket handle in non-blocking mode + * @param int $nbytes Number of bytes to read + * @param string $message Description of what is being read + * @param bool $ignore_eof End-of-file is not an error if this is set + * @author Tom N Harris <tnharris@whoopdedo.org> + */ + function _readData($socket, $nbytes, $message, $ignore_eof = false) { + // select parameters + $sel_r = array($socket); + $sel_w = null; + $sel_e = null; + + $r_data = ''; + // Does not return immediately so timeout and eof can be checked + if ($nbytes < 0) $nbytes = 0; + $to_read = $nbytes; + do { + $time_used = $this->_time() - $this->start; + if ($time_used > $this->timeout) + throw new HTTPClientException( + sprintf('Timeout while reading %s (%.3fs)', $message, $time_used), + -100); + if(feof($socket)) { + if(!$ignore_eof) + throw new HTTPClientException("Premature End of File (socket) while reading $message"); + break; + } + + 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); + } + } + } while ($to_read > 0 && strlen($r_data) < $nbytes); + return $r_data; + } + + /** + * Safely read a \n-terminated line from a socket + * + * Always returns a complete line, including the terminating \n. + * + * @param handle $socket An open socket handle in non-blocking mode + * @param string $message Description of what is being read + * @author Tom N Harris <tnharris@whoopdedo.org> + */ + function _readLine($socket, $message) { + // select parameters + $sel_r = array($socket); + $sel_w = null; + $sel_e = null; + + $r_data = ''; + do { + $time_used = $this->_time() - $this->start; + if ($time_used > $this->timeout) + throw new HTTPClientException( + sprintf('Timeout while reading %s (%.3fs)', $message, $time_used), + -100); + 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); + } + } while (!preg_match('/\n$/',$r_data)); + return $r_data; + } + + /** * print debug info * * @author Andreas Gohr <andi@splitbrain.org> @@ -566,12 +624,20 @@ class HTTPClient { /** * Return current timestamp in microsecond resolution */ - function _time(){ + static function _time(){ list($usec, $sec) = explode(" ", microtime()); return ((float)$usec + (float)$sec); } /** + * 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. @@ -583,7 +649,7 @@ class HTTPClient { $lines = explode("\n",$string); array_shift($lines); //skip first line (status) foreach($lines as $line){ - list($key, $val) = explode(':',$line,2); + @list($key, $val) = explode(':',$line,2); $key = trim($key); $val = trim($val); $key = strtolower($key); diff --git a/inc/JpegMeta.php b/inc/JpegMeta.php index 5c043fb6b..ac29bca66 100644 --- a/inc/JpegMeta.php +++ b/inc/JpegMeta.php @@ -2972,7 +2972,7 @@ class JpegMeta { elseif ($c == 62) $ascii .= '>'; elseif ($c == 32) - $ascii .= ' '; + $ascii .= ' '; elseif ($c > 32) $ascii .= chr($c); else diff --git a/inc/Mailer.class.php b/inc/Mailer.class.php index fccf1dad9..c85e61395 100644 --- a/inc/Mailer.class.php +++ b/inc/Mailer.class.php @@ -132,8 +132,8 @@ class Mailer { public function setHeader($header, $value, $clean = true) { $header = str_replace(' ', '-', ucwords(strtolower(str_replace('-', ' ', $header)))); // streamline casing if($clean) { - $header = preg_replace('/[^\w \-\.\+\@]+/', '', $header); - $value = preg_replace('/[^\w \-\.\+\@<>]+/', '', $value); + $header = preg_replace('/[^a-zA-Z0-9_ \-\.\+\@]+/', '', $header); + $value = preg_replace('/[^a-zA-Z0-9_ \-\.\+\@<>]+/', '', $value); } // empty value deletes diff --git a/inc/PassHash.class.php b/inc/PassHash.class.php index f85766723..13be479cc 100644 --- a/inc/PassHash.class.php +++ b/inc/PassHash.class.php @@ -132,7 +132,7 @@ class PassHash { public function hash_smd5($clear, $salt = null) { $this->init_salt($salt, 8); - if(defined('CRYPT_MD5') && CRYPT_MD5) { + if(defined('CRYPT_MD5') && CRYPT_MD5 && $salt !== '') { return crypt($clear, '$1$'.$salt.'$'); } else { // Fall back to PHP-only implementation diff --git a/inc/config_cascade.php b/inc/config_cascade.php index e4a3df353..e1ab0eead 100644 --- a/inc/config_cascade.php +++ b/inc/config_cascade.php @@ -50,6 +50,8 @@ $config_cascade = array_merge( ), 'userstyle' => array( 'screen' => DOKU_CONF.'userstyle.css', + // @deprecated 2012-04-09: rtl will cease to be a mode of its own, + // please use "[dir=rtl]" in any css file in all, screen or print mode instead 'rtl' => DOKU_CONF.'userrtl.css', 'print' => DOKU_CONF.'userprint.css', 'feed' => DOKU_CONF.'userfeed.css', diff --git a/inc/html.php b/inc/html.php index a20ee5c39..f9712d975 100644 --- a/inc/html.php +++ b/inc/html.php @@ -229,12 +229,12 @@ function html_show($txt=null){ //PreviewHeader echo '<br id="scroll__here" />'; echo p_locale_xhtml('preview'); - echo '<div class="preview">'; + echo '<div class="preview"><div class="pad">'; $html = html_secedit(p_render('xhtml',p_get_instructions($txt),$info),$secedit); if($INFO['prependTOC']) $html = tpl_toc(true).$html; echo $html; echo '<div class="clearer"></div>'; - echo '</div>'; + echo '</div></div>'; }else{ if ($REV) print p_locale_xhtml('showrev'); @@ -327,7 +327,7 @@ function html_search(){ //show progressbar print '<div id="dw__loading">'.NL; - print '<script type="text/javascript" charset="utf-8"><!--//--><![CDATA[//><!--'.NL; + print '<script type="text/javascript"><!--//--><![CDATA[//><!--'.NL; print 'showLoadBar();'.NL; print '//--><!]]></script>'.NL; print '</div>'.NL; @@ -389,7 +389,7 @@ function html_search(){ } //hide progressbar - print '<script type="text/javascript" charset="utf-8"><!--//--><![CDATA[//><!--'.NL; + print '<script type="text/javascript"><!--//--><![CDATA[//><!--'.NL; print 'hideLoadBar("dw__loading");'.NL; print '//--><!]]></script>'.NL; flush(); @@ -494,7 +494,7 @@ function html_revisions($first=0, $media_id = false){ if (!$media_id) { $form->addElement(form_makeOpenTag('span', array('class' => 'sum'))); - $form->addElement(' – '); + $form->addElement(' – '); $form->addElement(htmlspecialchars($INFO['sum'])); $form->addElement(form_makeCloseTag('span')); } @@ -573,7 +573,7 @@ function html_revisions($first=0, $media_id = false){ if ($info['sum']) { $form->addElement(form_makeOpenTag('span', array('class' => 'sum'))); - if (!$media_id) $form->addElement(' – '); + if (!$media_id) $form->addElement(' – '); $form->addElement(htmlspecialchars($info['sum'])); $form->addElement(form_makeCloseTag('span')); } @@ -765,7 +765,7 @@ function html_recent($first=0, $show_changes='both'){ $form->addElement(html_wikilink(':'.$recent['id'],useHeading('navigation')?null:$recent['id'])); } $form->addElement(form_makeOpenTag('span', array('class' => 'sum'))); - $form->addElement(' – '.htmlspecialchars($recent['sum'])); + $form->addElement(' – '.htmlspecialchars($recent['sum'])); $form->addElement(form_makeCloseTag('span')); $form->addElement(form_makeOpenTag('span', array('class' => 'user'))); @@ -1418,7 +1418,7 @@ function html_edit(){ if ($wr) { // sets changed to true when previewed - echo '<script type="text/javascript" charset="utf-8"><!--//--><![CDATA[//><!--'. NL; + echo '<script type="text/javascript"><!--//--><![CDATA[//><!--'. NL; echo 'textChanged = ' . ($mod ? 'true' : 'false'); echo '//--><!]]></script>' . NL; } ?> diff --git a/inc/lang/bg/lang.php b/inc/lang/bg/lang.php index 7a246024d..562dc78b3 100644 --- a/inc/lang/bg/lang.php +++ b/inc/lang/bg/lang.php @@ -9,8 +9,8 @@ */ $lang['encoding'] = 'utf-8'; $lang['direction'] = 'ltr'; -$lang['doublequoteopening'] = '“'; //“ -$lang['doublequoteclosing'] = '”'; //” +$lang['doublequoteopening'] = '"'; //“ +$lang['doublequoteclosing'] = '"'; //” $lang['singlequoteopening'] = '‘'; //‘ $lang['singlequoteclosing'] = '’'; //’ $lang['apostrophe'] = '’'; //’ @@ -98,6 +98,7 @@ $lang['searchmedia_in'] = 'Търсене в %s'; $lang['txt_upload'] = 'Изберете файл за качване'; $lang['txt_filename'] = 'Качи като (незадължително)'; $lang['txt_overwrt'] = 'Презапиши съществуващите файлове'; +$lang['maxuploadsize'] = 'Макс. размер за отделните файлове е %s.'; $lang['lockedby'] = 'В момента е заключена от'; $lang['lockexpire'] = 'Ще бъде отключена на'; @@ -161,7 +162,7 @@ $lang['deletefail'] = '"%s" не може да бъде изтрит $lang['mediainuse'] = 'Файлът "%s" не бе изтрит - все още се ползва.'; $lang['namespaces'] = 'Именни пространства'; $lang['mediafiles'] = 'Налични файлове в'; -$lang['accessdenied'] = 'Нямате разрешение да преглеждате страницата.'; +$lang['accessdenied'] = 'Нямате необходимите права за преглеждане на страницата.'; $lang['mediausage'] = 'Ползвайте следния синтаксис, за да упоменете файла:'; $lang['mediaview'] = 'Преглед на оригиналния файл'; $lang['mediaroot'] = 'root'; @@ -290,7 +291,6 @@ $lang['i_superuser'] = 'Супер потребител'; $lang['i_problems'] = 'Открити са проблеми, които възпрепятстват инсталирането. Ще можете да продължите след като отстраните долуизброените проблеми.'; $lang['i_modified'] = 'Поради мерки за сигурност инсталаторът работи само с нови и непроменени инсталационни файлове. Трябва да разархивирате отново файловете от сваления архив или да се посъветвате с <a href="http://dokuwiki.org/install">Инструкциите за инсталиране на Dokuwiki</a>.'; - $lang['i_funcna'] = 'PHP функцията <code>%s</code> не е достъпна. Може би е забранена от доставчика на хостинг.'; $lang['i_phpver'] = 'Инсталираната версия <code>%s</code> на PHP е по-стара от необходимата <code>%s</code>. Актуализирайте PHP инсталацията.'; $lang['i_permfail'] = '<code>%s</code> не е достъпна за писане от DokuWiki. Трябва да промените правата за достъп до директорията!'; diff --git a/inc/lang/bg/mailtext.txt b/inc/lang/bg/mailtext.txt index ad0024a8d..a5f0cbd92 100644 --- a/inc/lang/bg/mailtext.txt +++ b/inc/lang/bg/mailtext.txt @@ -1,4 +1,4 @@ -Страница във DokuWiki е добавена или променена. Ето детайлите: +Страница в DokuWiki е добавена или променена. Ето детайлите: Дата : @DATE@ Браузър : @BROWSER@ diff --git a/inc/lang/bg/mailwrap.html b/inc/lang/bg/mailwrap.html new file mode 100644 index 000000000..26b0a1e6a --- /dev/null +++ b/inc/lang/bg/mailwrap.html @@ -0,0 +1,13 @@ +<html> +<head> + <title>@TITLE@</title> + <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> +</head> +<body> + +@HTMLBODY@ + +<br /><hr /> +<small>Писмото е генерирано от DokuWiki на адрес @DOKUWIKIURL@.</small> +</body> +</html> diff --git a/inc/media.php b/inc/media.php index 2462a1deb..e1d5d511e 100644 --- a/inc/media.php +++ b/inc/media.php @@ -1442,7 +1442,7 @@ function media_printfile_thumbs($item,$auth,$jump=false,$display_namespace=false $size .= (int) $item['meta']->getField('File.Height'); echo '<dd class="size">'.$size.'</dd>'.NL; } else { - echo '<dd class="size"> </dd>'.NL; + echo '<dd class="size"> </dd>'.NL; } $date = dformat($item['mtime']); echo '<dd class="date">'.$date.'</dd>'.NL; @@ -1723,7 +1723,7 @@ function media_nstree_li($item){ if($item['open']){ $class .= ' open'; $img = DOKU_BASE.'lib/images/minus.gif'; - $alt = '−'; + $alt = '−'; }else{ $class .= ' closed'; $img = DOKU_BASE.'lib/images/plus.gif'; diff --git a/inc/pageutils.php b/inc/pageutils.php index c94d14624..f525c44d0 100644 --- a/inc/pageutils.php +++ b/inc/pageutils.php @@ -622,3 +622,27 @@ function utf8_decodeFN($file){ return urldecode($file); } +/** + * Find a page in the current namespace (determined from $ID) or any + * higher namespace + * + * Used for sidebars, but can be used other stuff as well + * + * @todo add event hook + * @param string $page the pagename you're looking for + * @return string|false the full page id of the found page, false if any + */ +function page_findnearest($page){ + global $ID; + + $ns = $ID; + do { + $ns = getNS($ns); + $pageid = ltrim("$ns:$page",':'); + if(page_exists($pageid)){ + return $pageid; + } + } while($ns); + + return false; +} diff --git a/inc/parser/xhtml.php b/inc/parser/xhtml.php index 119ac3f01..2f09dbd4f 100644 --- a/inc/parser/xhtml.php +++ b/inc/parser/xhtml.php @@ -549,7 +549,7 @@ class Doku_Renderer_xhtml extends Doku_Renderer { global $ID; $name = $this->_getLinkTitle($name, $hash, $isImage); $hash = $this->_headerToLink($hash); - $title = $ID.' ↵'; + $title = $ID.' ↵'; $this->doc .= '<a href="#'.$hash.'" title="'.$title.'" class="wikilink1">'; $this->doc .= $name; $this->doc .= '</a>'; diff --git a/inc/template.php b/inc/template.php index a18d7151f..76d4d4bbe 100644 --- a/inc/template.php +++ b/inc/template.php @@ -592,7 +592,7 @@ function tpl_get_action($type) { $accesskey = 'x'; break; case 'top': - $accesskey = 'x'; + $accesskey = 't'; $params = array(); $id = '#dokuwiki__top'; break; @@ -714,7 +714,7 @@ function tpl_searchform($ajax=true,$autocomplete=true){ * * @author Andreas Gohr <andi@splitbrain.org> */ -function tpl_breadcrumbs($sep='•'){ +function tpl_breadcrumbs($sep='•'){ global $lang; global $conf; @@ -757,7 +757,7 @@ function tpl_breadcrumbs($sep='•'){ * @author <fredrik@averpil.com> * @todo May behave strangely in RTL languages */ -function tpl_youarehere($sep=' » '){ +function tpl_youarehere($sep=' » '){ global $conf; global $ID; global $lang; @@ -843,7 +843,7 @@ function tpl_pageinfo($ret=false){ if($INFO['exists']){ $out = ''; $out .= $fn; - $out .= ' · '; + $out .= ' · '; $out .= $lang['lastmod']; $out .= ': '; $out .= $date; @@ -854,7 +854,7 @@ function tpl_pageinfo($ret=false){ $out .= ' ('.$lang['external_edit'].')'; } if($INFO['locked']){ - $out .= ' · '; + $out .= ' · '; $out .= $lang['lockedby']; $out .= ': '; $out .= editorinfo($INFO['locked']); @@ -1394,6 +1394,18 @@ function tpl_include_page($pageid,$print=true){ if(!$print) return $html; echo $html; + return $html; +} + +/** + * Include the sidebar, will check current namespaces first + */ +function tpl_sidebar($print=true){ + global $conf; + + $sidebar = page_findnearest($conf['sidebar']); + if($sidebar) return tpl_include_page($sidebar, $print); + return ''; } /** diff --git a/install.php b/install.php index a1d406209..3d9fddbb2 100644 --- a/install.php +++ b/install.php @@ -78,7 +78,7 @@ header('Content-Type: text/html; charset=utf-8'); select.text, input.text { width: 30em; margin: 0 0.5em; } a {text-decoration: none} </style> - <script type="text/javascript" language="javascript"> + <script type="text/javascript"> function acltoggle(){ var cb = document.getElementById('acl'); var fs = document.getElementById('acldep'); diff --git a/lib/images/interwiki/amazon.de.gif b/lib/images/interwiki/amazon.de.gif Binary files differindex 6e36a051a..a0d2cd4cb 100644 --- a/lib/images/interwiki/amazon.de.gif +++ b/lib/images/interwiki/amazon.de.gif diff --git a/lib/images/interwiki/amazon.gif b/lib/images/interwiki/amazon.gif Binary files differindex 6e36a051a..a0d2cd4cb 100644 --- a/lib/images/interwiki/amazon.gif +++ b/lib/images/interwiki/amazon.gif diff --git a/lib/images/interwiki/amazon.uk.gif b/lib/images/interwiki/amazon.uk.gif Binary files differindex 6e36a051a..a0d2cd4cb 100644 --- a/lib/images/interwiki/amazon.uk.gif +++ b/lib/images/interwiki/amazon.uk.gif diff --git a/lib/images/interwiki/callto.gif b/lib/images/interwiki/callto.gif Binary files differindex f6d424554..60158c565 100644 --- a/lib/images/interwiki/callto.gif +++ b/lib/images/interwiki/callto.gif diff --git a/lib/images/interwiki/paypal.gif b/lib/images/interwiki/paypal.gif Binary files differindex 1d2834062..a2dc89431 100644 --- a/lib/images/interwiki/paypal.gif +++ b/lib/images/interwiki/paypal.gif diff --git a/lib/images/interwiki/skype.gif b/lib/images/interwiki/skype.gif Binary files differnew file mode 100644 index 000000000..2c900a8b2 --- /dev/null +++ b/lib/images/interwiki/skype.gif diff --git a/lib/images/interwiki/skype.png b/lib/images/interwiki/skype.png Binary files differdeleted file mode 100644 index c70216702..000000000 --- a/lib/images/interwiki/skype.png +++ /dev/null diff --git a/lib/plugins/acl/admin.php b/lib/plugins/acl/admin.php index 1f88c6ff9..a0d2e430e 100644 --- a/lib/plugins/acl/admin.php +++ b/lib/plugins/acl/admin.php @@ -507,7 +507,7 @@ class admin_plugin_acl extends DokuWiki_Admin_Plugin { if($item['type']=='d'){ if($item['open']){ $img = DOKU_BASE.'lib/images/minus.gif'; - $alt = '−'; + $alt = '−'; }else{ $img = DOKU_BASE.'lib/images/plus.gif'; $alt = '+'; @@ -747,7 +747,7 @@ class admin_plugin_acl extends DokuWiki_Admin_Plugin { //build code $ret .= '<label for="pbox'.$label.'" title="'.$this->getLang('acl_perm'.$perm).'"'.$class.'>'; - $ret .= '<input '.buildAttributes($atts).' /> '; + $ret .= '<input '.buildAttributes($atts).' /> '; $ret .= $this->getLang('acl_perm'.$perm); $ret .= '</label>'.NL; } @@ -783,7 +783,7 @@ class admin_plugin_acl extends DokuWiki_Admin_Plugin { echo ' <option value="__g__" class="aclgroup"'.$gsel.'>'.$this->getLang('acl_group').':</option>'.NL; echo ' <option value="__u__" class="acluser"'.$usel.'>'.$this->getLang('acl_user').':</option>'.NL; if (!empty($this->specials)) { - echo ' <optgroup label=" ">'.NL; + echo ' <optgroup label=" ">'.NL; foreach($this->specials as $ug){ if($ug == $this->who){ $sel = ' selected="selected"'; @@ -801,7 +801,7 @@ class admin_plugin_acl extends DokuWiki_Admin_Plugin { echo ' </optgroup>'.NL; } if (!empty($this->usersgroups)) { - echo ' <optgroup label=" ">'.NL; + echo ' <optgroup label=" ">'.NL; foreach($this->usersgroups as $ug){ if($ug == $this->who){ $sel = ' selected="selected"'; diff --git a/lib/plugins/acl/lang/bg/lang.php b/lib/plugins/acl/lang/bg/lang.php index e260be918..95201750e 100644 --- a/lib/plugins/acl/lang/bg/lang.php +++ b/lib/plugins/acl/lang/bg/lang.php @@ -20,9 +20,9 @@ $lang['p_group_id'] = 'Членовете на групата <b clas $lang['p_group_ns'] = 'Членовете на групата <b class="aclgroup">%s</b> в момента имат следните права за именното пространство <b class="aclns">%s</b>: <i>%s</i>.'; $lang['p_choose_id'] = 'Моля, <b>въведете потребител или група</b> в полето отгоре, за да видите или промените правата за страницата <b class="aclpage">%s</b>.'; $lang['p_choose_ns'] = 'Моля, <b>въведете потребител или група</b> в полето отгоре, за да видите или промените правата за именното пространство <b class="aclns">%s</b>.'; -$lang['p_inherited'] = 'Бележка: Тези разрешения не са зададени директно, а са наследени от други групи или именни пространства.'; +$lang['p_inherited'] = 'Бележка: Тези права не са зададени директно, а са наследени от други групи или именни пространства.'; $lang['p_isadmin'] = 'Бележка: Избраната група или потребител има всички права, защото е определен за супер потребител.'; -$lang['p_include'] = 'Висши права включват по-нисшите такива. Правата за създаване, качване и изтриване са приложими само за именни пространства, но не за страници.'; +$lang['p_include'] = 'Висшите права включват по-нисши такива. Правата за създаване, качване и изтриване са приложими само за именни пространства, но не за страници.'; $lang['current'] = 'Текущи ACL права'; $lang['where'] = 'Страница/Именно пространство'; $lang['who'] = 'Потребител/Група'; @@ -34,4 +34,4 @@ $lang['acl_perm4'] = 'Създаване'; $lang['acl_perm8'] = 'Качване'; $lang['acl_perm16'] = 'Изтриване'; $lang['acl_new'] = 'Добавяне на право'; -$lang['acl_mod'] = 'Промяна на записа'; +$lang['acl_mod'] = 'Промяна на правата'; diff --git a/lib/plugins/config/admin.php b/lib/plugins/config/admin.php index 9a9bb5329..c5f7ee532 100644 --- a/lib/plugins/config/admin.php +++ b/lib/plugins/config/admin.php @@ -118,6 +118,7 @@ class admin_plugin_config extends DokuWiki_Admin_Plugin { // config setting group if ($in_fieldset) { ptln(' </table>'); + ptln(' </div>'); ptln(' </fieldset>'); } else { $in_fieldset = true; diff --git a/lib/plugins/config/lang/bg/lang.php b/lib/plugins/config/lang/bg/lang.php index 0bc25a8e5..43c961bfc 100644 --- a/lib/plugins/config/lang/bg/lang.php +++ b/lib/plugins/config/lang/bg/lang.php @@ -10,41 +10,44 @@ // for admin plugins, the menu prompt to be displayed in the admin menu // if set here, the plugin doesn't need to override the getMenuText() method -$lang['menu'] = 'Настройки'; +$lang['menu'] = 'Настройки'; -$lang['error'] = 'Обновяването на настройките не е възможно, поради невалидна стойност, моля, прегледайте промените си и пробвайте отново. +$lang['error'] = 'Обновяването на настройките не е възможно, поради невалидна стойност, моля, прегледайте промените си и пробвайте отново. <br />Неверните стойности ще бъдат обградени с червена рамка.'; -$lang['updated'] = 'Обновяването на настройките е успешно.'; -$lang['nochoice'] = '(няма друг възможен избор)'; -$lang['locked'] = 'Обновяването на файла с настройките не е възможно, ако това не е нарочно, проверете,<br /> +$lang['updated'] = 'Обновяването на настройките е успешно.'; +$lang['nochoice'] = '(няма друг възможен избор)'; +$lang['locked'] = 'Обновяването на файла с настройките не е възможно, ако това не е нарочно, проверете,<br /> дали името на локалния файл с настройки и правата са верни.'; -$lang['danger'] = 'Внимание: промяна на опцията може да направи Wiki-то и менюто за настройване недостъпни.'; -$lang['warning'] = 'Предупреждение: промяна на опцията може предизвика нежелани последици.'; -$lang['security'] = 'Предупреждение: промяна на опцията може да представлява риск за сигурността.'; + +$lang['danger'] = 'Внимание: промяна на опцията може да направи Wiki-то и менюто за настройване недостъпни.'; +$lang['warning'] = 'Предупреждение: промяна на опцията може предизвика нежелани последици.'; +$lang['security'] = 'Предупреждение: промяна на опцията може да представлява риск за сигурността.'; /* --- Config Setting Headers --- */ $lang['_configuration_manager'] = 'Диспечер на настройките'; //same as heading in intro.txt -$lang['_header_dokuwiki'] = 'Настройки на DokuWiki'; -$lang['_header_plugin'] = 'Настройки на приставки'; -$lang['_header_template'] = 'Настройки на шаблони'; +$lang['_header_dokuwiki'] = 'Настройки на DokuWiki'; +$lang['_header_plugin'] = 'Настройки на приставки'; +$lang['_header_template'] = 'Настройки на шаблона'; +$lang['_header_undefined'] = 'Неопределени настройки'; /* --- Config Setting Groups --- */ -$lang['_header_undefined'] = 'Неопределени настройки'; -$lang['_basic'] = 'Основни настройки'; -$lang['_display'] = 'Настройки за изобразяване'; -$lang['_authentication'] = 'Настройки за удостоверяване'; -$lang['_anti_spam'] = 'Настройки за борба със SPAM-ма'; -$lang['_editing'] = 'Настройки за редактиране'; -$lang['_links'] = 'Настройки на препратките'; -$lang['_media'] = 'Настройки на медията'; -$lang['_advanced'] = 'Допълнителни настройки'; -$lang['_network'] = 'Мрежови настройки'; +$lang['_basic'] = 'Основни настройки'; +$lang['_display'] = 'Настройки за изобразяване'; +$lang['_authentication'] = 'Настройки за удостоверяване'; +$lang['_anti_spam'] = 'Настройки за борба със SPAM-ма'; +$lang['_editing'] = 'Настройки за редактиране'; +$lang['_links'] = 'Настройки на препратките'; +$lang['_media'] = 'Настройки на медията'; +$lang['_notifications'] = 'Настройки за известяване'; +$lang['_syndication'] = 'Настройки на RSS емисиите'; +$lang['_advanced'] = 'Допълнителни настройки'; +$lang['_network'] = 'Мрежови настройки'; // The settings group name for plugins and templates can be set with // plugin_settings_name and template_settings_name respectively. If one // of these lang properties is not set, the group name will be generated // from the plugin or template name and the localized suffix. -$lang['_plugin_sufix'] = ' - настройки на приставката'; -$lang['_template_sufix'] = ' - настройки на шаблона'; +$lang['_plugin_sufix'] = ' (приставка)'; +$lang['_template_sufix'] = ' (шаблон)'; /* --- Undefined Setting Messages --- */ $lang['_msg_setting_undefined'] = 'Няма метаданни за настройките.'; @@ -53,167 +56,183 @@ $lang['_msg_setting_no_default'] = 'Няма стандартна стойнос /* -------------------- Config Options --------------------------- */ -$lang['fmode'] = 'Режим (права) за създаване на файлове'; -$lang['dmode'] = 'Режим (права) за създаване на директории'; -$lang['lang'] = 'Език'; -$lang['basedir'] = 'Главна директория (напр. <code>/dokuwiki/</code>). Оставете празно, за да бъде засечена автоматично.'; -$lang['baseurl'] = 'URL адрес (напр. <code>http://www.yourserver.com</code>). Оставете празно, за да бъде засечен автоматично.'; -$lang['savedir'] = 'Директория за записване на данните'; -$lang['cookiedir'] = 'Път за бисквитките. Оставите ли полето празно ще се ползва горния URL адрес.'; -$lang['start'] = 'Име на началната страница'; -$lang['title'] = 'Име на Wiki-то'; -$lang['template'] = 'Шаблон'; -$lang['tagline'] = 'Подзаглавие - изобразява се под името на Wiki страницата (ако се поддържа от шаблона)'; -$lang['sidebar'] = 'Име на страницата за страничната лента (ако се поддържа от шаблона). Ако оставите полето празно лентата ще бъде изключена'; -$lang['license'] = 'Под какъв лиценз да бъде публикувано съдържанието?'; -$lang['fullpath'] = 'Показване на пълния път до страниците в долния колонтитул.'; -$lang['recent'] = 'Скорошни промени'; -$lang['breadcrumbs'] = 'Брой на следите'; -$lang['youarehere'] = 'Йерархични следи'; -$lang['typography'] = 'Замяна на последователност от символи с типографски еквивалент'; -$lang['htmlok'] = 'Разрешаване вграждането на HTML код'; -$lang['phpok'] = 'Разрешаване вграждането на PHP код'; -$lang['dformat'] = 'Формат на датата (виж. <a href="http://www.php.net/strftime">strftime</a> функцията на PHP)'; -$lang['signature'] = 'Подпис'; -$lang['toptoclevel'] = 'Главно ниво (заглавие) за съдържанието'; -$lang['tocminheads'] = 'Минимален брой заглавия, определящ дали да бъде създадено съдържание'; -$lang['maxtoclevel'] = 'Максимален брой нива (заглавия) за включване в съдържанието'; -$lang['maxseclevel'] = 'Максимален брой нива предоставяни за самостоятелно редактиране'; -$lang['camelcase'] = 'Ползване на CamelCase за линкове'; -$lang['deaccent'] = 'Почистване имената на страниците (на файловете)'; -$lang['useheading'] = 'Ползване на първото заглавие за име на страница'; -$lang['refcheck'] = 'Проверка за препратка към медия, преди да бъде изтрита'; -$lang['refshow'] = 'Брой на показваните медийни препратки'; -$lang['allowdebug'] = 'Включване на режи debug - <b>изключете, ако не е нужен!</b>'; -$lang['mediarevisions'] = 'Да се пазят ли стари версии на качените файлове (Mediarevisions)?'; - -$lang['usewordblock'] = 'Блокиране на SPAM въз основа на на списък от думи'; -$lang['indexdelay'] = 'Забавяне преди индексиране (сек)'; -$lang['relnofollow'] = 'Ползване на rel="nofollow" за външни препратки'; -$lang['mailguard'] = 'Промяна на адресите на ел. поща (във форма непозволяваща пращането на SPAM)'; -$lang['iexssprotect'] = 'Проверяване на качените файлове за вероятен зловреден JavaScript и HTML код'; -$lang['showuseras'] = 'Какво да се показва за потребителя, който последно е променил страницата'; - -/* Authentication Options */ -$lang['useacl'] = 'Ползване на списъци за достъп'; -$lang['autopasswd'] = 'Автоматично генериране на пароли, на нови потребители и пращане по пощата'; -$lang['authtype'] = 'Метод за удостоверяване'; -$lang['passcrypt'] = 'Метод за криптиране на паролите'; -$lang['defaultgroup'] = 'Стандартна група'; -$lang['superuser'] = 'Супер потребител - група, потребител или списък със стойности разделени чрез запетая (user1,@group1,user2) с пълен достъп до всички страници и функции без значение от настройките на списъците за достъп (ACL)'; -$lang['manager'] = 'Управител - група, потребител или списък със стойности разделени чрез запетая (user1,@group1,user2) с достъп до определени управленски функции '; -$lang['profileconfirm'] = 'Потвърждаване на промени в профила с парола'; -$lang['disableactions'] = 'Изключване функции на DokuWiki'; -$lang['disableactions_check'] = 'Проверка'; +/* Basic Settings */ +$lang['title'] = 'Заглавие за Wiki-то, тоест името'; +$lang['start'] = 'Име на началната страница'; +$lang['lang'] = 'Език на интерфейса'; +$lang['template'] = 'Шаблон (определя вида на страниците)'; +$lang['tagline'] = 'Подзаглавие - изобразява се под името на Wiki-то (ако се поддържа от шаблона)'; +$lang['sidebar'] = 'Име на страницата за страничната лента (ако се поддържа от шаблона). Оставите ли полето празно лентата ще бъде изключена'; +$lang['license'] = 'Под какъв лиценз да бъде публикувано съдържанието?'; +$lang['savedir'] = 'Директория за записване на данните'; +$lang['basedir'] = 'Главна директория (напр. <code>/dokuwiki/</code>). Оставете празно, за да бъде засечена автоматично.'; +$lang['baseurl'] = 'URL адрес (напр. <code>http://www.yourserver.com</code>). Оставете празно, за да бъде засечен автоматично.'; +$lang['cookiedir'] = 'Път за бисквитките. Оставите ли полето празно ще се ползва горния URL адрес.'; +$lang['dmode'] = 'Режим (права) за създаване на директории'; +$lang['fmode'] = 'Режим (права) за създаване на файлове'; +$lang['allowdebug'] = 'Включване на режи debug - <b>изключете, ако не е нужен!</b>'; + +/* Display Settings */ +$lang['recent'] = 'Скорошни промени - брой еленти на страница'; +$lang['recent_days'] = 'Колко от скорошните промени да се пазят (дни)'; +$lang['breadcrumbs'] = 'Брой на следите. За изключване на функцията задайте 0.'; +$lang['youarehere'] = 'Йерархични следи (в този случай можете да изключите горната опция)'; +$lang['fullpath'] = 'Показване на пълния път до страниците в долния колонтитул.'; +$lang['typography'] = 'Замяна на последователност от символи с типографски еквивалент'; +$lang['dformat'] = 'Формат на датата (виж. <a href="http://www.php.net/strftime">strftime</a> функцията на PHP)'; +$lang['signature'] = 'Подпис - какво да внася бутона "Вмъкване на подпис" от редактора'; +$lang['showuseras'] = 'Какво да се показва за потребителя, който последно е променил дадена страницата'; +$lang['toptoclevel'] = 'Главно ниво (заглавие) за съдържанието'; +$lang['tocminheads'] = 'Минимален брой заглавия, определящ дали да бъде създадено съдържание'; +$lang['maxtoclevel'] = 'Максимален брой нива (заглавия) за включване в съдържанието'; +$lang['maxseclevel'] = 'Максимален брой нива предоставяни за самостоятелно редактиране'; +$lang['camelcase'] = 'Ползване на CamelCase за линкове'; +$lang['deaccent'] = 'Почистване имената на страниците (на файловете)'; +$lang['useheading'] = 'Ползване на първото заглавие за име на страница'; +$lang['sneaky_index'] = 'Стандартно DokuWiki ще показва всички именни пространства в индекса. Опцията скрива тези, за които потребителят няма права за четене. Това може да доведе и до скриване на иначе достъпни подименни пространства. С определени настройки на списъците за контрол на достъпа (ACL) може да направи индекса неизползваем. '; +$lang['hidepages'] = 'Скриване на страниците съвпадащи с този регулярен израз(regular expressions)'; + +/* Authentication Settings */ +$lang['useacl'] = 'Ползване на списъци за достъп'; +$lang['autopasswd'] = 'Автоматично генериране на пароли, на нови потребители и пращане по пощата'; +$lang['authtype'] = 'Метод за удостоверяване'; +$lang['passcrypt'] = 'Метод за криптиране на паролите'; +$lang['defaultgroup']= 'Стандартна група'; +$lang['superuser'] = 'Супер потребител - група, потребител или списък със стойности разделени чрез запетая (user1,@group1,user2) с пълен достъп до всички страници и функции без значение от настройките на списъците за достъп (ACL)'; +$lang['manager'] = 'Управител - група, потребител или списък със стойности разделени чрез запетая (user1,@group1,user2) с достъп до определени управленски функции '; +$lang['profileconfirm'] = 'Потвърждаване на промени в профила с парола'; +$lang['rememberme'] = 'Ползване на постоянни бисквитки за вписване (за функцията "Запомни ме")'; +$lang['disableactions'] = 'Изключване функции на DokuWiki'; +$lang['disableactions_check'] = 'Проверка'; $lang['disableactions_subscription'] = 'Абониране/Отписване'; $lang['disableactions_wikicode'] = 'Преглед на кода/Експортиране на оригинална версия'; -$lang['disableactions_other'] = 'Други действия (разделени със запетая)'; -$lang['sneaky_index'] = 'Стандартно DokuWiki ще показва всички именни пространства в индекса. Опцията скрива тези, за които потребителят няма права за четене. Това може да доведе и до скриване на иначе достъпни подименни пространства. С определени настройки на списъците за контрол на достъпа (ACL) може да направи индекса неизползваем. '; +$lang['disableactions_other'] = 'Други действия (разделени със запетая)'; $lang['auth_security_timeout'] = 'Автоматично проверяване на удостоверяването всеки (сек)'; -$lang['securecookie'] = 'Да се изпращат ли бисквитките зададени чрез HTTPS, само чрез HTTPS от браузъра? Изключете опцията, когато SSL се ползва само за вписване, а четенето е без SSL.'; -$lang['remote'] = 'Включване на системата за отдалечен API достъп. Това ще позволи на приложения да се свързват с DokuWiki чрез XML-RPC или друг механизъм.'; -$lang['remoteuser'] = 'Ограничаване на отдалечения API достъп - активиране само за следните групи и потребители (отделени със запетая). Ако оставите полето празно всеки ще има достъп достъп.'; +$lang['securecookie'] = 'Да се изпращат ли бисквитките зададени чрез HTTPS, само чрез HTTPS от браузъра? Изключете опцията, когато SSL се ползва само за вписване, а четенето е без SSL.'; +$lang['remote'] = 'Включване на системата за отдалечен API достъп. Това ще позволи на приложения да се свързват с DokuWiki чрез XML-RPC или друг механизъм.'; +$lang['remoteuser'] = 'Ограничаване на отдалечения API достъп - активиране само за следните групи и потребители (отделени със запетая). Ако оставите полето празно всеки ще има достъп достъп.'; + +/* Anti-Spam Settings */ +$lang['usewordblock'] = 'Блокиране на SPAM въз основа на на списък от думи'; +$lang['relnofollow'] = 'Ползване на rel="nofollow" за външни препратки'; +$lang['indexdelay'] = 'Забавяне преди индексиране (сек)'; +$lang['mailguard'] = 'Промяна на адресите на ел. поща (във форма непозволяваща пращането на SPAM)'; +$lang['iexssprotect'] = 'Проверяване на качените файлове за вероятен зловреден JavaScript и HTML код'; + +/* Editing Settings */ +$lang['usedraft'] = 'Автоматично запазване на чернова по време на редактиране'; +$lang['htmlok'] = 'Разрешаване вграждането на HTML код'; +$lang['phpok'] = 'Разрешаване вграждането на PHP код'; +$lang['locktime'] = 'Макс. период за съхраняване на заключените файлове (сек)'; +$lang['cachetime'] = 'Макс. период за съхраняване на кеша (сек)'; + +/* Link settings */ +$lang['target____wiki'] = 'Прозорец за вътрешни препратки'; +$lang['target____interwiki'] = 'Прозорец за препратки към други Wiki сайтове'; +$lang['target____extern'] = 'Прозорец за външни препратки'; +$lang['target____media'] = 'Прозорец за медийни препратки'; +$lang['target____windows'] = 'Прозорец за препратки към Windows'; + +/* Media Settings */ +$lang['mediarevisions'] = 'Да се пазят ли стари версии на качените файлове (Mediarevisions)?'; +$lang['refcheck'] = 'Проверка за препратка към медия, преди да бъде изтрита'; +$lang['refshow'] = 'Брой на показваните медийни препратки'; +$lang['gdlib'] = 'Версия на GD Lib'; +$lang['im_convert'] = 'Път до инструмента за трансформация на ImageMagick'; +$lang['jpg_quality'] = 'Качество на JPG компресията (0-100)'; +$lang['fetchsize'] = 'Максимален размер (байтове), който fetch.php може да сваля'; + +/* Notification Settings */ +$lang['subscribers'] = 'Включване на поддръжката за абониране към страници'; +$lang['subscribe_time'] = 'Време след което абонаментните списъци и обобщения се изпращат (сек); Трябва да е по-малко от времето определено в recent_days.'; +$lang['notify'] = 'Пращане на съобщения за промени по страниците на следната eл. поща'; +$lang['registernotify'] = 'Пращане на информация за нови потребители на следната ел. поща'; +$lang['mailfrom'] = 'Ел. поща, която да се ползва за автоматично изпращане на ел. писма'; +$lang['mailprefix'] = 'Представка за темите (поле subject) на автоматично изпращаните ел. писма'; +$lang['htmlmail'] = 'Изпращане на по-добре изглеждащи, но по-големи по-размер HTML ел. писма. Изключете ако желаете писмата да се изпращат като чист текст.'; + +/* Syndication Settings */ +$lang['sitemap'] = 'Генериране на Google sitemap (дни)'; +$lang['rss_type'] = 'Тип на XML емисията'; +$lang['rss_linkto'] = 'XML емисията препраща към'; +$lang['rss_content'] = 'Какво да показват елементите на XML емисията?'; +$lang['rss_update'] = 'Интервал на актуализиране на XML емисията (сек)'; +$lang['rss_show_summary'] = 'Показване на обобщение в заглавието на XML емисията'; +$lang['rss_media'] = 'Кой тип промени да се включват в XML мисията?'; /* Advanced Options */ -$lang['updatecheck'] = 'Проверяване за за нови версии и предупреждения за сигурността? Необходимо е Dokiwiki да може да се свързва със update.dokuwiki.org за тази функционалност.'; -$lang['userewrite'] = 'Ползване на nice URL адреси'; -$lang['useslash'] = 'Ползване на наклонена черта за разделител на именните пространства в URL'; -$lang['usedraft'] = 'Автоматично запазване на чернова по време на редактиране'; -$lang['sepchar'] = 'Разделител между думите в имената на страници'; -$lang['canonical'] = 'Ползване на напълно уеднаквени URL адреси (абсолютни адреси - http://server/path)'; -$lang['fnencode'] = 'Метод за кодиране на не-ASCII именуваните файлове.'; -$lang['autoplural'] = 'Проверяване за множествено число в препратките'; -$lang['compression'] = 'Метод за компресия на attic файлове'; -$lang['cachetime'] = 'Макс. период за съхраняване на кеша (сек)'; -$lang['locktime'] = 'Макс. период за съхраняване на заключените файлове (сек)'; -$lang['fetchsize'] = 'Максимален размер (байтове), който fetch.php може да сваля'; -$lang['notify'] = 'Пращане на съобщения за промени по страниците на следната eл. поща'; -$lang['registernotify'] = 'Пращане на информация за нови потребители на следната ел. поща'; -$lang['mailfrom'] = 'Ел. поща, която да се ползва за автоматично изпращане на ел. писма'; -$lang['mailprefix'] = 'Представка за темите (поле subject) на автоматично изпращаните ел. писма'; -$lang['gzip_output'] = 'Кодиране на съдържанието с gzip за xhtml'; -$lang['gdlib'] = 'Версия на GD Lib'; -$lang['im_convert'] = 'Път до инструмента за трансформация на ImageMagick'; -$lang['jpg_quality'] = 'Качество на JPG компресията (0-100)'; -$lang['subscribers'] = 'Включване на поддръжката за абониране към страници'; -$lang['subscribe_time'] = 'Време след което абонаментните списъци и обобщения се изпращат (сек); Трябва да е по-малко от времето определено в recent_days.'; -$lang['compress'] = 'Компактен CSS и javascript изглед'; -$lang['cssdatauri'] = 'Максимален размер, в байтове, до който изображенията посочени в .CSS файл ще бъдат вграждани в стила (stylesheet), за да се намали броя на HTTP заявките. Техниката не работи за версиите на IE преди 8! Препоръчителни стойности: <code>400</code> до <code>600</code> байта. Въведете <code>0</code> за изключване.'; -$lang['hidepages'] = 'Скриване на съвпадащите страници (regular expressions)'; -$lang['send404'] = 'Пращане на "HTTP 404/Page Not Found" за несъществуващи страници'; -$lang['sitemap'] = 'Генериране на Google sitemap (дни)'; -$lang['broken_iua'] = 'Отметнете, ако ignore_user_abort функцията не работи. Може да попречи на търсенето в страниците. Знае се, че комбинацията IIS+PHP/CGI е лоша. Вижте <a href="http://bugs.splitbrain.org/?do=details&task_id=852">Грешка 852</a> за повече информация.'; -$lang['xsendfile'] = 'Ползване на Х-Sendfile header, за да може уебсървъра да дава статични файлове? Вашият уебсървър трябва да го поддържа.'; -$lang['renderer_xhtml'] = 'Представяне на основните изходни данни (xhtml) от Wiki-то с'; -$lang['renderer__core'] = '%s (ядрото на DokuWiki)'; -$lang['renderer__plugin'] = '%s (приставка)'; -$lang['rememberme'] = 'Ползване на постоянни бисквитки за вписване (за функцията "Запомни ме")'; - -$lang['rss_type'] = 'Тип на XML емисията'; -$lang['rss_linkto'] = 'XML емисията препраща към'; -$lang['rss_content'] = 'Какво да показват елементите на XML емисията?'; -$lang['rss_update'] = 'Интервал на актуализиране на XML емисията (сек)'; -$lang['recent_days'] = 'Колко от скорошните промени да се пазят (дни)'; -$lang['rss_show_summary'] = 'Показване на обобщение в заглавието на XML емисията'; -$lang['rss_media'] = 'Кой тип промени да се включват в XML мисията?'; - -/* Target options */ -$lang['target____wiki'] = 'Прозорец за вътрешни препратки'; -$lang['target____interwiki'] = 'Прозорец за препратки към други Wiki сайтове'; -$lang['target____extern'] = 'Прозорец за външни препратки'; -$lang['target____media'] = 'Прозорец за медийни препратки'; -$lang['target____windows'] = 'Прозорец за препратки към Windows'; +$lang['updatecheck'] = 'Проверяване за за нови версии и предупреждения за сигурността? Необходимо е Dokiwiki да може да се свързва със update.dokuwiki.org за тази функционалност.'; +$lang['userewrite'] = 'Ползване на nice URL адреси'; +$lang['useslash'] = 'Ползване на наклонена черта за разделител на именните пространства в URL'; +$lang['sepchar'] = 'Разделител между думите в имената на страници'; +$lang['canonical'] = 'Ползване на напълно уеднаквени URL адреси (абсолютни адреси - http://server/path)'; +$lang['fnencode'] = 'Метод за кодиране на не-ASCII именуваните файлове.'; +$lang['autoplural'] = 'Проверяване за множествено число в препратките'; +$lang['compression'] = 'Метод за компресия на attic файлове'; +$lang['gzip_output'] = 'Кодиране на съдържанието с gzip за xhtml'; +$lang['compress'] = 'Компактен CSS и javascript изглед'; +$lang['cssdatauri'] = 'Максимален размер, в байтове, до който изображенията посочени в .CSS файл ще бъдат вграждани в стила (stylesheet), за да се намали броя на HTTP заявките. Техниката не работи за версиите на IE преди 8! Препоръчителни стойности: <code>400</code> до <code>600</code> байта. Въведете <code>0</code> за изключване.'; +$lang['send404'] = 'Пращане на "HTTP 404/Page Not Found" за несъществуващи страници'; +$lang['broken_iua'] = 'Отметнете, ако ignore_user_abort функцията не работи. Може да попречи на търсенето в страниците. Знае се, че комбинацията IIS+PHP/CGI е лоша. Вижте <a href="http://bugs.splitbrain.org/?do=details&task_id=852">Грешка 852</a> за повече информация.'; +$lang['xsendfile'] = 'Ползване на Х-Sendfile header, за да може уебсървъра да дава статични файлове? Вашият уебсървър трябва да го поддържа.'; +$lang['renderer_xhtml'] = 'Представяне на основните изходни данни (xhtml) от Wiki-то с'; +$lang['renderer__core'] = '%s (ядрото на DokuWiki)'; +$lang['renderer__plugin'] = '%s (приставка)'; + +/* Network Options */ +$lang['dnslookups'] = 'DokuWiki ще търси имената на хостовете, на отдалечени IP адреси, от които потребители редактират страници. НЕ е желателно да ползвате опцията ако имате бавен или неработещ DNS сървър.'; /* Proxy Options */ -$lang['proxy____host'] = 'Име на прокси сървър'; -$lang['proxy____port'] = 'Порт за проксито'; -$lang['proxy____user'] = 'Потребител за проксито'; -$lang['proxy____pass'] = 'Парола за проксито'; -$lang['proxy____ssl'] = 'Ползване на SSL при свързване с проксито'; -$lang['proxy____except'] = 'Регулярен израз определящ за кои URL адреси да не се ползва прокси сървър.'; +$lang['proxy____host'] = 'Име на прокси сървър'; +$lang['proxy____port'] = 'Порт за проксито'; +$lang['proxy____user'] = 'Потребител за проксито'; +$lang['proxy____pass'] = 'Парола за проксито'; +$lang['proxy____ssl'] = 'Ползване на SSL при свързване с проксито'; +$lang['proxy____except'] = 'Регулярен израз определящ за кои URL адреси да не се ползва прокси сървър.'; /* Safemode Hack */ -$lang['safemodehack'] = 'Ползване на хака safemode'; -$lang['ftp____host'] = 'FTP сървър за хака safemode'; -$lang['ftp____port'] = 'FTP порт за хака safemode'; -$lang['ftp____user'] = 'FTP потребител за хака safemode'; -$lang['ftp____pass'] = 'FTP парола за хака safemode'; -$lang['ftp____root'] = 'FTP главна директория за хака safemode'; +$lang['safemodehack'] = 'Ползване на хака safemode'; +$lang['ftp____host'] = 'FTP сървър за хака safemode'; +$lang['ftp____port'] = 'FTP порт за хака safemode'; +$lang['ftp____user'] = 'FTP потребител за хака safemode'; +$lang['ftp____pass'] = 'FTP парола за хака safemode'; +$lang['ftp____root'] = 'FTP главна директория за хака safemode'; -$lang['license_o_'] = 'Нищо не е избрано'; +/* License Options */ +$lang['license_o_'] = 'Нищо не е избрано'; /* typography options */ -$lang['typography_o_0'] = 'без'; -$lang['typography_o_1'] = 'с изключение на единични кавички'; -$lang['typography_o_2'] = 'включително единични кавички (не винаги работи)'; +$lang['typography_o_0'] = 'без'; +$lang['typography_o_1'] = 'с изключение на единични кавички'; +$lang['typography_o_2'] = 'включително единични кавички (не винаги работи)'; /* userewrite options */ -$lang['userewrite_o_0'] = 'без'; -$lang['userewrite_o_1'] = 'файлът .htaccess'; -$lang['userewrite_o_2'] = 'вътрешно от DokuWiki '; +$lang['userewrite_o_0'] = 'без'; +$lang['userewrite_o_1'] = 'файлът .htaccess'; +$lang['userewrite_o_2'] = 'вътрешно от DokuWiki '; /* deaccent options */ -$lang['deaccent_o_0'] = 'изключено'; -$lang['deaccent_o_1'] = 'премахване на акценти'; -$lang['deaccent_o_2'] = 'транслитерация'; +$lang['deaccent_o_0'] = 'изключено'; +$lang['deaccent_o_1'] = 'премахване на акценти'; +$lang['deaccent_o_2'] = 'транслитерация'; /* gdlib options */ -$lang['gdlib_o_0'] = 'GD Lib не е достъпна'; -$lang['gdlib_o_1'] = 'Версия 1.x'; -$lang['gdlib_o_2'] = 'Автоматично разпознаване'; +$lang['gdlib_o_0'] = 'GD Lib не е достъпна'; +$lang['gdlib_o_1'] = 'Версия 1.x'; +$lang['gdlib_o_2'] = 'Автоматично разпознаване'; /* rss_type options */ -$lang['rss_type_o_rss'] = 'RSS версия 0.91'; -$lang['rss_type_o_rss1'] = 'RSS версия 1.0'; -$lang['rss_type_o_rss2'] = 'RSS версия 2.0'; -$lang['rss_type_o_atom'] = 'Atom версия 0.3'; -$lang['rss_type_o_atom1'] = 'Atom версия 1.0'; +$lang['rss_type_o_rss'] = 'RSS версия 0.91'; +$lang['rss_type_o_rss1'] = 'RSS версия 1.0'; +$lang['rss_type_o_rss2'] = 'RSS версия 2.0'; +$lang['rss_type_o_atom'] = 'Atom версия 0.3'; +$lang['rss_type_o_atom1'] = 'Atom версия 1.0'; /* rss_content options */ $lang['rss_content_o_abstract'] = 'Извлечение'; -$lang['rss_content_o_diff'] = 'Обединени разлики'; +$lang['rss_content_o_diff'] = 'Обединени разлики'; $lang['rss_content_o_htmldiff'] = 'Таблица с разликите в HTML формат'; -$lang['rss_content_o_html'] = 'Цялото съдържание на HTML страницата'; +$lang['rss_content_o_html'] = 'Цялото съдържание на HTML страницата'; /* rss_linkto options */ $lang['rss_linkto_o_diff'] = 'изглед на разликите'; @@ -222,26 +241,26 @@ $lang['rss_linkto_o_rev'] = 'списък на версиите'; $lang['rss_linkto_o_current'] = 'текущата страница'; /* compression options */ -$lang['compression_o_0'] = 'без'; -$lang['compression_o_gz'] = 'gzip'; -$lang['compression_o_bz2'] = 'bz2'; +$lang['compression_o_0'] = 'без'; +$lang['compression_o_gz'] = 'gzip'; +$lang['compression_o_bz2'] = 'bz2'; /* xsendfile header */ -$lang['xsendfile_o_0'] = 'не използвайте'; -$lang['xsendfile_o_1'] = 'Специфичен lighttpd header (преди версия 1.5)'; -$lang['xsendfile_o_2'] = 'Стандартен X-Sendfile header'; -$lang['xsendfile_o_3'] = 'Специфичен Nginx X-Accel-Redirect header за пренасочване'; +$lang['xsendfile_o_0'] = 'без'; +$lang['xsendfile_o_1'] = 'Специфичен lighttpd header (преди версия 1.5)'; +$lang['xsendfile_o_2'] = 'Стандартен X-Sendfile header'; +$lang['xsendfile_o_3'] = 'Специфичен Nginx X-Accel-Redirect header за пренасочване'; /* Display user info */ -$lang['showuseras_o_loginname'] = 'Име за вписване'; -$lang['showuseras_o_username'] = 'Пълно потребителско име'; -$lang['showuseras_o_email'] = 'Ел, поща (променени според настройките на mailguard)'; +$lang['showuseras_o_loginname'] = 'Име за вписване'; +$lang['showuseras_o_username'] = 'Пълно потребителско име'; +$lang['showuseras_o_email'] = 'Ел, поща (променени според настройките на mailguard)'; $lang['showuseras_o_email_link'] = 'Ел. поща под формата на връзка тип mailto:'; /* useheading options */ -$lang['useheading_o_0'] = 'Никога'; +$lang['useheading_o_0'] = 'Никога'; $lang['useheading_o_navigation'] = 'Само за навигация'; -$lang['useheading_o_content'] = 'Само за съдържанието на Wiki-то'; -$lang['useheading_o_1'] = 'Винаги'; +$lang['useheading_o_content'] = 'Само за съдържанието на Wiki-то'; +$lang['useheading_o_1'] = 'Винаги'; -$lang['readdircache'] = 'Максимален период за съхраняване кеша на readdir (сек)'; +$lang['readdircache'] = 'Максимален период за съхраняване кеша на readdir (сек)'; diff --git a/lib/plugins/config/lang/no/lang.php b/lib/plugins/config/lang/no/lang.php index ec97fe966..b01637dd1 100644 --- a/lib/plugins/config/lang/no/lang.php +++ b/lib/plugins/config/lang/no/lang.php @@ -43,8 +43,8 @@ $lang['_links'] = 'Innstillinger for lenker'; $lang['_media'] = 'Innstillinger for mediafiler'; $lang['_advanced'] = 'Avanserte innstillinger'; $lang['_network'] = 'Nettverksinnstillinger'; -$lang['_plugin_sufix'] = '– innstillinger for tillegg'; -$lang['_template_sufix'] = '– innstillinger for mal'; +$lang['_plugin_sufix'] = '– innstillinger for tillegg'; +$lang['_template_sufix'] = '– innstillinger for mal'; $lang['_msg_setting_undefined'] = 'Ingen innstillingsmetadata'; $lang['_msg_setting_no_class'] = 'Ingen innstillingsklasse'; $lang['_msg_setting_no_default'] = 'Ingen standard verdi'; diff --git a/lib/plugins/config/settings/config.class.php b/lib/plugins/config/settings/config.class.php index 1cdab607f..a1430016e 100644 --- a/lib/plugins/config/settings/config.class.php +++ b/lib/plugins/config/settings/config.class.php @@ -452,8 +452,8 @@ if (!class_exists('setting')) { function _out_key($pretty=false,$url=false) { if($pretty){ - $out = str_replace(CM_KEYMARKER,"»",$this->_key); - if ($url && !strstr($out,'»')) {//provide no urls for plugins, etc. + $out = str_replace(CM_KEYMARKER,"»",$this->_key); + if ($url && !strstr($out,'»')) {//provide no urls for plugins, etc. if ($out == 'start') //one exception return '<a href="http://www.dokuwiki.org/config:startpage">'.$out.'</a>'; else diff --git a/lib/plugins/revert/admin.php b/lib/plugins/revert/admin.php index 2aaf1395f..ff5fa69ba 100644 --- a/lib/plugins/revert/admin.php +++ b/lib/plugins/revert/admin.php @@ -159,7 +159,7 @@ class admin_plugin_revert extends DokuWiki_Admin_Plugin { echo '</a> '; echo html_wikilink(':'.$recent['id'],(useHeading('navigation'))?NULL:$recent['id']); - echo ' – '.htmlspecialchars($recent['sum']); + echo ' – '.htmlspecialchars($recent['sum']); echo ' <span class="user">'; echo $recent['user'].' '.$recent['ip']; diff --git a/lib/plugins/usermanager/admin.php b/lib/plugins/usermanager/admin.php index 8b646b426..2bb0a863d 100644 --- a/lib/plugins/usermanager/admin.php +++ b/lib/plugins/usermanager/admin.php @@ -153,7 +153,7 @@ class admin_plugin_usermanager extends DokuWiki_Admin_Plugin { ptln(" <table class=\"inline\">"); ptln(" <thead>"); ptln(" <tr>"); - ptln(" <th> </th><th>".$this->lang["user_id"]."</th><th>".$this->lang["user_name"]."</th><th>".$this->lang["user_mail"]."</th><th>".$this->lang["user_groups"]."</th>"); + ptln(" <th> </th><th>".$this->lang["user_id"]."</th><th>".$this->lang["user_name"]."</th><th>".$this->lang["user_mail"]."</th><th>".$this->lang["user_groups"]."</th>"); ptln(" </tr>"); ptln(" <tr>"); diff --git a/lib/scripts/page.js b/lib/scripts/page.js index 78943be7a..74aca9c06 100644 --- a/lib/scripts/page.js +++ b/lib/scripts/page.js @@ -119,7 +119,7 @@ dw_page = { $handle.addClass('closed'); $handle.removeClass('open'); }else{ - $clicky.html('<span>−</span>'); + $clicky.html('<span>−</span>'); $handle.addClass('open'); $handle.removeClass('closed'); } @@ -130,7 +130,7 @@ dw_page = { if(!state) state = 1; // Assert that content instantly takes the whole space - $content.css('height', $content.height()).show(); + $content.css('min-height', $content.height()).show(); // stop any running animation $child.stop(true, true); diff --git a/lib/tpl/default/main.php b/lib/tpl/default/main.php index 3e85c58f2..9a14f29a2 100644 --- a/lib/tpl/default/main.php +++ b/lib/tpl/default/main.php @@ -61,7 +61,7 @@ if (!defined('DOKU_INC')) die(); <div class="bar-right" id="bar__topright"> <?php tpl_button('recent')?> - <?php tpl_searchform()?> + <?php tpl_searchform()?>  </div> <div class="clearer"></div> @@ -121,7 +121,7 @@ if (!defined('DOKU_INC')) die(); <?php tpl_button('profile')?> <?php tpl_button('login')?> <?php tpl_button('index')?> - <?php tpl_button('top')?> + <?php tpl_button('top')?>  </div> <div class="clearer"></div> </div> diff --git a/lib/tpl/dokuwiki/css/_links.css b/lib/tpl/dokuwiki/css/_links.css index c8f5b7c9e..22502f6a9 100644 --- a/lib/tpl/dokuwiki/css/_links.css +++ b/lib/tpl/dokuwiki/css/_links.css @@ -39,12 +39,11 @@ .dokuwiki a.interwiki { background-repeat: no-repeat; background-position: 0 center; - padding: 0 0 0 20px; + padding: 0 0 0 18px; } /* external link */ .dokuwiki a.urlextern { background-image: url(images/external-link.png); - padding: 0 0 0 17px; } /* windows share */ .dokuwiki a.windows { @@ -61,7 +60,6 @@ } /* interwiki link */ .dokuwiki a.interwiki { - padding: 0 0 0 17px; } /* RTL corrections; if link icons don't work as expected, remove the following lines */ @@ -71,5 +69,5 @@ [dir=rtl] .dokuwiki a.interwiki, [dir=rtl] .dokuwiki a.mediafile { background-position: right center; - padding: 0 17px 0 0; + padding: 0 18px 0 0; } diff --git a/lib/tpl/dokuwiki/css/basic.css b/lib/tpl/dokuwiki/css/basic.css index eb659f12e..21bc9b25e 100644 --- a/lib/tpl/dokuwiki/css/basic.css +++ b/lib/tpl/dokuwiki/css/basic.css @@ -45,7 +45,7 @@ legend { h1 { font-size: 2em; - margin: -.222em 0 0.444em; + margin: 0 0 0.444em; } h2 { font-size: 1.5em; diff --git a/lib/tpl/dokuwiki/css/design.css b/lib/tpl/dokuwiki/css/design.css index 4f18b79e8..d1a00ce0a 100644 --- a/lib/tpl/dokuwiki/css/design.css +++ b/lib/tpl/dokuwiki/css/design.css @@ -340,7 +340,7 @@ border: 1px solid #eee; box-shadow: 0 0 .5em #999; border-radius: 2px; - padding: 2em; + padding: 1.556em 2em 2em; margin-bottom: .5em; overflow: hidden; word-wrap: break-word; @@ -426,21 +426,31 @@ .dokuwiki div.preview { margin: 0 -2em; - padding: 2em; + padding: 0 2em; +} +.dokuwiki.hasSidebar div.preview { + border-right: __sidebar_width__ solid __background_alt__; +} +[dir=rtl] .dokuwiki.hasSidebar div.preview { + border-right-width: 0; + border-left: __sidebar_width__ solid __background_alt__; +} +.dokuwiki div.preview div.pad { + padding: 1.556em 0 2em; } /*____________ changes to _toc ____________*/ #dw__toc { - margin: -2em -2em .5em 1.4em; + margin: -1.556em -2em .5em 1.4em; width: __sidebar_width__; border-left: 1px solid __border__; background: __background__; color: inherit; } [dir=rtl] #dw__toc { - margin: -2em 1.4em .5em -2em; + margin: -1.556em 1.4em .5em -2em; border-left-width: 0; border-right: 1px solid __border__; } diff --git a/lib/tpl/dokuwiki/css/mobile.css b/lib/tpl/dokuwiki/css/mobile.css index 4d18113ac..5a72ed095 100644 --- a/lib/tpl/dokuwiki/css/mobile.css +++ b/lib/tpl/dokuwiki/css/mobile.css @@ -28,17 +28,17 @@ margin-bottom: .5em; } -.hasSidebar #dokuwiki__content { +.showSidebar #dokuwiki__content { float: none; margin-left: 0; width: 100%; } -.hasSidebar #dokuwiki__content > .pad { +.showSidebar #dokuwiki__content > .pad { margin-left: 0; } -[dir=rtl] .hasSidebar #dokuwiki__content, -[dir=rtl] .hasSidebar #dokuwiki__content > .pad { +[dir=rtl] .showSidebar #dokuwiki__content, +[dir=rtl] .showSidebar #dokuwiki__content > .pad { margin-right: 0; } diff --git a/lib/tpl/dokuwiki/css/structure.css b/lib/tpl/dokuwiki/css/structure.css index 5e2eab3bc..00642e90b 100644 --- a/lib/tpl/dokuwiki/css/structure.css +++ b/lib/tpl/dokuwiki/css/structure.css @@ -56,20 +56,20 @@ body { margin: 0 0 0 1.5em; } - .hasSidebar #dokuwiki__content { + .showSidebar #dokuwiki__content { float: right; margin-left: -__sidebar_width__; width: 100%; } - [dir=rtl] .hasSidebar #dokuwiki__content { + [dir=rtl] .showSidebar #dokuwiki__content { float: left; margin-left: 0; margin-right: -__sidebar_width__; } - .hasSidebar #dokuwiki__content > .pad { + .showSidebar #dokuwiki__content > .pad { margin-left: __sidebar_width__; } - [dir=rtl] .hasSidebar #dokuwiki__content > .pad { + [dir=rtl] .showSidebar #dokuwiki__content > .pad { margin-left: 0; margin-right: __sidebar_width__; } diff --git a/lib/tpl/dokuwiki/detail.php b/lib/tpl/dokuwiki/detail.php index a3516a7ed..bb64b42cb 100644 --- a/lib/tpl/dokuwiki/detail.php +++ b/lib/tpl/dokuwiki/detail.php @@ -10,11 +10,8 @@ // must be run from within DokuWiki if (!defined('DOKU_INC')) die(); -$showSidebar = $conf['sidebar'] && page_exists($conf['sidebar']) && ($ACT=='show'); -?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php echo $conf['lang']?>" - lang="<?php echo $conf['lang']?>" dir="<?php echo $lang['direction'] ?>"> +?><!DOCTYPE html> +<html lang="<?php echo $conf['lang']?>" dir="<?php echo $lang['direction'] ?>" class="no-js"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" /><![endif]--> @@ -22,6 +19,7 @@ $showSidebar = $conf['sidebar'] && page_exists($conf['sidebar']) && ($ACT=='show <?php echo hsc(tpl_img_getTag('IPTC.Headline',$IMG))?> [<?php echo strip_tags($conf['title'])?>] </title> + <script>(function(H){H.className=H.className.replace(/\bno-js\b/,'js')})(document.documentElement)</script> <?php tpl_metaheaders()?> <meta name="viewport" content="width=device-width,initial-scale=1" /> <?php echo tpl_favicon(array('favicon', 'mobile')) ?> @@ -31,7 +29,7 @@ $showSidebar = $conf['sidebar'] && page_exists($conf['sidebar']) && ($ACT=='show <body> <!--[if lte IE 7 ]><div id="IE7"><![endif]--><!--[if IE 8 ]><div id="IE8"><![endif]--> <div id="dokuwiki__site"><div id="dokuwiki__top" - class="dokuwiki site mode_<?php echo $ACT ?> <?php echo ($showSidebar) ? 'hasSidebar' : ''; ?>"> + class="dokuwiki site mode_<?php echo $ACT ?>"> <?php include('tpl_header.php') ?> diff --git a/lib/tpl/dokuwiki/images/email.png b/lib/tpl/dokuwiki/images/email.png Binary files differindex 5128be895..d1d4a5fd5 100644 --- a/lib/tpl/dokuwiki/images/email.png +++ b/lib/tpl/dokuwiki/images/email.png diff --git a/lib/tpl/dokuwiki/images/external-link.png b/lib/tpl/dokuwiki/images/external-link.png Binary files differindex 084135f95..a4d5de17c 100644 --- a/lib/tpl/dokuwiki/images/external-link.png +++ b/lib/tpl/dokuwiki/images/external-link.png diff --git a/lib/tpl/dokuwiki/images/unc.png b/lib/tpl/dokuwiki/images/unc.png Binary files differindex f2aca8815..a552d6e6f 100644 --- a/lib/tpl/dokuwiki/images/unc.png +++ b/lib/tpl/dokuwiki/images/unc.png diff --git a/lib/tpl/dokuwiki/main.php b/lib/tpl/dokuwiki/main.php index d8e85850f..563d9c949 100644 --- a/lib/tpl/dokuwiki/main.php +++ b/lib/tpl/dokuwiki/main.php @@ -10,15 +10,15 @@ if (!defined('DOKU_INC')) die(); /* must be run from within DokuWiki */ -$showSidebar = $conf['sidebar'] && page_exists($conf['sidebar']) && ($ACT=='show'); -?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php echo $conf['lang'] ?>" - lang="<?php echo $conf['lang'] ?>" dir="<?php echo $lang['direction'] ?>"> +$hasSidebar = page_findnearest($conf['sidebar']); +$showSidebar = $hasSidebar && ($ACT=='show'); +?><!DOCTYPE html> +<html lang="<?php echo $conf['lang'] ?>" dir="<?php echo $lang['direction'] ?>" class="no-js"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" /><![endif]--> <title><?php tpl_pagetitle() ?> [<?php echo strip_tags($conf['title']) ?>]</title> + <script>(function(H){H.className=H.className.replace(/\bno-js\b/,'js')})(document.documentElement)</script> <?php tpl_metaheaders() ?> <meta name="viewport" content="width=device-width,initial-scale=1" /> <?php echo tpl_favicon(array('favicon', 'mobile')) ?> @@ -28,7 +28,8 @@ $showSidebar = $conf['sidebar'] && page_exists($conf['sidebar']) && ($ACT=='show <body> <!--[if lte IE 7 ]><div id="IE7"><![endif]--><!--[if IE 8 ]><div id="IE8"><![endif]--> <div id="dokuwiki__site"><div id="dokuwiki__top" - class="dokuwiki site mode_<?php echo $ACT ?> <?php echo ($showSidebar) ? 'hasSidebar' : ''; ?>"> + class="dokuwiki site mode_<?php echo $ACT ?> <?php echo ($showSidebar) ? 'showSidebar' : ''; + ?> <?php echo ($hasSidebar) ? 'hasSidebar' : ''; ?>"> <?php include('tpl_header.php') ?> @@ -41,7 +42,7 @@ $showSidebar = $conf['sidebar'] && page_exists($conf['sidebar']) && ($ACT=='show <div class="content"> <?php tpl_flush() ?> <?php tpl_includeFile('sidebarheader.html') ?> - <?php tpl_include_page($conf['sidebar']) ?> + <?php tpl_sidebar() ?> <?php tpl_includeFile('sidebarfooter.html') ?> </div> </div></div><!-- /aside --> diff --git a/lib/tpl/dokuwiki/mediamanager.php b/lib/tpl/dokuwiki/mediamanager.php index 1f3b9661b..4919632c9 100644 --- a/lib/tpl/dokuwiki/mediamanager.php +++ b/lib/tpl/dokuwiki/mediamanager.php @@ -8,10 +8,8 @@ // must be run from within DokuWiki if (!defined('DOKU_INC')) die(); -?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php echo $conf['lang']?>" - lang="<?php echo $conf['lang']?>" dir="<?php echo $lang['direction'] ?>" class="popup"> +?><!DOCTYPE html> +<html lang="<?php echo $conf['lang']?>" dir="<?php echo $lang['direction'] ?>" class="popup no-js"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" /><![endif]--> @@ -19,6 +17,7 @@ if (!defined('DOKU_INC')) die(); <?php echo hsc($lang['mediaselect'])?> [<?php echo strip_tags($conf['title'])?>] </title> + <script>(function(H){H.className=H.className.replace(/\bno-js\b/,'js')})(document.documentElement)</script> <?php tpl_metaheaders()?> <meta name="viewport" content="width=device-width,initial-scale=1" /> <?php echo tpl_favicon(array('favicon', 'mobile')) ?> diff --git a/lib/tpl/dokuwiki/script.js b/lib/tpl/dokuwiki/script.js index 677e2f53b..d858bda89 100644 --- a/lib/tpl/dokuwiki/script.js +++ b/lib/tpl/dokuwiki/script.js @@ -7,7 +7,7 @@ * - tablet 481 - 979 (ostensibly for tablets in portrait mode) * - phone <= 480 */ -var device_class = 'not yet known'; +var device_class = ''; // not yet known var device_classes = 'desktop mobile tablet phone'; function tpl_dokuwiki_mobile(){ @@ -67,9 +67,9 @@ jQuery(function(){ ); // increase sidebar length to match content (desktop mode only) - var $sb = jQuery('.desktop #dokuwiki__aside'); - if($sb.length) { - var $ct = jQuery('#dokuwiki__content div.page'); - if($sb.height() > $ct.height()) $ct.height($sb.height()); + var $sidebar = jQuery('.desktop #dokuwiki__aside'); + if($sidebar.length) { + var $content = jQuery('#dokuwiki__content div.page'); + $content.css('min-height', $sidebar.height()); } }); diff --git a/lib/tpl/index.php b/lib/tpl/index.php index 0273e5678..4570f70f5 100644 --- a/lib/tpl/index.php +++ b/lib/tpl/index.php @@ -54,7 +54,7 @@ if ($ini) { echo '<td>'.htmlspecialchars($val).'</td>'; echo '<td>'; if(preg_match('/^#[0-f]{3,6}$/i',$val)){ - echo '<div class="color" style="background-color:'.$val.';"> </div>'; + echo '<div class="color" style="background-color:'.$val.';"> </div>'; } echo '</td>'; echo '</tr>'; |