diff options
-rw-r--r-- | _test/tests/inc/FulltextPageLookupTest.php | 22 | ||||
-rw-r--r-- | inc/fulltext.php | 11 | ||||
-rw-r--r-- | inc/lang/de/lang.php | 2 | ||||
-rw-r--r-- | inc/lang/fr/lang.php | 10 | ||||
-rw-r--r-- | inc/lang/vi/lang.php | 1 | ||||
-rw-r--r-- | inc/template.php | 3 | ||||
-rw-r--r-- | lib/plugins/acl/lang/fr/lang.php | 5 | ||||
-rw-r--r-- | lib/plugins/config/lang/de/lang.php | 2 | ||||
-rw-r--r-- | lib/plugins/config/lang/fr/lang.php | 2 |
9 files changed, 48 insertions, 10 deletions
diff --git a/_test/tests/inc/FulltextPageLookupTest.php b/_test/tests/inc/FulltextPageLookupTest.php new file mode 100644 index 000000000..b0c98500b --- /dev/null +++ b/_test/tests/inc/FulltextPageLookupTest.php @@ -0,0 +1,22 @@ +<?php + +// must be run within Dokuwiki +if (!defined('DOKU_INC')) die(); + +/** + * Test cases search only in a namespace or exclude a namespace + */ +class FulltextPageLookupTest extends DokuWikiTest { + + public function test_inoutns() { + saveWikiText('test:page1', 'Some text', 'Test initialization'); + idx_addPage('test:page1'); + saveWikiText('ns:page2', 'Other text', 'Test initialization'); + idx_addPage('ns:page2'); + + $this->assertEquals(['test:page1' => null, 'ns:page2' => null], ft_pageLookup('page')); + $this->assertEquals(['test:page1' => null], ft_pageLookup('page @test')); + $this->assertEquals(['ns:page2' => null], ft_pageLookup('page ^test')); + } + +} diff --git a/inc/fulltext.php b/inc/fulltext.php index 5ed0fe76f..7c28a5962 100644 --- a/inc/fulltext.php +++ b/inc/fulltext.php @@ -268,6 +268,10 @@ function _ft_pageLookup(&$data){ $ns = cleanID($parsedQuery['ns'][0]) . ':'; $id = implode(' ', $parsedQuery['highlight']); } + if (count($parsedQuery['notns']) > 0) { + $notns = cleanID($parsedQuery['notns'][0]) . ':'; + $id = implode(' ', $parsedQuery['highlight']); + } $in_ns = $data['in_ns']; $in_title = $data['in_title']; @@ -299,6 +303,13 @@ function _ft_pageLookup(&$data){ } } } + if (isset($notns)) { + foreach (array_keys($pages) as $p_id) { + if (strpos($p_id, $notns) === 0) { + unset($pages[$p_id]); + } + } + } // discard hidden pages // discard nonexistent pages diff --git a/inc/lang/de/lang.php b/inc/lang/de/lang.php index 7e455b0f2..07fbb3b8f 100644 --- a/inc/lang/de/lang.php +++ b/inc/lang/de/lang.php @@ -3,6 +3,7 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * + * @author Markus Glaser <glaser@hallowelt.com> * @author Axel Schwarzer <SchwarzerA@gmail.com> * @author Andreas Gohr <andi@splitbrain.org> * @author Eric Haberstroh <ehaberstroh@gmail.com> @@ -148,6 +149,7 @@ $lang['js']['media_done_btn'] = 'Fertig'; $lang['js']['media_drop'] = 'Dateien hier hinziehen, um sie hochzuladen'; $lang['js']['media_cancel'] = 'Entfernen'; $lang['js']['media_overwrt'] = 'Existierende Dateien überschreiben'; +$lang['js']['data_insecure'] = 'WARNUNG: Es scheint, als wäre Ihr Datenverzeichnis nicht ausreichend geschützt. Bitte informieren Sie sich zur <a href="https://www.dokuwiki.org/security#web_access_security">Sicherheit von Webzugriffen in DokuWiki</a>'; $lang['search_exact_match'] = 'Genaue Treffer'; $lang['search_starts_with'] = 'Beginnt mit'; $lang['search_ends_with'] = 'Endet mit'; diff --git a/inc/lang/fr/lang.php b/inc/lang/fr/lang.php index 5784dc14d..89b069eeb 100644 --- a/inc/lang/fr/lang.php +++ b/inc/lang/fr/lang.php @@ -3,6 +3,7 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * + * @author Olivier Humbert <trebmuh@tuxfamily.org> * @author Nicolas Friedli <nicolas@theologique.ch> * @author Schplurtz le Déboulonné <Schplurtz@laposte.net> * @author Pierre Henriot <pierre.henriot@gmail.com> @@ -43,7 +44,6 @@ * @author Pietroni <pietroni@informatique.univ-paris-diderot.fr> * @author Floriang <antispam@floriang.eu> * @author Eric <ericstevenart@netc.fr> - * @author Olivier Humbert <trebmuh@tuxfamily.org> */ $lang['encoding'] = 'utf-8'; $lang['direction'] = 'ltr'; @@ -148,7 +148,7 @@ $lang['js']['media_done_btn'] = 'Terminé'; $lang['js']['media_drop'] = 'Déposez des fichiers ici pour les envoyer'; $lang['js']['media_cancel'] = 'supprimer'; $lang['js']['media_overwrt'] = 'Écraser les fichiers existants'; -$lang['js']['data_insecure'] = 'ATTENTION: Votre répertoire de données ne semble pas correctement sécurisé. Merci de lire <a href="https://www.dokuwiki.org/fr:security#securite_de_l_acces_web">Sécurité de l\'accès web</a> ou <a href="https://www.dokuwiki.org/security#web_access_security">Web Access Security in DokuWiki</a>.'; +$lang['js']['data_insecure'] = 'ATTENTION : votre répertoire de données ne semble pas correctement sécurisé. Veuillez lire <a href="https://www.dokuwiki.org/fr:security#securite_de_l_acces_web">Sécurité de l\'accès web (en français)</a> ou <a href="https://www.dokuwiki.org/security#web_access_security">Web Access Security in DokuWiki (en anglais)</a>.'; $lang['search_exact_match'] = 'Correspondance exacte'; $lang['search_starts_with'] = 'Commence par'; $lang['search_ends_with'] = 'Se termine par'; @@ -305,9 +305,9 @@ $lang['img_artist'] = 'Photographe:'; $lang['img_copyr'] = 'Copyright:'; $lang['img_format'] = 'Format:'; $lang['img_camera'] = 'Appareil photo:'; -$lang['img_keywords'] = 'Mots-clés:'; -$lang['img_width'] = 'Largeur:'; -$lang['img_height'] = 'Hauteur:'; +$lang['img_keywords'] = 'Mots-clés :'; +$lang['img_width'] = 'Largeur :'; +$lang['img_height'] = 'Hauteur :'; $lang['subscr_subscribe_success'] = '%s a été ajouté à la liste des abonnés à %s'; $lang['subscr_subscribe_error'] = 'Erreur à l\'ajout de %s à la liste des abonnés de %s'; $lang['subscr_subscribe_noaddress'] = 'Il n\'y a pas d\'adresse associée à votre identifiant, vous ne pouvez pas être ajouté à la liste des abonnés.'; diff --git a/inc/lang/vi/lang.php b/inc/lang/vi/lang.php index 0b475c5cd..455bd5639 100644 --- a/inc/lang/vi/lang.php +++ b/inc/lang/vi/lang.php @@ -109,6 +109,7 @@ $lang['js']['media_done_btn'] = 'Xong'; $lang['js']['media_drop'] = 'Kéo tập tin vào đây để tải lên'; $lang['js']['media_cancel'] = 'xóa'; $lang['js']['media_overwrt'] = 'Ghi đè các tập tin hiện có'; +$lang['js']['data_insecure'] = 'CẢNH BÁO: Có vẻ như đường dẫn dữ liệu của bạn không được bảo mật đúng cách. Xin vui lòng đọc <a href="https://www.dokuwiki.org/security#web_access_security">Web Access Security in DokuWiki</a>.'; $lang['search_exact_match'] = 'Khớp chính xác'; $lang['search_starts_with'] = 'Bắt đầu với'; $lang['search_ends_with'] = 'Kết thúc bằng'; diff --git a/inc/template.php b/inc/template.php index 272ad3fe1..9b7dfa5ab 100644 --- a/inc/template.php +++ b/inc/template.php @@ -348,7 +348,6 @@ function tpl_metaheaders($alt = true) { $jquery = getCdnUrls(); foreach($jquery as $src) { $head['script'][] = array( - 'charset' => 'utf-8', '_data' => '', 'src' => $src, ) + ($conf['defer_js'] ? [ 'defer' => 'defer'] : []); @@ -356,7 +355,7 @@ function tpl_metaheaders($alt = true) { // load our javascript dispatcher $head['script'][] = array( - 'charset'=> 'utf-8', '_data'=> '', + '_data'=> '', 'src' => DOKU_BASE.'lib/exe/js.php'.'?t='.rawurlencode($conf['template']).'&tseed='.$tseed, ) + ($conf['defer_js'] ? [ 'defer' => 'defer'] : []); diff --git a/lib/plugins/acl/lang/fr/lang.php b/lib/plugins/acl/lang/fr/lang.php index 90759418f..76082c05d 100644 --- a/lib/plugins/acl/lang/fr/lang.php +++ b/lib/plugins/acl/lang/fr/lang.php @@ -3,6 +3,7 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * + * @author Olivier Humbert <trebmuh@tuxfamily.org> * @author Schplurtz le Déboulonné <Schplurtz@laposte.net> * @author Sébastien Bauer <sebastien.bauer@advalvas.be> * @author Antoine Fixary <antoine.fixary@freesbee.fr> @@ -26,8 +27,8 @@ * @author Bruno Veilleux <bruno.vey@gmail.com> */ $lang['admin_acl'] = 'Gestion de la liste des contrôles d\'accès (ACL)'; -$lang['acl_group'] = 'Groupe:'; -$lang['acl_user'] = 'Utilisateur:'; +$lang['acl_group'] = 'Groupe :'; +$lang['acl_user'] = 'Utilisateur :'; $lang['acl_perms'] = 'Autorisations pour'; $lang['page'] = 'Page'; $lang['namespace'] = 'Catégorie'; diff --git a/lib/plugins/config/lang/de/lang.php b/lib/plugins/config/lang/de/lang.php index 1ecd9036a..548524c5d 100644 --- a/lib/plugins/config/lang/de/lang.php +++ b/lib/plugins/config/lang/de/lang.php @@ -3,6 +3,7 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * + * @author Markus Glaser <glaser@hallowelt.com> * @author Axel Schwarzer <SchwarzerA@gmail.com> * @author Andreas Gohr <andi@splitbrain.org> * @author Eric Haberstroh <ehaberstroh@gmail.com> @@ -138,6 +139,7 @@ $lang['mailfrom'] = 'Absender-E-Mail-Adresse für automatische Mail $lang['mailreturnpath'] = 'Empfänger-E-Mail-Adresse für Unzustellbarkeitsnachricht'; $lang['mailprefix'] = 'Präfix für E-Mail-Betreff beim automatischen Versand von Benachrichtigungen (Leer lassen um den Wiki-Titel zu verwenden)'; $lang['htmlmail'] = 'Versendet optisch angenehmere, aber größere E-Mails im HTML-Format (multipart). Deaktivieren, um Text-Mails zu versenden.'; +$lang['dontlog'] = 'Protokollierung für diese Logtypen deaktivieren.'; $lang['sitemap'] = 'Google Sitemap erzeugen (Tage). Mit 0 deaktivieren.'; $lang['rss_type'] = 'XML-Feed-Format'; $lang['rss_linkto'] = 'XML-Feed verlinken auf'; diff --git a/lib/plugins/config/lang/fr/lang.php b/lib/plugins/config/lang/fr/lang.php index 183be2d2c..814cdf5da 100644 --- a/lib/plugins/config/lang/fr/lang.php +++ b/lib/plugins/config/lang/fr/lang.php @@ -3,6 +3,7 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * + * @author Olivier Humbert <trebmuh@tuxfamily.org> * @author Nicolas Friedli <nicolas@theologique.ch> * @author Schplurtz le Déboulonné <Schplurtz@laposte.net> * @author Pierre Henriot <pierre.henriot@gmail.com> @@ -30,7 +31,6 @@ * @author Floriang <antispam@floriang.eu> * @author Simon DELAGE <simon.geekitude@gmail.com> * @author Eric <ericstevenart@netc.fr> - * @author Olivier Humbert <trebmuh@tuxfamily.org> */ $lang['menu'] = 'Paramètres de configuration'; $lang['error'] = 'Paramètres non modifiés en raison d\'une valeur invalide, vérifiez vos réglages puis réessayez. <br />Les valeurs erronées sont entourées d\'une bordure rouge.'; |