Commit graph

31 commits

Author SHA1 Message Date
Siebrand Mazeland
79d5225c0e * remove end of line whitespace
* remove empty lines at end of file
* remove "?>" where still present
2008-04-14 07:45:50 +00:00
Robert Stojnić
7532064d27 Search backend:
* add "all:" prefix that searches all namespaces (port from LuceneSearch)
* added a simplistic replacePrefixes so that now image:something will
  always search the image namespace
2008-03-23 17:29:43 +00:00
Greg Sabino Mullane
c07e337da6 Fix for bug 13004, in which the Postgres full-text search has too many results,
so it throws an error. Created a "too many" class as an alternate search result 
to return, and consider any error in SearchPostgres when running the actual search as a "too many" 
problem. Not an ideal solution, but I'm not sure how to get at the error message 
without requiring a newer version of PHP.
2008-02-17 14:11:55 +00:00
Greg Sabino Mullane
03572542a1 No longer need this cast. 2008-02-12 21:41:40 +00:00
Greg Sabino Mullane
fa02443300 Make Postgres 8.3 compatible. 2008-02-10 15:48:06 +00:00
Aryeh Gregor
a15c419b3d Remove ?>'s from files. They're pointless, and just asking for people to mess with the files and add trailing whitespace. (Yes, I looked over every one and reverted those that were bogus. Slash-enter a million times in less worked well enough, although it was a bit mind-numbing.) 2007-06-29 01:19:14 +00:00
Greg Sabino Mullane
5b79cfb9b1 More defined() that should be isset(), thanks to David Ford, david@blue-labs.org 2007-05-16 20:31:58 +00:00
Greg Sabino Mullane
c6549e5a81 Bug 9908: check server version and adjust rank() argument accordingly 2007-05-15 12:39:41 +00:00
Nick Jenkins
b4d37577b9 Removing or commenting out unused variables or globals, and adding declarations for two arrays. 2007-05-08 09:09:46 +00:00
Greg Sabino Mullane
0ccdb6c085 Defer populating searchTerms until later on - allows for better highlighting. 2007-04-27 03:45:43 +00:00
Greg Sabino Mullane
57b41fad2c Don't try to highlight non-words. 2007-04-26 19:35:27 +00:00
Nick Jenkins
f9619da3f0 Yet more doc tweaks:
* Add @addtogroup tags to various classes, to try and group conceptually-related classes together.
* Add brief descriptions to various Special pages, thanks to Phil Boswell.
* Moving some docs to be right above the classes they represent, so that they are picked up.
2007-04-20 08:55:14 +00:00
Greg Sabino Mullane
0fc57a354c More tweaks to tsearch2 parsing 2007-04-09 14:24:15 +00:00
Greg Sabino Mullane
d046c0b3b3 Trim trailing whitespace from string. 2007-04-06 12:32:26 +00:00
Greg Sabino Mullane
e7f2cb7f7b More cleanups of tsearch2 parse query 2007-04-05 13:51:16 +00:00
Greg Sabino Mullane
e702a780ed Since used as regex elsewhere, strip out non-words. 2007-04-04 16:21:24 +00:00
Greg Sabino Mullane
e19c24c26e Overhaul. 2007-04-04 00:14:03 +00:00
Greg Sabino Mullane
6ff98a40d1 Begin simple tests to catch invalid search queries. 2007-03-26 13:05:55 +00:00
Greg Sabino Mullane
5889edf36d Typo in var name 2007-03-01 03:12:36 +00:00
Greg Sabino Mullane
b835cf7a41 Properly handle search operators "+" and "-", thanks cedric.villemain@gmail.com
Fixes bug #8958
2007-02-22 17:35:44 +00:00
Greg Sabino Mullane
cbb2ef79ff Escape exclamation marks for now. 2007-02-07 15:34:39 +00:00
Nick Jenkins
f88c771756 The war on redundant ampersand usage!
* Convert "$dbw =& wfGetDB( DB_MASTER );" --> "$dbw = wfGetDB( DB_MASTER );"
* convert "$skin =& $wgUser->getSkin();" --> "$skin = $wgUser->getSkin();"

For the time being have not changed the function definitions of wfGetDB() or User::getSkin() [i.e. they are still both return-by-ref], so as to ensure the interface does not change for extensions [some of which may still be trying to run on PHP4 environments]. However presumably at some point this can be changed too.

Also includes tiny tweak to newlines in parserTests - will show 1 rather than 2 newlines between the "Reading tests from" strings when in quiet mode.
2007-01-22 23:50:42 +00:00
Antoine Musso
c771fc9c96 Use Doxygen @addtogroup instead of phpdoc @package && @subpackage 2007-01-20 15:09:52 +00:00
Greg Sabino Mullane
6569533150 Don't index old versions via tsearch2 2007-01-14 22:57:31 +00:00
Greg Sabino Mullane
45b2743559 Fix typo, thanks to Sven Klemm for finding. 2006-12-06 21:45:45 +00:00
Greg Sabino Mullane
75df09b077 Minor tweaks to search query. 2006-11-29 16:49:10 +00:00
Nick Jenkins
14c53b728f Code housekeeping stuff (and barring any stuff-ups on my behalf, there should be no changes in behaviour whatsoever after this) -
* removing some unused global declarations.
* removing or commenting out or adding comments for unused local vars.
* Adding one or two local var declarations.
* Declaring $matches array passed to preg_match() / preg_match_all() as array() before using [not required, just have a slight preference for the explicitness].
* remove one or two pass-by-reference function declarations where the value is not modified.
* Adding some braces to if-else blocks.
* In Parser.php, stripstrate is now an object rather than an array as per r17820, so we no longer need ask for a reference to it (as in "$x =& $this->mStripState;"), and in fact it's probably just simpler to get rid of $x altogether.
* Moving some preg regexes from "" quoting to '' quoting to stop static analyzer whinging about bad escape sequences.

... up to "LinksUpdate.php" in the includes/ directory.
2006-11-23 08:25:56 +00:00
Greg Sabino Mullane
9ab8dcda19 Explicitly use 'default' locale for tsearch2 queries. 2006-09-03 02:43:26 +00:00
Greg Sabino Mullane
7b9af4c70b Change reserved word table names "user" and "text" 2006-07-23 02:04:40 +00:00
Greg Sabino Mullane
58303aa5df Change hard-coded vector fields to variables. 2006-07-05 04:11:20 +00:00
Greg Sabino Mullane
4346921176 Add SearchPostgres.php 2006-07-05 03:54:01 +00:00