Commit graph

66 commits

Author SHA1 Message Date
Antoine Musso
28ea816fba Implementing user levels management. This is only a very basic interface and several things need to be done! A tracking bug is at http://bugzilla.wikipedia.org/show_bug.cgi?id=767 2004-10-24 19:14:48 +00:00
Brion Vibber
8ffff3e2e0 Reorganization of SearchEngine for legibility
* Removed 'fuzzy title search', it's not been maintained and generally produces unexpected and unwanted results
* Separated search guts (in SearchEngine) from display/control (in SpecialSearch)
* Extracted MySQL3 and MySQL4 variants to subclasses
* Added PHPUnit tests for MySQL3 and MySQL4 search engines, which try to use temporary tables to fiddle in (if configured)
* comments n stuff
2004-10-20 09:56:34 +00:00
Brion Vibber
2b95fd3989 * Fix notice & blank text on nogomatch
* Use Special:Search in the prevnext links
2004-10-02 02:46:29 +00:00
Tim Starling
620e1b8298 Second parameter to wfMsg(nogomatch) 2004-09-25 14:32:19 +00:00
River Tarnell
bdb843ade7 disallow empty searches 2004-09-25 09:57:03 +00:00
Zheng Zhu
14052ee5e5 Second batch of files modified to replace selected wgLang with wgContLang 2004-09-24 16:24:43 +00:00
Jens Frank
23eb7b7d33 unneeded "" around single variable removed 2004-09-21 06:07:55 +00:00
Antoine Musso
ba2afcd9fa Split files and classes in different packages for phpdocumentor. I probably changed some double quotes to single and used function foo () { shema 2004-09-03 23:00:01 +00:00
Brion Vibber
512be90c3f Suppress unset array index notice with quoted search terms 2004-09-03 21:21:19 +00:00
Antoine Musso
90155b8a97 Changing comments layout preparing for generated documentation with Phpdocumentor 2004-09-02 23:28:24 +00:00
Arne Heizmann
f621158326 NP_WIKIPEDIA => NP_PROJECT, and code readability stuff 2004-08-28 17:53:12 +00:00
Antoine Musso
3d60242fb5 massive double to single quotes conversion. I have not noticed any bug after a lot of testing 2004-08-22 17:24:50 +00:00
Brion Vibber
68d14537ea More code cleanup on SearchEngine.
Renamed member vars to fooBar style, use $this->rawText more consistently.
Separated matching parts of goResult() out.
More redundant bits purged.
Switching some messages to wikitext.
Death to <font> tags!
2004-08-15 08:23:19 +00:00
Brion Vibber
e25ef26679 Starting code cleanup. Beginning to separate database logic from display output, removing some duplicate bits, starting to decouple things... 2004-08-15 07:15:22 +00:00
Brion Vibber
c079aeeafc Show the search terms as given instead of the filtered terms in the subtitle.
Part of the fix for Bug 54: go-search for non-existing page in a namespace returns broken new-edit URL
http://bugzilla.wikipedia.org/show_bug.cgi?id=54
2004-08-15 05:05:56 +00:00
Brion Vibber
22f1d044a9 Use original instead of filtered search request for the optional new page edit link in nogomatch (de, etc)
Fix for Bug 54: go-search for non-existing page in a namespace returns broken new-edit URL
http://bugzilla.wikipedia.org/show_bug.cgi?id=54
2004-08-15 04:38:35 +00:00
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