From 60a396c8ac50f17c2e3f43a9533af86cf6976976 Mon Sep 17 00:00:00 2001 From: Gerrit Uitslag Date: Tue, 4 Feb 2014 00:34:12 +0100 Subject: wrap userlink building with event. Implements an event which can modify the link below usernames, and the displayed user name. When no name supplied, the name of currently logged-in user is used. --- inc/common.php | 109 +++++++++++++++++++++++++++++++++++++++++++------------ inc/template.php | 3 +- 2 files changed, 86 insertions(+), 26 deletions(-) diff --git a/inc/common.php b/inc/common.php index 32771285b..053776a41 100644 --- a/inc/common.php +++ b/inc/common.php @@ -1418,34 +1418,95 @@ function shorten($keep, $short, $max, $min = 9, $char = '…') { * @author Andy Webber */ function editorinfo($username) { - global $conf; + return userinfo($username); +} + +/** + * Returns users realname w/o link + * + * @param string|bool $username or false when currently logged-in user should be used + * @return string html of formatted user name + * + * @triggers COMMON_USER_LINK + */ +function userinfo($username = false) { + global $conf, $INFO; + /** @var DokuWiki_Auth_Plugin $auth */ global $auth; - switch($conf['showuseras']) { - case 'username': - case 'email': - case 'email_link': - if($auth) $info = $auth->getUserData($username); - break; - default: - return hsc($username); - } - - if(isset($info) && $info) { - switch($conf['showuseras']) { - case 'username': - return hsc($info['name']); - case 'email': - return obfuscate($info['mail']); - case 'email_link': - $mail = obfuscate($info['mail']); - return ''.$mail.''; - default: - return hsc($username); + // prepare initial event data + $data = array( + 'username' => $username, // the unique user name + 'name' => '', + 'link' => array( //setting 'link' to false disables linking + 'target' => '', + 'pre' => '', + 'suf' => '', + 'style' => '', + 'more' => '', + 'url' => '', + 'title' => '', + 'class' => '' + ), + 'userinfo' => '' + ); + if($username === false) { + $data['username'] = $_SERVER['REMOTE_USER']; + $data['name'] = ''.hsc($INFO['userinfo']['name']).' ('.hsc($_SERVER['REMOTE_USER']).')'; + } + + $evt = new Doku_Event('COMMON_USER_LINK', $data); + if($evt->advise_before(true)) { + if(empty($data['name'])) { + if($conf['showuseras'] == 'loginname') { + $data['name'] = hsc($data['username']); + } else { + if($auth) $info = $auth->getUserData($username); + if(isset($info) && $info) { + switch($conf['showuseras']) { + case 'username': + $data['name'] = hsc($info['name']); + break; + case 'email': + case 'email_link': + $data['name'] = obfuscate($info['mail']); + break; + } + } + } + } + if($data['link'] !== false && empty($data['link']['url'])){ + if($conf['showuseras'] == 'email_link') { + if(!isset($info)) { + if($auth) $info = $auth->getUserData($username); + } + if(isset($info) && $info) { + $data['link']['url'] = 'mailto:'.obfuscate($info['mail']); + } else { + $data['link'] = false; + } + + } else { + $data['link'] = false; + } + } + + if($data['link'] === false) { + $data['userinfo'] = $data['name']; + } else{ + $data['link']['name'] = $data['name']; + /** @var Doku_Renderer_xhtml $xhtml_renderer */ + static $xhtml_renderer = null; + if(is_null($xhtml_renderer)){ + $xhtml_renderer = p_get_renderer('xhtml'); + } + $data['userinfo'] = $xhtml_renderer->_formatLink($data['link']); } - } else { - return hsc($username); } + $evt->advise_after(); + unset($evt); + + return $data['userinfo']; } /** diff --git a/inc/template.php b/inc/template.php index 0a6a9e4aa..ba7279636 100644 --- a/inc/template.php +++ b/inc/template.php @@ -885,9 +885,8 @@ function tpl_youarehere($sep = ' » ') { */ function tpl_userinfo() { global $lang; - global $INFO; if(isset($_SERVER['REMOTE_USER'])) { - print $lang['loggedinas'].': '.hsc($INFO['userinfo']['name']).' ('.hsc($_SERVER['REMOTE_USER']).')'; + print $lang['loggedinas'].': '.userinfo(); return true; } return false; -- cgit v1.2.3 From 8a7e0ee6403bb358edf90c2419af066dd79cb2ce Mon Sep 17 00:00:00 2001 From: Gerrit Uitslag Date: Tue, 4 Feb 2014 00:59:45 +0100 Subject: update $username as well, when read from _SERVER --- inc/common.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inc/common.php b/inc/common.php index 053776a41..297c36355 100644 --- a/inc/common.php +++ b/inc/common.php @@ -1451,7 +1451,7 @@ function userinfo($username = false) { 'userinfo' => '' ); if($username === false) { - $data['username'] = $_SERVER['REMOTE_USER']; + $data['username'] = $username = $_SERVER['REMOTE_USER']; $data['name'] = ''.hsc($INFO['userinfo']['name']).' ('.hsc($_SERVER['REMOTE_USER']).')'; } -- cgit v1.2.3 From 741b8a48682890ee68e3f650510fec9a4d47d5b0 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Fri, 14 Feb 2014 13:57:50 +0100 Subject: Show a domain dropdown when multiple AD domains are configured This integrates the functionality of the now outdated addomain plugin directly into the authad plugin and makes multi-domain setups usable without SSO. See also https://github.com/cosmocode/dokuwiki-plugin-addomain --- lib/plugins/authad/action.php | 91 ++++++++++++++++++++++++++++++++++++++ lib/plugins/authad/auth.php | 25 +++++++++++ lib/plugins/authad/plugin.info.txt | 2 +- 3 files changed, 117 insertions(+), 1 deletion(-) diff --git a/lib/plugins/authad/action.php b/lib/plugins/authad/action.php index e69de29bb..97be9897e 100644 --- a/lib/plugins/authad/action.php +++ b/lib/plugins/authad/action.php @@ -0,0 +1,91 @@ + + */ + +// must be run within Dokuwiki +if(!defined('DOKU_INC')) die(); + +/** + * Class action_plugin_addomain + */ +class action_plugin_authad extends DokuWiki_Action_Plugin { + + /** + * Registers a callback function for a given event + */ + public function register(Doku_Event_Handler &$controller) { + + $controller->register_hook('AUTH_LOGIN_CHECK', 'BEFORE', $this, 'handle_auth_login_check'); + $controller->register_hook('HTML_LOGINFORM_OUTPUT', 'BEFORE', $this, 'handle_html_loginform_output'); + + } + + /** + * Adds the selected domain as user postfix when attempting a login + * + * @param Doku_Event $event + * @param array $param + */ + public function handle_auth_login_check(Doku_Event &$event, $param) { + global $INPUT; + + /** @var auth_plugin_authad $auth */ + global $auth; + if(!is_a($auth, 'auth_plugin_authad')) return; // AD not even used + + if($INPUT->str('dom')) { + $usr = $auth->cleanUser($event->data['user']); + $dom = $auth->_userDomain($usr); + if(!$dom) { + $usr = "$usr@".$INPUT->str('dom'); + } + $INPUT->post->set('u', $usr); + $event->data['user'] = $usr; + } + } + + /** + * Shows a domain selection in the login form when more than one domain is configured + * + * @param Doku_Event $event + * @param array $param + */ + public function handle_html_loginform_output(Doku_Event &$event, $param) { + global $INPUT; + /** @var auth_plugin_authad $auth */ + global $auth; + if(!is_a($auth, 'auth_plugin_authad')) return; // AD not even used + $domains = $auth->_getConfiguredDomains(); + if(count($domains) <= 1) return; // no choice at all + + /** @var Doku_Form $form */ + $form =& $event->data; + + // any default? + $dom = ''; + if($INPUT->has('u')) { + $usr = $auth->cleanUser($INPUT->str('u')); + $dom = $auth->_userDomain($usr); + + // update user field value + if($dom) { + $usr = $auth->_userName($usr); + $pos = $form->findElementByAttribute('name', 'u'); + $ele =& $form->getElementAt($pos); + $ele['value'] = $usr; + } + } + + // add select box + $element = form_makeListboxField('dom', $domains, $dom, $this->getLang('domain'), '', 'block'); + $pos = $form->findElementByAttribute('name', 'p'); + $form->insertElement($pos + 1, $element); + } + +} + +// vim:ts=4:sw=4:et: \ No newline at end of file diff --git a/lib/plugins/authad/auth.php b/lib/plugins/authad/auth.php index e1d758fb8..db9b179a6 100644 --- a/lib/plugins/authad/auth.php +++ b/lib/plugins/authad/auth.php @@ -511,6 +511,31 @@ class auth_plugin_authad extends DokuWiki_Auth_Plugin { return $opts; } + /** + * Returns a list of configured domains + * + * The default domain has an empty string as key + * + * @return array associative array(key => domain) + */ + public function _getConfiguredDomains() { + $domains = array(); + if(empty($this->conf['account_suffix'])) return $domains; // not configured yet + + // add default domain, using the name from account suffix + $domains[''] = ltrim($this->conf['account_suffix'], '@'); + + // find additional domains + foreach($this->conf as $key => $val) { + if(is_array($val) && isset($val['account_suffix'])) { + $domains[$key] = ltrim($val['account_suffix'], '@'); + } + } + ksort($domains); + + return $domains; + } + /** * Check provided user and userinfo for matching patterns * diff --git a/lib/plugins/authad/plugin.info.txt b/lib/plugins/authad/plugin.info.txt index 3af1ddfbe..8774fcf3c 100644 --- a/lib/plugins/authad/plugin.info.txt +++ b/lib/plugins/authad/plugin.info.txt @@ -1,7 +1,7 @@ base authad author Andreas Gohr email andi@splitbrain.org -date 2013-04-25 +date 2014-02-14 name Active Directory Auth Plugin desc Provides user authentication against a Microsoft Active Directory url http://www.dokuwiki.org/plugin:authad -- cgit v1.2.3 From 62c8004ec7c360471b96b4faa6128cd207f89bf2 Mon Sep 17 00:00:00 2001 From: Gerrit Uitslag Date: Fri, 14 Feb 2014 14:36:54 +0100 Subject: change default arg value of userinfo in null instead false --- inc/common.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/inc/common.php b/inc/common.php index 297c36355..c18f43668 100644 --- a/inc/common.php +++ b/inc/common.php @@ -1429,7 +1429,7 @@ function editorinfo($username) { * * @triggers COMMON_USER_LINK */ -function userinfo($username = false) { +function userinfo($username = null) { global $conf, $INFO; /** @var DokuWiki_Auth_Plugin $auth */ global $auth; @@ -1450,7 +1450,7 @@ function userinfo($username = false) { ), 'userinfo' => '' ); - if($username === false) { + if($username === null) { $data['username'] = $username = $_SERVER['REMOTE_USER']; $data['name'] = ''.hsc($INFO['userinfo']['name']).' ('.hsc($_SERVER['REMOTE_USER']).')'; } -- cgit v1.2.3 From ed714c3e6d42ad1cf00e4af2305828742683decf Mon Sep 17 00:00:00 2001 From: Christopher Smith Date: Fri, 14 Feb 2014 21:00:10 +0000 Subject: add missing '&' before 't' in url construction --- feed.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/feed.php b/feed.php index bdce666d2..d9f52b5a2 100644 --- a/feed.php +++ b/feed.php @@ -299,7 +299,7 @@ function rss_buildItems(&$rss, &$data, $opt) { $src_l = ''; if($size = media_image_preview_size($id, false, new JpegMeta(mediaFN($id)), 300)) { - $more = 'w='.$size[0].'&h='.$size[1].'t='.@filemtime(mediaFN($id)); + $more = 'w='.$size[0].'&h='.$size[1].'&t='.@filemtime(mediaFN($id)); $src_r = ml($id, $more); } if($rev && $size = media_image_preview_size($id, $rev, new JpegMeta(mediaFN($id, $rev)), 300)) { @@ -347,7 +347,7 @@ function rss_buildItems(&$rss, &$data, $opt) { case 'html': if($ditem['media']) { if($size = media_image_preview_size($id, false, new JpegMeta(mediaFN($id)))) { - $more = 'w='.$size[0].'&h='.$size[1].'t='.@filemtime(mediaFN($id)); + $more = 'w='.$size[0].'&h='.$size[1].'&t='.@filemtime(mediaFN($id)); $src = ml($id, $more); $content = ''.$id.''; } else { @@ -378,7 +378,7 @@ function rss_buildItems(&$rss, &$data, $opt) { default: if($ditem['media']) { if($size = media_image_preview_size($id, false, new JpegMeta(mediaFN($id)))) { - $more = 'w='.$size[0].'&h='.$size[1].'t='.@filemtime(mediaFN($id)); + $more = 'w='.$size[0].'&h='.$size[1].'&t='.@filemtime(mediaFN($id)); $src = ml($id, $more); $content = ''.$id.''; } else { -- cgit v1.2.3 From 27538f87e374a7f00a3b58fc5533819465f4c166 Mon Sep 17 00:00:00 2001 From: Christopher Smith Date: Fri, 14 Feb 2014 21:04:08 +0000 Subject: make media links in rss feeds absolute This resolves issues with broken images when the wiki feed is hosted by third parties (e.g. FeedBurner), as mentioned in FS#2931 comments. --- feed.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/feed.php b/feed.php index d9f52b5a2..34ce23c89 100644 --- a/feed.php +++ b/feed.php @@ -300,11 +300,11 @@ function rss_buildItems(&$rss, &$data, $opt) { if($size = media_image_preview_size($id, false, new JpegMeta(mediaFN($id)), 300)) { $more = 'w='.$size[0].'&h='.$size[1].'&t='.@filemtime(mediaFN($id)); - $src_r = ml($id, $more); + $src_r = ml($id, $more, true, '&', true); } if($rev && $size = media_image_preview_size($id, $rev, new JpegMeta(mediaFN($id, $rev)), 300)) { $more = 'rev='.$rev.'&w='.$size[0].'&h='.$size[1]; - $src_l = ml($id, $more); + $src_l = ml($id, $more, true, '&', true); } $content = ''; if($src_r) { @@ -348,7 +348,7 @@ function rss_buildItems(&$rss, &$data, $opt) { if($ditem['media']) { if($size = media_image_preview_size($id, false, new JpegMeta(mediaFN($id)))) { $more = 'w='.$size[0].'&h='.$size[1].'&t='.@filemtime(mediaFN($id)); - $src = ml($id, $more); + $src = ml($id, $more, true, '&', true); $content = ''.$id.''; } else { $content = ''; @@ -379,7 +379,7 @@ function rss_buildItems(&$rss, &$data, $opt) { if($ditem['media']) { if($size = media_image_preview_size($id, false, new JpegMeta(mediaFN($id)))) { $more = 'w='.$size[0].'&h='.$size[1].'&t='.@filemtime(mediaFN($id)); - $src = ml($id, $more); + $src = ml($id, $more, true, '&', true); $content = ''.$id.''; } else { $content = ''; -- cgit v1.2.3 From 7c2f8eec8f8dbd26e20f8afc516e38d5c6f1cc02 Mon Sep 17 00:00:00 2001 From: Gerrit Uitslag Date: Fri, 14 Feb 2014 23:54:54 +0100 Subject: handle interwiki without slashes as pageids. Added user interwiki * allowed urlparams * added `wiki:users:` as default user profile link --- conf/interwiki.conf | 1 + inc/parser/xhtml.php | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/conf/interwiki.conf b/conf/interwiki.conf index 28561a4ae..68367d0bd 100644 --- a/conf/interwiki.conf +++ b/conf/interwiki.conf @@ -30,6 +30,7 @@ sb http://www.splitbrain.org/go/ skype skype:{NAME} google.de http://www.google.de/search?q= go http://www.google.com/search?q={URL}&btnI=lucky +user wiki:users:{URL} # To support VoIP/SIP links callto callto://{NAME} diff --git a/inc/parser/xhtml.php b/inc/parser/xhtml.php index 80701cd2e..fbdd8ada6 100644 --- a/inc/parser/xhtml.php +++ b/inc/parser/xhtml.php @@ -699,6 +699,11 @@ class Doku_Renderer_xhtml extends Doku_Renderer { //get interwiki URL $url = $this->_resolveInterWiki($wikiName,$wikiUri); + if(strpos($url,'/') === false) { + list($url, $urlparam) = explode('?', $url, 2); + $url = wl($url, $urlparam); + } + if ( !$isImage ) { $class = preg_replace('/[^_\-a-z0-9]+/i','_',$wikiName); $link['class'] = "interwiki iw_$class"; -- cgit v1.2.3 From b3d353e634614780173506006921f7545ca81305 Mon Sep 17 00:00:00 2001 From: Gerrit Uitslag Date: Sat, 15 Feb 2014 00:00:24 +0100 Subject: wikilink needs wiki target as well --- inc/parser/xhtml.php | 1 + 1 file changed, 1 insertion(+) diff --git a/inc/parser/xhtml.php b/inc/parser/xhtml.php index fbdd8ada6..957dd992b 100644 --- a/inc/parser/xhtml.php +++ b/inc/parser/xhtml.php @@ -702,6 +702,7 @@ class Doku_Renderer_xhtml extends Doku_Renderer { if(strpos($url,'/') === false) { list($url, $urlparam) = explode('?', $url, 2); $url = wl($url, $urlparam); + $link['target'] = $conf['target']['wiki']; } if ( !$isImage ) { -- cgit v1.2.3 From 7f081821c51e704c2720b993ca5364fa5e7e3663 Mon Sep 17 00:00:00 2001 From: Gerrit Uitslag Date: Sat, 15 Feb 2014 00:42:05 +0100 Subject: Extend showuseras config with username_link uses the user interwiki link as profile link --- inc/common.php | 25 +++++++++++++++++++++---- lib/plugins/config/lang/en/lang.php | 9 +++++---- lib/plugins/config/settings/config.metadata.php | 2 +- 3 files changed, 27 insertions(+), 9 deletions(-) diff --git a/inc/common.php b/inc/common.php index c18f43668..22e57b2c5 100644 --- a/inc/common.php +++ b/inc/common.php @@ -1465,6 +1465,7 @@ function userinfo($username = null) { if(isset($info) && $info) { switch($conf['showuseras']) { case 'username': + case 'username_link': $data['name'] = hsc($info['name']); break; case 'email': @@ -1475,13 +1476,31 @@ function userinfo($username = null) { } } } + + /** @var Doku_Renderer_xhtml $xhtml_renderer */ + static $xhtml_renderer = null; + if($data['link'] !== false && empty($data['link']['url'])){ - if($conf['showuseras'] == 'email_link') { + + if(in_array($conf['showuseras'], array('email_link', 'username_link'))) { if(!isset($info)) { if($auth) $info = $auth->getUserData($username); } if(isset($info) && $info) { - $data['link']['url'] = 'mailto:'.obfuscate($info['mail']); + if($conf['showuseras'] == 'email_link') { + $data['link']['url'] = 'mailto:'.obfuscate($info['mail']); + } else { + if(is_null($xhtml_renderer)){ + $xhtml_renderer = p_get_renderer('xhtml'); + } + if(empty($xhtml_renderer->interwiki)) { + $xhtml_renderer->interwiki = getInterwiki(); + } + $shortcut = 'user'; + $url = $xhtml_renderer->_resolveInterWiki($shortcut, $username); + list($url, $urlparam) = explode('?', $url, 2); + $data['link']['url'] = wl($url, $urlparam); + } } else { $data['link'] = false; } @@ -1495,8 +1514,6 @@ function userinfo($username = null) { $data['userinfo'] = $data['name']; } else{ $data['link']['name'] = $data['name']; - /** @var Doku_Renderer_xhtml $xhtml_renderer */ - static $xhtml_renderer = null; if(is_null($xhtml_renderer)){ $xhtml_renderer = p_get_renderer('xhtml'); } diff --git a/lib/plugins/config/lang/en/lang.php b/lib/plugins/config/lang/en/lang.php index cdef85a85..66d4dc356 100644 --- a/lib/plugins/config/lang/en/lang.php +++ b/lib/plugins/config/lang/en/lang.php @@ -245,10 +245,11 @@ $lang['xsendfile_o_2'] = 'Standard X-Sendfile header'; $lang['xsendfile_o_3'] = 'Proprietary Nginx X-Accel-Redirect header'; /* Display user info */ -$lang['showuseras_o_loginname'] = 'Login name'; -$lang['showuseras_o_username'] = "User's full name"; -$lang['showuseras_o_email'] = "User's e-mail addresss (obfuscated according to mailguard setting)"; -$lang['showuseras_o_email_link'] = "User's e-mail addresss as a mailto: link"; +$lang['showuseras_o_loginname'] = 'Login name'; +$lang['showuseras_o_username'] = "User's full name"; +$lang['showuseras_o_username_link'] = "User's full name as interwiki user link"; +$lang['showuseras_o_email'] = "User's e-mail addresss (obfuscated according to mailguard setting)"; +$lang['showuseras_o_email_link'] = "User's e-mail addresss as a mailto: link"; /* useheading options */ $lang['useheading_o_0'] = 'Never'; diff --git a/lib/plugins/config/settings/config.metadata.php b/lib/plugins/config/settings/config.metadata.php index f9dabfeb0..69cc0df01 100644 --- a/lib/plugins/config/settings/config.metadata.php +++ b/lib/plugins/config/settings/config.metadata.php @@ -116,7 +116,7 @@ $meta['fullpath'] = array('onoff','_caution' => 'security'); $meta['typography'] = array('multichoice','_choices' => array(0,1,2)); $meta['dformat'] = array('string'); $meta['signature'] = array('string'); -$meta['showuseras'] = array('multichoice','_choices' => array('loginname','username','email','email_link')); +$meta['showuseras'] = array('multichoice','_choices' => array('loginname','username','username_link','email','email_link')); $meta['toptoclevel'] = array('multichoice','_choices' => array(1,2,3,4,5)); // 5 toc levels $meta['tocminheads'] = array('multichoice','_choices' => array(0,1,2,3,4,5,10,15,20)); $meta['maxtoclevel'] = array('multichoice','_choices' => array(0,1,2,3,4,5)); -- cgit v1.2.3 From 2d6df7955d82d34f7a58b289fa04755c5ab9146e Mon Sep 17 00:00:00 2001 From: Gerrit Uitslag Date: Sat, 15 Feb 2014 00:49:18 +0100 Subject: added tests for Doku_Renderer::_resolveInterWiki --- .../inc/parser/renderer_resolveinterwiki.test.php | 54 ++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 _test/tests/inc/parser/renderer_resolveinterwiki.test.php diff --git a/_test/tests/inc/parser/renderer_resolveinterwiki.test.php b/_test/tests/inc/parser/renderer_resolveinterwiki.test.php new file mode 100644 index 000000000..5ce54fac6 --- /dev/null +++ b/_test/tests/inc/parser/renderer_resolveinterwiki.test.php @@ -0,0 +1,54 @@ +interwiki = getInterwiki(); + $Renderer->interwiki['scheme'] = '{SCHEME}://example.com'; + $Renderer->interwiki['slash'] = '/test'; + $Renderer->interwiki['onlytext'] = 'onlytext'; + + //var_dump($Renderer->interwiki); + + $tests = array( + // shortcut, reference and expected + array('wp', 'foo @+%/', 'http://en.wikipedia.org/wiki/foo @+%/'), + array('amazon', 'foo @+%/', 'http://www.amazon.com/exec/obidos/ASIN/foo%20%40%2B%25%2F/splitbrain-20/'), + array('doku', 'foo @+%/', 'http://www.dokuwiki.org/foo%20%40%2B%25%2F'), + //ToDo: Check needed, is double slash in path desired + array('coral', 'http://example.com:83/path/naar/?query=foo%20%40%2B%25%2F', 'http://example.com.83.nyud.net:8090//path/naar/?query=foo%20%40%2B%25%2F'), + array('scheme', 'ftp://foo @+%/', 'ftp://example.com'), + //relative url + array('slash', 'foo @+%/', '/testfoo%20%40%2B%25%2F'), + //dokuwiki id's + array('onlytext', 'foo @+%/', 'onlytextfoo%20%40%2B%25%2F'), + array('user', 'foo @+%/', 'wiki:users:foo%20%40%2B%25%2F') + ); + + foreach($tests as $test) { + $url = $Renderer->_resolveInterWiki($test[0], $test[1]); + + $this->assertEquals($test[2], $url); + } + } + + function testNonexisting() { + $Renderer = new Doku_Renderer(); + $Renderer->interwiki = getInterwiki(); + + $shortcut = 'nonexisting'; + $reference = 'foo @+%/'; + $url = $Renderer->_resolveInterWiki($shortcut, $reference); + $expected = 'http://www.google.com/search?q=foo%20%40%2B%25%2F&btnI=lucky'; + + $this->assertEquals($expected, $url); + } + +} \ No newline at end of file -- cgit v1.2.3 From 40e0b44409037978b0bce4b451b1569c3bc3ee19 Mon Sep 17 00:00:00 2001 From: Dominik Eckelmann Date: Sat, 15 Feb 2014 10:58:33 +0100 Subject: use http_sendfile correct --- inc/actions.php | 2 +- inc/fetch.functions.php | 2 +- inc/httputils.php | 8 ++++---- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/inc/actions.php b/inc/actions.php index 50cbe369f..4dbad1a32 100644 --- a/inc/actions.php +++ b/inc/actions.php @@ -697,7 +697,7 @@ function act_sitemap($act) { // Send file //use x-sendfile header to pass the delivery to compatible webservers - if (http_sendfile($sitemap)) exit; + http_sendfile($sitemap); readfile($sitemap); exit; diff --git a/inc/fetch.functions.php b/inc/fetch.functions.php index 3eacaa2fe..c61c54503 100644 --- a/inc/fetch.functions.php +++ b/inc/fetch.functions.php @@ -77,7 +77,7 @@ function sendFile($file, $mime, $dl, $cache, $public = false, $orig = null) { } //use x-sendfile header to pass the delivery to compatible webservers - if(http_sendfile($file)) exit; + http_sendfile($file); // send file contents $fp = @fopen($file, "rb"); diff --git a/inc/httputils.php b/inc/httputils.php index ca60ed509..fdf453a8c 100644 --- a/inc/httputils.php +++ b/inc/httputils.php @@ -64,12 +64,13 @@ function http_conditionalRequest($timestamp){ * Let the webserver send the given file via x-sendfile method * * @author Chris Smith + * @param string $file absolute path of file to send * @returns void or exits with previously header() commands executed */ function http_sendfile($file) { global $conf; - //use x-sendfile header to pass the delivery to compatible webservers + //use x-sendfile header to pass the delivery to compatible web servers if($conf['xsendfile'] == 1){ header("X-LIGHTTPD-send-file: $file"); ob_end_clean(); @@ -83,8 +84,6 @@ function http_sendfile($file) { ob_end_clean(); exit; } - - return false; } /** @@ -223,7 +222,8 @@ function http_cached($cache, $cache_ok) { header('Content-Encoding: gzip'); readfile($cache.".gz"); } else { - if (!http_sendfile($cache)) readfile($cache); + http_sendfile($cache); + readfile($cache); } exit; } -- cgit v1.2.3 From 446b5b5934799f1f906ea8903b1e96c981f1c1b2 Mon Sep 17 00:00:00 2001 From: Dominik Eckelmann Date: Sat, 15 Feb 2014 10:59:18 +0100 Subject: FS#2388 give relative path to sendfile on nginx --- inc/httputils.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/inc/httputils.php b/inc/httputils.php index fdf453a8c..d6532720f 100644 --- a/inc/httputils.php +++ b/inc/httputils.php @@ -80,6 +80,8 @@ function http_sendfile($file) { ob_end_clean(); exit; }elseif($conf['xsendfile'] == 3){ + // FS#2388 nginx just needs the relative path. + $file = DOKU_REL.substr($file, strlen(fullpath(DOKU_INC)) + 1); header("X-Accel-Redirect: $file"); ob_end_clean(); exit; -- cgit v1.2.3 From 2345e871e407dbece52f3181cd8b077f07cbb0c1 Mon Sep 17 00:00:00 2001 From: Gerrit Uitslag Date: Sat, 15 Feb 2014 11:11:15 +0100 Subject: wikilink creating refactored to _resolveinterwiki(). Added DOKU_BASE for local target --- .../inc/parser/renderer_resolveinterwiki.test.php | 23 +++++++++++----------- conf/interwiki.conf | 2 +- inc/common.php | 4 +--- inc/parser/renderer.php | 5 +++++ inc/parser/xhtml.php | 8 +------- 5 files changed, 19 insertions(+), 23 deletions(-) diff --git a/_test/tests/inc/parser/renderer_resolveinterwiki.test.php b/_test/tests/inc/parser/renderer_resolveinterwiki.test.php index 5ce54fac6..f17838f92 100644 --- a/_test/tests/inc/parser/renderer_resolveinterwiki.test.php +++ b/_test/tests/inc/parser/renderer_resolveinterwiki.test.php @@ -7,29 +7,28 @@ require_once DOKU_INC . 'inc/parser/renderer.php'; */ class Test_resolveInterwiki extends PHPUnit_Framework_TestCase { - function testDefaults() { $Renderer = new Doku_Renderer(); $Renderer->interwiki = getInterwiki(); $Renderer->interwiki['scheme'] = '{SCHEME}://example.com'; - $Renderer->interwiki['slash'] = '/test'; - $Renderer->interwiki['onlytext'] = 'onlytext'; - - //var_dump($Renderer->interwiki); + $Renderer->interwiki['withslash'] = '/test'; + $Renderer->interwiki['onlytext'] = 'onlytext{NAME}'; //with {URL} double urlencoded + $Renderer->interwiki['withquery'] = 'anyns:{NAME}?do=edit'; $tests = array( // shortcut, reference and expected - array('wp', 'foo @+%/', 'http://en.wikipedia.org/wiki/foo @+%/'), - array('amazon', 'foo @+%/', 'http://www.amazon.com/exec/obidos/ASIN/foo%20%40%2B%25%2F/splitbrain-20/'), - array('doku', 'foo @+%/', 'http://www.dokuwiki.org/foo%20%40%2B%25%2F'), + array('wp', 'foo @+%/#txt', 'http://en.wikipedia.org/wiki/foo @+%/#txt'), + array('amazon', 'foo @+%/#txt', 'http://www.amazon.com/exec/obidos/ASIN/foo%20%40%2B%25%2F/splitbrain-20/#txt'), + array('doku', 'foo @+%/#txt', 'http://www.dokuwiki.org/foo%20%40%2B%25%2F#txt'), //ToDo: Check needed, is double slash in path desired array('coral', 'http://example.com:83/path/naar/?query=foo%20%40%2B%25%2F', 'http://example.com.83.nyud.net:8090//path/naar/?query=foo%20%40%2B%25%2F'), - array('scheme', 'ftp://foo @+%/', 'ftp://example.com'), + array('scheme', 'ftp://foo @+%/#txt', 'ftp://example.com#txt'), //relative url - array('slash', 'foo @+%/', '/testfoo%20%40%2B%25%2F'), + array('withslash', 'foo @+%/#txt', '/testfoo%20%40%2B%25%2F#txt'), //dokuwiki id's - array('onlytext', 'foo @+%/', 'onlytextfoo%20%40%2B%25%2F'), - array('user', 'foo @+%/', 'wiki:users:foo%20%40%2B%25%2F') + array('onlytext', 'foo @+%#txt', '/tmp/doku.php?id=onlytextfoo%20%40%2B%25#txt'), + array('user', 'foo @+%#txt', '/tmp/doku.php?id=wiki:users:foo%20%40%2B%25#txt'), + array('withquery', 'foo @+%#txt', '/tmp/doku.php?id=anyns:foo%20%40%2B%25&do=edit#txt') ); foreach($tests as $test) { diff --git a/conf/interwiki.conf b/conf/interwiki.conf index 68367d0bd..2d83043ef 100644 --- a/conf/interwiki.conf +++ b/conf/interwiki.conf @@ -30,7 +30,7 @@ sb http://www.splitbrain.org/go/ skype skype:{NAME} google.de http://www.google.de/search?q= go http://www.google.com/search?q={URL}&btnI=lucky -user wiki:users:{URL} +user wiki:users:{NAME} # To support VoIP/SIP links callto callto://{NAME} diff --git a/inc/common.php b/inc/common.php index 22e57b2c5..e991375f5 100644 --- a/inc/common.php +++ b/inc/common.php @@ -1497,9 +1497,7 @@ function userinfo($username = null) { $xhtml_renderer->interwiki = getInterwiki(); } $shortcut = 'user'; - $url = $xhtml_renderer->_resolveInterWiki($shortcut, $username); - list($url, $urlparam) = explode('?', $url, 2); - $data['link']['url'] = wl($url, $urlparam); + $data['link']['url'] = $xhtml_renderer->_resolveInterWiki($shortcut, $username); } } else { $data['link'] = false; diff --git a/inc/parser/renderer.php b/inc/parser/renderer.php index e3401fd48..66a106b11 100644 --- a/inc/parser/renderer.php +++ b/inc/parser/renderer.php @@ -321,6 +321,11 @@ class Doku_Renderer extends DokuWiki_Plugin { //default $url = $url.rawurlencode($reference); } + //url without slashes is handled as a pageid + if(strpos($url,'/') === false) { + list($url, $urlparam) = explode('?', $url, 2); + $url = wl($url, $urlparam); + } if($hash) $url .= '#'.rawurlencode($hash); return $url; diff --git a/inc/parser/xhtml.php b/inc/parser/xhtml.php index 957dd992b..f0a507721 100644 --- a/inc/parser/xhtml.php +++ b/inc/parser/xhtml.php @@ -699,12 +699,6 @@ class Doku_Renderer_xhtml extends Doku_Renderer { //get interwiki URL $url = $this->_resolveInterWiki($wikiName,$wikiUri); - if(strpos($url,'/') === false) { - list($url, $urlparam) = explode('?', $url, 2); - $url = wl($url, $urlparam); - $link['target'] = $conf['target']['wiki']; - } - if ( !$isImage ) { $class = preg_replace('/[^_\-a-z0-9]+/i','_',$wikiName); $link['class'] = "interwiki iw_$class"; @@ -713,7 +707,7 @@ class Doku_Renderer_xhtml extends Doku_Renderer { } //do we stay at the same server? Use local target - if( strpos($url,DOKU_URL) === 0 ){ + if( strpos($url,DOKU_URL) === 0 OR strpos($url,DOKU_BASE) === 0){ $link['target'] = $conf['target']['wiki']; } -- cgit v1.2.3 From 5a9ce44695f44ecc76f356c1fc26f0a1846231b7 Mon Sep 17 00:00:00 2001 From: Gerrit Uitslag Date: Sat, 15 Feb 2014 11:17:09 +0100 Subject: code reformatting --- inc/common.php | 30 +++++++++++++++--------------- inc/parser/renderer.php | 42 +++++++++++++++++++++--------------------- inc/parser/xhtml.php | 10 +++++----- 3 files changed, 41 insertions(+), 41 deletions(-) diff --git a/inc/common.php b/inc/common.php index e991375f5..cd3c053a3 100644 --- a/inc/common.php +++ b/inc/common.php @@ -1438,21 +1438,21 @@ function userinfo($username = null) { $data = array( 'username' => $username, // the unique user name 'name' => '', - 'link' => array( //setting 'link' to false disables linking - 'target' => '', - 'pre' => '', - 'suf' => '', - 'style' => '', - 'more' => '', - 'url' => '', - 'title' => '', - 'class' => '' + 'link' => array( //setting 'link' to false disables linking + 'target' => '', + 'pre' => '', + 'suf' => '', + 'style' => '', + 'more' => '', + 'url' => '', + 'title' => '', + 'class' => '' ), 'userinfo' => '' ); if($username === null) { $data['username'] = $username = $_SERVER['REMOTE_USER']; - $data['name'] = ''.hsc($INFO['userinfo']['name']).' ('.hsc($_SERVER['REMOTE_USER']).')'; + $data['name'] = '' . hsc($INFO['userinfo']['name']) . ' (' . hsc($_SERVER['REMOTE_USER']) . ')'; } $evt = new Doku_Event('COMMON_USER_LINK', $data); @@ -1480,7 +1480,7 @@ function userinfo($username = null) { /** @var Doku_Renderer_xhtml $xhtml_renderer */ static $xhtml_renderer = null; - if($data['link'] !== false && empty($data['link']['url'])){ + if($data['link'] !== false && empty($data['link']['url'])) { if(in_array($conf['showuseras'], array('email_link', 'username_link'))) { if(!isset($info)) { @@ -1488,9 +1488,9 @@ function userinfo($username = null) { } if(isset($info) && $info) { if($conf['showuseras'] == 'email_link') { - $data['link']['url'] = 'mailto:'.obfuscate($info['mail']); + $data['link']['url'] = 'mailto:' . obfuscate($info['mail']); } else { - if(is_null($xhtml_renderer)){ + if(is_null($xhtml_renderer)) { $xhtml_renderer = p_get_renderer('xhtml'); } if(empty($xhtml_renderer->interwiki)) { @@ -1510,9 +1510,9 @@ function userinfo($username = null) { if($data['link'] === false) { $data['userinfo'] = $data['name']; - } else{ + } else { $data['link']['name'] = $data['name']; - if(is_null($xhtml_renderer)){ + if(is_null($xhtml_renderer)) { $xhtml_renderer = p_get_renderer('xhtml'); } $data['userinfo'] = $xhtml_renderer->_formatLink($data['link']); diff --git a/inc/parser/renderer.php b/inc/parser/renderer.php index 66a106b11..d01fc3899 100644 --- a/inc/parser/renderer.php +++ b/inc/parser/renderer.php @@ -273,17 +273,17 @@ class Doku_Renderer extends DokuWiki_Plugin { * * @author Andreas Gohr */ - function _simpleTitle($name){ + function _simpleTitle($name) { global $conf; //if there is a hash we use the ancor name only - list($name,$hash) = explode('#',$name,2); + list($name, $hash) = explode('#', $name, 2); if($hash) return $hash; - if($conf['useslash']){ - $name = strtr($name,';/',';:'); - }else{ - $name = strtr($name,';',':'); + if($conf['useslash']) { + $name = strtr($name, ';/', ';:'); + } else { + $name = strtr($name, ';', ':'); } return noNSorNS($name); @@ -292,9 +292,9 @@ class Doku_Renderer extends DokuWiki_Plugin { /** * Resolve an interwikilink */ - function _resolveInterWiki(&$shortcut,$reference){ + function _resolveInterWiki(&$shortcut, $reference) { //get interwiki URL - if ( isset($this->interwiki[$shortcut]) ) { + if(isset($this->interwiki[$shortcut])) { $url = $this->interwiki[$shortcut]; } else { // Default to Google I'm feeling lucky @@ -303,30 +303,30 @@ class Doku_Renderer extends DokuWiki_Plugin { } //split into hash and url part - list($reference,$hash) = explode('#',$reference,2); + list($reference, $hash) = explode('#', $reference, 2); //replace placeholder - if(preg_match('#\{(URL|NAME|SCHEME|HOST|PORT|PATH|QUERY)\}#',$url)){ + if(preg_match('#\{(URL|NAME|SCHEME|HOST|PORT|PATH|QUERY)\}#', $url)) { //use placeholders - $url = str_replace('{URL}',rawurlencode($reference),$url); - $url = str_replace('{NAME}',$reference,$url); + $url = str_replace('{URL}', rawurlencode($reference), $url); + $url = str_replace('{NAME}', $reference, $url); $parsed = parse_url($reference); if(!$parsed['port']) $parsed['port'] = 80; - $url = str_replace('{SCHEME}',$parsed['scheme'],$url); - $url = str_replace('{HOST}',$parsed['host'],$url); - $url = str_replace('{PORT}',$parsed['port'],$url); - $url = str_replace('{PATH}',$parsed['path'],$url); - $url = str_replace('{QUERY}',$parsed['query'],$url); - }else{ + $url = str_replace('{SCHEME}', $parsed['scheme'], $url); + $url = str_replace('{HOST}', $parsed['host'], $url); + $url = str_replace('{PORT}', $parsed['port'], $url); + $url = str_replace('{PATH}', $parsed['path'], $url); + $url = str_replace('{QUERY}', $parsed['query'], $url); + } else { //default - $url = $url.rawurlencode($reference); + $url = $url . rawurlencode($reference); } //url without slashes is handled as a pageid - if(strpos($url,'/') === false) { + if(strpos($url, '/') === false) { list($url, $urlparam) = explode('?', $url, 2); $url = wl($url, $urlparam); } - if($hash) $url .= '#'.rawurlencode($hash); + if($hash) $url .= '#' . rawurlencode($hash); return $url; } diff --git a/inc/parser/xhtml.php b/inc/parser/xhtml.php index f0a507721..20cd8e9d6 100644 --- a/inc/parser/xhtml.php +++ b/inc/parser/xhtml.php @@ -685,7 +685,7 @@ class Doku_Renderer_xhtml extends Doku_Renderer { } /** - */ + */ function interwikilink($match, $name = null, $wikiName, $wikiUri) { global $conf; @@ -697,17 +697,17 @@ class Doku_Renderer_xhtml extends Doku_Renderer { $link['name'] = $this->_getLinkTitle($name, $wikiUri, $isImage); //get interwiki URL - $url = $this->_resolveInterWiki($wikiName,$wikiUri); + $url = $this->_resolveInterWiki($wikiName, $wikiUri); - if ( !$isImage ) { - $class = preg_replace('/[^_\-a-z0-9]+/i','_',$wikiName); + if(!$isImage) { + $class = preg_replace('/[^_\-a-z0-9]+/i', '_', $wikiName); $link['class'] = "interwiki iw_$class"; } else { $link['class'] = 'media'; } //do we stay at the same server? Use local target - if( strpos($url,DOKU_URL) === 0 OR strpos($url,DOKU_BASE) === 0){ + if(strpos($url, DOKU_URL) === 0 OR strpos($url, DOKU_BASE) === 0) { $link['target'] = $conf['target']['wiki']; } -- cgit v1.2.3 From 4485a8917160fb9f955e5b8aa28c1a5499c608b0 Mon Sep 17 00:00:00 2001 From: Gerrit Uitslag Date: Sat, 15 Feb 2014 11:28:09 +0100 Subject: Fix double slash in coral interwikilink --- _test/tests/inc/parser/renderer_resolveinterwiki.test.php | 3 +-- conf/interwiki.conf | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/_test/tests/inc/parser/renderer_resolveinterwiki.test.php b/_test/tests/inc/parser/renderer_resolveinterwiki.test.php index f17838f92..ea4f99511 100644 --- a/_test/tests/inc/parser/renderer_resolveinterwiki.test.php +++ b/_test/tests/inc/parser/renderer_resolveinterwiki.test.php @@ -20,8 +20,7 @@ class Test_resolveInterwiki extends PHPUnit_Framework_TestCase { array('wp', 'foo @+%/#txt', 'http://en.wikipedia.org/wiki/foo @+%/#txt'), array('amazon', 'foo @+%/#txt', 'http://www.amazon.com/exec/obidos/ASIN/foo%20%40%2B%25%2F/splitbrain-20/#txt'), array('doku', 'foo @+%/#txt', 'http://www.dokuwiki.org/foo%20%40%2B%25%2F#txt'), - //ToDo: Check needed, is double slash in path desired - array('coral', 'http://example.com:83/path/naar/?query=foo%20%40%2B%25%2F', 'http://example.com.83.nyud.net:8090//path/naar/?query=foo%20%40%2B%25%2F'), + array('coral', 'http://example.com:83/path/naar/?query=foo%20%40%2B%25%2F', 'http://example.com.83.nyud.net:8090/path/naar/?query=foo%20%40%2B%25%2F'), array('scheme', 'ftp://foo @+%/#txt', 'ftp://example.com#txt'), //relative url array('withslash', 'foo @+%/#txt', '/testfoo%20%40%2B%25%2F#txt'), diff --git a/conf/interwiki.conf b/conf/interwiki.conf index 2d83043ef..999462170 100644 --- a/conf/interwiki.conf +++ b/conf/interwiki.conf @@ -24,7 +24,7 @@ amazon.de http://www.amazon.de/exec/obidos/ASIN/{URL}/splitbrain-21/ amazon.uk http://www.amazon.co.uk/exec/obidos/ASIN/ paypal https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&business= phpfn http://www.php.net/{NAME} -coral http://{HOST}.{PORT}.nyud.net:8090/{PATH}?{QUERY} +coral http://{HOST}.{PORT}.nyud.net:8090{PATH}?{QUERY} freecache http://freecache.org/{NAME} sb http://www.splitbrain.org/go/ skype skype:{NAME} -- cgit v1.2.3 From ddb55c702f2393a435c309fd7d4e169acb2675f7 Mon Sep 17 00:00:00 2001 From: Gerrit Uitslag Date: Sat, 15 Feb 2014 11:29:33 +0100 Subject: Use DOKU_BASE in resolveinterwiki unittest --- _test/tests/inc/parser/renderer_resolveinterwiki.test.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/_test/tests/inc/parser/renderer_resolveinterwiki.test.php b/_test/tests/inc/parser/renderer_resolveinterwiki.test.php index ea4f99511..a71895b34 100644 --- a/_test/tests/inc/parser/renderer_resolveinterwiki.test.php +++ b/_test/tests/inc/parser/renderer_resolveinterwiki.test.php @@ -25,9 +25,9 @@ class Test_resolveInterwiki extends PHPUnit_Framework_TestCase { //relative url array('withslash', 'foo @+%/#txt', '/testfoo%20%40%2B%25%2F#txt'), //dokuwiki id's - array('onlytext', 'foo @+%#txt', '/tmp/doku.php?id=onlytextfoo%20%40%2B%25#txt'), - array('user', 'foo @+%#txt', '/tmp/doku.php?id=wiki:users:foo%20%40%2B%25#txt'), - array('withquery', 'foo @+%#txt', '/tmp/doku.php?id=anyns:foo%20%40%2B%25&do=edit#txt') + array('onlytext', 'foo @+%#txt', DOKU_BASE.'doku.php?id=onlytextfoo%20%40%2B%25#txt'), + array('user', 'foo @+%#txt', DOKU_BASE.'doku.php?id=wiki:users:foo%20%40%2B%25#txt'), + array('withquery', 'foo @+%#txt', DOKU_BASE.'doku.php?id=anyns:foo%20%40%2B%25&do=edit#txt') ); foreach($tests as $test) { -- cgit v1.2.3 From 6496c33fc8e98f6e3acaaa5db0234d9c07bec4fe Mon Sep 17 00:00:00 2001 From: Gerrit Uitslag Date: Sat, 15 Feb 2014 14:34:26 +0100 Subject: interwiki : prefixed configurls handled as wikilinks --- _test/tests/inc/parser/renderer_resolveinterwiki.test.php | 11 ++++++----- conf/interwiki.conf | 2 +- inc/common.php | 10 +++++++++- inc/parser/renderer.php | 9 +++++---- inc/parser/xhtml.php | 11 ++++++++++- 5 files changed, 31 insertions(+), 12 deletions(-) diff --git a/_test/tests/inc/parser/renderer_resolveinterwiki.test.php b/_test/tests/inc/parser/renderer_resolveinterwiki.test.php index a71895b34..e78930934 100644 --- a/_test/tests/inc/parser/renderer_resolveinterwiki.test.php +++ b/_test/tests/inc/parser/renderer_resolveinterwiki.test.php @@ -12,8 +12,8 @@ class Test_resolveInterwiki extends PHPUnit_Framework_TestCase { $Renderer->interwiki = getInterwiki(); $Renderer->interwiki['scheme'] = '{SCHEME}://example.com'; $Renderer->interwiki['withslash'] = '/test'; - $Renderer->interwiki['onlytext'] = 'onlytext{NAME}'; //with {URL} double urlencoded - $Renderer->interwiki['withquery'] = 'anyns:{NAME}?do=edit'; + $Renderer->interwiki['onlytext'] = ':onlytext{NAME}'; //with {URL} double urlencoded + $Renderer->interwiki['withquery'] = ':anyns:{NAME}?do=edit'; $tests = array( // shortcut, reference and expected @@ -24,10 +24,11 @@ class Test_resolveInterwiki extends PHPUnit_Framework_TestCase { array('scheme', 'ftp://foo @+%/#txt', 'ftp://example.com#txt'), //relative url array('withslash', 'foo @+%/#txt', '/testfoo%20%40%2B%25%2F#txt'), + array('skype', 'foo @+%/#txt', 'skype:foo @+%/#txt'), //dokuwiki id's - array('onlytext', 'foo @+%#txt', DOKU_BASE.'doku.php?id=onlytextfoo%20%40%2B%25#txt'), - array('user', 'foo @+%#txt', DOKU_BASE.'doku.php?id=wiki:users:foo%20%40%2B%25#txt'), - array('withquery', 'foo @+%#txt', DOKU_BASE.'doku.php?id=anyns:foo%20%40%2B%25&do=edit#txt') + array('onlytext', 'foo @+%#txt', DOKU_BASE.'doku.php?id=onlytextfoo#txt'), + array('user', 'foo @+%#txt', DOKU_BASE.'doku.php?id=wiki:users:foo#txt'), + array('withquery', 'foo @+%#txt', DOKU_BASE.'doku.php?id=anyns:foo&do=edit#txt') ); foreach($tests as $test) { diff --git a/conf/interwiki.conf b/conf/interwiki.conf index 999462170..0643f764b 100644 --- a/conf/interwiki.conf +++ b/conf/interwiki.conf @@ -30,7 +30,7 @@ sb http://www.splitbrain.org/go/ skype skype:{NAME} google.de http://www.google.de/search?q= go http://www.google.com/search?q={URL}&btnI=lucky -user wiki:users:{NAME} +user :wiki:users:{NAME} # To support VoIP/SIP links callto callto://{NAME} diff --git a/inc/common.php b/inc/common.php index cd3c053a3..aa59a8c11 100644 --- a/inc/common.php +++ b/inc/common.php @@ -1497,7 +1497,15 @@ function userinfo($username = null) { $xhtml_renderer->interwiki = getInterwiki(); } $shortcut = 'user'; - $data['link']['url'] = $xhtml_renderer->_resolveInterWiki($shortcut, $username); + $data['link']['url'] = $xhtml_renderer->_resolveInterWiki($shortcut, $username, $exists); + if($exists !== null) { + if($exists) { + $data['link']['class'] .= ' wikilink1'; + } else { + $data['link']['class'] .= ' wikilink2'; + $data['link']['rel'] = 'nofollow'; + } + } } } else { $data['link'] = false; diff --git a/inc/parser/renderer.php b/inc/parser/renderer.php index d01fc3899..fa70c299e 100644 --- a/inc/parser/renderer.php +++ b/inc/parser/renderer.php @@ -292,7 +292,7 @@ class Doku_Renderer extends DokuWiki_Plugin { /** * Resolve an interwikilink */ - function _resolveInterWiki(&$shortcut, $reference) { + function _resolveInterWiki(&$shortcut, $reference, &$exists=null) { //get interwiki URL if(isset($this->interwiki[$shortcut])) { $url = $this->interwiki[$shortcut]; @@ -322,9 +322,10 @@ class Doku_Renderer extends DokuWiki_Plugin { $url = $url . rawurlencode($reference); } //url without slashes is handled as a pageid - if(strpos($url, '/') === false) { - list($url, $urlparam) = explode('?', $url, 2); - $url = wl($url, $urlparam); + if($url{0} === ':') { + list($id, $urlparam) = explode('?', $url, 2); + $url = wl(cleanID($id), $urlparam); + $exists = page_exists($id); } if($hash) $url .= '#' . rawurlencode($hash); diff --git a/inc/parser/xhtml.php b/inc/parser/xhtml.php index 20cd8e9d6..53a4dbcad 100644 --- a/inc/parser/xhtml.php +++ b/inc/parser/xhtml.php @@ -697,7 +697,8 @@ class Doku_Renderer_xhtml extends Doku_Renderer { $link['name'] = $this->_getLinkTitle($name, $wikiUri, $isImage); //get interwiki URL - $url = $this->_resolveInterWiki($wikiName, $wikiUri); + $exists = null; + $url = $this->_resolveInterWiki($wikiName, $wikiUri, $exists); if(!$isImage) { $class = preg_replace('/[^_\-a-z0-9]+/i', '_', $wikiName); @@ -710,6 +711,14 @@ class Doku_Renderer_xhtml extends Doku_Renderer { if(strpos($url, DOKU_URL) === 0 OR strpos($url, DOKU_BASE) === 0) { $link['target'] = $conf['target']['wiki']; } + if($exists !== null && !$isImage) { + if($exists) { + $link['class'] .= ' wikilink1'; + } else { + $link['class'] .= ' wikilink2'; + $link['rel'] = 'nofollow'; + } + } $link['url'] = $url; $link['title'] = htmlspecialchars($link['url']); -- cgit v1.2.3 From ef3e3cddddc43156f53958411f3396c9ef5dec60 Mon Sep 17 00:00:00 2001 From: Michael Hamann Date: Sat, 15 Feb 2014 14:55:51 +0100 Subject: Only use the whole text as search snippet when it's the first match --- inc/fulltext.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inc/fulltext.php b/inc/fulltext.php index bd8e6b866..fdaa1a19b 100644 --- a/inc/fulltext.php +++ b/inc/fulltext.php @@ -333,7 +333,7 @@ function ft_snippet($id,$highlight){ $pre = min($pre,100-$post); } else if ($post>50) { $post = min($post, 100-$pre); - } else { + } else if ($offset == 0) { // both are less than 50, means the context is the whole string // make it so and break out of this loop - there is no need for the // complex snippet calculations -- cgit v1.2.3 From 43d58b76484489688582f407d73054a3d4ddcba1 Mon Sep 17 00:00:00 2001 From: Michael Hamann Date: Sat, 15 Feb 2014 15:34:03 +0100 Subject: Fix the snippet search to continue after the previous match --- inc/fulltext.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/inc/fulltext.php b/inc/fulltext.php index fdaa1a19b..87b5a7370 100644 --- a/inc/fulltext.php +++ b/inc/fulltext.php @@ -354,12 +354,12 @@ function ft_snippet($id,$highlight){ } // set $offset for next match attempt - // substract strlen to avoid splitting a potential search success, - // this is an approximation as the search pattern may match strings - // of varying length and it will fail if the context snippet - // boundary breaks a matching string longer than the current match - $utf8_offset = $utf8_idx + $post; - $offset = $idx + strlen(utf8_substr($text,$utf8_idx,$post)); + // continue matching after the current match + // if the current match is not the longest possible match starting at the current offset + // this prevents further matching of this snippet but for possible matches of length + // smaller than match length + context (at least 50 characters) this match is part of the context + $utf8_offset = $utf8_idx + $utf8_len; + $offset = $idx + strlen(utf8_substr($text,$utf8_idx,$utf8_len)); $offset = utf8_correctIdx($text,$offset); } -- cgit v1.2.3 From a7e8b43e07d1665d3fdff8bde3a9850c0228efaf Mon Sep 17 00:00:00 2001 From: Michael Hamann Date: Sat, 15 Feb 2014 15:47:24 +0100 Subject: Add FULLTEXT_PHRASE_MATCH event for allowing plugins to match phrases Our index doesn't support phrase searches so we are searching for the pages that contain all words of the phrase and then search again in the content of the pages. As plugins can also add additional text to the index this event allows plugins to do phrase matching in their content. --- inc/fulltext.php | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/inc/fulltext.php b/inc/fulltext.php index bd8e6b866..cc6742e5d 100644 --- a/inc/fulltext.php +++ b/inc/fulltext.php @@ -72,8 +72,20 @@ function _ft_pageSearch(&$data) { $pages = end($stack); $pages_matched = array(); foreach(array_keys($pages) as $id){ - $text = utf8_strtolower(rawWiki($id)); - if (strpos($text, $phrase) !== false) { + $evdata = array( + 'id' => $id, + 'phrase' => $phrase, + 'text' => rawWiki($id) + ); + $evt = new Doku_Event('FULLTEXT_PHRASE_MATCH',$evdata); + if ($evt->advise_before() && $evt->result !== true) { + $text = utf8_strtolower($evdata['text']); + if (strpos($text, $phrase) !== false) { + $evt->result = true; + } + } + $evt->advise_after(); + if ($evt->result === true) { $pages_matched[$id] = 0; // phrase: always 0 hit } } -- cgit v1.2.3 From f379edc2c80eee8cab2b94a4374113a0100f3929 Mon Sep 17 00:00:00 2001 From: Gerrit Uitslag Date: Sat, 15 Feb 2014 16:51:48 +0100 Subject: fix comment in _resolveInterWiki --- inc/parser/renderer.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inc/parser/renderer.php b/inc/parser/renderer.php index fa70c299e..01a1fbfec 100644 --- a/inc/parser/renderer.php +++ b/inc/parser/renderer.php @@ -321,7 +321,7 @@ class Doku_Renderer extends DokuWiki_Plugin { //default $url = $url . rawurlencode($reference); } - //url without slashes is handled as a pageid + //handle as wiki links if($url{0} === ':') { list($id, $urlparam) = explode('?', $url, 2); $url = wl(cleanID($id), $urlparam); -- cgit v1.2.3 From 04180aa92fd6a23e4a6c154bc248e7b09d60d21d Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Sat, 15 Feb 2014 16:57:04 +0100 Subject: unit test for FS#2173 --- _test/tests/inc/utf8_strtolower.test.php | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 _test/tests/inc/utf8_strtolower.test.php diff --git a/_test/tests/inc/utf8_strtolower.test.php b/_test/tests/inc/utf8_strtolower.test.php new file mode 100644 index 000000000..85f5b270b --- /dev/null +++ b/_test/tests/inc/utf8_strtolower.test.php @@ -0,0 +1,23 @@ + 'αρχιτεκτονική μελέτη', // FS#2173 + ); + + foreach($data as $input => $expected) { + $this->assertEquals($expected, utf8_strtolower($input)); + } + + // just make sure our data was correct + if(function_exists('mb_strtolower')) { + foreach($data as $input => $expected) { + $this->assertEquals($expected, mb_strtolower($input, 'utf-8')); + } + } + } +} \ No newline at end of file -- cgit v1.2.3 From 221cb66533e11a3e20e642d760af06bb19f7e14b Mon Sep 17 00:00:00 2001 From: Anika Henke Date: Sat, 15 Feb 2014 16:02:59 +0000 Subject: fixed pagetools being inaccessible on screens lacking necessary height, and aligned them to content when on smaller screens --- lib/tpl/dokuwiki/css/mobile.less | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/lib/tpl/dokuwiki/css/mobile.less b/lib/tpl/dokuwiki/css/mobile.less index 0fbd0e8fe..75ae5dbe4 100644 --- a/lib/tpl/dokuwiki/css/mobile.less +++ b/lib/tpl/dokuwiki/css/mobile.less @@ -105,6 +105,15 @@ overflow: auto; } +/* push pagetools closer to content */ +#dokuwiki__pagetools { + top: 0; +} +.showSidebar #dokuwiki__pagetools { + top: 3.5em; +} + + /* _edit */ .dokuwiki div.section_highlight { margin: 0 -1em; @@ -299,5 +308,17 @@ body { } +} /* /@media */ + + +/* for screen heights smaller than the pagetools permit +********************************************************************/ +@media only screen and (max-height: 400px) { +// 400px is only roughly the required value, this may be wrong under non-standard circumstances + +#dokuwiki__pagetools div.tools { + position: static; +} + } /* /@media */ -- cgit v1.2.3 From 6ed3476b11fe6e9c4625fb28e8953ac26e8160fb Mon Sep 17 00:00:00 2001 From: Christopher Smith Date: Sat, 15 Feb 2014 20:59:06 +0000 Subject: fixes possibility of a user password change being sent out when a password couldn't be/wasn't changed --- lib/plugins/usermanager/admin.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/plugins/usermanager/admin.php b/lib/plugins/usermanager/admin.php index 156037f09..b9199e586 100644 --- a/lib/plugins/usermanager/admin.php +++ b/lib/plugins/usermanager/admin.php @@ -643,9 +643,9 @@ class admin_plugin_usermanager extends DokuWiki_Admin_Plugin { if ($ok = $this->_auth->triggerUserMod('modify', array($olduser, $changes))) { msg($this->lang['update_ok'],1); - if ($INPUT->has('usernotify') && $newpass) { + if ($INPUT->has('usernotify') && !empty($changes['pass'])) { $notify = empty($changes['user']) ? $olduser : $newuser; - $this->_notifyUser($notify,$newpass); + $this->_notifyUser($notify,$changes['pass']); } // invalidate all sessions -- cgit v1.2.3 From 40d72af6467f899f09d3b282922f861482e8228f Mon Sep 17 00:00:00 2001 From: Christopher Smith Date: Sat, 15 Feb 2014 21:00:08 +0000 Subject: add braces and indentation per coding standards --- lib/plugins/usermanager/admin.php | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/lib/plugins/usermanager/admin.php b/lib/plugins/usermanager/admin.php index b9199e586..4b94440b0 100644 --- a/lib/plugins/usermanager/admin.php +++ b/lib/plugins/usermanager/admin.php @@ -631,14 +631,15 @@ class admin_plugin_usermanager extends DokuWiki_Admin_Plugin { $newpass = auth_pwgen($olduser); } - if (!empty($newpass) && $this->_auth->canDo('modPass')) - $changes['pass'] = $newpass; - if (!empty($newname) && $this->_auth->canDo('modName') && $newname != $oldinfo['name']) - $changes['name'] = $newname; - if (!empty($newmail) && $this->_auth->canDo('modMail') && $newmail != $oldinfo['mail']) - $changes['mail'] = $newmail; - if (!empty($newgrps) && $this->_auth->canDo('modGroups') && $newgrps != $oldinfo['grps']) - $changes['grps'] = $newgrps; + if (!empty($newname) && $this->_auth->canDo('modName') && $newname != $oldinfo['name']) { + $changes['name'] = $newname; + } + if (!empty($newmail) && $this->_auth->canDo('modMail') && $newmail != $oldinfo['mail']) { + $changes['mail'] = $newmail; + } + if (!empty($newgrps) && $this->_auth->canDo('modGroups') && $newgrps != $oldinfo['grps']) { + $changes['grps'] = $newgrps; + } if ($ok = $this->_auth->triggerUserMod('modify', array($olduser, $changes))) { msg($this->lang['update_ok'],1); -- cgit v1.2.3 From 359e941731104cd989739d789f476590011eb518 Mon Sep 17 00:00:00 2001 From: Christopher Smith Date: Sat, 15 Feb 2014 21:00:50 +0000 Subject: add password confirmation field when setting password in the usermanager --- lib/plugins/usermanager/admin.php | 54 +++++++++++++++++++++++++++----- lib/plugins/usermanager/lang/en/lang.php | 3 ++ 2 files changed, 50 insertions(+), 7 deletions(-) diff --git a/lib/plugins/usermanager/admin.php b/lib/plugins/usermanager/admin.php index 4b94440b0..faa4b8d31 100644 --- a/lib/plugins/usermanager/admin.php +++ b/lib/plugins/usermanager/admin.php @@ -299,6 +299,7 @@ class admin_plugin_usermanager extends DokuWiki_Admin_Plugin { $this->_htmlInputField($cmd."_userid", "userid", $this->lang["user_id"], $user, $this->_auth->canDo("modLogin"), $indent+6); $this->_htmlInputField($cmd."_userpass", "userpass", $this->lang["user_pass"], "", $this->_auth->canDo("modPass"), $indent+6); + $this->_htmlInputField($cmd."_userpass2", "userpass2", $this->lang["user_passconfirm"], "", $this->_auth->canDo("modPass"), $indent+6); $this->_htmlInputField($cmd."_username", "username", $this->lang["user_name"], $name, $this->_auth->canDo("modName"), $indent+6); $this->_htmlInputField($cmd."_usermail", "usermail", $this->lang["user_mail"], $mail, $this->_auth->canDo("modMail"), $indent+6); $this->_htmlInputField($cmd."_usergroups","usergroups",$this->lang["user_groups"],$groups,$this->_auth->canDo("modGroups"),$indent+6); @@ -358,7 +359,7 @@ class admin_plugin_usermanager extends DokuWiki_Admin_Plugin { $class = $cando ? '' : ' class="disabled"'; echo str_pad('',$indent); - if($name == 'userpass'){ + if($name == 'userpass' || $name == 'userpass2'){ $fieldtype = 'password'; $autocomp = 'autocomplete="off"'; }elseif($name == 'usermail'){ @@ -475,7 +476,7 @@ class admin_plugin_usermanager extends DokuWiki_Admin_Plugin { if (!checkSecurityToken()) return false; if (!$this->_auth->canDo('addUser')) return false; - list($user,$pass,$name,$mail,$grps) = $this->_retrieveUser(); + list($user,$pass,$name,$mail,$grps,$passconfirm) = $this->_retrieveUser(); if (empty($user)) return false; if ($this->_auth->canDo('modPass')){ @@ -486,6 +487,10 @@ class admin_plugin_usermanager extends DokuWiki_Admin_Plugin { msg($this->lang['add_fail'], -1); return false; } + } else { + if (!$this->_verifyPassword($pass,$passconfirm)) { + return false; + } } } else { if (!empty($pass)){ @@ -606,7 +611,7 @@ class admin_plugin_usermanager extends DokuWiki_Admin_Plugin { $oldinfo = $this->_auth->getUserData($olduser); // get new user data subject to change - list($newuser,$newpass,$newname,$newmail,$newgrps) = $this->_retrieveUser(); + list($newuser,$newpass,$newname,$newmail,$newgrps,$passconfirm) = $this->_retrieveUser(); if (empty($newuser)) return false; $changes = array(); @@ -625,10 +630,19 @@ class admin_plugin_usermanager extends DokuWiki_Admin_Plugin { $changes['user'] = $newuser; } } - - // generate password if left empty and notification is on - if($INPUT->has('usernotify') && empty($newpass)){ - $newpass = auth_pwgen($olduser); + if ($this->_auth->canDo('modPass')) { + if ($newpass || $confirm) { + if ($this->_verifyPassword($newpass,$passconfirm)) { + $changes['pass'] = $newpass; + } else { + return false; + } + } else { + // no new password supplied, check if we need to generate one (or it stays unchanged) + if ($INPUT->has('usernotify')) { + $changes['pass'] = auth_pwgen($olduser); + } + } } if (!empty($newname) && $this->_auth->canDo('modName') && $newname != $oldinfo['name']) { @@ -686,6 +700,31 @@ class admin_plugin_usermanager extends DokuWiki_Admin_Plugin { return $sent; } + /** + * Verify password meets minimum requirements + * :TODO: extend to support password strength + * + * @param string $password candidate string for new password + * @param string $confirm repeated password for confirmation + * @return bool true if meets requirements, false otherwise + */ + protected function _verifyPassword($password, $confirm) { + + if (empty($password)) { + return false; + } + + if ($password !== $confirm) { + msg($this->lang['pass_confirm_fail'], -1); + return false; + } + + // :TODO: test password for required strength + + // if we make it this far the password is good + return true; + } + /** * Retrieve & clean user data from the form * @@ -702,6 +741,7 @@ class admin_plugin_usermanager extends DokuWiki_Admin_Plugin { $user[2] = $INPUT->str('username'); $user[3] = $INPUT->str('usermail'); $user[4] = explode(',',$INPUT->str('usergroups')); + $user[5] = $INPUT->str('userpass2'); // repeated password for confirmation $user[4] = array_map('trim',$user[4]); if($clean) $user[4] = array_map(array($auth,'cleanGroup'),$user[4]); diff --git a/lib/plugins/usermanager/lang/en/lang.php b/lib/plugins/usermanager/lang/en/lang.php index f87c77afb..c18b5d684 100644 --- a/lib/plugins/usermanager/lang/en/lang.php +++ b/lib/plugins/usermanager/lang/en/lang.php @@ -76,4 +76,7 @@ $lang['import_error_create'] = 'Unable to create the user'; $lang['import_notify_fail'] = 'Notification message could not be sent for imported user, %s with email %s.'; $lang['import_downloadfailures'] = 'Download Failures as CSV for correction'; +// added 2014-02 +$lang['user_passconfirm'] = 'Confirm Password'; +$lang['pass_confirm_fail'] = 'Passwords do not match'; -- cgit v1.2.3 From acbf061c66059df3daf7cdbe7e8ec4182418dd20 Mon Sep 17 00:00:00 2001 From: Gerrit Uitslag Date: Sat, 15 Feb 2014 22:09:04 +0100 Subject: add Reply-To and Sender to whitelist for cleanAddress FS#2916 --- inc/Mailer.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inc/Mailer.class.php b/inc/Mailer.class.php index 2ac2c1d60..480dc0e01 100644 --- a/inc/Mailer.class.php +++ b/inc/Mailer.class.php @@ -522,7 +522,7 @@ class Mailer { // clean up addresses if(empty($this->headers['From'])) $this->from($conf['mailfrom']); - $addrs = array('To', 'From', 'Cc', 'Bcc'); + $addrs = array('To', 'From', 'Cc', 'Bcc', 'Reply-To', 'Sender'); foreach($addrs as $addr) { if(isset($this->headers[$addr])) { $this->headers[$addr] = $this->cleanAddress($this->headers[$addr]); -- cgit v1.2.3 From 8c253612ce858dfc41922e084c065888b592e8bd Mon Sep 17 00:00:00 2001 From: Gerrit Uitslag Date: Sat, 15 Feb 2014 22:09:24 +0100 Subject: improve PHPDocs of Mailer --- inc/Mailer.class.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/inc/Mailer.class.php b/inc/Mailer.class.php index 480dc0e01..e32178bba 100644 --- a/inc/Mailer.class.php +++ b/inc/Mailer.class.php @@ -277,7 +277,7 @@ class Mailer { /** * Add the To: recipients * - * @see setAddress + * @see cleanAddress * @param string|array $address Multiple adresses separated by commas or as array */ public function to($address) { @@ -287,7 +287,7 @@ class Mailer { /** * Add the Cc: recipients * - * @see setAddress + * @see cleanAddress * @param string|array $address Multiple adresses separated by commas or as array */ public function cc($address) { @@ -297,7 +297,7 @@ class Mailer { /** * Add the Bcc: recipients * - * @see setAddress + * @see cleanAddress * @param string|array $address Multiple adresses separated by commas or as array */ public function bcc($address) { @@ -310,7 +310,7 @@ class Mailer { * This is set to $conf['mailfrom'] when not specified so you shouldn't need * to call this function * - * @see setAddress + * @see cleanAddress * @param string $address from address */ public function from($address) { @@ -333,9 +333,9 @@ class Mailer { * for headers. Addresses may not contain Non-ASCII data! * * Example: - * setAddress("föö , me@somewhere.com","TBcc"); + * cc("föö , me@somewhere.com","TBcc"); * - * @param string|array $address Multiple adresses separated by commas or as array + * @param string|array $addresses Multiple adresses separated by commas or as array * @return bool|string the prepared header (can contain multiple lines) */ public function cleanAddress($addresses) { -- cgit v1.2.3 From 17954bb5e3033069554ebb963fb9040c52b4760b Mon Sep 17 00:00:00 2001 From: Anika Henke Date: Sat, 15 Feb 2014 22:46:32 +0000 Subject: added title to video/audio tags, use title for fallback links, refactored duplicate code --- inc/parser/xhtml.php | 51 ++++++++++++++++----------------------------------- 1 file changed, 16 insertions(+), 35 deletions(-) diff --git a/inc/parser/xhtml.php b/inc/parser/xhtml.php index 80701cd2e..9d75c271d 100644 --- a/inc/parser/xhtml.php +++ b/inc/parser/xhtml.php @@ -1096,48 +1096,30 @@ class Doku_Renderer_xhtml extends Doku_Renderer { $ret .= ' />'; - }elseif(media_supportedav($mime, 'video')){ + }elseif(media_supportedav($mime, 'video') || media_supportedav($mime, 'audio')){ // first get the $title - if (!is_null($title)) { - $title = $this->_xmlEntities($title); - } - if (!$title) { - // just show the sourcename - $title = $this->_xmlEntities(utf8_basename(noNS($src))); - } + $title = !is_null($title) ? $this->_xmlEntities($title) : false; if (!$render) { - // if the video is not supposed to be rendered - // return the title of the video - return $title; + // if the file is not supposed to be rendered + // return the title of the file (just the sourcename if there is no title) + return $title ? $title : $this->_xmlEntities(utf8_basename(noNS($src))); } $att = array(); $att['class'] = "media$align"; - - //add video(s) - $ret .= $this->_video($src, $width, $height, $att); - - }elseif(media_supportedav($mime, 'audio')){ - // first get the $title - if (!is_null($title)) { - $title = $this->_xmlEntities($title); + if ($title) { + $att['title'] = $title; } - if (!$title) { - // just show the sourcename - $title = $this->_xmlEntities(utf8_basename(noNS($src))); + + if (media_supportedav($mime, 'video')) { + //add video + $ret .= $this->_video($src, $width, $height, $att); } - if (!$render) { - // if the video is not supposed to be rendered - // return the title of the video - return $title; + if (media_supportedav($mime, 'audio')) { + //add audio + $ret .= $this->_audio($src, $att); } - $att = array(); - $att['class'] = "media$align"; - - //add audio - $ret .= $this->_audio($src, $att); - }elseif($mime == 'application/x-shockwave-flash'){ if (!$render) { // if the flash is not supposed to be rendered @@ -1282,7 +1264,6 @@ class Doku_Renderer_xhtml extends Doku_Renderer { * @return string */ function _video($src,$width,$height,$atts=null){ - // prepare width and height if(is_null($atts)) $atts = array(); $atts['width'] = (int) $width; @@ -1309,7 +1290,7 @@ class Doku_Renderer_xhtml extends Doku_Renderer { // output source for each alternative video format foreach($alternatives as $mime => $file) { $url = ml($file,array('cache'=>$cache),true,'&'); - $title = $this->_xmlEntities(utf8_basename(noNS($file))); + $title = $atts['title'] ? $atts['title'] : $this->_xmlEntities(utf8_basename(noNS($file))); $out .= ''.NL; // alternative content (just a link to the file) @@ -1345,7 +1326,7 @@ class Doku_Renderer_xhtml extends Doku_Renderer { // output source for each alternative audio format foreach($alternatives as $mime => $file) { $url = ml($file,array('cache'=>$cache),true,'&'); - $title = $this->_xmlEntities(utf8_basename(noNS($file))); + $title = $atts['title'] ? $atts['title'] : $this->_xmlEntities(utf8_basename(noNS($file))); $out .= ''.NL; // alternative content (just a link to the file) -- cgit v1.2.3 From 3f5b6538b677cb10221af901cbc1e4b9c9813c53 Mon Sep 17 00:00:00 2001 From: Anika Henke Date: Sat, 15 Feb 2014 22:55:10 +0000 Subject: updated syntax page to include recently added video and audio formats --- data/pages/wiki/syntax.txt | 29 +++++++++++++++++++++++++---- 1 file changed, 25 insertions(+), 4 deletions(-) diff --git a/data/pages/wiki/syntax.txt b/data/pages/wiki/syntax.txt index 02b49dc3d..86ad815e4 100644 --- a/data/pages/wiki/syntax.txt +++ b/data/pages/wiki/syntax.txt @@ -121,9 +121,9 @@ By using four or more dashes, you can make a horizontal line: ---- -===== Images and Other Files ===== +===== Media Files ===== -You can include external and internal [[doku>images]] with curly brackets. Optionally you can specify the size of them. +You can include external and internal [[doku>images|images, videos and audio files]] with curly brackets. Optionally you can specify the size of them. Real size: {{wiki:dokuwiki-128.png}} @@ -157,10 +157,31 @@ Of course, you can add a title (displayed as a tooltip by most browsers), too. {{ wiki:dokuwiki-128.png |This is the caption}} -If you specify a filename (external or internal) that is not an image (''gif, jpeg, png''), then it will be displayed as a link instead. - For linking an image to another page see [[#Image Links]] above. +==== Supported Media Formats ==== + +DokuWiki can embed the following media formats directly. + +| Image | ''gif'', ''jpg'', ''png'' | +| Video | ''webm'', ''ogv'', ''mp4'' | +| Audio | ''ogg'', ''mp3'', ''wav'' | +| Flash | ''swf'' | + +If you specify a filename that is not a supported media format, then it will be displayed as a link instead. + +==== Fallback Formats ==== + +Unfortunately not all browsers understand all video and audio formats. To mitigate the problem, you can upload your file in different formats for maximum browser compatibility. + +For example consider this embedded mp4 video: + + {{video.mp4|A funny video}} + +When you upload a ''video.webm'' and ''video.ogv'' next to the referenced ''video.mp4'', DokuWiki will automatically add them as alternatives so that one of the three files is understood by your browser. + +Additionally DokuWiki supports a "poster" image which will be shown before the video has started. That image needs to have the same filename as the video and be either a jpg or png file. In the example above a ''video.jpg'' file would work. + ===== Lists ===== Dokuwiki supports ordered and unordered lists. To create a list item, indent your text by two spaces and use a ''*'' for unordered lists or a ''-'' for ordered ones. -- cgit v1.2.3 From b83a74f191b6ee9120c0c376509164285480ebac Mon Sep 17 00:00:00 2001 From: Anika Henke Date: Sat, 15 Feb 2014 23:44:00 +0000 Subject: fixed typo in phpdoc --- inc/media.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inc/media.php b/inc/media.php index 56fa5d54b..fe155f0f3 100644 --- a/inc/media.php +++ b/inc/media.php @@ -2164,7 +2164,7 @@ function media_alternativefiles($src, $exts){ /** * Check if video/audio is supported to be embedded. * - * @param string $src - mimetype of media file + * @param string $mime - mimetype of media file * @param string $type - type of media files to check ('video', 'audio', or none) * @return boolean * -- cgit v1.2.3 From b95f73d374c43006a82eddd35b630bd10a9fbb5f Mon Sep 17 00:00:00 2001 From: Christopher Smith Date: Sun, 16 Feb 2014 16:20:54 +0000 Subject: Add ordering to event handlers Allows a sequence integer to be supplied when registering to handle an event. When processing an event, handlers (hooks) will be executed in ascending order of their sequence number. If two or more handlers have the same sequence number their order of execution is undefined. A handler wanting to be first, should use -PHP_MAX_INT. A handler wanting to be last can use PHP_MAX_INT. There may be conflicts if two or more plugins use these values in the expectation that they will guarantee being first or last. --- inc/events.php | 23 +++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) diff --git a/inc/events.php b/inc/events.php index f7b1a7a16..9c3169b34 100644 --- a/inc/events.php +++ b/inc/events.php @@ -148,9 +148,10 @@ class Doku_Event_Handler { * if NULL, method is assumed to be a globally available function * @param $method (function) event handler function * @param $param (mixed) data passed to the event handler + * @param $seq (int) sequence number for ordering hook execution (ascending) */ - function register_hook($event, $advise, $obj, $method, $param=null) { - $this->_hooks[$event.'_'.$advise][] = array($obj, $method, $param); + function register_hook($event, $advise, $obj, $method, $param=null, $seq=0) { + $this->_hooks[$event.'_'.$advise][] = array($obj, $method, $param, (int)$seq); } function process_event(&$event,$advise='') { @@ -158,8 +159,8 @@ class Doku_Event_Handler { $evt_name = $event->name . ($advise ? '_'.$advise : '_BEFORE'); if (!empty($this->_hooks[$evt_name])) { - foreach ($this->_hooks[$evt_name] as $hook) { - // list($obj, $method, $param) = $hook; + foreach ($this->sort_hooks($this->_hooks[$evt_name]) as $hook) { + // list($obj, $method, $param, $seq) = $hook; $obj =& $hook[0]; $method = $hook[1]; $param = $hook[2]; @@ -174,6 +175,20 @@ class Doku_Event_Handler { } } } + + protected function sort_hooks($hooks) { + usort($hooks, array('Doku_Event_Handler','cmp_hooks')); + return $hooks; + } + + public static function cmp_hooks($a, $b) { + if ($a[3] == $b[3]) { + return 0; + } + + return ($a[3] < $b[3]) ? -1 : 1; + } + } /** -- cgit v1.2.3 From adb80b0288b9e3c7c4576056d5e1d0dc77bcb842 Mon Sep 17 00:00:00 2001 From: Christopher Smith Date: Sun, 16 Feb 2014 16:35:34 +0000 Subject: An event object used as a string will return its name - the event name --- inc/events.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/inc/events.php b/inc/events.php index 9c3169b34..44ccdb8a6 100644 --- a/inc/events.php +++ b/inc/events.php @@ -32,6 +32,10 @@ class Doku_Event { } + function __toString() { + return $this->name; + } + /** * advise functions * -- cgit v1.2.3 From d668eb9fab52028922a60c337d370b956602a533 Mon Sep 17 00:00:00 2001 From: Christopher Smith Date: Sun, 16 Feb 2014 16:36:33 +0000 Subject: since php 5, no need to access objects by reference --- inc/events.php | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/inc/events.php b/inc/events.php index 44ccdb8a6..ed60c95fe 100644 --- a/inc/events.php +++ b/inc/events.php @@ -164,10 +164,7 @@ class Doku_Event_Handler { if (!empty($this->_hooks[$evt_name])) { foreach ($this->sort_hooks($this->_hooks[$evt_name]) as $hook) { - // list($obj, $method, $param, $seq) = $hook; - $obj =& $hook[0]; - $method = $hook[1]; - $param = $hook[2]; + list($obj, $method, $param, $seq) = $hook; if (is_null($obj)) { $method($event, $param); -- cgit v1.2.3 From be9008d3e4137a2456222098dfe45589e23ee3cf Mon Sep 17 00:00:00 2001 From: Christopher Smith Date: Sun, 16 Feb 2014 17:54:48 +0000 Subject: user global strings for password confirmation prompt & error --- lib/plugins/usermanager/admin.php | 6 ++++-- lib/plugins/usermanager/lang/en/lang.php | 4 ---- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/lib/plugins/usermanager/admin.php b/lib/plugins/usermanager/admin.php index faa4b8d31..aac2da605 100644 --- a/lib/plugins/usermanager/admin.php +++ b/lib/plugins/usermanager/admin.php @@ -277,6 +277,7 @@ class admin_plugin_usermanager extends DokuWiki_Admin_Plugin { protected function _htmlUserForm($cmd,$user='',$userdata=array(),$indent=0) { global $conf; global $ID; + global $lang; $name = $mail = $groups = ''; $notes = array(); @@ -299,7 +300,7 @@ class admin_plugin_usermanager extends DokuWiki_Admin_Plugin { $this->_htmlInputField($cmd."_userid", "userid", $this->lang["user_id"], $user, $this->_auth->canDo("modLogin"), $indent+6); $this->_htmlInputField($cmd."_userpass", "userpass", $this->lang["user_pass"], "", $this->_auth->canDo("modPass"), $indent+6); - $this->_htmlInputField($cmd."_userpass2", "userpass2", $this->lang["user_passconfirm"], "", $this->_auth->canDo("modPass"), $indent+6); + $this->_htmlInputField($cmd."_userpass2", "userpass2", $lang["passchk"], "", $this->_auth->canDo("modPass"), $indent+6); $this->_htmlInputField($cmd."_username", "username", $this->lang["user_name"], $name, $this->_auth->canDo("modName"), $indent+6); $this->_htmlInputField($cmd."_usermail", "usermail", $this->lang["user_mail"], $mail, $this->_auth->canDo("modMail"), $indent+6); $this->_htmlInputField($cmd."_usergroups","usergroups",$this->lang["user_groups"],$groups,$this->_auth->canDo("modGroups"),$indent+6); @@ -709,13 +710,14 @@ class admin_plugin_usermanager extends DokuWiki_Admin_Plugin { * @return bool true if meets requirements, false otherwise */ protected function _verifyPassword($password, $confirm) { + global $lang; if (empty($password)) { return false; } if ($password !== $confirm) { - msg($this->lang['pass_confirm_fail'], -1); + msg($lang['regbadpass'], -1); return false; } diff --git a/lib/plugins/usermanager/lang/en/lang.php b/lib/plugins/usermanager/lang/en/lang.php index c18b5d684..b55ecc998 100644 --- a/lib/plugins/usermanager/lang/en/lang.php +++ b/lib/plugins/usermanager/lang/en/lang.php @@ -76,7 +76,3 @@ $lang['import_error_create'] = 'Unable to create the user'; $lang['import_notify_fail'] = 'Notification message could not be sent for imported user, %s with email %s.'; $lang['import_downloadfailures'] = 'Download Failures as CSV for correction'; -// added 2014-02 -$lang['user_passconfirm'] = 'Confirm Password'; -$lang['pass_confirm_fail'] = 'Passwords do not match'; - -- cgit v1.2.3 From dfe934f96f476bdcf60d82feceb4d2a78df28ca0 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Sun, 16 Feb 2014 20:52:10 +0100 Subject: Switched file icons against generated ones, added 32x32 versions --- inc/media.php | 6 +++--- lib/exe/css.php | 6 +++--- lib/images/fileicons/16x16/7z.png | Bin 0 -> 415 bytes lib/images/fileicons/16x16/bz2.png | Bin 0 -> 419 bytes lib/images/fileicons/16x16/conf.png | Bin 0 -> 402 bytes lib/images/fileicons/16x16/csv.png | Bin 0 -> 409 bytes lib/images/fileicons/16x16/deb.png | Bin 0 -> 421 bytes lib/images/fileicons/16x16/doc.png | Bin 0 -> 410 bytes lib/images/fileicons/16x16/docx.png | Bin 0 -> 415 bytes lib/images/fileicons/16x16/file.png | Bin 0 -> 319 bytes lib/images/fileicons/16x16/gif.png | Bin 0 -> 414 bytes lib/images/fileicons/16x16/gz.png | Bin 0 -> 417 bytes lib/images/fileicons/16x16/htm.png | Bin 0 -> 402 bytes lib/images/fileicons/16x16/html.png | Bin 0 -> 391 bytes lib/images/fileicons/16x16/ico.png | Bin 0 -> 413 bytes lib/images/fileicons/16x16/jpeg.png | Bin 0 -> 424 bytes lib/images/fileicons/16x16/jpg.png | Bin 0 -> 418 bytes lib/images/fileicons/16x16/mp3.png | Bin 0 -> 415 bytes lib/images/fileicons/16x16/mp4.png | Bin 0 -> 419 bytes lib/images/fileicons/16x16/odc.png | Bin 0 -> 407 bytes lib/images/fileicons/16x16/odf.png | Bin 0 -> 411 bytes lib/images/fileicons/16x16/odg.png | Bin 0 -> 411 bytes lib/images/fileicons/16x16/odi.png | Bin 0 -> 398 bytes lib/images/fileicons/16x16/odp.png | Bin 0 -> 404 bytes lib/images/fileicons/16x16/ods.png | Bin 0 -> 416 bytes lib/images/fileicons/16x16/odt.png | Bin 0 -> 403 bytes lib/images/fileicons/16x16/ogg.png | Bin 0 -> 408 bytes lib/images/fileicons/16x16/ogv.png | Bin 0 -> 412 bytes lib/images/fileicons/16x16/pdf.png | Bin 0 -> 419 bytes lib/images/fileicons/16x16/png.png | Bin 0 -> 412 bytes lib/images/fileicons/16x16/ppt.png | Bin 0 -> 412 bytes lib/images/fileicons/16x16/pptx.png | Bin 0 -> 414 bytes lib/images/fileicons/16x16/ps.png | Bin 0 -> 416 bytes lib/images/fileicons/16x16/rar.png | Bin 0 -> 418 bytes lib/images/fileicons/16x16/rpm.png | Bin 0 -> 415 bytes lib/images/fileicons/16x16/rtf.png | Bin 0 -> 418 bytes lib/images/fileicons/16x16/swf.png | Bin 0 -> 416 bytes lib/images/fileicons/16x16/sxc.png | Bin 0 -> 420 bytes lib/images/fileicons/16x16/sxd.png | Bin 0 -> 424 bytes lib/images/fileicons/16x16/sxi.png | Bin 0 -> 414 bytes lib/images/fileicons/16x16/sxw.png | Bin 0 -> 417 bytes lib/images/fileicons/16x16/tar.png | Bin 0 -> 417 bytes lib/images/fileicons/16x16/tgz.png | Bin 0 -> 417 bytes lib/images/fileicons/16x16/txt.png | Bin 0 -> 407 bytes lib/images/fileicons/16x16/wav.png | Bin 0 -> 415 bytes lib/images/fileicons/16x16/webm.png | Bin 0 -> 412 bytes lib/images/fileicons/16x16/xls.png | Bin 0 -> 415 bytes lib/images/fileicons/16x16/xlsx.png | Bin 0 -> 425 bytes lib/images/fileicons/16x16/xml.png | Bin 0 -> 400 bytes lib/images/fileicons/16x16/zip.png | Bin 0 -> 418 bytes lib/images/fileicons/32x32/7z.png | Bin 0 -> 992 bytes lib/images/fileicons/32x32/bz2.png | Bin 0 -> 1001 bytes lib/images/fileicons/32x32/conf.png | Bin 0 -> 832 bytes lib/images/fileicons/32x32/csv.png | Bin 0 -> 819 bytes lib/images/fileicons/32x32/deb.png | Bin 0 -> 991 bytes lib/images/fileicons/32x32/doc.png | Bin 0 -> 1034 bytes lib/images/fileicons/32x32/docx.png | Bin 0 -> 1078 bytes lib/images/fileicons/32x32/file.png | Bin 0 -> 605 bytes lib/images/fileicons/32x32/gif.png | Bin 0 -> 944 bytes lib/images/fileicons/32x32/gz.png | Bin 0 -> 994 bytes lib/images/fileicons/32x32/htm.png | Bin 0 -> 819 bytes lib/images/fileicons/32x32/html.png | Bin 0 -> 827 bytes lib/images/fileicons/32x32/ico.png | Bin 0 -> 941 bytes lib/images/fileicons/32x32/jpeg.png | Bin 0 -> 966 bytes lib/images/fileicons/32x32/jpg.png | Bin 0 -> 949 bytes lib/images/fileicons/32x32/mp3.png | Bin 0 -> 947 bytes lib/images/fileicons/32x32/mp4.png | Bin 0 -> 1197 bytes lib/images/fileicons/32x32/odc.png | Bin 0 -> 1061 bytes lib/images/fileicons/32x32/odf.png | Bin 0 -> 1059 bytes lib/images/fileicons/32x32/odg.png | Bin 0 -> 1066 bytes lib/images/fileicons/32x32/odi.png | Bin 0 -> 1058 bytes lib/images/fileicons/32x32/odp.png | Bin 0 -> 1060 bytes lib/images/fileicons/32x32/ods.png | Bin 0 -> 1063 bytes lib/images/fileicons/32x32/odt.png | Bin 0 -> 1060 bytes lib/images/fileicons/32x32/ogg.png | Bin 0 -> 950 bytes lib/images/fileicons/32x32/ogv.png | Bin 0 -> 1187 bytes lib/images/fileicons/32x32/pdf.png | Bin 0 -> 1072 bytes lib/images/fileicons/32x32/png.png | Bin 0 -> 957 bytes lib/images/fileicons/32x32/ppt.png | Bin 0 -> 871 bytes lib/images/fileicons/32x32/pptx.png | Bin 0 -> 924 bytes lib/images/fileicons/32x32/ps.png | Bin 0 -> 595 bytes lib/images/fileicons/32x32/rar.png | Bin 0 -> 1000 bytes lib/images/fileicons/32x32/rpm.png | Bin 0 -> 1001 bytes lib/images/fileicons/32x32/rtf.png | Bin 0 -> 1035 bytes lib/images/fileicons/32x32/swf.png | Bin 0 -> 1268 bytes lib/images/fileicons/32x32/sxc.png | Bin 0 -> 1078 bytes lib/images/fileicons/32x32/sxd.png | Bin 0 -> 1079 bytes lib/images/fileicons/32x32/sxi.png | Bin 0 -> 1067 bytes lib/images/fileicons/32x32/sxw.png | Bin 0 -> 1086 bytes lib/images/fileicons/32x32/tar.png | Bin 0 -> 987 bytes lib/images/fileicons/32x32/tgz.png | Bin 0 -> 999 bytes lib/images/fileicons/32x32/txt.png | Bin 0 -> 836 bytes lib/images/fileicons/32x32/wav.png | Bin 0 -> 944 bytes lib/images/fileicons/32x32/webm.png | Bin 0 -> 1232 bytes lib/images/fileicons/32x32/xls.png | Bin 0 -> 1137 bytes lib/images/fileicons/32x32/xlsx.png | Bin 0 -> 1182 bytes lib/images/fileicons/32x32/xml.png | Bin 0 -> 818 bytes lib/images/fileicons/32x32/zip.png | Bin 0 -> 987 bytes lib/images/fileicons/7z.png | Bin 651 -> 0 bytes lib/images/fileicons/audio.png | Bin 727 -> 0 bytes lib/images/fileicons/bz2.png | Bin 641 -> 0 bytes lib/images/fileicons/c.png | Bin 759 -> 0 bytes lib/images/fileicons/conf.png | Bin 664 -> 0 bytes lib/images/fileicons/cpp.png | Bin 822 -> 0 bytes lib/images/fileicons/cs.png | Bin 771 -> 0 bytes lib/images/fileicons/css.png | Bin 843 -> 0 bytes lib/images/fileicons/csv.png | Bin 400 -> 0 bytes lib/images/fileicons/deb.png | Bin 646 -> 0 bytes lib/images/fileicons/doc.png | Bin 583 -> 0 bytes lib/images/fileicons/docx.png | Bin 583 -> 0 bytes lib/images/fileicons/file.png | Bin 581 -> 0 bytes lib/images/fileicons/generate.php | 35 +++++++++++++++++++++++++++++++++++ lib/images/fileicons/gif.png | Bin 907 -> 0 bytes lib/images/fileicons/gz.png | Bin 643 -> 0 bytes lib/images/fileicons/htm.png | Bin 695 -> 0 bytes lib/images/fileicons/html.png | Bin 695 -> 0 bytes lib/images/fileicons/ico.png | Bin 907 -> 0 bytes lib/images/fileicons/index.php | 23 +++++++++++++++++++++-- lib/images/fileicons/java.png | Bin 739 -> 0 bytes lib/images/fileicons/jpeg.png | Bin 907 -> 0 bytes lib/images/fileicons/jpg.png | Bin 907 -> 0 bytes lib/images/fileicons/js.png | Bin 809 -> 0 bytes lib/images/fileicons/lua.png | Bin 440 -> 0 bytes lib/images/fileicons/mp3.png | Bin 831 -> 0 bytes lib/images/fileicons/mp4.png | Bin 740 -> 0 bytes lib/images/fileicons/odc.png | Bin 682 -> 0 bytes lib/images/fileicons/odf.png | Bin 746 -> 0 bytes lib/images/fileicons/odg.png | Bin 735 -> 0 bytes lib/images/fileicons/odi.png | Bin 735 -> 0 bytes lib/images/fileicons/odp.png | Bin 687 -> 0 bytes lib/images/fileicons/ods.png | Bin 682 -> 0 bytes lib/images/fileicons/odt.png | Bin 522 -> 0 bytes lib/images/fileicons/ogg.png | Bin 807 -> 0 bytes lib/images/fileicons/ogv.png | Bin 740 -> 0 bytes lib/images/fileicons/pdf.png | Bin 592 -> 0 bytes lib/images/fileicons/php.png | Bin 749 -> 0 bytes lib/images/fileicons/pl.png | Bin 685 -> 0 bytes lib/images/fileicons/png.png | Bin 907 -> 0 bytes lib/images/fileicons/ppt.png | Bin 697 -> 0 bytes lib/images/fileicons/pptx.png | Bin 697 -> 0 bytes lib/images/fileicons/ps.png | Bin 470 -> 0 bytes lib/images/fileicons/py.png | Bin 683 -> 0 bytes lib/images/fileicons/rar.png | Bin 557 -> 0 bytes lib/images/fileicons/rb.png | Bin 802 -> 0 bytes lib/images/fileicons/rpm.png | Bin 555 -> 0 bytes lib/images/fileicons/rtf.png | Bin 402 -> 0 bytes lib/images/fileicons/sql.png | Bin 813 -> 0 bytes lib/images/fileicons/swf.png | Bin 732 -> 0 bytes lib/images/fileicons/sxc.png | Bin 682 -> 0 bytes lib/images/fileicons/sxd.png | Bin 735 -> 0 bytes lib/images/fileicons/sxi.png | Bin 687 -> 0 bytes lib/images/fileicons/sxw.png | Bin 522 -> 0 bytes lib/images/fileicons/tar.png | Bin 663 -> 0 bytes lib/images/fileicons/tgz.png | Bin 643 -> 0 bytes lib/images/fileicons/txt.png | Bin 466 -> 0 bytes lib/images/fileicons/wav.png | Bin 820 -> 0 bytes lib/images/fileicons/webm.png | Bin 740 -> 0 bytes lib/images/fileicons/xls.png | Bin 670 -> 0 bytes lib/images/fileicons/xlsx.png | Bin 670 -> 0 bytes lib/images/fileicons/xml.png | Bin 409 -> 0 bytes lib/images/fileicons/zip.png | Bin 800 -> 0 bytes 161 files changed, 62 insertions(+), 8 deletions(-) create mode 100644 lib/images/fileicons/16x16/7z.png create mode 100644 lib/images/fileicons/16x16/bz2.png create mode 100644 lib/images/fileicons/16x16/conf.png create mode 100644 lib/images/fileicons/16x16/csv.png create mode 100644 lib/images/fileicons/16x16/deb.png create mode 100644 lib/images/fileicons/16x16/doc.png create mode 100644 lib/images/fileicons/16x16/docx.png create mode 100644 lib/images/fileicons/16x16/file.png create mode 100644 lib/images/fileicons/16x16/gif.png create mode 100644 lib/images/fileicons/16x16/gz.png create mode 100644 lib/images/fileicons/16x16/htm.png create mode 100644 lib/images/fileicons/16x16/html.png create mode 100644 lib/images/fileicons/16x16/ico.png create mode 100644 lib/images/fileicons/16x16/jpeg.png create mode 100644 lib/images/fileicons/16x16/jpg.png create mode 100644 lib/images/fileicons/16x16/mp3.png create mode 100644 lib/images/fileicons/16x16/mp4.png create mode 100644 lib/images/fileicons/16x16/odc.png create mode 100644 lib/images/fileicons/16x16/odf.png create mode 100644 lib/images/fileicons/16x16/odg.png create mode 100644 lib/images/fileicons/16x16/odi.png create mode 100644 lib/images/fileicons/16x16/odp.png create mode 100644 lib/images/fileicons/16x16/ods.png create mode 100644 lib/images/fileicons/16x16/odt.png create mode 100644 lib/images/fileicons/16x16/ogg.png create mode 100644 lib/images/fileicons/16x16/ogv.png create mode 100644 lib/images/fileicons/16x16/pdf.png create mode 100644 lib/images/fileicons/16x16/png.png create mode 100644 lib/images/fileicons/16x16/ppt.png create mode 100644 lib/images/fileicons/16x16/pptx.png create mode 100644 lib/images/fileicons/16x16/ps.png create mode 100644 lib/images/fileicons/16x16/rar.png create mode 100644 lib/images/fileicons/16x16/rpm.png create mode 100644 lib/images/fileicons/16x16/rtf.png create mode 100644 lib/images/fileicons/16x16/swf.png create mode 100644 lib/images/fileicons/16x16/sxc.png create mode 100644 lib/images/fileicons/16x16/sxd.png create mode 100644 lib/images/fileicons/16x16/sxi.png create mode 100644 lib/images/fileicons/16x16/sxw.png create mode 100644 lib/images/fileicons/16x16/tar.png create mode 100644 lib/images/fileicons/16x16/tgz.png create mode 100644 lib/images/fileicons/16x16/txt.png create mode 100644 lib/images/fileicons/16x16/wav.png create mode 100644 lib/images/fileicons/16x16/webm.png create mode 100644 lib/images/fileicons/16x16/xls.png create mode 100644 lib/images/fileicons/16x16/xlsx.png create mode 100644 lib/images/fileicons/16x16/xml.png create mode 100644 lib/images/fileicons/16x16/zip.png create mode 100644 lib/images/fileicons/32x32/7z.png create mode 100644 lib/images/fileicons/32x32/bz2.png create mode 100644 lib/images/fileicons/32x32/conf.png create mode 100644 lib/images/fileicons/32x32/csv.png create mode 100644 lib/images/fileicons/32x32/deb.png create mode 100644 lib/images/fileicons/32x32/doc.png create mode 100644 lib/images/fileicons/32x32/docx.png create mode 100644 lib/images/fileicons/32x32/file.png create mode 100644 lib/images/fileicons/32x32/gif.png create mode 100644 lib/images/fileicons/32x32/gz.png create mode 100644 lib/images/fileicons/32x32/htm.png create mode 100644 lib/images/fileicons/32x32/html.png create mode 100644 lib/images/fileicons/32x32/ico.png create mode 100644 lib/images/fileicons/32x32/jpeg.png create mode 100644 lib/images/fileicons/32x32/jpg.png create mode 100644 lib/images/fileicons/32x32/mp3.png create mode 100644 lib/images/fileicons/32x32/mp4.png create mode 100644 lib/images/fileicons/32x32/odc.png create mode 100644 lib/images/fileicons/32x32/odf.png create mode 100644 lib/images/fileicons/32x32/odg.png create mode 100644 lib/images/fileicons/32x32/odi.png create mode 100644 lib/images/fileicons/32x32/odp.png create mode 100644 lib/images/fileicons/32x32/ods.png create mode 100644 lib/images/fileicons/32x32/odt.png create mode 100644 lib/images/fileicons/32x32/ogg.png create mode 100644 lib/images/fileicons/32x32/ogv.png create mode 100644 lib/images/fileicons/32x32/pdf.png create mode 100644 lib/images/fileicons/32x32/png.png create mode 100644 lib/images/fileicons/32x32/ppt.png create mode 100644 lib/images/fileicons/32x32/pptx.png create mode 100644 lib/images/fileicons/32x32/ps.png create mode 100644 lib/images/fileicons/32x32/rar.png create mode 100644 lib/images/fileicons/32x32/rpm.png create mode 100644 lib/images/fileicons/32x32/rtf.png create mode 100644 lib/images/fileicons/32x32/swf.png create mode 100644 lib/images/fileicons/32x32/sxc.png create mode 100644 lib/images/fileicons/32x32/sxd.png create mode 100644 lib/images/fileicons/32x32/sxi.png create mode 100644 lib/images/fileicons/32x32/sxw.png create mode 100644 lib/images/fileicons/32x32/tar.png create mode 100644 lib/images/fileicons/32x32/tgz.png create mode 100644 lib/images/fileicons/32x32/txt.png create mode 100644 lib/images/fileicons/32x32/wav.png create mode 100644 lib/images/fileicons/32x32/webm.png create mode 100644 lib/images/fileicons/32x32/xls.png create mode 100644 lib/images/fileicons/32x32/xlsx.png create mode 100644 lib/images/fileicons/32x32/xml.png create mode 100644 lib/images/fileicons/32x32/zip.png delete mode 100644 lib/images/fileicons/7z.png delete mode 100644 lib/images/fileicons/audio.png delete mode 100644 lib/images/fileicons/bz2.png delete mode 100644 lib/images/fileicons/c.png delete mode 100644 lib/images/fileicons/conf.png delete mode 100644 lib/images/fileicons/cpp.png delete mode 100644 lib/images/fileicons/cs.png delete mode 100644 lib/images/fileicons/css.png delete mode 100644 lib/images/fileicons/csv.png delete mode 100644 lib/images/fileicons/deb.png delete mode 100644 lib/images/fileicons/doc.png delete mode 100644 lib/images/fileicons/docx.png delete mode 100644 lib/images/fileicons/file.png create mode 100644 lib/images/fileicons/generate.php delete mode 100644 lib/images/fileicons/gif.png delete mode 100644 lib/images/fileicons/gz.png delete mode 100644 lib/images/fileicons/htm.png delete mode 100644 lib/images/fileicons/html.png delete mode 100644 lib/images/fileicons/ico.png delete mode 100644 lib/images/fileicons/java.png delete mode 100644 lib/images/fileicons/jpeg.png delete mode 100644 lib/images/fileicons/jpg.png delete mode 100644 lib/images/fileicons/js.png delete mode 100644 lib/images/fileicons/lua.png delete mode 100644 lib/images/fileicons/mp3.png delete mode 100644 lib/images/fileicons/mp4.png delete mode 100644 lib/images/fileicons/odc.png delete mode 100644 lib/images/fileicons/odf.png delete mode 100644 lib/images/fileicons/odg.png delete mode 100644 lib/images/fileicons/odi.png delete mode 100644 lib/images/fileicons/odp.png delete mode 100644 lib/images/fileicons/ods.png delete mode 100644 lib/images/fileicons/odt.png delete mode 100644 lib/images/fileicons/ogg.png delete mode 100644 lib/images/fileicons/ogv.png delete mode 100644 lib/images/fileicons/pdf.png delete mode 100644 lib/images/fileicons/php.png delete mode 100644 lib/images/fileicons/pl.png delete mode 100644 lib/images/fileicons/png.png delete mode 100644 lib/images/fileicons/ppt.png delete mode 100644 lib/images/fileicons/pptx.png delete mode 100644 lib/images/fileicons/ps.png delete mode 100644 lib/images/fileicons/py.png delete mode 100644 lib/images/fileicons/rar.png delete mode 100644 lib/images/fileicons/rb.png delete mode 100644 lib/images/fileicons/rpm.png delete mode 100644 lib/images/fileicons/rtf.png delete mode 100644 lib/images/fileicons/sql.png delete mode 100644 lib/images/fileicons/swf.png delete mode 100644 lib/images/fileicons/sxc.png delete mode 100644 lib/images/fileicons/sxd.png delete mode 100644 lib/images/fileicons/sxi.png delete mode 100644 lib/images/fileicons/sxw.png delete mode 100644 lib/images/fileicons/tar.png delete mode 100644 lib/images/fileicons/tgz.png delete mode 100644 lib/images/fileicons/txt.png delete mode 100644 lib/images/fileicons/wav.png delete mode 100644 lib/images/fileicons/webm.png delete mode 100644 lib/images/fileicons/xls.png delete mode 100644 lib/images/fileicons/xlsx.png delete mode 100644 lib/images/fileicons/xml.png delete mode 100644 lib/images/fileicons/zip.png diff --git a/inc/media.php b/inc/media.php index 56fa5d54b..803587c64 100644 --- a/inc/media.php +++ b/inc/media.php @@ -1427,10 +1427,10 @@ function media_printfile($item,$auth,$jump,$display_namespace=false){ function media_printicon($filename){ list($ext) = mimetype(mediaFN($filename),false); - if (@file_exists(DOKU_INC.'lib/images/fileicons/'.$ext.'.png')) { - $icon = DOKU_BASE.'lib/images/fileicons/'.$ext.'.png'; + if (@file_exists(DOKU_INC.'lib/images/fileicons/32x32/'.$ext.'.png')) { + $icon = DOKU_BASE.'lib/images/fileicons/32x32/'.$ext.'.png'; } else { - $icon = DOKU_BASE.'lib/images/fileicons/file.png'; + $icon = DOKU_BASE.'lib/images/fileicons/32x32/file.png'; } return ''.$filename.''; diff --git a/lib/exe/css.php b/lib/exe/css.php index cab7384b2..128fd5389 100644 --- a/lib/exe/css.php +++ b/lib/exe/css.php @@ -369,7 +369,7 @@ function css_filetypes(){ // default style echo '.mediafile {'; - echo ' background: transparent url('.DOKU_BASE.'lib/images/fileicons/file.png) 0px 1px no-repeat;'; + echo ' background: transparent url('.DOKU_BASE.'lib/images/fileicons/16x16/file.png) 0px 1px no-repeat;'; echo ' padding-left: 18px;'; echo ' padding-bottom: 1px;'; echo '}'; @@ -377,7 +377,7 @@ function css_filetypes(){ // additional styles when icon available // scan directory for all icons $exts = array(); - if($dh = opendir(DOKU_INC.'lib/images/fileicons')){ + if($dh = opendir(DOKU_INC.'lib/images/fileicons/16x16')){ while(false !== ($file = readdir($dh))){ if(preg_match('/([_\-a-z0-9]+(?:\.[_\-a-z0-9]+)*?)\.(png|gif)/i',$file,$match)){ $ext = strtolower($match[1]); @@ -392,7 +392,7 @@ function css_filetypes(){ foreach($exts as $ext=>$type){ $class = preg_replace('/[^_\-a-z0-9]+/','_',$ext); echo ".mf_$class {"; - echo ' background-image: url('.DOKU_BASE.'lib/images/fileicons/'.$ext.$type.')'; + echo ' background-image: url('.DOKU_BASE.'lib/images/fileicons/16x16/'.$ext.$type.')'; echo '}'; } } diff --git a/lib/images/fileicons/16x16/7z.png b/lib/images/fileicons/16x16/7z.png new file mode 100644 index 000000000..037cd73a0 Binary files /dev/null and b/lib/images/fileicons/16x16/7z.png differ diff --git a/lib/images/fileicons/16x16/bz2.png b/lib/images/fileicons/16x16/bz2.png new file mode 100644 index 000000000..a4bcc70a1 Binary files /dev/null and b/lib/images/fileicons/16x16/bz2.png differ diff --git a/lib/images/fileicons/16x16/conf.png b/lib/images/fileicons/16x16/conf.png new file mode 100644 index 000000000..94ace02cf Binary files /dev/null and b/lib/images/fileicons/16x16/conf.png differ diff --git a/lib/images/fileicons/16x16/csv.png b/lib/images/fileicons/16x16/csv.png new file mode 100644 index 000000000..af37ba577 Binary files /dev/null and b/lib/images/fileicons/16x16/csv.png differ diff --git a/lib/images/fileicons/16x16/deb.png b/lib/images/fileicons/16x16/deb.png new file mode 100644 index 000000000..9eb29019b Binary files /dev/null and b/lib/images/fileicons/16x16/deb.png differ diff --git a/lib/images/fileicons/16x16/doc.png b/lib/images/fileicons/16x16/doc.png new file mode 100644 index 000000000..925494576 Binary files /dev/null and b/lib/images/fileicons/16x16/doc.png differ diff --git a/lib/images/fileicons/16x16/docx.png b/lib/images/fileicons/16x16/docx.png new file mode 100644 index 000000000..5bae13f9e Binary files /dev/null and b/lib/images/fileicons/16x16/docx.png differ diff --git a/lib/images/fileicons/16x16/file.png b/lib/images/fileicons/16x16/file.png new file mode 100644 index 000000000..8f31d38ac Binary files /dev/null and b/lib/images/fileicons/16x16/file.png differ diff --git a/lib/images/fileicons/16x16/gif.png b/lib/images/fileicons/16x16/gif.png new file mode 100644 index 000000000..d8eb57e54 Binary files /dev/null and b/lib/images/fileicons/16x16/gif.png differ diff --git a/lib/images/fileicons/16x16/gz.png b/lib/images/fileicons/16x16/gz.png new file mode 100644 index 000000000..0a0a4b94f Binary files /dev/null and b/lib/images/fileicons/16x16/gz.png differ diff --git a/lib/images/fileicons/16x16/htm.png b/lib/images/fileicons/16x16/htm.png new file mode 100644 index 000000000..8312c33a8 Binary files /dev/null and b/lib/images/fileicons/16x16/htm.png differ diff --git a/lib/images/fileicons/16x16/html.png b/lib/images/fileicons/16x16/html.png new file mode 100644 index 000000000..7a7fcc0fa Binary files /dev/null and b/lib/images/fileicons/16x16/html.png differ diff --git a/lib/images/fileicons/16x16/ico.png b/lib/images/fileicons/16x16/ico.png new file mode 100644 index 000000000..9d4259c1b Binary files /dev/null and b/lib/images/fileicons/16x16/ico.png differ diff --git a/lib/images/fileicons/16x16/jpeg.png b/lib/images/fileicons/16x16/jpeg.png new file mode 100644 index 000000000..3a7d8a7f9 Binary files /dev/null and b/lib/images/fileicons/16x16/jpeg.png differ diff --git a/lib/images/fileicons/16x16/jpg.png b/lib/images/fileicons/16x16/jpg.png new file mode 100644 index 000000000..7152ebdb6 Binary files /dev/null and b/lib/images/fileicons/16x16/jpg.png differ diff --git a/lib/images/fileicons/16x16/mp3.png b/lib/images/fileicons/16x16/mp3.png new file mode 100644 index 000000000..7c6d37184 Binary files /dev/null and b/lib/images/fileicons/16x16/mp3.png differ diff --git a/lib/images/fileicons/16x16/mp4.png b/lib/images/fileicons/16x16/mp4.png new file mode 100644 index 000000000..ee5b91150 Binary files /dev/null and b/lib/images/fileicons/16x16/mp4.png differ diff --git a/lib/images/fileicons/16x16/odc.png b/lib/images/fileicons/16x16/odc.png new file mode 100644 index 000000000..331140552 Binary files /dev/null and b/lib/images/fileicons/16x16/odc.png differ diff --git a/lib/images/fileicons/16x16/odf.png b/lib/images/fileicons/16x16/odf.png new file mode 100644 index 000000000..eccae9e20 Binary files /dev/null and b/lib/images/fileicons/16x16/odf.png differ diff --git a/lib/images/fileicons/16x16/odg.png b/lib/images/fileicons/16x16/odg.png new file mode 100644 index 000000000..5224425e6 Binary files /dev/null and b/lib/images/fileicons/16x16/odg.png differ diff --git a/lib/images/fileicons/16x16/odi.png b/lib/images/fileicons/16x16/odi.png new file mode 100644 index 000000000..b57fd974d Binary files /dev/null and b/lib/images/fileicons/16x16/odi.png differ diff --git a/lib/images/fileicons/16x16/odp.png b/lib/images/fileicons/16x16/odp.png new file mode 100644 index 000000000..81d1023c0 Binary files /dev/null and b/lib/images/fileicons/16x16/odp.png differ diff --git a/lib/images/fileicons/16x16/ods.png b/lib/images/fileicons/16x16/ods.png new file mode 100644 index 000000000..77e6d5366 Binary files /dev/null and b/lib/images/fileicons/16x16/ods.png differ diff --git a/lib/images/fileicons/16x16/odt.png b/lib/images/fileicons/16x16/odt.png new file mode 100644 index 000000000..8490eec74 Binary files /dev/null and b/lib/images/fileicons/16x16/odt.png differ diff --git a/lib/images/fileicons/16x16/ogg.png b/lib/images/fileicons/16x16/ogg.png new file mode 100644 index 000000000..38f615c99 Binary files /dev/null and b/lib/images/fileicons/16x16/ogg.png differ diff --git a/lib/images/fileicons/16x16/ogv.png b/lib/images/fileicons/16x16/ogv.png new file mode 100644 index 000000000..a937dfc4c Binary files /dev/null and b/lib/images/fileicons/16x16/ogv.png differ diff --git a/lib/images/fileicons/16x16/pdf.png b/lib/images/fileicons/16x16/pdf.png new file mode 100644 index 000000000..a3a30e475 Binary files /dev/null and b/lib/images/fileicons/16x16/pdf.png differ diff --git a/lib/images/fileicons/16x16/png.png b/lib/images/fileicons/16x16/png.png new file mode 100644 index 000000000..00ce3e400 Binary files /dev/null and b/lib/images/fileicons/16x16/png.png differ diff --git a/lib/images/fileicons/16x16/ppt.png b/lib/images/fileicons/16x16/ppt.png new file mode 100644 index 000000000..3355c2712 Binary files /dev/null and b/lib/images/fileicons/16x16/ppt.png differ diff --git a/lib/images/fileicons/16x16/pptx.png b/lib/images/fileicons/16x16/pptx.png new file mode 100644 index 000000000..269cdb8fc Binary files /dev/null and b/lib/images/fileicons/16x16/pptx.png differ diff --git a/lib/images/fileicons/16x16/ps.png b/lib/images/fileicons/16x16/ps.png new file mode 100644 index 000000000..089caeb7a Binary files /dev/null and b/lib/images/fileicons/16x16/ps.png differ diff --git a/lib/images/fileicons/16x16/rar.png b/lib/images/fileicons/16x16/rar.png new file mode 100644 index 000000000..f15d4ce5b Binary files /dev/null and b/lib/images/fileicons/16x16/rar.png differ diff --git a/lib/images/fileicons/16x16/rpm.png b/lib/images/fileicons/16x16/rpm.png new file mode 100644 index 000000000..831424ff5 Binary files /dev/null and b/lib/images/fileicons/16x16/rpm.png differ diff --git a/lib/images/fileicons/16x16/rtf.png b/lib/images/fileicons/16x16/rtf.png new file mode 100644 index 000000000..bbc425ca3 Binary files /dev/null and b/lib/images/fileicons/16x16/rtf.png differ diff --git a/lib/images/fileicons/16x16/swf.png b/lib/images/fileicons/16x16/swf.png new file mode 100644 index 000000000..b45a72cc9 Binary files /dev/null and b/lib/images/fileicons/16x16/swf.png differ diff --git a/lib/images/fileicons/16x16/sxc.png b/lib/images/fileicons/16x16/sxc.png new file mode 100644 index 000000000..c96cf303f Binary files /dev/null and b/lib/images/fileicons/16x16/sxc.png differ diff --git a/lib/images/fileicons/16x16/sxd.png b/lib/images/fileicons/16x16/sxd.png new file mode 100644 index 000000000..124b928e1 Binary files /dev/null and b/lib/images/fileicons/16x16/sxd.png differ diff --git a/lib/images/fileicons/16x16/sxi.png b/lib/images/fileicons/16x16/sxi.png new file mode 100644 index 000000000..8a5e23033 Binary files /dev/null and b/lib/images/fileicons/16x16/sxi.png differ diff --git a/lib/images/fileicons/16x16/sxw.png b/lib/images/fileicons/16x16/sxw.png new file mode 100644 index 000000000..9a903791c Binary files /dev/null and b/lib/images/fileicons/16x16/sxw.png differ diff --git a/lib/images/fileicons/16x16/tar.png b/lib/images/fileicons/16x16/tar.png new file mode 100644 index 000000000..e57029adc Binary files /dev/null and b/lib/images/fileicons/16x16/tar.png differ diff --git a/lib/images/fileicons/16x16/tgz.png b/lib/images/fileicons/16x16/tgz.png new file mode 100644 index 000000000..25ef9e15a Binary files /dev/null and b/lib/images/fileicons/16x16/tgz.png differ diff --git a/lib/images/fileicons/16x16/txt.png b/lib/images/fileicons/16x16/txt.png new file mode 100644 index 000000000..4fd921655 Binary files /dev/null and b/lib/images/fileicons/16x16/txt.png differ diff --git a/lib/images/fileicons/16x16/wav.png b/lib/images/fileicons/16x16/wav.png new file mode 100644 index 000000000..c8880c62e Binary files /dev/null and b/lib/images/fileicons/16x16/wav.png differ diff --git a/lib/images/fileicons/16x16/webm.png b/lib/images/fileicons/16x16/webm.png new file mode 100644 index 000000000..55db61914 Binary files /dev/null and b/lib/images/fileicons/16x16/webm.png differ diff --git a/lib/images/fileicons/16x16/xls.png b/lib/images/fileicons/16x16/xls.png new file mode 100644 index 000000000..5ac56f20d Binary files /dev/null and b/lib/images/fileicons/16x16/xls.png differ diff --git a/lib/images/fileicons/16x16/xlsx.png b/lib/images/fileicons/16x16/xlsx.png new file mode 100644 index 000000000..89c84c522 Binary files /dev/null and b/lib/images/fileicons/16x16/xlsx.png differ diff --git a/lib/images/fileicons/16x16/xml.png b/lib/images/fileicons/16x16/xml.png new file mode 100644 index 000000000..fb960477e Binary files /dev/null and b/lib/images/fileicons/16x16/xml.png differ diff --git a/lib/images/fileicons/16x16/zip.png b/lib/images/fileicons/16x16/zip.png new file mode 100644 index 000000000..4a36a35ff Binary files /dev/null and b/lib/images/fileicons/16x16/zip.png differ diff --git a/lib/images/fileicons/32x32/7z.png b/lib/images/fileicons/32x32/7z.png new file mode 100644 index 000000000..9ba7da94a Binary files /dev/null and b/lib/images/fileicons/32x32/7z.png differ diff --git a/lib/images/fileicons/32x32/bz2.png b/lib/images/fileicons/32x32/bz2.png new file mode 100644 index 000000000..7be9b7c06 Binary files /dev/null and b/lib/images/fileicons/32x32/bz2.png differ diff --git a/lib/images/fileicons/32x32/conf.png b/lib/images/fileicons/32x32/conf.png new file mode 100644 index 000000000..91a8a10de Binary files /dev/null and b/lib/images/fileicons/32x32/conf.png differ diff --git a/lib/images/fileicons/32x32/csv.png b/lib/images/fileicons/32x32/csv.png new file mode 100644 index 000000000..3ee42f047 Binary files /dev/null and b/lib/images/fileicons/32x32/csv.png differ diff --git a/lib/images/fileicons/32x32/deb.png b/lib/images/fileicons/32x32/deb.png new file mode 100644 index 000000000..8d625ccf2 Binary files /dev/null and b/lib/images/fileicons/32x32/deb.png differ diff --git a/lib/images/fileicons/32x32/doc.png b/lib/images/fileicons/32x32/doc.png new file mode 100644 index 000000000..8369c1f73 Binary files /dev/null and b/lib/images/fileicons/32x32/doc.png differ diff --git a/lib/images/fileicons/32x32/docx.png b/lib/images/fileicons/32x32/docx.png new file mode 100644 index 000000000..ce5dfb3d3 Binary files /dev/null and b/lib/images/fileicons/32x32/docx.png differ diff --git a/lib/images/fileicons/32x32/file.png b/lib/images/fileicons/32x32/file.png new file mode 100644 index 000000000..52318f6e2 Binary files /dev/null and b/lib/images/fileicons/32x32/file.png differ diff --git a/lib/images/fileicons/32x32/gif.png b/lib/images/fileicons/32x32/gif.png new file mode 100644 index 000000000..7e5608b75 Binary files /dev/null and b/lib/images/fileicons/32x32/gif.png differ diff --git a/lib/images/fileicons/32x32/gz.png b/lib/images/fileicons/32x32/gz.png new file mode 100644 index 000000000..573ce7afd Binary files /dev/null and b/lib/images/fileicons/32x32/gz.png differ diff --git a/lib/images/fileicons/32x32/htm.png b/lib/images/fileicons/32x32/htm.png new file mode 100644 index 000000000..132963be5 Binary files /dev/null and b/lib/images/fileicons/32x32/htm.png differ diff --git a/lib/images/fileicons/32x32/html.png b/lib/images/fileicons/32x32/html.png new file mode 100644 index 000000000..fb15689c0 Binary files /dev/null and b/lib/images/fileicons/32x32/html.png differ diff --git a/lib/images/fileicons/32x32/ico.png b/lib/images/fileicons/32x32/ico.png new file mode 100644 index 000000000..0fe7053b0 Binary files /dev/null and b/lib/images/fileicons/32x32/ico.png differ diff --git a/lib/images/fileicons/32x32/jpeg.png b/lib/images/fileicons/32x32/jpeg.png new file mode 100644 index 000000000..b6707a603 Binary files /dev/null and b/lib/images/fileicons/32x32/jpeg.png differ diff --git a/lib/images/fileicons/32x32/jpg.png b/lib/images/fileicons/32x32/jpg.png new file mode 100644 index 000000000..1c8b706e8 Binary files /dev/null and b/lib/images/fileicons/32x32/jpg.png differ diff --git a/lib/images/fileicons/32x32/mp3.png b/lib/images/fileicons/32x32/mp3.png new file mode 100644 index 000000000..1acd83276 Binary files /dev/null and b/lib/images/fileicons/32x32/mp3.png differ diff --git a/lib/images/fileicons/32x32/mp4.png b/lib/images/fileicons/32x32/mp4.png new file mode 100644 index 000000000..03db6f450 Binary files /dev/null and b/lib/images/fileicons/32x32/mp4.png differ diff --git a/lib/images/fileicons/32x32/odc.png b/lib/images/fileicons/32x32/odc.png new file mode 100644 index 000000000..9a34f2129 Binary files /dev/null and b/lib/images/fileicons/32x32/odc.png differ diff --git a/lib/images/fileicons/32x32/odf.png b/lib/images/fileicons/32x32/odf.png new file mode 100644 index 000000000..e3b4333ad Binary files /dev/null and b/lib/images/fileicons/32x32/odf.png differ diff --git a/lib/images/fileicons/32x32/odg.png b/lib/images/fileicons/32x32/odg.png new file mode 100644 index 000000000..c3b192b2d Binary files /dev/null and b/lib/images/fileicons/32x32/odg.png differ diff --git a/lib/images/fileicons/32x32/odi.png b/lib/images/fileicons/32x32/odi.png new file mode 100644 index 000000000..6baa69407 Binary files /dev/null and b/lib/images/fileicons/32x32/odi.png differ diff --git a/lib/images/fileicons/32x32/odp.png b/lib/images/fileicons/32x32/odp.png new file mode 100644 index 000000000..8e09dd6e4 Binary files /dev/null and b/lib/images/fileicons/32x32/odp.png differ diff --git a/lib/images/fileicons/32x32/ods.png b/lib/images/fileicons/32x32/ods.png new file mode 100644 index 000000000..90892f3d4 Binary files /dev/null and b/lib/images/fileicons/32x32/ods.png differ diff --git a/lib/images/fileicons/32x32/odt.png b/lib/images/fileicons/32x32/odt.png new file mode 100644 index 000000000..22ec1fffb Binary files /dev/null and b/lib/images/fileicons/32x32/odt.png differ diff --git a/lib/images/fileicons/32x32/ogg.png b/lib/images/fileicons/32x32/ogg.png new file mode 100644 index 000000000..f988fabc3 Binary files /dev/null and b/lib/images/fileicons/32x32/ogg.png differ diff --git a/lib/images/fileicons/32x32/ogv.png b/lib/images/fileicons/32x32/ogv.png new file mode 100644 index 000000000..1083455fb Binary files /dev/null and b/lib/images/fileicons/32x32/ogv.png differ diff --git a/lib/images/fileicons/32x32/pdf.png b/lib/images/fileicons/32x32/pdf.png new file mode 100644 index 000000000..8e8b45472 Binary files /dev/null and b/lib/images/fileicons/32x32/pdf.png differ diff --git a/lib/images/fileicons/32x32/png.png b/lib/images/fileicons/32x32/png.png new file mode 100644 index 000000000..deb47e44e Binary files /dev/null and b/lib/images/fileicons/32x32/png.png differ diff --git a/lib/images/fileicons/32x32/ppt.png b/lib/images/fileicons/32x32/ppt.png new file mode 100644 index 000000000..84b523a23 Binary files /dev/null and b/lib/images/fileicons/32x32/ppt.png differ diff --git a/lib/images/fileicons/32x32/pptx.png b/lib/images/fileicons/32x32/pptx.png new file mode 100644 index 000000000..1446cf4de Binary files /dev/null and b/lib/images/fileicons/32x32/pptx.png differ diff --git a/lib/images/fileicons/32x32/ps.png b/lib/images/fileicons/32x32/ps.png new file mode 100644 index 000000000..d540743f9 Binary files /dev/null and b/lib/images/fileicons/32x32/ps.png differ diff --git a/lib/images/fileicons/32x32/rar.png b/lib/images/fileicons/32x32/rar.png new file mode 100644 index 000000000..4af2a4d46 Binary files /dev/null and b/lib/images/fileicons/32x32/rar.png differ diff --git a/lib/images/fileicons/32x32/rpm.png b/lib/images/fileicons/32x32/rpm.png new file mode 100644 index 000000000..2ec5f4e1b Binary files /dev/null and b/lib/images/fileicons/32x32/rpm.png differ diff --git a/lib/images/fileicons/32x32/rtf.png b/lib/images/fileicons/32x32/rtf.png new file mode 100644 index 000000000..fcbcd001a Binary files /dev/null and b/lib/images/fileicons/32x32/rtf.png differ diff --git a/lib/images/fileicons/32x32/swf.png b/lib/images/fileicons/32x32/swf.png new file mode 100644 index 000000000..b43642905 Binary files /dev/null and b/lib/images/fileicons/32x32/swf.png differ diff --git a/lib/images/fileicons/32x32/sxc.png b/lib/images/fileicons/32x32/sxc.png new file mode 100644 index 000000000..50676be6a Binary files /dev/null and b/lib/images/fileicons/32x32/sxc.png differ diff --git a/lib/images/fileicons/32x32/sxd.png b/lib/images/fileicons/32x32/sxd.png new file mode 100644 index 000000000..f715a8ff0 Binary files /dev/null and b/lib/images/fileicons/32x32/sxd.png differ diff --git a/lib/images/fileicons/32x32/sxi.png b/lib/images/fileicons/32x32/sxi.png new file mode 100644 index 000000000..3d9f31d3b Binary files /dev/null and b/lib/images/fileicons/32x32/sxi.png differ diff --git a/lib/images/fileicons/32x32/sxw.png b/lib/images/fileicons/32x32/sxw.png new file mode 100644 index 000000000..bd8ab1436 Binary files /dev/null and b/lib/images/fileicons/32x32/sxw.png differ diff --git a/lib/images/fileicons/32x32/tar.png b/lib/images/fileicons/32x32/tar.png new file mode 100644 index 000000000..4a420a22a Binary files /dev/null and b/lib/images/fileicons/32x32/tar.png differ diff --git a/lib/images/fileicons/32x32/tgz.png b/lib/images/fileicons/32x32/tgz.png new file mode 100644 index 000000000..8cf6af41a Binary files /dev/null and b/lib/images/fileicons/32x32/tgz.png differ diff --git a/lib/images/fileicons/32x32/txt.png b/lib/images/fileicons/32x32/txt.png new file mode 100644 index 000000000..d9ff7d595 Binary files /dev/null and b/lib/images/fileicons/32x32/txt.png differ diff --git a/lib/images/fileicons/32x32/wav.png b/lib/images/fileicons/32x32/wav.png new file mode 100644 index 000000000..c39a8445f Binary files /dev/null and b/lib/images/fileicons/32x32/wav.png differ diff --git a/lib/images/fileicons/32x32/webm.png b/lib/images/fileicons/32x32/webm.png new file mode 100644 index 000000000..99b9c87b2 Binary files /dev/null and b/lib/images/fileicons/32x32/webm.png differ diff --git a/lib/images/fileicons/32x32/xls.png b/lib/images/fileicons/32x32/xls.png new file mode 100644 index 000000000..7447d9cdf Binary files /dev/null and b/lib/images/fileicons/32x32/xls.png differ diff --git a/lib/images/fileicons/32x32/xlsx.png b/lib/images/fileicons/32x32/xlsx.png new file mode 100644 index 000000000..920217267 Binary files /dev/null and b/lib/images/fileicons/32x32/xlsx.png differ diff --git a/lib/images/fileicons/32x32/xml.png b/lib/images/fileicons/32x32/xml.png new file mode 100644 index 000000000..bae059156 Binary files /dev/null and b/lib/images/fileicons/32x32/xml.png differ diff --git a/lib/images/fileicons/32x32/zip.png b/lib/images/fileicons/32x32/zip.png new file mode 100644 index 000000000..f07d18e2c Binary files /dev/null and b/lib/images/fileicons/32x32/zip.png differ diff --git a/lib/images/fileicons/7z.png b/lib/images/fileicons/7z.png deleted file mode 100644 index 52f7d5d72..000000000 Binary files a/lib/images/fileicons/7z.png and /dev/null differ diff --git a/lib/images/fileicons/audio.png b/lib/images/fileicons/audio.png deleted file mode 100644 index 98883256d..000000000 Binary files a/lib/images/fileicons/audio.png and /dev/null differ diff --git a/lib/images/fileicons/bz2.png b/lib/images/fileicons/bz2.png deleted file mode 100644 index 6ec2f98ef..000000000 Binary files a/lib/images/fileicons/bz2.png and /dev/null differ diff --git a/lib/images/fileicons/c.png b/lib/images/fileicons/c.png deleted file mode 100644 index 6f57337c7..000000000 Binary files a/lib/images/fileicons/c.png and /dev/null differ diff --git a/lib/images/fileicons/conf.png b/lib/images/fileicons/conf.png deleted file mode 100644 index 20c20fa3d..000000000 Binary files a/lib/images/fileicons/conf.png and /dev/null differ diff --git a/lib/images/fileicons/cpp.png b/lib/images/fileicons/cpp.png deleted file mode 100644 index 6f2797da5..000000000 Binary files a/lib/images/fileicons/cpp.png and /dev/null differ diff --git a/lib/images/fileicons/cs.png b/lib/images/fileicons/cs.png deleted file mode 100644 index d3afa112c..000000000 Binary files a/lib/images/fileicons/cs.png and /dev/null differ diff --git a/lib/images/fileicons/css.png b/lib/images/fileicons/css.png deleted file mode 100644 index 89c1537fd..000000000 Binary files a/lib/images/fileicons/css.png and /dev/null differ diff --git a/lib/images/fileicons/csv.png b/lib/images/fileicons/csv.png deleted file mode 100644 index b604453c4..000000000 Binary files a/lib/images/fileicons/csv.png and /dev/null differ diff --git a/lib/images/fileicons/deb.png b/lib/images/fileicons/deb.png deleted file mode 100644 index 8fe57327a..000000000 Binary files a/lib/images/fileicons/deb.png and /dev/null differ diff --git a/lib/images/fileicons/doc.png b/lib/images/fileicons/doc.png deleted file mode 100644 index 79d8ff1cd..000000000 Binary files a/lib/images/fileicons/doc.png and /dev/null differ diff --git a/lib/images/fileicons/docx.png b/lib/images/fileicons/docx.png deleted file mode 100644 index 79d8ff1cd..000000000 Binary files a/lib/images/fileicons/docx.png and /dev/null differ diff --git a/lib/images/fileicons/file.png b/lib/images/fileicons/file.png deleted file mode 100644 index 8158a8a21..000000000 Binary files a/lib/images/fileicons/file.png and /dev/null differ diff --git a/lib/images/fileicons/generate.php b/lib/images/fileicons/generate.php new file mode 100644 index 000000000..2dd25eb33 --- /dev/null +++ b/lib/images/fileicons/generate.php @@ -0,0 +1,35 @@ +mimetypes = getMimeTypes(); + foreach(array_keys($this->mimetypes) as $ext) { + $this->mimetypes[$ext] = ltrim($this->mimetypes[$ext], '!'); + } + } +} + + +echo "Important: you should enable the commented file types in mime.conf to make sure the icon are generated!\n"; + +// generate all the icons +$DFIB = new DokuFileIconBuilder(); +$DFIB->createAll(__DIR__); + +echo "generation done\n"; diff --git a/lib/images/fileicons/gif.png b/lib/images/fileicons/gif.png deleted file mode 100644 index 1d9dd562a..000000000 Binary files a/lib/images/fileicons/gif.png and /dev/null differ diff --git a/lib/images/fileicons/gz.png b/lib/images/fileicons/gz.png deleted file mode 100644 index 48f19596c..000000000 Binary files a/lib/images/fileicons/gz.png and /dev/null differ diff --git a/lib/images/fileicons/htm.png b/lib/images/fileicons/htm.png deleted file mode 100644 index d45e4c19a..000000000 Binary files a/lib/images/fileicons/htm.png and /dev/null differ diff --git a/lib/images/fileicons/html.png b/lib/images/fileicons/html.png deleted file mode 100644 index d45e4c19a..000000000 Binary files a/lib/images/fileicons/html.png and /dev/null differ diff --git a/lib/images/fileicons/ico.png b/lib/images/fileicons/ico.png deleted file mode 100644 index 1d9dd562a..000000000 Binary files a/lib/images/fileicons/ico.png and /dev/null differ diff --git a/lib/images/fileicons/index.php b/lib/images/fileicons/index.php index f90e7e6f0..28de26062 100644 --- a/lib/images/fileicons/index.php +++ b/lib/images/fileicons/index.php @@ -30,7 +30,7 @@
'; } ?> @@ -38,11 +38,30 @@ foreach (glob('*.png') as $img) {
'; } ?>
+
+ +
+ '; + } + ?> +
+ +
+ '; + } + ?> +
+ + diff --git a/lib/images/fileicons/java.png b/lib/images/fileicons/java.png deleted file mode 100644 index c5f2fd09f..000000000 Binary files a/lib/images/fileicons/java.png and /dev/null differ diff --git a/lib/images/fileicons/jpeg.png b/lib/images/fileicons/jpeg.png deleted file mode 100644 index 1d9dd562a..000000000 Binary files a/lib/images/fileicons/jpeg.png and /dev/null differ diff --git a/lib/images/fileicons/jpg.png b/lib/images/fileicons/jpg.png deleted file mode 100644 index 1d9dd562a..000000000 Binary files a/lib/images/fileicons/jpg.png and /dev/null differ diff --git a/lib/images/fileicons/js.png b/lib/images/fileicons/js.png deleted file mode 100644 index 0c314eb56..000000000 Binary files a/lib/images/fileicons/js.png and /dev/null differ diff --git a/lib/images/fileicons/lua.png b/lib/images/fileicons/lua.png deleted file mode 100644 index 994c6e8f0..000000000 Binary files a/lib/images/fileicons/lua.png and /dev/null differ diff --git a/lib/images/fileicons/mp3.png b/lib/images/fileicons/mp3.png deleted file mode 100644 index 411dad080..000000000 Binary files a/lib/images/fileicons/mp3.png and /dev/null differ diff --git a/lib/images/fileicons/mp4.png b/lib/images/fileicons/mp4.png deleted file mode 100644 index b89fc5299..000000000 Binary files a/lib/images/fileicons/mp4.png and /dev/null differ diff --git a/lib/images/fileicons/odc.png b/lib/images/fileicons/odc.png deleted file mode 100644 index 4d6676c3a..000000000 Binary files a/lib/images/fileicons/odc.png and /dev/null differ diff --git a/lib/images/fileicons/odf.png b/lib/images/fileicons/odf.png deleted file mode 100644 index cb88d68e6..000000000 Binary files a/lib/images/fileicons/odf.png and /dev/null differ diff --git a/lib/images/fileicons/odg.png b/lib/images/fileicons/odg.png deleted file mode 100644 index a07216f4a..000000000 Binary files a/lib/images/fileicons/odg.png and /dev/null differ diff --git a/lib/images/fileicons/odi.png b/lib/images/fileicons/odi.png deleted file mode 100644 index a07216f4a..000000000 Binary files a/lib/images/fileicons/odi.png and /dev/null differ diff --git a/lib/images/fileicons/odp.png b/lib/images/fileicons/odp.png deleted file mode 100644 index 2f2574af6..000000000 Binary files a/lib/images/fileicons/odp.png and /dev/null differ diff --git a/lib/images/fileicons/ods.png b/lib/images/fileicons/ods.png deleted file mode 100644 index 4d6676c3a..000000000 Binary files a/lib/images/fileicons/ods.png and /dev/null differ diff --git a/lib/images/fileicons/odt.png b/lib/images/fileicons/odt.png deleted file mode 100644 index f9c126efd..000000000 Binary files a/lib/images/fileicons/odt.png and /dev/null differ diff --git a/lib/images/fileicons/ogg.png b/lib/images/fileicons/ogg.png deleted file mode 100644 index 0a21eae65..000000000 Binary files a/lib/images/fileicons/ogg.png and /dev/null differ diff --git a/lib/images/fileicons/ogv.png b/lib/images/fileicons/ogv.png deleted file mode 100644 index b89fc5299..000000000 Binary files a/lib/images/fileicons/ogv.png and /dev/null differ diff --git a/lib/images/fileicons/pdf.png b/lib/images/fileicons/pdf.png deleted file mode 100644 index 029dcffec..000000000 Binary files a/lib/images/fileicons/pdf.png and /dev/null differ diff --git a/lib/images/fileicons/php.png b/lib/images/fileicons/php.png deleted file mode 100644 index f81e405de..000000000 Binary files a/lib/images/fileicons/php.png and /dev/null differ diff --git a/lib/images/fileicons/pl.png b/lib/images/fileicons/pl.png deleted file mode 100644 index 92f3f9754..000000000 Binary files a/lib/images/fileicons/pl.png and /dev/null differ diff --git a/lib/images/fileicons/png.png b/lib/images/fileicons/png.png deleted file mode 100644 index 1d9dd562a..000000000 Binary files a/lib/images/fileicons/png.png and /dev/null differ diff --git a/lib/images/fileicons/ppt.png b/lib/images/fileicons/ppt.png deleted file mode 100644 index b7afb2266..000000000 Binary files a/lib/images/fileicons/ppt.png and /dev/null differ diff --git a/lib/images/fileicons/pptx.png b/lib/images/fileicons/pptx.png deleted file mode 100644 index b7afb2266..000000000 Binary files a/lib/images/fileicons/pptx.png and /dev/null differ diff --git a/lib/images/fileicons/ps.png b/lib/images/fileicons/ps.png deleted file mode 100644 index 40a80baad..000000000 Binary files a/lib/images/fileicons/ps.png and /dev/null differ diff --git a/lib/images/fileicons/py.png b/lib/images/fileicons/py.png deleted file mode 100644 index 15a727c54..000000000 Binary files a/lib/images/fileicons/py.png and /dev/null differ diff --git a/lib/images/fileicons/rar.png b/lib/images/fileicons/rar.png deleted file mode 100644 index c761a4f7f..000000000 Binary files a/lib/images/fileicons/rar.png and /dev/null differ diff --git a/lib/images/fileicons/rb.png b/lib/images/fileicons/rb.png deleted file mode 100644 index 408f708a1..000000000 Binary files a/lib/images/fileicons/rb.png and /dev/null differ diff --git a/lib/images/fileicons/rpm.png b/lib/images/fileicons/rpm.png deleted file mode 100644 index 5cf727de0..000000000 Binary files a/lib/images/fileicons/rpm.png and /dev/null differ diff --git a/lib/images/fileicons/rtf.png b/lib/images/fileicons/rtf.png deleted file mode 100644 index 99fe3d8fd..000000000 Binary files a/lib/images/fileicons/rtf.png and /dev/null differ diff --git a/lib/images/fileicons/sql.png b/lib/images/fileicons/sql.png deleted file mode 100644 index a7b0684c7..000000000 Binary files a/lib/images/fileicons/sql.png and /dev/null differ diff --git a/lib/images/fileicons/swf.png b/lib/images/fileicons/swf.png deleted file mode 100644 index ecc7309ad..000000000 Binary files a/lib/images/fileicons/swf.png and /dev/null differ diff --git a/lib/images/fileicons/sxc.png b/lib/images/fileicons/sxc.png deleted file mode 100644 index 4d6676c3a..000000000 Binary files a/lib/images/fileicons/sxc.png and /dev/null differ diff --git a/lib/images/fileicons/sxd.png b/lib/images/fileicons/sxd.png deleted file mode 100644 index a07216f4a..000000000 Binary files a/lib/images/fileicons/sxd.png and /dev/null differ diff --git a/lib/images/fileicons/sxi.png b/lib/images/fileicons/sxi.png deleted file mode 100644 index 2f2574af6..000000000 Binary files a/lib/images/fileicons/sxi.png and /dev/null differ diff --git a/lib/images/fileicons/sxw.png b/lib/images/fileicons/sxw.png deleted file mode 100644 index f9c126efd..000000000 Binary files a/lib/images/fileicons/sxw.png and /dev/null differ diff --git a/lib/images/fileicons/tar.png b/lib/images/fileicons/tar.png deleted file mode 100644 index a28c86f2d..000000000 Binary files a/lib/images/fileicons/tar.png and /dev/null differ diff --git a/lib/images/fileicons/tgz.png b/lib/images/fileicons/tgz.png deleted file mode 100644 index 48f19596c..000000000 Binary files a/lib/images/fileicons/tgz.png and /dev/null differ diff --git a/lib/images/fileicons/txt.png b/lib/images/fileicons/txt.png deleted file mode 100644 index bb94949f6..000000000 Binary files a/lib/images/fileicons/txt.png and /dev/null differ diff --git a/lib/images/fileicons/wav.png b/lib/images/fileicons/wav.png deleted file mode 100644 index c167f4fdb..000000000 Binary files a/lib/images/fileicons/wav.png and /dev/null differ diff --git a/lib/images/fileicons/webm.png b/lib/images/fileicons/webm.png deleted file mode 100644 index b89fc5299..000000000 Binary files a/lib/images/fileicons/webm.png and /dev/null differ diff --git a/lib/images/fileicons/xls.png b/lib/images/fileicons/xls.png deleted file mode 100644 index 24911b802..000000000 Binary files a/lib/images/fileicons/xls.png and /dev/null differ diff --git a/lib/images/fileicons/xlsx.png b/lib/images/fileicons/xlsx.png deleted file mode 100644 index 24911b802..000000000 Binary files a/lib/images/fileicons/xlsx.png and /dev/null differ diff --git a/lib/images/fileicons/xml.png b/lib/images/fileicons/xml.png deleted file mode 100644 index ae9831b34..000000000 Binary files a/lib/images/fileicons/xml.png and /dev/null differ diff --git a/lib/images/fileicons/zip.png b/lib/images/fileicons/zip.png deleted file mode 100644 index fb8850c9a..000000000 Binary files a/lib/images/fileicons/zip.png and /dev/null differ -- cgit v1.2.3 From 6198904b0be1a338f774922e09c4b0d5050d853e Mon Sep 17 00:00:00 2001 From: Anika Henke Date: Sun, 16 Feb 2014 19:55:14 +0000 Subject: generalised link colour in header, making interwiki links blue as well (to fit design) --- lib/tpl/dokuwiki/css/design.less | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/lib/tpl/dokuwiki/css/design.less b/lib/tpl/dokuwiki/css/design.less index 42292de49..235f6d6bc 100644 --- a/lib/tpl/dokuwiki/css/design.less +++ b/lib/tpl/dokuwiki/css/design.less @@ -48,6 +48,12 @@ margin-bottom: 0; font-size: 0.875em; } + + /* make all links in header (including breadcrumb and interwiki) same colour as the rest */ + a { + color: @ini_link; + background-color: inherit; + } } [dir=rtl] #dokuwiki__header h1 img { @@ -260,11 +266,6 @@ border-bottom: 1px solid @ini_border; } - a { - color: @ini_link; - background-color: inherit; - } - .bcsep { font-size: 0.75em; } -- cgit v1.2.3 From b9bd3ecff7347bc96d59368f3f4ba4a271ecf0bd Mon Sep 17 00:00:00 2001 From: Christopher Smith Date: Sun, 16 Feb 2014 20:15:07 +0000 Subject: add appropriate visibility keywords to event properties --- inc/events.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/inc/events.php b/inc/events.php index ed60c95fe..e9ffa5a92 100644 --- a/inc/events.php +++ b/inc/events.php @@ -11,12 +11,12 @@ if(!defined('DOKU_INC')) die('meh.'); class Doku_Event { // public properties - var $name = ''; // READONLY event name, objects must register against this name to see the event - var $data = null; // READWRITE data relevant to the event, no standardised format (YET!) - var $result = null; // READWRITE the results of the event action, only relevant in "_AFTER" advise + public $name = ''; // READONLY event name, objects must register against this name to see the event + public $data = null; // READWRITE data relevant to the event, no standardised format (YET!) + public $result = null; // READWRITE the results of the event action, only relevant in "_AFTER" advise // event handlers may modify this if they are preventing the default action // to provide the after event handlers with event results - var $canPreventDefault = true; // READONLY if true, event handlers can prevent the events default action + public $canPreventDefault = true; // READONLY if true, event handlers can prevent the events default action // private properties, event handlers can effect these through the provided methods var $_default = true; // whether or not to carry out the default action associated with the event @@ -121,7 +121,7 @@ class Doku_Event_Handler { // public properties: none // private properties - var $_hooks = array(); // array of events and their registered handlers + protected $_hooks = array(); // array of events and their registered handlers /** * event_handler -- cgit v1.2.3 From 33416b823f72c23623d441e6341f564c41cd8f8f Mon Sep 17 00:00:00 2001 From: Christopher Smith Date: Sun, 16 Feb 2014 20:18:30 +0000 Subject: remove reference operator from object, no longer required --- inc/events.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inc/events.php b/inc/events.php index e9ffa5a92..91b0d181a 100644 --- a/inc/events.php +++ b/inc/events.php @@ -158,7 +158,7 @@ class Doku_Event_Handler { $this->_hooks[$event.'_'.$advise][] = array($obj, $method, $param, (int)$seq); } - function process_event(&$event,$advise='') { + function process_event($event,$advise='') { $evt_name = $event->name . ($advise ? '_'.$advise : '_BEFORE'); -- cgit v1.2.3 From cf0a922758503003100c988bf25eeaaa8e5b287c Mon Sep 17 00:00:00 2001 From: Christopher Smith Date: Sun, 16 Feb 2014 20:19:09 +0000 Subject: Ensure hook array is always in the correct sequence Changed to sort on add from sort on process for efficiency. Some events (e.g. AUTH_ACL_CHECK) could be trigged many times in a single page request. --- inc/events.php | 40 +++++++++++++++++----------------------- 1 file changed, 17 insertions(+), 23 deletions(-) diff --git a/inc/events.php b/inc/events.php index 91b0d181a..888b968b5 100644 --- a/inc/events.php +++ b/inc/events.php @@ -155,7 +155,13 @@ class Doku_Event_Handler { * @param $seq (int) sequence number for ordering hook execution (ascending) */ function register_hook($event, $advise, $obj, $method, $param=null, $seq=0) { - $this->_hooks[$event.'_'.$advise][] = array($obj, $method, $param, (int)$seq); + $seq = (int)$seq; + $doSort = !isset($this->_hooks[$event.'_'.$advise][$seq]); + $this->_hooks[$event.'_'.$advise][$seq][] = array($obj, $method, $param); + + if ($doSort) { + ksort($this->_hooks[$event.'_'.$advise]); + } } function process_event($event,$advise='') { @@ -163,33 +169,21 @@ class Doku_Event_Handler { $evt_name = $event->name . ($advise ? '_'.$advise : '_BEFORE'); if (!empty($this->_hooks[$evt_name])) { - foreach ($this->sort_hooks($this->_hooks[$evt_name]) as $hook) { - list($obj, $method, $param, $seq) = $hook; + foreach ($this->_hooks[$evt_name] as $sequenced_hooks) { + foreach ($sequenced_hooks as $hook) { + list($obj, $method, $param, $seq) = $hook; - if (is_null($obj)) { - $method($event, $param); - } else { - $obj->$method($event, $param); - } + if (is_null($obj)) { + $method($event, $param); + } else { + $obj->$method($event, $param); + } - if (!$event->_continue) break; + if (!$event->_continue) return; + } } } } - - protected function sort_hooks($hooks) { - usort($hooks, array('Doku_Event_Handler','cmp_hooks')); - return $hooks; - } - - public static function cmp_hooks($a, $b) { - if ($a[3] == $b[3]) { - return 0; - } - - return ($a[3] < $b[3]) ? -1 : 1; - } - } /** -- cgit v1.2.3 From 2a2a43c4fa64079215d205d1faf50ab8a59caaab Mon Sep 17 00:00:00 2001 From: Gerrit Uitslag Date: Mon, 17 Feb 2014 00:37:28 +0100 Subject: change default userspace to :user: and add interwiki class --- conf/interwiki.conf | 2 +- inc/common.php | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/conf/interwiki.conf b/conf/interwiki.conf index 0643f764b..d961912e5 100644 --- a/conf/interwiki.conf +++ b/conf/interwiki.conf @@ -30,7 +30,7 @@ sb http://www.splitbrain.org/go/ skype skype:{NAME} google.de http://www.google.de/search?q= go http://www.google.com/search?q={URL}&btnI=lucky -user :wiki:users:{NAME} +user :user:{NAME} # To support VoIP/SIP links callto callto://{NAME} diff --git a/inc/common.php b/inc/common.php index aa59a8c11..4a5ead6b8 100644 --- a/inc/common.php +++ b/inc/common.php @@ -1498,6 +1498,7 @@ function userinfo($username = null) { } $shortcut = 'user'; $data['link']['url'] = $xhtml_renderer->_resolveInterWiki($shortcut, $username, $exists); + $data['link']['class'] .= ' interwiki iw_user'; if($exists !== null) { if($exists) { $data['link']['class'] .= ' wikilink1'; -- cgit v1.2.3 From 118e00521560a4a93c92ba7439e5cf5463e0efe7 Mon Sep 17 00:00:00 2001 From: Gerrit Uitslag Date: Mon, 17 Feb 2014 00:51:10 +0100 Subject: update unittest with interwiki.conf change as well --- _test/tests/inc/parser/renderer_resolveinterwiki.test.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_test/tests/inc/parser/renderer_resolveinterwiki.test.php b/_test/tests/inc/parser/renderer_resolveinterwiki.test.php index e78930934..7b43b6d62 100644 --- a/_test/tests/inc/parser/renderer_resolveinterwiki.test.php +++ b/_test/tests/inc/parser/renderer_resolveinterwiki.test.php @@ -27,7 +27,7 @@ class Test_resolveInterwiki extends PHPUnit_Framework_TestCase { array('skype', 'foo @+%/#txt', 'skype:foo @+%/#txt'), //dokuwiki id's array('onlytext', 'foo @+%#txt', DOKU_BASE.'doku.php?id=onlytextfoo#txt'), - array('user', 'foo @+%#txt', DOKU_BASE.'doku.php?id=wiki:users:foo#txt'), + array('user', 'foo @+%#txt', DOKU_BASE.'doku.php?id=user:foo#txt'), array('withquery', 'foo @+%#txt', DOKU_BASE.'doku.php?id=anyns:foo&do=edit#txt') ); -- cgit v1.2.3 From f23eef27e07dfe76ab76fda68242d44de10e4022 Mon Sep 17 00:00:00 2001 From: Gerrit Uitslag Date: Mon, 17 Feb 2014 17:56:58 +0100 Subject: PHPDocs internallink --- inc/parser/xhtml.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/inc/parser/xhtml.php b/inc/parser/xhtml.php index 9d75c271d..315b4d640 100644 --- a/inc/parser/xhtml.php +++ b/inc/parser/xhtml.php @@ -562,6 +562,12 @@ class Doku_Renderer_xhtml extends Doku_Renderer { * $search,$returnonly & $linktype are not for the renderer but are used * elsewhere - no need to implement them in other renderers * + * @param string $id pageid + * @param string|null $name link name + * @param string|null $search adds search url param + * @param bool $returnonly whether to return html or write to doc attribute + * @param string $linktype type to set use of headings + * @return void|string writes to doc attribute or returns html depends on $returnonly * @author Andreas Gohr */ function internallink($id, $name = null, $search=null,$returnonly=false,$linktype='content') { -- cgit v1.2.3 From 0e2431b761b5c24b59109867ec74d7647d16131f Mon Sep 17 00:00:00 2001 From: Gerrit Uitslag Date: Mon, 17 Feb 2014 19:01:57 +0100 Subject: Improve PHPDocs, rename auth_basic to DokuWiki_Auth_Plugin --- feed.php | 2 +- inc/confutils.php | 3 ++- inc/subscription.php | 4 ++-- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/feed.php b/feed.php index bdce666d2..8f2ac0b4c 100644 --- a/feed.php +++ b/feed.php @@ -182,7 +182,7 @@ function rss_parseOptions() { function rss_buildItems(&$rss, &$data, $opt) { global $conf; global $lang; - /* @var auth_basic $auth */ + /* @var DokuWiki_Auth_Plugin $auth */ global $auth; $eventData = array( diff --git a/inc/confutils.php b/inc/confutils.php index 0ac003b72..31371d41f 100644 --- a/inc/confutils.php +++ b/inc/confutils.php @@ -237,13 +237,14 @@ function getConfigFiles($type) { * check if the given action was disabled in config * * @author Andreas Gohr + * @param string $action * @returns boolean true if enabled, false if disabled */ function actionOK($action){ static $disabled = null; if(is_null($disabled) || defined('SIMPLE_TEST')){ global $conf; - /** @var auth_basic $auth */ + /** @var DokuWiki_Auth_Plugin $auth */ global $auth; // prepare disabled actions array and handle legacy options diff --git a/inc/subscription.php b/inc/subscription.php index ddf2f39e6..ddf30706b 100644 --- a/inc/subscription.php +++ b/inc/subscription.php @@ -288,7 +288,7 @@ class Subscription { public function send_bulk($page) { if(!$this->isenabled()) return 0; - /** @var auth_basic $auth */ + /** @var DokuWiki_Auth_Plugin $auth */ global $auth; global $conf; global $USERINFO; @@ -651,7 +651,7 @@ class Subscription { public function notifyaddresses(&$data) { if(!$this->isenabled()) return; - /** @var auth_basic $auth */ + /** @var DokuWiki_Auth_Plugin $auth */ global $auth; global $conf; -- cgit v1.2.3 From d0f7cf78a9332d409d163cb5ec617059c72296ad Mon Sep 17 00:00:00 2001 From: Gerrit Uitslag Date: Mon, 17 Feb 2014 19:06:34 +0100 Subject: PHPDocs improvements and minor fixes feedcreator --- inc/feedcreator.class.php | 99 +++++++++++++++++++++++++++++++++++------------ 1 file changed, 74 insertions(+), 25 deletions(-) diff --git a/inc/feedcreator.class.php b/inc/feedcreator.class.php index 670a1bc29..b90da5724 100644 --- a/inc/feedcreator.class.php +++ b/inc/feedcreator.class.php @@ -185,6 +185,8 @@ class HtmlDescribable { */ var $descriptionTruncSize; + var $description; + /** * Returns a formatted description field, depending on descriptionHtmlSyndicated and * $descriptionTruncSize properties @@ -222,7 +224,7 @@ class FeedHtmlField { /** * Creates a new instance of FeedHtmlField. - * @param $string: if given, sets the rawFieldContent property + * @param string $parFieldContent: if given, sets the rawFieldContent property */ function FeedHtmlField($parFieldContent) { if ($parFieldContent) { @@ -267,8 +269,14 @@ class FeedHtmlField { * @author Kai Blankenhorn */ class UniversalFeedCreator extends FeedCreator { + /** @var FeedCreator */ var $_feed; + /** + * Sets format + * + * @param string $format + */ function _setFormat($format) { switch (strtoupper($format)) { @@ -344,7 +352,7 @@ class UniversalFeedCreator extends FeedCreator { * Creates a syndication feed based on the items previously added. * * @see FeedCreator::addItem() - * @param string format format the feed should comply to. Valid values are: + * @param string $format format the feed should comply to. Valid values are: * "PIE0.1", "mbox", "RSS0.91", "RSS1.0", "RSS2.0", "OPML", "ATOM0.3", "HTML", "JS" * @return string the contents of the feed. */ @@ -358,10 +366,10 @@ class UniversalFeedCreator extends FeedCreator { * header may be sent to redirect the use to the newly created file. * @since 1.4 * - * @param string format format the feed should comply to. Valid values are: + * @param string $format format the feed should comply to. Valid values are: * "PIE0.1" (deprecated), "mbox", "RSS0.91", "RSS1.0", "RSS2.0", "OPML", "ATOM", "ATOM0.3", "HTML", "JS" - * @param string filename optional the filename where a recent version of the feed is saved. If not specified, the filename is $_SERVER["PHP_SELF"] with the extension changed to .xml (see _generateFilename()). - * @param boolean displayContents optional send the content of the file or not. If true, the file will be sent in the body of the response. + * @param string $filename optional the filename where a recent version of the feed is saved. If not specified, the filename is $_SERVER["PHP_SELF"] with the extension changed to .xml (see _generateFilename()). + * @param boolean $displayContents optional send the content of the file or not. If true, the file will be sent in the body of the response. */ function saveFeed($format="RSS0.91", $filename="", $displayContents=true) { $this->_setFormat($format); @@ -376,10 +384,10 @@ class UniversalFeedCreator extends FeedCreator { * before anything else, especially before you do the time consuming task to build the feed * (web fetching, for example). * - * @param string format format the feed should comply to. Valid values are: + * @param string $format format the feed should comply to. Valid values are: * "PIE0.1" (deprecated), "mbox", "RSS0.91", "RSS1.0", "RSS2.0", "OPML", "ATOM0.3". - * @param filename string optional the filename where a recent version of the feed is saved. If not specified, the filename is $_SERVER["PHP_SELF"] with the extension changed to .xml (see _generateFilename()). - * @param timeout int optional the timeout in seconds before a cached version is refreshed (defaults to 3600 = 1 hour) + * @param string $filename optional the filename where a recent version of the feed is saved. If not specified, the filename is $_SERVER["PHP_SELF"] with the extension changed to .xml (see _generateFilename()). + * @param int $timeout optional the timeout in seconds before a cached version is refreshed (defaults to 3600 = 1 hour) */ function useCached($format="RSS0.91", $filename="", $timeout=3600) { $this->_setFormat($format); @@ -390,7 +398,7 @@ class UniversalFeedCreator extends FeedCreator { /** * Outputs feed to the browser - needed for on-the-fly feed generation (like it is done in WordPress, etc.) * - * @param format string format the feed should comply to. Valid values are: + * @param $format string format the feed should comply to. Valid values are: * "PIE0.1" (deprecated), "mbox", "RSS0.91", "RSS1.0", "RSS2.0", "OPML", "ATOM0.3". */ function outputFeed($format='RSS0.91') { @@ -422,7 +430,13 @@ class FeedCreator extends HtmlDescribable { /** * Optional attributes of a feed. */ - var $syndicationURL, $image, $language, $copyright, $pubDate, $lastBuildDate, $editor, $editorEmail, $webmaster, $category, $docs, $ttl, $rating, $skipHours, $skipDays; + var $syndicationURL, $language, $copyright, $pubDate, $lastBuildDate, $editor, $editorEmail, $webmaster, $category, $docs, $ttl, $rating, $skipHours, $skipDays; + /** + * Optional attribute of a feed + * + * @var FeedImage + */ + var $image = null; /** * The url of the external xsl stylesheet used to format the naked rss feed. @@ -430,13 +444,18 @@ class FeedCreator extends HtmlDescribable { */ var $xslStyleSheet = ""; + /** + * Style sheet for rss feed + */ + var $cssStyleSheet = ""; + /** * @access private + * @var FeedItem[] */ var $items = Array(); - /** * This feed's MIME content type. * @since 1.4 @@ -466,7 +485,7 @@ class FeedCreator extends HtmlDescribable { /** * Adds an FeedItem to the feed. * - * @param object FeedItem $item The FeedItem to add to the feed. + * @param FeedItem $item The FeedItem to add to the feed. * @access public */ function addItem($item) { @@ -482,8 +501,8 @@ class FeedCreator extends HtmlDescribable { * If the string is already shorter than $length, it is returned unchanged. * * @static - * @param string string A string to be truncated. - * @param int length the maximum length the string should be truncated to + * @param string $string A string to be truncated. + * @param int $length the maximum length the string should be truncated to * @return string the truncated string */ function iTrunc($string, $length) { @@ -527,8 +546,8 @@ class FeedCreator extends HtmlDescribable { /** * Creates a string containing all additional elements specified in * $additionalElements. - * @param elements array an associative array containing key => value pairs - * @param indentString string a string that will be inserted before every generated line + * @param $elements array an associative array containing key => value pairs + * @param $indentString string a string that will be inserted before every generated line * @return string the XML tags corresponding to $additionalElements */ function _createAdditionalElements($elements, $indentString="") { @@ -541,6 +560,9 @@ class FeedCreator extends HtmlDescribable { return $ae; } + /** + * Create elements for stylesheets + */ function _createStylesheetReferences() { $xml = ""; if ($this->cssStyleSheet) $xml .= "cssStyleSheet."\" type=\"text/css\"?>\n"; @@ -610,8 +632,8 @@ class FeedCreator extends HtmlDescribable { * before anything else, especially before you do the time consuming task to build the feed * (web fetching, for example). * @since 1.4 - * @param filename string optional the filename where a recent version of the feed is saved. If not specified, the filename is $_SERVER["PHP_SELF"] with the extension changed to .xml (see _generateFilename()). - * @param timeout int optional the timeout in seconds before a cached version is refreshed (defaults to 3600 = 1 hour) + * @param $filename string optional the filename where a recent version of the feed is saved. If not specified, the filename is $_SERVER["PHP_SELF"] with the extension changed to .xml (see _generateFilename()). + * @param $timeout int optional the timeout in seconds before a cached version is refreshed (defaults to 3600 = 1 hour) */ function useCached($filename="", $timeout=3600) { $this->_timeout = $timeout; @@ -629,8 +651,8 @@ class FeedCreator extends HtmlDescribable { * header may be sent to redirect the user to the newly created file. * @since 1.4 * - * @param filename string optional the filename where a recent version of the feed is saved. If not specified, the filename is $_SERVER["PHP_SELF"] with the extension changed to .xml (see _generateFilename()). - * @param redirect boolean optional send an HTTP redirect header or not. If true, the user will be automatically redirected to the created file. + * @param $filename string optional the filename where a recent version of the feed is saved. If not specified, the filename is $_SERVER["PHP_SELF"] with the extension changed to .xml (see _generateFilename()). + * @param $displayContents boolean optional send an HTTP redirect header or not. If true, the user will be automatically redirected to the created file. */ function saveFeed($filename="", $displayContents=true) { if ($filename=="") { @@ -667,6 +689,7 @@ class FeedCreator extends HtmlDescribable { * Usually, you won't need to use this. */ class FeedDate { + /** @var int */ var $unix; /** @@ -726,7 +749,7 @@ class FeedDate { /** * Gets the date stored in this FeedDate as an RFC 822 date. * - * @return a date in RFC 822 format + * @return string a date in RFC 822 format */ function rfc822() { //return gmdate("r",$this->unix); @@ -738,7 +761,7 @@ class FeedDate { /** * Gets the date stored in this FeedDate as an ISO 8601 date. * - * @return a date in ISO 8601 (RFC 3339) format + * @return string a date in ISO 8601 (RFC 3339) format */ function iso8601() { $date = gmdate("Y-m-d\TH:i:sO",$this->unix); @@ -751,7 +774,7 @@ class FeedDate { /** * Gets the date stored in this FeedDate as unix time stamp. * - * @return a date as a unix time stamp + * @return int a date as a unix time stamp */ function unix() { return $this->unix; @@ -777,7 +800,7 @@ class RSSCreator10 extends FeedCreator { $feed = "encoding."\"?>\n"; $feed.= $this->_createGeneratorComment(); if ($this->cssStyleSheet=="") { - $cssStyleSheet = "http://www.w3.org/2000/08/w3c-synd/style.css"; + $this->cssStyleSheet = "http://www.w3.org/2000/08/w3c-synd/style.css"; } $feed.= $this->_createStylesheetReferences(); $feed.= "encoding = "utf-8"; } + /** + * Build content + * @return string + */ function createFeed() { $feed = "encoding."\"?>\n"; $feed.= $this->_createStylesheetReferences(); $feed.= "\n"; $feed.= " ".FeedCreator::iTrunc(htmlspecialchars($this->title),100)."\n"; - $this->truncSize = 500; + $this->descriptionTruncSize = 500; $feed.= " ".$this->getDescription()."\n"; $feed.= " ".$this->link."\n"; $icnt = count($this->items); @@ -1091,6 +1118,10 @@ class AtomCreator10 extends FeedCreator { $this->encoding = "utf-8"; } + /** + * Build content + * @return string + */ function createFeed() { $feed = "encoding."\"?>\n"; $feed.= $this->_createGeneratorComment(); @@ -1174,6 +1205,10 @@ class AtomCreator03 extends FeedCreator { $this->encoding = "utf-8"; } + /** + * Build content + * @return string + */ function createFeed() { $feed = "encoding."\"?>\n"; $feed.= $this->_createGeneratorComment(); @@ -1281,6 +1316,7 @@ class MBOXCreator extends FeedCreator { */ function createFeed() { $icnt = count($this->items); + $feed = ""; for ($i=0; $i<$icnt; $i++) { if ($this->items[$i]->author!="") { $from = $this->items[$i]->author; @@ -1331,6 +1367,10 @@ class OPMLCreator extends FeedCreator { $this->encoding = "utf-8"; } + /** + * Build content + * @return string + */ function createFeed() { $feed = "encoding."\"?>\n"; $feed.= $this->_createGeneratorComment(); @@ -1441,6 +1481,7 @@ class HTMLCreator extends FeedCreator { } //set an openInNewWindow_token_to be inserted or not + $targetInsert = ""; if ($this->openInNewWindow) { $targetInsert = " target='_blank'"; } @@ -1568,6 +1609,14 @@ class JSCreator extends HTMLCreator { * @author Andreas Gohr */ class DokuWikiFeedCreator extends UniversalFeedCreator{ + + /** + * Build content + * + * @param string $format + * @param string $encoding + * @return string + */ function createFeed($format = "RSS0.91",$encoding='iso-8859-15') { $this->_setFormat($format); $this->_feed->encoding = $encoding; -- cgit v1.2.3 From d7fd4c3e04fcbbf463c35763e008527d3c9ad59f Mon Sep 17 00:00:00 2001 From: Gerrit Uitslag Date: Mon, 17 Feb 2014 19:12:41 +0100 Subject: Add dynamic declared _time attribute to cache object --- inc/cache.php | 1 + 1 file changed, 1 insertion(+) diff --git a/inc/cache.php b/inc/cache.php index 5eac94934..8453fe3e9 100644 --- a/inc/cache.php +++ b/inc/cache.php @@ -16,6 +16,7 @@ class cache { // used by _useCache to determine cache validity var $_event = ''; // event to be triggered during useCache + var $_time; function cache($key,$ext) { $this->key = $key; -- cgit v1.2.3 From 901248028bc3b7497093ab3853f2f6e347fbc397 Mon Sep 17 00:00:00 2001 From: Gerrit Uitslag Date: Mon, 17 Feb 2014 19:22:57 +0100 Subject: fix httputils PHPDocs --- inc/httputils.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/inc/httputils.php b/inc/httputils.php index ca60ed509..003733ede 100644 --- a/inc/httputils.php +++ b/inc/httputils.php @@ -64,7 +64,8 @@ function http_conditionalRequest($timestamp){ * Let the webserver send the given file via x-sendfile method * * @author Chris Smith - * @returns void or exits with previously header() commands executed + * @param $file + * @returns bool or exits with previously header() commands executed */ function http_sendfile($file) { global $conf; @@ -92,7 +93,7 @@ function http_sendfile($file) { * * This function exits the running script * - * @param ressource $fh - file handle for an already open file + * @param resource $fh - file handle for an already open file * @param int $size - size of the whole file * @param int $mime - MIME type of the file * @@ -204,7 +205,7 @@ function http_gzip_valid($uncompressed_file) { * * This function handles output of cacheable resource files. It ses the needed * HTTP headers. If a useable cache is present, it is passed to the web server - * and the scrpt is terminated. + * and the script is terminated. */ function http_cached($cache, $cache_ok) { global $conf; -- cgit v1.2.3 From b63529ad89f66ca4de0b4b6003892ac7fd71653c Mon Sep 17 00:00:00 2001 From: Christopher Smith Date: Mon, 17 Feb 2014 20:02:35 +0000 Subject: remove '' from list, its not part of the hook array --- inc/events.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inc/events.php b/inc/events.php index 888b968b5..58ba4d5e4 100644 --- a/inc/events.php +++ b/inc/events.php @@ -171,7 +171,7 @@ class Doku_Event_Handler { if (!empty($this->_hooks[$evt_name])) { foreach ($this->_hooks[$evt_name] as $sequenced_hooks) { foreach ($sequenced_hooks as $hook) { - list($obj, $method, $param, $seq) = $hook; + list($obj, $method, $param) = $hook; if (is_null($obj)) { $method($event, $param); -- cgit v1.2.3 From c59b3e001d1e8258b1d118909257b70516c8a6b1 Mon Sep 17 00:00:00 2001 From: Gerrit Uitslag Date: Mon, 17 Feb 2014 23:16:59 +0100 Subject: add visibility keywords and PHPDocs for cache --- inc/cache.php | 87 ++++++++++++++++++++++++++++++++++++++++++----------------- 1 file changed, 62 insertions(+), 25 deletions(-) diff --git a/inc/cache.php b/inc/cache.php index 8453fe3e9..8c23bd09b 100644 --- a/inc/cache.php +++ b/inc/cache.php @@ -9,16 +9,20 @@ if(!defined('DOKU_INC')) die('meh.'); class cache { - var $key = ''; // primary identifier for this item - var $ext = ''; // file ext for cache data, secondary identifier for this item - var $cache = ''; // cache file name - var $depends = array(); // array containing cache dependency information, + public $key = ''; // primary identifier for this item + public $ext = ''; // file ext for cache data, secondary identifier for this item + public $cache = ''; // cache file name + public $depends = array(); // array containing cache dependency information, // used by _useCache to determine cache validity var $_event = ''; // event to be triggered during useCache var $_time; - function cache($key,$ext) { + /** + * @param string $key primary identifier + * @param string $ext file extension + */ + public function cache($key,$ext) { $this->key = $key; $this->ext = $ext; $this->cache = getCacheName($key,$ext); @@ -37,7 +41,7 @@ class cache { * * @return bool true if cache can be used, false otherwise */ - function useCache($depends=array()) { + public function useCache($depends=array()) { $this->depends = $depends; $this->_addDependencies(); @@ -60,7 +64,7 @@ class cache { * * @return bool see useCache() */ - function _useCache() { + protected function _useCache() { if (!empty($this->depends['purge'])) return false; // purge requested? if (!($this->_time = @filemtime($this->cache))) return false; // cache exists? @@ -84,7 +88,7 @@ class cache { * it should not remove any existing dependencies and * it should only overwrite a dependency when the new value is more stringent than the old */ - function _addDependencies() { + protected function _addDependencies() { global $INPUT; if ($INPUT->has('purge')) $this->depends['purge'] = true; // purge requested } @@ -95,7 +99,7 @@ class cache { * @param bool $clean true to clean line endings, false to leave line endings alone * @return string cache contents */ - function retrieveCache($clean=true) { + public function retrieveCache($clean=true) { return io_readFile($this->cache, $clean); } @@ -105,14 +109,14 @@ class cache { * @param string $data the data to be cached * @return bool true on success, false otherwise */ - function storeCache($data) { + public function storeCache($data) { return io_savefile($this->cache, $data); } /** * remove any cached data associated with this cache instance */ - function removeCache() { + public function removeCache() { @unlink($this->cache); } @@ -123,7 +127,7 @@ class cache { * @param bool $success result of this cache use attempt * @return bool pass-thru $success value */ - function _stats($success) { + protected function _stats($success) { global $conf; static $stats = null; static $file; @@ -160,12 +164,18 @@ class cache { class cache_parser extends cache { - var $file = ''; // source file for cache - var $mode = ''; // input mode (represents the processing the input file will undergo) + public $file = ''; // source file for cache + public $mode = ''; // input mode (represents the processing the input file will undergo) var $_event = 'PARSER_CACHE_USE'; - function cache_parser($id, $file, $mode) { + /** + * + * @param string $id page id + * @param string $file source file for cache + * @param string $mode input mode + */ + public function cache_parser($id, $file, $mode) { if ($id) $this->page = $id; $this->file = $file; $this->mode = $mode; @@ -173,24 +183,29 @@ class cache_parser extends cache { parent::cache($file.$_SERVER['HTTP_HOST'].$_SERVER['SERVER_PORT'],'.'.$mode); } - function _useCache() { + /** + * method contains cache use decision logic + * + * @return bool see useCache() + */ + protected function _useCache() { if (!@file_exists($this->file)) return false; // source exists? return parent::_useCache(); } - function _addDependencies() { - global $conf, $config_cascade; + protected function _addDependencies() { + global $conf; $this->depends['age'] = isset($this->depends['age']) ? min($this->depends['age'],$conf['cachetime']) : $conf['cachetime']; // parser cache file dependencies ... - $files = array($this->file, // ... source + $files = array($this->file, // ... source DOKU_INC.'inc/parser/parser.php', // ... parser DOKU_INC.'inc/parser/handler.php', // ... handler ); - $files = array_merge($files, getConfigFiles('main')); // ... wiki settings + $files = array_merge($files, getConfigFiles('main')); // ... wiki settings $this->depends['files'] = !empty($this->depends['files']) ? array_merge($files, $this->depends['files']) : $files; parent::_addDependencies(); @@ -199,7 +214,13 @@ class cache_parser extends cache { } class cache_renderer extends cache_parser { - function _useCache() { + + /** + * method contains cache use decision logic + * + * @return bool see useCache() + */ + protected function _useCache() { global $conf; if (!parent::_useCache()) return false; @@ -232,7 +253,7 @@ class cache_renderer extends cache_parser { return true; } - function _addDependencies() { + protected function _addDependencies() { // renderer cache file dependencies ... $files = array( @@ -256,16 +277,32 @@ class cache_renderer extends cache_parser { class cache_instructions extends cache_parser { - function cache_instructions($id, $file) { + /** + * @param string $id page id + * @param string $file source file for cache + */ + public function cache_instructions($id, $file) { parent::cache_parser($id, $file, 'i'); } - function retrieveCache($clean=true) { + /** + * retrieve the cached data + * + * @param bool $clean true to clean line endings, false to leave line endings alone + * @return string cache contents + */ + public function retrieveCache($clean=true) { $contents = io_readFile($this->cache, false); return !empty($contents) ? unserialize($contents) : array(); } - function storeCache($instructions) { + /** + * cache $instructions + * + * @param string $instructions the instruction to be cached + * @return bool true on success, false otherwise + */ + public function storeCache($instructions) { return io_savefile($this->cache,serialize($instructions)); } } -- cgit v1.2.3 From 53204f807bcd990bb9a2463237076054da0fec49 Mon Sep 17 00:00:00 2001 From: Gerrit Uitslag Date: Mon, 17 Feb 2014 23:42:58 +0100 Subject: cleanup PHPDocs: DokuWiki_Syntax_Plugin is a DokuWiki_Plugin as well --- inc/pluginutils.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inc/pluginutils.php b/inc/pluginutils.php index 894bbefb6..911c4e5c0 100644 --- a/inc/pluginutils.php +++ b/inc/pluginutils.php @@ -37,7 +37,7 @@ function plugin_list($type='',$all=false) { * @param $name string name of the plugin to load * @param $new bool true to return a new instance of the plugin, false to use an already loaded instance * @param $disabled bool true to load even disabled plugins - * @return DokuWiki_Plugin|DokuWiki_Syntax_Plugin|null the plugin object or null on failure + * @return DokuWiki_Plugin|null the plugin object or null on failure */ function plugin_load($type,$name,$new=false,$disabled=false) { /** @var $plugin_controller Doku_Plugin_Controller */ -- cgit v1.2.3 From 5965f64b985361323931454deffb806ec6c8695b Mon Sep 17 00:00:00 2001 From: Gerrit Uitslag Date: Mon, 17 Feb 2014 23:43:34 +0100 Subject: PHPDocs for Doku_Event and handler --- inc/events.php | 44 ++++++++++++++++++++++++++++++++------------ 1 file changed, 32 insertions(+), 12 deletions(-) diff --git a/inc/events.php b/inc/events.php index 58ba4d5e4..7f9824f60 100644 --- a/inc/events.php +++ b/inc/events.php @@ -8,6 +8,9 @@ if(!defined('DOKU_INC')) die('meh.'); +/** + * The event + */ class Doku_Event { // public properties @@ -32,6 +35,9 @@ class Doku_Event { } + /** + * @return string + */ function __toString() { return $this->name; } @@ -51,7 +57,8 @@ class Doku_Event { * $evt->advise_after(); * unset($evt); * - * @return results of processing the event, usually $this->_default + * @param bool $enablePreventDefault + * @return bool results of processing the event, usually $this->_default */ function advise_before($enablePreventDefault=true) { global $EVENT_HANDLER; @@ -77,7 +84,9 @@ class Doku_Event { * $this->_default, all of which may have been modified by the event handlers. * - advise all registered (_AFTER) handlers that the event has taken place * - * @return $event->results + * @param null|callable $action + * @param bool $enablePrevent + * @return mixed $event->results * the value set by any _before or handlers if the default action is prevented * or the results of the default action (as modified by _after handlers) * or NULL no action took place and no handler modified the value @@ -116,6 +125,9 @@ class Doku_Event { function preventDefault() { $this->_default = false; } } +/** + * Controls the registration and execution of all events, + */ class Doku_Event_Handler { // public properties: none @@ -132,6 +144,7 @@ class Doku_Event_Handler { function Doku_Event_Handler() { // load action plugins + /** @var DokuWiki_Action_Plugin $plugin */ $plugin = null; $pluginlist = plugin_list('action'); @@ -147,12 +160,13 @@ class Doku_Event_Handler { * * register a hook for an event * - * @param $event (string) name used by the event, (incl '_before' or '_after' for triggers) - * @param $obj (obj) object in whose scope method is to be executed, + * @param $event string name used by the event, (incl '_before' or '_after' for triggers) + * @param $advise string + * @param $obj object object in whose scope method is to be executed, * if NULL, method is assumed to be a globally available function - * @param $method (function) event handler function - * @param $param (mixed) data passed to the event handler - * @param $seq (int) sequence number for ordering hook execution (ascending) + * @param $method string event handler function + * @param $param mixed data passed to the event handler + * @param $seq int sequence number for ordering hook execution (ascending) */ function register_hook($event, $advise, $obj, $method, $param=null, $seq=0) { $seq = (int)$seq; @@ -164,6 +178,12 @@ class Doku_Event_Handler { } } + /** + * process the before/after event + * + * @param Doku_Event $event + * @param string $advise BEFORE or AFTER + */ function process_event($event,$advise='') { $evt_name = $event->name . ($advise ? '_'.$advise : '_BEFORE'); @@ -191,12 +211,12 @@ class Doku_Event_Handler { * * function wrapper to process (create, trigger and destroy) an event * - * @param $name (string) name for the event - * @param $data (mixed) event data - * @param $action (callback) (optional, default=NULL) default action, a php callback function - * @param $canPreventDefault (bool) (optional, default=true) can hooks prevent the default action + * @param $name string name for the event + * @param $data mixed event data + * @param $action callback (optional, default=NULL) default action, a php callback function + * @param $canPreventDefault bool (optional, default=true) can hooks prevent the default action * - * @return (mixed) the event results value after all event processing is complete + * @return mixed the event results value after all event processing is complete * by default this is the return value of the default action however * it can be set or modified by event handler hooks */ -- cgit v1.2.3 From cefd14cbc4f6dabfb2fb7b7ffb6b68d4501afd4f Mon Sep 17 00:00:00 2001 From: Gerrit Uitslag Date: Tue, 18 Feb 2014 00:54:21 +0100 Subject: PHPDocs of cache classes --- inc/cache.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/inc/cache.php b/inc/cache.php index 8c23bd09b..5f54a34a9 100644 --- a/inc/cache.php +++ b/inc/cache.php @@ -8,6 +8,9 @@ if(!defined('DOKU_INC')) die('meh.'); +/** + * Generic handling of caching + */ class cache { public $key = ''; // primary identifier for this item public $ext = ''; // file ext for cache data, secondary identifier for this item @@ -162,6 +165,9 @@ class cache { } } +/** + * Parser caching + */ class cache_parser extends cache { public $file = ''; // source file for cache @@ -213,6 +219,9 @@ class cache_parser extends cache { } +/** + * Caching of data of renderer + */ class cache_renderer extends cache_parser { /** @@ -275,6 +284,9 @@ class cache_renderer extends cache_parser { } } +/** + * Caching of parser instructions + */ class cache_instructions extends cache_parser { /** -- cgit v1.2.3 From dbf714f723aaf3a4e63a0ac2f07746c41fa3e98d Mon Sep 17 00:00:00 2001 From: Gerrit Uitslag Date: Tue, 18 Feb 2014 13:34:22 +0100 Subject: Improve PHPDocs pageutils --- inc/pageutils.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/inc/pageutils.php b/inc/pageutils.php index c8d3cf4bb..9c2794387 100644 --- a/inc/pageutils.php +++ b/inc/pageutils.php @@ -94,6 +94,7 @@ function getID($param='id',$clean=true){ * @author Andreas Gohr * @param string $raw_id The pageid to clean * @param boolean $ascii Force ASCII + * @return string cleaned id */ function cleanID($raw_id,$ascii=false){ global $conf; @@ -244,6 +245,7 @@ function page_exists($id,$rev='',$clean=true) { * @param $rev string page revision, empty string for current * @param $clean bool flag indicating that $raw_id should be cleaned. Only set to false * when $id is guaranteed to have been cleaned already. + * @return string full path * * @author Andreas Gohr */ @@ -361,6 +363,7 @@ function mediaFN($id, $rev=''){ * * @param string $id The id of the local file * @param string $ext The file extension (usually txt) + * @return string full filepath to localized file * @author Andreas Gohr */ function localeFN($id,$ext='txt'){ @@ -543,6 +546,11 @@ function isHiddenPage($id){ return $data['hidden']; } +/** + * callback checks if page is hidden + * + * @param array $data event data see isHiddenPage() + */ function _isHiddenPage(&$data) { global $conf; global $ACT; -- cgit v1.2.3 From 5f0071ebcd0bb2a2cb0f64834014be73f6690806 Mon Sep 17 00:00:00 2001 From: Gerrit Uitslag Date: Tue, 18 Feb 2014 13:41:13 +0100 Subject: PHPDocs form --- inc/form.php | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/inc/form.php b/inc/form.php index 312c42b60..610f50200 100644 --- a/inc/form.php +++ b/inc/form.php @@ -47,15 +47,11 @@ class Doku_Form { * with up to four parameters is deprecated, instead the first parameter * should be an array with parameters. * - * @param mixed $params Parameters for the HTML form element; Using the - * deprecated calling convention this is the ID - * attribute of the form - * @param string $action (optional, deprecated) submit URL, defaults to - * current page - * @param string $method (optional, deprecated) 'POST' or 'GET', default - * is POST - * @param string $enctype (optional, deprecated) Encoding type of the - * data + * @param mixed $params Parameters for the HTML form element; Using the deprecated + * calling convention this is the ID attribute of the form + * @param bool|string $action (optional, deprecated) submit URL, defaults to current page + * @param bool|string $method (optional, deprecated) 'POST' or 'GET', default is POST + * @param bool|string $enctype (optional, deprecated) Encoding type of the data * @author Tom N Harris */ function Doku_Form($params, $action=false, $method=false, $enctype=false) { @@ -230,7 +226,7 @@ class Doku_Form { * first (underflow) or last (overflow) element. * * @param int $pos 0-based index - * @return arrayreference pseudo-element + * @return array reference pseudo-element * @author Tom N Harris */ function &getElementAt($pos) { -- cgit v1.2.3 From 56b0b744e40b19048e14cee4ff6caf69858d9fd6 Mon Sep 17 00:00:00 2001 From: Gerrit Uitslag Date: Tue, 18 Feb 2014 13:50:12 +0100 Subject: PHPDocs js.php --- lib/exe/js.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/exe/js.php b/lib/exe/js.php index 04413b409..8f16f4a96 100644 --- a/lib/exe/js.php +++ b/lib/exe/js.php @@ -220,6 +220,12 @@ function js_pluginstrings() { return $pluginstrings; } +/** + * Return an two-dimensional array with strings from the language file of current active template. + * + * - $lang['js'] must be an array. + * - Nothing is returned for template without an entry for $lang['js'] + */ function js_templatestrings() { global $conf; $templatestrings = array(); -- cgit v1.2.3 From c9ec6231967652cf58f7840063ed94a26e6d8b37 Mon Sep 17 00:00:00 2001 From: Gerrit Uitslag Date: Tue, 18 Feb 2014 20:05:33 +0100 Subject: Fix PHPDocs emailadressvalidator --- inc/EmailAddressValidator.php | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/inc/EmailAddressValidator.php b/inc/EmailAddressValidator.php index bb4ef0ca9..fd6f3275b 100644 --- a/inc/EmailAddressValidator.php +++ b/inc/EmailAddressValidator.php @@ -15,8 +15,8 @@ class EmailAddressValidator { /** * Check email address validity - * @param strEmailAddress Email address to be checked - * @return True if email is valid, false if not + * @param string $strEmailAddress Email address to be checked + * @return bool True if email is valid, false if not */ public function check_email_address($strEmailAddress) { @@ -82,8 +82,8 @@ class EmailAddressValidator { /** * Checks email section before "@" symbol for validity - * @param strLocalPortion Text to be checked - * @return True if local portion is valid, false if not + * @param string $strLocalPortion Text to be checked + * @return bool True if local portion is valid, false if not */ protected function check_local_portion($strLocalPortion) { // Local portion can only be from 1 to 64 characters, inclusive. @@ -113,8 +113,8 @@ class EmailAddressValidator { /** * Checks email section after "@" symbol for validity - * @param strDomainPortion Text to be checked - * @return True if domain portion is valid, false if not + * @param string $strDomainPortion Text to be checked + * @return bool True if domain portion is valid, false if not */ protected function check_domain_portion($strDomainPortion) { // Total domain can only be from 1 to 255 characters, inclusive @@ -172,10 +172,10 @@ class EmailAddressValidator { /** * Check given text length is between defined bounds - * @param strText Text to be checked - * @param intMinimum Minimum acceptable length - * @param intMaximum Maximum acceptable length - * @return True if string is within bounds (inclusive), false if not + * @param string $strText Text to be checked + * @param int $intMinimum Minimum acceptable length + * @param int $intMaximum Maximum acceptable length + * @return bool True if string is within bounds (inclusive), false if not */ protected function check_text_length($strText, $intMinimum, $intMaximum) { // Minimum and maximum are both inclusive -- cgit v1.2.3 From baf0c3e506eee97c63d130af88fe3547c31579cc Mon Sep 17 00:00:00 2001 From: Gerrit Uitslag Date: Tue, 18 Feb 2014 21:59:16 +0100 Subject: extract navigation html to separated method --- inc/html.php | 208 +++++++++++++++++++++++++++++++++-------------------------- 1 file changed, 118 insertions(+), 90 deletions(-) diff --git a/inc/html.php b/inc/html.php index 05688e0aa..7d533282e 100644 --- a/inc/html.php +++ b/inc/html.php @@ -1082,9 +1082,11 @@ function html_diff_head($l_rev, $r_rev, $id = null, $media = false, $inline = fa /** * Show diff + * between current page version and provided $text + * or between the revisions provided via GET or POST * * @author Andreas Gohr - * @param string $text compare with this text with most current version + * @param string $text when non-empty: compare with this text with most current version * @param bool $intro display the intro text * @param string $type type of the diff (inline or sidebyside) */ @@ -1184,94 +1186,7 @@ function html_diff($text = '', $intro = true, $type = null) { $l_nav = ''; $r_nav = ''; if(!$text) { - $r_rev = $r_rev ? $r_rev : $INFO['meta']['last_change']['date']; //last timestamp is not in changelog - //retrieve revisions with additional info - list($l_revs, $r_revs) = $pagelog->getRevisionsAround($l_rev, $r_rev); - $l_revisions = array(); - foreach($l_revs as $rev) { - $info = $pagelog->getRevisionInfo($rev); - $l_revisions[$rev] = array( - $rev, - dformat($info['date']) . ' ' . editorinfo($info['user']) . ' ' . $info['sum'], - $rev >= $r_rev //disable? - ); - } - $r_revisions = array(); - foreach($r_revs as $rev) { - $info = $pagelog->getRevisionInfo($rev); - $r_revisions[$rev] = array( - $rev, - dformat($info['date']) . ' ' . editorinfo($info['user']) . ' ' . $info['sum'], - $rev <= $l_rev //disable? - ); - } - //determine previous/next revisions - $l_index = array_search($l_rev, $l_revs); - $l_prev = $l_revs[$l_index + 1]; - $l_next = $l_revs[$l_index - 1]; - $r_index = array_search($r_rev, $r_revs); - $r_prev = $r_revs[$r_index + 1]; - $r_next = $r_revs[$r_index - 1]; - - //Left side: - //move back - if($l_prev) { - $l_nav .= html_diff_navigationlink($type, 'diffbothprevrev', $l_prev, $r_prev); - $l_nav .= html_diff_navigationlink($type, 'diffprevrev', $l_prev, $r_rev); - } - //dropdown - $form = new Doku_Form(array('action' => wl())); - $form->addHidden('id', $ID); - $form->addHidden('difftype', $type); - $form->addHidden('rev2[1]', $r_rev); - $form->addHidden('do', 'diff'); - $form->addElement( - form_makeListboxField( - 'rev2[0]', - $l_revisions, - $l_rev, - '', '', '', - array('class' => 'quickselect') - ) - ); - $form->addElement(form_makeButton('submit', 'diff', 'Go')); - $l_nav .= $form->getForm(); - //move forward - if($l_next < $r_rev) { - $l_nav .= html_diff_navigationlink($type, 'diffnextrev', $l_next, $r_rev); - } - - //Right side: - //move back - if($l_rev < $r_prev) { - $r_nav .= html_diff_navigationlink($type, 'diffprevrev', $l_rev, $r_prev); - } - //dropdown - $form = new Doku_Form(array('action' => wl())); - $form->addHidden('id', $ID); - $form->addHidden('rev2[0]', $l_rev); - $form->addHidden('difftype', $type); - $form->addHidden('do', 'diff'); - $form->addElement( - form_makeListboxField( - 'rev2[1]', - $r_revisions, - $r_rev, - '', '', '', - array('class' => 'quickselect') - ) - ); - $form->addElement(form_makeButton('submit', 'diff', 'Go')); - $r_nav .= $form->getForm(); - //move forward - if($r_next) { - if($pagelog->isCurrentRevision($r_next)) { - $r_nav .= html_diff_navigationlink($type, 'difflastrev', $l_rev); //last revision is diff with current page - } else { - $r_nav .= html_diff_navigationlink($type, 'diffnextrev', $l_rev, $r_next); - } - $r_nav .= html_diff_navigationlink($type, 'diffbothnextrev', $l_next, $r_next); - } + list($l_nav, $r_nav) = html_diff_navigation($pagelog, $type, $l_rev, $r_rev); } /* * Create diff object and the formatter @@ -1318,7 +1233,7 @@ function html_diff($text = '', $intro = true, $type = null) { ptln('

'); // link to exactly this view FS#2835 - html_diff_navigationlink($type, 'difflink', $l_rev, $r_rev ? $r_rev : $INFO['lastmod']); + echo html_diff_navigationlink($type, 'difflink', $l_rev, $r_rev ? $r_rev : $INFO['lastmod']); ptln('

'); ptln('
'); // .diffoptions @@ -1381,6 +1296,118 @@ function html_diff($text = '', $intro = true, $type = null) { getRevisionsAround($l_rev, $r_rev); + $l_revisions = array(); + foreach($l_revs as $rev) { + $info = $pagelog->getRevisionInfo($rev); + $l_revisions[$rev] = array( + $rev, + dformat($info['date']) . ' ' . editorinfo($info['user']) . ' ' . $info['sum'], + $rev >= $r_rev //disable? + ); + } + $r_revisions = array(); + foreach($r_revs as $rev) { + $info = $pagelog->getRevisionInfo($rev); + $r_revisions[$rev] = array( + $rev, + dformat($info['date']) . ' ' . editorinfo($info['user']) . ' ' . $info['sum'], + $rev <= $l_rev //disable? + ); + } + //determine previous/next revisions + $l_index = array_search($l_rev, $l_revs); + $l_prev = $l_revs[$l_index + 1]; + $l_next = $l_revs[$l_index - 1]; + $r_index = array_search($r_rev, $r_revs); + $r_prev = $r_revs[$r_index + 1]; + $r_next = $r_revs[$r_index - 1]; + + + /* + * Left side: + */ + $l_nav = ''; + //move back + if($l_prev) { + $l_nav .= html_diff_navigationlink($type, 'diffbothprevrev', $l_prev, $r_prev); + $l_nav .= html_diff_navigationlink($type, 'diffprevrev', $l_prev, $r_rev); + } + //dropdown + $form = new Doku_Form(array('action' => wl())); + $form->addHidden('id', $ID); + $form->addHidden('difftype', $type); + $form->addHidden('rev2[1]', $r_rev); + $form->addHidden('do', 'diff'); + $form->addElement( + form_makeListboxField( + 'rev2[0]', + $l_revisions, + $l_rev, + '', '', '', + array('class' => 'quickselect') + ) + ); + $form->addElement(form_makeButton('submit', 'diff', 'Go')); + $l_nav .= $form->getForm(); + //move forward + if($l_next < $r_rev) { + $l_nav .= html_diff_navigationlink($type, 'diffnextrev', $l_next, $r_rev); + } + + /* + * Right side: + */ + $r_nav = ''; + //move back + if($l_rev < $r_prev) { + $r_nav .= html_diff_navigationlink($type, 'diffprevrev', $l_rev, $r_prev); + } + //dropdown + $form = new Doku_Form(array('action' => wl())); + $form->addHidden('id', $ID); + $form->addHidden('rev2[0]', $l_rev); + $form->addHidden('difftype', $type); + $form->addHidden('do', 'diff'); + $form->addElement( + form_makeListboxField( + 'rev2[1]', + $r_revisions, + $r_rev, + '', '', '', + array('class' => 'quickselect') + ) + ); + $form->addElement(form_makeButton('submit', 'diff', 'Go')); + $r_nav .= $form->getForm(); + //move forward + if($r_next) { + if($pagelog->isCurrentRevision($r_next)) { + $r_nav .= html_diff_navigationlink($type, 'difflastrev', $l_rev); //last revision is diff with current page + } else { + $r_nav .= html_diff_navigationlink($type, 'diffnextrev', $l_rev, $r_next); + } + $r_nav .= html_diff_navigationlink($type, 'diffbothnextrev', $l_next, $r_next); + } + return array($l_nav, $r_nav); +} + /** * Create html link to a diff defined by two revisions * @@ -1715,6 +1742,7 @@ function html_edit(){ * Display the default edit form * * Is the default action for HTML_EDIT_FORMSELECTION. + * @param mixed[] $param */ function html_edit_form($param) { global $TEXT; -- cgit v1.2.3 From af59854ba94dae9584db04d5688dddb581503d33 Mon Sep 17 00:00:00 2001 From: Gerrit Uitslag Date: Tue, 18 Feb 2014 22:25:53 +0100 Subject: Check if revision is defined at all before comparing --- inc/html.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/inc/html.php b/inc/html.php index 7d533282e..e7d401594 100644 --- a/inc/html.php +++ b/inc/html.php @@ -1339,7 +1339,6 @@ function html_diff_navigation($pagelog, $type, $l_rev, $r_rev) { $r_prev = $r_revs[$r_index + 1]; $r_next = $r_revs[$r_index - 1]; - /* * Left side: */ @@ -1367,7 +1366,7 @@ function html_diff_navigation($pagelog, $type, $l_rev, $r_rev) { $form->addElement(form_makeButton('submit', 'diff', 'Go')); $l_nav .= $form->getForm(); //move forward - if($l_next < $r_rev) { + if($l_next && $l_next < $r_rev) { $l_nav .= html_diff_navigationlink($type, 'diffnextrev', $l_next, $r_rev); } -- cgit v1.2.3 From fd3ec3c5b9b8af10dd89982ddbdf29ba7a13d700 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Tue, 18 Feb 2014 23:02:26 +0100 Subject: file icon updates now we no longer limit generation to the extensions in mime types, because file icons are used in downloadable code blocks, too. All icons were regenerated with the latest update of the generator. --- lib/images/fileicons/16x16/asm.png | Bin 0 -> 424 bytes lib/images/fileicons/16x16/bash.png | Bin 0 -> 435 bytes lib/images/fileicons/16x16/c.png | Bin 0 -> 413 bytes lib/images/fileicons/16x16/cc.png | Bin 0 -> 410 bytes lib/images/fileicons/16x16/cpp.png | Bin 0 -> 429 bytes lib/images/fileicons/16x16/csh.png | Bin 0 -> 430 bytes lib/images/fileicons/16x16/css.png | Bin 0 -> 430 bytes lib/images/fileicons/16x16/diff.png | Bin 0 -> 428 bytes lib/images/fileicons/16x16/doc.png | Bin 410 -> 405 bytes lib/images/fileicons/16x16/docx.png | Bin 415 -> 402 bytes lib/images/fileicons/16x16/gif.png | Bin 414 -> 407 bytes lib/images/fileicons/16x16/h.png | Bin 0 -> 411 bytes lib/images/fileicons/16x16/hpp.png | Bin 0 -> 417 bytes lib/images/fileicons/16x16/htm.png | Bin 402 -> 422 bytes lib/images/fileicons/16x16/html.png | Bin 391 -> 422 bytes lib/images/fileicons/16x16/ico.png | Bin 413 -> 405 bytes lib/images/fileicons/16x16/java.png | Bin 0 -> 420 bytes lib/images/fileicons/16x16/jpeg.png | Bin 424 -> 412 bytes lib/images/fileicons/16x16/jpg.png | Bin 418 -> 412 bytes lib/images/fileicons/16x16/js.png | Bin 0 -> 420 bytes lib/images/fileicons/16x16/json.png | Bin 0 -> 434 bytes lib/images/fileicons/16x16/odc.png | Bin 407 -> 403 bytes lib/images/fileicons/16x16/odf.png | Bin 411 -> 408 bytes lib/images/fileicons/16x16/odg.png | Bin 411 -> 405 bytes lib/images/fileicons/16x16/odi.png | Bin 398 -> 398 bytes lib/images/fileicons/16x16/odp.png | Bin 404 -> 406 bytes lib/images/fileicons/16x16/ods.png | Bin 416 -> 409 bytes lib/images/fileicons/16x16/odt.png | Bin 403 -> 406 bytes lib/images/fileicons/16x16/pas.png | Bin 0 -> 435 bytes lib/images/fileicons/16x16/pdf.png | Bin 419 -> 425 bytes lib/images/fileicons/16x16/pl.png | Bin 0 -> 417 bytes lib/images/fileicons/16x16/png.png | Bin 412 -> 417 bytes lib/images/fileicons/16x16/ppt.png | Bin 412 -> 415 bytes lib/images/fileicons/16x16/pptx.png | Bin 414 -> 407 bytes lib/images/fileicons/16x16/ps.png | Bin 416 -> 424 bytes lib/images/fileicons/16x16/py.png | Bin 0 -> 426 bytes lib/images/fileicons/16x16/rtf.png | Bin 418 -> 422 bytes lib/images/fileicons/16x16/sh.png | Bin 0 -> 422 bytes lib/images/fileicons/16x16/sxc.png | Bin 420 -> 416 bytes lib/images/fileicons/16x16/sxd.png | Bin 424 -> 420 bytes lib/images/fileicons/16x16/sxi.png | Bin 414 -> 408 bytes lib/images/fileicons/16x16/sxw.png | Bin 417 -> 410 bytes lib/images/fileicons/16x16/xls.png | Bin 415 -> 408 bytes lib/images/fileicons/16x16/xlsx.png | Bin 425 -> 419 bytes lib/images/fileicons/16x16/xml.png | Bin 400 -> 400 bytes lib/images/fileicons/32x32/asm.png | Bin 0 -> 988 bytes lib/images/fileicons/32x32/bash.png | Bin 0 -> 993 bytes lib/images/fileicons/32x32/c.png | Bin 0 -> 945 bytes lib/images/fileicons/32x32/cc.png | Bin 0 -> 953 bytes lib/images/fileicons/32x32/cpp.png | Bin 0 -> 958 bytes lib/images/fileicons/32x32/csh.png | Bin 0 -> 981 bytes lib/images/fileicons/32x32/css.png | Bin 0 -> 967 bytes lib/images/fileicons/32x32/diff.png | Bin 0 -> 975 bytes lib/images/fileicons/32x32/doc.png | Bin 1034 -> 1032 bytes lib/images/fileicons/32x32/docx.png | Bin 1078 -> 1062 bytes lib/images/fileicons/32x32/gif.png | Bin 944 -> 944 bytes lib/images/fileicons/32x32/h.png | Bin 0 -> 939 bytes lib/images/fileicons/32x32/hpp.png | Bin 0 -> 975 bytes lib/images/fileicons/32x32/htm.png | Bin 819 -> 982 bytes lib/images/fileicons/32x32/html.png | Bin 827 -> 982 bytes lib/images/fileicons/32x32/ico.png | Bin 941 -> 941 bytes lib/images/fileicons/32x32/java.png | Bin 0 -> 992 bytes lib/images/fileicons/32x32/jpeg.png | Bin 966 -> 948 bytes lib/images/fileicons/32x32/jpg.png | Bin 949 -> 948 bytes lib/images/fileicons/32x32/js.png | Bin 0 -> 959 bytes lib/images/fileicons/32x32/json.png | Bin 0 -> 1001 bytes lib/images/fileicons/32x32/odc.png | Bin 1061 -> 1058 bytes lib/images/fileicons/32x32/odf.png | Bin 1059 -> 1056 bytes lib/images/fileicons/32x32/odg.png | Bin 1066 -> 1065 bytes lib/images/fileicons/32x32/odi.png | Bin 1058 -> 1056 bytes lib/images/fileicons/32x32/odp.png | Bin 1060 -> 1060 bytes lib/images/fileicons/32x32/ods.png | Bin 1063 -> 1063 bytes lib/images/fileicons/32x32/odt.png | Bin 1060 -> 1060 bytes lib/images/fileicons/32x32/pas.png | Bin 0 -> 975 bytes lib/images/fileicons/32x32/pdf.png | Bin 1072 -> 1076 bytes lib/images/fileicons/32x32/pl.png | Bin 0 -> 950 bytes lib/images/fileicons/32x32/png.png | Bin 957 -> 957 bytes lib/images/fileicons/32x32/ppt.png | Bin 871 -> 872 bytes lib/images/fileicons/32x32/pptx.png | Bin 924 -> 917 bytes lib/images/fileicons/32x32/ps.png | Bin 595 -> 1086 bytes lib/images/fileicons/32x32/py.png | Bin 0 -> 965 bytes lib/images/fileicons/32x32/rtf.png | Bin 1035 -> 861 bytes lib/images/fileicons/32x32/sh.png | Bin 0 -> 961 bytes lib/images/fileicons/32x32/sxc.png | Bin 1078 -> 1074 bytes lib/images/fileicons/32x32/sxd.png | Bin 1079 -> 1078 bytes lib/images/fileicons/32x32/sxi.png | Bin 1067 -> 1066 bytes lib/images/fileicons/32x32/sxw.png | Bin 1086 -> 1076 bytes lib/images/fileicons/32x32/xls.png | Bin 1137 -> 1137 bytes lib/images/fileicons/32x32/xlsx.png | Bin 1182 -> 1174 bytes lib/images/fileicons/32x32/xml.png | Bin 818 -> 615 bytes lib/images/fileicons/generate.php | 47 +++++++++++++++++++++--------------- 91 files changed, 28 insertions(+), 19 deletions(-) create mode 100644 lib/images/fileicons/16x16/asm.png create mode 100644 lib/images/fileicons/16x16/bash.png create mode 100644 lib/images/fileicons/16x16/c.png create mode 100644 lib/images/fileicons/16x16/cc.png create mode 100644 lib/images/fileicons/16x16/cpp.png create mode 100644 lib/images/fileicons/16x16/csh.png create mode 100644 lib/images/fileicons/16x16/css.png create mode 100644 lib/images/fileicons/16x16/diff.png create mode 100644 lib/images/fileicons/16x16/h.png create mode 100644 lib/images/fileicons/16x16/hpp.png create mode 100644 lib/images/fileicons/16x16/java.png create mode 100644 lib/images/fileicons/16x16/js.png create mode 100644 lib/images/fileicons/16x16/json.png create mode 100644 lib/images/fileicons/16x16/pas.png create mode 100644 lib/images/fileicons/16x16/pl.png create mode 100644 lib/images/fileicons/16x16/py.png create mode 100644 lib/images/fileicons/16x16/sh.png create mode 100644 lib/images/fileicons/32x32/asm.png create mode 100644 lib/images/fileicons/32x32/bash.png create mode 100644 lib/images/fileicons/32x32/c.png create mode 100644 lib/images/fileicons/32x32/cc.png create mode 100644 lib/images/fileicons/32x32/cpp.png create mode 100644 lib/images/fileicons/32x32/csh.png create mode 100644 lib/images/fileicons/32x32/css.png create mode 100644 lib/images/fileicons/32x32/diff.png create mode 100644 lib/images/fileicons/32x32/h.png create mode 100644 lib/images/fileicons/32x32/hpp.png create mode 100644 lib/images/fileicons/32x32/java.png create mode 100644 lib/images/fileicons/32x32/js.png create mode 100644 lib/images/fileicons/32x32/json.png create mode 100644 lib/images/fileicons/32x32/pas.png create mode 100644 lib/images/fileicons/32x32/pl.png create mode 100644 lib/images/fileicons/32x32/py.png create mode 100644 lib/images/fileicons/32x32/sh.png diff --git a/lib/images/fileicons/16x16/asm.png b/lib/images/fileicons/16x16/asm.png new file mode 100644 index 000000000..a88d01665 Binary files /dev/null and b/lib/images/fileicons/16x16/asm.png differ diff --git a/lib/images/fileicons/16x16/bash.png b/lib/images/fileicons/16x16/bash.png new file mode 100644 index 000000000..047be8c6a Binary files /dev/null and b/lib/images/fileicons/16x16/bash.png differ diff --git a/lib/images/fileicons/16x16/c.png b/lib/images/fileicons/16x16/c.png new file mode 100644 index 000000000..5e91b8473 Binary files /dev/null and b/lib/images/fileicons/16x16/c.png differ diff --git a/lib/images/fileicons/16x16/cc.png b/lib/images/fileicons/16x16/cc.png new file mode 100644 index 000000000..432c95901 Binary files /dev/null and b/lib/images/fileicons/16x16/cc.png differ diff --git a/lib/images/fileicons/16x16/cpp.png b/lib/images/fileicons/16x16/cpp.png new file mode 100644 index 000000000..6c6be4263 Binary files /dev/null and b/lib/images/fileicons/16x16/cpp.png differ diff --git a/lib/images/fileicons/16x16/csh.png b/lib/images/fileicons/16x16/csh.png new file mode 100644 index 000000000..14e01b2a7 Binary files /dev/null and b/lib/images/fileicons/16x16/csh.png differ diff --git a/lib/images/fileicons/16x16/css.png b/lib/images/fileicons/16x16/css.png new file mode 100644 index 000000000..5638f1879 Binary files /dev/null and b/lib/images/fileicons/16x16/css.png differ diff --git a/lib/images/fileicons/16x16/diff.png b/lib/images/fileicons/16x16/diff.png new file mode 100644 index 000000000..c81c4ff2c Binary files /dev/null and b/lib/images/fileicons/16x16/diff.png differ diff --git a/lib/images/fileicons/16x16/doc.png b/lib/images/fileicons/16x16/doc.png index 925494576..9324f20b3 100644 Binary files a/lib/images/fileicons/16x16/doc.png and b/lib/images/fileicons/16x16/doc.png differ diff --git a/lib/images/fileicons/16x16/docx.png b/lib/images/fileicons/16x16/docx.png index 5bae13f9e..e3986295d 100644 Binary files a/lib/images/fileicons/16x16/docx.png and b/lib/images/fileicons/16x16/docx.png differ diff --git a/lib/images/fileicons/16x16/gif.png b/lib/images/fileicons/16x16/gif.png index d8eb57e54..bcbb8366b 100644 Binary files a/lib/images/fileicons/16x16/gif.png and b/lib/images/fileicons/16x16/gif.png differ diff --git a/lib/images/fileicons/16x16/h.png b/lib/images/fileicons/16x16/h.png new file mode 100644 index 000000000..a208d3159 Binary files /dev/null and b/lib/images/fileicons/16x16/h.png differ diff --git a/lib/images/fileicons/16x16/hpp.png b/lib/images/fileicons/16x16/hpp.png new file mode 100644 index 000000000..decd78b7e Binary files /dev/null and b/lib/images/fileicons/16x16/hpp.png differ diff --git a/lib/images/fileicons/16x16/htm.png b/lib/images/fileicons/16x16/htm.png index 8312c33a8..e0ead2bff 100644 Binary files a/lib/images/fileicons/16x16/htm.png and b/lib/images/fileicons/16x16/htm.png differ diff --git a/lib/images/fileicons/16x16/html.png b/lib/images/fileicons/16x16/html.png index 7a7fcc0fa..e0ead2bff 100644 Binary files a/lib/images/fileicons/16x16/html.png and b/lib/images/fileicons/16x16/html.png differ diff --git a/lib/images/fileicons/16x16/ico.png b/lib/images/fileicons/16x16/ico.png index 9d4259c1b..93343717c 100644 Binary files a/lib/images/fileicons/16x16/ico.png and b/lib/images/fileicons/16x16/ico.png differ diff --git a/lib/images/fileicons/16x16/java.png b/lib/images/fileicons/16x16/java.png new file mode 100644 index 000000000..6adebc02b Binary files /dev/null and b/lib/images/fileicons/16x16/java.png differ diff --git a/lib/images/fileicons/16x16/jpeg.png b/lib/images/fileicons/16x16/jpeg.png index 3a7d8a7f9..29dea5761 100644 Binary files a/lib/images/fileicons/16x16/jpeg.png and b/lib/images/fileicons/16x16/jpeg.png differ diff --git a/lib/images/fileicons/16x16/jpg.png b/lib/images/fileicons/16x16/jpg.png index 7152ebdb6..29dea5761 100644 Binary files a/lib/images/fileicons/16x16/jpg.png and b/lib/images/fileicons/16x16/jpg.png differ diff --git a/lib/images/fileicons/16x16/js.png b/lib/images/fileicons/16x16/js.png new file mode 100644 index 000000000..37d3a7958 Binary files /dev/null and b/lib/images/fileicons/16x16/js.png differ diff --git a/lib/images/fileicons/16x16/json.png b/lib/images/fileicons/16x16/json.png new file mode 100644 index 000000000..0f32375e6 Binary files /dev/null and b/lib/images/fileicons/16x16/json.png differ diff --git a/lib/images/fileicons/16x16/odc.png b/lib/images/fileicons/16x16/odc.png index 331140552..b2a879a84 100644 Binary files a/lib/images/fileicons/16x16/odc.png and b/lib/images/fileicons/16x16/odc.png differ diff --git a/lib/images/fileicons/16x16/odf.png b/lib/images/fileicons/16x16/odf.png index eccae9e20..65db17827 100644 Binary files a/lib/images/fileicons/16x16/odf.png and b/lib/images/fileicons/16x16/odf.png differ diff --git a/lib/images/fileicons/16x16/odg.png b/lib/images/fileicons/16x16/odg.png index 5224425e6..bab8fe1a7 100644 Binary files a/lib/images/fileicons/16x16/odg.png and b/lib/images/fileicons/16x16/odg.png differ diff --git a/lib/images/fileicons/16x16/odi.png b/lib/images/fileicons/16x16/odi.png index b57fd974d..f0df8e582 100644 Binary files a/lib/images/fileicons/16x16/odi.png and b/lib/images/fileicons/16x16/odi.png differ diff --git a/lib/images/fileicons/16x16/odp.png b/lib/images/fileicons/16x16/odp.png index 81d1023c0..4008c4e54 100644 Binary files a/lib/images/fileicons/16x16/odp.png and b/lib/images/fileicons/16x16/odp.png differ diff --git a/lib/images/fileicons/16x16/ods.png b/lib/images/fileicons/16x16/ods.png index 77e6d5366..c7d5e263c 100644 Binary files a/lib/images/fileicons/16x16/ods.png and b/lib/images/fileicons/16x16/ods.png differ diff --git a/lib/images/fileicons/16x16/odt.png b/lib/images/fileicons/16x16/odt.png index 8490eec74..8fd5fd35c 100644 Binary files a/lib/images/fileicons/16x16/odt.png and b/lib/images/fileicons/16x16/odt.png differ diff --git a/lib/images/fileicons/16x16/pas.png b/lib/images/fileicons/16x16/pas.png new file mode 100644 index 000000000..0a91eff4a Binary files /dev/null and b/lib/images/fileicons/16x16/pas.png differ diff --git a/lib/images/fileicons/16x16/pdf.png b/lib/images/fileicons/16x16/pdf.png index a3a30e475..1bc154641 100644 Binary files a/lib/images/fileicons/16x16/pdf.png and b/lib/images/fileicons/16x16/pdf.png differ diff --git a/lib/images/fileicons/16x16/pl.png b/lib/images/fileicons/16x16/pl.png new file mode 100644 index 000000000..7f43f6399 Binary files /dev/null and b/lib/images/fileicons/16x16/pl.png differ diff --git a/lib/images/fileicons/16x16/png.png b/lib/images/fileicons/16x16/png.png index 00ce3e400..007270532 100644 Binary files a/lib/images/fileicons/16x16/png.png and b/lib/images/fileicons/16x16/png.png differ diff --git a/lib/images/fileicons/16x16/ppt.png b/lib/images/fileicons/16x16/ppt.png index 3355c2712..e097ceb90 100644 Binary files a/lib/images/fileicons/16x16/ppt.png and b/lib/images/fileicons/16x16/ppt.png differ diff --git a/lib/images/fileicons/16x16/pptx.png b/lib/images/fileicons/16x16/pptx.png index 269cdb8fc..9dda61a12 100644 Binary files a/lib/images/fileicons/16x16/pptx.png and b/lib/images/fileicons/16x16/pptx.png differ diff --git a/lib/images/fileicons/16x16/ps.png b/lib/images/fileicons/16x16/ps.png index 089caeb7a..e61d1aa7e 100644 Binary files a/lib/images/fileicons/16x16/ps.png and b/lib/images/fileicons/16x16/ps.png differ diff --git a/lib/images/fileicons/16x16/py.png b/lib/images/fileicons/16x16/py.png new file mode 100644 index 000000000..4745cb972 Binary files /dev/null and b/lib/images/fileicons/16x16/py.png differ diff --git a/lib/images/fileicons/16x16/rtf.png b/lib/images/fileicons/16x16/rtf.png index bbc425ca3..4486932ed 100644 Binary files a/lib/images/fileicons/16x16/rtf.png and b/lib/images/fileicons/16x16/rtf.png differ diff --git a/lib/images/fileicons/16x16/sh.png b/lib/images/fileicons/16x16/sh.png new file mode 100644 index 000000000..60266bf3c Binary files /dev/null and b/lib/images/fileicons/16x16/sh.png differ diff --git a/lib/images/fileicons/16x16/sxc.png b/lib/images/fileicons/16x16/sxc.png index c96cf303f..6084d49b7 100644 Binary files a/lib/images/fileicons/16x16/sxc.png and b/lib/images/fileicons/16x16/sxc.png differ diff --git a/lib/images/fileicons/16x16/sxd.png b/lib/images/fileicons/16x16/sxd.png index 124b928e1..aecd863a0 100644 Binary files a/lib/images/fileicons/16x16/sxd.png and b/lib/images/fileicons/16x16/sxd.png differ diff --git a/lib/images/fileicons/16x16/sxi.png b/lib/images/fileicons/16x16/sxi.png index 8a5e23033..b34b33ca3 100644 Binary files a/lib/images/fileicons/16x16/sxi.png and b/lib/images/fileicons/16x16/sxi.png differ diff --git a/lib/images/fileicons/16x16/sxw.png b/lib/images/fileicons/16x16/sxw.png index 9a903791c..a30869d9d 100644 Binary files a/lib/images/fileicons/16x16/sxw.png and b/lib/images/fileicons/16x16/sxw.png differ diff --git a/lib/images/fileicons/16x16/xls.png b/lib/images/fileicons/16x16/xls.png index 5ac56f20d..12a32a295 100644 Binary files a/lib/images/fileicons/16x16/xls.png and b/lib/images/fileicons/16x16/xls.png differ diff --git a/lib/images/fileicons/16x16/xlsx.png b/lib/images/fileicons/16x16/xlsx.png index 89c84c522..b2e85489d 100644 Binary files a/lib/images/fileicons/16x16/xlsx.png and b/lib/images/fileicons/16x16/xlsx.png differ diff --git a/lib/images/fileicons/16x16/xml.png b/lib/images/fileicons/16x16/xml.png index fb960477e..4480a6385 100644 Binary files a/lib/images/fileicons/16x16/xml.png and b/lib/images/fileicons/16x16/xml.png differ diff --git a/lib/images/fileicons/32x32/asm.png b/lib/images/fileicons/32x32/asm.png new file mode 100644 index 000000000..d9e336cdb Binary files /dev/null and b/lib/images/fileicons/32x32/asm.png differ diff --git a/lib/images/fileicons/32x32/bash.png b/lib/images/fileicons/32x32/bash.png new file mode 100644 index 000000000..7a49f285a Binary files /dev/null and b/lib/images/fileicons/32x32/bash.png differ diff --git a/lib/images/fileicons/32x32/c.png b/lib/images/fileicons/32x32/c.png new file mode 100644 index 000000000..4e0dc92b7 Binary files /dev/null and b/lib/images/fileicons/32x32/c.png differ diff --git a/lib/images/fileicons/32x32/cc.png b/lib/images/fileicons/32x32/cc.png new file mode 100644 index 000000000..5e21e28ba Binary files /dev/null and b/lib/images/fileicons/32x32/cc.png differ diff --git a/lib/images/fileicons/32x32/cpp.png b/lib/images/fileicons/32x32/cpp.png new file mode 100644 index 000000000..18a0d0a92 Binary files /dev/null and b/lib/images/fileicons/32x32/cpp.png differ diff --git a/lib/images/fileicons/32x32/csh.png b/lib/images/fileicons/32x32/csh.png new file mode 100644 index 000000000..3f060c885 Binary files /dev/null and b/lib/images/fileicons/32x32/csh.png differ diff --git a/lib/images/fileicons/32x32/css.png b/lib/images/fileicons/32x32/css.png new file mode 100644 index 000000000..7ae0937c7 Binary files /dev/null and b/lib/images/fileicons/32x32/css.png differ diff --git a/lib/images/fileicons/32x32/diff.png b/lib/images/fileicons/32x32/diff.png new file mode 100644 index 000000000..0cda679c7 Binary files /dev/null and b/lib/images/fileicons/32x32/diff.png differ diff --git a/lib/images/fileicons/32x32/doc.png b/lib/images/fileicons/32x32/doc.png index 8369c1f73..c1e543a57 100644 Binary files a/lib/images/fileicons/32x32/doc.png and b/lib/images/fileicons/32x32/doc.png differ diff --git a/lib/images/fileicons/32x32/docx.png b/lib/images/fileicons/32x32/docx.png index ce5dfb3d3..36b6ea5fd 100644 Binary files a/lib/images/fileicons/32x32/docx.png and b/lib/images/fileicons/32x32/docx.png differ diff --git a/lib/images/fileicons/32x32/gif.png b/lib/images/fileicons/32x32/gif.png index 7e5608b75..e39af08cc 100644 Binary files a/lib/images/fileicons/32x32/gif.png and b/lib/images/fileicons/32x32/gif.png differ diff --git a/lib/images/fileicons/32x32/h.png b/lib/images/fileicons/32x32/h.png new file mode 100644 index 000000000..5bca1ab4c Binary files /dev/null and b/lib/images/fileicons/32x32/h.png differ diff --git a/lib/images/fileicons/32x32/hpp.png b/lib/images/fileicons/32x32/hpp.png new file mode 100644 index 000000000..0ccd65af0 Binary files /dev/null and b/lib/images/fileicons/32x32/hpp.png differ diff --git a/lib/images/fileicons/32x32/htm.png b/lib/images/fileicons/32x32/htm.png index 132963be5..f52a826f4 100644 Binary files a/lib/images/fileicons/32x32/htm.png and b/lib/images/fileicons/32x32/htm.png differ diff --git a/lib/images/fileicons/32x32/html.png b/lib/images/fileicons/32x32/html.png index fb15689c0..f52a826f4 100644 Binary files a/lib/images/fileicons/32x32/html.png and b/lib/images/fileicons/32x32/html.png differ diff --git a/lib/images/fileicons/32x32/ico.png b/lib/images/fileicons/32x32/ico.png index 0fe7053b0..0a219e6f2 100644 Binary files a/lib/images/fileicons/32x32/ico.png and b/lib/images/fileicons/32x32/ico.png differ diff --git a/lib/images/fileicons/32x32/java.png b/lib/images/fileicons/32x32/java.png new file mode 100644 index 000000000..d3a66c4dd Binary files /dev/null and b/lib/images/fileicons/32x32/java.png differ diff --git a/lib/images/fileicons/32x32/jpeg.png b/lib/images/fileicons/32x32/jpeg.png index b6707a603..5fb71dd73 100644 Binary files a/lib/images/fileicons/32x32/jpeg.png and b/lib/images/fileicons/32x32/jpeg.png differ diff --git a/lib/images/fileicons/32x32/jpg.png b/lib/images/fileicons/32x32/jpg.png index 1c8b706e8..5fb71dd73 100644 Binary files a/lib/images/fileicons/32x32/jpg.png and b/lib/images/fileicons/32x32/jpg.png differ diff --git a/lib/images/fileicons/32x32/js.png b/lib/images/fileicons/32x32/js.png new file mode 100644 index 000000000..741b175d3 Binary files /dev/null and b/lib/images/fileicons/32x32/js.png differ diff --git a/lib/images/fileicons/32x32/json.png b/lib/images/fileicons/32x32/json.png new file mode 100644 index 000000000..2a2a381ec Binary files /dev/null and b/lib/images/fileicons/32x32/json.png differ diff --git a/lib/images/fileicons/32x32/odc.png b/lib/images/fileicons/32x32/odc.png index 9a34f2129..ebb15681e 100644 Binary files a/lib/images/fileicons/32x32/odc.png and b/lib/images/fileicons/32x32/odc.png differ diff --git a/lib/images/fileicons/32x32/odf.png b/lib/images/fileicons/32x32/odf.png index e3b4333ad..97e4c45b3 100644 Binary files a/lib/images/fileicons/32x32/odf.png and b/lib/images/fileicons/32x32/odf.png differ diff --git a/lib/images/fileicons/32x32/odg.png b/lib/images/fileicons/32x32/odg.png index c3b192b2d..b2aae1e03 100644 Binary files a/lib/images/fileicons/32x32/odg.png and b/lib/images/fileicons/32x32/odg.png differ diff --git a/lib/images/fileicons/32x32/odi.png b/lib/images/fileicons/32x32/odi.png index 6baa69407..8176d2daa 100644 Binary files a/lib/images/fileicons/32x32/odi.png and b/lib/images/fileicons/32x32/odi.png differ diff --git a/lib/images/fileicons/32x32/odp.png b/lib/images/fileicons/32x32/odp.png index 8e09dd6e4..8e27fd62e 100644 Binary files a/lib/images/fileicons/32x32/odp.png and b/lib/images/fileicons/32x32/odp.png differ diff --git a/lib/images/fileicons/32x32/ods.png b/lib/images/fileicons/32x32/ods.png index 90892f3d4..9319b6acc 100644 Binary files a/lib/images/fileicons/32x32/ods.png and b/lib/images/fileicons/32x32/ods.png differ diff --git a/lib/images/fileicons/32x32/odt.png b/lib/images/fileicons/32x32/odt.png index 22ec1fffb..13eb496d3 100644 Binary files a/lib/images/fileicons/32x32/odt.png and b/lib/images/fileicons/32x32/odt.png differ diff --git a/lib/images/fileicons/32x32/pas.png b/lib/images/fileicons/32x32/pas.png new file mode 100644 index 000000000..e71796d8a Binary files /dev/null and b/lib/images/fileicons/32x32/pas.png differ diff --git a/lib/images/fileicons/32x32/pdf.png b/lib/images/fileicons/32x32/pdf.png index 8e8b45472..0efa0dc31 100644 Binary files a/lib/images/fileicons/32x32/pdf.png and b/lib/images/fileicons/32x32/pdf.png differ diff --git a/lib/images/fileicons/32x32/pl.png b/lib/images/fileicons/32x32/pl.png new file mode 100644 index 000000000..a7bbfedf1 Binary files /dev/null and b/lib/images/fileicons/32x32/pl.png differ diff --git a/lib/images/fileicons/32x32/png.png b/lib/images/fileicons/32x32/png.png index deb47e44e..0ecd29691 100644 Binary files a/lib/images/fileicons/32x32/png.png and b/lib/images/fileicons/32x32/png.png differ diff --git a/lib/images/fileicons/32x32/ppt.png b/lib/images/fileicons/32x32/ppt.png index 84b523a23..17dc7fda3 100644 Binary files a/lib/images/fileicons/32x32/ppt.png and b/lib/images/fileicons/32x32/ppt.png differ diff --git a/lib/images/fileicons/32x32/pptx.png b/lib/images/fileicons/32x32/pptx.png index 1446cf4de..cc42cf0e1 100644 Binary files a/lib/images/fileicons/32x32/pptx.png and b/lib/images/fileicons/32x32/pptx.png differ diff --git a/lib/images/fileicons/32x32/ps.png b/lib/images/fileicons/32x32/ps.png index d540743f9..e1a74988d 100644 Binary files a/lib/images/fileicons/32x32/ps.png and b/lib/images/fileicons/32x32/ps.png differ diff --git a/lib/images/fileicons/32x32/py.png b/lib/images/fileicons/32x32/py.png new file mode 100644 index 000000000..2ce622aeb Binary files /dev/null and b/lib/images/fileicons/32x32/py.png differ diff --git a/lib/images/fileicons/32x32/rtf.png b/lib/images/fileicons/32x32/rtf.png index fcbcd001a..0ad836e0c 100644 Binary files a/lib/images/fileicons/32x32/rtf.png and b/lib/images/fileicons/32x32/rtf.png differ diff --git a/lib/images/fileicons/32x32/sh.png b/lib/images/fileicons/32x32/sh.png new file mode 100644 index 000000000..1c2dbb29d Binary files /dev/null and b/lib/images/fileicons/32x32/sh.png differ diff --git a/lib/images/fileicons/32x32/sxc.png b/lib/images/fileicons/32x32/sxc.png index 50676be6a..fbd28e3de 100644 Binary files a/lib/images/fileicons/32x32/sxc.png and b/lib/images/fileicons/32x32/sxc.png differ diff --git a/lib/images/fileicons/32x32/sxd.png b/lib/images/fileicons/32x32/sxd.png index f715a8ff0..243c18861 100644 Binary files a/lib/images/fileicons/32x32/sxd.png and b/lib/images/fileicons/32x32/sxd.png differ diff --git a/lib/images/fileicons/32x32/sxi.png b/lib/images/fileicons/32x32/sxi.png index 3d9f31d3b..5c699f6eb 100644 Binary files a/lib/images/fileicons/32x32/sxi.png and b/lib/images/fileicons/32x32/sxi.png differ diff --git a/lib/images/fileicons/32x32/sxw.png b/lib/images/fileicons/32x32/sxw.png index bd8ab1436..944989e87 100644 Binary files a/lib/images/fileicons/32x32/sxw.png and b/lib/images/fileicons/32x32/sxw.png differ diff --git a/lib/images/fileicons/32x32/xls.png b/lib/images/fileicons/32x32/xls.png index 7447d9cdf..38e2b235b 100644 Binary files a/lib/images/fileicons/32x32/xls.png and b/lib/images/fileicons/32x32/xls.png differ diff --git a/lib/images/fileicons/32x32/xlsx.png b/lib/images/fileicons/32x32/xlsx.png index 920217267..773e49f77 100644 Binary files a/lib/images/fileicons/32x32/xlsx.png and b/lib/images/fileicons/32x32/xlsx.png differ diff --git a/lib/images/fileicons/32x32/xml.png b/lib/images/fileicons/32x32/xml.png index bae059156..4ea3b1f6c 100644 Binary files a/lib/images/fileicons/32x32/xml.png and b/lib/images/fileicons/32x32/xml.png differ diff --git a/lib/images/fileicons/generate.php b/lib/images/fileicons/generate.php index 2dd25eb33..b08749f49 100644 --- a/lib/images/fileicons/generate.php +++ b/lib/images/fileicons/generate.php @@ -9,27 +9,36 @@ if(!defined('DOKU_INC')) define('DOKU_INC', realpath(dirname(__FILE__).'/../../. define('NOSESSION', 1); require_once(DOKU_INC.'inc/init.php'); +$extensions = array( + 'jpg', 'gif', 'png', 'ico', + 'swf', 'mp3', 'ogg', 'wav', 'webm', 'ogv', 'mp4', + 'tgz', 'tar', 'gz', 'bz2', 'zip', 'rar', '7z', + 'pdf', 'ps', + 'rpm', 'deb', + 'doc', 'xls', 'ppt', 'rtf', + 'docx', 'xlsx', 'pptx', + 'sxw', 'sxc', 'sxi', 'sxd', + 'odc', 'odf', 'odg', 'odi', 'odp', 'ods', 'odt', + 'html', 'htm', 'txt', 'conf', 'xml', 'csv', + // these might be used in downloadable code blocks: + 'c', 'cc', 'cpp', 'h', 'hpp', 'csh', 'diff', 'java', 'pas', + 'pl', 'py', 'sh', 'bash', 'asm', 'htm', 'css', 'js', 'json' +); -/** - * Class DokuFileIconBuilder - * - * overwrite mime type loading with loading DokuWiki's mime type config instead - */ -class DokuFileIconBuilder extends FileIconBuilder { - - protected function loadmimetypes(){ - $this->mimetypes = getMimeTypes(); - foreach(array_keys($this->mimetypes) as $ext) { - $this->mimetypes[$ext] = ltrim($this->mimetypes[$ext], '!'); - } - } +// generate all the icons +@mkdir('16x16'); +@mkdir('32x32'); + +$DFIB = new FileIconBuilder(); +foreach($extensions as $ext) { + echo "$ext\n"; + $DFIB->create16x16($ext,"16x16/$ext.png"); + $DFIB->create32x32($ext,"32x32/$ext.png"); } +copy("16x16/jpg.png", "16x16/jpeg.png"); +copy("32x32/jpg.png", "32x32/jpeg.png"); -echo "Important: you should enable the commented file types in mime.conf to make sure the icon are generated!\n"; - -// generate all the icons -$DFIB = new DokuFileIconBuilder(); -$DFIB->createAll(__DIR__); +copy("16x16/htm.png", "16x16/html.png"); +copy("32x32/htm.png", "32x32/html.png"); -echo "generation done\n"; -- cgit v1.2.3 From 8f3927df350b53ee1287d66b36e9b29452c864f4 Mon Sep 17 00:00:00 2001 From: Anika Henke Date: Wed, 19 Feb 2014 01:21:07 +0000 Subject: improved styling of diff nav row --- lib/tpl/dokuwiki/css/_diff.css | 18 +++++++++-- lib/tpl/dokuwiki/css/basic.less | 1 + lib/tpl/dokuwiki/css/mobile.less | 6 ++-- lib/tpl/dokuwiki/css/sites/abcwiki.css | 39 +++++++++++++++++++++++ lib/tpl/dokuwiki/css/sites/paralis.css | 58 ++++++++++++++++++++++++++++++++++ 5 files changed, 118 insertions(+), 4 deletions(-) create mode 100644 lib/tpl/dokuwiki/css/sites/abcwiki.css create mode 100644 lib/tpl/dokuwiki/css/sites/paralis.css diff --git a/lib/tpl/dokuwiki/css/_diff.css b/lib/tpl/dokuwiki/css/_diff.css index 28cde7786..13c3012d9 100644 --- a/lib/tpl/dokuwiki/css/_diff.css +++ b/lib/tpl/dokuwiki/css/_diff.css @@ -76,6 +76,9 @@ /* diff nav */ +.dokuwiki table.diff_sidebyside td.diffnav { + padding-bottom: .7em; +} .dokuwiki .diffnav a { display: inline-block; vertical-align: middle; @@ -84,11 +87,17 @@ display: none; } +.dokuwiki .diffnav a:hover, +.dokuwiki .diffnav a:active, +.dokuwiki .diffnav a:focus { + background-color: @ini_background_alt; + text-decoration: none; +} + .dokuwiki .diffnav a:before { - font-size: 1.2em; display: inline-block; line-height: 1; - padding: .1em .2em; + padding: .2em .4em; border: 1px solid @ini_border; border-radius: 2px; color: @ini_text; @@ -110,4 +119,9 @@ .dokuwiki .diffnav select { width: 15em; + height: 1.5em; /* height is necessary for longer options in Webkit */ +} + +.dokuwiki .diffnav select option[selected] { + font-weight: bold; } diff --git a/lib/tpl/dokuwiki/css/basic.less b/lib/tpl/dokuwiki/css/basic.less index c296185e9..ac9f6803a 100644 --- a/lib/tpl/dokuwiki/css/basic.less +++ b/lib/tpl/dokuwiki/css/basic.less @@ -455,6 +455,7 @@ input[disabled], button[disabled], select[disabled], textarea[disabled], +option[disabled], input[readonly], button[readonly], select[readonly], diff --git a/lib/tpl/dokuwiki/css/mobile.less b/lib/tpl/dokuwiki/css/mobile.less index 0fbd0e8fe..6d552876d 100644 --- a/lib/tpl/dokuwiki/css/mobile.less +++ b/lib/tpl/dokuwiki/css/mobile.less @@ -266,11 +266,13 @@ body { #config__manager td .input, .dokuwiki fieldset, .dokuwiki input.edit, -.dokuwiki textarea, -.dokuwiki select { +.dokuwiki textarea { width: auto !important; max-width: 100% !important; } +.dokuwiki select { + max-width: 100% !important; +} #config__manager fieldset { margin-left: 0; margin-right: 0; diff --git a/lib/tpl/dokuwiki/css/sites/abcwiki.css b/lib/tpl/dokuwiki/css/sites/abcwiki.css new file mode 100644 index 000000000..9f436516b --- /dev/null +++ b/lib/tpl/dokuwiki/css/sites/abcwiki.css @@ -0,0 +1,39 @@ + +html, +body { + background-color: #369; +} + +#dokuwiki__header, +#dokuwiki__aside, +.docInfo, +#dokuwiki__footer { + color: #fff; +} + +#dokuwiki__header a, +#dokuwiki__aside a, +.docInfo a, +#dokuwiki__footer a { + color: #ff9 !important; +} + +h1, +h2, +h3, +h4, +h5, +h6 { + color: #036; +} + +.dokuwiki div.breadcrumbs { + border-top-color: #999; + border-bottom-color: #666; +} +.dokuwiki div.breadcrumbs div:first-child { + border-bottom-color: #999; +} +.dokuwiki div.breadcrumbs div:last-child { + border-top-color: #666; +} diff --git a/lib/tpl/dokuwiki/css/sites/paralis.css b/lib/tpl/dokuwiki/css/sites/paralis.css new file mode 100644 index 000000000..201bca936 --- /dev/null +++ b/lib/tpl/dokuwiki/css/sites/paralis.css @@ -0,0 +1,58 @@ + +@media screen { + +body { + font: normal 100%/1.4 Frutiger, Calibri, "Myriad Pro", Myriad, "Nimbus Sans L", Geneva, "Helvetica Neue", Helvetica, Arial, sans-serif; +} + +h1, +h2, +h3, +h4, +h5, +h6 { + font-family: Constantia, Utopia, Lucidabright, Lucida, Georgia, "Nimbus Roman No9 L", serif; + color: @ini_text_neu; +} + +q { + font-style: italic; +} + +#dokuwiki__header h1 a { + color: @ini_link; + font-weight: bold; +} + +div.dokuwiki p.plugin__pagenav { + margin: 0 0 1.4em; +} + + +} /* /@media */ + + +#dokuwiki__header h1 { + position: relative; +} +#dokuwiki__header h1 img { + position: absolute; + top: -27px; + left: -33px; + max-width: none; +} +#dokuwiki__header h1 { + padding-left: 110px; +} +#dokuwiki__header p.claim { + padding-left: 110px; +} + + +@media print { + +.dokuwiki p.plugin__pagenav { + display: none; +} + +} /* /@media */ -- cgit v1.2.3 From c130b0f8ec18ec66ac40422cf354a23268108866 Mon Sep 17 00:00:00 2001 From: Anika Henke Date: Wed, 19 Feb 2014 01:34:14 +0000 Subject: improved positioning of diff options --- inc/html.php | 2 +- lib/tpl/dokuwiki/css/_diff.css | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/inc/html.php b/inc/html.php index e7d401594..1a549824e 100644 --- a/inc/html.php +++ b/inc/html.php @@ -1207,7 +1207,7 @@ function html_diff($text = '', $intro = true, $type = null) { * Display type and exact reference */ if(!$text) { - ptln('
'); + ptln('
'); $form = new Doku_Form(array('action' => wl())); diff --git a/lib/tpl/dokuwiki/css/_diff.css b/lib/tpl/dokuwiki/css/_diff.css index 13c3012d9..09e95d9f6 100644 --- a/lib/tpl/dokuwiki/css/_diff.css +++ b/lib/tpl/dokuwiki/css/_diff.css @@ -74,6 +74,15 @@ font-weight: bold; } +/* diff options */ + +.dokuwiki .diffoptions form { + float: left; +} +.dokuwiki .diffoptions p { + float: right; +} + /* diff nav */ .dokuwiki table.diff_sidebyside td.diffnav { -- cgit v1.2.3 From 621bbd2a24f6ceac0310c04b27e11a2c7c325294 Mon Sep 17 00:00:00 2001 From: Gerrit Uitslag Date: Wed, 19 Feb 2014 17:58:36 +0100 Subject: diff of removed page, require handling right rev=0 When page is removed, and diff can be requested between a revision and current situation. This results in right revision is 0. Similar case just after creating a page. A diff between the first version and nothing before, result in left revision is 0. In these cases a empty dummy revision is placed as selected value in dropdown. Otherwise user got distracted by the revisions details shown in select field, which are not related to the diff below. --- inc/changelog.php | 16 +++++++++++----- inc/html.php | 31 ++++++++++++++++++++++++------- 2 files changed, 35 insertions(+), 12 deletions(-) diff --git a/inc/changelog.php b/inc/changelog.php index d2ad23c08..28e53e77a 100644 --- a/inc/changelog.php +++ b/inc/changelog.php @@ -642,7 +642,7 @@ abstract class ChangeLog { * When available it returns $max entries for each revision * * @param int $rev1 oldest revision timestamp - * @param int $rev2 newest revision timestamp + * @param int $rev2 newest revision timestamp (0 looks up last revision) * @param int $max maximum number of revisions returned * @return array with two arrays with revisions surrounding rev1 respectively rev2 */ @@ -651,10 +651,16 @@ abstract class ChangeLog { $rev1 = max($rev1, 0); $rev2 = max($rev2, 0); - if($rev2 < $rev1) { - $rev = $rev2; - $rev2 = $rev1; - $rev1 = $rev; + if($rev2) { + if($rev2 < $rev1) { + $rev = $rev2; + $rev2 = $rev1; + $rev1 = $rev; + } + } else { + //empty right side means a removed page. Look up last revision. + $revs = $this->getRevisions(-1, 1); + $rev2 = $revs[0]; } //collect revisions around rev2 list($revs2, $allrevs, $fp, $lines, $head, $tail) = $this->retrieveRevisionsAround($rev2, $max); diff --git a/inc/html.php b/inc/html.php index 1a549824e..39d0eeada 100644 --- a/inc/html.php +++ b/inc/html.php @@ -1308,21 +1308,27 @@ function html_diff($text = '', $intro = true, $type = null) { function html_diff_navigation($pagelog, $type, $l_rev, $r_rev) { global $INFO, $ID; - //last timestamp is not in changelog + //last timestamp is not in changelog (note: when page is removed, the metadata timestamp is zero as well) $r_rev = $r_rev ? $r_rev : $INFO['meta']['last_change']['date']; //retrieve revisions with additional info list($l_revs, $r_revs) = $pagelog->getRevisionsAround($l_rev, $r_rev); $l_revisions = array(); + if(!$l_rev) { + $l_revisions[0] = array(0, "", false); //no left revision given, add dummy + } foreach($l_revs as $rev) { $info = $pagelog->getRevisionInfo($rev); $l_revisions[$rev] = array( $rev, dformat($info['date']) . ' ' . editorinfo($info['user']) . ' ' . $info['sum'], - $rev >= $r_rev //disable? + $r_rev ? $rev >= $r_rev : false //disable? ); } $r_revisions = array(); + if(!$r_rev) { + $r_revisions[0] = array(0, "", false); //no right revision given, add dummy + } foreach($r_revs as $rev) { $info = $pagelog->getRevisionInfo($rev); $r_revisions[$rev] = array( @@ -1331,13 +1337,24 @@ function html_diff_navigation($pagelog, $type, $l_rev, $r_rev) { $rev <= $l_rev //disable? ); } + //determine previous/next revisions $l_index = array_search($l_rev, $l_revs); $l_prev = $l_revs[$l_index + 1]; $l_next = $l_revs[$l_index - 1]; - $r_index = array_search($r_rev, $r_revs); - $r_prev = $r_revs[$r_index + 1]; - $r_next = $r_revs[$r_index - 1]; + if($r_rev) { + $r_index = array_search($r_rev, $r_revs); + $r_prev = $r_revs[$r_index + 1]; + $r_next = $r_revs[$r_index - 1]; + } else { + //removed page + if($l_next) { + $r_prev = $r_revs[0]; + } else { + $r_prev = null; + } + $r_next = null; + } /* * Left side: @@ -1366,7 +1383,7 @@ function html_diff_navigation($pagelog, $type, $l_rev, $r_rev) { $form->addElement(form_makeButton('submit', 'diff', 'Go')); $l_nav .= $form->getForm(); //move forward - if($l_next && $l_next < $r_rev) { + if($l_next && ($l_next < $r_rev || !$r_rev)) { $l_nav .= html_diff_navigationlink($type, 'diffnextrev', $l_next, $r_rev); } @@ -1418,7 +1435,7 @@ function html_diff_navigation($pagelog, $type, $l_rev, $r_rev) { */ function html_diff_navigationlink($difftype, $linktype, $lrev, $rrev = null) { global $ID, $lang; - if($rrev === null) { + if(!$rrev) { $urlparam = array( 'do' => 'diff', 'rev' => $lrev, -- cgit v1.2.3 From 4d5954c8d1f8bcc5450f8cf70d8139cf5a1e697d Mon Sep 17 00:00:00 2001 From: Gerrit Uitslag Date: Thu, 20 Feb 2014 14:03:29 +0100 Subject: improve comment in html_diff_navigation --- inc/html.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/inc/html.php b/inc/html.php index 39d0eeada..2c7e8b1a6 100644 --- a/inc/html.php +++ b/inc/html.php @@ -1308,7 +1308,8 @@ function html_diff($text = '', $intro = true, $type = null) { function html_diff_navigation($pagelog, $type, $l_rev, $r_rev) { global $INFO, $ID; - //last timestamp is not in changelog (note: when page is removed, the metadata timestamp is zero as well) + // last timestamp is not in changelog, retrieve timestamp from metadata + // note: when page is removed, the metadata timestamp is zero $r_rev = $r_rev ? $r_rev : $INFO['meta']['last_change']['date']; //retrieve revisions with additional info -- cgit v1.2.3 From 04d68ae4edcddca8a3c30ed4ce6c72d28440a084 Mon Sep 17 00:00:00 2001 From: Gerrit Uitslag Date: Thu, 20 Feb 2014 14:08:02 +0100 Subject: PHPDocs auth.php --- inc/auth.php | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/inc/auth.php b/inc/auth.php index 6000ea6d7..8fde129aa 100644 --- a/inc/auth.php +++ b/inc/auth.php @@ -845,6 +845,12 @@ function auth_nameencode($name, $skip_group = false) { return $cache[$name][$skip_group]; } +/** + * callback encodes the matches + * + * @param array $matches first complete match, next matching subpatterms + * @return string + */ function auth_nameencode_callback($matches) { return '%'.dechex(ord(substr($matches[1],-1))); } @@ -1075,6 +1081,11 @@ function updateprofile() { return false; } +/** + * Delete the current logged-in user + * + * @return bool true on success, false on any error + */ function auth_deleteprofile(){ global $conf; global $lang; -- cgit v1.2.3 From 6d606653fa148cf19dc5e996822212a144b51ada Mon Sep 17 00:00:00 2001 From: Gerrit Uitslag Date: Thu, 20 Feb 2014 14:09:09 +0100 Subject: Improve PHPDocs Doku_Cli_Opts (cliopts.php) --- inc/cliopts.php | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/inc/cliopts.php b/inc/cliopts.php index 9cea686a2..3eac72e5b 100644 --- a/inc/cliopts.php +++ b/inc/cliopts.php @@ -74,9 +74,9 @@ class Doku_Cli_Opts { /** * * @see http://www.sitepoint.com/article/php-command-line-1/3 - * @param string executing file name - this MUST be passed the __FILE__ constant - * @param string short options - * @param array (optional) long options + * @param string $bin_file executing file name - this MUST be passed the __FILE__ constant + * @param string $short_options short options + * @param array $long_options (optional) long options * @return Doku_Cli_Opts_Container or Doku_Cli_Opts_Error */ function & getOptions($bin_file, $short_options, $long_options = null) { @@ -233,12 +233,12 @@ class Doku_Cli_Opts { * Parse short option * * @param string $arg Argument - * @param string[] $short_options Available short options + * @param string $short_options Available short options * @param string[][] &$opts * @param string[] &$args * * @access private - * @return void + * @return void|Doku_Cli_Opts_Error */ function _parseShortOption($arg, $short_options, &$opts, &$args) { $len = strlen($arg); @@ -324,7 +324,7 @@ class Doku_Cli_Opts { * @param string[] &$args * * @access private - * @return void|PEAR_Error + * @return void|Doku_Cli_Opts_Error */ function _parseLongOption($arg, $long_options, &$opts, &$args) { @list($opt, $opt_arg) = explode('=', $arg, 2); @@ -402,7 +402,7 @@ class Doku_Cli_Opts { * Will take care on register_globals and register_argc_argv ini directives * * @access public - * @return mixed the $argv PHP array or PEAR error if not registered + * @return array|Doku_Cli_Opts_Error the $argv PHP array or PEAR error if not registered */ function readPHPArgv() { global $argv; @@ -421,10 +421,19 @@ class Doku_Cli_Opts { return $argv; } + /** + * @param $code + * @param $msg + * @return Doku_Cli_Opts_Error + */ function raiseError($code, $msg) { return new Doku_Cli_Opts_Error($code, $msg); } + /** + * @param $obj + * @return bool + */ function isError($obj) { return is_a($obj, 'Doku_Cli_Opts_Error'); } -- cgit v1.2.3 From 74160ca1dea24b237ff3e956d19a420a1593b957 Mon Sep 17 00:00:00 2001 From: Gerrit Uitslag Date: Thu, 20 Feb 2014 14:10:24 +0100 Subject: PHPDocs missing breaks, removed unused var in common.php --- inc/common.php | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/inc/common.php b/inc/common.php index 32771285b..4682bedf9 100644 --- a/inc/common.php +++ b/inc/common.php @@ -1140,7 +1140,6 @@ function saveWikiText($id, $text, $summary, $minor = false) { * @author Andreas Gohr */ function saveOldRevision($id) { - global $conf; $oldf = wikiFN($id); if(!@file_exists($oldf)) return ''; $date = filemtime($oldf); @@ -1230,8 +1229,9 @@ function getGoogleQuery() { /** * Return the human readable size of a file * - * @param int $size A file size - * @param int $dec A number of decimal places + * @param int $size A file size + * @param int $dec A number of decimal places + * @return string human readable size * @author Martin Benjamin * @author Aidan Lister * @version 1.0.0 @@ -1362,12 +1362,16 @@ function php_to_byte($v) { $l = substr($v, -1); $ret = substr($v, 0, -1); switch(strtoupper($l)) { + /** @noinspection PhpMissingBreakStatementInspection */ case 'P': $ret *= 1024; + /** @noinspection PhpMissingBreakStatementInspection */ case 'T': $ret *= 1024; + /** @noinspection PhpMissingBreakStatementInspection */ case 'G': $ret *= 1024; + /** @noinspection PhpMissingBreakStatementInspection */ case 'M': $ret *= 1024; case 'K': -- cgit v1.2.3 From 8d443db51f9acca81484bec96d8bcd49c00e6414 Mon Sep 17 00:00:00 2001 From: Gerrit Uitslag Date: Thu, 20 Feb 2014 17:19:45 +0100 Subject: remove 'fix dateformat config for upgraders' FS#2073 --- inc/init.php | 5 ----- 1 file changed, 5 deletions(-) diff --git a/inc/init.php b/inc/init.php index a937b934d..3e422453d 100644 --- a/inc/init.php +++ b/inc/init.php @@ -183,11 +183,6 @@ if($conf['compression'] == 'gz' && !function_exists('gzopen')){ $conf['compression'] = 0; } -// fix dateformat for upgraders -if(strpos($conf['dformat'],'%') === false){ - $conf['dformat'] = '%Y/%m/%d %H:%M'; -} - // precalculate file creation modes init_creationmodes(); -- cgit v1.2.3 From 900a9e9e56d360fa7d347304e9b0d4b691d4becc Mon Sep 17 00:00:00 2001 From: Gerrit Uitslag Date: Thu, 20 Feb 2014 19:25:13 +0100 Subject: replace dir_delete by io_rmdir --- inc/media.php | 2 +- lib/exe/ajax.php | 20 -------------------- 2 files changed, 1 insertion(+), 21 deletions(-) diff --git a/inc/media.php b/inc/media.php index fe155f0f3..a6109f785 100644 --- a/inc/media.php +++ b/inc/media.php @@ -284,7 +284,7 @@ function media_upload_xhr($ns,$auth){ 'copy' ); unlink($path); - if ($tmp) dir_delete($tmp); + if ($tmp) io_rmdir($tmp, true); if (is_array($res)) { msg($res[0], $res[1]); return false; diff --git a/lib/exe/ajax.php b/lib/exe/ajax.php index 6e2011cd9..203af9c5b 100644 --- a/lib/exe/ajax.php +++ b/lib/exe/ajax.php @@ -298,26 +298,6 @@ function ajax_mediaupload(){ echo htmlspecialchars($json->encode($result), ENT_NOQUOTES); } -function dir_delete($path) { - if (!is_string($path) || $path == "") return false; - - if (is_dir($path) && !is_link($path)) { - if (!$dh = @opendir($path)) return false; - - while ($f = readdir($dh)) { - if ($f == '..' || $f == '.') continue; - dir_delete("$path/$f"); - } - - closedir($dh); - return @rmdir($path); - } else { - return @unlink($path); - } - - return false; -} - /** * Return sub index for index view * -- cgit v1.2.3 From 2472a8f6cbd2abffe712ddd42fe2ad296d03d8f2 Mon Sep 17 00:00:00 2001 From: Gerrit Uitslag Date: Thu, 20 Feb 2014 21:42:31 +0100 Subject: Removed unused vars, define undefined ones --- inc/io.php | 2 -- inc/media.php | 1 - lib/exe/ajax.php | 38 ++++++++++++++++++++++---------------- 3 files changed, 22 insertions(+), 19 deletions(-) diff --git a/inc/io.php b/inc/io.php index c5225a2e0..27a34b045 100644 --- a/inc/io.php +++ b/inc/io.php @@ -367,8 +367,6 @@ function io_createNamespace($id, $ns_type='pages') { * @author Andreas Gohr */ function io_makeFileDir($file){ - global $conf; - $dir = dirname($file); if(!@is_dir($dir)){ io_mkdir_p($dir) || msg("Creating directory $dir failed",-1); diff --git a/inc/media.php b/inc/media.php index fe155f0f3..132738942 100644 --- a/inc/media.php +++ b/inc/media.php @@ -1039,7 +1039,6 @@ function media_details($image, $auth, $rev=false, $meta=false) { * @author Kate Arzamastseva */ function media_diff($image, $ns, $auth, $fromajax = false) { - global $lang; global $conf; global $INPUT; diff --git a/lib/exe/ajax.php b/lib/exe/ajax.php index 6e2011cd9..2cbcece5e 100644 --- a/lib/exe/ajax.php +++ b/lib/exe/ajax.php @@ -41,7 +41,6 @@ if(function_exists($callfn)){ * @author Andreas Gohr */ function ajax_qsearch(){ - global $conf; global $lang; global $INPUT; @@ -89,15 +88,12 @@ function ajax_qsearch(){ * @author Mike Frysinger */ function ajax_suggestions() { - global $conf; - global $lang; global $INPUT; $query = cleanID($INPUT->post->str('q')); if(empty($query)) $query = cleanID($INPUT->get->str('q')); if(empty($query)) return; - $data = array(); $data = ft_pageLookup($query); if(!count($data)) return; $data = array_keys($data); @@ -214,7 +210,6 @@ function ajax_medians(){ * @author Andreas Gohr */ function ajax_medialist(){ - global $conf; global $NS; global $INPUT; @@ -234,13 +229,15 @@ function ajax_medialist(){ * @author Kate Arzamastseva */ function ajax_mediadetails(){ - global $DEL, $NS, $IMG, $AUTH, $JUMPTO, $REV, $lang, $fullscreen, $conf, $INPUT; + global $IMG, $JUMPTO, $REV, $fullscreen, $INPUT; $fullscreen = true; require_once(DOKU_INC.'lib/exe/mediamanager.php'); + $image = ''; if ($INPUT->has('image')) $image = cleanID($INPUT->str('image')); if (isset($IMG)) $image = $IMG; if (isset($JUMPTO)) $image = $JUMPTO; + $rev = false; if (isset($REV) && !$JUMPTO) $rev = $REV; html_msgarea(); @@ -255,6 +252,7 @@ function ajax_mediadiff(){ global $NS; global $INPUT; + $image = ''; if ($INPUT->has('image')) $image = cleanID($INPUT->str('image')); $NS = $INPUT->post->str('ns'); $auth = auth_quickaclcheck("$NS:*"); @@ -264,6 +262,7 @@ function ajax_mediadiff(){ function ajax_mediaupload(){ global $NS, $MSG, $INPUT; + $id = ''; if ($_FILES['qqfile']['tmp_name']) { $id = $INPUT->post->str('mediaid', $_FILES['qqfile']['name']); } elseif ($INPUT->get->has('qqfile')) { @@ -280,19 +279,28 @@ function ajax_mediaupload(){ if ($_FILES['qqfile']['error']) unset($_FILES['qqfile']); + $res = false; if ($_FILES['qqfile']['tmp_name']) $res = media_upload($NS, $AUTH, $_FILES['qqfile']); if ($INPUT->get->has('qqfile')) $res = media_upload_xhr($NS, $AUTH); - if ($res) $result = array('success' => true, - 'link' => media_managerURL(array('ns' => $ns, 'image' => $NS.':'.$id), '&'), - 'id' => $NS.':'.$id, 'ns' => $NS); - - if (!$result) { + if($res) { + $result = array( + 'success' => true, + 'link' => media_managerURL(array('ns' => $ns, 'image' => $NS . ':' . $id), '&'), + 'id' => $NS . ':' . $id, + 'ns' => $NS + ); + } else { $error = ''; - if (isset($MSG)) { - foreach($MSG as $msg) $error .= $msg['msg']; + if(isset($MSG)) { + foreach($MSG as $msg) { + $error .= $msg['msg']; + } } - $result = array('error' => $msg['msg'], 'ns' => $NS); + $result = array( + 'error' => $error, + 'ns' => $NS + ); } $json = new JSON; echo htmlspecialchars($json->encode($result), ENT_NOQUOTES); @@ -359,13 +367,11 @@ function ajax_linkwiz(){ $id = cleanID($id); $nsd = utf8_encodeFN(str_replace(':','/',$ns)); - $idd = utf8_encodeFN(str_replace(':','/',$id)); $data = array(); if($q && !$ns){ // use index to lookup matching pages - $pages = array(); $pages = ft_pageLookup($id,true); // result contains matches in pages and namespaces -- cgit v1.2.3 From 6ffaeda954351208754898acc6e2ff228f3ae472 Mon Sep 17 00:00:00 2001 From: Gerrit Uitslag Date: Thu, 20 Feb 2014 21:43:25 +0100 Subject: added some PHPDocs media.php --- inc/media.php | 27 +++++++++++++++++++++++++-- 1 file changed, 25 insertions(+), 2 deletions(-) diff --git a/inc/media.php b/inc/media.php index 132738942..6d5bf461b 100644 --- a/inc/media.php +++ b/inc/media.php @@ -728,10 +728,23 @@ function _media_get_sort_type() { return _media_get_display_param('sort', array('default' => 'name', 'date')); } +/** + * Returns type of listing for the list of files in media manager + * + * @author Kate Arzamastseva + * @return string - list type + */ function _media_get_list_type() { return _media_get_display_param('list', array('default' => 'thumbs', 'rows')); } +/** + * Get display parameters + * + * @param string $param name of parameter + * @param array $values allowed values, where default value has index key 'default' + * @return string the parameter value + */ function _media_get_display_param($param, $values) { global $INPUT; if (in_array($INPUT->str($param), $values)) { @@ -859,6 +872,10 @@ function media_tab_history($image, $ns, $auth=null) { /** * Prints mediafile details * + * @param string $image media id + * @param $auth + * @param int|bool $rev + * @param JpegMeta|bool $meta * @author Kate Arzamastseva */ function media_preview($image, $auth, $rev=false, $meta=false) { @@ -1097,9 +1114,15 @@ function media_diff($image, $ns, $auth, $fromajax = false) { } +/** + * Callback for media file diff + * + * @param $data + * @return bool|void + */ function _media_file_diff($data) { if(is_array($data) && count($data)===6) { - return media_file_diff($data[0], $data[1], $data[2], $data[3], $data[4], $data[5]); + media_file_diff($data[0], $data[1], $data[2], $data[3], $data[4], $data[5]); } else { return false; } @@ -1558,7 +1581,7 @@ function media_printimgdetail($item, $fullscreen=false){ * @param string $amp - separator * @param bool $abs * @param bool $params_array - * @return string - link + * @return string|array - link */ function media_managerURL($params=false, $amp='&', $abs=false, $params_array=false) { global $ID; -- cgit v1.2.3 From 948d482d02c7bfd8a6b00e1339e7e2300acde137 Mon Sep 17 00:00:00 2001 From: Marina Vladi Date: Sat, 22 Feb 2014 12:51:41 +0100 Subject: translation update --- inc/lang/hu/lang.php | 2 +- lib/plugins/authad/lang/hu/settings.php | 6 +-- lib/plugins/authldap/lang/hu/settings.php | 7 ++-- lib/plugins/authmysql/lang/hu/settings.php | 4 +- lib/plugins/plugin/lang/hu/admin_plugin.txt | 4 ++ lib/plugins/plugin/lang/hu/lang.php | 59 +++++++++++++++++++++++++++++ 6 files changed, 73 insertions(+), 9 deletions(-) create mode 100644 lib/plugins/plugin/lang/hu/admin_plugin.txt create mode 100644 lib/plugins/plugin/lang/hu/lang.php diff --git a/inc/lang/hu/lang.php b/inc/lang/hu/lang.php index 5113e1cc8..a0aef9447 100644 --- a/inc/lang/hu/lang.php +++ b/inc/lang/hu/lang.php @@ -337,4 +337,4 @@ $lang['media_restore'] = 'Ezen verzió visszaállítása'; $lang['currentns'] = 'Aktuális névtér'; $lang['searchresult'] = 'Keresés eredménye'; $lang['plainhtml'] = 'Sima HTML'; -$lang['wikimarkup'] = 'Wiki-jelölő nyelv'; +$lang['wikimarkup'] = 'Wiki-jelölőnyelv'; diff --git a/lib/plugins/authad/lang/hu/settings.php b/lib/plugins/authad/lang/hu/settings.php index 05acbdc2d..be0592d68 100644 --- a/lib/plugins/authad/lang/hu/settings.php +++ b/lib/plugins/authad/lang/hu/settings.php @@ -11,11 +11,11 @@ $lang['base_dn'] = 'Bázis DN, pl. DC=my,DC=domain,DC=org + * @author Marina Vladi */ -$lang['server'] = 'LDAP-szerver. Hosztnév (localhost) vagy abszolút URL portszámmal (ldap://server.tld:389)'; -$lang['port'] = 'LDAP-szerver port, ha nem URL lett megadva'; +$lang['server'] = 'LDAP-szerver. Kiszolgálónév (localhost) vagy teljes URL-cím (ldap://server.tld:389)'; +$lang['port'] = 'LDAP-kiszolgáló portja, ha URL-cím nem lett megadva'; $lang['usertree'] = 'Hol találom a felhasználókat? Pl. ou=People, dc=server, dc=tld'; $lang['grouptree'] = 'Hol találom a csoportokat? Pl. ou=Group, dc=server, dc=tld'; $lang['userfilter'] = 'LDAP szűrő a felhasználók kereséséhez, pl. (&(uid=%{user})(objectClass=posixAccount))'; @@ -20,7 +21,7 @@ $lang['bindpw'] = 'Ehhez tartozó jelszó.'; $lang['userscope'] = 'A keresési tartomány korlátozása erre a felhasználókra való keresésnél'; $lang['groupscope'] = 'A keresési tartomány korlátozása erre a csoportokra való keresésnél'; $lang['groupkey'] = 'Csoport meghatározása a következő attribútumból (az alapértelmezett AD csoporttagság helyett), pl. a szervezeti egység vagy a telefonszám'; -$lang['debug'] = 'Debug-üzenetek megjelenítése?'; +$lang['debug'] = 'Továbi hibakeresési információk megjelenítése hiba esetén'; $lang['deref_o_0'] = 'LDAP_DEREF_NEVER'; $lang['deref_o_1'] = 'LDAP_DEREF_SEARCHING'; $lang['deref_o_2'] = 'LDAP_DEREF_FINDING'; diff --git a/lib/plugins/authmysql/lang/hu/settings.php b/lib/plugins/authmysql/lang/hu/settings.php index 5936203fa..cf7b26bb9 100644 --- a/lib/plugins/authmysql/lang/hu/settings.php +++ b/lib/plugins/authmysql/lang/hu/settings.php @@ -6,8 +6,8 @@ * @author Marton Sebok * @author Marina Vladi */ -$lang['server'] = 'MySQL-szerver'; -$lang['user'] = 'MySQL felhasználónév'; +$lang['server'] = 'MySQL-kiszolgáló'; +$lang['user'] = 'MySQL-felhasználónév'; $lang['password'] = 'Fenti felhasználó jelszava'; $lang['database'] = 'Adatbázis'; $lang['charset'] = 'Az adatbázisban használt karakterkészlet'; diff --git a/lib/plugins/plugin/lang/hu/admin_plugin.txt b/lib/plugins/plugin/lang/hu/admin_plugin.txt new file mode 100644 index 000000000..cf4a3b316 --- /dev/null +++ b/lib/plugins/plugin/lang/hu/admin_plugin.txt @@ -0,0 +1,4 @@ +====== Bővítménykezelő ====== + +Ezen az oldalon a Dokuwiki [[doku>plugins|bővítményeivel]] kapcsolatos teendőket láthatod el. A webkiszolgálónak tudnia kell írni a //plugin// könyvtárba az új bővítmények letöltéséhez és telepítéséhez. + diff --git a/lib/plugins/plugin/lang/hu/lang.php b/lib/plugins/plugin/lang/hu/lang.php new file mode 100644 index 000000000..7fb237a32 --- /dev/null +++ b/lib/plugins/plugin/lang/hu/lang.php @@ -0,0 +1,59 @@ + + * @author Siaynoq Mage + * @author schilling.janos@gmail.com + * @author Szabó Dávid + * @author Sándor TIHANYI + * @author David Szabo + * @author Marton Sebok + * @author Marina Vladi + */ +$lang['menu'] = 'Bővítménykezelő'; +$lang['download'] = 'Új bővítmény letöltése és telepítése'; +$lang['manage'] = 'Telepített bővítmények'; +$lang['btn_info'] = 'infó'; +$lang['btn_update'] = 'frissítés'; +$lang['btn_delete'] = 'törlés'; +$lang['btn_settings'] = 'beállítások'; +$lang['btn_download'] = 'Letöltés'; +$lang['btn_enable'] = 'Mentés'; +$lang['url'] = 'URL-cím'; +$lang['installed'] = 'Telepítve:'; +$lang['lastupdate'] = 'Utolsó frissítés:'; +$lang['source'] = 'Forrás:'; +$lang['unknown'] = 'ismeretlen'; +$lang['updating'] = 'Frissítés...'; +$lang['updated'] = 'A(z) %s bővítmény frissítése sikeres.'; +$lang['updates'] = 'A következő bővítmények frissítése sikeres:'; +$lang['update_none'] = 'Nem találtam újabb verziót.'; +$lang['deleting'] = 'Törlés...'; +$lang['deleted'] = 'A(z) %s bővítményt eltávolítva.'; +$lang['downloading'] = 'Letöltés...'; +$lang['downloaded'] = 'A(z) %s bővítmény telepítése sikeres.'; +$lang['downloads'] = 'A következő bővítmények telepítése sikeres.'; +$lang['download_none'] = 'Nem találtam bővítményt vagy ismeretlen hiba történt a letöltés/telepítés közben.'; +$lang['plugin'] = 'Bővítmény:'; +$lang['components'] = 'Részek'; +$lang['noinfo'] = 'Ez a bővítmény nem tartalmaz információt, lehet, hogy hibás.'; +$lang['name'] = 'Név:'; +$lang['date'] = 'Dátum:'; +$lang['type'] = 'Típus:'; +$lang['desc'] = 'Leírás:'; +$lang['author'] = 'Szerző:'; +$lang['www'] = 'Web:'; +$lang['error'] = 'Ismeretlen hiba lépett fel.'; +$lang['error_download'] = 'Nem tudom letölteni a fájlt a bővítményhez: %s'; +$lang['error_badurl'] = 'Feltehetően rossz URL - nem tudom meghatározni a fájlnevet az URL-ből.'; +$lang['error_dircreate'] = 'Nem tudom létrehozni az átmeneti könyvtárat a letöltéshez.'; +$lang['error_decompress'] = 'A Bővítménykezelő nem tudta a letöltött állományt kicsomagolni. Ennek oka lehet hibás letöltés, ebben az esetben újra letöltéssel próbálkozhatsz, esetleg a tömörítés módja ismeretlen, ebben az esetben kézzel kell letölteni és telepíteni a bővítményt.'; +$lang['error_copy'] = 'Fájl másolási hiba történt a(z) %s bővítmény telepítése közben: vagy a lemezterület fogyott el, vagy az állomány hozzáférési jogosultságai nem megfelelőek. Emiatt előfordulhat, hogy a bővítményt csak részben sikerült telepíteni és a wiki összeomolhat.'; +$lang['error_delete'] = 'Hiba történt a(z) %s bővítmény eltávolítása közben. A legvalószínűbb ok, hogy a könyvtár vagy állomány hozzáférési jogosultságai nem megfelelőek.'; +$lang['enabled'] = 'A(z) %s bővítmény bekapcsolva.'; +$lang['notenabled'] = 'A(z) %s bővítmény engedélyezése nem sikerült. Ellenőrizze a fájlhozzáférési jogosultságokat.'; +$lang['disabled'] = 'A(z) %s bővítmény kikapcsolva.'; +$lang['notdisabled'] = 'A(z) %s bővítmény kikapcsolása nem sikerült. Ellenőrizze a fájlhozzáférési jogosultságokat.'; +$lang['packageinstalled'] = 'A bővítménycsomag(ok) feltelepült(ek): %d plugin(s): %s'; -- cgit v1.2.3 From 0ebbba20d4c1f73eda768945dad1697d44d1a354 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Schplurtz=20le=20D=C3=A9boulonn=C3=A9?= Date: Sat, 22 Feb 2014 12:53:39 +0100 Subject: translation update --- lib/plugins/extension/lang/fr/intro_install.txt | 1 + lib/plugins/extension/lang/fr/intro_plugins.txt | 1 + lib/plugins/extension/lang/fr/intro_search.txt | 1 + lib/plugins/extension/lang/fr/intro_templates.txt | 1 + lib/plugins/extension/lang/fr/lang.php | 87 +++++++++++++++++++++++ 5 files changed, 91 insertions(+) create mode 100644 lib/plugins/extension/lang/fr/intro_install.txt create mode 100644 lib/plugins/extension/lang/fr/intro_plugins.txt create mode 100644 lib/plugins/extension/lang/fr/intro_search.txt create mode 100644 lib/plugins/extension/lang/fr/intro_templates.txt create mode 100644 lib/plugins/extension/lang/fr/lang.php diff --git a/lib/plugins/extension/lang/fr/intro_install.txt b/lib/plugins/extension/lang/fr/intro_install.txt new file mode 100644 index 000000000..6f68a2606 --- /dev/null +++ b/lib/plugins/extension/lang/fr/intro_install.txt @@ -0,0 +1 @@ +Ici, vous pouvez installer des extensions, greffons et modèles. Soit en les téléversant, soit en indiquant un URL de téléchargement. \ No newline at end of file diff --git a/lib/plugins/extension/lang/fr/intro_plugins.txt b/lib/plugins/extension/lang/fr/intro_plugins.txt new file mode 100644 index 000000000..a40b863d2 --- /dev/null +++ b/lib/plugins/extension/lang/fr/intro_plugins.txt @@ -0,0 +1 @@ +Voilà la liste des extensions actuellement installées. À partir d'ici, vous pouvez les activer, les désactiver ou même les désinstaller complètement. Cette page affiche également les mises à jour. Assurez vous de lire la documentation avant de faire la mise à jour. \ No newline at end of file diff --git a/lib/plugins/extension/lang/fr/intro_search.txt b/lib/plugins/extension/lang/fr/intro_search.txt new file mode 100644 index 000000000..418e35972 --- /dev/null +++ b/lib/plugins/extension/lang/fr/intro_search.txt @@ -0,0 +1 @@ +Cet onglet vous donne accès à toutes les extensions de tierces parties. Restez conscients qu'installer du code de tierce partie peut poser un problème de **sécurité**. Vous voudrez peut-être au préalable lire l'article sur la [[doku>fr:security##securite_des_plugins|sécurité des plugins]]. \ No newline at end of file diff --git a/lib/plugins/extension/lang/fr/intro_templates.txt b/lib/plugins/extension/lang/fr/intro_templates.txt new file mode 100644 index 000000000..fefdb5538 --- /dev/null +++ b/lib/plugins/extension/lang/fr/intro_templates.txt @@ -0,0 +1 @@ +Voici la liste des modèles actuellement installés. Le [[?do=admin&page=config|gestionnaire de configuration]] vous permet de choisir le modèle à utiliser. \ No newline at end of file diff --git a/lib/plugins/extension/lang/fr/lang.php b/lib/plugins/extension/lang/fr/lang.php new file mode 100644 index 000000000..c2dae0fc9 --- /dev/null +++ b/lib/plugins/extension/lang/fr/lang.php @@ -0,0 +1,87 @@ + + */ +$lang['menu'] = 'Gestionnaire d\'extension'; +$lang['tab_plugins'] = 'Greffons installés'; +$lang['tab_templates'] = 'Modèles installés'; +$lang['tab_search'] = 'Rechercher et installer'; +$lang['tab_install'] = 'Installation manuelle'; +$lang['notimplemented'] = 'Cette fonctionnalité n\'est pas encore installée'; +$lang['notinstalled'] = 'Cette extension n\'est pas installée'; +$lang['alreadyenabled'] = 'Cette extension a déjà été installée'; +$lang['alreadydisabled'] = 'Cette extension a déjà été désactivée'; +$lang['pluginlistsaveerror'] = 'Une erreur s\'est produite lors de l\'enregistrement de la liste des greffons.'; +$lang['unknownauthor'] = 'Auteur inconnu'; +$lang['unknownversion'] = 'Version inconnue'; +$lang['btn_info'] = 'Montrer plus d\'informations'; +$lang['btn_update'] = 'Mettre à jour'; +$lang['btn_uninstall'] = 'Désinstaller'; +$lang['btn_enable'] = 'Activer'; +$lang['btn_disable'] = 'Désactiver'; +$lang['btn_install'] = 'Installer'; +$lang['btn_reinstall'] = 'Réinstaller'; +$lang['js']['reallydel'] = 'Vraiment désinstaller cette extension'; +$lang['search_for'] = 'Rechercher l\'extension :'; +$lang['search'] = 'Chercher'; +$lang['extensionby'] = '%s de %s'; +$lang['screenshot'] = 'Aperçu de %s'; +$lang['popularity'] = 'Popularité : %s%%'; +$lang['homepage_link'] = 'Documents'; +$lang['bugs_features'] = 'Bugs'; +$lang['tags'] = 'Étiquettes :'; +$lang['author_hint'] = 'Chercher les extensions de cet auteur'; +$lang['installed'] = 'Installés :'; +$lang['downloadurl'] = 'URL de téléchargement :'; +$lang['repository'] = 'Entrepôt : '; +$lang['unknown'] = 'inconnu'; +$lang['installed_version'] = 'Version installée :'; +$lang['install_date'] = 'Votre dernière mise à jour :'; +$lang['available_version'] = 'Version disponible :'; +$lang['compatible'] = 'Compatible avec :'; +$lang['depends'] = 'Dépend de :'; +$lang['similar'] = 'Similaire à :'; +$lang['conflicts'] = 'En conflit avec :'; +$lang['donate'] = 'Vous aimez ?'; +$lang['donate_action'] = 'Payer un café à l\'auteur !'; +$lang['repo_retry'] = 'Réessayer'; +$lang['provides'] = 'Fournit :'; +$lang['status'] = 'État :'; +$lang['status_installed'] = 'installé'; +$lang['status_not_installed'] = 'non installé'; +$lang['status_protected'] = 'protégé'; +$lang['status_enabled'] = 'activé'; +$lang['status_disabled'] = 'désactivé'; +$lang['status_unmodifiable'] = 'non modifiable'; +$lang['status_plugin'] = 'greffon'; +$lang['status_template'] = 'modèle'; +$lang['status_bundled'] = 'fourni'; +$lang['msg_enabled'] = 'Greffon %s activé'; +$lang['msg_disabled'] = 'Greffon %s désactivé'; +$lang['msg_delete_success'] = 'Extension désinstallée'; +$lang['msg_template_install_success'] = 'Modèle %s installée avec succès'; +$lang['msg_template_update_success'] = 'Modèle %s mis à jour avec succès'; +$lang['msg_plugin_install_success'] = 'Greffon %s installé avec succès'; +$lang['msg_plugin_update_success'] = 'Greffon %s mis à jour avec succès'; +$lang['msg_upload_failed'] = 'Téléversement échoué'; +$lang['missing_dependency'] = 'Dépendance absente ou désactivée : %s'; +$lang['security_issue'] = 'Problème de sécurité : %s'; +$lang['security_warning'] = 'Avertissement deSécurité : %s'; +$lang['update_available'] = 'Mise à jour : La version %s est disponible.'; +$lang['wrong_folder'] = 'Greffon installé incorrectement : Renomer le dossier du greffon "%s" en "%s".'; +$lang['url_change'] = 'URL modifié : L\'URL de téléchargement a changé depuis le dernier téléchargement. Vérifiez si l\'URL est valide avant de mettre à jour l\'extension.
Nouvel URL : %s
Ancien : %s'; +$lang['error_badurl'] = 'Les URL doivent commencer par http ou https'; +$lang['error_dircreate'] = 'Impossible de créer le dossier temporaire pour le téléchargement.'; +$lang['error_download'] = 'Impossible de télécharger le fichier : %s'; +$lang['error_decompress'] = 'Impossible de décompresser le fichier téléchargé. C\'est peut être le résultat d\'une erreur de téléchargement, auquel cas vous devriez réessayer. Le format de compression est peut-être inconnu. Dans ce cas il vous faudra procéder à une installation manuelle.'; +$lang['error_findfolder'] = 'Impossible d\'idnetifier le dossier de l\'extension. vous devez procéder à une installation manuelle.'; +$lang['error_copy'] = 'Une erreur de copie de fichier s\'est produite lors de l\'installation des fichiers dans le dossier %s. Il se peut que le disque soit plein, ou que les permissions d\'accès aux fichiers soient incorrectes. Il est possible que le greffon soit partiellement installé et que cela laisse votre installation de DoluWiki instable.'; +$lang['noperms'] = 'Impossible d\'écrire dans le dossier des extensions.'; +$lang['notplperms'] = 'Impossible d\'écrire dans le dossier des modèles.'; +$lang['nopluginperms'] = 'Impossible d\'écrire dans le dossier des greffons.'; +$lang['git'] = 'Cette extension a été installé via git, vous voudrez peut-être ne pas la mettre à jour ici.'; +$lang['install_url'] = 'Installez depuis l\'URL :'; +$lang['install_upload'] = 'Téléversez l\'extension :'; -- cgit v1.2.3 From 46b189b552d813ab47a67d597ee4ef621f34b8a5 Mon Sep 17 00:00:00 2001 From: Robert Bogenschneider Date: Sun, 23 Feb 2014 08:21:01 +0100 Subject: translation update --- inc/lang/eo/admin.txt | 2 +- inc/lang/eo/adminplugins.txt | 2 +- inc/lang/eo/diff.txt | 2 +- inc/lang/eo/draft.txt | 2 +- inc/lang/eo/edit.txt | 2 +- inc/lang/eo/editrev.txt | 2 +- inc/lang/eo/lang.php | 11 +-- lib/plugins/extension/lang/eo/intro_install.txt | 1 + lib/plugins/extension/lang/eo/intro_plugins.txt | 1 + lib/plugins/extension/lang/eo/intro_search.txt | 1 + lib/plugins/extension/lang/eo/intro_templates.txt | 1 + lib/plugins/extension/lang/eo/lang.php | 87 +++++++++++++++++++++++ 12 files changed, 103 insertions(+), 11 deletions(-) create mode 100644 lib/plugins/extension/lang/eo/intro_install.txt create mode 100644 lib/plugins/extension/lang/eo/intro_plugins.txt create mode 100644 lib/plugins/extension/lang/eo/intro_search.txt create mode 100644 lib/plugins/extension/lang/eo/intro_templates.txt create mode 100644 lib/plugins/extension/lang/eo/lang.php diff --git a/inc/lang/eo/admin.txt b/inc/lang/eo/admin.txt index 4b0cf7909..4b3cf0c2a 100644 --- a/inc/lang/eo/admin.txt +++ b/inc/lang/eo/admin.txt @@ -1,3 +1,3 @@ ====== Administrado ====== -Sube vi povas trovi liston de administraj taskoj disponeblaj en DokuWiki. +Sube vi trovas liston de administraj taskoj haveblaj en DokuWiki. diff --git a/inc/lang/eo/adminplugins.txt b/inc/lang/eo/adminplugins.txt index 769a8c538..bb7e7829b 100644 --- a/inc/lang/eo/adminplugins.txt +++ b/inc/lang/eo/adminplugins.txt @@ -1 +1 @@ -===== Eksteraj kromaĵoj ===== \ No newline at end of file +===== Aldonaj kromaĵoj ===== \ No newline at end of file diff --git a/inc/lang/eo/diff.txt b/inc/lang/eo/diff.txt index 5829a7db1..3c9db61c8 100644 --- a/inc/lang/eo/diff.txt +++ b/inc/lang/eo/diff.txt @@ -1,4 +1,4 @@ ====== Diferencoj ====== -Ĉi tie vi povas vidi diferencojn inter la aktuala versio kaj la elektita revizio de la paĝo. +Tio montras diferencojn inter du versioj de la paĝo. diff --git a/inc/lang/eo/draft.txt b/inc/lang/eo/draft.txt index 32ddc83f6..57526f3b5 100644 --- a/inc/lang/eo/draft.txt +++ b/inc/lang/eo/draft.txt @@ -1,5 +1,5 @@ ====== Skiza dosiero troviĝis ====== -Via lasta sekcio de redakto en tiu ĉi paĝo ne korekte kompletiĝis. DokuWiki aŭtomate konservis skizon dum vi laboris, kiun vi nun povas uzi por daŭrigi vian redaktadon. Sube vi povas vidi la datumaron, kiu konserviĝis el via lasta sekcio. +Via lasta redaktosesio en tiu ĉi paĝo ne ĝuste kompletiĝis. DokuWiki aŭtomate konservis skizon dum vi laboris, kiun vi nun povas uzi por daŭrigi vian redaktadon. Sube vi povas vidi la datumaron, kiu konserviĝis el via lasta sesio. Bonvolu decidi ĉu vi volas //restarigi// vian perditan redakton, //forigi// la aŭtomate konservitan skizon aŭ //rezigni// pri la redakta procezo. diff --git a/inc/lang/eo/edit.txt b/inc/lang/eo/edit.txt index 29b3382c5..ccc8a613d 100644 --- a/inc/lang/eo/edit.txt +++ b/inc/lang/eo/edit.txt @@ -1 +1 @@ -Redaktu paĝon kaj poste premu butonon titolitan '"Konservi'". Bonvolu tralegi la [[wiki:syntax|vikian sintakson]] por kompreni kiel vi povas krei paĝojn. Bonvolu redakti nur se vi planas **plibonigi** la enhavon de la paĝo. Se vi volas nur testi ion, bonvolu uzi specialan paĝon: [[wiki:playground|ludejo]]. +Redaktu paĝon kaj poste premu butonon titolitan '"Konservi'". Bonvolu tralegi la [[wiki:syntax|vikian sintakson]] pri la formatigo. Bonvolu redakti **nur**, se vi povas **plibonigi** la enhavon de la paĝo. Se vi volas nur testi ion, bonvolu uzi specialan paĝon: [[playground:playground|sablokesto]]. diff --git a/inc/lang/eo/editrev.txt b/inc/lang/eo/editrev.txt index 1640baa91..2e1406b0f 100644 --- a/inc/lang/eo/editrev.txt +++ b/inc/lang/eo/editrev.txt @@ -1,2 +1,2 @@ -**Vi laboras kun malnova revizio de la dokumento!** Se vi konservos ĝin, kreiĝos nova kuranta versio kun la sama enhavo. +**Vi laboras kun malnova revizio de la dokumento!** Se vi konservos ĝin, kreiĝos nova kuranta versio kun tiu enhavo. ---- diff --git a/inc/lang/eo/lang.php b/inc/lang/eo/lang.php index a543b2571..97231bdce 100644 --- a/inc/lang/eo/lang.php +++ b/inc/lang/eo/lang.php @@ -37,13 +37,13 @@ $lang['btn_secedit'] = 'Redakti'; $lang['btn_login'] = 'Ensaluti'; $lang['btn_logout'] = 'Elsaluti'; $lang['btn_admin'] = 'Administri'; -$lang['btn_update'] = 'Ĝisdatigi'; +$lang['btn_update'] = 'Aktualigi'; $lang['btn_delete'] = 'Forigi'; $lang['btn_back'] = 'Retroiri'; $lang['btn_backlink'] = 'Retroligoj'; $lang['btn_backtomedia'] = 'Retroiri al elekto de dosiero'; $lang['btn_subscribe'] = 'Aliĝi al paĝaj modifoj'; -$lang['btn_profile'] = 'Ĝisdatigi profilon'; +$lang['btn_profile'] = 'Aktualigi profilon'; $lang['btn_reset'] = 'Rekomenci'; $lang['btn_resendpwd'] = 'Sendi novan pasvorton'; $lang['btn_draft'] = 'Redakti skizon'; @@ -53,7 +53,7 @@ $lang['btn_revert'] = 'Restarigi'; $lang['btn_register'] = 'Registriĝi'; $lang['btn_apply'] = 'Apliki'; $lang['btn_media'] = 'Medio-administrilo'; -$lang['btn_deleteuser'] = 'Forigi mian aliĝon'; +$lang['btn_deleteuser'] = 'Forigi mian konton'; $lang['loggedinas'] = 'Ensalutinta kiel'; $lang['user'] = 'Uzant-nomo'; $lang['pass'] = 'Pasvorto'; @@ -81,7 +81,7 @@ $lang['reghere'] = 'Se vi ne havas konton, vi povas akiri ĝin'; $lang['profna'] = 'Tiu ĉi vikio ne ebligas modifon en la profiloj.'; $lang['profnochange'] = 'Neniu ŝanĝo, nenio farinda.'; $lang['profnoempty'] = 'Malplena nomo aŭ retadreso ne estas permesata.'; -$lang['profchanged'] = 'La profilo de la uzanto sukcese ĝisdatiĝis.'; +$lang['profchanged'] = 'La profilo de la uzanto sukcese aktualiĝis.'; $lang['profnodelete'] = 'Tiu ĉi vikio ne subtenas forigo de uzantoj'; $lang['profdeleteuser'] = 'Forigi aliĝon'; $lang['profdeleted'] = 'Via uzant-aliĝo estis forigata de tiu ĉi vikio'; @@ -104,7 +104,7 @@ $lang['txt_filename'] = 'Alŝuti kiel (laŭvole)'; $lang['txt_overwrt'] = 'Anstataŭigi ekzistantan dosieron'; $lang['maxuploadsize'] = 'Alŝuto maks. %s po dosiero.'; $lang['lockedby'] = 'Nune ŝlosita de'; -$lang['lockexpire'] = 'Ŝlosado ĉesos en'; +$lang['lockexpire'] = 'Ŝlosado ĉesos je'; $lang['js']['willexpire'] = 'Vi povos redakti ĉi tiun paĝon post unu minuto.\nSe vi volas nuligi tempokontrolon de la ŝlosado, premu la butonon "Antaŭrigardi".'; $lang['js']['notsavedyet'] = 'Ne konservitaj modifoj perdiĝos. Ĉu vi certe volas daŭrigi la procezon?'; @@ -293,6 +293,7 @@ $lang['i_policy'] = 'Komenca ACL-a agordo'; $lang['i_pol0'] = 'Malferma Vikio (legi, skribi, alŝuti povas ĉiuj)'; $lang['i_pol1'] = 'Publika Vikio (legi povas ĉiuj, skribi kaj alŝuti povas registritaj uzantoj)'; $lang['i_pol2'] = 'Ferma Vikio (legi, skribi, alŝuti nur povas registritaj uzantoj)'; +$lang['i_allowreg'] = 'Permesi al uzantoj registri sin mem'; $lang['i_retry'] = 'Reprovi'; $lang['i_license'] = 'Bonvolu elekti la permesilon, sub kiun vi volas meti vian enhavon:'; $lang['i_license_none'] = 'Ne montri licencinformojn'; diff --git a/lib/plugins/extension/lang/eo/intro_install.txt b/lib/plugins/extension/lang/eo/intro_install.txt new file mode 100644 index 000000000..d9c63da1d --- /dev/null +++ b/lib/plugins/extension/lang/eo/intro_install.txt @@ -0,0 +1 @@ +Tie vi povas permane instali kromaĵojn kaj ŝablonojn tra alŝuto aŭ indiko de URL por rekta elŝuto. \ No newline at end of file diff --git a/lib/plugins/extension/lang/eo/intro_plugins.txt b/lib/plugins/extension/lang/eo/intro_plugins.txt new file mode 100644 index 000000000..cc7ae6628 --- /dev/null +++ b/lib/plugins/extension/lang/eo/intro_plugins.txt @@ -0,0 +1 @@ +Jenaj kromaĵoj momente estas instalitaj en via DokuWiki. Vi povas ebligi, malebligi aŭ eĉ tute malinstali ilin tie. Ankaŭ montriĝos aktualigoj de kromaĵoj -- certiĝu, ke vi legis la dokumentadon de la kromaĵo antaŭ aktualigo. \ No newline at end of file diff --git a/lib/plugins/extension/lang/eo/intro_search.txt b/lib/plugins/extension/lang/eo/intro_search.txt new file mode 100644 index 000000000..5d194948c --- /dev/null +++ b/lib/plugins/extension/lang/eo/intro_search.txt @@ -0,0 +1 @@ +Tiu tabelo donas aliron al ĉiuj haveblaj eksteraj kromaĵoj kaj ŝablonoj por DokuWiki. Bonvolu konscii, ke instali eksteran kodaĵon povas enkonduki **sekurecriskon**, prefere legu antaŭe pri [[doku>security#plugin_security|sekureco de kromaĵo]]. \ No newline at end of file diff --git a/lib/plugins/extension/lang/eo/intro_templates.txt b/lib/plugins/extension/lang/eo/intro_templates.txt new file mode 100644 index 000000000..6dc0ef671 --- /dev/null +++ b/lib/plugins/extension/lang/eo/intro_templates.txt @@ -0,0 +1 @@ +Jenaj ŝablonoj momente instaliĝis en via DokuWiki. Elektu la ŝablonon por uzi en la [[?do=admin&page=config|Opcia administrilo]]. \ No newline at end of file diff --git a/lib/plugins/extension/lang/eo/lang.php b/lib/plugins/extension/lang/eo/lang.php new file mode 100644 index 000000000..6ce840be8 --- /dev/null +++ b/lib/plugins/extension/lang/eo/lang.php @@ -0,0 +1,87 @@ + + */ +$lang['menu'] = 'Aldonaĵa administrado'; +$lang['tab_plugins'] = 'Instalitaj kromaĵoj'; +$lang['tab_templates'] = 'Instalitaj ŝablonoj'; +$lang['tab_search'] = 'Serĉi kaj instali'; +$lang['tab_install'] = 'Permana instalado'; +$lang['notimplemented'] = 'Tiu funkcio ankoraŭ ne realiĝis'; +$lang['notinstalled'] = 'Tiu aldonaĵo ne estas instalita'; +$lang['alreadyenabled'] = 'Tiu aldonaĵo jam ebliĝis'; +$lang['alreadydisabled'] = 'Tiu aldonaĵo jam malebliĝis'; +$lang['pluginlistsaveerror'] = 'Okazis eraro dum la kromaĵlisto konserviĝis'; +$lang['unknownauthor'] = 'Nekonata aŭtoro'; +$lang['unknownversion'] = 'Nekonata versio'; +$lang['btn_info'] = 'Montri pliajn informojn'; +$lang['btn_update'] = 'Aktualigi'; +$lang['btn_uninstall'] = 'Malinstali'; +$lang['btn_enable'] = 'Ebligi'; +$lang['btn_disable'] = 'Malebligi'; +$lang['btn_install'] = 'Instali'; +$lang['btn_reinstall'] = 'Re-instali'; +$lang['js']['reallydel'] = 'Ĉu vere malinstali la aldonaĵon?'; +$lang['search_for'] = 'Serĉi la aldonaĵon:'; +$lang['search'] = 'Serĉi'; +$lang['extensionby'] = '%s fare de %s'; +$lang['screenshot'] = 'Ekrankopio de %s'; +$lang['popularity'] = 'Populareco: %s%%'; +$lang['homepage_link'] = 'Dokumentoj'; +$lang['bugs_features'] = 'Cimoj'; +$lang['tags'] = 'Etikedoj:'; +$lang['author_hint'] = 'Serĉi aldonaĵojn laŭ tiu aŭtoro:'; +$lang['installed'] = 'Instalitaj:'; +$lang['downloadurl'] = 'URL por elŝuti:'; +$lang['repository'] = 'Kodbranĉo:'; +$lang['unknown'] = 'nekonata'; +$lang['installed_version'] = 'Instalita versio:'; +$lang['install_date'] = 'Via lasta aktualigo:'; +$lang['available_version'] = 'Havebla versio:'; +$lang['compatible'] = 'Kompatibla kun:'; +$lang['depends'] = 'Dependas de:'; +$lang['similar'] = 'Simila al:'; +$lang['conflicts'] = 'Konfliktas kun:'; +$lang['donate'] = 'Ĉu vi ŝatas tion?'; +$lang['donate_action'] = 'Aĉetu kafon al la aŭtoro!'; +$lang['repo_retry'] = 'Reprovi'; +$lang['provides'] = 'Provizas per:'; +$lang['status'] = 'Statuso:'; +$lang['status_installed'] = 'instalita'; +$lang['status_not_installed'] = 'ne instalita'; +$lang['status_protected'] = 'protektita'; +$lang['status_enabled'] = 'ebligita'; +$lang['status_disabled'] = 'malebligita'; +$lang['status_unmodifiable'] = 'neŝanĝebla'; +$lang['status_plugin'] = 'kromaĵo'; +$lang['status_template'] = 'ŝablono'; +$lang['status_bundled'] = 'kunliverita'; +$lang['msg_enabled'] = 'Kromaĵo %s ebligita'; +$lang['msg_disabled'] = 'Kromaĵo %s malebligita'; +$lang['msg_delete_success'] = 'Aldonaĵo malinstaliĝis'; +$lang['msg_template_install_success'] = 'Ŝablono %s sukcese instaliĝis'; +$lang['msg_template_update_success'] = 'Ŝablono %s sukcese aktualiĝis'; +$lang['msg_plugin_install_success'] = 'Kromaĵo %s sukcese instaliĝis'; +$lang['msg_plugin_update_success'] = 'Kromaĵo %s sukcese aktualiĝis'; +$lang['msg_upload_failed'] = 'Ne eblis alŝuti la dosieron'; +$lang['missing_dependency'] = 'Mankanta aŭ malebligita dependeco: %s'; +$lang['security_issue'] = 'Sekureca problemo: %s'; +$lang['security_warning'] = 'Sekureca averto: %s'; +$lang['update_available'] = 'Aktualigo: Nova versio %s haveblas.'; +$lang['wrong_folder'] = 'Kromaĵo instalita malĝuste: Renomu la kromaĵdosierujon "%s" al "%s".'; +$lang['url_change'] = 'URL ŝanĝita: La elŝuta URL ŝanĝiĝis ekde la lasta elŝuto. Kontrolu, ĉu la nova URL validas antaŭ aktualigi aldonaĵon.
Nova: %s
Malnova: %s'; +$lang['error_badurl'] = 'URLoj komenciĝu per http aŭ https'; +$lang['error_dircreate'] = 'Ne eblis krei portempan dosierujon por akcepti la elŝuton'; +$lang['error_download'] = 'Ne eblis elŝuti la dosieron: %s'; +$lang['error_decompress'] = 'Ne eblis malpaki la elŝutitan dosieron. Kialo povus esti fuŝa elŝuto, kaj vi reprovu; aŭ la pakiga formato estas nekonata, kaj vi devas elŝuti kaj instali permane.'; +$lang['error_findfolder'] = 'Ne eblis rekoni la aldonaĵ-dosierujon, vi devas elŝuti kaj instali permane'; +$lang['error_copy'] = 'Okazis kopiad-eraro dum la provo instali dosierojn por la dosierujo %s: la disko povus esti plena aŭ la alirpermesoj por dosieroj malĝustaj. Rezulto eble estas nur parte instalita kromaĵo, kiu malstabiligas vian vikion'; +$lang['noperms'] = 'La aldonaĵ-dosierujo ne estas skribebla'; +$lang['notplperms'] = 'La ŝablon-dosierujo ne estas skribebla'; +$lang['nopluginperms'] = 'La kromaĵ-dosierujo ne estas skribebla'; +$lang['git'] = 'Tiu aldonaĵo estis instalita pere de git, eble vi ne aktualigu ĝin ĉi tie.'; +$lang['install_url'] = 'Instali de URL:'; +$lang['install_upload'] = 'Alŝuti aldonaĵon:'; -- cgit v1.2.3 From adfe6dafd15d9bf52ed6212b44b02a6a32c8bf49 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Sun, 23 Feb 2014 09:38:03 +0100 Subject: fixed proxy authentication in SSL tunneling --- inc/HTTPClient.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inc/HTTPClient.php b/inc/HTTPClient.php index de3a16830..53f3c9a78 100644 --- a/inc/HTTPClient.php +++ b/inc/HTTPClient.php @@ -552,7 +552,7 @@ class HTTPClient { $request = "CONNECT {$requestinfo['host']}:{$requestinfo['port']} HTTP/1.0".HTTP_NL; $request .= "Host: {$requestinfo['host']}".HTTP_NL; if($this->proxy_user) { - 'Proxy-Authorization Basic '.base64_encode($this->proxy_user.':'.$this->proxy_pass).HTTP_NL; + $request .= 'Proxy-Authorization Basic '.base64_encode($this->proxy_user.':'.$this->proxy_pass).HTTP_NL; } $request .= HTTP_NL; -- cgit v1.2.3 From 01c9a118dacc1e2c07f2b0ddee84c514022e5927 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Sun, 23 Feb 2014 09:54:47 +0100 Subject: have most current revision always available in $INFO fixes fix for FS#2853 --- inc/common.php | 9 +++++---- inc/html.php | 2 +- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/inc/common.php b/inc/common.php index 32771285b..bbc0a6e68 100644 --- a/inc/common.php +++ b/inc/common.php @@ -155,12 +155,13 @@ function pageinfo() { $info['subscribed'] = false; } - $info['locked'] = checklock($ID); - $info['filepath'] = fullpath(wikiFN($ID)); - $info['exists'] = @file_exists($info['filepath']); + $info['locked'] = checklock($ID); + $info['filepath'] = fullpath(wikiFN($ID)); + $info['exists'] = @file_exists($info['filepath']); + $info['currentrev'] = @filemtime($info['filepath']); if($REV) { //check if current revision was meant - if($info['exists'] && (@filemtime($info['filepath']) == $REV)) { + if($info['exists'] && ($info['currentrev'] == $REV)) { $REV = ''; } elseif($RANGE) { //section editing does not work with old revisions! diff --git a/inc/html.php b/inc/html.php index 0434f3b45..fcec29670 100644 --- a/inc/html.php +++ b/inc/html.php @@ -1189,7 +1189,7 @@ function html_diff($text='',$intro=true,$type=null){ $diffurl = wl($ID, array( 'do' => 'diff', 'rev2[0]' => $l_rev, - 'rev2[1]' => $r_rev ? $r_rev : $INFO['lastmod'], // link to exactly this view FS#2835 + 'rev2[1]' => $r_rev ? $r_rev : $INFO['currentrev'], // link to exactly this view FS#2835 'difftype' => $type, )); ptln('

'.$lang['difflink'].'

'); -- cgit v1.2.3 From 5d873dd4ce31c79403a01ac0e40ff148be282592 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Sun, 23 Feb 2014 10:09:11 +0100 Subject: fixed test cases for last commit --- _test/tests/inc/common_pageinfo.test.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/_test/tests/inc/common_pageinfo.test.php b/_test/tests/inc/common_pageinfo.test.php index 0a1ea0a8f..2b230d9ce 100644 --- a/_test/tests/inc/common_pageinfo.test.php +++ b/_test/tests/inc/common_pageinfo.test.php @@ -38,6 +38,7 @@ class common_pageinfo_test extends DokuWikiTest { $info['writable'] = true; $info['editable'] = true; $info['lastmod'] = false; + $info['currentrev'] = false; $info['meta'] = array(); $info['ip'] = null; $info['user'] = null; @@ -77,6 +78,7 @@ class common_pageinfo_test extends DokuWikiTest { $info['filepath'] = $filename; $info['exists'] = true; $info['lastmod'] = $rev; + $info['currentrev'] = $rev; $info['meta'] = p_get_metadata($ID); $this->assertEquals($info, pageinfo()); @@ -101,6 +103,7 @@ class common_pageinfo_test extends DokuWikiTest { $info['filepath'] = $filename; $info['exists'] = true; $info['lastmod'] = $rev; + $info['currentrev'] = $rev; $info['meta'] = p_get_metadata($ID); $info['rev'] = ''; @@ -131,6 +134,7 @@ class common_pageinfo_test extends DokuWikiTest { $info['namespace'] = 'wiki'; $info['meta'] = p_get_metadata($ID); $info['rev'] = $REV; + $info['currentrev'] = $rev; $info['filepath'] = str_replace('pages','attic',substr($filename,0,-3).$REV.'.txt.gz'); $this->assertEquals($info, pageinfo()); @@ -153,6 +157,7 @@ class common_pageinfo_test extends DokuWikiTest { $info['namespace'] = 'wiki'; $info['exists'] = true; $info['lastmod'] = $rev; + $info['currentrev'] = $rev; $info['meta'] = p_get_metadata($ID); $info['filepath'] = $filename; @@ -197,6 +202,7 @@ class common_pageinfo_test extends DokuWikiTest { $info['filepath'] = $filename; $info['exists'] = true; $info['lastmod'] = $rev; + $info['currentrev'] = $rev; $info['meta'] = p_get_metadata($ID); // need $INFO set correctly for addLogEntry() global $INFO; @@ -226,6 +232,7 @@ class common_pageinfo_test extends DokuWikiTest { touch($filename,$now); $info['lastmod'] = $now; + $info['currentrev'] = $now; $info['meta']['last_change'] = false; $info['ip'] = null; $info['user'] = null; @@ -251,6 +258,7 @@ class common_pageinfo_test extends DokuWikiTest { $info['filepath'] = $filename; $info['exists'] = true; $info['lastmod'] = $rev; + $info['currentrev'] = $rev; $info['meta'] = p_get_metadata($ID); // setup a draft, make it more recent than the current page -- cgit v1.2.3 From 0b1e5003aae587074526c6b2ef19cb84670195e8 Mon Sep 17 00:00:00 2001 From: Anika Henke Date: Sun, 23 Feb 2014 21:20:39 +0000 Subject: made search form styles independent from sitetools ID --- lib/tpl/dokuwiki/css/design.less | 64 ++++++++++++++++++++-------------------- 1 file changed, 32 insertions(+), 32 deletions(-) diff --git a/lib/tpl/dokuwiki/css/design.less b/lib/tpl/dokuwiki/css/design.less index 42292de49..b18daaad7 100644 --- a/lib/tpl/dokuwiki/css/design.less +++ b/lib/tpl/dokuwiki/css/design.less @@ -186,50 +186,50 @@ text-align: right; form.search { - display: block; font-size: 0.875em; - position: relative; + } +} - input.edit { - width: 18em; - padding: .35em 22px .35em .1em; - } +[dir=rtl] #dokuwiki__sitetools { + text-align: left; +} - input.button { - background: transparent url(images/search.png) no-repeat 0 0; - border-width: 0; - width: 19px; - height: 14px; - text-indent: -99999px; - margin-left: -20px; - box-shadow: none; - padding: 0; - } +form.search { + display: block; + position: relative; + margin-bottom: 0.5em; + + input.edit { + width: 18em; + padding: .35em 22px .35em .1em; } - ul { - margin-top: 0.5em; + input.button { + background: transparent url(images/search.png) no-repeat 0 0; + border-width: 0; + width: 19px; + height: 14px; + text-indent: -99999px; + margin-left: -20px; + box-shadow: none; + padding: 0; } } -[dir=rtl] #dokuwiki__sitetools { - text-align: left; - - form.search { - input.edit { - padding: .35em .1em .35em 22px; - } +[dir=rtl] form.search { + input.edit { + padding: .35em .1em .35em 22px; + } - input.button { - background-position: 5px 0; - margin-left: 0; - margin-right: -20px; - position: relative; - } + input.button { + background-position: 5px 0; + margin-left: 0; + margin-right: -20px; + position: relative; } } -#IE7 #dokuwiki__sitetools form.search { +#IE7 form.search { min-height: 1px; z-index: 21; } -- cgit v1.2.3 From 1e94c175409c39f190b7da3a1941230f3758513c Mon Sep 17 00:00:00 2001 From: Anika Henke Date: Sun, 23 Feb 2014 21:38:28 +0000 Subject: made sidebar content styles re-usable outside of ID (added class: aside) --- lib/tpl/dokuwiki/css/content.less | 22 +++++++++++----------- lib/tpl/dokuwiki/css/design.less | 15 ++++++--------- lib/tpl/dokuwiki/main.php | 2 +- 3 files changed, 18 insertions(+), 21 deletions(-) diff --git a/lib/tpl/dokuwiki/css/content.less b/lib/tpl/dokuwiki/css/content.less index a5ffbf2be..a2e343a33 100644 --- a/lib/tpl/dokuwiki/css/content.less +++ b/lib/tpl/dokuwiki/css/content.less @@ -67,19 +67,19 @@ /*____________ lists ____________*/ -#dokuwiki__content ul li, -#dokuwiki__aside ul li { - color: @ini_text_alt; -} +.dokuwiki .page, +.dokuwiki .aside { + ul li { + color: @ini_text_alt; + } -#dokuwiki__content ol li, -#dokuwiki__aside ol li { - color: @ini_text_neu; -} + ol li { + color: @ini_text_neu; + } -#dokuwiki__content li .li, -#dokuwiki__aside li .li { - color: @ini_text; + li .li { + color: @ini_text; + } } /*____________ tables ____________*/ diff --git a/lib/tpl/dokuwiki/css/design.less b/lib/tpl/dokuwiki/css/design.less index b18daaad7..46b4a045b 100644 --- a/lib/tpl/dokuwiki/css/design.less +++ b/lib/tpl/dokuwiki/css/design.less @@ -278,13 +278,10 @@ form.search { /* sidebar ********************************************************************/ -#dokuwiki__aside { - - > .pad { - font-size: 0.875em; - overflow: hidden; - word-wrap: break-word; - } +.dokuwiki .aside { + font-size: 0.875em; + overflow: hidden; + word-wrap: break-word; /* make sidebar more condensed */ @@ -340,8 +337,8 @@ form.search { } } -[dir=rtl] #dokuwiki__aside ul, -[dir=rtl] #dokuwiki__aside ol { +[dir=rtl] .dokuwiki .aside ul, +[dir=rtl] .dokuwiki .aside ol { padding-right: .5em; } diff --git a/lib/tpl/dokuwiki/main.php b/lib/tpl/dokuwiki/main.php index 3bc46406a..44fef81eb 100644 --- a/lib/tpl/dokuwiki/main.php +++ b/lib/tpl/dokuwiki/main.php @@ -36,7 +36,7 @@ $showSidebar = $hasSidebar && ($ACT=='show'); -
+

-- cgit v1.2.3 From 4d51938bb0516f7cc033d8c93131f56af7525da0 Mon Sep 17 00:00:00 2001 From: Rene Date: Sun, 23 Feb 2014 22:56:02 +0100 Subject: translation update --- inc/lang/nl/lang.php | 1 + lib/plugins/extension/lang/nl/intro_install.txt | 1 + lib/plugins/extension/lang/nl/intro_plugins.txt | 1 + lib/plugins/extension/lang/nl/intro_search.txt | 1 + lib/plugins/extension/lang/nl/intro_templates.txt | 1 + lib/plugins/extension/lang/nl/lang.php | 33 +++++++++++++++++++++++ 6 files changed, 38 insertions(+) create mode 100644 lib/plugins/extension/lang/nl/intro_install.txt create mode 100644 lib/plugins/extension/lang/nl/intro_plugins.txt create mode 100644 lib/plugins/extension/lang/nl/intro_search.txt create mode 100644 lib/plugins/extension/lang/nl/intro_templates.txt create mode 100644 lib/plugins/extension/lang/nl/lang.php diff --git a/inc/lang/nl/lang.php b/inc/lang/nl/lang.php index e5e3e3c76..e22aa9fff 100644 --- a/inc/lang/nl/lang.php +++ b/inc/lang/nl/lang.php @@ -22,6 +22,7 @@ * @author Klap-in * @author Remon * @author gicalle + * @author Rene */ $lang['encoding'] = 'utf-8'; $lang['direction'] = 'ltr'; diff --git a/lib/plugins/extension/lang/nl/intro_install.txt b/lib/plugins/extension/lang/nl/intro_install.txt new file mode 100644 index 000000000..6a0b41055 --- /dev/null +++ b/lib/plugins/extension/lang/nl/intro_install.txt @@ -0,0 +1 @@ +Hier kunt u handmatig plugins en templates installeren door deze te uploaden of door een directe download URL op te geven. \ No newline at end of file diff --git a/lib/plugins/extension/lang/nl/intro_plugins.txt b/lib/plugins/extension/lang/nl/intro_plugins.txt new file mode 100644 index 000000000..0077aca30 --- /dev/null +++ b/lib/plugins/extension/lang/nl/intro_plugins.txt @@ -0,0 +1 @@ +Dit zijn de momenteel in uw Dokuwiki geïnstalleerde plugins. U kunt deze hier aan of uitschakelen danwel geheel deïnstalleren. Plugin updates zijn hier ook opgenomen, lees de pluin documentatie voordat u update. \ No newline at end of file diff --git a/lib/plugins/extension/lang/nl/intro_search.txt b/lib/plugins/extension/lang/nl/intro_search.txt new file mode 100644 index 000000000..8fc3900ad --- /dev/null +++ b/lib/plugins/extension/lang/nl/intro_search.txt @@ -0,0 +1 @@ +Deze tab verschaft u toegang tot alle plugins en templates vervaardigd door derden en bestemd voor Dokuwiki. Houdt er rekening meel dat indien u Plugins van derden installeerd deze een **veiligheids risico ** kunnen bevatten, geadviseerd wordt om eerst te lezen [[doku>security#plugin_security|plugin security]]. \ No newline at end of file diff --git a/lib/plugins/extension/lang/nl/intro_templates.txt b/lib/plugins/extension/lang/nl/intro_templates.txt new file mode 100644 index 000000000..5ef23dadf --- /dev/null +++ b/lib/plugins/extension/lang/nl/intro_templates.txt @@ -0,0 +1 @@ +Deze templates zijn thans in DokuWiki geïnstalleerd. U kent een template selecteren middels [[?do=admin&page=config|Configuration Manager]] . \ No newline at end of file diff --git a/lib/plugins/extension/lang/nl/lang.php b/lib/plugins/extension/lang/nl/lang.php new file mode 100644 index 000000000..1aad6a531 --- /dev/null +++ b/lib/plugins/extension/lang/nl/lang.php @@ -0,0 +1,33 @@ + + */ +$lang['menu'] = 'Extension Manager (Uitbreidings Beheerder)'; +$lang['tab_plugins'] = 'Geïnstalleerde Plugins'; +$lang['tab_templates'] = 'Geïnstalleerde Templates'; +$lang['tab_search'] = 'Zoek en installeer'; +$lang['tab_install'] = 'Handmatige installatie'; +$lang['notimplemented'] = 'Deze toepassing is nog niet geïnstalleerd'; +$lang['notinstalled'] = 'Deze uitbreiding is nog niet geïnstalleerd'; +$lang['alreadyenabled'] = 'Deze uitbreiding is reeds ingeschakeld'; +$lang['alreadydisabled'] = 'Deze uitbreiding is reeds uitgeschakeld'; +$lang['pluginlistsaveerror'] = 'Fout bij het opslaan van de plugin lijst'; +$lang['unknownauthor'] = 'Onbekende auteur'; +$lang['unknownversion'] = 'Onbekende versie'; +$lang['btn_info'] = 'Toon meer informatie'; +$lang['btn_update'] = 'Update'; +$lang['btn_uninstall'] = 'Deinstalleer'; +$lang['btn_enable'] = 'Schakel aan'; +$lang['btn_disable'] = 'Schakel uit'; +$lang['btn_install'] = 'Installeer'; +$lang['btn_reinstall'] = 'Her-installeer'; +$lang['js']['reallydel'] = 'Wilt u deze uitbreiding deinstalleren ?'; +$lang['search_for'] = 'Zoek Uitbreiding:'; +$lang['search'] = 'Zoek'; +$lang['extensionby'] = '%s by %s'; +$lang['screenshot'] = 'Schermafdruk bij %s'; +$lang['popularity'] = 'Populariteit:%s%%'; +$lang['homepage_link'] = 'Dokumenten'; -- cgit v1.2.3 From 370fac6347ec430cd72e724f45431a294b4f6662 Mon Sep 17 00:00:00 2001 From: Rene Date: Sun, 23 Feb 2014 23:15:57 +0100 Subject: translation update --- inc/lang/nl/lang.php | 1 + lib/plugins/extension/lang/nl/lang.php | 37 ++++++++++++++++++++++++++++++++++ 2 files changed, 38 insertions(+) create mode 100644 lib/plugins/extension/lang/nl/lang.php diff --git a/inc/lang/nl/lang.php b/inc/lang/nl/lang.php index e5e3e3c76..e22aa9fff 100644 --- a/inc/lang/nl/lang.php +++ b/inc/lang/nl/lang.php @@ -22,6 +22,7 @@ * @author Klap-in * @author Remon * @author gicalle + * @author Rene */ $lang['encoding'] = 'utf-8'; $lang['direction'] = 'ltr'; diff --git a/lib/plugins/extension/lang/nl/lang.php b/lib/plugins/extension/lang/nl/lang.php new file mode 100644 index 000000000..67b99c54d --- /dev/null +++ b/lib/plugins/extension/lang/nl/lang.php @@ -0,0 +1,37 @@ + + */ +$lang['bugs_features'] = 'Bugs'; +$lang['tags'] = 'Tags:'; +$lang['author_hint'] = 'Zoek uitbreidingen van deze auteur:'; +$lang['installed'] = 'Geinstalleerd:'; +$lang['downloadurl'] = 'Download URL:'; +$lang['repository'] = 'Repository ( centrale opslag)'; +$lang['unknown'] = 'onbekend'; +$lang['installed_version'] = 'Geïnstalleerde versie'; +$lang['install_date'] = 'Uw laatste update :'; +$lang['available_version'] = 'Beschikbare versie:'; +$lang['compatible'] = 'Compatible met :'; +$lang['depends'] = 'Afhankelijk van :'; +$lang['similar'] = 'Soortgelijk :'; +$lang['conflicts'] = 'Conflicteerd met :'; +$lang['donate'] = 'Vindt u dit leuk ?'; +$lang['donate_action'] = 'Koop een kop koffie voor de auteur!'; +$lang['repo_retry'] = 'Herhaal'; +$lang['provides'] = 'Zorgt voor:'; +$lang['status'] = 'Status:'; +$lang['status_installed'] = 'Geïnstalleerd'; +$lang['status_not_installed'] = 'niet geïnstalleerd '; +$lang['status_protected'] = 'beschermd'; +$lang['status_enabled'] = 'ingeschakeld'; +$lang['status_disabled'] = 'uitgeschakeld'; +$lang['status_unmodifiable'] = 'Niet wijzigbaar'; +$lang['status_plugin'] = 'plugin'; +$lang['status_template'] = 'template'; +$lang['status_bundled'] = 'Gebundeld'; +$lang['msg_enabled'] = 'Plugin %s ingeschakeld'; +$lang['msg_disabled'] = 'Plugin %s uitgeschakeld'; -- cgit v1.2.3 From 4292840ce374036541a92449670ed9ae83a3c64d Mon Sep 17 00:00:00 2001 From: Rene Date: Mon, 24 Feb 2014 07:30:58 +0100 Subject: translation update --- inc/lang/nl/lang.php | 1 + lib/plugins/extension/lang/nl/lang.php | 31 +++++++++++++++++++++++++++++++ 2 files changed, 32 insertions(+) create mode 100644 lib/plugins/extension/lang/nl/lang.php diff --git a/inc/lang/nl/lang.php b/inc/lang/nl/lang.php index e5e3e3c76..e22aa9fff 100644 --- a/inc/lang/nl/lang.php +++ b/inc/lang/nl/lang.php @@ -22,6 +22,7 @@ * @author Klap-in * @author Remon * @author gicalle + * @author Rene */ $lang['encoding'] = 'utf-8'; $lang['direction'] = 'ltr'; diff --git a/lib/plugins/extension/lang/nl/lang.php b/lib/plugins/extension/lang/nl/lang.php new file mode 100644 index 000000000..2d2b3d25b --- /dev/null +++ b/lib/plugins/extension/lang/nl/lang.php @@ -0,0 +1,31 @@ + + */ +$lang['msg_delete_success'] = 'Uitbreiding gedeinstalleerd'; +$lang['msg_template_install_success'] = 'Template %s werd succesvol geïnstalleerd'; +$lang['msg_template_update_success'] = 'Template %s werd succesvol ge-update'; +$lang['msg_plugin_install_success'] = 'Plugin %s werd succesvol geïnstalleerd'; +$lang['msg_plugin_update_success'] = 'Plugin %s werd succesvol ge-update'; +$lang['msg_upload_failed'] = 'Uploaden van het bestand is mislukt'; +$lang['missing_dependency'] = 'niet aanwezige of uitgeschakelde afhankelijkheid %s'; +$lang['security_issue'] = 'Veiligheids kwestie: %s'; +$lang['security_warning'] = 'Veiligheids Waarschuwing %s'; +$lang['update_available'] = 'Update: Nieuwe versie %s is beschikbaar.'; +$lang['wrong_folder'] = 'Plugin onjuist geïnstalleerd: Hernoem de plugin directory van "%s" naar"%s"'; +$lang['url_change'] = 'URL gewijzigd: Download URL is gewijzigd sinds de laatste download. Controleer of de nieuwe URL juist is voordat u de uitbreiding update.
Nieuw:%s
Vorig: %s'; +$lang['error_badurl'] = 'URLs moeten beginnen met http of https'; +$lang['error_dircreate'] = 'De tijdelijke map kon niet worden gemaakt om de download te ontvangen'; +$lang['error_download'] = 'Het is niet mogelijk het bestand te downloaden: %s'; +$lang['error_decompress'] = 'Onmogelijk om het gedownloade bestand uit te pakken. Dit is wellicht het gevolg van een onvolledige/onjuiste download, in welk geval u het nog eens moet proberen; of het compressie formaat is onbekend in welk geval u het bestand handmatig moet downloaden en installeren.'; +$lang['error_findfolder'] = 'Onmogelijk om de uitbreidings directory te vinden, u moet het zelf downloaden en installeren'; +$lang['error_copy'] = 'Er was een bestand kopieer fout tijdens het installeren van bestanden in directory %s: de schijf kan vol zijn of de bestand toegangs rechten kunnen onjuist zijn. Dit kan tot gevolg hebben dat de plugin slechts gedeeltelijk werd geïnstalleerd waardoor uw wiki installatie onstabiel is '; +$lang['noperms'] = 'Uitbreidings directory is niet schrijfbaar'; +$lang['notplperms'] = 'Template directory is niet schrijfbaar'; +$lang['nopluginperms'] = 'Plugin directory is niet schrijfbaar'; +$lang['git'] = 'De uitbreiding werd geïnstalleerd via git, u wilt deze hier wellicht niet aanpassen.'; +$lang['install_url'] = 'Installeer vanaf URL:'; +$lang['install_upload'] = 'Upload Uitbreiding:'; -- cgit v1.2.3 From 9ea5b41c02991d1562aeed7142b3080f6970f417 Mon Sep 17 00:00:00 2001 From: Anika Henke Date: Tue, 25 Feb 2014 00:51:23 +0000 Subject: removed language files for removed plugin plugin --- lib/plugins/plugin/lang/cs/admin_plugin.txt | 3 -- lib/plugins/plugin/lang/cs/lang.php | 66 --------------------------- lib/plugins/plugin/lang/el/admin_plugin.txt | 5 --- lib/plugins/plugin/lang/el/lang.php | 58 ------------------------ lib/plugins/plugin/lang/fr/admin_plugin.txt | 4 -- lib/plugins/plugin/lang/fr/lang.php | 69 ----------------------------- lib/plugins/plugin/lang/hu/admin_plugin.txt | 4 -- lib/plugins/plugin/lang/hu/lang.php | 59 ------------------------ lib/plugins/plugin/lang/id/lang.php | 32 ------------- lib/plugins/plugin/lang/pl/admin_plugin.txt | 5 --- lib/plugins/plugin/lang/pl/lang.php | 63 -------------------------- lib/plugins/plugin/lang/sk/admin_plugin.txt | 4 -- lib/plugins/plugin/lang/sk/lang.php | 55 ----------------------- lib/plugins/plugin/lang/sl/admin_plugin.txt | 3 -- lib/plugins/plugin/lang/sl/lang.php | 55 ----------------------- lib/plugins/plugin/lang/tr/admin_plugin.txt | 3 -- lib/plugins/plugin/lang/tr/lang.php | 55 ----------------------- 17 files changed, 543 deletions(-) delete mode 100644 lib/plugins/plugin/lang/cs/admin_plugin.txt delete mode 100644 lib/plugins/plugin/lang/cs/lang.php delete mode 100644 lib/plugins/plugin/lang/el/admin_plugin.txt delete mode 100644 lib/plugins/plugin/lang/el/lang.php delete mode 100644 lib/plugins/plugin/lang/fr/admin_plugin.txt delete mode 100644 lib/plugins/plugin/lang/fr/lang.php delete mode 100644 lib/plugins/plugin/lang/hu/admin_plugin.txt delete mode 100644 lib/plugins/plugin/lang/hu/lang.php delete mode 100644 lib/plugins/plugin/lang/id/lang.php delete mode 100644 lib/plugins/plugin/lang/pl/admin_plugin.txt delete mode 100644 lib/plugins/plugin/lang/pl/lang.php delete mode 100644 lib/plugins/plugin/lang/sk/admin_plugin.txt delete mode 100644 lib/plugins/plugin/lang/sk/lang.php delete mode 100644 lib/plugins/plugin/lang/sl/admin_plugin.txt delete mode 100644 lib/plugins/plugin/lang/sl/lang.php delete mode 100644 lib/plugins/plugin/lang/tr/admin_plugin.txt delete mode 100644 lib/plugins/plugin/lang/tr/lang.php diff --git a/lib/plugins/plugin/lang/cs/admin_plugin.txt b/lib/plugins/plugin/lang/cs/admin_plugin.txt deleted file mode 100644 index 6ebf1e78f..000000000 --- a/lib/plugins/plugin/lang/cs/admin_plugin.txt +++ /dev/null @@ -1,3 +0,0 @@ -====== Správa pluginů ====== - -Na této stránce lze spravovat pluginy DokuWiki [[doku>plugins|plugins]]. Aby bylo možné stahovat a instalovat pluginy, musí mít webový server přístup pro zápis do adresáře //plugin//. diff --git a/lib/plugins/plugin/lang/cs/lang.php b/lib/plugins/plugin/lang/cs/lang.php deleted file mode 100644 index 8917f8ef6..000000000 --- a/lib/plugins/plugin/lang/cs/lang.php +++ /dev/null @@ -1,66 +0,0 @@ - - * @author Zbynek Krivka - * @author Bohumir Zamecnik - * @author tomas@valenta.cz - * @author Marek Sacha - * @author Lefty - * @author Vojta Beran - * @author zbynek.krivka@seznam.cz - * @author Bohumir Zamecnik - * @author Jakub A. Těšínský (j@kub.cz) - * @author mkucera66@seznam.cz - * @author Zbyněk Křivka - * @author Gerrit Uitslag - * @author Petr Klíma - */ -$lang['menu'] = 'Správa pluginů'; -$lang['download'] = 'Stáhnout a instalovat plugin'; -$lang['manage'] = 'Seznam instalovaných pluginů'; -$lang['btn_info'] = 'info'; -$lang['btn_update'] = 'aktualizovat'; -$lang['btn_delete'] = 'smazat'; -$lang['btn_settings'] = 'nastavení'; -$lang['btn_download'] = 'Stáhnout'; -$lang['btn_enable'] = 'Uložit'; -$lang['url'] = 'URL'; -$lang['installed'] = 'Instalován:'; -$lang['lastupdate'] = 'Poslední aktualizace:'; -$lang['source'] = 'Zdroj:'; -$lang['unknown'] = 'neznámý'; -$lang['updating'] = 'Aktualizuji ...'; -$lang['updated'] = 'Modul %s úspěšně aktualizován'; -$lang['updates'] = 'Následující pluginy byly úspěšně aktualizovány'; -$lang['update_none'] = 'Žádné aktualizace nenalezeny.'; -$lang['deleting'] = 'Probíhá mazání ...'; -$lang['deleted'] = 'Plugin %s smazán.'; -$lang['downloading'] = 'Stahuji ...'; -$lang['downloaded'] = 'Plugin %s nainstalován'; -$lang['downloads'] = 'Následující pluginy byly úspěšně instalovány:'; -$lang['download_none'] = 'Žádné pluginy nebyly nenalezeny, nebo se vyskytla nějaká chyba při -stahování a instalaci.'; -$lang['plugin'] = 'Plugin:'; -$lang['components'] = 'Součásti'; -$lang['noinfo'] = 'Plugin nevrátil žádné informace. Může být poškozen nebo špatný.'; -$lang['name'] = 'Jméno:'; -$lang['date'] = 'Datum:'; -$lang['type'] = 'Typ:'; -$lang['desc'] = 'Popis:'; -$lang['author'] = 'Autor:'; -$lang['www'] = 'Web:'; -$lang['error'] = 'Nastala neznámá chyba.'; -$lang['error_download'] = 'Nelze stáhnout soubor s pluginem: %s'; -$lang['error_badurl'] = 'URL je zřejmě chybná - nelze z ní určit název souboru'; -$lang['error_dircreate'] = 'Nelze vytvořit dočasný adresář ke stažení dat'; -$lang['error_decompress'] = 'Správce pluginů nemůže rozbalit stažený soubor. Toto může být způsobeno chybou při stahování. Můžete se pokusit stahování opakovat. Chyba může být také v kompresním formátu souboru. V tom případě bude nutné stáhnout a nainstalovat plugin ručně.'; -$lang['error_copy'] = 'Došlo k chybě při instalaci pluginu %s. Je možné, že na disku není volné místo, nebo mohou být špatně nastavena přístupová práva. Pozor, mohlo dojít k částečné a tudíž chybné instalaci pluginu a tím může být ohrožena stabilita wiki.'; -$lang['error_delete'] = 'Došlo k chybě při pokusu o smazání pluginu %s. Nejspíše je chyba v nastavení přístupových práv k některým souborům či adresářům.'; -$lang['enabled'] = 'Plugin %s aktivován.'; -$lang['notenabled'] = 'Plugin %s nelze aktivovat, zkontrolujte práva k souborům.'; -$lang['disabled'] = 'Plugin %s deaktivován.'; -$lang['notdisabled'] = 'Plugin %s nelze deaktivovat, zkontrolujte práva k souborům.'; -$lang['packageinstalled'] = 'Balíček pluginů (%d plugin(ů): %s) úspěšně nainstalován.'; diff --git a/lib/plugins/plugin/lang/el/admin_plugin.txt b/lib/plugins/plugin/lang/el/admin_plugin.txt deleted file mode 100644 index 8b292935d..000000000 --- a/lib/plugins/plugin/lang/el/admin_plugin.txt +++ /dev/null @@ -1,5 +0,0 @@ -====== Διαχείριση Επεκτάσεων ====== - -Σε αυτή την σελίδα μπορείτε να διαχειριστείτε τις [[doku>plugins|επεκτάσεις]] του Dokuwiki σας. Για να μπορέσετε να εγκαταστήσετε νέες επεκτάσεις, ο αντίστοιχος φάκελος συστήματος θα πρέπει να είναι εγγράψιμος από τον χρήστη κάτω από τον οποίο εκτελείται η εφαρμογή του εξυπηρετητή σας. - - diff --git a/lib/plugins/plugin/lang/el/lang.php b/lib/plugins/plugin/lang/el/lang.php deleted file mode 100644 index f50e26c46..000000000 --- a/lib/plugins/plugin/lang/el/lang.php +++ /dev/null @@ -1,58 +0,0 @@ - - * @author Thanos Massias - * @author Αθανάσιος Νταής - * @author Konstantinos Koryllos - * @author George Petsagourakis - * @author Petros Vidalis - * @author Vasileios Karavasilis vasileioskaravasilis@gmail.com - */ -$lang['menu'] = 'Διαχείριση Επεκτάσεων'; -$lang['download'] = 'Κατεβάστε και εγκαταστήστε μια νέα επέκταση (plugin)'; -$lang['manage'] = 'Εγκατεστημένες επεκτάσεις'; -$lang['btn_info'] = 'πληροφορίες'; -$lang['btn_update'] = 'ενημέρωση'; -$lang['btn_delete'] = 'διαγραφή'; -$lang['btn_settings'] = 'ρυθμίσεις'; -$lang['btn_download'] = 'Μεταφόρτωση'; -$lang['btn_enable'] = 'Αποθήκευση'; -$lang['url'] = 'URL'; -$lang['installed'] = 'Εγκατεστημένη:'; -$lang['lastupdate'] = 'Τελευταία ενημέρωση:'; -$lang['source'] = 'Προέλευση:'; -$lang['unknown'] = 'άγνωστο'; -$lang['updating'] = 'Σε διαδικασία ενημέρωσης ...'; -$lang['updated'] = 'Η επέκταση %s ενημερώθηκε με επιτυχία'; -$lang['updates'] = 'Οι παρακάτω επεκτάσεις ενημερώθηκαν με επιτυχία:'; -$lang['update_none'] = 'Δεν βρέθηκαν ενημερώσεις.'; -$lang['deleting'] = 'Σε διαδικασία διαγραφής ...'; -$lang['deleted'] = 'Η επέκταση %s διαγράφηκε.'; -$lang['downloading'] = 'Σε διαδικασία μεταφόρτωσης ...'; -$lang['downloaded'] = 'Η επέκταση %s εγκαταστάθηκε με επιτυχία'; -$lang['downloads'] = 'Οι παρακάτω επεκτάσεις εγκαταστάθηκαν με επιτυχία:'; -$lang['download_none'] = 'Δεν βρέθηκαν επεκτάσεις ή εμφανίστηκε κάποιο πρόβλημα κατά την σχετική διαδικασία.'; -$lang['plugin'] = 'Επέκταση:'; -$lang['components'] = 'Συστατικά'; -$lang['noinfo'] = 'Αυτή η επέκταση δεν επέστρεψε κάποια πληροφορία - η επέκταση μπορεί να μην λειτουργεί κανονικά.'; -$lang['name'] = 'Όνομα:'; -$lang['date'] = 'Ημερομηνία:'; -$lang['type'] = 'Τύπος:'; -$lang['desc'] = 'Περιγραφή:'; -$lang['author'] = 'Συγγραφέας:'; -$lang['www'] = 'Διεύθυνση στο διαδίκτυο:'; -$lang['error'] = 'Εμφανίστηκε άγνωστο σφάλμα.'; -$lang['error_download'] = 'Δεν είναι δυνατή η μεταφόρτωση του αρχείου: %s'; -$lang['error_badurl'] = 'Το URL είναι μάλλον λανθασμένο - είναι αδύνατον να εξαχθεί το όνομα αρχείου από αυτό το URL'; -$lang['error_dircreate'] = 'Δεν είναι δυνατή η δημιουργία ενός προσωρινού φακέλου αποθήκευσης των μεταφορτώσεων'; -$lang['error_decompress'] = 'Δεν είναι δυνατή η αποσυμπίεση των μεταφορτώσεων. Αυτό μπορεί να οφείλεται σε μερική λήψη των μεταφορτώσεων, οπότε θα πρέπει να επαναλάβετε την διαδικασία ή το σύστημά σας δεν μπορεί να διαχειριστεί το συγκεκριμένο είδος συμπίεσης, οπότε θα πρέπει να εγκαταστήσετε την επέκταση χειροκίνητα.'; -$lang['error_copy'] = 'Εμφανίστηκε ένα σφάλμα αντιγραφής αρχείων κατά την διάρκεια εγκατάστασης της επέκτασης %s: ο δίσκος μπορεί να είναι γεμάτος ή να μην είναι σωστά ρυθμισμένα τα δικαιώματα πρόσβασης. Αυτό το γεγονός μπορεί να οδήγησε σε μερική εγκατάσταση της επέκτασης και άρα η DokuWiki εγκατάστασή σας να εμφανίσει προβλήματα σταθερότητας.'; -$lang['error_delete'] = 'Εμφανίστηκε ένα σφάλμα κατά την διαδικασία διαγραφής της επέκτασης %s. Η πιθανότερη αιτία είναι να μην είναι σωστά ρυθμισμένα τα δικαιώματα πρόσβασης.'; -$lang['enabled'] = 'Η επέκταση %s ενεργοποιήθηκε.'; -$lang['notenabled'] = 'Η επέκταση %s δεν μπορεί να ενεργοποιηθεί. Ελέγξτε τα δικαιώματα πρόσβασης.'; -$lang['disabled'] = 'Η επέκταση %s απενεργοποιήθηκε.'; -$lang['notdisabled'] = 'Η επέκταση %s δεν μπορεί να απενεργοποιηθεί. Ελέγξτε τα δικαιώματα πρόσβασης.'; -$lang['packageinstalled'] = 'Το πακέτο της επέκτασης (%d επέκταση(εις): %s) εγκαστήθηκε επιτυχημένα.'; diff --git a/lib/plugins/plugin/lang/fr/admin_plugin.txt b/lib/plugins/plugin/lang/fr/admin_plugin.txt deleted file mode 100644 index b7beba25a..000000000 --- a/lib/plugins/plugin/lang/fr/admin_plugin.txt +++ /dev/null @@ -1,4 +0,0 @@ -====== Gestion des extensions ====== - -Cette page vous permet de gérer tout ce qui a trait aux [[doku>fr:plugins|extensions]] de DokuWiki. Pour pouvoir télécharger et installer un module, le répertoire « ''plugin'' » doit être accessible en écriture pour le serveur web. - diff --git a/lib/plugins/plugin/lang/fr/lang.php b/lib/plugins/plugin/lang/fr/lang.php deleted file mode 100644 index 0592f3c7d..000000000 --- a/lib/plugins/plugin/lang/fr/lang.php +++ /dev/null @@ -1,69 +0,0 @@ - - * @author Delassaux Julien - * @author Maurice A. LeBlanc - * @author stephane.gully@gmail.com - * @author Guillaume Turri - * @author Erik Pedersen - * @author olivier duperray - * @author Vincent Feltz - * @author Philippe Bajoit - * @author Florian Gaub - * @author Samuel Dorsaz samuel.dorsaz@novelion.net - * @author Johan Guilbaud - * @author schplurtz@laposte.net - * @author skimpax@gmail.com - * @author Yannick Aure - * @author Olivier DUVAL - * @author Anael Mobilia - * @author Bruno Veilleux - */ -$lang['menu'] = 'Gestion des extensions'; -$lang['download'] = 'Télécharger et installer une nouvelle extension'; -$lang['manage'] = 'Extensions installées'; -$lang['btn_info'] = 'Info'; -$lang['btn_update'] = 'Mettre à jour'; -$lang['btn_delete'] = 'Supprimer'; -$lang['btn_settings'] = 'Paramètres'; -$lang['btn_download'] = 'Télécharger'; -$lang['btn_enable'] = 'Enregistrer'; -$lang['url'] = 'URL'; -$lang['installed'] = 'Installé :'; -$lang['lastupdate'] = 'Dernière mise à jour :'; -$lang['source'] = 'Source :'; -$lang['unknown'] = 'inconnu'; -$lang['updating'] = 'Mise à jour…'; -$lang['updated'] = 'Extension %s mise à jour avec succès'; -$lang['updates'] = 'Les extensions suivantes ont été mises à jour avec succès'; -$lang['update_none'] = 'Aucune mise à jour n\'a été trouvée.'; -$lang['deleting'] = 'Suppression…'; -$lang['deleted'] = 'Extension %s supprimée.'; -$lang['downloading'] = 'Téléchargement…'; -$lang['downloaded'] = 'Extension %s installée avec succès'; -$lang['downloads'] = 'Les extensions suivantes ont été installées avec succès :'; -$lang['download_none'] = 'Aucune extension n\'a été trouvée, ou un problème inconnu est survenu durant le téléchargement et l\'installation.'; -$lang['plugin'] = 'Extension :'; -$lang['components'] = 'Composants'; -$lang['noinfo'] = 'Cette extension n\'a transmis aucune information, elle pourrait être invalide.'; -$lang['name'] = 'Nom :'; -$lang['date'] = 'Date :'; -$lang['type'] = 'Type :'; -$lang['desc'] = 'Description :'; -$lang['author'] = 'Auteur :'; -$lang['www'] = 'Site web :'; -$lang['error'] = 'Une erreur inconnue est survenue.'; -$lang['error_download'] = 'Impossible de télécharger le fichier de l\'extension : %s'; -$lang['error_badurl'] = 'URL suspecte : impossible de déterminer le nom du fichier à partir de l\'URL'; -$lang['error_dircreate'] = 'Impossible de créer le répertoire temporaire pour effectuer le téléchargement'; -$lang['error_decompress'] = 'Le gestionnaire d\'extensions a été incapable de décompresser le fichier téléchargé. Ceci peut être le résultat d\'un mauvais téléchargement, auquel cas vous devriez réessayer ; ou bien le format de compression est inconnu, auquel cas vous devez télécharger et installer l\'extension manuellement.'; -$lang['error_copy'] = 'Une erreur de copie est survenue lors de l\'installation des fichiers de l\'extension %s : le disque est peut-être plein ou les autorisations d\'accès sont incorrects. Il a pu en résulter une installation partielle de l\'extension et laisser votre installation du wiki instable.'; -$lang['error_delete'] = 'Une erreur est survenue lors de la suppression de l\'extension %s. La raison la plus probable est l\'insuffisance des autorisations sur les fichiers ou les répertoires.'; -$lang['enabled'] = 'Extension %s activée.'; -$lang['notenabled'] = 'L\'extension %s n\'a pas pu être activée, vérifiez les autorisations des fichiers.'; -$lang['disabled'] = 'Extension %s désactivée.'; -$lang['notdisabled'] = 'L\'extension %s n\'a pas pu être désactivée, vérifiez les autorisations des fichiers.'; -$lang['packageinstalled'] = 'Ensemble d\'extensions (%d extension(s): %s) installé avec succès.'; diff --git a/lib/plugins/plugin/lang/hu/admin_plugin.txt b/lib/plugins/plugin/lang/hu/admin_plugin.txt deleted file mode 100644 index cf4a3b316..000000000 --- a/lib/plugins/plugin/lang/hu/admin_plugin.txt +++ /dev/null @@ -1,4 +0,0 @@ -====== Bővítménykezelő ====== - -Ezen az oldalon a Dokuwiki [[doku>plugins|bővítményeivel]] kapcsolatos teendőket láthatod el. A webkiszolgálónak tudnia kell írni a //plugin// könyvtárba az új bővítmények letöltéséhez és telepítéséhez. - diff --git a/lib/plugins/plugin/lang/hu/lang.php b/lib/plugins/plugin/lang/hu/lang.php deleted file mode 100644 index 7fb237a32..000000000 --- a/lib/plugins/plugin/lang/hu/lang.php +++ /dev/null @@ -1,59 +0,0 @@ - - * @author Siaynoq Mage - * @author schilling.janos@gmail.com - * @author Szabó Dávid - * @author Sándor TIHANYI - * @author David Szabo - * @author Marton Sebok - * @author Marina Vladi - */ -$lang['menu'] = 'Bővítménykezelő'; -$lang['download'] = 'Új bővítmény letöltése és telepítése'; -$lang['manage'] = 'Telepített bővítmények'; -$lang['btn_info'] = 'infó'; -$lang['btn_update'] = 'frissítés'; -$lang['btn_delete'] = 'törlés'; -$lang['btn_settings'] = 'beállítások'; -$lang['btn_download'] = 'Letöltés'; -$lang['btn_enable'] = 'Mentés'; -$lang['url'] = 'URL-cím'; -$lang['installed'] = 'Telepítve:'; -$lang['lastupdate'] = 'Utolsó frissítés:'; -$lang['source'] = 'Forrás:'; -$lang['unknown'] = 'ismeretlen'; -$lang['updating'] = 'Frissítés...'; -$lang['updated'] = 'A(z) %s bővítmény frissítése sikeres.'; -$lang['updates'] = 'A következő bővítmények frissítése sikeres:'; -$lang['update_none'] = 'Nem találtam újabb verziót.'; -$lang['deleting'] = 'Törlés...'; -$lang['deleted'] = 'A(z) %s bővítményt eltávolítva.'; -$lang['downloading'] = 'Letöltés...'; -$lang['downloaded'] = 'A(z) %s bővítmény telepítése sikeres.'; -$lang['downloads'] = 'A következő bővítmények telepítése sikeres.'; -$lang['download_none'] = 'Nem találtam bővítményt vagy ismeretlen hiba történt a letöltés/telepítés közben.'; -$lang['plugin'] = 'Bővítmény:'; -$lang['components'] = 'Részek'; -$lang['noinfo'] = 'Ez a bővítmény nem tartalmaz információt, lehet, hogy hibás.'; -$lang['name'] = 'Név:'; -$lang['date'] = 'Dátum:'; -$lang['type'] = 'Típus:'; -$lang['desc'] = 'Leírás:'; -$lang['author'] = 'Szerző:'; -$lang['www'] = 'Web:'; -$lang['error'] = 'Ismeretlen hiba lépett fel.'; -$lang['error_download'] = 'Nem tudom letölteni a fájlt a bővítményhez: %s'; -$lang['error_badurl'] = 'Feltehetően rossz URL - nem tudom meghatározni a fájlnevet az URL-ből.'; -$lang['error_dircreate'] = 'Nem tudom létrehozni az átmeneti könyvtárat a letöltéshez.'; -$lang['error_decompress'] = 'A Bővítménykezelő nem tudta a letöltött állományt kicsomagolni. Ennek oka lehet hibás letöltés, ebben az esetben újra letöltéssel próbálkozhatsz, esetleg a tömörítés módja ismeretlen, ebben az esetben kézzel kell letölteni és telepíteni a bővítményt.'; -$lang['error_copy'] = 'Fájl másolási hiba történt a(z) %s bővítmény telepítése közben: vagy a lemezterület fogyott el, vagy az állomány hozzáférési jogosultságai nem megfelelőek. Emiatt előfordulhat, hogy a bővítményt csak részben sikerült telepíteni és a wiki összeomolhat.'; -$lang['error_delete'] = 'Hiba történt a(z) %s bővítmény eltávolítása közben. A legvalószínűbb ok, hogy a könyvtár vagy állomány hozzáférési jogosultságai nem megfelelőek.'; -$lang['enabled'] = 'A(z) %s bővítmény bekapcsolva.'; -$lang['notenabled'] = 'A(z) %s bővítmény engedélyezése nem sikerült. Ellenőrizze a fájlhozzáférési jogosultságokat.'; -$lang['disabled'] = 'A(z) %s bővítmény kikapcsolva.'; -$lang['notdisabled'] = 'A(z) %s bővítmény kikapcsolása nem sikerült. Ellenőrizze a fájlhozzáférési jogosultságokat.'; -$lang['packageinstalled'] = 'A bővítménycsomag(ok) feltelepült(ek): %d plugin(s): %s'; diff --git a/lib/plugins/plugin/lang/id/lang.php b/lib/plugins/plugin/lang/id/lang.php deleted file mode 100644 index 2653b075e..000000000 --- a/lib/plugins/plugin/lang/id/lang.php +++ /dev/null @@ -1,32 +0,0 @@ - - * @author Yustinus Waruwu - */ -$lang['btn_info'] = 'Info'; -$lang['btn_update'] = 'Baharui'; -$lang['btn_delete'] = 'Hapus'; -$lang['btn_settings'] = 'Pengaturan'; -$lang['btn_download'] = 'Unduh'; -$lang['btn_enable'] = 'Simpan'; -$lang['url'] = 'URL'; -$lang['installed'] = 'Instal'; -$lang['lastupdate'] = 'Pembaharuan terakhir:'; -$lang['source'] = 'Sumber:'; -$lang['unknown'] = 'Tidak kenal'; -$lang['updating'] = 'Terbaharui ...'; -$lang['update_none'] = 'Tidak ditemukan pembaharuan'; -$lang['deleting'] = 'Terhapus ...'; -$lang['deleted'] = 'Hapus Plugin %s.'; -$lang['downloading'] = 'Unduh ...'; -$lang['plugin'] = 'Plugin:'; -$lang['components'] = 'Komponen'; -$lang['name'] = 'Nama:'; -$lang['date'] = 'Tanggal:'; -$lang['type'] = 'Tipe:'; -$lang['desc'] = 'Penjelasan:'; -$lang['author'] = 'Autor:'; -$lang['www'] = 'Web:'; diff --git a/lib/plugins/plugin/lang/pl/admin_plugin.txt b/lib/plugins/plugin/lang/pl/admin_plugin.txt deleted file mode 100644 index f01048198..000000000 --- a/lib/plugins/plugin/lang/pl/admin_plugin.txt +++ /dev/null @@ -1,5 +0,0 @@ -====== Menadżer wtyczek ====== - -Na tej stronie możesz zarządzać wszystkim co jest związane z [[doku>plugins|wtyczkami]] Dokuwiki. Aby móc ściągnąć i zainstalować wtyczkę, serwer WWW musi mieć prawo do zapisu w katalogu ''plugins''. - - diff --git a/lib/plugins/plugin/lang/pl/lang.php b/lib/plugins/plugin/lang/pl/lang.php deleted file mode 100644 index eae91f33e..000000000 --- a/lib/plugins/plugin/lang/pl/lang.php +++ /dev/null @@ -1,63 +0,0 @@ - - * @author Grzegorz Żur - * @author Mariusz Kujawski - * @author Maciej Kurczewski - * @author Sławomir Boczek - * @author sleshek@wp.pl - * @author Leszek Stachowski - * @author maros - * @author Grzegorz Widła - * @author Łukasz Chmaj - * @author Begina Felicysym - * @author Aoi Karasu - */ -$lang['menu'] = 'Menadżer wtyczek'; -$lang['download'] = 'Ściągnij i zainstaluj nową wtyczkę'; -$lang['manage'] = 'Zainstalowane Wtyczki'; -$lang['btn_info'] = 'Informacje'; -$lang['btn_update'] = 'Aktualizuj'; -$lang['btn_delete'] = 'Usuń'; -$lang['btn_settings'] = 'Ustawienia'; -$lang['btn_download'] = 'Pobierz'; -$lang['btn_enable'] = 'Zapisz'; -$lang['url'] = 'Adres URL'; -$lang['installed'] = 'Instalacja:'; -$lang['lastupdate'] = 'Ostatnio zaktualizowana:'; -$lang['source'] = 'Źródło:'; -$lang['unknown'] = 'nieznane'; -$lang['updating'] = 'Aktualizuję...'; -$lang['updated'] = 'Aktualizacja wtyczki %s pomyślnie ściągnięta'; -$lang['updates'] = 'Aktualizacje następujących wtyczek zostały pomyślnie ściągnięte'; -$lang['update_none'] = 'Nie znaleziono aktualizacji.'; -$lang['deleting'] = 'Usuwam...'; -$lang['deleted'] = 'Wtyczka %s usunięta.'; -$lang['downloading'] = 'Pobieram...'; -$lang['downloaded'] = 'Wtyczka %s pomyślnie zainstalowana'; -$lang['downloads'] = 'Następujące wtyczki zostały pomyślnie zainstalowane:'; -$lang['download_none'] = 'Nie znaleziono wtyczek lub wystąpił nieznany problem podczas ściągania i instalacji.'; -$lang['plugin'] = 'Wtyczka:'; -$lang['components'] = 'Składniki'; -$lang['noinfo'] = 'Ta wtyczka nie zwróciła żadnych informacji, może być niepoprawna.'; -$lang['name'] = 'Nazwa:'; -$lang['date'] = 'Data:'; -$lang['type'] = 'Typ:'; -$lang['desc'] = 'Opis:'; -$lang['author'] = 'Autor:'; -$lang['www'] = 'WWW:'; -$lang['error'] = 'Wystąpił nieznany błąd.'; -$lang['error_download'] = 'Nie powiodło się ściągnięcie pliku wtyczki: %s'; -$lang['error_badurl'] = 'Prawdopodobnie zły url - nie da się ustalić nazwy pliku na podstawie urla'; -$lang['error_dircreate'] = 'Nie powiodło się stworzenie tymczasowego katalogu na pobrane pliki'; -$lang['error_decompress'] = 'Menadżer wtyczek nie był w stanie rozpakować ściągniętego pliku. Może to być spowodowane przez nieudany transfer (w takim przypadku powinieneś spróbować ponownie) lub nieznany format kompresji (w takim przypadku będziesz musiał ściągnąć i zainstalować wtyczkę ręcznie).'; -$lang['error_copy'] = 'Wystąpił błąd podczas kopiowania pliku w trakcie instalacji wtyczki %s: być może dysk jest pełny lub prawa dostępu są niepoprawne. Efektem może być częściowo zainstalowana wtyczka co może spowodować niestabilność Twojej instalacji wiki.'; -$lang['error_delete'] = 'Wystąpił błąd przy próbie usunięcia wtyczki %s. Prawdopodobną przyczyną są niewystarczające uprawnienia do katalogu.'; -$lang['enabled'] = 'Wtyczka %s włączona.'; -$lang['notenabled'] = 'Nie udało się uruchomić wtyczki %s, sprawdź uprawnienia dostępu do plików.'; -$lang['disabled'] = 'Wtyczka %s wyłączona.'; -$lang['notdisabled'] = 'Nie udało się wyłączyć wtyczki %s, sprawdź uprawnienia dostępu do plików.'; -$lang['packageinstalled'] = 'Pakiet wtyczek (%d wtyczki: %s) zainstalowany pomyślnie.'; diff --git a/lib/plugins/plugin/lang/sk/admin_plugin.txt b/lib/plugins/plugin/lang/sk/admin_plugin.txt deleted file mode 100644 index ad3ae7f58..000000000 --- a/lib/plugins/plugin/lang/sk/admin_plugin.txt +++ /dev/null @@ -1,4 +0,0 @@ -====== Správa pluginov ====== - -Na tejto stránke je možné spravovať [[doku>plugins|pluginy]] Dokuwiki. Aby bolo možné sťahovať a inštalovať pluginy, musí mať webový server prístup pre zápis do adresára //plugin//. - diff --git a/lib/plugins/plugin/lang/sk/lang.php b/lib/plugins/plugin/lang/sk/lang.php deleted file mode 100644 index 35c07cf80..000000000 --- a/lib/plugins/plugin/lang/sk/lang.php +++ /dev/null @@ -1,55 +0,0 @@ - - * @author Michal Mesko - * @author exusik@gmail.com - * @author Martin Michalek - */ -$lang['menu'] = 'Správa pluginov'; -$lang['download'] = 'Stiahnuť a nainštalovať plugin'; -$lang['manage'] = 'Nainštalované pluginy'; -$lang['btn_info'] = 'info'; -$lang['btn_update'] = 'aktualizovať'; -$lang['btn_delete'] = 'zmazať'; -$lang['btn_settings'] = 'nastavenia'; -$lang['btn_download'] = 'Stiahnuť'; -$lang['btn_enable'] = 'Uložiť'; -$lang['url'] = 'URL'; -$lang['installed'] = 'Nainštalovaný:'; -$lang['lastupdate'] = 'Aktualizovaný:'; -$lang['source'] = 'Zdroj:'; -$lang['unknown'] = 'neznámy'; -$lang['updating'] = 'Aktualizuje sa ...'; -$lang['updated'] = 'Plugin %s bol úspešne aktualizovaný'; -$lang['updates'] = 'Nasledujúce pluginy bol úspešne aktualizované:'; -$lang['update_none'] = 'Neboli nájdené žiadne aktualizácie.'; -$lang['deleting'] = 'Vymazáva sa ...'; -$lang['deleted'] = 'Plugin %s bol zmazaný.'; -$lang['downloading'] = 'Sťahuje sa ...'; -$lang['downloaded'] = 'Plugin %s bol úspešne stiahnutý'; -$lang['downloads'] = 'Nasledujúce pluginy bol úspešne stiahnuté:'; -$lang['download_none'] = 'Neboli nájdené žiadne pluginy alebo nastal neznámy problém počas sťahovania a inštalácie pluginov.'; -$lang['plugin'] = 'Plugin:'; -$lang['components'] = 'Súčasti'; -$lang['noinfo'] = 'Tento plugin neobsahuje žiadne informácie, je možné, že je chybný.'; -$lang['name'] = 'názov:'; -$lang['date'] = 'Dátum:'; -$lang['type'] = 'Typ:'; -$lang['desc'] = 'Popis:'; -$lang['author'] = 'Autor:'; -$lang['www'] = 'Web:'; -$lang['error'] = 'Nastala neznáma chyba.'; -$lang['error_download'] = 'Nie je možné stiahnuť súbor pluginu: %s'; -$lang['error_badurl'] = 'Pravdepodobne zlá url adresa - nie je možné z nej určiť meno súboru'; -$lang['error_dircreate'] = 'Nie je možné vytvoriť dočasný adresár pre uloženie sťahovaného súboru'; -$lang['error_decompress'] = 'Správca pluginov nedokáže dekomprimovať stiahnutý súbor. Môže to byť dôsledok zlého stiahnutia, v tom prípade to skúste znovu, alebo môže ísť o neznámy formát súboru, v tom prípade musíte stiahnuť a nainštalovať plugin manuálne.'; -$lang['error_copy'] = 'Nastala chyba kopírovania súboru počas pokusu inštalovať súbory pluginu%s: disk môže byť plný alebo prístupové práva k súboru môžu byť nesprávne. Toto môže mať za následok čiastočne nainštalovanie pluginu a nestabilitu vašej DokuWiki.'; -$lang['error_delete'] = 'Nastala chyba počas pokusu o zmazanie pluginu %s. Najpravdepodobnejším dôvodom môžu byť nedostatočné prístupové práva pre súbor alebo adresár'; -$lang['enabled'] = 'Plugin %s aktivovaný.'; -$lang['notenabled'] = 'Plugin %s nemôže byť aktivovaný, skontrolujte prístupové práva.'; -$lang['disabled'] = 'Plugin %s deaktivovaný.'; -$lang['notdisabled'] = 'Plugin %s nemôže byť deaktivovaný, skontrolujte prístupové práva.'; -$lang['packageinstalled'] = 'Plugin package (%d plugin(s): %s) úspešne inštalovaný.'; diff --git a/lib/plugins/plugin/lang/sl/admin_plugin.txt b/lib/plugins/plugin/lang/sl/admin_plugin.txt deleted file mode 100644 index 5fd02e1ba..000000000 --- a/lib/plugins/plugin/lang/sl/admin_plugin.txt +++ /dev/null @@ -1,3 +0,0 @@ -====== Upravljanje vstavkov ====== - -Na tej strani je mogoče spreminjati in prilagajati nastavitve DokuWiki [[doku>plugins|vstavkov]]. Za prejemanje in nameščanje vstavkov v ustrezne mape, morajo imeti te določena ustrezna dovoljenja za pisanje spletnega strežnika. diff --git a/lib/plugins/plugin/lang/sl/lang.php b/lib/plugins/plugin/lang/sl/lang.php deleted file mode 100644 index e205c57f5..000000000 --- a/lib/plugins/plugin/lang/sl/lang.php +++ /dev/null @@ -1,55 +0,0 @@ - - * @author Boštjan Seničar - * @author Gregor Skumavc (grega.skumavc@gmail.com) - * @author Matej Urbančič (mateju@svn.gnome.org) - */ -$lang['menu'] = 'Upravljanje vstavkov'; -$lang['download'] = 'Prejmi in namesti nov vstavek'; -$lang['manage'] = 'Nameščeni vstavki'; -$lang['btn_info'] = 'Podrobnosti'; -$lang['btn_update'] = 'Posodobi'; -$lang['btn_delete'] = 'Izbriši'; -$lang['btn_settings'] = 'Nastavitve'; -$lang['btn_download'] = 'Prejmi'; -$lang['btn_enable'] = 'Shrani'; -$lang['url'] = 'URL'; -$lang['installed'] = 'Nameščeno:'; -$lang['lastupdate'] = 'Nazadnje posodobljeno:'; -$lang['source'] = 'Vir:'; -$lang['unknown'] = 'neznano'; -$lang['updating'] = 'Posodabljanje ...'; -$lang['updated'] = 'Vstavek %s je uspešno posodobljen'; -$lang['updates'] = 'Navedeni vstavki so uspešno posodobljeni'; -$lang['update_none'] = 'Posodobitev ni mogoče najti.'; -$lang['deleting'] = 'Brisanje ...'; -$lang['deleted'] = 'Vstavek %s je izbrisan.'; -$lang['downloading'] = 'Prejemanje ...'; -$lang['downloaded'] = 'Vstavek %s je uspešno nameščen'; -$lang['downloads'] = 'Navedeni vstavki so uspešno nameščeni:'; -$lang['download_none'] = 'Vstavkov ni mogoče najti ali pa je prišlo do napake med prejemanjem in nameščanjem.'; -$lang['plugin'] = 'Vstavek:'; -$lang['components'] = 'Sestavni deli'; -$lang['noinfo'] = 'Vstavek nima vpisanih podrobnih podatkov, kar pomeni, da je morda neveljaven.'; -$lang['name'] = 'Ime:'; -$lang['date'] = 'Datum:'; -$lang['type'] = 'Vrsta:'; -$lang['desc'] = 'Opis:'; -$lang['author'] = 'Avtor:'; -$lang['www'] = 'Spletna stran:'; -$lang['error'] = 'Prišlo je do neznane napake.'; -$lang['error_download'] = 'Ni mogoče prejeti datoteke vstavka: %s'; -$lang['error_badurl'] = 'Napaka naslova URL - ni mogoče določiti imena datoteke iz naslova URL'; -$lang['error_dircreate'] = 'Ni mogoče ustvariti začasne mape za prejemanje'; -$lang['error_decompress'] = 'Z upravljalnikom vstavkov ni mogoče razširiti prejetega arhiva vstavka. Najverjetneje je prišlo do napake med prejemanjem datoteke ali pa zapis arhiva ni znan. Poskusite znova ali pa napako odpravite z ročnim nameščanjem vstavka.'; -$lang['error_copy'] = 'Prišlo je do napake med nameščanjem datotek vstavka %s: najverjetneje so težave s prostorom za namestitev ali pa ni ustreznih dovoljenj za nameščanje. Zaradi nepopolne namestitve lahko nastopijo težave v delovanju sistema Wiki.'; -$lang['error_delete'] = 'Prišlo je do napake med brisanjem vstavka %s: najverjetneje ni ustreznih dovoljenj za dostop do datoteke ali mape'; -$lang['enabled'] = 'Vstavek %s je omogočen.'; -$lang['notenabled'] = 'Vstavka %s ni mogoče omogočiti zaradi neustreznih dovoljen.'; -$lang['disabled'] = 'Vstavek %s je onemogočen.'; -$lang['notdisabled'] = 'Vstavka %s ni mogoče onemogočiti zaradi neustreznih dovoljen.'; -$lang['packageinstalled'] = 'Paket vstavka (%d vstavkov: %s) je uspešno nameščen.'; diff --git a/lib/plugins/plugin/lang/tr/admin_plugin.txt b/lib/plugins/plugin/lang/tr/admin_plugin.txt deleted file mode 100644 index 956d701f6..000000000 --- a/lib/plugins/plugin/lang/tr/admin_plugin.txt +++ /dev/null @@ -1,3 +0,0 @@ -====== Eklenti Yönetimi ====== - -Bu sayfada DokuWiki [[doku>plugins|eklentileri]] ile ilgili herşeyi düzenleyebilirsiniz. Eklenti kurup indirmek için, eklenti dizininin yazılabilir olması gerekmektedir. diff --git a/lib/plugins/plugin/lang/tr/lang.php b/lib/plugins/plugin/lang/tr/lang.php deleted file mode 100644 index a4feea8cd..000000000 --- a/lib/plugins/plugin/lang/tr/lang.php +++ /dev/null @@ -1,55 +0,0 @@ - - * @author Cihan Kahveci - * @author Yavuz Selim - * @author Caleb Maclennan - * @author farukerdemoncel@gmail.com - */ -$lang['menu'] = 'Eklenti Yönetimi'; -$lang['download'] = 'Yeni bir eklenti indirip kur'; -$lang['manage'] = 'Kurulmuş Eklentiler'; -$lang['btn_info'] = 'bilgi'; -$lang['btn_update'] = 'güncelle'; -$lang['btn_delete'] = 'sil'; -$lang['btn_settings'] = 'Ayarlar'; -$lang['btn_download'] = 'İndir'; -$lang['btn_enable'] = 'Kaydet'; -$lang['url'] = 'Web Adresi'; -$lang['installed'] = 'Kuruldu:'; -$lang['lastupdate'] = 'Son güncelleştirme:'; -$lang['source'] = 'Kaynak:'; -$lang['unknown'] = 'bilinmiyor'; -$lang['updating'] = 'Güncelleştiriyor ...'; -$lang['updated'] = '%s eklentisi başarıyla güncellendi'; -$lang['updates'] = 'Şu eklentiler başarıyla güncellendi'; -$lang['update_none'] = 'Yeni bir güncelleme bulunamadı.'; -$lang['deleting'] = 'Siliniyor ...'; -$lang['deleted'] = '%s eklentisi silindi.'; -$lang['downloading'] = 'İndiriyor ...'; -$lang['downloaded'] = '%s eklentisi başarıyla kuruldu'; -$lang['downloads'] = 'Şu eklentiler başarıyla kuruldu:'; -$lang['download_none'] = 'Eklenti bulunamadı veya indirirken/kurarken bilinmeyen bir hata oluştu.'; -$lang['plugin'] = 'Eklenti:'; -$lang['components'] = 'Parçalar'; -$lang['noinfo'] = 'Bu eklentinin bilgileri alınamadı, geçerli bir eklenti olmayabilir.'; -$lang['name'] = 'Ad:'; -$lang['date'] = 'Tarih:'; -$lang['type'] = 'Tür:'; -$lang['desc'] = 'Açıklama:'; -$lang['author'] = 'Yazar:'; -$lang['www'] = 'Web Adresi:'; -$lang['error'] = 'Bilinmeyen bir hata oluştu.'; -$lang['error_download'] = 'Şu eklenti indirilemedi: %s'; -$lang['error_badurl'] = 'Yanlış adres olabilir - verilen adresten dosya adı alınamadı'; -$lang['error_dircreate'] = 'İndirmek için geçici klasör oluşturulamadı'; -$lang['error_decompress'] = 'Eklenti yöneticisi indirilen sıkıştırılmış dosyayı açamadı. Bu yanlış indirmeden kaynaklanabilir (bu durumda tekrar denemelisiniz). Ya da indirilen dosyanın sıkıştırma biçimi bilinmemektedir (bu durumda eklentiyi indirerek kendiniz kurmalısınız).'; -$lang['error_copy'] = '%s eklentisi dosyalarını kurmaya çalışırken kopyalama hatası ortaya çıktı. Sürücü dolu olabilir veya yazma yetkisi bulunmuyor olabilir. Bunun sebebi tam kurulmamış bir eklentinin wiki kurulumunu bozması olabilir.'; -$lang['error_delete'] = '%s eklentisini silerken bir hata oluştu. Bu hata yetersiz dosya/klasör erişim yetkisinden kaynaklanabilir.'; -$lang['enabled'] = '%s eklentisi etkinleştirildi.'; -$lang['notenabled'] = '%s eklentisi etkinleştirilemedi, dosya yetkilerini kontrol edin.'; -$lang['disabled'] = '%s eklentisi devre dışı bırakıldı.'; -$lang['notdisabled'] = '%s eklentisi devre dışı bırakılamadı, dosya yetkilerini kontrol edin.'; -- cgit v1.2.3 From ae6c41cb69b692db7b450c68aab26ffe8f041ad4 Mon Sep 17 00:00:00 2001 From: Anika Henke Date: Tue, 25 Feb 2014 00:57:51 +0000 Subject: updated .gitignore file --- .gitignore | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index 64816ba38..bb39ba7cf 100644 --- a/.gitignore +++ b/.gitignore @@ -9,6 +9,7 @@ /conf/lang/* /conf/plugin_lang/* /conf/plugins.local.* +/conf/tpl/* .htaccess *.swp *.bak @@ -26,25 +27,23 @@ /data/media_attic/* /data/meta/* /data/pages/* +/data/tmp/* !/data/pages/wiki/dokuwiki.txt !/data/pages/wiki/syntax.txt !/data/pages/wiki/welcome.txt -/data/tmp/* /lib/tpl/* -!/lib/tpl/default !/lib/tpl/dokuwiki !/lib/tpl/index.php /lib/plugins/* +!/lib/plugins/acl !/lib/plugins/authad !/lib/plugins/authldap !/lib/plugins/authmysql !/lib/plugins/authpgsql !/lib/plugins/authplain -!/lib/plugins/acl !/lib/plugins/config !/lib/plugins/extension !/lib/plugins/info -!/lib/plugins/plugin !/lib/plugins/popularity !/lib/plugins/revert !/lib/plugins/safefnrecode @@ -52,5 +51,8 @@ !/lib/plugins/usermanager !/lib/plugins/action.php !/lib/plugins/admin.php +!/lib/plugins/auth.php !/lib/plugins/index.html +!/lib/plugins/remote.php !/lib/plugins/syntax.php +lib/images/*/local/* -- cgit v1.2.3 From 11ac6abdb90a812687d7db7df99aa02f843dd12a Mon Sep 17 00:00:00 2001 From: Christopher Smith Date: Tue, 25 Feb 2014 02:58:58 +0000 Subject: if configured renderer is not found, try to fallback to a bundled renderer --- inc/parserutils.php | 44 ++++++++++++++++++++++++++++++-------------- 1 file changed, 30 insertions(+), 14 deletions(-) diff --git a/inc/parserutils.php b/inc/parserutils.php index 4df273f11..2fb523d0c 100644 --- a/inc/parserutils.php +++ b/inc/parserutils.php @@ -631,27 +631,43 @@ function & p_get_renderer($mode) { return $Renderer; } - // try default renderer first: - $file = DOKU_INC."inc/parser/$rname.php"; - if(@file_exists($file)){ - require_once $file; - - if ( !class_exists($rclass) ) { - trigger_error("Unable to resolve render class $rclass",E_USER_WARNING); - msg("Renderer '$rname' for $mode not valid",-1); - return null; - } - $Renderer = new $rclass(); - }else{ - // Maybe a plugin/component is available? + // assuming the configured renderer is bundled, construct its file name + $default = DOKU_INC."inc/parser/$rname.php"; + if (!file_exists($default)) { + // not bundled, see if its an enabled plugin for rendering $mode $Renderer = $plugin_controller->load('renderer',$rname); + if (is_a($Renderer, 'Doku_Renderer') && ($mode == $Renderer->getFormat())) { + return $Renderer; + } - if(!isset($Renderer) || is_null($Renderer)){ + // there is a configuration error! + // not bundled, not an enabled plugin, try to fallback to a bundled renderer + $fallback = DOKU_INC."inc/parser/$mode.php"; + if (!file_exists($fallback)) { msg("No renderer '$rname' found for mode '$mode'",-1); return null; + } else { + $default = $fallback; + $rclass = "Doku_Renderer_$mode"; + + // viewers should see renderered output, so restrict the warning to admins only + $msg = "No renderer '$rname' found for mode '$mode', check your plugins"; + if ($mode == 'xhtml') { + $msg .= " and the 'renderer_xhtml' config setting"; + } + $msg .= ".
Attempting to fallback to the bundled renderer."; + msg($msg,-1,'','',MSG_ADMIN_ONLY); } } + require_once $default; + if ( !class_exists($rclass) ) { + trigger_error("Unable to resolve render class $rclass",E_USER_WARNING); + msg("Renderer '$rname' for $mode not valid",-1); + return null; + } + $Renderer = new $rclass(); + return $Renderer; } -- cgit v1.2.3 From 9377d909ce85b1b96b0e953b3c09a2539797d54b Mon Sep 17 00:00:00 2001 From: Christopher Smith Date: Tue, 25 Feb 2014 03:00:26 +0000 Subject: add test for p_get_renderer() with fallback --- _test/tests/inc/parserutils_get_renderer.test.php | 79 +++++++++++++++++++++++ 1 file changed, 79 insertions(+) create mode 100644 _test/tests/inc/parserutils_get_renderer.test.php diff --git a/_test/tests/inc/parserutils_get_renderer.test.php b/_test/tests/inc/parserutils_get_renderer.test.php new file mode 100644 index 000000000..0f373227d --- /dev/null +++ b/_test/tests/inc/parserutils_get_renderer.test.php @@ -0,0 +1,79 @@ +assertInstanceOf('Doku_Renderer_xhtml', p_get_renderer('xhtml')); + + $conf = $old_conf; + } + + // test get a renderer plugin + function test_p_get_renderer_plugin() { + global $conf; + global $plugin_controller; + + $old_conf = $conf; + $conf['renderer_xhtml'] = 'get_renderer_test'; + $this->plugin_controller = $plugin_controller; + $plugin_controller = $this; + + $this->assertInstanceOf('renderer_plugin_test', p_get_renderer('xhtml')); + + $conf = $old_conf; + $plugin_controller = $this->plugin_controller; + } + + // test fallback succeeds + function test_p_get_renderer_fallback() { + global $conf; + + $old_conf = $conf; + $conf['renderer_xhtml'] = 'badvalue'; + + $this->assertInstanceOf('Doku_Renderer_xhtml', p_get_renderer('xhtml')); + + $conf = $old_conf; + } + + // test fallback fails + function test_p_get_renderer_fallback_fail() { + global $conf; + + $old_conf = $conf; + $conf['renderer_junk'] = 'badvalue'; + + $this->assertNull(p_get_renderer('junk')); + + $conf = $old_conf; + } + + // wrapper function for the fake plugin controller, return $this for the fake syntax of this test + function load($type,$name,$new=false,$disabled=false){ + if ($name == 'get_renderer_test') { + return new renderer_plugin_test(); + } else { + return $this->plugin_controller->load($type, $name, $new, $disabled); + } + } + } + +require_once DOKU_INC . 'inc/parser/xhtml.php'; + +class renderer_plugin_test extends Doku_Renderer_xhtml { + + function canRender($format) { + return ($format=='xhtml'); + } + +} + +// vim:ts=4:sw=4:et: -- cgit v1.2.3 From 252398f08d0752fd17b25e4afab70a6d0b6455a7 Mon Sep 17 00:00:00 2001 From: Christopher Smith Date: Tue, 25 Feb 2014 03:00:46 +0000 Subject: remove reference operator from p_get_renderer() declaration, not required for php5 --- inc/parserutils.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/inc/parserutils.php b/inc/parserutils.php index 2fb523d0c..9420931eb 100644 --- a/inc/parserutils.php +++ b/inc/parserutils.php @@ -588,7 +588,7 @@ function p_sort_modes($a, $b){ function p_render($mode,$instructions,&$info){ if(is_null($instructions)) return ''; - $Renderer =& p_get_renderer($mode); + $Renderer = p_get_renderer($mode); if (is_null($Renderer)) return null; $Renderer->reset(); @@ -619,7 +619,7 @@ function p_render($mode,$instructions,&$info){ * @param $mode string Mode of the renderer to get * @return null|Doku_Renderer The renderer */ -function & p_get_renderer($mode) { +function p_get_renderer($mode) { /** @var Doku_Plugin_Controller $plugin_controller */ global $conf, $plugin_controller; -- cgit v1.2.3 From fd51467adc437f0a764f96cd4b94ff58a2ad8160 Mon Sep 17 00:00:00 2001 From: Martin Michalek Date: Tue, 25 Feb 2014 10:40:57 +0100 Subject: translation update --- lib/plugins/extension/lang/sk/lang.php | 58 ++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 lib/plugins/extension/lang/sk/lang.php diff --git a/lib/plugins/extension/lang/sk/lang.php b/lib/plugins/extension/lang/sk/lang.php new file mode 100644 index 000000000..d00c2e32b --- /dev/null +++ b/lib/plugins/extension/lang/sk/lang.php @@ -0,0 +1,58 @@ + + */ +$lang['tab_plugins'] = 'Inštalované pluginy'; +$lang['tab_templates'] = 'Inštalované šablóny'; +$lang['tab_search'] = 'Hľadanie e inštalácia'; +$lang['tab_install'] = 'Manuálna inštalácia'; +$lang['notimplemented'] = 'Táto vlastnosť ešte nebola implementovaná'; +$lang['unknownauthor'] = 'Neznámy autor'; +$lang['unknownversion'] = 'Neznáma verzia'; +$lang['btn_info'] = 'Viac informácií'; +$lang['btn_update'] = 'Aktualizácia'; +$lang['btn_uninstall'] = 'Odinštalovanie'; +$lang['btn_enable'] = 'Povolenie'; +$lang['btn_disable'] = 'Zablokovanie'; +$lang['btn_install'] = 'Inštalácia'; +$lang['btn_reinstall'] = 'Re-Inštalácia'; +$lang['search'] = 'Vyhľadávanie'; +$lang['extensionby'] = '%s od %s'; +$lang['screenshot'] = 'Obrázok od %s'; +$lang['popularity'] = 'Popularita: %s%%'; +$lang['homepage_link'] = 'Dokumentácia'; +$lang['bugs_features'] = 'Chyby:'; +$lang['tags'] = 'Kľúčové slová:'; +$lang['unknown'] = 'neznámy'; +$lang['installed_version'] = 'Inštalovaná verzia:'; +$lang['install_date'] = 'Posledná aktualizácia:'; +$lang['available_version'] = 'Dostupné verzie:'; +$lang['compatible'] = 'Kompaktibilita:'; +$lang['similar'] = 'Podobné:'; +$lang['conflicts'] = 'V konflikte:'; +$lang['status_installed'] = 'inštalovaný'; +$lang['status_not_installed'] = 'neinštalovaný'; +$lang['status_protected'] = 'chránený'; +$lang['status_enabled'] = 'povolený'; +$lang['status_disabled'] = 'nepovolený'; +$lang['status_plugin'] = 'plugin'; +$lang['status_template'] = 'šablóna'; +$lang['msg_enabled'] = 'Plugin %s povolený'; +$lang['msg_disabled'] = 'Plugin %s nepovolený'; +$lang['msg_template_install_success'] = 'Šablóna %s úspešne nainštalovaná'; +$lang['msg_template_update_success'] = 'Šablóna %s úspešne aktualizovaná'; +$lang['msg_plugin_install_success'] = 'Plugin %s úspešne nainštalovaný'; +$lang['msg_plugin_update_success'] = 'Plugin %s úspešne aktualizovaný'; +$lang['msg_upload_failed'] = 'Nahrávanie súboru zlyhalo'; +$lang['update_available'] = 'Aktualizácia: Nová verzia %s.'; +$lang['wrong_folder'] = 'Plugin nesprávne nainštalovaný: Premenujte adresár s pluginom "%s" na "%s".'; +$lang['error_badurl'] = 'URL by mali mať na začiatku http alebo https'; +$lang['error_dircreate'] = 'Nie je možné vytvoriť dočasný adresár pre uloženie sťahovaného súboru'; +$lang['error_download'] = 'Nie je možné stiahnuť súbor: %s'; +$lang['error_decompress'] = 'Nie je možné dekomprimovať stiahnutý súbor. Môže to byť dôvodom chyby sťahovania (v tom prípade to skúste znova) alebo neznámym kompresným formátom (v tom prípade musíte stiahnuť a inštalovať manuálne).'; +$lang['error_copy'] = 'Chyba kopírovania pri inštalácii do adresára %s: disk môže byť plný alebo nemáte potrebné prístupové oprávnenie. Dôsledkom može byť čiastočne inštalovaný plugin a nestabilná wiki inštalácia.'; +$lang['nopluginperms'] = 'Adresár s pluginom nie je zapisovateľný.'; +$lang['install_url'] = 'Inštalácia z URL:'; -- cgit v1.2.3 From becfa414b5b024ded4e094b1c113a72f39d8b763 Mon Sep 17 00:00:00 2001 From: Gerrit Uitslag Date: Tue, 25 Feb 2014 15:45:00 +0100 Subject: refactor detail.php to template.php - refactor detail en mediamanager link creation - refactor metadata listing --- conf/mediameta.php | 2 +- inc/lang/en/lang.php | 4 +- inc/template.php | 98 ++++++++++++++++++++++++++++++++++--- lib/tpl/dokuwiki/css/pagetools.less | 1 + lib/tpl/dokuwiki/detail.php | 54 ++++---------------- 5 files changed, 105 insertions(+), 54 deletions(-) diff --git a/conf/mediameta.php b/conf/mediameta.php index 0428a4b88..f75fa0821 100644 --- a/conf/mediameta.php +++ b/conf/mediameta.php @@ -5,7 +5,7 @@ * following contents: * fieldname - Where data will be saved (EXIF or IPTC field) * label - key to lookup in the $lang var, if not found printed as is - * htmltype - 'text' or 'textarea' + * htmltype - 'text', 'textarea' or 'date' * lookups - array additional fields to lookup the data (EXIF or IPTC fields) * * The fields are not ordered continously to make inserting additional items diff --git a/inc/lang/en/lang.php b/inc/lang/en/lang.php index cbdef8661..e945341d7 100644 --- a/inc/lang/en/lang.php +++ b/inc/lang/en/lang.php @@ -52,6 +52,8 @@ $lang['btn_register'] = 'Register'; $lang['btn_apply'] = 'Apply'; $lang['btn_media'] = 'Media Manager'; $lang['btn_deleteuser'] = 'Remove My Account'; +$lang['btn_img_backto'] = 'Back to %s'; +$lang['btn_mediaManager'] = 'View in media manager'; $lang['loggedinas'] = 'Logged in as'; $lang['user'] = 'Username'; @@ -253,7 +255,6 @@ $lang['admin_register'] = 'Add new user'; $lang['metaedit'] = 'Edit Metadata'; $lang['metasaveerr'] = 'Writing metadata failed'; $lang['metasaveok'] = 'Metadata saved'; -$lang['img_backto'] = 'Back to'; $lang['img_title'] = 'Title'; $lang['img_caption'] = 'Caption'; $lang['img_date'] = 'Date'; @@ -266,7 +267,6 @@ $lang['img_camera'] = 'Camera'; $lang['img_keywords'] = 'Keywords'; $lang['img_width'] = 'Width'; $lang['img_height'] = 'Height'; -$lang['img_manager'] = 'View in media manager'; $lang['subscr_subscribe_success'] = 'Added %s to subscription list for %s'; $lang['subscr_subscribe_error'] = 'Error adding %s to subscription list for %s'; diff --git a/inc/template.php b/inc/template.php index 0a6a9e4aa..aa3c658a8 100644 --- a/inc/template.php +++ b/inc/template.php @@ -548,6 +548,7 @@ function tpl_actionlink($type, $pre = '', $suf = '', $inner = '', $return = fals * @var string $method * @var bool $nofollow * @var array $params + * @var string $replacement */ extract($data); if(strpos($id, '#') === 0) { @@ -556,6 +557,9 @@ function tpl_actionlink($type, $pre = '', $suf = '', $inner = '', $return = fals $linktarget = wl($id, $params); } $caption = $lang['btn_'.$type]; + if(strpos($caption, '%s')){ + $caption = sprintf($caption, $replacement); + } $akey = $addTitle = ''; if($accesskey) { $akey = 'accesskey="'.$accesskey.'" '; @@ -609,11 +613,12 @@ function tpl_get_action($type) { if ($type == 'subscription') $type = 'subscribe'; if(!actionOK($type)) return false; - $accesskey = null; - $id = $ID; - $method = 'get'; - $params = array('do' => $type); - $nofollow = true; + $accesskey = null; + $id = $ID; + $method = 'get'; + $params = array('do' => $type); + $nofollow = true; + $replacement = ''; switch($type) { case 'edit': // most complicated type - we need to decide on current action @@ -670,6 +675,11 @@ function tpl_get_action($type) { $params = array(); $accesskey = 'b'; break; + case 'img_backto': + $params = array(); + $accesskey = 'b'; + $replacement = $ID; + break; case 'login': $params['sectok'] = getSecurityToken(); if(isset($_SERVER['REMOTE_USER'])) { @@ -717,11 +727,26 @@ function tpl_get_action($type) { case 'media': $params['ns'] = getNS($ID); break; + case 'mediaManager': + // View image in media manager + global $IMG; + $imgNS = getNS($IMG); + $authNS = auth_quickaclcheck("$imgNS:*"); + if ($authNS < AUTH_UPLOAD) { + return false; + } + $params = array( + 'ns' => $imgNS, + 'image' => $IMG, + 'do' => 'media' + ); + //$type = 'media'; + break; default: return '[unknown %s type]'; break; } - return compact('accesskey', 'type', 'id', 'method', 'params', 'nofollow'); + return compact('accesskey', 'type', 'id', 'method', 'params', 'nofollow', 'replacement'); } /** @@ -1016,6 +1041,67 @@ function tpl_img_getTag($tags, $alt = '', $src = null) { return $info; } +/** + * Returns a description list of the metatags of the current image + * + * @return string html of description list + */ +function tpl_img_meta() { + global $lang; + + $tags = tpl_get_img_meta(); + + echo '
'; + foreach($tags as $tag) { + $label = $lang[$tag['langkey']]; + if(!$label) $label = $tag['langkey']; + + echo '
'.$label.':
'; + if ($tag['type'] == 'date') { + echo dformat($tag['value']); + } else { + echo hsc($tag['value']); + } + echo '
'; + } + echo '
'; +} + +/** + * Returns metadata as configured in mediameta config file, ready for creating html + * + * @return array with arrays containing the entries: + * - string langkey key to lookup in the $lang var, if not found printed as is + * - string type type of value + * - string value tag value (unescaped) + */ +function tpl_get_img_meta() { + + $config_files = getConfigFiles('mediameta'); + foreach ($config_files as $config_file) { + if(@file_exists($config_file)) { + include($config_file); + } + } + /** @var array $fields the included array with metadata */ + + $tags = array(); + foreach($fields as $tag){ + $t = array(); + if (!empty($tag[0])) { + $t = array($tag[0]); + } + if(is_array($tag[3])) { + $t = array_merge($t,$tag[3]); + } + $value = tpl_img_getTag($t); + if ($value) { + $tags[] = array('langkey' => $tag[1], 'type' => $tag[2], 'value' => $value); + } + } + return $tags; +} + /** * Prints the image with a link to the full sized version * diff --git a/lib/tpl/dokuwiki/css/pagetools.less b/lib/tpl/dokuwiki/css/pagetools.less index ecb3038c3..77d2670a6 100644 --- a/lib/tpl/dokuwiki/css/pagetools.less +++ b/lib/tpl/dokuwiki/css/pagetools.less @@ -231,3 +231,4 @@ .pagetools-item(subscribe, 9, subscribe); .pagetools-item(mediaManager, 11); .pagetools-item(back, 12); +.pagetools-item(img_backto, 12); diff --git a/lib/tpl/dokuwiki/detail.php b/lib/tpl/dokuwiki/detail.php index ec846f6fd..8fe2c88a2 100644 --- a/lib/tpl/dokuwiki/detail.php +++ b/lib/tpl/dokuwiki/detail.php @@ -55,37 +55,7 @@ header('X-UA-Compatible: IE=edge,chrome=1');
-
- $tag){ - $t = array(); - if (!empty($tag[0])) { - $t = array($tag[0]); - } - if(is_array($tag[3])) { - $t = array_merge($t,$tag[3]); - } - $value = tpl_img_getTag($t); - if ($value) { - echo '
'.$lang[$tag[1]].':
'; - if ($tag[2] == 'date') { - echo dformat($value); - } else { - echo hsc($value); - } - echo '
'; - } - } - ?> -
+
@@ -109,23 +79,17 @@ header('X-UA-Compatible: IE=edge,chrome=1');
    = AUTH_UPLOAD) && function_exists('media_managerURL')) { - $mmURL = media_managerURL(array('ns' => $imgNS, 'image' => $IMG)); - $data['items']['mediaManager'] = '
  • '.$lang['img_manager'].'
  • '; - } - - // Back to [ID]; @todo: transfer logic to backend - $data['items']['img_backto'] = '
  • '.$lang['img_backto'].' '.$ID.'
  • '; + $data = array( + 'view' => 'detail', + 'items' => array( + 'mediaManager' => tpl_action('mediaManager', 1, 'li', 1, '', ''), + 'img_backto' => tpl_action('img_backto', 1, 'li', 1, '', ''), + ) + ); // the page tools can be amended through a custom plugin hook $evt = new Doku_Event('TEMPLATE_PAGETOOLS_DISPLAY', $data); - if($evt->advise_before()){ + if($evt->advise_before()) { foreach($evt->data['items'] as $k => $html) echo $html; } $evt->advise_after(); -- cgit v1.2.3 From 2f2c518c20d6e55e20e9fc2fb0ec2053854b0d1b Mon Sep 17 00:00:00 2001 From: Gerrit Uitslag Date: Tue, 25 Feb 2014 19:59:29 +0100 Subject: Show 'not logged in' only when logged out FS#2124 --- inc/lang/en/denied.txt | 2 +- inc/lang/en/lang.php | 1 + inc/template.php | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/inc/lang/en/denied.txt b/inc/lang/en/denied.txt index 3ac72820c..6f7fe055e 100644 --- a/inc/lang/en/denied.txt +++ b/inc/lang/en/denied.txt @@ -1,4 +1,4 @@ ====== Permission Denied ====== -Sorry, you don't have enough rights to continue. Perhaps you forgot to login? +Sorry, you don't have enough rights to continue. @NOTLOGGEDIN@ diff --git a/inc/lang/en/lang.php b/inc/lang/en/lang.php index cbdef8661..b95a8a58a 100644 --- a/inc/lang/en/lang.php +++ b/inc/lang/en/lang.php @@ -78,6 +78,7 @@ $lang['regbadmail'] = 'The given email address looks invalid - if you $lang['regbadpass'] = 'The two given passwords are not identical, please try again.'; $lang['regpwmail'] = 'Your DokuWiki password'; $lang['reghere'] = 'You don\'t have an account yet? Just get one'; +$lang['notloggedin'] = 'Please be aware you are not logged in.'; $lang['profna'] = 'This wiki does not support profile modification'; $lang['profnochange'] = 'No changes, nothing to do.'; diff --git a/inc/template.php b/inc/template.php index 0a6a9e4aa..c9d583d98 100644 --- a/inc/template.php +++ b/inc/template.php @@ -154,7 +154,7 @@ function tpl_content_core() { html_resendpwd(); break; case 'denied': - print p_locale_xhtml('denied'); + html_denied(); break; case 'profile' : html_updateprofile(); -- cgit v1.2.3 From d59dea9fddf885a836f7dc2d8be1f93afb7e9542 Mon Sep 17 00:00:00 2001 From: Gerrit Uitslag Date: Tue, 25 Feb 2014 20:00:56 +0100 Subject: added new html_denied() method as well --- inc/html.php | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/inc/html.php b/inc/html.php index fcec29670..507ba511e 100644 --- a/inc/html.php +++ b/inc/html.php @@ -64,6 +64,25 @@ function html_login(){ print '
'.NL; } + +/** + * Denied page content + * + * @return string html + */ +function html_denied() { + global $lang; + $denied = p_locale_xhtml('denied'); + $notloggedin = isset($_SERVER['REMOTE_USER']) ? '' : $lang['notloggedin']; + + $denied = str_replace( + array('@NOTLOGGEDIN@'), + array($notloggedin), + $denied + ); + print $denied; +} + /** * inserts section edit buttons if wanted or removes the markers * -- cgit v1.2.3 From 8daa2c9f98ef02857c1d92f2f226288c313146a7 Mon Sep 17 00:00:00 2001 From: Gerrit Uitslag Date: Tue, 25 Feb 2014 20:13:27 +0100 Subject: Update localizations --- inc/lang/ar/denied.txt | 2 +- inc/lang/az/denied.txt | 2 +- inc/lang/bg/denied.txt | 2 +- inc/lang/bn/denied.txt | 2 +- inc/lang/ca-valencia/denied.txt | 2 +- inc/lang/ca/denied.txt | 2 +- inc/lang/cs/denied.txt | 2 +- inc/lang/da/denied.txt | 2 +- inc/lang/de-informal/denied.txt | 2 +- inc/lang/de/denied.txt | 2 +- inc/lang/el/denied.txt | 2 +- inc/lang/eo/denied.txt | 2 +- inc/lang/es/denied.txt | 2 +- inc/lang/et/denied.txt | 2 +- inc/lang/eu/denied.txt | 2 +- inc/lang/fa/denied.txt | 2 +- inc/lang/fi/denied.txt | 2 +- inc/lang/fo/denied.txt | 2 +- inc/lang/fr/denied.txt | 2 +- inc/lang/gl/denied.txt | 2 +- inc/lang/he/denied.txt | 2 +- inc/lang/hr/denied.txt | 2 +- inc/lang/hu-formal/denied.txt | 2 +- inc/lang/hu/denied.txt | 2 +- inc/lang/ia/denied.txt | 2 +- inc/lang/id/denied.txt | 2 +- inc/lang/it/denied.txt | 3 +-- inc/lang/ja/denied.txt | 2 +- inc/lang/km/denied.txt | 2 +- inc/lang/ko/denied.txt | 2 +- inc/lang/ku/denied.txt | 2 +- inc/lang/la/denied.txt | 2 +- inc/lang/lb/denied.txt | 2 +- inc/lang/lt/denied.txt | 2 +- inc/lang/lv/denied.txt | 2 +- inc/lang/mg/denied.txt | 2 +- inc/lang/mr/denied.txt | 2 +- inc/lang/ne/denied.txt | 2 +- inc/lang/nl/denied.txt | 2 +- inc/lang/no/denied.txt | 2 +- inc/lang/pl/denied.txt | 2 +- inc/lang/pt-br/denied.txt | 2 +- inc/lang/pt/denied.txt | 2 +- inc/lang/ro/denied.txt | 3 +-- inc/lang/ru/denied.txt | 2 +- inc/lang/sk/denied.txt | 2 +- inc/lang/sl/denied.txt | 2 +- inc/lang/sq/denied.txt | 2 +- inc/lang/sr/denied.txt | 2 +- inc/lang/sv/denied.txt | 2 +- inc/lang/th/denied.txt | 2 +- inc/lang/tr/denied.txt | 2 +- inc/lang/uk/denied.txt | 2 +- inc/lang/vi/denied.txt | 2 +- inc/lang/zh-tw/denied.txt | 2 +- inc/lang/zh/denied.txt | 2 +- 56 files changed, 56 insertions(+), 58 deletions(-) diff --git a/inc/lang/ar/denied.txt b/inc/lang/ar/denied.txt index 11405233c..1d83efdff 100644 --- a/inc/lang/ar/denied.txt +++ b/inc/lang/ar/denied.txt @@ -1,3 +1,3 @@ ====== لا صلاحيات ====== -عذرا، ليس مصرح لك الاستمرار، لعلك نسيت تسجيل الدخول؟ \ No newline at end of file +عذرا، ليس مصرح لك الاستمرار @NOTLOGGEDIN@ \ No newline at end of file diff --git a/inc/lang/az/denied.txt b/inc/lang/az/denied.txt index a68b08c8c..2b5258274 100644 --- a/inc/lang/az/denied.txt +++ b/inc/lang/az/denied.txt @@ -1,3 +1,3 @@ ====== Müraciət qadağan edilmişdir ====== -Sizin bu əməliyyat üçün kifayət qədər haqqınız yoxdur. Bəlkə, Siz sistemə oz istifadəçi adınız ilə girməyi unutmusunuz? +Sizin bu əməliyyat üçün kifayət qədər haqqınız yoxdur. @NOTLOGGEDIN@ diff --git a/inc/lang/bg/denied.txt b/inc/lang/bg/denied.txt index 45ce63769..2443c3130 100644 --- a/inc/lang/bg/denied.txt +++ b/inc/lang/bg/denied.txt @@ -1,4 +1,4 @@ ====== Отказан достъп ====== -Нямате достатъчно права, за да продължите. Може би сте забравили да се впишете? +Нямате достатъчно права, за да продължите. @NOTLOGGEDIN@ diff --git a/inc/lang/bn/denied.txt b/inc/lang/bn/denied.txt index 711275bad..dbc00e26a 100644 --- a/inc/lang/bn/denied.txt +++ b/inc/lang/bn/denied.txt @@ -1,3 +1,3 @@ ====== অনুমতি অস্বীকার ===== -দুঃখিত, আপনি কি এগিয়ে যেতে যথেষ্ট অধিকার নেই. সম্ভবত আপনি লগইন ভুলে গেছেন? \ No newline at end of file +দুঃখিত, আপনি কি এগিয়ে যেতে যথেষ্ট অধিকার নেই. @NOTLOGGEDIN@ \ No newline at end of file diff --git a/inc/lang/ca-valencia/denied.txt b/inc/lang/ca-valencia/denied.txt index 39c45d946..ff42fd37a 100644 --- a/inc/lang/ca-valencia/denied.txt +++ b/inc/lang/ca-valencia/denied.txt @@ -1,4 +1,4 @@ ====== Permís denegat ====== -Disculpe, pero no té permís per a continuar. ¿Haurà oblidat iniciar sessió? +Disculpe, pero no té permís per a continuar. @NOTLOGGEDIN@ diff --git a/inc/lang/ca/denied.txt b/inc/lang/ca/denied.txt index e6125e83b..481375d2b 100644 --- a/inc/lang/ca/denied.txt +++ b/inc/lang/ca/denied.txt @@ -1,4 +1,4 @@ ====== Permís denegat ====== -No teniu prou drets per continuar. Potser us heu descuidat d'entrar? +No teniu prou drets per continuar. @NOTLOGGEDIN@ diff --git a/inc/lang/cs/denied.txt b/inc/lang/cs/denied.txt index 00a8811de..c0f82f492 100644 --- a/inc/lang/cs/denied.txt +++ b/inc/lang/cs/denied.txt @@ -1,3 +1,3 @@ ====== Nepovolená akce ====== -Promiňte, ale nemáte dostatečná oprávnění k této činnosti. Možná jste se zapomněli přihlásit? +Promiňte, ale nemáte dostatečná oprávnění k této činnosti. @NOTLOGGEDIN@ diff --git a/inc/lang/da/denied.txt b/inc/lang/da/denied.txt index a4fa8b88f..2be828c51 100644 --- a/inc/lang/da/denied.txt +++ b/inc/lang/da/denied.txt @@ -1,3 +1,3 @@ ====== Adgang nægtet! ====== -Du har ikke rettigheder til at fortsætte. Måske er du ikke logget ind. +Du har ikke rettigheder til at fortsætte. @NOTLOGGEDIN@ diff --git a/inc/lang/de-informal/denied.txt b/inc/lang/de-informal/denied.txt index 0bc0e59a8..a2713d2e9 100644 --- a/inc/lang/de-informal/denied.txt +++ b/inc/lang/de-informal/denied.txt @@ -1,4 +1,4 @@ ====== Zugang verweigert ====== -Du hast nicht die erforderliche Berechtigung, um diese Aktion durchzuführen. Eventuell bist du nicht am Wiki angemeldet? +Du hast nicht die erforderliche Berechtigung, um diese Aktion durchzuführen. @NOTLOGGEDIN@ diff --git a/inc/lang/de/denied.txt b/inc/lang/de/denied.txt index 8efa81f1b..1538c694d 100644 --- a/inc/lang/de/denied.txt +++ b/inc/lang/de/denied.txt @@ -1,4 +1,4 @@ ====== Zugang verweigert ====== -Sie haben nicht die erforderliche Berechtigung, um diese Aktion durchzuführen. Eventuell sind Sie nicht am Wiki angemeldet? +Sie haben nicht die erforderliche Berechtigung, um diese Aktion durchzuführen. @NOTLOGGEDIN@ diff --git a/inc/lang/el/denied.txt b/inc/lang/el/denied.txt index 36d7ae103..1c2717613 100644 --- a/inc/lang/el/denied.txt +++ b/inc/lang/el/denied.txt @@ -2,4 +2,4 @@ Συγγνώμη, αλλά δεν έχετε επαρκή δικαιώματα για την συγκεκριμένη ενέργεια. -Μήπως παραλείψατε να συνδεθείτε; +@NOTLOGGEDIN@ \ No newline at end of file diff --git a/inc/lang/eo/denied.txt b/inc/lang/eo/denied.txt index 3cd6c76bf..942cbbe86 100644 --- a/inc/lang/eo/denied.txt +++ b/inc/lang/eo/denied.txt @@ -1,4 +1,4 @@ ====== Aliro malpermesita ====== -Vi ne havas sufiĉajn rajtojn rigardi ĉi tiujn paĝojn. Eble vi forgesis identiĝi. +Vi ne havas sufiĉajn rajtojn rigardi ĉi tiujn paĝojn. @NOTLOGGEDIN@ diff --git a/inc/lang/es/denied.txt b/inc/lang/es/denied.txt index d7b37404b..0887e7ce6 100644 --- a/inc/lang/es/denied.txt +++ b/inc/lang/es/denied.txt @@ -1,3 +1,3 @@ ====== Permiso Denegado ====== -Lo siento, no tienes suficientes permisos para continuar. ¿Quizás has olvidado identificarte? \ No newline at end of file +Lo siento, no tienes suficientes permisos para continuar. @NOTLOGGEDIN@ \ No newline at end of file diff --git a/inc/lang/et/denied.txt b/inc/lang/et/denied.txt index bb564ac57..f2d81c007 100644 --- a/inc/lang/et/denied.txt +++ b/inc/lang/et/denied.txt @@ -1,3 +1,3 @@ ====== Sul pole ligipääsuluba ====== -Kahju küll, aga sinu tublidusest ei piisa, et edasi liikuda, selleks on vastavaid õigusi vaja. +Kahju küll, aga sinu tublidusest ei piisa, et edasi liikuda. @NOTLOGGEDIN@ diff --git a/inc/lang/eu/denied.txt b/inc/lang/eu/denied.txt index 257076a3d..d454ffdfb 100644 --- a/inc/lang/eu/denied.txt +++ b/inc/lang/eu/denied.txt @@ -1,3 +1,3 @@ ====== Ez duzu baimenik ====== -Barkatu, ez duzu baimenik orri hau ikusteko. Agian sesioa hastea ahaztu zaizu? \ No newline at end of file +Barkatu, ez duzu baimenik orri hau ikusteko. @NOTLOGGEDIN@ \ No newline at end of file diff --git a/inc/lang/fa/denied.txt b/inc/lang/fa/denied.txt index 827f73e2b..cb9258c03 100644 --- a/inc/lang/fa/denied.txt +++ b/inc/lang/fa/denied.txt @@ -1,3 +1,3 @@ ====== دسترسی ممکن نیست ====== -شرمنده، شما اجازه‌ی دسترسی ب این صفحه را ندارید. ممکن است فراموش کرده باشید که وارد سایت شوید! \ No newline at end of file +شرمنده، شما اجازه‌ی دسترسی ب این صفحه را ندارید. @NOTLOGGEDIN@ \ No newline at end of file diff --git a/inc/lang/fi/denied.txt b/inc/lang/fi/denied.txt index cd31da06b..89ae3b8e1 100644 --- a/inc/lang/fi/denied.txt +++ b/inc/lang/fi/denied.txt @@ -1,3 +1,3 @@ ====== Lupa evätty ====== -Sinulla ei ole tarpeeksi valtuuksia jatkaa. Ehkä unohdit kirjautua sisään? +Sinulla ei ole tarpeeksi valtuuksia jatkaa. @NOTLOGGEDIN@ diff --git a/inc/lang/fo/denied.txt b/inc/lang/fo/denied.txt index 505b249b4..25d98f634 100644 --- a/inc/lang/fo/denied.txt +++ b/inc/lang/fo/denied.txt @@ -1,3 +1,3 @@ ====== Atgongd nokta! ====== -Tú hevur ikki rættindi til at halda áfram. Møguliga hevur tú ikki rita inn. +Tú hevur ikki rættindi til at halda áfram. @NOTLOGGEDIN@ diff --git a/inc/lang/fr/denied.txt b/inc/lang/fr/denied.txt index 20d4d6755..640829482 100644 --- a/inc/lang/fr/denied.txt +++ b/inc/lang/fr/denied.txt @@ -1,3 +1,3 @@ ====== Autorisation refusée ====== -Désolé, vous n'avez pas les droits pour continuer. Peut-être avez-vous oublié de vous identifier ? +Désolé, vous n'avez pas les droits pour continuer. @NOTLOGGEDIN@ diff --git a/inc/lang/gl/denied.txt b/inc/lang/gl/denied.txt index 69408a4f3..a0847ecb2 100644 --- a/inc/lang/gl/denied.txt +++ b/inc/lang/gl/denied.txt @@ -1,4 +1,4 @@ ====== Permiso Denegado ====== -Sentímolo, mais non tes permisos de abondo para continuares. Pode que esqueceses iniciar a sesión? +Sentímolo, mais non tes permisos de abondo para continuares. @NOTLOGGEDIN@ diff --git a/inc/lang/he/denied.txt b/inc/lang/he/denied.txt index a366fc198..1c605f7b8 100644 --- a/inc/lang/he/denied.txt +++ b/inc/lang/he/denied.txt @@ -1,3 +1,3 @@ ====== הרשאה נדחתה ====== -אנו מצטערים אך אין לך הרשאות מתאימות כדי להמשיך. אולי שכחת להיכנס למערכת? \ No newline at end of file +אנו מצטערים אך אין לך הרשאות מתאימות כדי להמשיך. @NOTLOGGEDIN@ \ No newline at end of file diff --git a/inc/lang/hr/denied.txt b/inc/lang/hr/denied.txt index 216eea582..c9b0ca3eb 100644 --- a/inc/lang/hr/denied.txt +++ b/inc/lang/hr/denied.txt @@ -2,4 +2,4 @@ Nemate autorizaciju. -Niste li se možda zaboravili prijaviti u aplikaciju? +@NOTLOGGEDIN@ \ No newline at end of file diff --git a/inc/lang/hu-formal/denied.txt b/inc/lang/hu-formal/denied.txt index 97abd632a..f25e4f086 100644 --- a/inc/lang/hu-formal/denied.txt +++ b/inc/lang/hu-formal/denied.txt @@ -1,3 +1,3 @@ ====== Hozzáférés megtadadva ====== -Sajnáljuk, de nincs joga a folytatáshoz. Talán elfelejtett bejelentkezni? \ No newline at end of file +Sajnáljuk, de nincs joga a folytatáshoz. @NOTLOGGEDIN@ \ No newline at end of file diff --git a/inc/lang/hu/denied.txt b/inc/lang/hu/denied.txt index 0b06724df..85bb6d352 100644 --- a/inc/lang/hu/denied.txt +++ b/inc/lang/hu/denied.txt @@ -1,4 +1,4 @@ ====== Hozzáférés megtagadva ====== -Sajnáljuk, nincs jogod a folytatáshoz. Esetleg elfelejtettél bejelentkezni? +Sajnáljuk, nincs jogod a folytatáshoz. @NOTLOGGEDIN@ diff --git a/inc/lang/ia/denied.txt b/inc/lang/ia/denied.txt index 044e1532d..29d35bbde 100644 --- a/inc/lang/ia/denied.txt +++ b/inc/lang/ia/denied.txt @@ -1,3 +1,3 @@ ====== Permission refusate ====== -Pardono, tu non ha le derectos requisite pro continuar. Pote esser que tu ha oblidate de aperir un session. \ No newline at end of file +Pardono, tu non ha le derectos requisite pro continuar. @NOTLOGGEDIN@ \ No newline at end of file diff --git a/inc/lang/id/denied.txt b/inc/lang/id/denied.txt index bad8f24a6..e40be0550 100644 --- a/inc/lang/id/denied.txt +++ b/inc/lang/id/denied.txt @@ -1,4 +1,4 @@ ====== Akses Ditolak ====== -Maaf, Anda tidak mempunyai hak akses untuk melanjutkan. Apakah Anda belum login? +Maaf, Anda tidak mempunyai hak akses untuk melanjutkan. @NOTLOGGEDIN@ diff --git a/inc/lang/it/denied.txt b/inc/lang/it/denied.txt index d21956a5b..6bba10cf0 100644 --- a/inc/lang/it/denied.txt +++ b/inc/lang/it/denied.txt @@ -1,5 +1,4 @@ ====== Accesso negato ====== -Non hai i diritti per continuare. Forse hai dimenticato di effettuare l'accesso? - +Non hai i diritti per continuare. @NOTLOGGEDIN@ diff --git a/inc/lang/ja/denied.txt b/inc/lang/ja/denied.txt index d170aebe4..452d62217 100644 --- a/inc/lang/ja/denied.txt +++ b/inc/lang/ja/denied.txt @@ -1,4 +1,4 @@ ====== アクセスが拒否されました ====== -実行する権限がありません。ログインされているか確認してください。 +実行する権限がありません。@NOTLOGGEDIN@ diff --git a/inc/lang/km/denied.txt b/inc/lang/km/denied.txt index 58b10ee86..7fa1868b4 100644 --- a/inc/lang/km/denied.txt +++ b/inc/lang/km/denied.txt @@ -1,3 +1,3 @@ ====== បដិសេធអនុញ្ញាត ====== -សូមទុស អ្នកគ្មានអនុញ្ញាតទៅបណ្តទេ។ +សូមទុស អ្នកគ្មានអនុញ្ញាតទៅបណ្តទេ។ @NOTLOGGEDIN@ diff --git a/inc/lang/ko/denied.txt b/inc/lang/ko/denied.txt index cf0b294a4..50556a72e 100644 --- a/inc/lang/ko/denied.txt +++ b/inc/lang/ko/denied.txt @@ -1,3 +1,3 @@ ====== 권한 거절 ====== -죄송하지만 계속할 수 있는 권한이 없습니다. 로그인을 잊으셨나요? \ No newline at end of file +죄송하지만 계속할 수 있는 권한이 없습니다. @NOTLOGGEDIN@ \ No newline at end of file diff --git a/inc/lang/ku/denied.txt b/inc/lang/ku/denied.txt index 3ac72820c..6f7fe055e 100644 --- a/inc/lang/ku/denied.txt +++ b/inc/lang/ku/denied.txt @@ -1,4 +1,4 @@ ====== Permission Denied ====== -Sorry, you don't have enough rights to continue. Perhaps you forgot to login? +Sorry, you don't have enough rights to continue. @NOTLOGGEDIN@ diff --git a/inc/lang/la/denied.txt b/inc/lang/la/denied.txt index fdb62f53e..e703c7716 100644 --- a/inc/lang/la/denied.txt +++ b/inc/lang/la/denied.txt @@ -1,3 +1,3 @@ ====== Ad hanc paginam accedere non potes ====== -Ad hanc paginam accedere non potes: antea in conuentum ineas, deinde rursum temptas \ No newline at end of file +Ad hanc paginam accedere non potes: antea in conuentum ineas, deinde rursum temptas @NOTLOGGEDIN@ \ No newline at end of file diff --git a/inc/lang/lb/denied.txt b/inc/lang/lb/denied.txt index 487bf2198..a7b52d024 100644 --- a/inc/lang/lb/denied.txt +++ b/inc/lang/lb/denied.txt @@ -1,3 +1,3 @@ ======Erlaabnis verweigert====== -Et deet mer leed, du hues net genuch Rechter fir weiderzefueren. Hues de vläicht vergiess dech anzeloggen? +Et deet mer leed, du hues net genuch Rechter fir weiderzefueren. @NOTLOGGEDIN@ diff --git a/inc/lang/lt/denied.txt b/inc/lang/lt/denied.txt index c25fb5f0c..de651bb1a 100644 --- a/inc/lang/lt/denied.txt +++ b/inc/lang/lt/denied.txt @@ -1,4 +1,4 @@ ====== Priėjimas uždraustas ====== -Jūs neturite reikiamų teisių, kad galėtumėte tęsti. Turbūt pamiršote prisijungti :-). +Jūs neturite reikiamų teisių, kad galėtumėte tęsti. @NOTLOGGEDIN@ diff --git a/inc/lang/lv/denied.txt b/inc/lang/lv/denied.txt index c7df462c8..e8287242e 100644 --- a/inc/lang/lv/denied.txt +++ b/inc/lang/lv/denied.txt @@ -1,6 +1,6 @@ ====== Piekļuve aizliegta ====== -Atvaino, tev nav tiesību turpināt. Varbūt aizmirsi ielogoties? +Atvaino, tev nav tiesību turpināt. @NOTLOGGEDIN@ diff --git a/inc/lang/mg/denied.txt b/inc/lang/mg/denied.txt index edf20f1a1..a769bcd40 100644 --- a/inc/lang/mg/denied.txt +++ b/inc/lang/mg/denied.txt @@ -1,4 +1,4 @@ ====== Tsy tafiditra ====== -Miala tsiny fa tsy manana alalana hanohizana mankany ianao. Angamba hadinonao ny niditra. +Miala tsiny fa tsy manana alalana hanohizana mankany ianao. @NOTLOGGEDIN@ diff --git a/inc/lang/mr/denied.txt b/inc/lang/mr/denied.txt index 1b499f51d..2a7827e3e 100644 --- a/inc/lang/mr/denied.txt +++ b/inc/lang/mr/denied.txt @@ -1,3 +1,3 @@ ====== परवानगी नाकारली ====== -क्षमा करा, पण तुम्हाला यापुढे जाण्याचे हक्क नाहीत. कदाचित तुम्ही लॉगिन करायला विसरला आहात ? \ No newline at end of file +क्षमा करा, पण तुम्हाला यापुढे जाण्याचे हक्क नाहीत. @NOTLOGGEDIN@ \ No newline at end of file diff --git a/inc/lang/ne/denied.txt b/inc/lang/ne/denied.txt index ab4bcf290..69e1840e7 100644 --- a/inc/lang/ne/denied.txt +++ b/inc/lang/ne/denied.txt @@ -1,3 +1,3 @@ ====== अनुमति अमान्य ====== -माफ गर्नुहोला तपाईलाई अगाडि बढ्न अनुमति छैन। सम्भवत: तपाईले प्रवेश गर्न भुल्नु भयो। \ No newline at end of file +माफ गर्नुहोला तपाईलाई अगाडि बढ्न अनुमति छैन। @NOTLOGGEDIN@ \ No newline at end of file diff --git a/inc/lang/nl/denied.txt b/inc/lang/nl/denied.txt index 6a8bf773f..8c2cf3f42 100644 --- a/inc/lang/nl/denied.txt +++ b/inc/lang/nl/denied.txt @@ -1,3 +1,3 @@ ====== Toegang geweigerd ====== -Sorry: je hebt niet voldoende rechten om verder te gaan. Misschien ben je vergeten in te loggen? +Sorry: je hebt niet voldoende rechten om verder te gaan. @NOTLOGGEDIN@ diff --git a/inc/lang/no/denied.txt b/inc/lang/no/denied.txt index 6e7f1f28b..f34b73cbb 100644 --- a/inc/lang/no/denied.txt +++ b/inc/lang/no/denied.txt @@ -1,3 +1,3 @@ ====== Adgang forbudt ====== -Beklager, men du har ikke rettigheter til dette. Kanskje du har glemt å logge inn? +Beklager, men du har ikke rettigheter til dette. @NOTLOGGEDIN@ diff --git a/inc/lang/pl/denied.txt b/inc/lang/pl/denied.txt index d402463ef..c9352536a 100644 --- a/inc/lang/pl/denied.txt +++ b/inc/lang/pl/denied.txt @@ -1,4 +1,4 @@ ====== Brak dostępu ====== -Nie masz wystarczających uprawnień. Zaloguj się! +Nie masz wystarczających uprawnień. @NOTLOGGEDIN@ diff --git a/inc/lang/pt-br/denied.txt b/inc/lang/pt-br/denied.txt index d7e423f42..5f6cc318d 100644 --- a/inc/lang/pt-br/denied.txt +++ b/inc/lang/pt-br/denied.txt @@ -1,3 +1,3 @@ ====== Permissão Negada ====== -Desculpe, você não tem permissões suficientes para continuar. Por acaso esqueceu de autenticar-se? +Desculpe, você não tem permissões suficientes para continuar. @NOTLOGGEDIN@ diff --git a/inc/lang/pt/denied.txt b/inc/lang/pt/denied.txt index eb2614387..e3e0c6e4b 100644 --- a/inc/lang/pt/denied.txt +++ b/inc/lang/pt/denied.txt @@ -1,3 +1,3 @@ ====== Permissão Negada ====== -Não possui direitos e permissões suficientes para continuar. Talvez se tenha esquecido de iniciar sessão? \ No newline at end of file +Não possui direitos e permissões suficientes para continuar. @NOTLOGGEDIN@ \ No newline at end of file diff --git a/inc/lang/ro/denied.txt b/inc/lang/ro/denied.txt index 8e8126a17..966b259b9 100644 --- a/inc/lang/ro/denied.txt +++ b/inc/lang/ro/denied.txt @@ -1,4 +1,3 @@ ====== Acces nepermis ====== -Din păcate nu ai destule drepturi pentru a continua. Poate ai uitat să te -autentifici? +Din păcate nu ai destule drepturi pentru a continua. @NOTLOGGEDIN@ diff --git a/inc/lang/ru/denied.txt b/inc/lang/ru/denied.txt index f7f53ce88..e8143810e 100644 --- a/inc/lang/ru/denied.txt +++ b/inc/lang/ru/denied.txt @@ -1,3 +1,3 @@ ====== Доступ запрещён ====== -Извините, у вас не хватает прав для этого действия. Может быть вы забыли войти в вики под своим логином? +Извините, у вас не хватает прав для этого действия. @NOTLOGGEDIN@ \ No newline at end of file diff --git a/inc/lang/sk/denied.txt b/inc/lang/sk/denied.txt index 6e9c98496..191c9b42a 100644 --- a/inc/lang/sk/denied.txt +++ b/inc/lang/sk/denied.txt @@ -1,3 +1,3 @@ ====== Nepovolená akcia ====== -Prepáčte, ale nemáte dostatočné oprávnenie k tejto činnosti. Možno ste sa zabudli prihlásiť? +Prepáčte, ale nemáte dostatočné oprávnenie k tejto činnosti. @NOTLOGGEDIN@ diff --git a/inc/lang/sl/denied.txt b/inc/lang/sl/denied.txt index 5b5fd4d3a..ca73c53a2 100644 --- a/inc/lang/sl/denied.txt +++ b/inc/lang/sl/denied.txt @@ -1,3 +1,3 @@ ====== Ni ustreznih dovoljenj ====== -Za nadaljevanje opravila je treba imeti ustrezna dovoljenja. Ali ste se morda pozabili prijaviti? +Za nadaljevanje opravila je treba imeti ustrezna dovoljenja. @NOTLOGGEDIN@ diff --git a/inc/lang/sq/denied.txt b/inc/lang/sq/denied.txt index 03e10527f..19b04f1f9 100644 --- a/inc/lang/sq/denied.txt +++ b/inc/lang/sq/denied.txt @@ -1,3 +1,3 @@ ====== Leja Refuzohet ====== -Na vjen keq, ju nuk keni të drejta të mjaftueshme për të vazhduar. Mbase harruat të hyni? \ No newline at end of file +Na vjen keq, ju nuk keni të drejta të mjaftueshme për të vazhduar. @NOTLOGGEDIN@ \ No newline at end of file diff --git a/inc/lang/sr/denied.txt b/inc/lang/sr/denied.txt index b74f2b1f8..42d0bdf57 100644 --- a/inc/lang/sr/denied.txt +++ b/inc/lang/sr/denied.txt @@ -1,4 +1,4 @@ ====== Забрањен приступ ====== -Извините, али немате довољно права да наставите. Можда сте заборавили да се пријавите? +Извините, али немате довољно права да наставите. @NOTLOGGEDIN@ diff --git a/inc/lang/sv/denied.txt b/inc/lang/sv/denied.txt index 64d129227..a60632c6a 100644 --- a/inc/lang/sv/denied.txt +++ b/inc/lang/sv/denied.txt @@ -1,4 +1,4 @@ ====== Åtkomst nekad ====== -Tyvärr, du har inte behörighet att fortsätta. Kanske har du glömt att logga in? +Tyvärr, du har inte behörighet att fortsätta. @NOTLOGGEDIN@ diff --git a/inc/lang/th/denied.txt b/inc/lang/th/denied.txt index 88b012a67..6375697e2 100644 --- a/inc/lang/th/denied.txt +++ b/inc/lang/th/denied.txt @@ -1,3 +1,3 @@ ====== ปฏิเสธสิทธิ์ ====== -ขออภัย คุณไม่มีสิทธิ์เพียงพอที่จะดำเนินการต่อ บางทีคุณอาจจะลืมล็อกอิน? \ No newline at end of file +ขออภัย คุณไม่มีสิทธิ์เพียงพอที่จะดำเนินการต่อ @NOTLOGGEDIN@ \ No newline at end of file diff --git a/inc/lang/tr/denied.txt b/inc/lang/tr/denied.txt index 04e9b8bfb..ecc277c1f 100644 --- a/inc/lang/tr/denied.txt +++ b/inc/lang/tr/denied.txt @@ -1,4 +1,4 @@ ====== Yetki Reddedildi ====== -Üzgünüz, devam etmek için yetkiniz yok. Giriş yapmayı unutmuş olabilir misiniz? +Üzgünüz, devam etmek için yetkiniz yok. @NOTLOGGEDIN@ diff --git a/inc/lang/uk/denied.txt b/inc/lang/uk/denied.txt index 5db12e1bc..8e0a4fe7f 100644 --- a/inc/lang/uk/denied.txt +++ b/inc/lang/uk/denied.txt @@ -1,4 +1,4 @@ ====== Доступ заборонено ====== -Вибачте, але у вас не вистачає прав для продовження. Можливо ви забули увійти в систему? +Вибачте, але у вас не вистачає прав для продовження. @NOTLOGGEDIN@ diff --git a/inc/lang/vi/denied.txt b/inc/lang/vi/denied.txt index 35acaeb62..58739e63e 100644 --- a/inc/lang/vi/denied.txt +++ b/inc/lang/vi/denied.txt @@ -1,3 +1,3 @@ ====== Không được phép vào ====== -Rất tiếc là bạn không được phép để tiếp tục. Bạn quên đăng nhập hay sao? +Rất tiếc là bạn không được phép để tiếp tục. @NOTLOGGEDIN@ diff --git a/inc/lang/zh-tw/denied.txt b/inc/lang/zh-tw/denied.txt index 5a4d483a5..4297c1a20 100644 --- a/inc/lang/zh-tw/denied.txt +++ b/inc/lang/zh-tw/denied.txt @@ -1,4 +1,4 @@ ====== 權限拒絕 ====== -抱歉,您沒有足夠權限繼續執行。或許您忘了登入? +抱歉,您沒有足夠權限繼續執行。@NOTLOGGEDIN@ diff --git a/inc/lang/zh/denied.txt b/inc/lang/zh/denied.txt index 276741c40..bf3a85478 100644 --- a/inc/lang/zh/denied.txt +++ b/inc/lang/zh/denied.txt @@ -1,3 +1,3 @@ ====== 拒绝授权 ====== -对不起,您没有足够权限,无法继续。也许您忘了登录? \ No newline at end of file +对不起,您没有足够权限,无法继续。@NOTLOGGEDIN@ \ No newline at end of file -- cgit v1.2.3 From 2ada8709d3a0cea872f117823b244b400fac5f87 Mon Sep 17 00:00:00 2001 From: Christopher Smith Date: Tue, 25 Feb 2014 20:32:56 +0000 Subject: add renderers to autolader --- inc/load.php | 6 ++++++ inc/parser/code.php | 1 - inc/parser/metadata.php | 2 -- inc/parser/renderer.php | 1 - inc/parser/xhtml.php | 3 --- inc/parser/xhtmlsummary.php | 1 - inc/parserutils.php | 2 -- 7 files changed, 6 insertions(+), 10 deletions(-) diff --git a/inc/load.php b/inc/load.php index 497dd6921..f1deffe19 100644 --- a/inc/load.php +++ b/inc/load.php @@ -96,6 +96,12 @@ function load_autoload($name){ 'DokuWiki_Remote_Plugin' => DOKU_PLUGIN.'remote.php', 'DokuWiki_Auth_Plugin' => DOKU_PLUGIN.'auth.php', + 'Doku_Renderer' => DOKU_INC.'inc/parser/renderer.php', + 'Doku_Renderer_xhtml' => DOKU_INC.'inc/parser/xhtml.php', + 'Doku_Renderer_code' => DOKU_INC.'inc/parser/code.php', + 'Doku_Renderer_xhtmlsummary' => DOKU_INC.'inc/parser/xhtmlsummary.php', + 'Doku_Renderer_metadata' => DOKU_INC.'inc/parser/metadata.php', + ); if(isset($classes[$name])){ diff --git a/inc/parser/code.php b/inc/parser/code.php index 0b8e3ee02..d77ffd1aa 100644 --- a/inc/parser/code.php +++ b/inc/parser/code.php @@ -5,7 +5,6 @@ * @author Andreas Gohr */ if(!defined('DOKU_INC')) die('meh.'); -require_once DOKU_INC . 'inc/parser/renderer.php'; class Doku_Renderer_code extends Doku_Renderer { var $_codeblock=0; diff --git a/inc/parser/metadata.php b/inc/parser/metadata.php index 8ba159d62..73bae190f 100644 --- a/inc/parser/metadata.php +++ b/inc/parser/metadata.php @@ -16,8 +16,6 @@ if ( !defined('DOKU_TAB') ) { define ('DOKU_TAB',"\t"); } -require_once DOKU_INC . 'inc/parser/renderer.php'; - /** * The Renderer */ diff --git a/inc/parser/renderer.php b/inc/parser/renderer.php index e3401fd48..6b6a1770b 100644 --- a/inc/parser/renderer.php +++ b/inc/parser/renderer.php @@ -6,7 +6,6 @@ * @author Andreas Gohr */ if(!defined('DOKU_INC')) die('meh.'); -require_once DOKU_INC . 'inc/plugin.php'; require_once DOKU_INC . 'inc/pluginutils.php'; /** diff --git a/inc/parser/xhtml.php b/inc/parser/xhtml.php index 315b4d640..184e62fe3 100644 --- a/inc/parser/xhtml.php +++ b/inc/parser/xhtml.php @@ -17,9 +17,6 @@ if ( !defined('DOKU_TAB') ) { define ('DOKU_TAB',"\t"); } -require_once DOKU_INC . 'inc/parser/renderer.php'; -require_once DOKU_INC . 'inc/html.php'; - /** * The Renderer */ diff --git a/inc/parser/xhtmlsummary.php b/inc/parser/xhtmlsummary.php index 95f86cbef..867b71f6a 100644 --- a/inc/parser/xhtmlsummary.php +++ b/inc/parser/xhtmlsummary.php @@ -1,6 +1,5 @@ advise_before()) { - require_once DOKU_INC."inc/parser/metadata.php"; - // get instructions $instructions = p_cached_instructions(wikiFN($id),false,$id); if(is_null($instructions)){ -- cgit v1.2.3 From 548d801fe28808c85529c4e396ccc563550d4634 Mon Sep 17 00:00:00 2001 From: Christopher Smith Date: Tue, 25 Feb 2014 20:33:37 +0000 Subject: rework p_get_renderer() for use with autoloading bundled renderers --- inc/parserutils.php | 60 ++++++++++++++++++++++++++--------------------------- 1 file changed, 30 insertions(+), 30 deletions(-) diff --git a/inc/parserutils.php b/inc/parserutils.php index 11f044146..7a85b64e3 100644 --- a/inc/parserutils.php +++ b/inc/parserutils.php @@ -614,8 +614,13 @@ function p_render($mode,$instructions,&$info){ } /** + * Figure out the correct renderer class to use for $mode, + * instantiate and return it + * * @param $mode string Mode of the renderer to get * @return null|Doku_Renderer The renderer + * + * @author Christopher Smith */ function p_get_renderer($mode) { /** @var Doku_Plugin_Controller $plugin_controller */ @@ -624,49 +629,44 @@ function p_get_renderer($mode) { $rname = !empty($conf['renderer_'.$mode]) ? $conf['renderer_'.$mode] : $mode; $rclass = "Doku_Renderer_$rname"; + // if requested earlier or a bundled renderer if( class_exists($rclass) ) { $Renderer = new $rclass(); return $Renderer; } - // assuming the configured renderer is bundled, construct its file name - $default = DOKU_INC."inc/parser/$rname.php"; - if (!file_exists($default)) { - // not bundled, see if its an enabled plugin for rendering $mode - $Renderer = $plugin_controller->load('renderer',$rname); + // not bundled, see if its an enabled plugin for rendering $mode + $Renderer = $plugin_controller->load('renderer',$rname); + if ($Renderer) { if (is_a($Renderer, 'Doku_Renderer') && ($mode == $Renderer->getFormat())) { return $Renderer; - } - - // there is a configuration error! - // not bundled, not an enabled plugin, try to fallback to a bundled renderer - $fallback = DOKU_INC."inc/parser/$mode.php"; - if (!file_exists($fallback)) { - msg("No renderer '$rname' found for mode '$mode'",-1); - return null; } else { - $default = $fallback; - $rclass = "Doku_Renderer_$mode"; - - // viewers should see renderered output, so restrict the warning to admins only - $msg = "No renderer '$rname' found for mode '$mode', check your plugins"; - if ($mode == 'xhtml') { - $msg .= " and the 'renderer_xhtml' config setting"; - } - $msg .= ".
Attempting to fallback to the bundled renderer."; - msg($msg,-1,'','',MSG_ADMIN_ONLY); + // plugin found, but not a renderer or not the right renderer for this $mode + msg("Renderer plugin '$rname' not valid for $mode",-1,'','',MSG_ADMINS_ONLY); } } - require_once $default; - if ( !class_exists($rclass) ) { - trigger_error("Unable to resolve render class $rclass",E_USER_WARNING); - msg("Renderer '$rname' for $mode not valid",-1); - return null; + // there is a configuration error! + // not bundled, not a valid enabled plugin, use $mode to try to fallback to a bundled renderer + $rclass = "Doku_Renderer_$mode"; + if ( class_exists($rclass) ) { + // viewers should see renderered output, so restrict the warning to admins only + $msg = "No renderer '$rname' found for mode '$mode', check your plugins"; + if ($mode == 'xhtml') { + $msg .= " and the 'renderer_xhtml' config setting"; + } + $msg .= ".
Attempting to fallback to the bundled renderer."; + msg($msg,-1,'','',MSG_ADMINS_ONLY); + + $Renderer = new $rclass; + $Renderer->nocache(); // fallback only (and may include admin alerts), don't cache + return $Renderer; } - $Renderer = new $rclass(); - return $Renderer; + // fallback failed, alert the world + trigger_error("Unable to resolve render class $rclass",E_USER_WARNING); + msg("No renderer '$rname' found for mode '$mode'",-1); + return null; } /** -- cgit v1.2.3 From 5b76ad9103ca8e25d29c5ce018859be6679b7b1c Mon Sep 17 00:00:00 2001 From: Christopher Smith Date: Tue, 25 Feb 2014 20:34:20 +0000 Subject: code cleaning - add some braces --- inc/parserutils.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/inc/parserutils.php b/inc/parserutils.php index 7a85b64e3..c12732e88 100644 --- a/inc/parserutils.php +++ b/inc/parserutils.php @@ -430,8 +430,9 @@ function p_render_metadata($id, $orig){ global $ID, $METADATA_RENDERERS; // avoid recursive rendering processes for the same id - if (isset($METADATA_RENDERERS[$id])) + if (isset($METADATA_RENDERERS[$id])) { return $orig; + } // store the original metadata in the global $METADATA_RENDERERS so p_set_metadata can use it $METADATA_RENDERERS[$id] =& $orig; -- cgit v1.2.3 From f3283f02766b2a2730b81c5a5a0b0a6240af054c Mon Sep 17 00:00:00 2001 From: Christopher Smith Date: Tue, 25 Feb 2014 21:15:43 +0000 Subject: change to an Exception and expect it --- _test/tests/inc/parserutils_get_renderer.test.php | 4 ++++ inc/parserutils.php | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/_test/tests/inc/parserutils_get_renderer.test.php b/_test/tests/inc/parserutils_get_renderer.test.php index 0f373227d..540063e19 100644 --- a/_test/tests/inc/parserutils_get_renderer.test.php +++ b/_test/tests/inc/parserutils_get_renderer.test.php @@ -45,6 +45,10 @@ class parserutils_get_renderer_test extends DokuWikiTest { } // test fallback fails + /** + * @expectedException Exception + * @expectedExceptionCode E_USER_WARNING + */ function test_p_get_renderer_fallback_fail() { global $conf; diff --git a/inc/parserutils.php b/inc/parserutils.php index c12732e88..1c628a766 100644 --- a/inc/parserutils.php +++ b/inc/parserutils.php @@ -665,7 +665,7 @@ function p_get_renderer($mode) { } // fallback failed, alert the world - trigger_error("Unable to resolve render class $rclass",E_USER_WARNING); + throw new Exception("Unable to resolve render class $rclass",E_USER_WARNING); msg("No renderer '$rname' found for mode '$mode'",-1); return null; } -- cgit v1.2.3 From a049856df3f316114a9d936d830d5b6d419b11e6 Mon Sep 17 00:00:00 2001 From: Christopher Smith Date: Wed, 26 Feb 2014 01:12:33 +0000 Subject: revert back to trigger error --- _test/tests/inc/parserutils_get_renderer.test.php | 2 +- inc/parserutils.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/_test/tests/inc/parserutils_get_renderer.test.php b/_test/tests/inc/parserutils_get_renderer.test.php index 540063e19..69aeb3b19 100644 --- a/_test/tests/inc/parserutils_get_renderer.test.php +++ b/_test/tests/inc/parserutils_get_renderer.test.php @@ -46,7 +46,7 @@ class parserutils_get_renderer_test extends DokuWikiTest { // test fallback fails /** - * @expectedException Exception + * @expectedException PHPUnit_Framework_Error * @expectedExceptionCode E_USER_WARNING */ function test_p_get_renderer_fallback_fail() { diff --git a/inc/parserutils.php b/inc/parserutils.php index 1c628a766..c12732e88 100644 --- a/inc/parserutils.php +++ b/inc/parserutils.php @@ -665,7 +665,7 @@ function p_get_renderer($mode) { } // fallback failed, alert the world - throw new Exception("Unable to resolve render class $rclass",E_USER_WARNING); + trigger_error("Unable to resolve render class $rclass",E_USER_WARNING); msg("No renderer '$rname' found for mode '$mode'",-1); return null; } -- cgit v1.2.3 From 3bf4233a75bbb00df6c04707d1a52fdb84e8be16 Mon Sep 17 00:00:00 2001 From: Christopher Smith Date: Wed, 26 Feb 2014 01:49:29 +0000 Subject: add HOST and PORT to feed cache key --- feed.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/feed.php b/feed.php index 34ce23c89..960131b15 100644 --- a/feed.php +++ b/feed.php @@ -21,7 +21,7 @@ $opt = rss_parseOptions(); // the feed is dynamic - we need a cache for each combo // (but most people just use the default feed so it's still effective) $cache = getCacheName(join('', array_values($opt)).$_SERVER['REMOTE_USER'], '.feed'); -$key = join('', array_values($opt)).$_SERVER['REMOTE_USER']; +$key = join('', array_values($opt)).$_SERVER['REMOTE_USER'].$_SERVER['HTTP_HOST'].$_SERVER['SERVER_PORT']; $cache = new cache($key, '.feed'); // prepare cache depends -- cgit v1.2.3 From 4a193141ca703475cd9625b3127016b7c49f507e Mon Sep 17 00:00:00 2001 From: Christopher Smith Date: Wed, 26 Feb 2014 01:50:39 +0000 Subject: remove rendundant line --- feed.php | 1 - 1 file changed, 1 deletion(-) diff --git a/feed.php b/feed.php index 960131b15..e64d5aa3e 100644 --- a/feed.php +++ b/feed.php @@ -20,7 +20,6 @@ $opt = rss_parseOptions(); // the feed is dynamic - we need a cache for each combo // (but most people just use the default feed so it's still effective) -$cache = getCacheName(join('', array_values($opt)).$_SERVER['REMOTE_USER'], '.feed'); $key = join('', array_values($opt)).$_SERVER['REMOTE_USER'].$_SERVER['HTTP_HOST'].$_SERVER['SERVER_PORT']; $cache = new cache($key, '.feed'); -- cgit v1.2.3 From 26b26af6b5c3033fc16a799159e374f21d4fb599 Mon Sep 17 00:00:00 2001 From: Christopher Smith Date: Wed, 26 Feb 2014 01:52:56 +0000 Subject: add security character '$' around REMOTE_USER in cache key to avoid key clashes --- feed.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/feed.php b/feed.php index e64d5aa3e..c158dc46a 100644 --- a/feed.php +++ b/feed.php @@ -20,7 +20,7 @@ $opt = rss_parseOptions(); // the feed is dynamic - we need a cache for each combo // (but most people just use the default feed so it's still effective) -$key = join('', array_values($opt)).$_SERVER['REMOTE_USER'].$_SERVER['HTTP_HOST'].$_SERVER['SERVER_PORT']; +$key = join('', array_values($opt)).'$'.$_SERVER['REMOTE_USER'].'$'.$_SERVER['HTTP_HOST'].$_SERVER['SERVER_PORT']; $cache = new cache($key, '.feed'); // prepare cache depends -- cgit v1.2.3 From 06d97b6336abd0058493fee60c56bc8586b8bd27 Mon Sep 17 00:00:00 2001 From: Gerrit Uitslag Date: Thu, 27 Feb 2014 17:04:15 +0100 Subject: update links at wiki:dokuwiki --- data/pages/wiki/dokuwiki.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/data/pages/wiki/dokuwiki.txt b/data/pages/wiki/dokuwiki.txt index 808aea68a..0e08fdcd3 100644 --- a/data/pages/wiki/dokuwiki.txt +++ b/data/pages/wiki/dokuwiki.txt @@ -6,7 +6,7 @@ Read the [[doku>manual|DokuWiki Manual]] to unleash the full power of DokuWiki. ===== Download ===== -DokuWiki is available at http://www.splitbrain.org/go/dokuwiki +DokuWiki is available at http://download.dokuwiki.org/ ===== Read More ===== @@ -24,7 +24,7 @@ All documentation and additional information besides the [[syntax|syntax descrip **Installing DokuWiki** * [[doku>requirements|System Requirements]] - * [[http://www.splitbrain.org/go/dokuwiki|Download DokuWiki]] :!: + * [[http://download.dokuwiki.org/|Download DokuWiki]] :!: * [[doku>changes|Change Log]] * [[doku>Install|How to install or upgrade]] :!: * [[doku>config|Configuration]] @@ -50,7 +50,7 @@ All documentation and additional information besides the [[syntax|syntax descrip * [[doku>mailinglist|Join the mailing list]] * [[http://forum.dokuwiki.org|Check out the user forum]] * [[doku>irc|Talk to other users in the IRC channel]] - * [[http://bugs.splitbrain.org/index.php?project=1|Submit bugs and feature wishes]] + * [[https://github.com/splitbrain/dokuwiki/issues|Submit bugs and feature wishes]] * [[http://www.wikimatrix.org/forum/viewforum.php?id=10|Share your experiences in the WikiMatrix forum]] * [[doku>thanks|Some humble thanks]] -- cgit v1.2.3 From cdc6cb5b5424420efd689aaab13341628529c0be Mon Sep 17 00:00:00 2001 From: Hideaki SAWADA Date: Thu, 27 Feb 2014 17:31:41 +0100 Subject: translation update --- lib/plugins/extension/lang/ja/intro_install.txt | 1 + lib/plugins/extension/lang/ja/intro_plugins.txt | 1 + lib/plugins/extension/lang/ja/intro_search.txt | 1 + lib/plugins/extension/lang/ja/intro_templates.txt | 1 + lib/plugins/extension/lang/ja/lang.php | 54 +++++++++++++++++++++++ 5 files changed, 58 insertions(+) create mode 100644 lib/plugins/extension/lang/ja/intro_install.txt create mode 100644 lib/plugins/extension/lang/ja/intro_plugins.txt create mode 100644 lib/plugins/extension/lang/ja/intro_search.txt create mode 100644 lib/plugins/extension/lang/ja/intro_templates.txt create mode 100644 lib/plugins/extension/lang/ja/lang.php diff --git a/lib/plugins/extension/lang/ja/intro_install.txt b/lib/plugins/extension/lang/ja/intro_install.txt new file mode 100644 index 000000000..889ed6879 --- /dev/null +++ b/lib/plugins/extension/lang/ja/intro_install.txt @@ -0,0 +1 @@ +ここでは、アップロードするかダウンロードURLを指定して、手動でプラグインやテンプレートをインストールできます。 diff --git a/lib/plugins/extension/lang/ja/intro_plugins.txt b/lib/plugins/extension/lang/ja/intro_plugins.txt new file mode 100644 index 000000000..9bfc68431 --- /dev/null +++ b/lib/plugins/extension/lang/ja/intro_plugins.txt @@ -0,0 +1 @@ +このDokuWikiに現在インストールされているプラグインです。ここでは、これらプラグインを有効化、無効化、アンインストールすることができます。同様にプラグインのアップデートも表示されます。アップデート前に、プラグインのマニュアルをお読みください。 \ No newline at end of file diff --git a/lib/plugins/extension/lang/ja/intro_search.txt b/lib/plugins/extension/lang/ja/intro_search.txt new file mode 100644 index 000000000..66d977b1b --- /dev/null +++ b/lib/plugins/extension/lang/ja/intro_search.txt @@ -0,0 +1 @@ +このタブでは、DokuWiki用の利用可能なすべてのサードパーティのプラグインとテンプレートにアクセスできます。サードパーティ製のコードには、**セキュリティ上のリスク**の可能性があることに注意してください、最初に[[doku>ja:security#プラグインのセキュリティ|プラグインのセキュリティ]]を読むことをお勧めします。 \ No newline at end of file diff --git a/lib/plugins/extension/lang/ja/intro_templates.txt b/lib/plugins/extension/lang/ja/intro_templates.txt new file mode 100644 index 000000000..f97694aaa --- /dev/null +++ b/lib/plugins/extension/lang/ja/intro_templates.txt @@ -0,0 +1 @@ +このDokuWikiに現在インストールされているテンプレートです。[[?do=admin&page=config|設定管理]]で使用するテンプレートを選択できます。 \ No newline at end of file diff --git a/lib/plugins/extension/lang/ja/lang.php b/lib/plugins/extension/lang/ja/lang.php new file mode 100644 index 000000000..0401d7630 --- /dev/null +++ b/lib/plugins/extension/lang/ja/lang.php @@ -0,0 +1,54 @@ + + */ +$lang['menu'] = '拡張機能管理'; +$lang['tab_plugins'] = 'インストール済プラグイン'; +$lang['tab_templates'] = 'インストール済テンプレート'; +$lang['tab_install'] = '手動インストール'; +$lang['notimplemented'] = 'この機能は未実装です。'; +$lang['notinstalled'] = 'この拡張機能はインストールされていません。'; +$lang['alreadyenabled'] = 'この拡張機能は有効です。'; +$lang['alreadydisabled'] = 'この拡張機能は無効です。'; +$lang['pluginlistsaveerror'] = 'プラグイン一覧の保存中にエラーが発生しました。'; +$lang['unknownauthor'] = '作者不明'; +$lang['unknownversion'] = 'バージョン不明'; +$lang['btn_info'] = '詳細情報を表示する。'; +$lang['btn_update'] = 'アップデート'; +$lang['btn_uninstall'] = 'アンインストール'; +$lang['btn_enable'] = '有効化'; +$lang['btn_disable'] = '無効化'; +$lang['btn_install'] = 'インストール'; +$lang['btn_reinstall'] = '再インストール'; +$lang['js']['reallydel'] = 'この拡張機能を本当にアンインストールしますか?'; +$lang['downloadurl'] = 'ダウンロード URL:'; +$lang['repository'] = 'リポジトリ:'; +$lang['depends'] = '依存:'; +$lang['similar'] = '類似:'; +$lang['status_installed'] = 'インストール済'; +$lang['status_not_installed'] = '未インストール'; +$lang['status_enabled'] = '有効'; +$lang['status_disabled'] = '無効'; +$lang['status_plugin'] = 'プラグイン'; +$lang['status_template'] = 'テンプレート'; +$lang['status_bundled'] = '同梱'; +$lang['msg_enabled'] = '%s プラグインを有効化しました。'; +$lang['msg_disabled'] = '%s プラグインを無効化しました。'; +$lang['msg_delete_success'] = '拡張機能をアンインストールしました。'; +$lang['msg_template_install_success'] = '%s テンプレートをインストールできました。'; +$lang['msg_template_update_success'] = '%s テンプレートをアップデートできました。'; +$lang['msg_plugin_install_success'] = '%s プラグインをインストールできました。'; +$lang['msg_plugin_update_success'] = '%s プラグインをアップデートできました。'; +$lang['msg_upload_failed'] = 'ファイルのアップロードに失敗しました。'; +$lang['security_issue'] = 'セキュリティ問題: %s'; +$lang['security_warning'] = 'セキュリティ警告: %s'; +$lang['update_available'] = 'アップデート:%sの新バージョンが利用可能です。 '; +$lang['error_badurl'] = 'URLはhttpかhttpsで始まる必要があります。'; +$lang['error_dircreate'] = 'ダウンロード用の一時フォルダが作成できません。'; +$lang['error_download'] = 'ファイルをダウンロードできません:%s'; +$lang['noperms'] = '拡張機能ディレクトリが書き込み不可です。'; +$lang['notplperms'] = 'テンプレートディレクトリが書き込み不可です。'; +$lang['nopluginperms'] = 'プラグインディレクトリが書き込み不可です。'; -- cgit v1.2.3 From 2650e2e10d5ba44aafa270734f19a38a24df8a7b Mon Sep 17 00:00:00 2001 From: "H. Richard" Date: Thu, 27 Feb 2014 22:01:02 +0100 Subject: translation update --- lib/plugins/extension/lang/de/intro_install.txt | 1 + lib/plugins/extension/lang/de/intro_plugins.txt | 1 + lib/plugins/extension/lang/de/intro_search.txt | 1 + lib/plugins/extension/lang/de/intro_templates.txt | 1 + lib/plugins/extension/lang/de/lang.php | 74 +++++++++++++++++++++++ 5 files changed, 78 insertions(+) create mode 100644 lib/plugins/extension/lang/de/intro_install.txt create mode 100644 lib/plugins/extension/lang/de/intro_plugins.txt create mode 100644 lib/plugins/extension/lang/de/intro_search.txt create mode 100644 lib/plugins/extension/lang/de/intro_templates.txt create mode 100644 lib/plugins/extension/lang/de/lang.php diff --git a/lib/plugins/extension/lang/de/intro_install.txt b/lib/plugins/extension/lang/de/intro_install.txt new file mode 100644 index 000000000..4ecebe959 --- /dev/null +++ b/lib/plugins/extension/lang/de/intro_install.txt @@ -0,0 +1 @@ +Hier können Sie Plugins und Templates von Hand installieren indem Sie sie hochladen oder eine Download-URL angeben. \ No newline at end of file diff --git a/lib/plugins/extension/lang/de/intro_plugins.txt b/lib/plugins/extension/lang/de/intro_plugins.txt new file mode 100644 index 000000000..a14304fe4 --- /dev/null +++ b/lib/plugins/extension/lang/de/intro_plugins.txt @@ -0,0 +1 @@ +Dies sind die Plugin's, die schon installiert sind. Sie können sie hier an- oder abschalten oder sie komplett deinstallieren. Außerdem werden hier Updates zu den installiereten Plugin's angezeigt. Bitte lesen Sie vor einem Update die zugehörige Dokumentation. \ No newline at end of file diff --git a/lib/plugins/extension/lang/de/intro_search.txt b/lib/plugins/extension/lang/de/intro_search.txt new file mode 100644 index 000000000..02f01acb9 --- /dev/null +++ b/lib/plugins/extension/lang/de/intro_search.txt @@ -0,0 +1 @@ +Dieser Tab gibt Ihnen Zugriff auf alle vorhandenen Plugin's und Templates für DokuWiki, die von dritte Seite angeboten werden. Bitte seien Sie sich dessen bewusst, dass dieser Code ein Sicherheitsrisiko darstellen kann. Sie sollten vor einer Installation weiter dazu lesen: [[doku>security#plugin_security|plugin security]] \ No newline at end of file diff --git a/lib/plugins/extension/lang/de/intro_templates.txt b/lib/plugins/extension/lang/de/intro_templates.txt new file mode 100644 index 000000000..be26c00ac --- /dev/null +++ b/lib/plugins/extension/lang/de/intro_templates.txt @@ -0,0 +1 @@ +Dies sind die in Ihrem Dokuwiki installierten Templates. Sie können das gewünschte Template hier: [[?do=admin&page=config|Configuration Manager]] aussuchen. \ No newline at end of file diff --git a/lib/plugins/extension/lang/de/lang.php b/lib/plugins/extension/lang/de/lang.php new file mode 100644 index 000000000..8aca8646e --- /dev/null +++ b/lib/plugins/extension/lang/de/lang.php @@ -0,0 +1,74 @@ + + */ +$lang['menu'] = 'Erweiterungen verwalten'; +$lang['tab_plugins'] = 'installierte Plugin\'s'; +$lang['tab_templates'] = 'installierte Templates'; +$lang['tab_search'] = 'Suchen und installieren'; +$lang['tab_install'] = 'händisch installieren'; +$lang['notimplemented'] = 'Diese Fähigkeit/Eigenschaft wurde noch nicht implementiert'; +$lang['notinstalled'] = 'Diese Erweiterung ist nicht installiert'; +$lang['alreadyenabled'] = 'Diese Erweiterung wurde bereits angeschaltet'; +$lang['alreadydisabled'] = 'Diese Erweiterung wurde bereits abgeschaltet'; +$lang['pluginlistsaveerror'] = 'Es gab einen Fehler beim Speichern der Plugin-Liste'; +$lang['unknownauthor'] = 'Unbekannter Autor'; +$lang['unknownversion'] = 'Unbekannte Version'; +$lang['btn_info'] = 'Zeige weitere Info'; +$lang['btn_update'] = 'Update'; +$lang['btn_uninstall'] = 'Deinstallation'; +$lang['btn_enable'] = 'Anschalten (enable)'; +$lang['btn_disable'] = 'Abschalten (disable)'; +$lang['btn_install'] = 'Installieren'; +$lang['btn_reinstall'] = 'Von neuem installieren'; +$lang['js']['reallydel'] = 'Wollen Sie diese Erweiterung wirklich installieren?'; +$lang['search_for'] = 'Erweiterung suchen:'; +$lang['search'] = 'Suchen'; +$lang['extensionby'] = '%s mit %s'; +$lang['screenshot'] = 'Bildschirmfoto mit %s'; +$lang['popularity'] = 'Popularität: %s%%'; +$lang['homepage_link'] = 'Dokumentation'; +$lang['bugs_features'] = 'Fehler'; +$lang['tags'] = 'Kennwörter'; +$lang['author_hint'] = 'Suche Erweiterungen mittels Name des Autor\'s'; +$lang['installed'] = 'Installiert:'; +$lang['downloadurl'] = 'URL zum Herunterladen'; +$lang['unknown'] = 'unbekannt'; +$lang['installed_version'] = 'Installierte Version'; +$lang['install_date'] = 'Ihr letztes Update:'; +$lang['available_version'] = 'Verfügbare Version: '; +$lang['compatible'] = 'verträglich mit:'; +$lang['depends'] = 'hängt ab von:'; +$lang['similar'] = 'Ist ähnlich zu:'; +$lang['conflicts'] = 'ist in Konflikt mit:'; +$lang['donate'] = 'ist dies ähnlich?'; +$lang['donate_action'] = 'Spendieren Sie dem Autor einen Kaffee!'; +$lang['repo_retry'] = 'Versuchen Sie\'s noch mal!'; +$lang['provides'] = 'Stellt zur Verfügung'; +$lang['status'] = 'Status'; +$lang['status_installed'] = 'installiert'; +$lang['status_not_installed'] = 'nicht installiert'; +$lang['status_protected'] = 'geschützt'; +$lang['status_enabled'] = 'angeschaltet (enabled)'; +$lang['status_disabled'] = 'abgeschaltet (disabled)'; +$lang['status_unmodifiable'] = 'unveränderlich'; +$lang['status_plugin'] = 'Plugin'; +$lang['status_template'] = 'Mustervorgabe (Template)'; +$lang['status_bundled'] = 'verbunden'; +$lang['msg_enabled'] = 'Plugin %s ist angeschaltet'; +$lang['msg_disabled'] = 'Erweiterung %s ist abgeschaltet'; +$lang['msg_delete_success'] = 'diese Erweiterung ist nicht installiert'; +$lang['msg_template_install_success'] = 'Das Template %s wurde erfolgreich installiert'; +$lang['msg_template_update_success'] = 'Das Update des Templates %s war erfolgreich '; +$lang['msg_plugin_install_success'] = 'Das Plugin %s wurde erfolgreich installiert'; +$lang['msg_plugin_update_success'] = 'Das Update des Plugin\'s %s war erfolgreich'; +$lang['msg_upload_failed'] = 'Fehler beim Hochladen der Datei'; +$lang['missing_dependency'] = 'fehlende oder abgeschaltete Abhängigkeit:%s'; +$lang['noperms'] = 'das Erweiterungs-Verzeichnis ist schreibgeschützt'; +$lang['notplperms'] = 'das Template-Verzeichnis ist schreibgeschützt'; +$lang['nopluginperms'] = 'das Plugin-Verzeichnis ist schreibgeschützt'; +$lang['install_url'] = 'Von der Webadresse (URL) installieren'; +$lang['install_upload'] = 'Erweiterung hochladen:'; -- cgit v1.2.3 From fee031291e3986d3f7fb0418934ca39ea74f7621 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Fri, 28 Feb 2014 11:13:48 +0100 Subject: improved German translation --- lib/plugins/extension/lang/de/intro_plugins.txt | 2 +- lib/plugins/extension/lang/de/intro_search.txt | 2 +- lib/plugins/extension/lang/de/intro_templates.txt | 2 +- lib/plugins/extension/lang/de/lang.php | 71 +++++++++++------------ 4 files changed, 38 insertions(+), 39 deletions(-) diff --git a/lib/plugins/extension/lang/de/intro_plugins.txt b/lib/plugins/extension/lang/de/intro_plugins.txt index a14304fe4..1a1521050 100644 --- a/lib/plugins/extension/lang/de/intro_plugins.txt +++ b/lib/plugins/extension/lang/de/intro_plugins.txt @@ -1 +1 @@ -Dies sind die Plugin's, die schon installiert sind. Sie können sie hier an- oder abschalten oder sie komplett deinstallieren. Außerdem werden hier Updates zu den installiereten Plugin's angezeigt. Bitte lesen Sie vor einem Update die zugehörige Dokumentation. \ No newline at end of file +Dies sind die Plugins, die bereits installiert sind. Sie können sie hier an- oder abschalten oder sie komplett deinstallieren. Außerdem werden hier Updates zu den installiereten Plugins angezeigt. Bitte lesen Sie vor einem Update die zugehörige Dokumentation. \ No newline at end of file diff --git a/lib/plugins/extension/lang/de/intro_search.txt b/lib/plugins/extension/lang/de/intro_search.txt index 02f01acb9..7df8de185 100644 --- a/lib/plugins/extension/lang/de/intro_search.txt +++ b/lib/plugins/extension/lang/de/intro_search.txt @@ -1 +1 @@ -Dieser Tab gibt Ihnen Zugriff auf alle vorhandenen Plugin's und Templates für DokuWiki, die von dritte Seite angeboten werden. Bitte seien Sie sich dessen bewusst, dass dieser Code ein Sicherheitsrisiko darstellen kann. Sie sollten vor einer Installation weiter dazu lesen: [[doku>security#plugin_security|plugin security]] \ No newline at end of file +Dieser Tab gibt Ihnen Zugriff auf alle vorhandenen Plugins und Templates für DokuWiki. Bitte bedenken sie das jede installierte Erweiterung ein Sicherheitsrisiko darstellen kann. Sie sollten vor einer Installation die [[doku>security#plugin_security|Plugin Security]] Informationen lesen. \ No newline at end of file diff --git a/lib/plugins/extension/lang/de/intro_templates.txt b/lib/plugins/extension/lang/de/intro_templates.txt index be26c00ac..d71ce6237 100644 --- a/lib/plugins/extension/lang/de/intro_templates.txt +++ b/lib/plugins/extension/lang/de/intro_templates.txt @@ -1 +1 @@ -Dies sind die in Ihrem Dokuwiki installierten Templates. Sie können das gewünschte Template hier: [[?do=admin&page=config|Configuration Manager]] aussuchen. \ No newline at end of file +Dies sind die in Ihrem Dokuwiki installierten Templates. Sie können das gewünschte Template im [[?do=admin&page=config|Konfigurations Manager]] aktivieren. \ No newline at end of file diff --git a/lib/plugins/extension/lang/de/lang.php b/lib/plugins/extension/lang/de/lang.php index 8aca8646e..10d501130 100644 --- a/lib/plugins/extension/lang/de/lang.php +++ b/lib/plugins/extension/lang/de/lang.php @@ -6,69 +6,68 @@ * @author H. Richard */ $lang['menu'] = 'Erweiterungen verwalten'; -$lang['tab_plugins'] = 'installierte Plugin\'s'; -$lang['tab_templates'] = 'installierte Templates'; -$lang['tab_search'] = 'Suchen und installieren'; -$lang['tab_install'] = 'händisch installieren'; -$lang['notimplemented'] = 'Diese Fähigkeit/Eigenschaft wurde noch nicht implementiert'; +$lang['tab_plugins'] = 'Installierte Plugins'; +$lang['tab_templates'] = 'Installierte Templates'; +$lang['tab_search'] = 'Suchen und Installieren'; +$lang['tab_install'] = 'Händisch installieren'; +$lang['notimplemented'] = 'Dieses Fähigkeit/Eigenschaft wurde noch nicht implementiert'; $lang['notinstalled'] = 'Diese Erweiterung ist nicht installiert'; -$lang['alreadyenabled'] = 'Diese Erweiterung wurde bereits angeschaltet'; -$lang['alreadydisabled'] = 'Diese Erweiterung wurde bereits abgeschaltet'; +$lang['alreadyenabled'] = 'Diese Erweiterung ist bereits aktiviert'; +$lang['alreadydisabled'] = 'Diese Erweiterung ist bereits deaktiviert'; $lang['pluginlistsaveerror'] = 'Es gab einen Fehler beim Speichern der Plugin-Liste'; $lang['unknownauthor'] = 'Unbekannter Autor'; $lang['unknownversion'] = 'Unbekannte Version'; $lang['btn_info'] = 'Zeige weitere Info'; $lang['btn_update'] = 'Update'; $lang['btn_uninstall'] = 'Deinstallation'; -$lang['btn_enable'] = 'Anschalten (enable)'; -$lang['btn_disable'] = 'Abschalten (disable)'; +$lang['btn_enable'] = 'Aktivieren'; +$lang['btn_disable'] = 'Deaktivieren'; $lang['btn_install'] = 'Installieren'; -$lang['btn_reinstall'] = 'Von neuem installieren'; -$lang['js']['reallydel'] = 'Wollen Sie diese Erweiterung wirklich installieren?'; +$lang['btn_reinstall'] = 'Neu installieren'; +$lang['js']['reallydel'] = 'Wollen Sie diese Erweiterung wirklich löschen?'; $lang['search_for'] = 'Erweiterung suchen:'; $lang['search'] = 'Suchen'; -$lang['extensionby'] = '%s mit %s'; -$lang['screenshot'] = 'Bildschirmfoto mit %s'; +$lang['extensionby'] = '%s von %s'; +$lang['screenshot'] = 'Bildschirmfoto von %s'; $lang['popularity'] = 'Popularität: %s%%'; -$lang['homepage_link'] = 'Dokumentation'; -$lang['bugs_features'] = 'Fehler'; -$lang['tags'] = 'Kennwörter'; -$lang['author_hint'] = 'Suche Erweiterungen mittels Name des Autor\'s'; +$lang['homepage_link'] = 'Doku'; +$lang['bugs_features'] = 'Bugs'; +$lang['tags'] = 'Schlagworte'; +$lang['author_hint'] = 'Suche weitere Erweiterungen dieses Autors'; $lang['installed'] = 'Installiert:'; $lang['downloadurl'] = 'URL zum Herunterladen'; $lang['unknown'] = 'unbekannt'; $lang['installed_version'] = 'Installierte Version'; $lang['install_date'] = 'Ihr letztes Update:'; $lang['available_version'] = 'Verfügbare Version: '; -$lang['compatible'] = 'verträglich mit:'; -$lang['depends'] = 'hängt ab von:'; +$lang['compatible'] = 'Kompatibel mit:'; +$lang['depends'] = 'Benötigt:'; $lang['similar'] = 'Ist ähnlich zu:'; -$lang['conflicts'] = 'ist in Konflikt mit:'; -$lang['donate'] = 'ist dies ähnlich?'; +$lang['conflicts'] = 'Nicht kompatibel mit:'; +$lang['donate'] = 'Nützlich?'; $lang['donate_action'] = 'Spendieren Sie dem Autor einen Kaffee!'; -$lang['repo_retry'] = 'Versuchen Sie\'s noch mal!'; -$lang['provides'] = 'Stellt zur Verfügung'; +$lang['repo_retry'] = 'Neu versuchen'; +$lang['provides'] = 'Enthält'; $lang['status'] = 'Status'; $lang['status_installed'] = 'installiert'; $lang['status_not_installed'] = 'nicht installiert'; $lang['status_protected'] = 'geschützt'; -$lang['status_enabled'] = 'angeschaltet (enabled)'; -$lang['status_disabled'] = 'abgeschaltet (disabled)'; +$lang['status_enabled'] = 'aktiviert'; +$lang['status_disabled'] = 'deaktiviert'; $lang['status_unmodifiable'] = 'unveränderlich'; $lang['status_plugin'] = 'Plugin'; -$lang['status_template'] = 'Mustervorgabe (Template)'; -$lang['status_bundled'] = 'verbunden'; -$lang['msg_enabled'] = 'Plugin %s ist angeschaltet'; -$lang['msg_disabled'] = 'Erweiterung %s ist abgeschaltet'; -$lang['msg_delete_success'] = 'diese Erweiterung ist nicht installiert'; +$lang['status_template'] = 'Template'; +$lang['msg_enabled'] = 'Plugin %s ist aktiviert'; +$lang['msg_disabled'] = 'Erweiterung %s ist deaktiviert'; +$lang['msg_delete_success'] = 'Erweiterung wurde entfernt'; $lang['msg_template_install_success'] = 'Das Template %s wurde erfolgreich installiert'; $lang['msg_template_update_success'] = 'Das Update des Templates %s war erfolgreich '; $lang['msg_plugin_install_success'] = 'Das Plugin %s wurde erfolgreich installiert'; -$lang['msg_plugin_update_success'] = 'Das Update des Plugin\'s %s war erfolgreich'; +$lang['msg_plugin_update_success'] = 'Das Update des Plugins %s war erfolgreich'; $lang['msg_upload_failed'] = 'Fehler beim Hochladen der Datei'; -$lang['missing_dependency'] = 'fehlende oder abgeschaltete Abhängigkeit:%s'; -$lang['noperms'] = 'das Erweiterungs-Verzeichnis ist schreibgeschützt'; -$lang['notplperms'] = 'das Template-Verzeichnis ist schreibgeschützt'; -$lang['nopluginperms'] = 'das Plugin-Verzeichnis ist schreibgeschützt'; -$lang['install_url'] = 'Von der Webadresse (URL) installieren'; +$lang['missing_dependency'] = 'fehlende oder deaktivierte Abhängigkeit:%s'; +$lang['noperms'] = 'Das Erweiterungs-Verzeichnis ist schreibgeschützt'; +$lang['notplperms'] = 'Das Template-Verzeichnis ist schreibgeschützt'; +$lang['nopluginperms'] = 'Das Plugin-Verzeichnis ist schreibgeschützt'; +$lang['install_url'] = 'Von Webadresse (URL) installieren'; $lang['install_upload'] = 'Erweiterung hochladen:'; -- cgit v1.2.3 From e30b0f289638b91494ea96d307fd82e1458d6dcf Mon Sep 17 00:00:00 2001 From: Wild Date: Sat, 22 Feb 2014 12:47:47 +0100 Subject: translation update --- inc/lang/fr/denied.txt | 2 +- inc/lang/fr/lang.php | 9 +++++---- lib/plugins/authad/lang/fr/settings.php | 2 -- 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/inc/lang/fr/denied.txt b/inc/lang/fr/denied.txt index 20d4d6755..56c59a7c2 100644 --- a/inc/lang/fr/denied.txt +++ b/inc/lang/fr/denied.txt @@ -1,3 +1,3 @@ ====== Autorisation refusée ====== -Désolé, vous n'avez pas les droits pour continuer. Peut-être avez-vous oublié de vous identifier ? +Désolé, vous n'avez pas suffisement d'autorisations pour poursuivre votre demande. Peut-être avez-vous oublié de vous identifier ? diff --git a/inc/lang/fr/lang.php b/inc/lang/fr/lang.php index 49f617323..32e3055f7 100644 --- a/inc/lang/fr/lang.php +++ b/inc/lang/fr/lang.php @@ -29,6 +29,7 @@ * @author Bruno Veilleux * @author Emmanuel * @author Jérôme Brandt + * @author Wild */ $lang['encoding'] = 'utf-8'; $lang['direction'] = 'ltr'; @@ -51,10 +52,10 @@ $lang['btn_revs'] = 'Anciennes révisions'; $lang['btn_recent'] = 'Derniers changements'; $lang['btn_upload'] = 'Envoyer'; $lang['btn_cancel'] = 'Annuler'; -$lang['btn_index'] = 'Index'; +$lang['btn_index'] = 'Plan du site'; $lang['btn_secedit'] = 'Modifier'; -$lang['btn_login'] = 'Connexion'; -$lang['btn_logout'] = 'Déconnexion'; +$lang['btn_login'] = 'S\'identifier'; +$lang['btn_logout'] = 'Se déconnecter'; $lang['btn_admin'] = 'Administrer'; $lang['btn_update'] = 'Mettre à jour'; $lang['btn_delete'] = 'Effacer'; @@ -69,7 +70,7 @@ $lang['btn_draft'] = 'Modifier le brouillon'; $lang['btn_recover'] = 'Récupérer le brouillon'; $lang['btn_draftdel'] = 'Effacer le brouillon'; $lang['btn_revert'] = 'Restaurer'; -$lang['btn_register'] = 'S\'enregistrer'; +$lang['btn_register'] = 'Créer un compte'; $lang['btn_apply'] = 'Appliquer'; $lang['btn_media'] = 'Gestionnaire de médias'; $lang['btn_deleteuser'] = 'Supprimer mon compte'; diff --git a/lib/plugins/authad/lang/fr/settings.php b/lib/plugins/authad/lang/fr/settings.php index 84e0d00d9..d05390efc 100644 --- a/lib/plugins/authad/lang/fr/settings.php +++ b/lib/plugins/authad/lang/fr/settings.php @@ -4,7 +4,6 @@ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * * @author Bruno Veilleux - * @author Momo50 */ $lang['account_suffix'] = 'Le suffixe de votre compte. Ex.: @mon.domaine.org'; $lang['base_dn'] = 'Votre nom de domaine de base. DC=mon,DC=domaine,DC=org'; @@ -12,7 +11,6 @@ $lang['domain_controllers'] = 'Une liste de contrôleurs de domaine séparés $lang['admin_username'] = 'Un utilisateur Active Directory avec accès aux données de tous les autres utilisateurs. Facultatif, mais nécessaire pour certaines actions telles que l\'envoi de courriels d\'abonnement.'; $lang['admin_password'] = 'Le mot de passe de l\'utilisateur ci-dessus.'; $lang['sso'] = 'Est-ce que la connexion unique (Single-Sign-On) par Kerberos ou NTLM doit être utilisée?'; -$lang['sso_charset'] = 'Le jeu de caractères de votre serveur web va passer le nom d\'utilisateur Kerberos ou NTLM. Vide pour UTF-8 ou latin-1. Nécessite l\'extension iconv.'; $lang['real_primarygroup'] = 'Est-ce que le véritable groupe principal doit être résolu au lieu de présumer "Domain Users" (plus lent)?'; $lang['use_ssl'] = 'Utiliser une connexion SSL? Si utilisée, n\'activez pas TLS ci-dessous.'; $lang['use_tls'] = 'Utiliser une connexion TLS? Si utilisée, n\'activez pas SSL ci-dessus.'; -- cgit v1.2.3 From 176279377b99c01aa3ca08bd1a25b134fe7f97b0 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Fri, 28 Feb 2014 11:20:26 +0100 Subject: fixed merge error --- lib/plugins/authad/lang/fr/settings.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/plugins/authad/lang/fr/settings.php b/lib/plugins/authad/lang/fr/settings.php index d05390efc..84e0d00d9 100644 --- a/lib/plugins/authad/lang/fr/settings.php +++ b/lib/plugins/authad/lang/fr/settings.php @@ -4,6 +4,7 @@ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * * @author Bruno Veilleux + * @author Momo50 */ $lang['account_suffix'] = 'Le suffixe de votre compte. Ex.: @mon.domaine.org'; $lang['base_dn'] = 'Votre nom de domaine de base. DC=mon,DC=domaine,DC=org'; @@ -11,6 +12,7 @@ $lang['domain_controllers'] = 'Une liste de contrôleurs de domaine séparés $lang['admin_username'] = 'Un utilisateur Active Directory avec accès aux données de tous les autres utilisateurs. Facultatif, mais nécessaire pour certaines actions telles que l\'envoi de courriels d\'abonnement.'; $lang['admin_password'] = 'Le mot de passe de l\'utilisateur ci-dessus.'; $lang['sso'] = 'Est-ce que la connexion unique (Single-Sign-On) par Kerberos ou NTLM doit être utilisée?'; +$lang['sso_charset'] = 'Le jeu de caractères de votre serveur web va passer le nom d\'utilisateur Kerberos ou NTLM. Vide pour UTF-8 ou latin-1. Nécessite l\'extension iconv.'; $lang['real_primarygroup'] = 'Est-ce que le véritable groupe principal doit être résolu au lieu de présumer "Domain Users" (plus lent)?'; $lang['use_ssl'] = 'Utiliser une connexion SSL? Si utilisée, n\'activez pas TLS ci-dessous.'; $lang['use_tls'] = 'Utiliser une connexion TLS? Si utilisée, n\'activez pas SSL ci-dessus.'; -- cgit v1.2.3 From 85db969ec27b3f6e656d04a114174a630be90d4c Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Fri, 28 Feb 2014 11:23:43 +0100 Subject: added missing language strings --- lib/plugins/authad/lang/de/lang.php | 10 ++++++++++ lib/plugins/authad/lang/en/lang.php | 10 ++++++++++ lib/plugins/authad/lang/ko/lang.php | 10 ++++++++++ 3 files changed, 30 insertions(+) create mode 100644 lib/plugins/authad/lang/de/lang.php create mode 100644 lib/plugins/authad/lang/en/lang.php create mode 100644 lib/plugins/authad/lang/ko/lang.php diff --git a/lib/plugins/authad/lang/de/lang.php b/lib/plugins/authad/lang/de/lang.php new file mode 100644 index 000000000..3f275750c --- /dev/null +++ b/lib/plugins/authad/lang/de/lang.php @@ -0,0 +1,10 @@ + + */ + +$lang['domain'] = 'Anmelde-Domäne'; + +//Setup VIM: ex: et ts=4 : diff --git a/lib/plugins/authad/lang/en/lang.php b/lib/plugins/authad/lang/en/lang.php new file mode 100644 index 000000000..e2967d662 --- /dev/null +++ b/lib/plugins/authad/lang/en/lang.php @@ -0,0 +1,10 @@ + + */ + +$lang['domain'] = 'Logon Domain'; + +//Setup VIM: ex: et ts=4 : diff --git a/lib/plugins/authad/lang/ko/lang.php b/lib/plugins/authad/lang/ko/lang.php new file mode 100644 index 000000000..1aa436708 --- /dev/null +++ b/lib/plugins/authad/lang/ko/lang.php @@ -0,0 +1,10 @@ + + */ + +$lang['domain'] = '로그온 도메인'; + +//Setup VIM: ex: et ts=4 : -- cgit v1.2.3 From 524df5769a0b9b7aa35af6500c85528c2b0515fe Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Fri, 28 Feb 2014 12:43:19 +0100 Subject: added stripped bit to language file this has been done by a script and might not be 100% accurate --- inc/lang/ar/lang.php | 1 + inc/lang/az/lang.php | 1 + inc/lang/bg/lang.php | 1 + inc/lang/bn/lang.php | 1 + inc/lang/ca-valencia/lang.php | 1 + inc/lang/ca/lang.php | 1 + inc/lang/cs/lang.php | 1 + inc/lang/da/lang.php | 1 + inc/lang/de-informal/lang.php | 1 + inc/lang/de/lang.php | 1 + inc/lang/el/lang.php | 1 + inc/lang/eo/lang.php | 1 + inc/lang/es/lang.php | 1 + inc/lang/et/lang.php | 1 + inc/lang/eu/lang.php | 1 + inc/lang/fa/lang.php | 1 + inc/lang/fi/lang.php | 1 + inc/lang/fo/lang.php | 1 + inc/lang/fr/lang.php | 1 + inc/lang/gl/lang.php | 1 + inc/lang/he/lang.php | 1 + inc/lang/hr/lang.php | 1 + inc/lang/hu-formal/lang.php | 1 + inc/lang/hu/lang.php | 1 + inc/lang/ia/lang.php | 1 + inc/lang/id/lang.php | 1 + inc/lang/it/lang.php | 1 + inc/lang/ja/lang.php | 1 + inc/lang/km/lang.php | 1 + inc/lang/ko/lang.php | 1 + inc/lang/ku/lang.php | 1 + inc/lang/la/lang.php | 1 + inc/lang/lb/lang.php | 1 + inc/lang/lt/lang.php | 1 + inc/lang/lv/lang.php | 1 + inc/lang/mg/lang.php | 1 + inc/lang/mr/lang.php | 1 + inc/lang/ne/lang.php | 1 + inc/lang/nl/lang.php | 1 + inc/lang/no/lang.php | 1 + inc/lang/pl/lang.php | 1 + inc/lang/pt-br/lang.php | 1 + inc/lang/pt/lang.php | 1 + inc/lang/ro/lang.php | 1 + inc/lang/ru/lang.php | 1 + inc/lang/sk/lang.php | 1 + inc/lang/sl/lang.php | 1 + inc/lang/sq/lang.php | 1 + inc/lang/sr/lang.php | 1 + inc/lang/sv/lang.php | 1 + inc/lang/th/lang.php | 1 + inc/lang/tr/lang.php | 1 + inc/lang/uk/lang.php | 1 + inc/lang/vi/lang.php | 1 + inc/lang/zh-tw/lang.php | 1 + inc/lang/zh/lang.php | 1 + 56 files changed, 56 insertions(+) diff --git a/inc/lang/ar/lang.php b/inc/lang/ar/lang.php index 157513429..f5e56de90 100644 --- a/inc/lang/ar/lang.php +++ b/inc/lang/ar/lang.php @@ -341,3 +341,4 @@ $lang['media_restore'] = 'استرجع هذه النسخة'; $lang['currentns'] = 'مساحة الاسم الحالية'; $lang['searchresult'] = 'نتيجة البحث'; $lang['wikimarkup'] = 'علامات الوكي'; +$lang['notloggedin'] = 'الاستمرار، لعلك نسيت تسجيل الدخول؟'; diff --git a/inc/lang/az/lang.php b/inc/lang/az/lang.php index df54b4f10..5ea965626 100644 --- a/inc/lang/az/lang.php +++ b/inc/lang/az/lang.php @@ -215,3 +215,4 @@ $lang['days'] = '%d gün əvvəl'; $lang['hours'] = '%d saat əvvəl'; $lang['minutes'] = '%d dəqiqə əvvəl'; $lang['seconds'] = '%d saniyə əvvəl'; +$lang['notloggedin'] = 'Bəlkə, Siz sistemə oz istifadəçi adınız ilə girməyi unutmusunuz?'; diff --git a/inc/lang/bg/lang.php b/inc/lang/bg/lang.php index bb74ff1ca..79bab5865 100644 --- a/inc/lang/bg/lang.php +++ b/inc/lang/bg/lang.php @@ -330,3 +330,4 @@ $lang['media_update'] = 'Качване на нова версия'; $lang['media_restore'] = 'Възстановяване на тази версия'; $lang['searchresult'] = 'Резултати от търсенето'; $lang['plainhtml'] = 'Обикновен HTML'; +$lang['notloggedin'] = 'Може би сте забравили да се впишете?'; diff --git a/inc/lang/bn/lang.php b/inc/lang/bn/lang.php index 94a3fbb12..f538e47ec 100644 --- a/inc/lang/bn/lang.php +++ b/inc/lang/bn/lang.php @@ -127,3 +127,4 @@ $lang['js']['medialeft'] = 'বাম দিকে ইমেজ সার $lang['js']['mediaright'] = 'ডান দিকে ইমেজ সারিবদ্ধ কর'; $lang['js']['mediacenter'] = 'মাঝখানে ইমেজ সারিবদ্ধ কর'; $lang['js']['medianoalign'] = 'কোনো সারিবদ্ধ করা প্রয়োজন নেই'; +$lang['notloggedin'] = 'সম্ভবত আপনি লগইন ভুলে গেছেন?'; diff --git a/inc/lang/ca-valencia/lang.php b/inc/lang/ca-valencia/lang.php index 9ab423783..e5bd58417 100644 --- a/inc/lang/ca-valencia/lang.php +++ b/inc/lang/ca-valencia/lang.php @@ -220,3 +220,4 @@ $lang['days'] = 'fa %d dies'; $lang['hours'] = 'fa %d hores'; $lang['minutes'] = 'fa %d minuts'; $lang['seconds'] = 'fa %d segons'; +$lang['notloggedin'] = '¿Haurà oblidat iniciar sessió?'; diff --git a/inc/lang/ca/lang.php b/inc/lang/ca/lang.php index fd19c6834..810a613c2 100644 --- a/inc/lang/ca/lang.php +++ b/inc/lang/ca/lang.php @@ -313,3 +313,4 @@ $lang['media_perm_read'] = 'No teniu permisos suficients per a llegir arxi $lang['media_perm_upload'] = 'No teniu permisos suficients per a pujar arxius'; $lang['media_update'] = 'Puja la nova versió'; $lang['media_restore'] = 'Restaura aquesta versió'; +$lang['notloggedin'] = 'Potser us heu descuidat d\'entrar?'; diff --git a/inc/lang/cs/lang.php b/inc/lang/cs/lang.php index a0f69b3dc..8461277ca 100644 --- a/inc/lang/cs/lang.php +++ b/inc/lang/cs/lang.php @@ -342,3 +342,4 @@ $lang['currentns'] = 'Aktuální jmenný prostor'; $lang['searchresult'] = 'Výsledek hledání'; $lang['plainhtml'] = 'Čisté HTML'; $lang['wikimarkup'] = 'Wiki jazyk'; +$lang['notloggedin'] = 'Možná jste se zapomněli přihlásit?'; diff --git a/inc/lang/da/lang.php b/inc/lang/da/lang.php index eb50bb240..c2d892d2a 100644 --- a/inc/lang/da/lang.php +++ b/inc/lang/da/lang.php @@ -336,3 +336,4 @@ $lang['media_perm_read'] = 'Du har ikke nok rettigheder til at læse filer $lang['media_perm_upload'] = 'Du har ikke nok rettigheder til at uploade filer.'; $lang['media_update'] = 'Upload ny version'; $lang['media_restore'] = 'Genskab denne version'; +$lang['notloggedin'] = 'Måske er du ikke logget ind.'; diff --git a/inc/lang/de-informal/lang.php b/inc/lang/de-informal/lang.php index be3f14a18..c9e478649 100644 --- a/inc/lang/de-informal/lang.php +++ b/inc/lang/de-informal/lang.php @@ -343,3 +343,4 @@ $lang['media_update'] = 'Neue Version hochladen'; $lang['media_restore'] = 'Diese Version wiederherstellen'; $lang['currentns'] = 'Aktueller Namensraum'; $lang['searchresult'] = 'Suchergebnis'; +$lang['notloggedin'] = 'Eventuell bist du nicht am Wiki angemeldet?'; diff --git a/inc/lang/de/lang.php b/inc/lang/de/lang.php index 9df1035f7..01f2e81c5 100644 --- a/inc/lang/de/lang.php +++ b/inc/lang/de/lang.php @@ -345,3 +345,4 @@ $lang['media_restore'] = 'Diese Version wiederherstellen'; $lang['currentns'] = 'Aktueller Namensraum'; $lang['searchresult'] = 'Suchergebnisse'; $lang['plainhtml'] = 'HTML Klartext'; +$lang['notloggedin'] = 'Eventuell sind Sie nicht am Wiki angemeldet?'; diff --git a/inc/lang/el/lang.php b/inc/lang/el/lang.php index 170e101a5..89bcc08b3 100644 --- a/inc/lang/el/lang.php +++ b/inc/lang/el/lang.php @@ -330,3 +330,4 @@ $lang['media_perm_upload'] = 'Συγνώμη, δεν έχετε επαρκή $lang['media_update'] = 'Φόρτωση νέας έκδοσης'; $lang['media_restore'] = 'Επαναφορά αυτή της έκδοσης'; $lang['searchresult'] = 'Αποτέλεσμα έρευνας'; +$lang['notloggedin'] = 'Μήπως παραλείψατε να συνδεθείτε;'; diff --git a/inc/lang/eo/lang.php b/inc/lang/eo/lang.php index 97231bdce..3252a6c2b 100644 --- a/inc/lang/eo/lang.php +++ b/inc/lang/eo/lang.php @@ -335,3 +335,4 @@ $lang['currentns'] = 'Aktuala nomspaco'; $lang['searchresult'] = 'Serĉrezulto'; $lang['plainhtml'] = 'Plena HTML'; $lang['wikimarkup'] = 'Vikiteksto'; +$lang['notloggedin'] = 'Eble vi forgesis identiĝi.'; diff --git a/inc/lang/es/lang.php b/inc/lang/es/lang.php index 216093f6c..9dc406aef 100644 --- a/inc/lang/es/lang.php +++ b/inc/lang/es/lang.php @@ -356,3 +356,4 @@ $lang['currentns'] = 'Espacio de nombres actual'; $lang['searchresult'] = 'Resultado de la búsqueda'; $lang['plainhtml'] = 'HTML sencillo'; $lang['wikimarkup'] = 'Etiquetado Wiki'; +$lang['notloggedin'] = '¿Quizás has olvidado identificarte?'; diff --git a/inc/lang/et/lang.php b/inc/lang/et/lang.php index cc736db4d..58877f3bc 100644 --- a/inc/lang/et/lang.php +++ b/inc/lang/et/lang.php @@ -229,3 +229,4 @@ $lang['i_pol0'] = 'Avatud (lugemine, kirjutamine ja üleslaadimin $lang['i_pol1'] = 'Avalikuks lugemiseks (lugeda saavad kõik, kirjutada ja üles laadida vaid registreeritud kasutajad)'; $lang['i_pol2'] = 'Suletud (kõik õigused, kaasaarvatud lugemine on lubatud vaid registreeritud kasutajatele)'; $lang['i_retry'] = 'Proovi uuesti'; +$lang['notloggedin'] = 'liikuda, selleks on vastavaid õigusi vaja.'; diff --git a/inc/lang/eu/lang.php b/inc/lang/eu/lang.php index c7e7ead9a..fb42dfb27 100644 --- a/inc/lang/eu/lang.php +++ b/inc/lang/eu/lang.php @@ -306,3 +306,4 @@ $lang['media_viewold'] = '%s -n %s'; $lang['media_edit'] = '%s editatu'; $lang['media_update'] = 'Bertsio berria igo'; $lang['media_restore'] = 'Bertsio hau berrezarri'; +$lang['notloggedin'] = 'Agian sesioa hastea ahaztu zaizu?'; diff --git a/inc/lang/fa/lang.php b/inc/lang/fa/lang.php index dbad62890..2b4c35b27 100644 --- a/inc/lang/fa/lang.php +++ b/inc/lang/fa/lang.php @@ -324,3 +324,4 @@ $lang['media_perm_read'] = 'متاسفانه ، شما حق خواندن $lang['media_perm_upload'] = 'متاسفانه ، شما حق آپلود این فایل ها را ندارید.'; $lang['media_update'] = 'آپلود نسخه جدید'; $lang['media_restore'] = 'بازیابی این نسخه'; +$lang['notloggedin'] = 'ممکن است فراموش کرده باشید که وارد سایت شوید!'; diff --git a/inc/lang/fi/lang.php b/inc/lang/fi/lang.php index feefc3da8..10a730f3f 100644 --- a/inc/lang/fi/lang.php +++ b/inc/lang/fi/lang.php @@ -334,3 +334,4 @@ $lang['currentns'] = 'Nykyinen nimiavaruus'; $lang['searchresult'] = 'Haun tulokset'; $lang['plainhtml'] = 'pelkkä HTML'; $lang['wikimarkup'] = 'Wiki markup'; +$lang['notloggedin'] = 'Ehkä unohdit kirjautua sisään?'; diff --git a/inc/lang/fo/lang.php b/inc/lang/fo/lang.php index 161e7321a..e4814869f 100644 --- a/inc/lang/fo/lang.php +++ b/inc/lang/fo/lang.php @@ -169,3 +169,4 @@ $lang['img_format'] = 'Snið'; $lang['img_camera'] = 'Fototól'; $lang['img_keywords'] = 'Evnisorð'; $lang['authtempfail'] = 'Validering av brúkara virkar fyribils ikki. Um hetta er varandi, fá so samband við umboðsstjóran á hesi wiki.'; +$lang['notloggedin'] = 'Møguliga hevur tú ikki rita inn.'; diff --git a/inc/lang/fr/lang.php b/inc/lang/fr/lang.php index 49f617323..b50e4eed0 100644 --- a/inc/lang/fr/lang.php +++ b/inc/lang/fr/lang.php @@ -352,3 +352,4 @@ $lang['currentns'] = 'Namespace actuel'; $lang['searchresult'] = 'Résultat de la recherche'; $lang['plainhtml'] = 'HTML brut'; $lang['wikimarkup'] = 'Wiki balise'; +$lang['notloggedin'] = 'poursuivre votre demande. Peut-être avez-vous oublié de vous identifier ?'; diff --git a/inc/lang/gl/lang.php b/inc/lang/gl/lang.php index 65967a3b5..3e5229a17 100644 --- a/inc/lang/gl/lang.php +++ b/inc/lang/gl/lang.php @@ -318,3 +318,4 @@ $lang['media_perm_read'] = 'Sentímolo, non tes permisos suficientes para $lang['media_perm_upload'] = 'Sentímolo, non tes permisos suficientes para subir arquivos.'; $lang['media_update'] = 'Subir nova versión'; $lang['media_restore'] = 'Restaurar esta versión'; +$lang['notloggedin'] = 'Pode que esqueceses iniciar a sesión?'; diff --git a/inc/lang/he/lang.php b/inc/lang/he/lang.php index 8efe0da17..7012c0e17 100644 --- a/inc/lang/he/lang.php +++ b/inc/lang/he/lang.php @@ -325,3 +325,4 @@ $lang['media_sort_date'] = 'תאריך'; $lang['media_namespaces'] = 'בחר מרחב שמות'; $lang['media_files'] = 'קבצים ב s%'; $lang['media_upload'] = 'להעלות s%'; +$lang['notloggedin'] = 'אולי שכחת להיכנס למערכת?'; diff --git a/inc/lang/hr/lang.php b/inc/lang/hr/lang.php index f19610827..fe3a64d4d 100644 --- a/inc/lang/hr/lang.php +++ b/inc/lang/hr/lang.php @@ -263,3 +263,4 @@ $lang['hours'] = '%d sati prije'; $lang['minutes'] = '%d minuta prije'; $lang['seconds'] = '%d sekundi prije'; $lang['wordblock'] = 'Vaša promjena nije spremljena jer sadrži blokirani tekst (spam).'; +$lang['notloggedin'] = 'Niste li se možda zaboravili prijaviti u aplikaciju?'; diff --git a/inc/lang/hu-formal/lang.php b/inc/lang/hu-formal/lang.php index a98bdc0d3..09bbdc58f 100644 --- a/inc/lang/hu-formal/lang.php +++ b/inc/lang/hu-formal/lang.php @@ -25,3 +25,4 @@ $lang['btn_older'] = 'régebbi >>'; $lang['btn_revs'] = 'Korábbi változatok'; $lang['btn_recent'] = 'Legújabb változások'; $lang['btn_upload'] = 'Feltöltés'; +$lang['notloggedin'] = 'Talán elfelejtett bejelentkezni?'; diff --git a/inc/lang/hu/lang.php b/inc/lang/hu/lang.php index a0aef9447..6fb20cc3f 100644 --- a/inc/lang/hu/lang.php +++ b/inc/lang/hu/lang.php @@ -338,3 +338,4 @@ $lang['currentns'] = 'Aktuális névtér'; $lang['searchresult'] = 'Keresés eredménye'; $lang['plainhtml'] = 'Sima HTML'; $lang['wikimarkup'] = 'Wiki-jelölőnyelv'; +$lang['notloggedin'] = 'Esetleg elfelejtettél bejelentkezni?'; diff --git a/inc/lang/ia/lang.php b/inc/lang/ia/lang.php index 144dfe33b..7fc4dbb68 100644 --- a/inc/lang/ia/lang.php +++ b/inc/lang/ia/lang.php @@ -260,3 +260,4 @@ $lang['days'] = '%d dies retro'; $lang['hours'] = '%d horas retro'; $lang['minutes'] = '%d minutas retro'; $lang['seconds'] = '%d secundas retro'; +$lang['notloggedin'] = 'Pote esser que tu ha oblidate de aperir un session.'; diff --git a/inc/lang/id/lang.php b/inc/lang/id/lang.php index 5cb5cb6ea..34c687f1d 100644 --- a/inc/lang/id/lang.php +++ b/inc/lang/id/lang.php @@ -218,3 +218,4 @@ $lang['i_pol0'] = 'Wiki Terbuka (baca, tulis, upload untuk semua $lang['i_pol1'] = 'Wiki Publik (baca untuk semua orang, tulis dan upload untuk pengguna terdaftar)'; $lang['i_pol2'] = 'Wiki Privat (baca, tulis dan upload hanya untuk pengguna terdaftar)'; $lang['i_retry'] = 'Coba Lagi'; +$lang['notloggedin'] = 'Apakah Anda belum login?'; diff --git a/inc/lang/it/lang.php b/inc/lang/it/lang.php index a2bde3b60..95d64e00f 100644 --- a/inc/lang/it/lang.php +++ b/inc/lang/it/lang.php @@ -338,3 +338,4 @@ $lang['media_perm_upload'] = 'Spiacente, non hai abbastanza privilegi per ca $lang['media_update'] = 'Carica nuova versione'; $lang['media_restore'] = 'Ripristina questa versione'; $lang['searchresult'] = 'Risultati della ricerca'; +$lang['notloggedin'] = 'Forse hai dimenticato di effettuare l\'accesso?'; diff --git a/inc/lang/ja/lang.php b/inc/lang/ja/lang.php index 1f53b0a90..367c56a9b 100644 --- a/inc/lang/ja/lang.php +++ b/inc/lang/ja/lang.php @@ -336,3 +336,4 @@ $lang['currentns'] = '現在の名前空間'; $lang['searchresult'] = '検索結果'; $lang['plainhtml'] = 'プレーンHTML'; $lang['wikimarkup'] = 'Wikiマークアップ'; +$lang['notloggedin'] = '実行する権限がありません。ログインされているか確認してください。'; diff --git a/inc/lang/km/lang.php b/inc/lang/km/lang.php index 4800b6c23..5712956b0 100644 --- a/inc/lang/km/lang.php +++ b/inc/lang/km/lang.php @@ -204,3 +204,4 @@ $lang['i_pol2'] = 'វីគីបិទជិត'; $lang['i_retry'] = 'ម្តងទៀត'; //Setup VIM: ex: et ts=2 : +$lang['notloggedin'] = 'សូមទុស អ្នកគ្មានអនុញ្ញាតទៅបណ្តទេ។ '; diff --git a/inc/lang/ko/lang.php b/inc/lang/ko/lang.php index 266ff01e5..120caba78 100644 --- a/inc/lang/ko/lang.php +++ b/inc/lang/ko/lang.php @@ -336,3 +336,4 @@ $lang['currentns'] = '현재 이름공간'; $lang['searchresult'] = '검색 결과'; $lang['plainhtml'] = '일반 HTML'; $lang['wikimarkup'] = '위키 문법'; +$lang['notloggedin'] = '로그인을 잊으셨나요?'; diff --git a/inc/lang/ku/lang.php b/inc/lang/ku/lang.php index b6287806d..a8a1b8cbf 100644 --- a/inc/lang/ku/lang.php +++ b/inc/lang/ku/lang.php @@ -140,3 +140,4 @@ $lang['img_camera'] = 'Camera'; $lang['img_keywords']= 'Keywords'; //Setup VIM: ex: et ts=2 : +$lang['notloggedin'] = 'Perhaps you forgot to login?'; diff --git a/inc/lang/la/lang.php b/inc/lang/la/lang.php index c71a71bdd..885c4f4b8 100644 --- a/inc/lang/la/lang.php +++ b/inc/lang/la/lang.php @@ -260,3 +260,4 @@ $lang['hours'] = 'a horis %d'; $lang['minutes'] = 'a minutis %d'; $lang['seconds'] = 'a secundis %d'; $lang['wordblock'] = 'Mutationes non seruantur, eo quod mala uerba contenit'; +$lang['notloggedin'] = 'Ad hanc paginam accedere non potes: antea in conuentum ineas, deinde rursum temptas '; diff --git a/inc/lang/lb/lang.php b/inc/lang/lb/lang.php index 55113745a..7778478a4 100644 --- a/inc/lang/lb/lang.php +++ b/inc/lang/lb/lang.php @@ -194,3 +194,4 @@ $lang['days'] = 'virun %d Deeg'; $lang['hours'] = 'virun %d Stonnen'; $lang['minutes'] = 'virun %d Minutten'; $lang['seconds'] = 'virun %d Sekonnen'; +$lang['notloggedin'] = 'Hues de vläicht vergiess dech anzeloggen?'; diff --git a/inc/lang/lt/lang.php b/inc/lang/lt/lang.php index c38ea8838..f03d6d5cd 100644 --- a/inc/lang/lt/lang.php +++ b/inc/lang/lt/lang.php @@ -181,3 +181,4 @@ $lang['i_wikiname'] = 'Wiki vardas'; $lang['i_enableacl'] = 'Įjungti ACL (rekomenduojama)'; $lang['i_superuser'] = 'Supervartotojas'; $lang['i_problems'] = 'Instaliavimo metu buvo klaidų, kurios pateiktos žemiau. Tęsti negalima, kol nebus pašalintos priežastys.'; +$lang['notloggedin'] = 'Turbūt pamiršote prisijungti :-).'; diff --git a/inc/lang/lv/lang.php b/inc/lang/lv/lang.php index 898125d60..df16a385d 100644 --- a/inc/lang/lv/lang.php +++ b/inc/lang/lv/lang.php @@ -318,3 +318,4 @@ $lang['media_perm_read'] = 'Atvainojiet, jums nav tiesību skatīt failus. $lang['media_perm_upload'] = 'Atvainojiet, jums nav tiesību augšupielādēt. '; $lang['media_update'] = 'Augšupielādēt jaunu versiju'; $lang['media_restore'] = 'Atjaunot šo versiju'; +$lang['notloggedin'] = 'Varbūt aizmirsi ielogoties?'; diff --git a/inc/lang/mg/lang.php b/inc/lang/mg/lang.php index c5ed669a9..f179f2c28 100644 --- a/inc/lang/mg/lang.php +++ b/inc/lang/mg/lang.php @@ -119,3 +119,4 @@ $lang['js']['del_confirm']= 'Hofafana ilay andalana?'; $lang['admin_register']= 'Ampio mpampiasa vaovao...'; //Setup VIM: ex: et ts=2 : +$lang['notloggedin'] = 'Angamba hadinonao ny niditra.'; diff --git a/inc/lang/mr/lang.php b/inc/lang/mr/lang.php index 54b69974d..15976d4a1 100644 --- a/inc/lang/mr/lang.php +++ b/inc/lang/mr/lang.php @@ -264,3 +264,4 @@ $lang['i_pol1'] = 'सार्वजनिक विकी ( स $lang['i_pol2'] = 'बंदिस्त विकी ( वाचन , लेखन व अपलोडची परवानगी फक्त नोंदणीकृत सदस्यांना ) '; $lang['i_retry'] = 'पुन्हा प्रयत्न'; $lang['recent_global'] = 'तुम्ही सध्या %s या नेमस्पेस मधील बदल पाहात आहात.तुम्ही पूर्ण विकी मधले बदल सुद्धा पाहू शकता.'; +$lang['notloggedin'] = 'कदाचित तुम्ही लॉगिन करायला विसरला आहात ?'; diff --git a/inc/lang/ne/lang.php b/inc/lang/ne/lang.php index 7fd14d2c5..5b24d4c49 100644 --- a/inc/lang/ne/lang.php +++ b/inc/lang/ne/lang.php @@ -192,3 +192,4 @@ $lang['i_pol1'] = 'Public विकि (पठन सवैका $lang['i_pol2'] = 'बन्द विकि (पठन , लेखन, अपलोड ) दर्ता भएका प्रयोगकर्ताका लागि मात्र ।'; $lang['i_retry'] = 'पुन: प्रयास गर्नुहोस् '; $lang['recent_global'] = 'तपाई अहिले %s नेमस्पेस भित्र भएका परिवर्तन हेर्दैहुनुहुन्छ। तपाई पुरै विकिमा भएको परिवर्तन हेर्न सक्नुहुन्छ.'; +$lang['notloggedin'] = 'सम्भवत: तपाईले प्रवेश गर्न भुल्नु भयो।'; diff --git a/inc/lang/nl/lang.php b/inc/lang/nl/lang.php index e5e3e3c76..03574b24f 100644 --- a/inc/lang/nl/lang.php +++ b/inc/lang/nl/lang.php @@ -347,3 +347,4 @@ $lang['currentns'] = 'Huidige namespace'; $lang['searchresult'] = 'Zoekresultaat'; $lang['plainhtml'] = 'Alleen HTML'; $lang['wikimarkup'] = 'Wiki Opmaak'; +$lang['notloggedin'] = 'Misschien ben je vergeten in te loggen?'; diff --git a/inc/lang/no/lang.php b/inc/lang/no/lang.php index 3f31f6c73..278254f3f 100644 --- a/inc/lang/no/lang.php +++ b/inc/lang/no/lang.php @@ -348,3 +348,4 @@ $lang['media_restore'] = 'Gjenopprett denne versjonen'; $lang['currentns'] = 'gjeldende navnemellomrom'; $lang['searchresult'] = 'Søk i resultat'; $lang['plainhtml'] = 'Enkel HTML'; +$lang['notloggedin'] = 'Kanskje du har glemt å logge inn?'; diff --git a/inc/lang/pl/lang.php b/inc/lang/pl/lang.php index e5f2d8d40..6af045226 100644 --- a/inc/lang/pl/lang.php +++ b/inc/lang/pl/lang.php @@ -342,3 +342,4 @@ $lang['currentns'] = 'Obecny katalog'; $lang['searchresult'] = 'Wyniki wyszukiwania'; $lang['plainhtml'] = 'Czysty HTML'; $lang['wikimarkup'] = 'Znaczniki'; +$lang['notloggedin'] = 'Zaloguj się!'; diff --git a/inc/lang/pt-br/lang.php b/inc/lang/pt-br/lang.php index 6845e792d..bf92e06ed 100644 --- a/inc/lang/pt-br/lang.php +++ b/inc/lang/pt-br/lang.php @@ -349,3 +349,4 @@ $lang['currentns'] = 'Domínio atual'; $lang['searchresult'] = 'Resultado da Busca'; $lang['plainhtml'] = 'HTML simples'; $lang['wikimarkup'] = 'Marcação wiki'; +$lang['notloggedin'] = 'Por acaso esqueceu de autenticar-se?'; diff --git a/inc/lang/pt/lang.php b/inc/lang/pt/lang.php index 46405c444..230db88da 100644 --- a/inc/lang/pt/lang.php +++ b/inc/lang/pt/lang.php @@ -319,3 +319,4 @@ $lang['media_perm_read'] = 'Perdão, não tem permissão para ler ficheiro $lang['media_perm_upload'] = 'Perdão, não tem permissão para enviar ficheiros.'; $lang['media_update'] = 'enviar nova versão'; $lang['media_restore'] = 'Restaurar esta versão'; +$lang['notloggedin'] = 'Talvez se tenha esquecido de iniciar sessão?'; diff --git a/inc/lang/ro/lang.php b/inc/lang/ro/lang.php index 491ab58e7..fe0842e1e 100644 --- a/inc/lang/ro/lang.php +++ b/inc/lang/ro/lang.php @@ -319,3 +319,4 @@ $lang['media_perm_read'] = 'Ne pare rău, dar nu ai suficiente permisiuni $lang['media_perm_upload'] = 'Ne pare rău, dar nu ai suficiente permisiuni pentru a putea încărca fișiere.'; $lang['media_update'] = 'Încarcă noua versiune'; $lang['media_restore'] = 'Restaurează această versiune'; +$lang['notloggedin'] = 'autentifici?'; diff --git a/inc/lang/ru/lang.php b/inc/lang/ru/lang.php index 208d647a8..9a393193a 100644 --- a/inc/lang/ru/lang.php +++ b/inc/lang/ru/lang.php @@ -350,3 +350,4 @@ $lang['media_restore'] = 'Восстановить эту версию'; $lang['currentns'] = 'Текущее пространство имен'; $lang['searchresult'] = 'Результаты поиска'; $lang['plainhtml'] = 'Чистый HTML'; +$lang['notloggedin'] = 'Может быть вы забыли войти в вики под своим логином?'; diff --git a/inc/lang/sk/lang.php b/inc/lang/sk/lang.php index aa823b074..47cdc1fe4 100644 --- a/inc/lang/sk/lang.php +++ b/inc/lang/sk/lang.php @@ -332,3 +332,4 @@ $lang['currentns'] = 'Aktuálny menný priestor'; $lang['searchresult'] = 'Výsledky hľadania'; $lang['plainhtml'] = 'Jednoduché HTML'; $lang['wikimarkup'] = 'Wiki formát'; +$lang['notloggedin'] = 'Možno ste sa zabudli prihlásiť?'; diff --git a/inc/lang/sl/lang.php b/inc/lang/sl/lang.php index c9a47927d..41e2b3b12 100644 --- a/inc/lang/sl/lang.php +++ b/inc/lang/sl/lang.php @@ -327,3 +327,4 @@ $lang['currentns'] = 'Trenutni imenski prostor'; $lang['searchresult'] = 'Rezultati iskanja'; $lang['plainhtml'] = 'Zapis HTML'; $lang['wikimarkup'] = 'Oblikovni jezik Wiki'; +$lang['notloggedin'] = 'Ali ste se morda pozabili prijaviti?'; diff --git a/inc/lang/sq/lang.php b/inc/lang/sq/lang.php index 2ed62ed4e..ab9208e55 100644 --- a/inc/lang/sq/lang.php +++ b/inc/lang/sq/lang.php @@ -235,3 +235,4 @@ $lang['days'] = '%d ditë më parë'; $lang['hours'] = '%d orë më parë'; $lang['minutes'] = '%d minuta më parë'; $lang['seconds'] = '%d sekonda më parë'; +$lang['notloggedin'] = 'Mbase harruat të hyni?'; diff --git a/inc/lang/sr/lang.php b/inc/lang/sr/lang.php index 7c434cbc9..53faa69ec 100644 --- a/inc/lang/sr/lang.php +++ b/inc/lang/sr/lang.php @@ -260,3 +260,4 @@ $lang['hours'] = 'Пре %d сати'; $lang['minutes'] = 'Пре %d минута'; $lang['seconds'] = 'Пре %d секунди'; $lang['wordblock'] = 'Ваше измене нису сачуване јер садрже забрањен текст (спам)'; +$lang['notloggedin'] = 'Можда сте заборавили да се пријавите?'; diff --git a/inc/lang/sv/lang.php b/inc/lang/sv/lang.php index 8c8858f61..867d038c4 100644 --- a/inc/lang/sv/lang.php +++ b/inc/lang/sv/lang.php @@ -343,3 +343,4 @@ $lang['media_update'] = 'Ladda upp ny version'; $lang['media_restore'] = 'Återställ denna version'; $lang['searchresult'] = 'Sökresultat'; $lang['plainhtml'] = 'Ren HTML'; +$lang['notloggedin'] = 'Kanske har du glömt att logga in?'; diff --git a/inc/lang/th/lang.php b/inc/lang/th/lang.php index 5d364166b..2e6abe6b6 100644 --- a/inc/lang/th/lang.php +++ b/inc/lang/th/lang.php @@ -219,3 +219,4 @@ $lang['days'] = '%d วันก่อน'; $lang['hours'] = '%d ชั่วโมงก่อน'; $lang['minutes'] = '%d นาทีก่อน'; $lang['seconds'] = '%d วินาทีก่อน'; +$lang['notloggedin'] = 'บางทีคุณอาจจะลืมล็อกอิน?'; diff --git a/inc/lang/tr/lang.php b/inc/lang/tr/lang.php index 210a82530..a9c90054c 100644 --- a/inc/lang/tr/lang.php +++ b/inc/lang/tr/lang.php @@ -304,3 +304,4 @@ $lang['media_history'] = 'Geçmiş %s'; $lang['media_perm_upload'] = 'Üzgünüm, karşıya dosya yükleme yetkiniz yok.'; $lang['media_update'] = 'Yeni versiyonu yükleyin'; $lang['media_restore'] = 'Bu sürümü eski haline getir'; +$lang['notloggedin'] = 'Giriş yapmayı unutmuş olabilir misiniz?'; diff --git a/inc/lang/uk/lang.php b/inc/lang/uk/lang.php index 4e91e82a2..d09360479 100644 --- a/inc/lang/uk/lang.php +++ b/inc/lang/uk/lang.php @@ -285,3 +285,4 @@ $lang['hours'] = '%d годин тому'; $lang['minutes'] = '%d хвилин тому'; $lang['seconds'] = '%d секунд тому'; $lang['wordblock'] = 'Ваші зміни не збережено, тому що вони розпізнані як такі, що містять заблокований текст(спам).'; +$lang['notloggedin'] = 'Можливо ви забули увійти в систему?'; diff --git a/inc/lang/vi/lang.php b/inc/lang/vi/lang.php index d8e40f875..b99311f1a 100644 --- a/inc/lang/vi/lang.php +++ b/inc/lang/vi/lang.php @@ -239,3 +239,4 @@ $lang['media_perm_read'] = 'Sorry, bạn không đủ quyền truy cập.' $lang['media_perm_upload'] = 'Xin lỗi, bạn không đủ quyền để upload file lên.'; $lang['media_update'] = 'Tải lên phiên bản mới'; $lang['media_restore'] = 'Phục hồi phiên bản này'; +$lang['notloggedin'] = 'Bạn quên đăng nhập hay sao?'; diff --git a/inc/lang/zh-tw/lang.php b/inc/lang/zh-tw/lang.php index 456377810..b230cd70d 100644 --- a/inc/lang/zh-tw/lang.php +++ b/inc/lang/zh-tw/lang.php @@ -341,3 +341,4 @@ $lang['currentns'] = '目前的命名空間'; $lang['searchresult'] = '搜尋結果'; $lang['plainhtml'] = '純 HTML'; $lang['wikimarkup'] = 'Wiki 語法標記'; +$lang['notloggedin'] = '抱歉,您沒有足夠權限繼續執行。或許您忘了登入?'; diff --git a/inc/lang/zh/lang.php b/inc/lang/zh/lang.php index 004997d6e..c3fdae46b 100644 --- a/inc/lang/zh/lang.php +++ b/inc/lang/zh/lang.php @@ -349,3 +349,4 @@ $lang['currentns'] = '当前命名空间'; $lang['searchresult'] = '搜索结果'; $lang['plainhtml'] = '纯HTML'; $lang['wikimarkup'] = 'Wiki Markup 语言'; +$lang['notloggedin'] = '对不起,您没有足够权限,无法继续。也许您忘了登录?'; -- cgit v1.2.3 From 8743dba0f5f8e6b92be336cafca4c71d0e137bcd Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Fri, 28 Feb 2014 13:23:18 +0100 Subject: removed script, added README instead --- lib/images/fileicons/README | 2 ++ lib/images/fileicons/generate.php | 44 --------------------------------------- 2 files changed, 2 insertions(+), 44 deletions(-) create mode 100644 lib/images/fileicons/README delete mode 100644 lib/images/fileicons/generate.php diff --git a/lib/images/fileicons/README b/lib/images/fileicons/README new file mode 100644 index 000000000..05385861e --- /dev/null +++ b/lib/images/fileicons/README @@ -0,0 +1,2 @@ +For the generator of these files see +https://github.com/splitbrain/file-icon-generator/blob/master/example-dokuwiki.php diff --git a/lib/images/fileicons/generate.php b/lib/images/fileicons/generate.php deleted file mode 100644 index b08749f49..000000000 --- a/lib/images/fileicons/generate.php +++ /dev/null @@ -1,44 +0,0 @@ -create16x16($ext,"16x16/$ext.png"); - $DFIB->create32x32($ext,"32x32/$ext.png"); -} - -copy("16x16/jpg.png", "16x16/jpeg.png"); -copy("32x32/jpg.png", "32x32/jpeg.png"); - -copy("16x16/htm.png", "16x16/html.png"); -copy("32x32/htm.png", "32x32/html.png"); - -- cgit v1.2.3 From c09f0eb1d9009ce0a7d2a12c41b125957604eff5 Mon Sep 17 00:00:00 2001 From: Gerrit Uitslag Date: Fri, 28 Feb 2014 17:13:42 +0100 Subject: define overridable constants for session properties FS#1913 --- inc/init.php | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/inc/init.php b/inc/init.php index 3e422453d..08f4b45b9 100644 --- a/inc/init.php +++ b/inc/init.php @@ -140,18 +140,23 @@ if ($conf['gzip_output'] && } // init session -if (!headers_sent() && !defined('NOSESSION')){ - session_name("DokuWiki"); +if(!headers_sent() && !defined('NOSESSION')) { + if(!defined('DOKU_SESSION_NAME')) define ('DOKU_SESSION_NAME', "DokuWiki"); + if(!defined('DOKU_SESSION_LIFETIME')) define ('DOKU_SESSION_LIFETIME', 0); $cookieDir = empty($conf['cookiedir']) ? DOKU_REL : $conf['cookiedir']; - if (version_compare(PHP_VERSION, '5.2.0', '>')) { - session_set_cookie_params(0,$cookieDir,'',($conf['securecookie'] && is_ssl()),true); - }else{ - session_set_cookie_params(0,$cookieDir,'',($conf['securecookie'] && is_ssl())); + if(!defined('DOKU_SESSION_PATH')) define ('DOKU_SESSION_PATH', $cookieDir); + if(!defined('DOKU_SESSION_DOMAIN')) define ('DOKU_SESSION_DOMAIN', ''); + + session_name(DOKU_SESSION_NAME); + if(version_compare(PHP_VERSION, '5.2.0', '>')) { + session_set_cookie_params(DOKU_SESSION_LIFETIME, DOKU_SESSION_PATH, DOKU_SESSION_DOMAIN, ($conf['securecookie'] && is_ssl()), true); + } else { + session_set_cookie_params(DOKU_SESSION_LIFETIME, DOKU_SESSION_PATH, DOKU_SESSION_DOMAIN, ($conf['securecookie'] && is_ssl())); } session_start(); // load left over messages - if(isset($_SESSION[DOKU_COOKIE]['msg'])){ + if(isset($_SESSION[DOKU_COOKIE]['msg'])) { $MSG = $_SESSION[DOKU_COOKIE]['msg']; unset($_SESSION[DOKU_COOKIE]['msg']); } -- cgit v1.2.3 From 5ee37844b9e6f852bf16da41e5c07f056ec376d1 Mon Sep 17 00:00:00 2001 From: Christopher Smith Date: Fri, 28 Feb 2014 16:55:57 +0000 Subject: remove rendundant msg --- inc/parserutils.php | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/inc/parserutils.php b/inc/parserutils.php index c12732e88..b41e2d473 100644 --- a/inc/parserutils.php +++ b/inc/parserutils.php @@ -638,13 +638,8 @@ function p_get_renderer($mode) { // not bundled, see if its an enabled plugin for rendering $mode $Renderer = $plugin_controller->load('renderer',$rname); - if ($Renderer) { - if (is_a($Renderer, 'Doku_Renderer') && ($mode == $Renderer->getFormat())) { - return $Renderer; - } else { - // plugin found, but not a renderer or not the right renderer for this $mode - msg("Renderer plugin '$rname' not valid for $mode",-1,'','',MSG_ADMINS_ONLY); - } + if (is_a($Renderer, 'Doku_Renderer') && ($mode == $Renderer->getFormat())) { + return $Renderer; } // there is a configuration error! -- cgit v1.2.3 From 489dcad6f038c54dda1f29c0887fa43f5b3f7fcb Mon Sep 17 00:00:00 2001 From: Christopher Smith Date: Fri, 28 Feb 2014 16:56:29 +0000 Subject: remove require handled by autoloader --- inc/parser/renderer.php | 1 - 1 file changed, 1 deletion(-) diff --git a/inc/parser/renderer.php b/inc/parser/renderer.php index 6b6a1770b..1f9ad00a2 100644 --- a/inc/parser/renderer.php +++ b/inc/parser/renderer.php @@ -6,7 +6,6 @@ * @author Andreas Gohr */ if(!defined('DOKU_INC')) die('meh.'); -require_once DOKU_INC . 'inc/pluginutils.php'; /** * An empty renderer, produces no output -- cgit v1.2.3 From 0e6682672bb6ed779e4d8585c07cdc0ed57d81e5 Mon Sep 17 00:00:00 2001 From: "Khan M. B. Asad" Date: Sun, 2 Mar 2014 01:25:21 +0100 Subject: translation update --- inc/lang/bn/lang.php | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/inc/lang/bn/lang.php b/inc/lang/bn/lang.php index 94a3fbb12..230f3ef80 100644 --- a/inc/lang/bn/lang.php +++ b/inc/lang/bn/lang.php @@ -5,6 +5,7 @@ * * @author Foysol * @author ninetailz + * @author Khan M. B. Asad */ $lang['encoding'] = 'utf-8'; $lang['direction'] = 'itr'; @@ -127,3 +128,33 @@ $lang['js']['medialeft'] = 'বাম দিকে ইমেজ সার $lang['js']['mediaright'] = 'ডান দিকে ইমেজ সারিবদ্ধ কর'; $lang['js']['mediacenter'] = 'মাঝখানে ইমেজ সারিবদ্ধ কর'; $lang['js']['medianoalign'] = 'কোনো সারিবদ্ধ করা প্রয়োজন নেই'; +$lang['js']['nosmblinks'] = 'উইন্ডোস শেয়ার এর সাথে সংযোগ সাধন কেবল মাইক্রোসফ্ট ইন্টারনেট এক্সপ্লোরারেই সম্ভব।\nতবে আপনি লিংকটি কপি পেস্ট করতেই পারেন।'; +$lang['js']['linkwiz'] = 'লিংক উইজার্ড'; +$lang['js']['linkto'] = 'সংযোগের লক্ষ্য:'; +$lang['js']['del_confirm'] = 'নির্বাচিত আইটেম(গুলো) আসলেই মুছে ফেলতে চান?'; +$lang['js']['restore_confirm'] = 'এই সংস্করণ সত্যিই পূর্বাবস্থায় ফিরিয়ে আনতে চান?'; +$lang['js']['media_diff'] = 'পার্থক্যগুলো দেখুন:'; +$lang['js']['media_diff_both'] = 'পাশাপাশি'; +$lang['js']['media_diff_opacity'] = 'শাইন-থ্রু'; +$lang['js']['media_diff_portions'] = 'ঝেঁটিয়ে বিদায়'; +$lang['js']['media_select'] = 'ফাইল নির্বাচন...'; +$lang['js']['media_upload_btn'] = 'আপলোড'; +$lang['js']['media_done_btn'] = 'সাধিত'; +$lang['js']['media_drop'] = 'আপলোডের জন্য এখানে ফাইল ফেলুন'; +$lang['js']['media_cancel'] = 'অপসারণ'; +$lang['js']['media_overwrt'] = 'বর্তমান ফাইল ওভাররাইট করুন'; +$lang['rssfailed'] = 'ফিডটি জোগাড় করতে গিয়ে একটি ত্রুটি ঘটেছে:'; +$lang['nothingfound'] = 'কিছু পাওয়া যায়নি।'; +$lang['mediaselect'] = 'মিডিয়া ফাইল'; +$lang['fileupload'] = 'মিডিয়া ফাইল আপলোড'; +$lang['uploadsucc'] = 'আপলোড সফল'; +$lang['uploadfail'] = 'আপলোড ব্যর্থ। অনুমতি জনিত ত্রুটি কী?'; +$lang['uploadwrong'] = 'আপলোড প্রত্যাখ্যাত। এই ফাইল এক্সটেনশন অননুমোদিত।'; +$lang['uploadexist'] = 'ফাইল ইতিমধ্যেই বিরাজমান। কিছু করা হয়নি।'; +$lang['uploadbadcontent'] = 'আপলোডকৃত সামগ্রী %s ফাইল এক্সটেনশন এর সাথে মিলেনি।'; +$lang['uploadspam'] = 'স্প্যাম ব্ল্যাকলিস্ট আপলোড আটকে দিয়েছে।'; +$lang['uploadxss'] = 'সামগ্রীটি ক্ষতিকর ভেবে আপলোড আটকে দেয়া হয়েছে।'; +$lang['uploadsize'] = 'আপলোডকৃত ফাইলটি বেশি বড়ো। (সর্বোচ্চ %s)'; +$lang['deletesucc'] = '"%s" ফাইলটি মুছে ফেলা হয়েছে।'; +$lang['deletefail'] = '"%s" ডিলিট করা যায়নি - অনুমতি আছে কি না দেখুন।'; +$lang['mediainuse'] = '"%s" ফাইলটি মোছা হয়নি - এটি এখনো ব্যবহৃত হচ্ছে।'; -- cgit v1.2.3 From 2400ddcb0585bd4bba5d4abeb1be8e2f4ebc56d6 Mon Sep 17 00:00:00 2001 From: Christopher Smith Date: Sun, 2 Mar 2014 20:38:18 +0000 Subject: correct mis-spelled var name and correct empty password fields test --- lib/plugins/usermanager/admin.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/plugins/usermanager/admin.php b/lib/plugins/usermanager/admin.php index aac2da605..eadfb76ad 100644 --- a/lib/plugins/usermanager/admin.php +++ b/lib/plugins/usermanager/admin.php @@ -632,7 +632,7 @@ class admin_plugin_usermanager extends DokuWiki_Admin_Plugin { } } if ($this->_auth->canDo('modPass')) { - if ($newpass || $confirm) { + if ($newpass || $passconfirm) { if ($this->_verifyPassword($newpass,$passconfirm)) { $changes['pass'] = $newpass; } else { @@ -712,7 +712,7 @@ class admin_plugin_usermanager extends DokuWiki_Admin_Plugin { protected function _verifyPassword($password, $confirm) { global $lang; - if (empty($password)) { + if (empty($password) && empty($confirm)) { return false; } -- cgit v1.2.3 From 709fd92548efedbd4b4e5693097165d1dff072e4 Mon Sep 17 00:00:00 2001 From: Christopher Smith Date: Sun, 2 Mar 2014 20:46:26 +0000 Subject: resolve scrutinizer issue, is_a type hint doesn't allow null --- inc/parserutils.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inc/parserutils.php b/inc/parserutils.php index b41e2d473..06bd6dbb8 100644 --- a/inc/parserutils.php +++ b/inc/parserutils.php @@ -638,7 +638,7 @@ function p_get_renderer($mode) { // not bundled, see if its an enabled plugin for rendering $mode $Renderer = $plugin_controller->load('renderer',$rname); - if (is_a($Renderer, 'Doku_Renderer') && ($mode == $Renderer->getFormat())) { + if ($Renderer && is_a($Renderer, 'Doku_Renderer') && ($mode == $Renderer->getFormat())) { return $Renderer; } -- cgit v1.2.3 From 55a71a16cbfacd3836ca70e37e45f85bd44ceab1 Mon Sep 17 00:00:00 2001 From: Gerrit Uitslag Date: Tue, 4 Mar 2014 21:14:24 +0100 Subject: removed pre PHP 5.2 code wrt setcookie and session setting - moved cookiedir determination in the if-statement --- inc/auth.php | 13 +++---------- inc/init.php | 12 +++++------- 2 files changed, 8 insertions(+), 17 deletions(-) diff --git a/inc/auth.php b/inc/auth.php index 8fde129aa..6c4636b2f 100644 --- a/inc/auth.php +++ b/inc/auth.php @@ -528,11 +528,7 @@ function auth_logoff($keepbc = false) { $USERINFO = null; //FIXME $cookieDir = empty($conf['cookiedir']) ? DOKU_REL : $conf['cookiedir']; - if(version_compare(PHP_VERSION, '5.2.0', '>')) { - setcookie(DOKU_COOKIE, '', time() - 600000, $cookieDir, '', ($conf['securecookie'] && is_ssl()), true); - } else { - setcookie(DOKU_COOKIE, '', time() - 600000, $cookieDir, '', ($conf['securecookie'] && is_ssl())); - } + setcookie(DOKU_COOKIE, '', time() - 600000, $cookieDir, '', ($conf['securecookie'] && is_ssl()), true); if($auth) $auth->logOff(); } @@ -1319,11 +1315,8 @@ function auth_setCookie($user, $pass, $sticky) { $cookie = base64_encode($user).'|'.((int) $sticky).'|'.base64_encode($pass); $cookieDir = empty($conf['cookiedir']) ? DOKU_REL : $conf['cookiedir']; $time = $sticky ? (time() + 60 * 60 * 24 * 365) : 0; //one year - if(version_compare(PHP_VERSION, '5.2.0', '>')) { - setcookie(DOKU_COOKIE, $cookie, $time, $cookieDir, '', ($conf['securecookie'] && is_ssl()), true); - } else { - setcookie(DOKU_COOKIE, $cookie, $time, $cookieDir, '', ($conf['securecookie'] && is_ssl())); - } + setcookie(DOKU_COOKIE, $cookie, $time, $cookieDir, '', ($conf['securecookie'] && is_ssl()), true); + // set session $_SESSION[DOKU_COOKIE]['auth']['user'] = $user; $_SESSION[DOKU_COOKIE]['auth']['pass'] = sha1($pass); diff --git a/inc/init.php b/inc/init.php index 08f4b45b9..9b8465911 100644 --- a/inc/init.php +++ b/inc/init.php @@ -143,16 +143,14 @@ if ($conf['gzip_output'] && if(!headers_sent() && !defined('NOSESSION')) { if(!defined('DOKU_SESSION_NAME')) define ('DOKU_SESSION_NAME', "DokuWiki"); if(!defined('DOKU_SESSION_LIFETIME')) define ('DOKU_SESSION_LIFETIME', 0); - $cookieDir = empty($conf['cookiedir']) ? DOKU_REL : $conf['cookiedir']; - if(!defined('DOKU_SESSION_PATH')) define ('DOKU_SESSION_PATH', $cookieDir); + if(!defined('DOKU_SESSION_PATH')) { + $cookieDir = empty($conf['cookiedir']) ? DOKU_REL : $conf['cookiedir']; + define ('DOKU_SESSION_PATH', $cookieDir); + } if(!defined('DOKU_SESSION_DOMAIN')) define ('DOKU_SESSION_DOMAIN', ''); session_name(DOKU_SESSION_NAME); - if(version_compare(PHP_VERSION, '5.2.0', '>')) { - session_set_cookie_params(DOKU_SESSION_LIFETIME, DOKU_SESSION_PATH, DOKU_SESSION_DOMAIN, ($conf['securecookie'] && is_ssl()), true); - } else { - session_set_cookie_params(DOKU_SESSION_LIFETIME, DOKU_SESSION_PATH, DOKU_SESSION_DOMAIN, ($conf['securecookie'] && is_ssl())); - } + session_set_cookie_params(DOKU_SESSION_LIFETIME, DOKU_SESSION_PATH, DOKU_SESSION_DOMAIN, ($conf['securecookie'] && is_ssl()), true); session_start(); // load left over messages -- cgit v1.2.3 From f019ab46c33b430831053cd41b5b04a163fd529f Mon Sep 17 00:00:00 2001 From: Gerrit Uitslag Date: Tue, 4 Mar 2014 21:27:10 +0100 Subject: added login form at denied access page - restore lang string as well --- inc/html.php | 4 ++++ inc/lang/en/lang.php | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/inc/html.php b/inc/html.php index 507ba511e..514f961e7 100644 --- a/inc/html.php +++ b/inc/html.php @@ -81,6 +81,10 @@ function html_denied() { $denied ); print $denied; + + if(!$_SERVER['REMOTE_USER']){ + html_login(); + } } /** diff --git a/inc/lang/en/lang.php b/inc/lang/en/lang.php index b95a8a58a..fccb470e3 100644 --- a/inc/lang/en/lang.php +++ b/inc/lang/en/lang.php @@ -78,7 +78,7 @@ $lang['regbadmail'] = 'The given email address looks invalid - if you $lang['regbadpass'] = 'The two given passwords are not identical, please try again.'; $lang['regpwmail'] = 'Your DokuWiki password'; $lang['reghere'] = 'You don\'t have an account yet? Just get one'; -$lang['notloggedin'] = 'Please be aware you are not logged in.'; +$lang['notloggedin'] = 'Perhaps you forgot to login?'; $lang['profna'] = 'This wiki does not support profile modification'; $lang['profnochange'] = 'No changes, nothing to do.'; -- cgit v1.2.3 From ddf7ce094f821dc45273f75203e5da7838d96e96 Mon Sep 17 00:00:00 2001 From: Cupen Date: Wed, 5 Mar 2014 09:26:40 +0100 Subject: translation update --- inc/lang/zh/lang.php | 1 + lib/plugins/extension/lang/zh/intro_install.txt | 1 + lib/plugins/extension/lang/zh/intro_search.txt | 1 + lib/plugins/extension/lang/zh/intro_templates.txt | 1 + lib/plugins/extension/lang/zh/lang.php | 33 +++++++++++++++++++++++ 5 files changed, 37 insertions(+) create mode 100644 lib/plugins/extension/lang/zh/intro_install.txt create mode 100644 lib/plugins/extension/lang/zh/intro_search.txt create mode 100644 lib/plugins/extension/lang/zh/intro_templates.txt create mode 100644 lib/plugins/extension/lang/zh/lang.php diff --git a/inc/lang/zh/lang.php b/inc/lang/zh/lang.php index 004997d6e..57110bae3 100644 --- a/inc/lang/zh/lang.php +++ b/inc/lang/zh/lang.php @@ -20,6 +20,7 @@ * @author Yangyu Huang * @author anjianshi * @author oott123 + * @author Cupen */ $lang['encoding'] = 'utf-8'; $lang['direction'] = 'ltr'; diff --git a/lib/plugins/extension/lang/zh/intro_install.txt b/lib/plugins/extension/lang/zh/intro_install.txt new file mode 100644 index 000000000..640839319 --- /dev/null +++ b/lib/plugins/extension/lang/zh/intro_install.txt @@ -0,0 +1 @@ +你可以通过上传或直接提供下载链接来安装插件和模板。 \ No newline at end of file diff --git a/lib/plugins/extension/lang/zh/intro_search.txt b/lib/plugins/extension/lang/zh/intro_search.txt new file mode 100644 index 000000000..0059075c0 --- /dev/null +++ b/lib/plugins/extension/lang/zh/intro_search.txt @@ -0,0 +1 @@ +这个标签会为你展示所有DokuWiki的第三方插件和模板。但你需要知道这些由第三方提供的代码可能会给你带来**安全方面的风险**,你最好先读一下[[doku>security#plugin_security|插件安全性]]。 \ No newline at end of file diff --git a/lib/plugins/extension/lang/zh/intro_templates.txt b/lib/plugins/extension/lang/zh/intro_templates.txt new file mode 100644 index 000000000..20575d381 --- /dev/null +++ b/lib/plugins/extension/lang/zh/intro_templates.txt @@ -0,0 +1 @@ +DokuWiki当前所使用的模板已经安装了,你可以在[[?do=admin&page=config|配置管理器]]里选择你要的模板。 \ No newline at end of file diff --git a/lib/plugins/extension/lang/zh/lang.php b/lib/plugins/extension/lang/zh/lang.php new file mode 100644 index 000000000..b5d77b1dd --- /dev/null +++ b/lib/plugins/extension/lang/zh/lang.php @@ -0,0 +1,33 @@ + + */ +$lang['menu'] = '扩展管理器'; +$lang['tab_plugins'] = '安装插件'; +$lang['tab_templates'] = '安装模板'; +$lang['tab_search'] = '搜索和安装'; +$lang['tab_install'] = '手动安装'; +$lang['notimplemented'] = '未实现的特性'; +$lang['notinstalled'] = '该扩展未安装'; +$lang['alreadyenabled'] = '该扩展已激活'; +$lang['alreadydisabled'] = '该扩展已关闭'; +$lang['pluginlistsaveerror'] = '保存插件列表时碰到个错误'; +$lang['unknownauthor'] = '未知作者'; +$lang['unknownversion'] = '未知版本'; +$lang['btn_info'] = '查看更多信息'; +$lang['btn_update'] = '更新'; +$lang['btn_uninstall'] = '卸载'; +$lang['btn_enable'] = '激活'; +$lang['btn_disable'] = '关闭'; +$lang['btn_install'] = '安装'; +$lang['btn_reinstall'] = '重新安装'; +$lang['js']['reallydel'] = '确定卸载这个扩展么?'; +$lang['search_for'] = '搜索扩展'; +$lang['search'] = '搜索'; +$lang['extensionby'] = '%s by %s'; +$lang['screenshot'] = '%s 的截图'; +$lang['popularity'] = '人气: %s%%'; +$lang['homepage_link'] = '文档'; -- cgit v1.2.3 From 9a9ddee0317986914ffa1990917c4267b04b5370 Mon Sep 17 00:00:00 2001 From: xiqingongzi Date: Wed, 5 Mar 2014 14:36:01 +0100 Subject: translation update --- inc/lang/zh/lang.php | 1 + lib/plugins/extension/lang/zh/lang.php | 17 +++++++++++++++++ 2 files changed, 18 insertions(+) diff --git a/inc/lang/zh/lang.php b/inc/lang/zh/lang.php index 57110bae3..8777c65a5 100644 --- a/inc/lang/zh/lang.php +++ b/inc/lang/zh/lang.php @@ -21,6 +21,7 @@ * @author anjianshi * @author oott123 * @author Cupen + * @author xiqingongzi */ $lang['encoding'] = 'utf-8'; $lang['direction'] = 'ltr'; diff --git a/lib/plugins/extension/lang/zh/lang.php b/lib/plugins/extension/lang/zh/lang.php index b5d77b1dd..b9db01540 100644 --- a/lib/plugins/extension/lang/zh/lang.php +++ b/lib/plugins/extension/lang/zh/lang.php @@ -4,6 +4,7 @@ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * * @author Cupen + * @author xiqingongzi */ $lang['menu'] = '扩展管理器'; $lang['tab_plugins'] = '安装插件'; @@ -31,3 +32,19 @@ $lang['extensionby'] = '%s by %s'; $lang['screenshot'] = '%s 的截图'; $lang['popularity'] = '人气: %s%%'; $lang['homepage_link'] = '文档'; +$lang['bugs_features'] = '错误'; +$lang['tags'] = '标签:'; +$lang['author_hint'] = '搜索这个作者的插件'; +$lang['installed'] = '已安装的:'; +$lang['downloadurl'] = '下载地址:'; +$lang['repository'] = '版本库:'; +$lang['unknown'] = '未知的'; +$lang['installed_version'] = '已安装版本:'; +$lang['install_date'] = '您的最后一次升级:'; +$lang['donate'] = '喜欢?'; +$lang['donate_action'] = '捐给作者一杯咖啡钱!'; +$lang['repo_retry'] = '重试'; +$lang['status'] = '现状:'; +$lang['status_installed'] = '已安装的'; +$lang['status_plugin'] = '插件'; +$lang['status_template'] = '模板'; -- cgit v1.2.3 From fc8dbb92180ea98835a9e9cc701afe512b8fd47b Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Wed, 5 Mar 2014 16:43:08 +0100 Subject: updates jquery and jquery ui we now pull jQuery directly from jquery's CDN instead of google because google serves slightly outdated versions under the /1/ branch The updated smoothness theme currently breaks compression. Haven't figured out why, yet. --- inc/lang/es/jquery.ui.datepicker.js | 4 +- .../images/ui-bg_flat_0_aaaaaa_40x100.png | Bin 212 -> 264 bytes .../images/ui-bg_flat_75_ffffff_40x100.png | Bin 208 -> 260 bytes .../images/ui-bg_glass_55_fbf9ee_1x400.png | Bin 335 -> 387 bytes .../images/ui-bg_glass_65_ffffff_1x400.png | Bin 207 -> 259 bytes .../images/ui-bg_glass_75_dadada_1x400.png | Bin 262 -> 314 bytes .../images/ui-bg_glass_75_e6e6e6_1x400.png | Bin 262 -> 314 bytes .../images/ui-bg_glass_95_fef1ec_1x400.png | Bin 332 -> 384 bytes .../ui-bg_highlight-soft_75_cccccc_1x100.png | Bin 280 -> 332 bytes .../images/ui-icons_222222_256x240.png | Bin 6922 -> 6837 bytes .../images/ui-icons_2e83ff_256x240.png | Bin 4549 -> 4601 bytes .../images/ui-icons_454545_256x240.png | Bin 6992 -> 6973 bytes .../images/ui-icons_888888_256x240.png | Bin 6999 -> 7044 bytes .../images/ui-icons_cd0a0a_256x240.png | Bin 4549 -> 4601 bytes lib/scripts/jquery/jquery-ui-theme/smoothness.css | 35 +- lib/scripts/jquery/jquery-ui.js | 20639 ++++++++++--------- lib/scripts/jquery/jquery-ui.min.js | 17 +- lib/scripts/jquery/jquery.js | 8596 ++++---- lib/scripts/jquery/jquery.min.js | 10 +- lib/scripts/jquery/update.sh | 17 +- 20 files changed, 14766 insertions(+), 14552 deletions(-) diff --git a/inc/lang/es/jquery.ui.datepicker.js b/inc/lang/es/jquery.ui.datepicker.js index ae32124e7..763d4cedd 100644 --- a/inc/lang/es/jquery.ui.datepicker.js +++ b/inc/lang/es/jquery.ui.datepicker.js @@ -9,9 +9,9 @@ jQuery(function($){ monthNames: ['enero','febrero','marzo','abril','mayo','junio', 'julio','agosto','septiembre','octubre','noviembre','diciembre'], monthNamesShort: ['ene','feb','mar','abr','may','jun', - 'jul','ago','sep','oct','nov','dic'], + 'jul','ogo','sep','oct','nov','dic'], dayNames: ['domingo','lunes','martes','miércoles','jueves','viernes','sábado'], - dayNamesShort: ['dom','lun','mar','mié','jue','vie','sáb'], + dayNamesShort: ['dom','lun','mar','mié','juv','vie','sáb'], dayNamesMin: ['D','L','M','X','J','V','S'], weekHeader: 'Sm', dateFormat: 'dd/mm/yy', diff --git a/lib/scripts/jquery/jquery-ui-theme/images/ui-bg_flat_0_aaaaaa_40x100.png b/lib/scripts/jquery/jquery-ui-theme/images/ui-bg_flat_0_aaaaaa_40x100.png index 87f812d7d..8c47bb636 100644 Binary files a/lib/scripts/jquery/jquery-ui-theme/images/ui-bg_flat_0_aaaaaa_40x100.png and b/lib/scripts/jquery/jquery-ui-theme/images/ui-bg_flat_0_aaaaaa_40x100.png differ diff --git a/lib/scripts/jquery/jquery-ui-theme/images/ui-bg_flat_75_ffffff_40x100.png b/lib/scripts/jquery/jquery-ui-theme/images/ui-bg_flat_75_ffffff_40x100.png index 4cb0d6d10..a2fe0297b 100644 Binary files a/lib/scripts/jquery/jquery-ui-theme/images/ui-bg_flat_75_ffffff_40x100.png and b/lib/scripts/jquery/jquery-ui-theme/images/ui-bg_flat_75_ffffff_40x100.png differ diff --git a/lib/scripts/jquery/jquery-ui-theme/images/ui-bg_glass_55_fbf9ee_1x400.png b/lib/scripts/jquery/jquery-ui-theme/images/ui-bg_glass_55_fbf9ee_1x400.png index bfe897458..78eb29e1e 100644 Binary files a/lib/scripts/jquery/jquery-ui-theme/images/ui-bg_glass_55_fbf9ee_1x400.png and b/lib/scripts/jquery/jquery-ui-theme/images/ui-bg_glass_55_fbf9ee_1x400.png differ diff --git a/lib/scripts/jquery/jquery-ui-theme/images/ui-bg_glass_65_ffffff_1x400.png b/lib/scripts/jquery/jquery-ui-theme/images/ui-bg_glass_65_ffffff_1x400.png index 168a18215..26d2fa2b4 100644 Binary files a/lib/scripts/jquery/jquery-ui-theme/images/ui-bg_glass_65_ffffff_1x400.png and b/lib/scripts/jquery/jquery-ui-theme/images/ui-bg_glass_65_ffffff_1x400.png differ diff --git a/lib/scripts/jquery/jquery-ui-theme/images/ui-bg_glass_75_dadada_1x400.png b/lib/scripts/jquery/jquery-ui-theme/images/ui-bg_glass_75_dadada_1x400.png index 25bf099b9..16b6247a1 100644 Binary files a/lib/scripts/jquery/jquery-ui-theme/images/ui-bg_glass_75_dadada_1x400.png and b/lib/scripts/jquery/jquery-ui-theme/images/ui-bg_glass_75_dadada_1x400.png differ diff --git a/lib/scripts/jquery/jquery-ui-theme/images/ui-bg_glass_75_e6e6e6_1x400.png b/lib/scripts/jquery/jquery-ui-theme/images/ui-bg_glass_75_e6e6e6_1x400.png index c5dc70aea..72303d6aa 100644 Binary files a/lib/scripts/jquery/jquery-ui-theme/images/ui-bg_glass_75_e6e6e6_1x400.png and b/lib/scripts/jquery/jquery-ui-theme/images/ui-bg_glass_75_e6e6e6_1x400.png differ diff --git a/lib/scripts/jquery/jquery-ui-theme/images/ui-bg_glass_95_fef1ec_1x400.png b/lib/scripts/jquery/jquery-ui-theme/images/ui-bg_glass_95_fef1ec_1x400.png index bf1f16451..95d5ce6d1 100644 Binary files a/lib/scripts/jquery/jquery-ui-theme/images/ui-bg_glass_95_fef1ec_1x400.png and b/lib/scripts/jquery/jquery-ui-theme/images/ui-bg_glass_95_fef1ec_1x400.png differ diff --git a/lib/scripts/jquery/jquery-ui-theme/images/ui-bg_highlight-soft_75_cccccc_1x100.png b/lib/scripts/jquery/jquery-ui-theme/images/ui-bg_highlight-soft_75_cccccc_1x100.png index 11c184168..331976d8d 100644 Binary files a/lib/scripts/jquery/jquery-ui-theme/images/ui-bg_highlight-soft_75_cccccc_1x100.png and b/lib/scripts/jquery/jquery-ui-theme/images/ui-bg_highlight-soft_75_cccccc_1x100.png differ diff --git a/lib/scripts/jquery/jquery-ui-theme/images/ui-icons_222222_256x240.png b/lib/scripts/jquery/jquery-ui-theme/images/ui-icons_222222_256x240.png index 294330201..e672c7f61 100644 Binary files a/lib/scripts/jquery/jquery-ui-theme/images/ui-icons_222222_256x240.png and b/lib/scripts/jquery/jquery-ui-theme/images/ui-icons_222222_256x240.png differ diff --git a/lib/scripts/jquery/jquery-ui-theme/images/ui-icons_2e83ff_256x240.png b/lib/scripts/jquery/jquery-ui-theme/images/ui-icons_2e83ff_256x240.png index 25dfde1f4..4fea42e83 100644 Binary files a/lib/scripts/jquery/jquery-ui-theme/images/ui-icons_2e83ff_256x240.png and b/lib/scripts/jquery/jquery-ui-theme/images/ui-icons_2e83ff_256x240.png differ diff --git a/lib/scripts/jquery/jquery-ui-theme/images/ui-icons_454545_256x240.png b/lib/scripts/jquery/jquery-ui-theme/images/ui-icons_454545_256x240.png index 0063819c4..3e2b5c031 100644 Binary files a/lib/scripts/jquery/jquery-ui-theme/images/ui-icons_454545_256x240.png and b/lib/scripts/jquery/jquery-ui-theme/images/ui-icons_454545_256x240.png differ diff --git a/lib/scripts/jquery/jquery-ui-theme/images/ui-icons_888888_256x240.png b/lib/scripts/jquery/jquery-ui-theme/images/ui-icons_888888_256x240.png index 53aaf6f30..95c9d21d1 100644 Binary files a/lib/scripts/jquery/jquery-ui-theme/images/ui-icons_888888_256x240.png and b/lib/scripts/jquery/jquery-ui-theme/images/ui-icons_888888_256x240.png differ diff --git a/lib/scripts/jquery/jquery-ui-theme/images/ui-icons_cd0a0a_256x240.png b/lib/scripts/jquery/jquery-ui-theme/images/ui-icons_cd0a0a_256x240.png index 145e3d3c6..98487c249 100644 Binary files a/lib/scripts/jquery/jquery-ui-theme/images/ui-icons_cd0a0a_256x240.png and b/lib/scripts/jquery/jquery-ui-theme/images/ui-icons_cd0a0a_256x240.png differ diff --git a/lib/scripts/jquery/jquery-ui-theme/smoothness.css b/lib/scripts/jquery/jquery-ui-theme/smoothness.css index bd2adbde8..34f3ada3e 100644 --- a/lib/scripts/jquery/jquery-ui-theme/smoothness.css +++ b/lib/scripts/jquery/jquery-ui-theme/smoothness.css @@ -1,8 +1,8 @@ -/*! jQuery UI - v1.10.2 - 2013-03-14 +/*! jQuery UI - v1.10.4 - 2014-01-17 * http://jqueryui.com -* Includes: jquery.ui.core.css, jquery.ui.accordion.css, jquery.ui.autocomplete.css, jquery.ui.button.css, jquery.ui.datepicker.css, jquery.ui.dialog.css, jquery.ui.menu.css, jquery.ui.progressbar.css, jquery.ui.resizable.css, jquery.ui.selectable.css, jquery.ui.slider.css, jquery.ui.spinner.css, jquery.ui.tabs.css, jquery.ui.tooltip.css +* Includes: jquery.ui.core.css, jquery.ui.accordion.css, jquery.ui.autocomplete.css, jquery.ui.button.css, jquery.ui.datepicker.css, jquery.ui.dialog.css, jquery.ui.menu.css, jquery.ui.progressbar.css, jquery.ui.resizable.css, jquery.ui.selectable.css, jquery.ui.slider.css, jquery.ui.spinner.css, jquery.ui.tabs.css, jquery.ui.tooltip.css, jquery.ui.theme.css * To view and modify this theme, visit http://jqueryui.com/themeroller/?ffDefault=Verdana%2CArial%2Csans-serif&fwDefault=normal&fsDefault=1.1em&cornerRadius=4px&bgColorHeader=cccccc&bgTextureHeader=highlight_soft&bgImgOpacityHeader=75&borderColorHeader=aaaaaa&fcHeader=222222&iconColorHeader=222222&bgColorContent=ffffff&bgTextureContent=flat&bgImgOpacityContent=75&borderColorContent=aaaaaa&fcContent=222222&iconColorContent=222222&bgColorDefault=e6e6e6&bgTextureDefault=glass&bgImgOpacityDefault=75&borderColorDefault=d3d3d3&fcDefault=555555&iconColorDefault=888888&bgColorHover=dadada&bgTextureHover=glass&bgImgOpacityHover=75&borderColorHover=999999&fcHover=212121&iconColorHover=454545&bgColorActive=ffffff&bgTextureActive=glass&bgImgOpacityActive=65&borderColorActive=aaaaaa&fcActive=212121&iconColorActive=454545&bgColorHighlight=fbf9ee&bgTextureHighlight=glass&bgImgOpacityHighlight=55&borderColorHighlight=fcefa1&fcHighlight=363636&iconColorHighlight=2e83ff&bgColorError=fef1ec&bgTextureError=glass&bgImgOpacityError=95&borderColorError=cd0a0a&fcError=cd0a0a&iconColorError=cd0a0a&bgColorOverlay=aaaaaa&bgTextureOverlay=flat&bgImgOpacityOverlay=0&opacityOverlay=30&bgColorShadow=aaaaaa&bgTextureShadow=flat&bgImgOpacityShadow=0&opacityShadow=30&thicknessShadow=8px&offsetTopShadow=-8px&offsetLeftShadow=-8px&cornerRadiusShadow=8px -* Copyright 2013 jQuery Foundation and other contributors Licensed MIT */ +* Copyright 2014 jQuery Foundation and other contributors; Licensed MIT */ /* Layout helpers ----------------------------------*/ @@ -274,9 +274,6 @@ button.ui-button::-moz-focus-inner { font-size: 1em; margin: 1px 0; } -.ui-datepicker select.ui-datepicker-month-year { - width: 100%; -} .ui-datepicker select.ui-datepicker-month, .ui-datepicker select.ui-datepicker-year { width: 49%; @@ -393,6 +390,7 @@ button.ui-button::-moz-focus-inner { border-left-width: 1px; } .ui-dialog { + overflow: hidden; position: absolute; top: 0; left: 0; @@ -415,7 +413,7 @@ button.ui-button::-moz-focus-inner { position: absolute; right: .3em; top: 50%; - width: 21px; + width: 20px; margin: -10px 0 0 0; padding: 1px; height: 20px; @@ -466,6 +464,8 @@ button.ui-button::-moz-focus-inner { margin: 0; padding: 0; width: 100%; + /* support: IE10, see #8844 */ + list-style-image: url(data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7); } .ui-menu .ui-menu-divider { margin: 5px -2px 5px -2px; @@ -702,13 +702,13 @@ button.ui-button::-moz-focus-inner { overflow: hidden; right: 0; } -/* more specificity required here to overide default borders */ +/* more specificity required here to override default borders */ .ui-spinner a.ui-spinner-button { border-top: none; border-bottom: none; border-right: none; } -/* vertical centre icon */ +/* vertically center icon */ .ui-spinner .ui-icon { position: absolute; margin-top: -8px; @@ -745,7 +745,7 @@ button.ui-button::-moz-focus-inner { padding: 0; white-space: nowrap; } -.ui-tabs .ui-tabs-nav li a { +.ui-tabs .ui-tabs-nav .ui-tabs-anchor { float: left; padding: .5em 1em; text-decoration: none; @@ -754,13 +754,12 @@ button.ui-button::-moz-focus-inner { margin-bottom: -1px; padding-bottom: 1px; } -.ui-tabs .ui-tabs-nav li.ui-tabs-active a, -.ui-tabs .ui-tabs-nav li.ui-state-disabled a, -.ui-tabs .ui-tabs-nav li.ui-tabs-loading a { +.ui-tabs .ui-tabs-nav li.ui-tabs-active .ui-tabs-anchor, +.ui-tabs .ui-tabs-nav li.ui-state-disabled .ui-tabs-anchor, +.ui-tabs .ui-tabs-nav li.ui-tabs-loading .ui-tabs-anchor { cursor: text; } -.ui-tabs .ui-tabs-nav li a, /* first selector in group seems obsolete, but required to overcome bug in Opera applying cursor: text overall if defined elsewhere... */ -.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-active a { +.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-active .ui-tabs-anchor { cursor: pointer; } .ui-tabs .ui-tabs-panel { @@ -845,7 +844,11 @@ body .ui-tooltip { .ui-state-hover a, .ui-state-hover a:hover, .ui-state-hover a:link, -.ui-state-hover a:visited { +.ui-state-hover a:visited, +.ui-state-focus a, +.ui-state-focus a:hover, +.ui-state-focus a:link, +.ui-state-focus a:visited { color: #212121; text-decoration: none; } diff --git a/lib/scripts/jquery/jquery-ui.js b/lib/scripts/jquery/jquery-ui.js index 6eccbfec3..eb4ec7236 100644 --- a/lib/scripts/jquery/jquery-ui.js +++ b/lib/scripts/jquery/jquery-ui.js @@ -1,7 +1,8 @@ -/*! jQuery UI - v1.10.2 - 2013-03-14 +/*! jQuery UI - v1.10.4 - 2014-01-17 * http://jqueryui.com -* Includes: jquery.ui.core.js, jquery.ui.widget.js, jquery.ui.mouse.js, jquery.ui.draggable.js, jquery.ui.droppable.js, jquery.ui.resizable.js, jquery.ui.selectable.js, jquery.ui.sortable.js, jquery.ui.effect.js, jquery.ui.accordion.js, jquery.ui.autocomplete.js, jquery.ui.button.js, jquery.ui.datepicker.js, jquery.ui.dialog.js, jquery.ui.effect-blind.js, jquery.ui.effect-bounce.js, jquery.ui.effect-clip.js, jquery.ui.effect-drop.js, jquery.ui.effect-explode.js, jquery.ui.effect-fade.js, jquery.ui.effect-fold.js, jquery.ui.effect-highlight.js, jquery.ui.effect-pulsate.js, jquery.ui.effect-scale.js, jquery.ui.effect-shake.js, jquery.ui.effect-slide.js, jquery.ui.effect-transfer.js, jquery.ui.menu.js, jquery.ui.position.js, jquery.ui.progressbar.js, jquery.ui.slider.js, jquery.ui.spinner.js, jquery.ui.tabs.js, jquery.ui.tooltip.js -* Copyright 2013 jQuery Foundation and other contributors; Licensed MIT */ +* Includes: jquery.ui.core.js, jquery.ui.widget.js, jquery.ui.mouse.js, jquery.ui.position.js, jquery.ui.accordion.js, jquery.ui.autocomplete.js, jquery.ui.button.js, jquery.ui.datepicker.js, jquery.ui.dialog.js, jquery.ui.draggable.js, jquery.ui.droppable.js, jquery.ui.effect.js, jquery.ui.effect-blind.js, jquery.ui.effect-bounce.js, jquery.ui.effect-clip.js, jquery.ui.effect-drop.js, jquery.ui.effect-explode.js, jquery.ui.effect-fade.js, jquery.ui.effect-fold.js, jquery.ui.effect-highlight.js, jquery.ui.effect-pulsate.js, jquery.ui.effect-scale.js, jquery.ui.effect-shake.js, jquery.ui.effect-slide.js, jquery.ui.effect-transfer.js, jquery.ui.menu.js, jquery.ui.progressbar.js, jquery.ui.resizable.js, jquery.ui.selectable.js, jquery.ui.slider.js, jquery.ui.sortable.js, jquery.ui.spinner.js, jquery.ui.tabs.js, jquery.ui.tooltip.js +* Copyright 2014 jQuery Foundation and other contributors; Licensed MIT */ + (function( $, undefined ) { var uuid = 0, @@ -11,7 +12,7 @@ var uuid = 0, $.ui = $.ui || {}; $.extend( $.ui, { - version: "1.10.2", + version: "1.10.4", keyCode: { BACKSPACE: 8, @@ -261,7 +262,7 @@ $.fn.extend({ }); $.extend( $.ui, { - // $.ui.plugin is deprecated. Use the proxy pattern instead. + // $.ui.plugin is deprecated. Use $.widget() extensions instead. plugin: { add: function( module, option, set ) { var i, @@ -312,7 +313,6 @@ $.extend( $.ui, { }); })( jQuery ); - (function( $, undefined ) { var uuid = 0, @@ -411,7 +411,7 @@ $.widget = function( name, base, prototype ) { // TODO: remove support for widgetEventPrefix // always use the name + a colon as the prefix, e.g., draggable:start // don't prefix for widgets that aren't DOM-based - widgetEventPrefix: existingConstructor ? basePrototype.widgetEventPrefix : name + widgetEventPrefix: existingConstructor ? (basePrototype.widgetEventPrefix || name) : name }, proxiedPrototype, { constructor: constructor, namespace: namespace, @@ -620,12 +620,12 @@ $.Widget.prototype = { curOption = curOption[ parts[ i ] ]; } key = parts.pop(); - if ( value === undefined ) { + if ( arguments.length === 1 ) { return curOption[ key ] === undefined ? null : curOption[ key ]; } curOption[ key ] = value; } else { - if ( value === undefined ) { + if ( arguments.length === 1 ) { return this.options[ key ] === undefined ? null : this.options[ key ]; } options[ key ] = value; @@ -824,7 +824,6 @@ $.each( { show: "fadeIn", hide: "fadeOut" }, function( method, defaultEffect ) { }); })( jQuery ); - (function( $, undefined ) { var mouseHandled = false; @@ -833,7 +832,7 @@ $( document ).mouseup( function() { }); $.widget("ui.mouse", { - version: "1.10.2", + version: "1.10.4", options: { cancel: "input,textarea,button,select,option", distance: 1, @@ -981,12311 +980,12328 @@ $.widget("ui.mouse", { }); })(jQuery); - (function( $, undefined ) { -$.widget("ui.draggable", $.ui.mouse, { - version: "1.10.2", - widgetEventPrefix: "drag", - options: { - addClasses: true, - appendTo: "parent", - axis: false, - connectToSortable: false, - containment: false, - cursor: "auto", - cursorAt: false, - grid: false, - handle: false, - helper: "original", - iframeFix: false, - opacity: false, - refreshPositions: false, - revert: false, - revertDuration: 500, - scope: "default", - scroll: true, - scrollSensitivity: 20, - scrollSpeed: 20, - snap: false, - snapMode: "both", - snapTolerance: 20, - stack: false, - zIndex: false, - - // callbacks - drag: null, - start: null, - stop: null - }, - _create: function() { +$.ui = $.ui || {}; - if (this.options.helper === "original" && !(/^(?:r|a|f)/).test(this.element.css("position"))) { - this.element[0].style.position = "relative"; - } - if (this.options.addClasses){ - this.element.addClass("ui-draggable"); - } - if (this.options.disabled){ - this.element.addClass("ui-draggable-disabled"); - } +var cachedScrollbarWidth, + max = Math.max, + abs = Math.abs, + round = Math.round, + rhorizontal = /left|center|right/, + rvertical = /top|center|bottom/, + roffset = /[\+\-]\d+(\.[\d]+)?%?/, + rposition = /^\w+/, + rpercent = /%$/, + _position = $.fn.position; - this._mouseInit(); +function getOffsets( offsets, width, height ) { + return [ + parseFloat( offsets[ 0 ] ) * ( rpercent.test( offsets[ 0 ] ) ? width / 100 : 1 ), + parseFloat( offsets[ 1 ] ) * ( rpercent.test( offsets[ 1 ] ) ? height / 100 : 1 ) + ]; +} - }, +function parseCss( element, property ) { + return parseInt( $.css( element, property ), 10 ) || 0; +} - _destroy: function() { - this.element.removeClass( "ui-draggable ui-draggable-dragging ui-draggable-disabled" ); - this._mouseDestroy(); - }, +function getDimensions( elem ) { + var raw = elem[0]; + if ( raw.nodeType === 9 ) { + return { + width: elem.width(), + height: elem.height(), + offset: { top: 0, left: 0 } + }; + } + if ( $.isWindow( raw ) ) { + return { + width: elem.width(), + height: elem.height(), + offset: { top: elem.scrollTop(), left: elem.scrollLeft() } + }; + } + if ( raw.preventDefault ) { + return { + width: 0, + height: 0, + offset: { top: raw.pageY, left: raw.pageX } + }; + } + return { + width: elem.outerWidth(), + height: elem.outerHeight(), + offset: elem.offset() + }; +} - _mouseCapture: function(event) { +$.position = { + scrollbarWidth: function() { + if ( cachedScrollbarWidth !== undefined ) { + return cachedScrollbarWidth; + } + var w1, w2, + div = $( "
" ), + innerDiv = div.children()[0]; - var o = this.options; + $( "body" ).append( div ); + w1 = innerDiv.offsetWidth; + div.css( "overflow", "scroll" ); - // among others, prevent a drag on a resizable-handle - if (this.helper || o.disabled || $(event.target).closest(".ui-resizable-handle").length > 0) { - return false; - } + w2 = innerDiv.offsetWidth; - //Quit if we're not on a valid handle - this.handle = this._getHandle(event); - if (!this.handle) { - return false; + if ( w1 === w2 ) { + w2 = div[0].clientWidth; } - $(o.iframeFix === true ? "iframe" : o.iframeFix).each(function() { - $("
") - .css({ - width: this.offsetWidth+"px", height: this.offsetHeight+"px", - position: "absolute", opacity: "0.001", zIndex: 1000 - }) - .css($(this).offset()) - .appendTo("body"); - }); - - return true; + div.remove(); + return (cachedScrollbarWidth = w1 - w2); + }, + getScrollInfo: function( within ) { + var overflowX = within.isWindow || within.isDocument ? "" : + within.element.css( "overflow-x" ), + overflowY = within.isWindow || within.isDocument ? "" : + within.element.css( "overflow-y" ), + hasOverflowX = overflowX === "scroll" || + ( overflowX === "auto" && within.width < within.element[0].scrollWidth ), + hasOverflowY = overflowY === "scroll" || + ( overflowY === "auto" && within.height < within.element[0].scrollHeight ); + return { + width: hasOverflowY ? $.position.scrollbarWidth() : 0, + height: hasOverflowX ? $.position.scrollbarWidth() : 0 + }; }, + getWithinInfo: function( element ) { + var withinElement = $( element || window ), + isWindow = $.isWindow( withinElement[0] ), + isDocument = !!withinElement[ 0 ] && withinElement[ 0 ].nodeType === 9; + return { + element: withinElement, + isWindow: isWindow, + isDocument: isDocument, + offset: withinElement.offset() || { left: 0, top: 0 }, + scrollLeft: withinElement.scrollLeft(), + scrollTop: withinElement.scrollTop(), + width: isWindow ? withinElement.width() : withinElement.outerWidth(), + height: isWindow ? withinElement.height() : withinElement.outerHeight() + }; + } +}; - _mouseStart: function(event) { +$.fn.position = function( options ) { + if ( !options || !options.of ) { + return _position.apply( this, arguments ); + } - var o = this.options; + // make a copy, we don't want to modify arguments + options = $.extend( {}, options ); - //Create and append the visible helper - this.helper = this._createHelper(event); + var atOffset, targetWidth, targetHeight, targetOffset, basePosition, dimensions, + target = $( options.of ), + within = $.position.getWithinInfo( options.within ), + scrollInfo = $.position.getScrollInfo( within ), + collision = ( options.collision || "flip" ).split( " " ), + offsets = {}; - this.helper.addClass("ui-draggable-dragging"); + dimensions = getDimensions( target ); + if ( target[0].preventDefault ) { + // force left top to allow flipping + options.at = "left top"; + } + targetWidth = dimensions.width; + targetHeight = dimensions.height; + targetOffset = dimensions.offset; + // clone to reuse original targetOffset later + basePosition = $.extend( {}, targetOffset ); - //Cache the helper size - this._cacheHelperProportions(); + // force my and at to have valid horizontal and vertical positions + // if a value is missing or invalid, it will be converted to center + $.each( [ "my", "at" ], function() { + var pos = ( options[ this ] || "" ).split( " " ), + horizontalOffset, + verticalOffset; - //If ddmanager is used for droppables, set the global draggable - if($.ui.ddmanager) { - $.ui.ddmanager.current = this; + if ( pos.length === 1) { + pos = rhorizontal.test( pos[ 0 ] ) ? + pos.concat( [ "center" ] ) : + rvertical.test( pos[ 0 ] ) ? + [ "center" ].concat( pos ) : + [ "center", "center" ]; } + pos[ 0 ] = rhorizontal.test( pos[ 0 ] ) ? pos[ 0 ] : "center"; + pos[ 1 ] = rvertical.test( pos[ 1 ] ) ? pos[ 1 ] : "center"; - /* - * - Position generation - - * This block generates everything position related - it's the core of draggables. - */ - - //Cache the margins of the original element - this._cacheMargins(); + // calculate offsets + horizontalOffset = roffset.exec( pos[ 0 ] ); + verticalOffset = roffset.exec( pos[ 1 ] ); + offsets[ this ] = [ + horizontalOffset ? horizontalOffset[ 0 ] : 0, + verticalOffset ? verticalOffset[ 0 ] : 0 + ]; - //Store the helper's css position - this.cssPosition = this.helper.css("position"); - this.scrollParent = this.helper.scrollParent(); + // reduce to just the positions without the offsets + options[ this ] = [ + rposition.exec( pos[ 0 ] )[ 0 ], + rposition.exec( pos[ 1 ] )[ 0 ] + ]; + }); - //The element's absolute position on the page minus margins - this.offset = this.positionAbs = this.element.offset(); - this.offset = { - top: this.offset.top - this.margins.top, - left: this.offset.left - this.margins.left - }; + // normalize collision option + if ( collision.length === 1 ) { + collision[ 1 ] = collision[ 0 ]; + } - $.extend(this.offset, { - click: { //Where the click happened, relative to the element - left: event.pageX - this.offset.left, - top: event.pageY - this.offset.top - }, - parent: this._getParentOffset(), - relative: this._getRelativeOffset() //This is a relative to absolute position minus the actual position calculation - only used for relative positioned helper - }); + if ( options.at[ 0 ] === "right" ) { + basePosition.left += targetWidth; + } else if ( options.at[ 0 ] === "center" ) { + basePosition.left += targetWidth / 2; + } - //Generate the original position - this.originalPosition = this.position = this._generatePosition(event); - this.originalPageX = event.pageX; - this.originalPageY = event.pageY; + if ( options.at[ 1 ] === "bottom" ) { + basePosition.top += targetHeight; + } else if ( options.at[ 1 ] === "center" ) { + basePosition.top += targetHeight / 2; + } - //Adjust the mouse offset relative to the helper if "cursorAt" is supplied - (o.cursorAt && this._adjustOffsetFromHelper(o.cursorAt)); + atOffset = getOffsets( offsets.at, targetWidth, targetHeight ); + basePosition.left += atOffset[ 0 ]; + basePosition.top += atOffset[ 1 ]; - //Set a containment if given in the options - if(o.containment) { - this._setContainment(); - } + return this.each(function() { + var collisionPosition, using, + elem = $( this ), + elemWidth = elem.outerWidth(), + elemHeight = elem.outerHeight(), + marginLeft = parseCss( this, "marginLeft" ), + marginTop = parseCss( this, "marginTop" ), + collisionWidth = elemWidth + marginLeft + parseCss( this, "marginRight" ) + scrollInfo.width, + collisionHeight = elemHeight + marginTop + parseCss( this, "marginBottom" ) + scrollInfo.height, + position = $.extend( {}, basePosition ), + myOffset = getOffsets( offsets.my, elem.outerWidth(), elem.outerHeight() ); - //Trigger event + callbacks - if(this._trigger("start", event) === false) { - this._clear(); - return false; + if ( options.my[ 0 ] === "right" ) { + position.left -= elemWidth; + } else if ( options.my[ 0 ] === "center" ) { + position.left -= elemWidth / 2; } - //Recache the helper size - this._cacheHelperProportions(); - - //Prepare the droppable offsets - if ($.ui.ddmanager && !o.dropBehaviour) { - $.ui.ddmanager.prepareOffsets(this, event); + if ( options.my[ 1 ] === "bottom" ) { + position.top -= elemHeight; + } else if ( options.my[ 1 ] === "center" ) { + position.top -= elemHeight / 2; } + position.left += myOffset[ 0 ]; + position.top += myOffset[ 1 ]; - this._mouseDrag(event, true); //Execute the drag once - this causes the helper not to be visible before getting its correct position - - //If the ddmanager is used for droppables, inform the manager that dragging has started (see #5003) - if ( $.ui.ddmanager ) { - $.ui.ddmanager.dragStart(this, event); + // if the browser doesn't support fractions, then round for consistent results + if ( !$.support.offsetFractions ) { + position.left = round( position.left ); + position.top = round( position.top ); } - return true; - }, - - _mouseDrag: function(event, noPropagation) { - - //Compute the helpers position - this.position = this._generatePosition(event); - this.positionAbs = this._convertPositionTo("absolute"); + collisionPosition = { + marginLeft: marginLeft, + marginTop: marginTop + }; - //Call plugins and callbacks and use the resulting position if something is returned - if (!noPropagation) { - var ui = this._uiHash(); - if(this._trigger("drag", event, ui) === false) { - this._mouseUp({}); - return false; + $.each( [ "left", "top" ], function( i, dir ) { + if ( $.ui.position[ collision[ i ] ] ) { + $.ui.position[ collision[ i ] ][ dir ]( position, { + targetWidth: targetWidth, + targetHeight: targetHeight, + elemWidth: elemWidth, + elemHeight: elemHeight, + collisionPosition: collisionPosition, + collisionWidth: collisionWidth, + collisionHeight: collisionHeight, + offset: [ atOffset[ 0 ] + myOffset[ 0 ], atOffset [ 1 ] + myOffset[ 1 ] ], + my: options.my, + at: options.at, + within: within, + elem : elem + }); } - this.position = ui.position; - } + }); - if(!this.options.axis || this.options.axis !== "y") { - this.helper[0].style.left = this.position.left+"px"; - } - if(!this.options.axis || this.options.axis !== "x") { - this.helper[0].style.top = this.position.top+"px"; - } - if($.ui.ddmanager) { - $.ui.ddmanager.drag(this, event); + if ( options.using ) { + // adds feedback as second argument to using callback, if present + using = function( props ) { + var left = targetOffset.left - position.left, + right = left + targetWidth - elemWidth, + top = targetOffset.top - position.top, + bottom = top + targetHeight - elemHeight, + feedback = { + target: { + element: target, + left: targetOffset.left, + top: targetOffset.top, + width: targetWidth, + height: targetHeight + }, + element: { + element: elem, + left: position.left, + top: position.top, + width: elemWidth, + height: elemHeight + }, + horizontal: right < 0 ? "left" : left > 0 ? "right" : "center", + vertical: bottom < 0 ? "top" : top > 0 ? "bottom" : "middle" + }; + if ( targetWidth < elemWidth && abs( left + right ) < targetWidth ) { + feedback.horizontal = "center"; + } + if ( targetHeight < elemHeight && abs( top + bottom ) < targetHeight ) { + feedback.vertical = "middle"; + } + if ( max( abs( left ), abs( right ) ) > max( abs( top ), abs( bottom ) ) ) { + feedback.important = "horizontal"; + } else { + feedback.important = "vertical"; + } + options.using.call( this, props, feedback ); + }; } - return false; - }, - - _mouseStop: function(event) { - - //If we are using droppables, inform the manager about the drop - var element, - that = this, - elementInDom = false, - dropped = false; - if ($.ui.ddmanager && !this.options.dropBehaviour) { - dropped = $.ui.ddmanager.drop(this, event); - } + elem.offset( $.extend( position, { using: using } ) ); + }); +}; - //if a drop comes from outside (a sortable) - if(this.dropped) { - dropped = this.dropped; - this.dropped = false; - } +$.ui.position = { + fit: { + left: function( position, data ) { + var within = data.within, + withinOffset = within.isWindow ? within.scrollLeft : within.offset.left, + outerWidth = within.width, + collisionPosLeft = position.left - data.collisionPosition.marginLeft, + overLeft = withinOffset - collisionPosLeft, + overRight = collisionPosLeft + data.collisionWidth - outerWidth - withinOffset, + newOverRight; - //if the original element is no longer in the DOM don't bother to continue (see #8269) - element = this.element[0]; - while ( element && (element = element.parentNode) ) { - if (element === document ) { - elementInDom = true; + // element is wider than within + if ( data.collisionWidth > outerWidth ) { + // element is initially over the left side of within + if ( overLeft > 0 && overRight <= 0 ) { + newOverRight = position.left + overLeft + data.collisionWidth - outerWidth - withinOffset; + position.left += overLeft - newOverRight; + // element is initially over right side of within + } else if ( overRight > 0 && overLeft <= 0 ) { + position.left = withinOffset; + // element is initially over both left and right sides of within + } else { + if ( overLeft > overRight ) { + position.left = withinOffset + outerWidth - data.collisionWidth; + } else { + position.left = withinOffset; + } + } + // too far left -> align with left edge + } else if ( overLeft > 0 ) { + position.left += overLeft; + // too far right -> align with right edge + } else if ( overRight > 0 ) { + position.left -= overRight; + // adjust based on position and margin + } else { + position.left = max( position.left - collisionPosLeft, position.left ); } - } - if ( !elementInDom && this.options.helper === "original" ) { - return false; - } + }, + top: function( position, data ) { + var within = data.within, + withinOffset = within.isWindow ? within.scrollTop : within.offset.top, + outerHeight = data.within.height, + collisionPosTop = position.top - data.collisionPosition.marginTop, + overTop = withinOffset - collisionPosTop, + overBottom = collisionPosTop + data.collisionHeight - outerHeight - withinOffset, + newOverBottom; - if((this.options.revert === "invalid" && !dropped) || (this.options.revert === "valid" && dropped) || this.options.revert === true || ($.isFunction(this.options.revert) && this.options.revert.call(this.element, dropped))) { - $(this.helper).animate(this.originalPosition, parseInt(this.options.revertDuration, 10), function() { - if(that._trigger("stop", event) !== false) { - that._clear(); + // element is taller than within + if ( data.collisionHeight > outerHeight ) { + // element is initially over the top of within + if ( overTop > 0 && overBottom <= 0 ) { + newOverBottom = position.top + overTop + data.collisionHeight - outerHeight - withinOffset; + position.top += overTop - newOverBottom; + // element is initially over bottom of within + } else if ( overBottom > 0 && overTop <= 0 ) { + position.top = withinOffset; + // element is initially over both top and bottom of within + } else { + if ( overTop > overBottom ) { + position.top = withinOffset + outerHeight - data.collisionHeight; + } else { + position.top = withinOffset; + } } - }); - } else { - if(this._trigger("stop", event) !== false) { - this._clear(); + // too far up -> align with top + } else if ( overTop > 0 ) { + position.top += overTop; + // too far down -> align with bottom edge + } else if ( overBottom > 0 ) { + position.top -= overBottom; + // adjust based on position and margin + } else { + position.top = max( position.top - collisionPosTop, position.top ); } } - - return false; - }, - - _mouseUp: function(event) { - //Remove frame helpers - $("div.ui-draggable-iframeFix").each(function() { - this.parentNode.removeChild(this); - }); - - //If the ddmanager is used for droppables, inform the manager that dragging has stopped (see #5003) - if( $.ui.ddmanager ) { - $.ui.ddmanager.dragStop(this, event); - } - - return $.ui.mouse.prototype._mouseUp.call(this, event); }, + flip: { + left: function( position, data ) { + var within = data.within, + withinOffset = within.offset.left + within.scrollLeft, + outerWidth = within.width, + offsetLeft = within.isWindow ? within.scrollLeft : within.offset.left, + collisionPosLeft = position.left - data.collisionPosition.marginLeft, + overLeft = collisionPosLeft - offsetLeft, + overRight = collisionPosLeft + data.collisionWidth - outerWidth - offsetLeft, + myOffset = data.my[ 0 ] === "left" ? + -data.elemWidth : + data.my[ 0 ] === "right" ? + data.elemWidth : + 0, + atOffset = data.at[ 0 ] === "left" ? + data.targetWidth : + data.at[ 0 ] === "right" ? + -data.targetWidth : + 0, + offset = -2 * data.offset[ 0 ], + newOverRight, + newOverLeft; - cancel: function() { - - if(this.helper.is(".ui-draggable-dragging")) { - this._mouseUp({}); - } else { - this._clear(); + if ( overLeft < 0 ) { + newOverRight = position.left + myOffset + atOffset + offset + data.collisionWidth - outerWidth - withinOffset; + if ( newOverRight < 0 || newOverRight < abs( overLeft ) ) { + position.left += myOffset + atOffset + offset; + } + } + else if ( overRight > 0 ) { + newOverLeft = position.left - data.collisionPosition.marginLeft + myOffset + atOffset + offset - offsetLeft; + if ( newOverLeft > 0 || abs( newOverLeft ) < overRight ) { + position.left += myOffset + atOffset + offset; + } + } + }, + top: function( position, data ) { + var within = data.within, + withinOffset = within.offset.top + within.scrollTop, + outerHeight = within.height, + offsetTop = within.isWindow ? within.scrollTop : within.offset.top, + collisionPosTop = position.top - data.collisionPosition.marginTop, + overTop = collisionPosTop - offsetTop, + overBottom = collisionPosTop + data.collisionHeight - outerHeight - offsetTop, + top = data.my[ 1 ] === "top", + myOffset = top ? + -data.elemHeight : + data.my[ 1 ] === "bottom" ? + data.elemHeight : + 0, + atOffset = data.at[ 1 ] === "top" ? + data.targetHeight : + data.at[ 1 ] === "bottom" ? + -data.targetHeight : + 0, + offset = -2 * data.offset[ 1 ], + newOverTop, + newOverBottom; + if ( overTop < 0 ) { + newOverBottom = position.top + myOffset + atOffset + offset + data.collisionHeight - outerHeight - withinOffset; + if ( ( position.top + myOffset + atOffset + offset) > overTop && ( newOverBottom < 0 || newOverBottom < abs( overTop ) ) ) { + position.top += myOffset + atOffset + offset; + } + } + else if ( overBottom > 0 ) { + newOverTop = position.top - data.collisionPosition.marginTop + myOffset + atOffset + offset - offsetTop; + if ( ( position.top + myOffset + atOffset + offset) > overBottom && ( newOverTop > 0 || abs( newOverTop ) < overBottom ) ) { + position.top += myOffset + atOffset + offset; + } + } + } + }, + flipfit: { + left: function() { + $.ui.position.flip.left.apply( this, arguments ); + $.ui.position.fit.left.apply( this, arguments ); + }, + top: function() { + $.ui.position.flip.top.apply( this, arguments ); + $.ui.position.fit.top.apply( this, arguments ); } + } +}; - return this; +// fraction support test +(function () { + var testElement, testElementParent, testElementStyle, offsetLeft, i, + body = document.getElementsByTagName( "body" )[ 0 ], + div = document.createElement( "div" ); - }, + //Create a "fake body" for testing based on method used in jQuery.support + testElement = document.createElement( body ? "div" : "body" ); + testElementStyle = { + visibility: "hidden", + width: 0, + height: 0, + border: 0, + margin: 0, + background: "none" + }; + if ( body ) { + $.extend( testElementStyle, { + position: "absolute", + left: "-1000px", + top: "-1000px" + }); + } + for ( i in testElementStyle ) { + testElement.style[ i ] = testElementStyle[ i ]; + } + testElement.appendChild( div ); + testElementParent = body || document.documentElement; + testElementParent.insertBefore( testElement, testElementParent.firstChild ); - _getHandle: function(event) { - return this.options.handle ? - !!$( event.target ).closest( this.element.find( this.options.handle ) ).length : - true; - }, + div.style.cssText = "position: absolute; left: 10.7432222px;"; - _createHelper: function(event) { + offsetLeft = $( div ).offset().left; + $.support.offsetFractions = offsetLeft > 10 && offsetLeft < 11; - var o = this.options, - helper = $.isFunction(o.helper) ? $(o.helper.apply(this.element[0], [event])) : (o.helper === "clone" ? this.element.clone().removeAttr("id") : this.element); + testElement.innerHTML = ""; + testElementParent.removeChild( testElement ); +})(); - if(!helper.parents("body").length) { - helper.appendTo((o.appendTo === "parent" ? this.element[0].parentNode : o.appendTo)); - } +}( jQuery ) ); +(function( $, undefined ) { - if(helper[0] !== this.element[0] && !(/(fixed|absolute)/).test(helper.css("position"))) { - helper.css("position", "absolute"); - } +var uid = 0, + hideProps = {}, + showProps = {}; - return helper; +hideProps.height = hideProps.paddingTop = hideProps.paddingBottom = + hideProps.borderTopWidth = hideProps.borderBottomWidth = "hide"; +showProps.height = showProps.paddingTop = showProps.paddingBottom = + showProps.borderTopWidth = showProps.borderBottomWidth = "show"; - }, +$.widget( "ui.accordion", { + version: "1.10.4", + options: { + active: 0, + animate: {}, + collapsible: false, + event: "click", + header: "> li > :first-child,> :not(li):even", + heightStyle: "auto", + icons: { + activeHeader: "ui-icon-triangle-1-s", + header: "ui-icon-triangle-1-e" + }, - _adjustOffsetFromHelper: function(obj) { - if (typeof obj === "string") { - obj = obj.split(" "); - } - if ($.isArray(obj)) { - obj = {left: +obj[0], top: +obj[1] || 0}; - } - if ("left" in obj) { - this.offset.click.left = obj.left + this.margins.left; - } - if ("right" in obj) { - this.offset.click.left = this.helperProportions.width - obj.right + this.margins.left; - } - if ("top" in obj) { - this.offset.click.top = obj.top + this.margins.top; - } - if ("bottom" in obj) { - this.offset.click.top = this.helperProportions.height - obj.bottom + this.margins.top; - } + // callbacks + activate: null, + beforeActivate: null }, - _getParentOffset: function() { - - //Get the offsetParent and cache its position - this.offsetParent = this.helper.offsetParent(); - var po = this.offsetParent.offset(); + _create: function() { + var options = this.options; + this.prevShow = this.prevHide = $(); + this.element.addClass( "ui-accordion ui-widget ui-helper-reset" ) + // ARIA + .attr( "role", "tablist" ); - // This is a special case where we need to modify a offset calculated on start, since the following happened: - // 1. The position of the helper is absolute, so it's position is calculated based on the next positioned parent - // 2. The actual offset parent is a child of the scroll parent, and the scroll parent isn't the document, which means that - // the scroll is included in the initial calculation of the offset of the parent, and never recalculated upon drag - if(this.cssPosition === "absolute" && this.scrollParent[0] !== document && $.contains(this.scrollParent[0], this.offsetParent[0])) { - po.left += this.scrollParent.scrollLeft(); - po.top += this.scrollParent.scrollTop(); + // don't allow collapsible: false and active: false / null + if ( !options.collapsible && (options.active === false || options.active == null) ) { + options.active = 0; } - //This needs to be actually done for all browsers, since pageX/pageY includes this information - //Ugly IE fix - if((this.offsetParent[0] === document.body) || - (this.offsetParent[0].tagName && this.offsetParent[0].tagName.toLowerCase() === "html" && $.ui.ie)) { - po = { top: 0, left: 0 }; + this._processPanels(); + // handle negative values + if ( options.active < 0 ) { + options.active += this.headers.length; } + this._refresh(); + }, + _getCreateEventData: function() { return { - top: po.top + (parseInt(this.offsetParent.css("borderTopWidth"),10) || 0), - left: po.left + (parseInt(this.offsetParent.css("borderLeftWidth"),10) || 0) + header: this.active, + panel: !this.active.length ? $() : this.active.next(), + content: !this.active.length ? $() : this.active.next() }; - }, - _getRelativeOffset: function() { - - if(this.cssPosition === "relative") { - var p = this.element.position(); - return { - top: p.top - (parseInt(this.helper.css("top"),10) || 0) + this.scrollParent.scrollTop(), - left: p.left - (parseInt(this.helper.css("left"),10) || 0) + this.scrollParent.scrollLeft() - }; - } else { - return { top: 0, left: 0 }; + _createIcons: function() { + var icons = this.options.icons; + if ( icons ) { + $( "" ) + .addClass( "ui-accordion-header-icon ui-icon " + icons.header ) + .prependTo( this.headers ); + this.active.children( ".ui-accordion-header-icon" ) + .removeClass( icons.header ) + .addClass( icons.activeHeader ); + this.headers.addClass( "ui-accordion-icons" ); } - }, - _cacheMargins: function() { - this.margins = { - left: (parseInt(this.element.css("marginLeft"),10) || 0), - top: (parseInt(this.element.css("marginTop"),10) || 0), - right: (parseInt(this.element.css("marginRight"),10) || 0), - bottom: (parseInt(this.element.css("marginBottom"),10) || 0) - }; + _destroyIcons: function() { + this.headers + .removeClass( "ui-accordion-icons" ) + .children( ".ui-accordion-header-icon" ) + .remove(); }, - _cacheHelperProportions: function() { - this.helperProportions = { - width: this.helper.outerWidth(), - height: this.helper.outerHeight() - }; - }, + _destroy: function() { + var contents; - _setContainment: function() { + // clean up main element + this.element + .removeClass( "ui-accordion ui-widget ui-helper-reset" ) + .removeAttr( "role" ); - var over, c, ce, - o = this.options; + // clean up headers + this.headers + .removeClass( "ui-accordion-header ui-accordion-header-active ui-helper-reset ui-state-default ui-corner-all ui-state-active ui-state-disabled ui-corner-top" ) + .removeAttr( "role" ) + .removeAttr( "aria-expanded" ) + .removeAttr( "aria-selected" ) + .removeAttr( "aria-controls" ) + .removeAttr( "tabIndex" ) + .each(function() { + if ( /^ui-accordion/.test( this.id ) ) { + this.removeAttribute( "id" ); + } + }); + this._destroyIcons(); - if(o.containment === "parent") { - o.containment = this.helper[0].parentNode; - } - if(o.containment === "document" || o.containment === "window") { - this.containment = [ - o.containment === "document" ? 0 : $(window).scrollLeft() - this.offset.relative.left - this.offset.parent.left, - o.containment === "document" ? 0 : $(window).scrollTop() - this.offset.relative.top - this.offset.parent.top, - (o.containment === "document" ? 0 : $(window).scrollLeft()) + $(o.containment === "document" ? document : window).width() - this.helperProportions.width - this.margins.left, - (o.containment === "document" ? 0 : $(window).scrollTop()) + ($(o.containment === "document" ? document : window).height() || document.body.parentNode.scrollHeight) - this.helperProportions.height - this.margins.top - ]; + // clean up content panels + contents = this.headers.next() + .css( "display", "" ) + .removeAttr( "role" ) + .removeAttr( "aria-hidden" ) + .removeAttr( "aria-labelledby" ) + .removeClass( "ui-helper-reset ui-widget-content ui-corner-bottom ui-accordion-content ui-accordion-content-active ui-state-disabled" ) + .each(function() { + if ( /^ui-accordion/.test( this.id ) ) { + this.removeAttribute( "id" ); + } + }); + if ( this.options.heightStyle !== "content" ) { + contents.css( "height", "" ); } + }, - if(!(/^(document|window|parent)$/).test(o.containment) && o.containment.constructor !== Array) { - c = $(o.containment); - ce = c[0]; + _setOption: function( key, value ) { + if ( key === "active" ) { + // _activate() will handle invalid values and update this.options + this._activate( value ); + return; + } - if(!ce) { - return; + if ( key === "event" ) { + if ( this.options.event ) { + this._off( this.headers, this.options.event ); } + this._setupEvents( value ); + } - over = ($(ce).css("overflow") !== "hidden"); + this._super( key, value ); - this.containment = [ - (parseInt($(ce).css("borderLeftWidth"),10) || 0) + (parseInt($(ce).css("paddingLeft"),10) || 0), - (parseInt($(ce).css("borderTopWidth"),10) || 0) + (parseInt($(ce).css("paddingTop"),10) || 0), - (over ? Math.max(ce.scrollWidth,ce.offsetWidth) : ce.offsetWidth) - (parseInt($(ce).css("borderRightWidth"),10) || 0) - (parseInt($(ce).css("paddingRight"),10) || 0) - this.helperProportions.width - this.margins.left - this.margins.right, - (over ? Math.max(ce.scrollHeight,ce.offsetHeight) : ce.offsetHeight) - (parseInt($(ce).css("borderBottomWidth"),10) || 0) - (parseInt($(ce).css("paddingBottom"),10) || 0) - this.helperProportions.height - this.margins.top - this.margins.bottom - ]; - this.relative_container = c; + // setting collapsible: false while collapsed; open first panel + if ( key === "collapsible" && !value && this.options.active === false ) { + this._activate( 0 ); + } - } else if(o.containment.constructor === Array) { - this.containment = o.containment; + if ( key === "icons" ) { + this._destroyIcons(); + if ( value ) { + this._createIcons(); + } } + // #5332 - opacity doesn't cascade to positioned elements in IE + // so we need to add the disabled class to the headers and panels + if ( key === "disabled" ) { + this.headers.add( this.headers.next() ) + .toggleClass( "ui-state-disabled", !!value ); + } }, - _convertPositionTo: function(d, pos) { - - if(!pos) { - pos = this.position; + _keydown: function( event ) { + if ( event.altKey || event.ctrlKey ) { + return; } - var mod = d === "absolute" ? 1 : -1, - scroll = this.cssPosition === "absolute" && !(this.scrollParent[0] !== document && $.contains(this.scrollParent[0], this.offsetParent[0])) ? this.offsetParent : this.scrollParent, scrollIsRootNode = (/(html|body)/i).test(scroll[0].tagName); + var keyCode = $.ui.keyCode, + length = this.headers.length, + currentIndex = this.headers.index( event.target ), + toFocus = false; - return { - top: ( - pos.top + // The absolute mouse position - this.offset.relative.top * mod + // Only for relative positioned nodes: Relative offset from element to offset parent - this.offset.parent.top * mod - // The offsetParent's offset without borders (offset + border) - ( ( this.cssPosition === "fixed" ? -this.scrollParent.scrollTop() : ( scrollIsRootNode ? 0 : scroll.scrollTop() ) ) * mod) - ), - left: ( - pos.left + // The absolute mouse position - this.offset.relative.left * mod + // Only for relative positioned nodes: Relative offset from element to offset parent - this.offset.parent.left * mod - // The offsetParent's offset without borders (offset + border) - ( ( this.cssPosition === "fixed" ? -this.scrollParent.scrollLeft() : scrollIsRootNode ? 0 : scroll.scrollLeft() ) * mod) - ) - }; + switch ( event.keyCode ) { + case keyCode.RIGHT: + case keyCode.DOWN: + toFocus = this.headers[ ( currentIndex + 1 ) % length ]; + break; + case keyCode.LEFT: + case keyCode.UP: + toFocus = this.headers[ ( currentIndex - 1 + length ) % length ]; + break; + case keyCode.SPACE: + case keyCode.ENTER: + this._eventHandler( event ); + break; + case keyCode.HOME: + toFocus = this.headers[ 0 ]; + break; + case keyCode.END: + toFocus = this.headers[ length - 1 ]; + break; + } + if ( toFocus ) { + $( event.target ).attr( "tabIndex", -1 ); + $( toFocus ).attr( "tabIndex", 0 ); + toFocus.focus(); + event.preventDefault(); + } }, - _generatePosition: function(event) { - - var containment, co, top, left, - o = this.options, - scroll = this.cssPosition === "absolute" && !(this.scrollParent[0] !== document && $.contains(this.scrollParent[0], this.offsetParent[0])) ? this.offsetParent : this.scrollParent, - scrollIsRootNode = (/(html|body)/i).test(scroll[0].tagName), - pageX = event.pageX, - pageY = event.pageY; - - /* - * - Position constraining - - * Constrain the position to a mix of grid, containment. - */ - - if(this.originalPosition) { //If we are not dragging yet, we won't check for options - if(this.containment) { - if (this.relative_container){ - co = this.relative_container.offset(); - containment = [ this.containment[0] + co.left, - this.containment[1] + co.top, - this.containment[2] + co.left, - this.containment[3] + co.top ]; - } - else { - containment = this.containment; - } - - if(event.pageX - this.offset.click.left < containment[0]) { - pageX = containment[0] + this.offset.click.left; - } - if(event.pageY - this.offset.click.top < containment[1]) { - pageY = containment[1] + this.offset.click.top; - } - if(event.pageX - this.offset.click.left > containment[2]) { - pageX = containment[2] + this.offset.click.left; - } - if(event.pageY - this.offset.click.top > containment[3]) { - pageY = containment[3] + this.offset.click.top; - } - } + _panelKeyDown : function( event ) { + if ( event.keyCode === $.ui.keyCode.UP && event.ctrlKey ) { + $( event.currentTarget ).prev().focus(); + } + }, - if(o.grid) { - //Check for grid elements set to 0 to prevent divide by 0 error causing invalid argument errors in IE (see ticket #6950) - top = o.grid[1] ? this.originalPageY + Math.round((pageY - this.originalPageY) / o.grid[1]) * o.grid[1] : this.originalPageY; - pageY = containment ? ((top - this.offset.click.top >= containment[1] || top - this.offset.click.top > containment[3]) ? top : ((top - this.offset.click.top >= containment[1]) ? top - o.grid[1] : top + o.grid[1])) : top; + refresh: function() { + var options = this.options; + this._processPanels(); - left = o.grid[0] ? this.originalPageX + Math.round((pageX - this.originalPageX) / o.grid[0]) * o.grid[0] : this.originalPageX; - pageX = containment ? ((left - this.offset.click.left >= containment[0] || left - this.offset.click.left > containment[2]) ? left : ((left - this.offset.click.left >= containment[0]) ? left - o.grid[0] : left + o.grid[0])) : left; + // was collapsed or no panel + if ( ( options.active === false && options.collapsible === true ) || !this.headers.length ) { + options.active = false; + this.active = $(); + // active false only when collapsible is true + } else if ( options.active === false ) { + this._activate( 0 ); + // was active, but active panel is gone + } else if ( this.active.length && !$.contains( this.element[ 0 ], this.active[ 0 ] ) ) { + // all remaining panel are disabled + if ( this.headers.length === this.headers.find(".ui-state-disabled").length ) { + options.active = false; + this.active = $(); + // activate previous panel + } else { + this._activate( Math.max( 0, options.active - 1 ) ); } - + // was active, active panel still exists + } else { + // make sure active index is correct + options.active = this.headers.index( this.active ); } - return { - top: ( - pageY - // The absolute mouse position - this.offset.click.top - // Click offset (relative to the element) - this.offset.relative.top - // Only for relative positioned nodes: Relative offset from element to offset parent - this.offset.parent.top + // The offsetParent's offset without borders (offset + border) - ( ( this.cssPosition === "fixed" ? -this.scrollParent.scrollTop() : ( scrollIsRootNode ? 0 : scroll.scrollTop() ) )) - ), - left: ( - pageX - // The absolute mouse position - this.offset.click.left - // Click offset (relative to the element) - this.offset.relative.left - // Only for relative positioned nodes: Relative offset from element to offset parent - this.offset.parent.left + // The offsetParent's offset without borders (offset + border) - ( ( this.cssPosition === "fixed" ? -this.scrollParent.scrollLeft() : scrollIsRootNode ? 0 : scroll.scrollLeft() )) - ) - }; - - }, + this._destroyIcons(); - _clear: function() { - this.helper.removeClass("ui-draggable-dragging"); - if(this.helper[0] !== this.element[0] && !this.cancelHelperRemoval) { - this.helper.remove(); - } - this.helper = null; - this.cancelHelperRemoval = false; + this._refresh(); }, - // From now on bulk stuff - mainly helpers + _processPanels: function() { + this.headers = this.element.find( this.options.header ) + .addClass( "ui-accordion-header ui-helper-reset ui-state-default ui-corner-all" ); - _trigger: function(type, event, ui) { - ui = ui || this._uiHash(); - $.ui.plugin.call(this, type, [event, ui]); - //The absolute position has to be recalculated after plugins - if(type === "drag") { - this.positionAbs = this._convertPositionTo("absolute"); - } - return $.Widget.prototype._trigger.call(this, type, event, ui); + this.headers.next() + .addClass( "ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom" ) + .filter(":not(.ui-accordion-content-active)") + .hide(); }, - plugins: {}, - - _uiHash: function() { - return { - helper: this.helper, - position: this.position, - originalPosition: this.originalPosition, - offset: this.positionAbs - }; - } + _refresh: function() { + var maxHeight, + options = this.options, + heightStyle = options.heightStyle, + parent = this.element.parent(), + accordionId = this.accordionId = "ui-accordion-" + + (this.element.attr( "id" ) || ++uid); -}); - -$.ui.plugin.add("draggable", "connectToSortable", { - start: function(event, ui) { + this.active = this._findActive( options.active ) + .addClass( "ui-accordion-header-active ui-state-active ui-corner-top" ) + .removeClass( "ui-corner-all" ); + this.active.next() + .addClass( "ui-accordion-content-active" ) + .show(); - var inst = $(this).data("ui-draggable"), o = inst.options, - uiSortable = $.extend({}, ui, { item: inst.element }); - inst.sortables = []; - $(o.connectToSortable).each(function() { - var sortable = $.data(this, "ui-sortable"); - if (sortable && !sortable.options.disabled) { - inst.sortables.push({ - instance: sortable, - shouldRevert: sortable.options.revert - }); - sortable.refreshPositions(); // Call the sortable's refreshPositions at drag start to refresh the containerCache since the sortable container cache is used in drag and needs to be up to date (this will ensure it's initialised as well as being kept in step with any changes that might have happened on the page). - sortable._trigger("activate", event, uiSortable); - } - }); + this.headers + .attr( "role", "tab" ) + .each(function( i ) { + var header = $( this ), + headerId = header.attr( "id" ), + panel = header.next(), + panelId = panel.attr( "id" ); + if ( !headerId ) { + headerId = accordionId + "-header-" + i; + header.attr( "id", headerId ); + } + if ( !panelId ) { + panelId = accordionId + "-panel-" + i; + panel.attr( "id", panelId ); + } + header.attr( "aria-controls", panelId ); + panel.attr( "aria-labelledby", headerId ); + }) + .next() + .attr( "role", "tabpanel" ); - }, - stop: function(event, ui) { + this.headers + .not( this.active ) + .attr({ + "aria-selected": "false", + "aria-expanded": "false", + tabIndex: -1 + }) + .next() + .attr({ + "aria-hidden": "true" + }) + .hide(); - //If we are still over the sortable, we fake the stop event of the sortable, but also remove helper - var inst = $(this).data("ui-draggable"), - uiSortable = $.extend({}, ui, { item: inst.element }); + // make sure at least one header is in the tab order + if ( !this.active.length ) { + this.headers.eq( 0 ).attr( "tabIndex", 0 ); + } else { + this.active.attr({ + "aria-selected": "true", + "aria-expanded": "true", + tabIndex: 0 + }) + .next() + .attr({ + "aria-hidden": "false" + }); + } - $.each(inst.sortables, function() { - if(this.instance.isOver) { + this._createIcons(); - this.instance.isOver = 0; + this._setupEvents( options.event ); - inst.cancelHelperRemoval = true; //Don't remove the helper in the draggable instance - this.instance.cancelHelperRemoval = false; //Remove it in the sortable instance (so sortable plugins like revert still work) + if ( heightStyle === "fill" ) { + maxHeight = parent.height(); + this.element.siblings( ":visible" ).each(function() { + var elem = $( this ), + position = elem.css( "position" ); - //The sortable revert is supported, and we have to set a temporary dropped variable on the draggable to support revert: "valid/invalid" - if(this.shouldRevert) { - this.instance.options.revert = this.shouldRevert; + if ( position === "absolute" || position === "fixed" ) { + return; } + maxHeight -= elem.outerHeight( true ); + }); - //Trigger the stop of the sortable - this.instance._mouseStop(event); + this.headers.each(function() { + maxHeight -= $( this ).outerHeight( true ); + }); - this.instance.options.helper = this.instance.options._helper; + this.headers.next() + .each(function() { + $( this ).height( Math.max( 0, maxHeight - + $( this ).innerHeight() + $( this ).height() ) ); + }) + .css( "overflow", "auto" ); + } else if ( heightStyle === "auto" ) { + maxHeight = 0; + this.headers.next() + .each(function() { + maxHeight = Math.max( maxHeight, $( this ).css( "height", "" ).height() ); + }) + .height( maxHeight ); + } + }, - //If the helper has been the original item, restore properties in the sortable - if(inst.options.helper === "original") { - this.instance.currentItem.css({ top: "auto", left: "auto" }); - } + _activate: function( index ) { + var active = this._findActive( index )[ 0 ]; - } else { - this.instance.cancelHelperRemoval = false; //Remove the helper in the sortable instance - this.instance._trigger("deactivate", event, uiSortable); - } + // trying to activate the already active panel + if ( active === this.active[ 0 ] ) { + return; + } - }); + // trying to collapse, simulate a click on the currently active header + active = active || this.active[ 0 ]; + this._eventHandler({ + target: active, + currentTarget: active, + preventDefault: $.noop + }); }, - drag: function(event, ui) { - var inst = $(this).data("ui-draggable"), that = this; + _findActive: function( selector ) { + return typeof selector === "number" ? this.headers.eq( selector ) : $(); + }, - $.each(inst.sortables, function() { + _setupEvents: function( event ) { + var events = { + keydown: "_keydown" + }; + if ( event ) { + $.each( event.split(" "), function( index, eventName ) { + events[ eventName ] = "_eventHandler"; + }); + } - var innermostIntersecting = false, - thisSortable = this; + this._off( this.headers.add( this.headers.next() ) ); + this._on( this.headers, events ); + this._on( this.headers.next(), { keydown: "_panelKeyDown" }); + this._hoverable( this.headers ); + this._focusable( this.headers ); + }, - //Copy over some variables to allow calling the sortable's native _intersectsWith - this.instance.positionAbs = inst.positionAbs; - this.instance.helperProportions = inst.helperProportions; - this.instance.offset.click = inst.offset.click; + _eventHandler: function( event ) { + var options = this.options, + active = this.active, + clicked = $( event.currentTarget ), + clickedIsActive = clicked[ 0 ] === active[ 0 ], + collapsing = clickedIsActive && options.collapsible, + toShow = collapsing ? $() : clicked.next(), + toHide = active.next(), + eventData = { + oldHeader: active, + oldPanel: toHide, + newHeader: collapsing ? $() : clicked, + newPanel: toShow + }; - if(this.instance._intersectsWith(this.instance.containerCache)) { - innermostIntersecting = true; - $.each(inst.sortables, function () { - this.instance.positionAbs = inst.positionAbs; - this.instance.helperProportions = inst.helperProportions; - this.instance.offset.click = inst.offset.click; - if (this !== thisSortable && - this.instance._intersectsWith(this.instance.containerCache) && - $.contains(thisSortable.instance.element[0], this.instance.element[0]) - ) { - innermostIntersecting = false; - } - return innermostIntersecting; - }); - } + event.preventDefault(); + if ( + // click on active header, but not collapsible + ( clickedIsActive && !options.collapsible ) || + // allow canceling activation + ( this._trigger( "beforeActivate", event, eventData ) === false ) ) { + return; + } - if(innermostIntersecting) { - //If it intersects, we use a little isOver variable and set it once, so our move-in stuff gets fired only once - if(!this.instance.isOver) { + options.active = collapsing ? false : this.headers.index( clicked ); - this.instance.isOver = 1; - //Now we fake the start of dragging for the sortable instance, - //by cloning the list group item, appending it to the sortable and using it as inst.currentItem - //We can then fire the start event of the sortable with our passed browser event, and our own helper (so it doesn't create a new one) - this.instance.currentItem = $(that).clone().removeAttr("id").appendTo(this.instance.element).data("ui-sortable-item", true); - this.instance.options._helper = this.instance.options.helper; //Store helper option to later restore it - this.instance.options.helper = function() { return ui.helper[0]; }; + // when the call to ._toggle() comes after the class changes + // it causes a very odd bug in IE 8 (see #6720) + this.active = clickedIsActive ? $() : clicked; + this._toggle( eventData ); - event.target = this.instance.currentItem[0]; - this.instance._mouseCapture(event, true); - this.instance._mouseStart(event, true, true); + // switch classes + // corner classes on the previously active header stay after the animation + active.removeClass( "ui-accordion-header-active ui-state-active" ); + if ( options.icons ) { + active.children( ".ui-accordion-header-icon" ) + .removeClass( options.icons.activeHeader ) + .addClass( options.icons.header ); + } - //Because the browser event is way off the new appended portlet, we modify a couple of variables to reflect the changes - this.instance.offset.click.top = inst.offset.click.top; - this.instance.offset.click.left = inst.offset.click.left; - this.instance.offset.parent.left -= inst.offset.parent.left - this.instance.offset.parent.left; - this.instance.offset.parent.top -= inst.offset.parent.top - this.instance.offset.parent.top; + if ( !clickedIsActive ) { + clicked + .removeClass( "ui-corner-all" ) + .addClass( "ui-accordion-header-active ui-state-active ui-corner-top" ); + if ( options.icons ) { + clicked.children( ".ui-accordion-header-icon" ) + .removeClass( options.icons.header ) + .addClass( options.icons.activeHeader ); + } - inst._trigger("toSortable", event); - inst.dropped = this.instance.element; //draggable revert needs that - //hack so receive/update callbacks work (mostly) - inst.currentItem = inst.element; - this.instance.fromOutside = inst; + clicked + .next() + .addClass( "ui-accordion-content-active" ); + } + }, - } + _toggle: function( data ) { + var toShow = data.newPanel, + toHide = this.prevShow.length ? this.prevShow : data.oldPanel; - //Provided we did all the previous steps, we can fire the drag event of the sortable on every draggable drag, when it intersects with the sortable - if(this.instance.currentItem) { - this.instance._mouseDrag(event); - } + // handle activating a panel during the animation for another activation + this.prevShow.add( this.prevHide ).stop( true, true ); + this.prevShow = toShow; + this.prevHide = toHide; - } else { + if ( this.options.animate ) { + this._animate( toShow, toHide, data ); + } else { + toHide.hide(); + toShow.show(); + this._toggleComplete( data ); + } - //If it doesn't intersect with the sortable, and it intersected before, - //we fake the drag stop of the sortable, but make sure it doesn't remove the helper by using cancelHelperRemoval - if(this.instance.isOver) { + toHide.attr({ + "aria-hidden": "true" + }); + toHide.prev().attr( "aria-selected", "false" ); + // if we're switching panels, remove the old header from the tab order + // if we're opening from collapsed state, remove the previous header from the tab order + // if we're collapsing, then keep the collapsing header in the tab order + if ( toShow.length && toHide.length ) { + toHide.prev().attr({ + "tabIndex": -1, + "aria-expanded": "false" + }); + } else if ( toShow.length ) { + this.headers.filter(function() { + return $( this ).attr( "tabIndex" ) === 0; + }) + .attr( "tabIndex", -1 ); + } - this.instance.isOver = 0; - this.instance.cancelHelperRemoval = true; + toShow + .attr( "aria-hidden", "false" ) + .prev() + .attr({ + "aria-selected": "true", + tabIndex: 0, + "aria-expanded": "true" + }); + }, - //Prevent reverting on this forced stop - this.instance.options.revert = false; + _animate: function( toShow, toHide, data ) { + var total, easing, duration, + that = this, + adjust = 0, + down = toShow.length && + ( !toHide.length || ( toShow.index() < toHide.index() ) ), + animate = this.options.animate || {}, + options = down && animate.down || animate, + complete = function() { + that._toggleComplete( data ); + }; - // The out event needs to be triggered independently - this.instance._trigger("out", event, this.instance._uiHash(this.instance)); + if ( typeof options === "number" ) { + duration = options; + } + if ( typeof options === "string" ) { + easing = options; + } + // fall back from options to animation in case of partial down settings + easing = easing || options.easing || animate.easing; + duration = duration || options.duration || animate.duration; - this.instance._mouseStop(event, true); - this.instance.options.helper = this.instance.options._helper; + if ( !toHide.length ) { + return toShow.animate( showProps, duration, easing, complete ); + } + if ( !toShow.length ) { + return toHide.animate( hideProps, duration, easing, complete ); + } - //Now we remove our currentItem, the list group clone again, and the placeholder, and animate the helper back to it's original size - this.instance.currentItem.remove(); - if(this.instance.placeholder) { - this.instance.placeholder.remove(); + total = toShow.show().outerHeight(); + toHide.animate( hideProps, { + duration: duration, + easing: easing, + step: function( now, fx ) { + fx.now = Math.round( now ); + } + }); + toShow + .hide() + .animate( showProps, { + duration: duration, + easing: easing, + complete: complete, + step: function( now, fx ) { + fx.now = Math.round( now ); + if ( fx.prop !== "height" ) { + adjust += fx.now; + } else if ( that.options.heightStyle !== "content" ) { + fx.now = Math.round( total - toHide.outerHeight() - adjust ); + adjust = 0; } - - inst._trigger("fromSortable", event); - inst.dropped = false; //draggable revert needs that } + }); + }, - } - - }); + _toggleComplete: function( data ) { + var toHide = data.oldPanel; - } -}); + toHide + .removeClass( "ui-accordion-content-active" ) + .prev() + .removeClass( "ui-corner-top" ) + .addClass( "ui-corner-all" ); -$.ui.plugin.add("draggable", "cursor", { - start: function() { - var t = $("body"), o = $(this).data("ui-draggable").options; - if (t.css("cursor")) { - o._cursor = t.css("cursor"); - } - t.css("cursor", o.cursor); - }, - stop: function() { - var o = $(this).data("ui-draggable").options; - if (o._cursor) { - $("body").css("cursor", o._cursor); + // Work around for rendering bug in IE (#5421) + if ( toHide.length ) { + toHide.parent()[0].className = toHide.parent()[0].className; } + this._trigger( "activate", null, data ); } }); -$.ui.plugin.add("draggable", "opacity", { - start: function(event, ui) { - var t = $(ui.helper), o = $(this).data("ui-draggable").options; - if(t.css("opacity")) { - o._opacity = t.css("opacity"); - } - t.css("opacity", o.opacity); - }, - stop: function(event, ui) { - var o = $(this).data("ui-draggable").options; - if(o._opacity) { - $(ui.helper).css("opacity", o._opacity); - } - } -}); +})( jQuery ); +(function( $, undefined ) { -$.ui.plugin.add("draggable", "scroll", { - start: function() { - var i = $(this).data("ui-draggable"); - if(i.scrollParent[0] !== document && i.scrollParent[0].tagName !== "HTML") { - i.overflowOffset = i.scrollParent.offset(); - } - }, - drag: function( event ) { +$.widget( "ui.autocomplete", { + version: "1.10.4", + defaultElement: "", + options: { + appendTo: null, + autoFocus: false, + delay: 300, + minLength: 1, + position: { + my: "left top", + at: "left bottom", + collision: "none" + }, + source: null, - var i = $(this).data("ui-draggable"), o = i.options, scrolled = false; + // callbacks + change: null, + close: null, + focus: null, + open: null, + response: null, + search: null, + select: null + }, - if(i.scrollParent[0] !== document && i.scrollParent[0].tagName !== "HTML") { + requestIndex: 0, + pending: 0, - if(!o.axis || o.axis !== "x") { - if((i.overflowOffset.top + i.scrollParent[0].offsetHeight) - event.pageY < o.scrollSensitivity) { - i.scrollParent[0].scrollTop = scrolled = i.scrollParent[0].scrollTop + o.scrollSpeed; - } else if(event.pageY - i.overflowOffset.top < o.scrollSensitivity) { - i.scrollParent[0].scrollTop = scrolled = i.scrollParent[0].scrollTop - o.scrollSpeed; - } - } + _create: function() { + // Some browsers only repeat keydown events, not keypress events, + // so we use the suppressKeyPress flag to determine if we've already + // handled the keydown event. #7269 + // Unfortunately the code for & in keypress is the same as the up arrow, + // so we use the suppressKeyPressRepeat flag to avoid handling keypress + // events when we know the keydown event was used to modify the + // search term. #7799 + var suppressKeyPress, suppressKeyPressRepeat, suppressInput, + nodeName = this.element[0].nodeName.toLowerCase(), + isTextarea = nodeName === "textarea", + isInput = nodeName === "input"; - if(!o.axis || o.axis !== "y") { - if((i.overflowOffset.left + i.scrollParent[0].offsetWidth) - event.pageX < o.scrollSensitivity) { - i.scrollParent[0].scrollLeft = scrolled = i.scrollParent[0].scrollLeft + o.scrollSpeed; - } else if(event.pageX - i.overflowOffset.left < o.scrollSensitivity) { - i.scrollParent[0].scrollLeft = scrolled = i.scrollParent[0].scrollLeft - o.scrollSpeed; - } - } + this.isMultiLine = + // Textareas are always multi-line + isTextarea ? true : + // Inputs are always single-line, even if inside a contentEditable element + // IE also treats inputs as contentEditable + isInput ? false : + // All other element types are determined by whether or not they're contentEditable + this.element.prop( "isContentEditable" ); - } else { + this.valueMethod = this.element[ isTextarea || isInput ? "val" : "text" ]; + this.isNewMenu = true; - if(!o.axis || o.axis !== "x") { - if(event.pageY - $(document).scrollTop() < o.scrollSensitivity) { - scrolled = $(document).scrollTop($(document).scrollTop() - o.scrollSpeed); - } else if($(window).height() - (event.pageY - $(document).scrollTop()) < o.scrollSensitivity) { - scrolled = $(document).scrollTop($(document).scrollTop() + o.scrollSpeed); - } - } + this.element + .addClass( "ui-autocomplete-input" ) + .attr( "autocomplete", "off" ); - if(!o.axis || o.axis !== "y") { - if(event.pageX - $(document).scrollLeft() < o.scrollSensitivity) { - scrolled = $(document).scrollLeft($(document).scrollLeft() - o.scrollSpeed); - } else if($(window).width() - (event.pageX - $(document).scrollLeft()) < o.scrollSensitivity) { - scrolled = $(document).scrollLeft($(document).scrollLeft() + o.scrollSpeed); + this._on( this.element, { + keydown: function( event ) { + if ( this.element.prop( "readOnly" ) ) { + suppressKeyPress = true; + suppressInput = true; + suppressKeyPressRepeat = true; + return; } - } - - } - - if(scrolled !== false && $.ui.ddmanager && !o.dropBehaviour) { - $.ui.ddmanager.prepareOffsets(i, event); - } - } -}); - -$.ui.plugin.add("draggable", "snap", { - start: function() { - - var i = $(this).data("ui-draggable"), - o = i.options; + suppressKeyPress = false; + suppressInput = false; + suppressKeyPressRepeat = false; + var keyCode = $.ui.keyCode; + switch( event.keyCode ) { + case keyCode.PAGE_UP: + suppressKeyPress = true; + this._move( "previousPage", event ); + break; + case keyCode.PAGE_DOWN: + suppressKeyPress = true; + this._move( "nextPage", event ); + break; + case keyCode.UP: + suppressKeyPress = true; + this._keyEvent( "previous", event ); + break; + case keyCode.DOWN: + suppressKeyPress = true; + this._keyEvent( "next", event ); + break; + case keyCode.ENTER: + case keyCode.NUMPAD_ENTER: + // when menu is open and has focus + if ( this.menu.active ) { + // #6055 - Opera still allows the keypress to occur + // which causes forms to submit + suppressKeyPress = true; + event.preventDefault(); + this.menu.select( event ); + } + break; + case keyCode.TAB: + if ( this.menu.active ) { + this.menu.select( event ); + } + break; + case keyCode.ESCAPE: + if ( this.menu.element.is( ":visible" ) ) { + this._value( this.term ); + this.close( event ); + // Different browsers have different default behavior for escape + // Single press can mean undo or clear + // Double press in IE means clear the whole form + event.preventDefault(); + } + break; + default: + suppressKeyPressRepeat = true; + // search timeout should be triggered before the input value is changed + this._searchTimeout( event ); + break; + } + }, + keypress: function( event ) { + if ( suppressKeyPress ) { + suppressKeyPress = false; + if ( !this.isMultiLine || this.menu.element.is( ":visible" ) ) { + event.preventDefault(); + } + return; + } + if ( suppressKeyPressRepeat ) { + return; + } - i.snapElements = []; + // replicate some key handlers to allow them to repeat in Firefox and Opera + var keyCode = $.ui.keyCode; + switch( event.keyCode ) { + case keyCode.PAGE_UP: + this._move( "previousPage", event ); + break; + case keyCode.PAGE_DOWN: + this._move( "nextPage", event ); + break; + case keyCode.UP: + this._keyEvent( "previous", event ); + break; + case keyCode.DOWN: + this._keyEvent( "next", event ); + break; + } + }, + input: function( event ) { + if ( suppressInput ) { + suppressInput = false; + event.preventDefault(); + return; + } + this._searchTimeout( event ); + }, + focus: function() { + this.selectedItem = null; + this.previous = this._value(); + }, + blur: function( event ) { + if ( this.cancelBlur ) { + delete this.cancelBlur; + return; + } - $(o.snap.constructor !== String ? ( o.snap.items || ":data(ui-draggable)" ) : o.snap).each(function() { - var $t = $(this), - $o = $t.offset(); - if(this !== i.element[0]) { - i.snapElements.push({ - item: this, - width: $t.outerWidth(), height: $t.outerHeight(), - top: $o.top, left: $o.left - }); + clearTimeout( this.searching ); + this.close( event ); + this._change( event ); } }); - }, - drag: function(event, ui) { - - var ts, bs, ls, rs, l, r, t, b, i, first, - inst = $(this).data("ui-draggable"), - o = inst.options, - d = o.snapTolerance, - x1 = ui.offset.left, x2 = x1 + inst.helperProportions.width, - y1 = ui.offset.top, y2 = y1 + inst.helperProportions.height; - - for (i = inst.snapElements.length - 1; i >= 0; i--){ + this._initSource(); + this.menu = $( "
" + + ((numMonths[0] > 0 && col === numMonths[1]-1) ? "
" : "") : ""); + group += calender; + } + html += group; } - - //Create the placeholder - that.placeholder = $(o.placeholder.element.call(that.element, that.currentItem)); - - //Append it after the actual current item - that.currentItem.after(that.placeholder); - - //Update the size of the placeholder (TODO: Logic to fuzzy, see line 316/317) - o.placeholder.update(that, that.placeholder); - + html += buttonPanel; + inst._keyEvent = false; + return html; }, - _contactContainers: function(event) { - var i, j, dist, itemWithLeastDistance, posProperty, sizeProperty, base, cur, nearBottom, floating, - innermostContainer = null, - innermostIndex = null; - - // get innermost container that intersects with item - for (i = this.containers.length - 1; i >= 0; i--) { - - // never consider a container that's located within the item itself - if($.contains(this.currentItem[0], this.containers[i].element[0])) { - continue; - } - - if(this._intersectsWith(this.containers[i].containerCache)) { - - // if we've already found a container and it's more "inner" than this, then continue - if(innermostContainer && $.contains(this.containers[i].element[0], innermostContainer.element[0])) { - continue; - } + /* Generate the month and year header. */ + _generateMonthYearHeader: function(inst, drawMonth, drawYear, minDate, maxDate, + secondary, monthNames, monthNamesShort) { - innermostContainer = this.containers[i]; - innermostIndex = i; + var inMinYear, inMaxYear, month, years, thisYear, determineYear, year, endYear, + changeMonth = this._get(inst, "changeMonth"), + changeYear = this._get(inst, "changeYear"), + showMonthAfterYear = this._get(inst, "showMonthAfterYear"), + html = "
", + monthHtml = ""; - } else { - // container doesn't intersect. trigger "out" event if necessary - if(this.containers[i].containerCache.over) { - this.containers[i]._trigger("out", event, this._uiHash(this)); - this.containers[i].containerCache.over = 0; + // month selection + if (secondary || !changeMonth) { + monthHtml += "" + monthNames[drawMonth] + ""; + } else { + inMinYear = (minDate && minDate.getFullYear() === drawYear); + inMaxYear = (maxDate && maxDate.getFullYear() === drawYear); + monthHtml += ""; } - // if no intersecting containers found, return - if(!innermostContainer) { - return; + if (!showMonthAfterYear) { + html += monthHtml + (secondary || !(changeMonth && changeYear) ? " " : ""); } - // move the item into the container if it's not there already - if(this.containers.length === 1) { - if (!this.containers[innermostIndex].containerCache.over) { - this.containers[innermostIndex]._trigger("over", event, this._uiHash(this)); - this.containers[innermostIndex].containerCache.over = 1; - } - } else { - - //When entering a new container, we will find the item with the least distance and append our item near it - dist = 10000; - itemWithLeastDistance = null; - floating = innermostContainer.floating || isFloating(this.currentItem); - posProperty = floating ? "left" : "top"; - sizeProperty = floating ? "width" : "height"; - base = this.positionAbs[posProperty] + this.offset.click[posProperty]; - for (j = this.items.length - 1; j >= 0; j--) { - if(!$.contains(this.containers[innermostIndex].element[0], this.items[j].item[0])) { - continue; - } - if(this.items[j].item[0] === this.currentItem[0]) { - continue; - } - if (floating && !isOverAxis(this.positionAbs.top + this.offset.click.top, this.items[j].top, this.items[j].height)) { - continue; - } - cur = this.items[j].item.offset()[posProperty]; - nearBottom = false; - if(Math.abs(cur - base) > Math.abs(cur + this.items[j][sizeProperty] - base)){ - nearBottom = true; - cur += this.items[j][sizeProperty]; + // year selection + if ( !inst.yearshtml ) { + inst.yearshtml = ""; + if (secondary || !changeYear) { + html += "" + drawYear + ""; + } else { + // determine range of years to display + years = this._get(inst, "yearRange").split(":"); + thisYear = new Date().getFullYear(); + determineYear = function(value) { + var year = (value.match(/c[+\-].*/) ? drawYear + parseInt(value.substring(1), 10) : + (value.match(/[+\-].*/) ? thisYear + parseInt(value, 10) : + parseInt(value, 10))); + return (isNaN(year) ? thisYear : year); + }; + year = determineYear(years[0]); + endYear = Math.max(year, determineYear(years[1] || "")); + year = (minDate ? Math.max(year, minDate.getFullYear()) : year); + endYear = (maxDate ? Math.min(endYear, maxDate.getFullYear()) : endYear); + inst.yearshtml += ""; - if(Math.abs(cur - base) < dist) { - dist = Math.abs(cur - base); itemWithLeastDistance = this.items[j]; - this.direction = nearBottom ? "up": "down"; - } + html += inst.yearshtml; + inst.yearshtml = null; } + } - //Check if dropOnEmpty is enabled - if(!itemWithLeastDistance && !this.options.dropOnEmpty) { - return; - } + html += this._get(inst, "yearSuffix"); + if (showMonthAfterYear) { + html += (secondary || !(changeMonth && changeYear) ? " " : "") + monthHtml; + } + html += "
"; // Close datepicker_header + return html; + }, - if(this.currentContainer === this.containers[innermostIndex]) { - return; - } + /* Adjust one of the date sub-fields. */ + _adjustInstDate: function(inst, offset, period) { + var year = inst.drawYear + (period === "Y" ? offset : 0), + month = inst.drawMonth + (period === "M" ? offset : 0), + day = Math.min(inst.selectedDay, this._getDaysInMonth(year, month)) + (period === "D" ? offset : 0), + date = this._restrictMinMax(inst, this._daylightSavingAdjust(new Date(year, month, day))); - itemWithLeastDistance ? this._rearrange(event, itemWithLeastDistance, null, true) : this._rearrange(event, null, this.containers[innermostIndex].element, true); - this._trigger("change", event, this._uiHash()); - this.containers[innermostIndex]._trigger("change", event, this._uiHash(this)); - this.currentContainer = this.containers[innermostIndex]; + inst.selectedDay = date.getDate(); + inst.drawMonth = inst.selectedMonth = date.getMonth(); + inst.drawYear = inst.selectedYear = date.getFullYear(); + if (period === "M" || period === "Y") { + this._notifyChange(inst); + } + }, - //Update the placeholder - this.options.placeholder.update(this.currentContainer, this.placeholder); + /* Ensure a date is within any min/max bounds. */ + _restrictMinMax: function(inst, date) { + var minDate = this._getMinMaxDate(inst, "min"), + maxDate = this._getMinMaxDate(inst, "max"), + newDate = (minDate && date < minDate ? minDate : date); + return (maxDate && newDate > maxDate ? maxDate : newDate); + }, - this.containers[innermostIndex]._trigger("over", event, this._uiHash(this)); - this.containers[innermostIndex].containerCache.over = 1; + /* Notify change of month/year. */ + _notifyChange: function(inst) { + var onChange = this._get(inst, "onChangeMonthYear"); + if (onChange) { + onChange.apply((inst.input ? inst.input[0] : null), + [inst.selectedYear, inst.selectedMonth + 1, inst]); } + }, + /* Determine the number of months to show. */ + _getNumberOfMonths: function(inst) { + var numMonths = this._get(inst, "numberOfMonths"); + return (numMonths == null ? [1, 1] : (typeof numMonths === "number" ? [1, numMonths] : numMonths)); + }, + /* Determine the current maximum date - ensure no time components are set. */ + _getMinMaxDate: function(inst, minMax) { + return this._determineDate(inst, this._get(inst, minMax + "Date"), null); }, - _createHelper: function(event) { + /* Find the number of days in a given month. */ + _getDaysInMonth: function(year, month) { + return 32 - this._daylightSavingAdjust(new Date(year, month, 32)).getDate(); + }, - var o = this.options, - helper = $.isFunction(o.helper) ? $(o.helper.apply(this.element[0], [event, this.currentItem])) : (o.helper === "clone" ? this.currentItem.clone() : this.currentItem); + /* Find the day of the week of the first of a month. */ + _getFirstDayOfMonth: function(year, month) { + return new Date(year, month, 1).getDay(); + }, - //Add the helper to the DOM if that didn't happen already - if(!helper.parents("body").length) { - $(o.appendTo !== "parent" ? o.appendTo : this.currentItem[0].parentNode)[0].appendChild(helper[0]); - } + /* Determines if we should allow a "next/prev" month display change. */ + _canAdjustMonth: function(inst, offset, curYear, curMonth) { + var numMonths = this._getNumberOfMonths(inst), + date = this._daylightSavingAdjust(new Date(curYear, + curMonth + (offset < 0 ? offset : numMonths[0] * numMonths[1]), 1)); - if(helper[0] === this.currentItem[0]) { - this._storedCSS = { width: this.currentItem[0].style.width, height: this.currentItem[0].style.height, position: this.currentItem.css("position"), top: this.currentItem.css("top"), left: this.currentItem.css("left") }; + if (offset < 0) { + date.setDate(this._getDaysInMonth(date.getFullYear(), date.getMonth())); } + return this._isInRange(inst, date); + }, - if(!helper[0].style.width || o.forceHelperSize) { - helper.width(this.currentItem.width()); - } - if(!helper[0].style.height || o.forceHelperSize) { - helper.height(this.currentItem.height()); - } + /* Is the given date in the accepted range? */ + _isInRange: function(inst, date) { + var yearSplit, currentYear, + minDate = this._getMinMaxDate(inst, "min"), + maxDate = this._getMinMaxDate(inst, "max"), + minYear = null, + maxYear = null, + years = this._get(inst, "yearRange"); + if (years){ + yearSplit = years.split(":"); + currentYear = new Date().getFullYear(); + minYear = parseInt(yearSplit[0], 10); + maxYear = parseInt(yearSplit[1], 10); + if ( yearSplit[0].match(/[+\-].*/) ) { + minYear += currentYear; + } + if ( yearSplit[1].match(/[+\-].*/) ) { + maxYear += currentYear; + } + } - return helper; + return ((!minDate || date.getTime() >= minDate.getTime()) && + (!maxDate || date.getTime() <= maxDate.getTime()) && + (!minYear || date.getFullYear() >= minYear) && + (!maxYear || date.getFullYear() <= maxYear)); + }, + /* Provide the configuration settings for formatting/parsing. */ + _getFormatConfig: function(inst) { + var shortYearCutoff = this._get(inst, "shortYearCutoff"); + shortYearCutoff = (typeof shortYearCutoff !== "string" ? shortYearCutoff : + new Date().getFullYear() % 100 + parseInt(shortYearCutoff, 10)); + return {shortYearCutoff: shortYearCutoff, + dayNamesShort: this._get(inst, "dayNamesShort"), dayNames: this._get(inst, "dayNames"), + monthNamesShort: this._get(inst, "monthNamesShort"), monthNames: this._get(inst, "monthNames")}; }, - _adjustOffsetFromHelper: function(obj) { - if (typeof obj === "string") { - obj = obj.split(" "); - } - if ($.isArray(obj)) { - obj = {left: +obj[0], top: +obj[1] || 0}; - } - if ("left" in obj) { - this.offset.click.left = obj.left + this.margins.left; - } - if ("right" in obj) { - this.offset.click.left = this.helperProportions.width - obj.right + this.margins.left; - } - if ("top" in obj) { - this.offset.click.top = obj.top + this.margins.top; + /* Format the given date for display. */ + _formatDate: function(inst, day, month, year) { + if (!day) { + inst.currentDay = inst.selectedDay; + inst.currentMonth = inst.selectedMonth; + inst.currentYear = inst.selectedYear; } - if ("bottom" in obj) { - this.offset.click.top = this.helperProportions.height - obj.bottom + this.margins.top; + var date = (day ? (typeof day === "object" ? day : + this._daylightSavingAdjust(new Date(year, month, day))) : + this._daylightSavingAdjust(new Date(inst.currentYear, inst.currentMonth, inst.currentDay))); + return this.formatDate(this._get(inst, "dateFormat"), date, this._getFormatConfig(inst)); + } +}); + +/* + * Bind hover events for datepicker elements. + * Done via delegate so the binding only occurs once in the lifetime of the parent div. + * Global instActive, set by _updateDatepicker allows the handlers to find their way back to the active picker. + */ +function bindHover(dpDiv) { + var selector = "button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a"; + return dpDiv.delegate(selector, "mouseout", function() { + $(this).removeClass("ui-state-hover"); + if (this.className.indexOf("ui-datepicker-prev") !== -1) { + $(this).removeClass("ui-datepicker-prev-hover"); + } + if (this.className.indexOf("ui-datepicker-next") !== -1) { + $(this).removeClass("ui-datepicker-next-hover"); + } + }) + .delegate(selector, "mouseover", function(){ + if (!$.datepicker._isDisabledDatepicker( instActive.inline ? dpDiv.parent()[0] : instActive.input[0])) { + $(this).parents(".ui-datepicker-calendar").find("a").removeClass("ui-state-hover"); + $(this).addClass("ui-state-hover"); + if (this.className.indexOf("ui-datepicker-prev") !== -1) { + $(this).addClass("ui-datepicker-prev-hover"); + } + if (this.className.indexOf("ui-datepicker-next") !== -1) { + $(this).addClass("ui-datepicker-next-hover"); + } + } + }); +} + +/* jQuery extend now ignores nulls! */ +function extendRemove(target, props) { + $.extend(target, props); + for (var name in props) { + if (props[name] == null) { + target[name] = props[name]; } - }, + } + return target; +} - _getParentOffset: function() { +/* Invoke the datepicker functionality. + @param options string - a command, optionally followed by additional parameters or + Object - settings for attaching new datepicker functionality + @return jQuery object */ +$.fn.datepicker = function(options){ + /* Verify an empty collection wasn't passed - Fixes #6976 */ + if ( !this.length ) { + return this; + } - //Get the offsetParent and cache its position - this.offsetParent = this.helper.offsetParent(); - var po = this.offsetParent.offset(); + /* Initialise the date picker. */ + if (!$.datepicker.initialized) { + $(document).mousedown($.datepicker._checkExternalClick); + $.datepicker.initialized = true; + } - // This is a special case where we need to modify a offset calculated on start, since the following happened: - // 1. The position of the helper is absolute, so it's position is calculated based on the next positioned parent - // 2. The actual offset parent is a child of the scroll parent, and the scroll parent isn't the document, which means that - // the scroll is included in the initial calculation of the offset of the parent, and never recalculated upon drag - if(this.cssPosition === "absolute" && this.scrollParent[0] !== document && $.contains(this.scrollParent[0], this.offsetParent[0])) { - po.left += this.scrollParent.scrollLeft(); - po.top += this.scrollParent.scrollTop(); - } + /* Append datepicker main container to body if not exist. */ + if ($("#"+$.datepicker._mainDivId).length === 0) { + $("body").append($.datepicker.dpDiv); + } - // This needs to be actually done for all browsers, since pageX/pageY includes this information - // with an ugly IE fix - if( this.offsetParent[0] === document.body || (this.offsetParent[0].tagName && this.offsetParent[0].tagName.toLowerCase() === "html" && $.ui.ie)) { - po = { top: 0, left: 0 }; - } + var otherArgs = Array.prototype.slice.call(arguments, 1); + if (typeof options === "string" && (options === "isDisabled" || options === "getDate" || options === "widget")) { + return $.datepicker["_" + options + "Datepicker"]. + apply($.datepicker, [this[0]].concat(otherArgs)); + } + if (options === "option" && arguments.length === 2 && typeof arguments[1] === "string") { + return $.datepicker["_" + options + "Datepicker"]. + apply($.datepicker, [this[0]].concat(otherArgs)); + } + return this.each(function() { + typeof options === "string" ? + $.datepicker["_" + options + "Datepicker"]. + apply($.datepicker, [this].concat(otherArgs)) : + $.datepicker._attachDatepicker(this, options); + }); +}; - return { - top: po.top + (parseInt(this.offsetParent.css("borderTopWidth"),10) || 0), - left: po.left + (parseInt(this.offsetParent.css("borderLeftWidth"),10) || 0) - }; +$.datepicker = new Datepicker(); // singleton instance +$.datepicker.initialized = false; +$.datepicker.uuid = new Date().getTime(); +$.datepicker.version = "1.10.4"; - }, +})(jQuery); +(function( $, undefined ) { - _getRelativeOffset: function() { +var sizeRelatedOptions = { + buttons: true, + height: true, + maxHeight: true, + maxWidth: true, + minHeight: true, + minWidth: true, + width: true + }, + resizableRelatedOptions = { + maxHeight: true, + maxWidth: true, + minHeight: true, + minWidth: true + }; - if(this.cssPosition === "relative") { - var p = this.currentItem.position(); - return { - top: p.top - (parseInt(this.helper.css("top"),10) || 0) + this.scrollParent.scrollTop(), - left: p.left - (parseInt(this.helper.css("left"),10) || 0) + this.scrollParent.scrollLeft() - }; - } else { - return { top: 0, left: 0 }; - } +$.widget( "ui.dialog", { + version: "1.10.4", + options: { + appendTo: "body", + autoOpen: true, + buttons: [], + closeOnEscape: true, + closeText: "close", + dialogClass: "", + draggable: true, + hide: null, + height: "auto", + maxHeight: null, + maxWidth: null, + minHeight: 150, + minWidth: 150, + modal: false, + position: { + my: "center", + at: "center", + of: window, + collision: "fit", + // Ensure the titlebar is always visible + using: function( pos ) { + var topOffset = $( this ).css( pos ).offset().top; + if ( topOffset < 0 ) { + $( this ).css( "top", pos.top - topOffset ); + } + } + }, + resizable: true, + show: null, + title: null, + width: 300, + // callbacks + beforeClose: null, + close: null, + drag: null, + dragStart: null, + dragStop: null, + focus: null, + open: null, + resize: null, + resizeStart: null, + resizeStop: null }, - _cacheMargins: function() { - this.margins = { - left: (parseInt(this.currentItem.css("marginLeft"),10) || 0), - top: (parseInt(this.currentItem.css("marginTop"),10) || 0) + _create: function() { + this.originalCss = { + display: this.element[0].style.display, + width: this.element[0].style.width, + minHeight: this.element[0].style.minHeight, + maxHeight: this.element[0].style.maxHeight, + height: this.element[0].style.height }; - }, - - _cacheHelperProportions: function() { - this.helperProportions = { - width: this.helper.outerWidth(), - height: this.helper.outerHeight() + this.originalPosition = { + parent: this.element.parent(), + index: this.element.parent().children().index( this.element ) }; - }, + this.originalTitle = this.element.attr("title"); + this.options.title = this.options.title || this.originalTitle; - _setContainment: function() { + this._createWrapper(); - var ce, co, over, - o = this.options; - if(o.containment === "parent") { - o.containment = this.helper[0].parentNode; + this.element + .show() + .removeAttr("title") + .addClass("ui-dialog-content ui-widget-content") + .appendTo( this.uiDialog ); + + this._createTitlebar(); + this._createButtonPane(); + + if ( this.options.draggable && $.fn.draggable ) { + this._makeDraggable(); } - if(o.containment === "document" || o.containment === "window") { - this.containment = [ - 0 - this.offset.relative.left - this.offset.parent.left, - 0 - this.offset.relative.top - this.offset.parent.top, - $(o.containment === "document" ? document : window).width() - this.helperProportions.width - this.margins.left, - ($(o.containment === "document" ? document : window).height() || document.body.parentNode.scrollHeight) - this.helperProportions.height - this.margins.top - ]; + if ( this.options.resizable && $.fn.resizable ) { + this._makeResizable(); } - if(!(/^(document|window|parent)$/).test(o.containment)) { - ce = $(o.containment)[0]; - co = $(o.containment).offset(); - over = ($(ce).css("overflow") !== "hidden"); + this._isOpen = false; + }, - this.containment = [ - co.left + (parseInt($(ce).css("borderLeftWidth"),10) || 0) + (parseInt($(ce).css("paddingLeft"),10) || 0) - this.margins.left, - co.top + (parseInt($(ce).css("borderTopWidth"),10) || 0) + (parseInt($(ce).css("paddingTop"),10) || 0) - this.margins.top, - co.left+(over ? Math.max(ce.scrollWidth,ce.offsetWidth) : ce.offsetWidth) - (parseInt($(ce).css("borderLeftWidth"),10) || 0) - (parseInt($(ce).css("paddingRight"),10) || 0) - this.helperProportions.width - this.margins.left, - co.top+(over ? Math.max(ce.scrollHeight,ce.offsetHeight) : ce.offsetHeight) - (parseInt($(ce).css("borderTopWidth"),10) || 0) - (parseInt($(ce).css("paddingBottom"),10) || 0) - this.helperProportions.height - this.margins.top - ]; + _init: function() { + if ( this.options.autoOpen ) { + this.open(); } + }, + _appendTo: function() { + var element = this.options.appendTo; + if ( element && (element.jquery || element.nodeType) ) { + return $( element ); + } + return this.document.find( element || "body" ).eq( 0 ); }, - _convertPositionTo: function(d, pos) { + _destroy: function() { + var next, + originalPosition = this.originalPosition; - if(!pos) { - pos = this.position; + this._destroyOverlay(); + + this.element + .removeUniqueId() + .removeClass("ui-dialog-content ui-widget-content") + .css( this.originalCss ) + // Without detaching first, the following becomes really slow + .detach(); + + this.uiDialog.stop( true, true ).remove(); + + if ( this.originalTitle ) { + this.element.attr( "title", this.originalTitle ); } - var mod = d === "absolute" ? 1 : -1, - scroll = this.cssPosition === "absolute" && !(this.scrollParent[0] !== document && $.contains(this.scrollParent[0], this.offsetParent[0])) ? this.offsetParent : this.scrollParent, - scrollIsRootNode = (/(html|body)/i).test(scroll[0].tagName); - return { - top: ( - pos.top + // The absolute mouse position - this.offset.relative.top * mod + // Only for relative positioned nodes: Relative offset from element to offset parent - this.offset.parent.top * mod - // The offsetParent's offset without borders (offset + border) - ( ( this.cssPosition === "fixed" ? -this.scrollParent.scrollTop() : ( scrollIsRootNode ? 0 : scroll.scrollTop() ) ) * mod) - ), - left: ( - pos.left + // The absolute mouse position - this.offset.relative.left * mod + // Only for relative positioned nodes: Relative offset from element to offset parent - this.offset.parent.left * mod - // The offsetParent's offset without borders (offset + border) - ( ( this.cssPosition === "fixed" ? -this.scrollParent.scrollLeft() : scrollIsRootNode ? 0 : scroll.scrollLeft() ) * mod) - ) - }; + next = originalPosition.parent.children().eq( originalPosition.index ); + // Don't try to place the dialog next to itself (#8613) + if ( next.length && next[0] !== this.element[0] ) { + next.before( this.element ); + } else { + originalPosition.parent.append( this.element ); + } + }, + widget: function() { + return this.uiDialog; }, - _generatePosition: function(event) { + disable: $.noop, + enable: $.noop, - var top, left, - o = this.options, - pageX = event.pageX, - pageY = event.pageY, - scroll = this.cssPosition === "absolute" && !(this.scrollParent[0] !== document && $.contains(this.scrollParent[0], this.offsetParent[0])) ? this.offsetParent : this.scrollParent, scrollIsRootNode = (/(html|body)/i).test(scroll[0].tagName); + close: function( event ) { + var activeElement, + that = this; - // This is another very weird special case that only happens for relative elements: - // 1. If the css position is relative - // 2. and the scroll parent is the document or similar to the offset parent - // we have to refresh the relative offset during the scroll so there are no jumps - if(this.cssPosition === "relative" && !(this.scrollParent[0] !== document && this.scrollParent[0] !== this.offsetParent[0])) { - this.offset.relative = this._getRelativeOffset(); + if ( !this._isOpen || this._trigger( "beforeClose", event ) === false ) { + return; } - /* - * - Position constraining - - * Constrain the position to a mix of grid, containment. - */ - - if(this.originalPosition) { //If we are not dragging yet, we won't check for options + this._isOpen = false; + this._destroyOverlay(); - if(this.containment) { - if(event.pageX - this.offset.click.left < this.containment[0]) { - pageX = this.containment[0] + this.offset.click.left; - } - if(event.pageY - this.offset.click.top < this.containment[1]) { - pageY = this.containment[1] + this.offset.click.top; - } - if(event.pageX - this.offset.click.left > this.containment[2]) { - pageX = this.containment[2] + this.offset.click.left; - } - if(event.pageY - this.offset.click.top > this.containment[3]) { - pageY = this.containment[3] + this.offset.click.top; - } - } + if ( !this.opener.filter(":focusable").focus().length ) { - if(o.grid) { - top = this.originalPageY + Math.round((pageY - this.originalPageY) / o.grid[1]) * o.grid[1]; - pageY = this.containment ? ( (top - this.offset.click.top >= this.containment[1] && top - this.offset.click.top <= this.containment[3]) ? top : ((top - this.offset.click.top >= this.containment[1]) ? top - o.grid[1] : top + o.grid[1])) : top; + // support: IE9 + // IE9 throws an "Unspecified error" accessing document.activeElement from an