Commit graph

50 commits

Author SHA1 Message Date
Brion Vibber
882eb838b6 Fix for UTF-8 search when system locale is set to Latin-1
[ 961069 ] BUG and FIX: search doesn't work with some UTF-8 chars

Moves the strtolower() on the input search terms into Language::stripForSearch()
where the correct version already exists for LanguageUtf8.
2004-08-05 06:31:42 +00:00
Brion Vibber
5fe63300af Add Language::truncate() method for truncating strings to a certain byte
length. UTF-8 version ensures that only whole characters are included.

Fix for: [ 1001502 ] Search preview splits up multi-byte UTF-8 characters
Todo: [ 855680 ] Broken UTF-8 cutoff breaks display in some browsers
2004-08-01 20:43:54 +00:00
Brion Vibber
3a362d41cb Fix inoperable search engine 2004-07-29 01:49:49 +00:00
Tim Starling
ac549401d4 * Support for table name prefixes throughout the code. No support yet for converting static SQL, which also means no installation. But it has been tested by creating the tables in the ordinary way and then renaming them
* DB_WRITE now called DB_MASTER, DB_READ now called DB_SLAVE
* Converted to use SQL wrapper functions instead of direct SQL in various places
* Experimental method for preserving the chronological order of events when slave servers are used. Untested.
* Fixes to the new post-parse existence test feature
* Some.. other stuff
2004-07-18 08:48:43 +00:00
Tim Starling
b96b707efa OOP calling convention for database functions. DBMS abstraction implemented by means of functions instead of global variables, PostgreSQL object converted to a subclass instead of a drop-in replacement. Also the beginnings of a flexible table name feature. 2004-07-10 03:09:26 +00:00
Tim Starling
0fb313eee4 Load balancing enabled in places where it's thought to be reasonably safe 2004-07-10 01:05:36 +00:00
Brion Vibber
c164fc5312 Work around search with invalid title dying with bad title deref error. Will still produce bad edit link though. 2004-06-10 06:36:02 +00:00
Antoine Musso
52eedffd62 dont require FulltextStoplist on mysql4 databases (saves some memory) 2004-06-07 23:51:48 +00:00
Tim Starling
fe5eedd185 Orphan creating feature -- go redirects to edit if the page doesn't exist, off by default 2004-05-04 14:36:42 +00:00
Tim Starling
7c98afbdb7 Handy shortcut: paste in an IP address and click go, redirects to the user contributions page 2004-04-29 02:21:55 +00:00
Brion Vibber
7a25e48b5e Fix bug #903109: fuzzy search doesn't set up title & sidebar right, includes
edit link for main page.
2004-04-24 07:48:07 +00:00
Brion Vibber
e1e24d2920 Add a hidden stub Special:Search to hand search requests to; this fixes
the bug that searches get displayed with properties of the main page
(particularly bad in MonoBook). Also cleared up notices in Power Search
from improper use of $_REQUEST.
2004-04-24 06:25:19 +00:00
Gabriel Wicke
697c3f6b01 simplified 2004-04-15 22:49:02 +00:00
Gabriel Wicke
ba2ca6a390 warning fix 2004-04-15 22:44:59 +00:00
Brion Vibber
92050b837d If asked to 'go' to a special: page title, jump directly there. Fix encoding of search requests for Esperanto 2004-04-11 05:28:11 +00:00
Brion Vibber
fe5ff59ad6 XHTML fixes. 2004-04-09 01:37:41 +00:00
Brion Vibber
8510acd5a4 Clean up initialized variables; fix upload error. 2004-03-20 08:41:33 +00:00
Brion Vibber
b59ce22943 Replace the random boolean parameters on Title::getURL() with a set of
practical, clear methods:
  Title::getLocalURL() - "/wiki/index.php/Foobar" or "/wiki/index.php?title=Foobar&action=edit"
  Title::getFullUrl() - ditto with $wgServer on the front
  Title::getInternalUrl() - ditto with $wgInternalServer on the front (for some squid-related functions)
  Title::escapeLocalUrl() - local URL escaped for HTML output
  Title::escapeFullUrl() - full URL escaped for HTML output

All take an optional query parameter.

Title::getURL(), wfFullUrl() and wfFullUrlE() are now officially
deprecated and will result in instant death. wfLocalUrl() and wfLocalUrlE()
will be killed shortly; they are still used in the language files.
2004-03-07 07:26:56 +00:00
Tim Starling
840dee3ad4 * Fixed magic quotes in $_REQUEST, in Setup.php
* Converted many instances of globals from the query to $_REQUEST
* Renamed near-useless Title::getURL() to Title::getPartialURL()
* Created new Title::getURL(), to replace wfLocalUrl, wfLocalUrlE, wfFullUrl and wfFullUrlE. Replaced most instances throughout the code
* In Parser.php, generalised stripping of <nowiki>, <pre> and <math> to allow more general use such as nesting
* Moved body of Article::preSaveTransform to Parser.php
* Put lots of comments in Title.php
2004-03-06 01:49:16 +00:00
Brion Vibber
0147447995 Go result was going straight to google fallback instead of the regular search if a match couldn't be found. This broke correct behavior when text search is enabled. 2004-02-29 07:24:47 +00:00
Brion Vibber
0332f4c598 Fix for compatibility with short_open_tag = Off 2004-02-18 02:15:00 +00:00
Mr. E23
bcab02d087 Moved google box out from 'searchdisabled' message. Appended google box to title search result page. 2004-02-15 15:59:45 +00:00
Mr. E23
da29a765e4 Fixed bug causing warnings. Fixed problem with repeated heavy SQL queries on non-memcached setups. 2004-02-11 12:03:01 +00:00
Mr. E23
2b6b880a76 Fuzzy search feature (replaces full text search as default action when exact title search fails) 2004-02-11 01:48:42 +00:00
Tim Starling
85e6528f38 setArticleRelated required in more places than I realised at first 2004-01-17 15:12:33 +00:00
Brion Vibber
8bfee2f861 Fix double-help message in search results; also some minor style cleanup 2003-12-22 07:54:30 +00:00
Brion Vibber
8b7d497f28 Fix parsing of multi-word expressions; by default behave more like google, with required match on all terms 2003-12-10 01:16:43 +00:00
Brion Vibber
7286862c59 Quote search text for regexp to avoid some errors with +foo etc 2003-12-09 11:39:55 +00:00
Mr. E23
c5bbab5c6e Fix for bug 850489, call on non-object when searching for '_' 2003-11-29 22:41:26 +00:00
Brion Vibber
b84ab27da3 Don't run the query if search is disabled! 2003-11-24 14:47:05 +00:00
Brion Vibber
7ad91ca634 Fix search term in google form, doubled google 2003-11-24 09:51:33 +00:00
Brion Vibber
2def67fb0a fix disable search bug for go 2003-11-24 09:35:11 +00:00
Brion Vibber
e54531a69a Preserve search namespace options across next/prev 2003-11-19 08:33:51 +00:00
Brion Vibber
def0193f31 Use wfMsg()'s parameters 2003-11-15 14:11:30 +00:00
Tim Starling
46787701ce Nov. branch merge. Various features backported from stable, various bug fixes. 2003-11-09 11:45:12 +00:00
Brion Vibber
056c31a27a Google charset fix 2003-09-23 16:23:09 +00:00
Tim Starling
7057b4e609 wfQuery now takes three parameters -- one extra for DB replication purposes 2003-09-20 01:34:06 +00:00
Brion Vibber
2a4f7b9142 Avoid unnecessary globals in go 2003-09-01 08:11:29 +00:00
Brion Vibber
1e400c1793 move '(Main)' from hardcoded string to language file 2003-07-13 23:19:56 +00:00
Arne Heizmann
0c24866acc fix search redirect 2003-07-11 16:45:53 +00:00
Arne Heizmann
9676f72f5a redirect to article when search returns only one 2003-07-11 02:16:01 +00:00
Brion Vibber
dd27c26107 More tweaking for experimental boolean mode 2003-07-10 04:52:57 +00:00
Brion Vibber
36240b826c Fix edit-new-page link for results not found. 2003-07-06 00:29:18 +00:00
Matthias Jordan
01515e038f Implemented the "default namespaces for search" feature. This includes
changes to the preferences form, a new key in the LanguageXX.php files
(defaultns) and a new global config variable in DefaultSettings.php
($wgNamespacesToBeSearchedDefault).

I also killed a bug that produced an errorneous SQL command when the user
failed to check any namespaces to search in the search form. The updated
implementation searched the main namespace if no checkbox is checked.
2003-07-01 08:27:32 +00:00
Erik Moeller
385e46d18b Go button: try all upper case before near match 2003-06-15 08:10:47 +00:00
Erik Moeller
c9e9b7e7b2 Minor go button optimization 2003-06-13 00:10:31 +00:00
Brion Vibber
efca89ebbe Refactor some common code for offsets/limits; some preliminary stuff for upload license notes and mysql4 fulltext support (not ready yet) 2003-06-03 08:44:50 +00:00
T.D. Corell
e7a4c732ef Modified Search to display a link to generate a new page if with 'Go' no
article is found. You have to modify "nogomatch" like demonstrated in
LanguageDE.php to do so. The "showingresultnum" texts are modified, limit
is removed now.
2003-05-21 18:40:54 +00:00
T.D. Corell
2f3f8433fb New function ShowingResultsNum for use in SearchEngine. 2003-05-20 06:15:20 +00:00
Lee Daniel Crocker
d82c14fb4f Initial revision 2003-04-14 23:10:40 +00:00