From 58b6f612a14a40fc14fffa363d6f272b36cd9f30 Mon Sep 17 00:00:00 2001 From: Andreas Gohr <andi@splitbrain.org> Date: Sun, 4 Sep 2005 22:34:37 +0200 Subject: [PATCH] minor fixes needed for searchindex plugin darcs-hash:20050904203437-7ad00-e0856739efaff3eb63b6ef0821ac318b4f84af9e.gz --- inc/search.php | 15 +++++++++++++++ lib/plugins/admin.php | 4 ++-- lib/scripts/tw-sack.js | 2 +- lib/tpl/default/design.css | 2 +- 4 files changed, 19 insertions(+), 4 deletions(-) diff --git a/inc/search.php b/inc/search.php index ea20c4f3b..af7506f78 100644 --- a/inc/search.php +++ b/inc/search.php @@ -230,6 +230,21 @@ function search_pagename(&$data,$base,$file,$type,$lvl,$opts){ return true; } +/** + * Just lists all documents + * + * @author Andreas Gohr <andi@splitbrain.org> + */ +function search_allpages(&$data,$base,$file,$type,$lvl,$opts){ + //we do nothing with directories + if($type == 'd') return true; + //only search txt files + if(!preg_match('#\.txt$#',$file)) return true; + + $data[]['id'] = pathID($file); + return true; +} + /** * Search for backlinks to a given page * diff --git a/lib/plugins/admin.php b/lib/plugins/admin.php index 936278d2b..339f465a7 100644 --- a/lib/plugins/admin.php +++ b/lib/plugins/admin.php @@ -78,9 +78,9 @@ class DokuWiki_Admin_Plugin { $file = DOKU_PLUGIN.$plugin.'/lang/'.$conf['lang'].'/'.$id.'.txt'; if(!@file_exists($file)){ //fall back to english - $file = DOKU_PLUGIN.$plugin.'inc/lang/en/'.$id.'.txt'; + $file = DOKU_PLUGIN.$plugin.'/lang/en/'.$id.'.txt'; } - return $file; + return $file; } // use this function to access plugin language strings diff --git a/lib/scripts/tw-sack.js b/lib/scripts/tw-sack.js index 1480ca41c..d608a76b7 100644 --- a/lib/scripts/tw-sack.js +++ b/lib/scripts/tw-sack.js @@ -94,7 +94,6 @@ function sack(file){ } catch (e) {} } - this.xmlhttp.send(this.URLString); this.xmlhttp.onreadystatechange = function() { switch (self.xmlhttp.readyState){ case 1: @@ -126,6 +125,7 @@ function sack(file){ break; } }; + this.xmlhttp.send(this.URLString); } } }; diff --git a/lib/tpl/default/design.css b/lib/tpl/default/design.css index ee03815ff..79a205f7e 100644 --- a/lib/tpl/default/design.css +++ b/lib/tpl/default/design.css @@ -116,7 +116,7 @@ input.missing { /* --------- buttons ------------------- */ -input.button { +input.button, button.button{ border: 1px solid #8cacbb; color: Black; background-color: white; -- GitLab