Commit graph

51 commits

Author SHA1 Message Date
Sam Reed
09a78c1368 More return documentation 2012-02-09 21:36:14 +00:00
Sam Reed
0a626db6e1 Fixing some of the "@return true" or "@return false", need to be "@return bool" and then the metadata can say true if foo, false if bar
Other documentation improvements
2012-02-09 19:29:36 +00:00
Sam Reed
85bbb0b080 Fixing some of the "@return true" or "@return false", need to be "@return bool" and then the metadata can say true if foo, false if bar
Other documentation improvements
2012-02-09 18:01:10 +00:00
Alexandre Emsenhuber
7134e2c654 * Inlinise Preferences::loadOldSearchNs() in SearchEngine::userNamespaces(); the latter is the only caller of the former
* Made code clearer and removed duplication
* Marked Preferences::loadOldSearchNs() as deprecated
2012-01-20 16:12:34 +00:00
Jeroen De Dauw
49cdca93be add missing deprecation notices and added deprecation version to existing ones 2011-12-13 05:19:05 +00:00
Sam Reed
5ef630a3b3 Braces, spaces, documentation 2011-11-20 18:02:38 +00:00
Sam Reed
ecfc08119b Fix spaces to tabs 2011-11-20 11:41:42 +00:00
Roan Kattouw
a123a76c8a (bug 19833) Make the searching-for-an-IP-means-you-want-Special:Contributions behavior configurable. Patch by Olivier Finlay Beaton 2011-11-14 20:00:35 +00:00
Alexandre Emsenhuber
13c8aee478 Use WikiPage instead of Article to call the hasViewableContent() method 2011-11-04 08:58:10 +00:00
Aaron Schulz
6c4360c951 Make use of Title::isSpecialPage() in various places 2011-11-02 20:55:08 +00:00
Roan Kattouw
1c92b1463e Use canonical URLs (introduced in r94995) in the OpenSearch discovery thingy 2011-08-19 14:39:37 +00:00
Sam Reed
ead9055a62 Update code comments that point to 1.18 to point to 1.19 2011-07-18 23:01:08 +00:00
Sam Reed
4fc982ebd9 Fix whitespace, documentation 2011-07-09 03:49:25 +00:00
Sam Reed
16842c0b73 Swap else if for elseif
Trimming trailing whitespace also

Doing in 3 commits (2/3), so hopefully reviewable in CR...
2011-06-17 16:05:05 +00:00
Alexandre Emsenhuber
076fe2de0d Moved MediaWiki::articleFromTitle() to Article::newFromTitle(), this has nothing to do in the MediaWiki class 2011-05-22 18:38:04 +00:00
Siebrand Mazeland
75c6696aa8 Use consistent notation for "@todo FIXME". Should update http://svn.wikimedia.org/doc/todo.html nicely. 2011-05-17 22:03:20 +00:00
Sam Reed
f985524076 More versions added to @deprecated tags
Couple of inbound calls fixed up

Some ancient code removed as it's been marked deprecated
2011-05-06 21:50:18 +00:00
Chad Horohoe
9502fbb44d (bug 28343) Kill unused contextlines/contextchars 2011-05-01 21:14:32 +00:00
Sam Reed
cf042b1af7 Fix code accidentally committed in r86735 2011-04-23 21:17:18 +00:00
Sam Reed
42b9b27823 Followup to r86312
<ialex> Reedy: that rev is breaking usage of {{PAGENAME}} in messages, such as in MediaWiki:Noarticles

Allowing optional passing in of a Title object (like it may be set in Message), but if it's not set, or not a title object, fall back and use $wgTitle (I'm sorry!)
2011-04-22 20:17:21 +00:00
Niklas Laxström
ce59727553 Allow extensions to customize the search forms. This required some cleanup and refactoring to special:search and search engine.
Should be fully backwards compatible. Lightly tested, but only with MySQL search backend.
Introduces concept of search profiles, which replace long list of namespaces in the url.
2011-04-22 16:13:58 +00:00
Happy-melon
c26ecc84d1 Follow-up r85929: update MediaWiki::articleFromTitle() call in SearchEngine.php 2011-04-13 14:27:59 +00:00
Alexandre Emsenhuber
7ad587fcc9 Respect $wgScriptExtension in SearchEngine::getOpenSearchTemplate() and SearchEngine::getMWSuggestTemplate() 2011-04-02 09:50:20 +00:00
Sam Reed
d3f043c53a Add/update/improve various bits of documentation 2011-03-25 11:21:53 +00:00
Brian Wolff
2d64c69910 (follow-up 79778) Make $wgLang->truncate function consider the length of the ... (ellipsis message) in the truncation length.
The length of this message varries by localization, so the previous solution of telling truncate to truncate 5 bytes
less than needed is not good since this will be too little or too much.

Updated places where its used. Some places I left as is, as it looked like the new behaviour would work fine for them to.
(for example, the autosummary feature - it was cutting off at 200 bytes, which is no where near 250 limit, so I presume that
was for asethic reasons rather then to fit as much in before the db limit).

Will do another commit for extension callers in a moment.
2011-03-24 02:54:11 +00:00
Sam Reed
7d98280f3e More function and variable documentation 2011-02-19 01:02:56 +00:00
Sam Reed
9b815345af Followup r78268, do it as Bryan suggested, not as how I'd interpretted it for some daft reason 2010-12-13 11:06:57 +00:00
Sam Reed
8a9f0e54f5 Followup r65114 (per CR cabal), remove SpecialSearchGomatch, replace with SpecialSearchGo in SearchEngine::getNearMatch 2010-12-12 18:57:10 +00:00
Platonides
a85f03a94f Move storing of $db down to SearchEngine
Fixes the r76809 issue of SearchDbTest not being marked as requiring a Database.
2010-11-22 16:08:12 +00:00
Brion Vibber
a09cb2ce9e Fix tab/space, use null as default value rather than string to match expected return (cleanup from r73859) 2010-09-28 02:24:59 +00:00
Sam Reed
73c78be11e Define variable before usage in hook call 2010-09-28 01:21:38 +00:00
Chad Horohoe
9e6c7cc8ef Get rid of PHP4-style constructors 2010-08-30 16:52:51 +00:00
Philip Tzou
0f6c992519 follow up r69134. Change all of convertLinkToAllVariants()'s callers to call autoConvertToAllVariants(). 2010-08-23 02:07:31 +00:00
Alexandre Emsenhuber
25ee5e7ae9 * standardised file headers
* added a basic description
* added @file
2010-08-08 10:44:59 +00:00
Sam Reed
04f68827d0 Removal of unused globals
Removal of one setting of a variable to '', then not using further
2010-07-24 19:11:52 +00:00
Bryan Tong Minh
5cbd7e379e stylize.php on SearchEngine.php 2010-07-21 16:57:43 +00:00
Bryan Tong Minh
bf99865549 (bug 22339) Added srwhat=nearmatch to list=search to get a "go" result
Refactored SearchResult constructor to accept Titles. New static function newFromRow and newFromTitle can be used.
Added SearchNearMatchResultSet to wrap the output of SearchEngine::getNearMatch.
2010-07-09 11:08:18 +00:00
Alexandre Emsenhuber
5bcf51aff0 * (bug 20049) Fixed in PHP notice in search highlighter that occurs in some cases
Please correct this if this is not the correct way to do it :)
2010-04-06 09:08:22 +00:00
Alexandre Emsenhuber
2872f4e191 Fix for r63578: also change wordSegmentation() to segmentByWord() here 2010-03-11 12:27:35 +00:00
Mark A. Hershberger
92ed21f0ab follow-up r61856 — wordsegmentation should be done for all search engines, not just mysql 2010-03-09 04:19:55 +00:00
Mark A. Hershberger
2b50b7a522 tests are showing mResultSet is sometimes false when it free() is run, so adding defensive ifs 2010-03-05 20:40:43 +00:00
Mark A. Hershberger
09917fde80 random annoying whitespace changes before functional changes 2010-03-05 20:39:00 +00:00
Platonides
525cc3f606 Revert r61572. These titles are output parameters. A reference is the only way they can work correctly
(eg. think on a hook that always does 'return $titleResult = Title::newFromText("Foo");').
2010-01-27 14:39:03 +00:00
Platonides
86814a51cc Apply r61570 (Follow-up r61150: Do not pass objects as references in new hooks).
This time in the correct place.
2010-01-27 11:52:35 +00:00
Max Semenik
eff719b75d Fixed r61214: moved MySQL munging to SearchEngine, updated calls. Can we kill $doStrip now? 2010-01-22 20:36:26 +00:00
Platonides
64da9d2eb0 Bug 19996 (backend hooks) Finally adding the four hooks. 2010-01-16 23:27:55 +00:00
Max Semenik
4b0299a765 Severely refactored the SearchResultSet descendants system, consolidating most od the code into one class. Ping r58322. 2010-01-09 14:30:55 +00:00
Chad Horohoe
a4e5e935b6 Mass convert NULL -> null. Left strings and comments alone, obviously. 2009-12-11 21:07:27 +00:00
Greg Sabino Mullane
ff3bd60a6d Grammar 2009-11-15 02:20:41 +00:00
Brion Vibber
6c362522df Revert r53600 "Add $wgSecondaryGoNamespace, used if an exact match is not found when pressing go - will try to find a match in a different namespace before performing a search."
Revert r53618 "* Replace $wgSecondaryGoNamespace with $wgSecondaryGoNamespaces (taking an array of integers instead of just an integer), per code review of r53600."
Revert r53672 "* Add release note for r53618."
Per bug 11380 this should probably be using the default search namespaces or the user's search namespaces; an additional config array seems unnecessary.
2009-08-21 22:42:09 +00:00