Commit graph

98 commits

Author SHA1 Message Date
Brion Vibber
ba78b052b0 Revert 15733 and 15719 for the moment; I see some eval'd string code and other thinsg which make me nervous and I don't think anybody's reviewed this 2006-07-19 20:13:39 +00:00
Robert Stojnić
83da52c540 Enable UTF-8 lower/upper case operations in SearchEngine,
search in different variants (if needed).
Minor bug fixes for LanguageConverter: do no convert 
roman numbers and text between <code></code> into
variants (e.g. cyrillic).
2006-07-19 19:17:36 +00:00
Greg Sabino Mullane
4346921176 Add SearchPostgres.php 2006-07-05 03:54:01 +00:00
Greg Sabino Mullane
b9a642673a Standardize name to simply "postgres" 2006-06-27 15:08:08 +00:00
Antoine Musso
5a5cc201b1 having some fun with doxygen error log 2006-06-10 18:28:50 +00:00
Domas Mituzas
ca5f647c09 AutoLoad search classes 2006-06-06 10:33:23 +00:00
Brion Vibber
0a26267688 Revert to r14512; domas introduced massive breakage with incomplete experimental changes. They will be recommitted when they work. :) 2006-06-01 08:19:02 +00:00
Domas Mituzas
bda0b8e104 Use AutoLoader to load classes:
* remove require_once() throughout whole code, yet left in few places
* move global functions in HttpUtils, ProxyTools, Credits to class methods
* php5 only: __autoload() now used, combined with class->file map and require()
* move initialization of $wgValidSkinNames to Skin::getSkinNames()
* few more changes that will surely break stuff.
2006-06-01 07:22:49 +00:00
Ævar Arnfjörð Bjarmason
6c5d3c8c6a * Adding a trailing ?> 2006-03-07 13:32:27 +00:00
Ævar Arnfjörð Bjarmason
a26d5a49d7 * s~\t+$~~ 2006-01-07 13:31:29 +00:00
Brion Vibber
12e8fede56 * (bug 3562) for go search, try Caps-Variants-Broken-At-Non-Whitespace 2005-11-10 07:46:56 +00:00
Ævar Arnfjörð Bjarmason
5d036b41ad * 0 => NS_MAIN 2005-09-19 12:54:45 +00:00
Brion Vibber
b1a49e2d5b Drop MySQL 3.23.x support; 4.0 or greater required. 2005-08-26 23:02:54 +00:00
Brion Vibber
af2177edfd Code cleanup: normalize case for intval(), strval(), floatval() calls. 2005-08-16 23:36:16 +00:00
River Tarnell
b817c0c15f merge ORACLE_WORK. sorry, this may break some parts of MySQL, i did not test extensively. 2005-08-02 13:35:19 +00:00
Brion Vibber
e761358be7 * With $wgCapitalLinks off, accept off-by-first-letter-case in 'go' match
Requested by Wiktionary folks dealing with conversion issues.
2005-07-13 06:47:17 +00:00
Antoine Musso
157861bc31 fix some issues with phpdoc 2005-07-05 21:22:25 +00:00
River Tarnell
f688256922 check null title 2005-06-28 17:42:47 +00:00
Brion Vibber
aa99b80d7f Change the SearchEngine interface around:
* Reduce some duplicated code between MySQL 3 and 4 classes
* Generalize some things to better support Lucene search plugin
2005-05-23 08:42:20 +00:00
Brion Vibber
f9039cefd9 Spacing; use Title::exists 2005-05-23 05:25:26 +00:00
Ævar Arnfjörð Bjarmason
a65cc899f9 * Documented: @subpackage Search 2005-04-29 18:41:38 +00:00
Brion Vibber
63b6f47edf * (bug 1853) On 'go' match, try without quotes if given quoted term 2005-04-10 00:03:49 +00:00
Brion Vibber
eb0489b5da Fix minor issues missed in patch review:
* Use getDbkey(), not getTitle(), when constructing new titles
* Don't bother checking for existence of a user page on go; with the
namespace prefix it's pretty clear what's meant, and the inconsistent
behavior would be more confusing than illuminating.
2005-03-27 01:28:03 +00:00
Ævar Arnfjörð Bjarmason
537bee726d Removing enchanted spaces 2005-03-27 01:23:40 +00:00
Ævar Arnfjörð Bjarmason
435ed6274e * (bug 1398) patch by Thue Janus Kristensen that modifies the behaviour of the
'Go' button, if an IP address is entered the search engine first checks if an
  article by that name exists, otherwise it goes to the user contributions list
  of that search engine ( this would catch en.wp.org/wiki/127.0.0.1 ), also,
  entering a valid username with the current namespace-3 + : prefix will go to
  the users page, regardless of whether it contains any text or not.
2005-03-26 23:30:53 +00:00
Brion Vibber
54a60c9f09 Reverting patch for now:
* It hard-codes the English string "user", and doesn't allow localized user namespaces.
* Title::makeTitle doesn't perform validity checks as it's meant mainly for data pulled from the database which has been
previously screened. Use Title::makeTitleSafe().
* The ereg_replace is a bit odd. Trimming of stray whitespace from the search term should be done at the top end in
SpecialSearch.php, not down there.
2005-02-01 07:53:28 +00:00
Antoine Musso
dede062d9c Implement #1398 : Using go button to go to empty userpage for existing user goes to search screen
patch by Thue Janus Kristensen <thuejk (at) gmail (dot) com>
2005-02-01 02:31:08 +00:00
Antoine Musso
023a5b6ae0 s/0/NS_MAIN/ 2005-01-28 05:10:05 +00:00
Antoine Musso
2104f62734 fix phpdoc comment 2005-01-27 19:51:47 +00:00
Brion Vibber
64ac6b8e77 Merge SCHEMA_WORK into HEAD. Lots of changes, some things are probably broken:
* Page moves/overwrites are a little iffy
* Compression might not be working right
* Profit!
2004-12-19 08:00:50 +00:00
Domas Mituzas
aa0e26c033 allow ranked search results: added SearchEngine:queryRanking() 2004-12-11 09:55:02 +00:00
Domas Mituzas
811f7fb65b * move SpecialSearch::getSearchEngines() to SearchEngine::create()
* add SearchEngine*::update() and updateTitle()
* move sql queries from SearchUpdate to SearchEngine* (update and updateTitle()
2004-12-02 19:09:40 +00:00
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