Commit graph

238 commits

Author SHA1 Message Date
umherirrender
23bb3d1cb4 Follow-Ups to "Fixed some @params documentation"
Fix of inline comments of the following patch sets:
Follow-Up: I0056b4a8df243cfc0c5f25378de48f7a35170aca
Follow-Up: I7f605aa9e117b5fd80d9b1440864fe526d2b14a5
Follow-Up: I3622f216a2ca8ac1b5e51892be9f98665f65bc36
Follow-Up: I6627ba0e76d3577c40bf2473e0f78a5ad7368634
Follow-Up: Id75b5ecf648ca50f955b3bde3307c82c4366b102
Follow-Up: I4ca5231119f33039d91da3b57a41cd40719a576b

Change-Id: Id9bbe84b2820e9db44af5783411e955f55f643d4
2014-04-23 13:39:49 +02:00
umherirrender
8ad1c92441 Fixed some @params documentation (includes/*)
Swapped some "$var type" to "type $var" or added missing types
before the $var. Changed some other types to match the more common
spelling. Makes beginning of some text in captial.
Also added some missing @param.

Change-Id: I7f605aa9e117b5fd80d9b1440864fe526d2b14a5
2014-04-20 21:16:57 +02:00
Brian Wolff
24276faf68 Add Special:ListDuplicatedFiles expensive query special page.
I saw some comments recently on commons suggesting that
better ways are needed to manage duplicate files (There are tools
for if a specific file is a duplicate, but no backlog of
outstanding duplicate files).

This seems like a fairly easy first step in that direction.

Wasn't sure if this should be an image gallery type
query page, or just a list. I think in this case a plain
list is more useful.

Change-Id: Ibe4b9da71ca6451ec4e6b0050feaf3ca70e1b888
2014-03-24 00:16:05 -03:00
umherirrender
2000672ac3 Fixed spacing
- Added spaces after if/foreach/catch
- Added new line before end of file
- Added or removed spaces before/after parenthesis, comma
- Added spaces around string concat

Change-Id: I0590070f1b3542108e242730e8d9a3ba9831e94f
2014-03-20 20:37:30 +00:00
Chad Horohoe
f508561f7b Moved $wgQueryPages stuff out of the global scope and into a function
Change-Id: Ica034bdad89133bfce0b4238d62ed00865936644
2014-03-18 08:36:32 -07:00
apexkid
e65fd1bef5 Show range start and end in special page pagination
Changes pagination message from "starting with #X" to
"in range #X to #Y" for special pages such as
Special:MostLinkedCategories

Bug: 11269
Change-Id: Ibf9191f3a694014ad02eba9a58c600833e8361ec
2014-02-05 21:58:48 +00:00
Kunal Mehta
3cf85fbb67 Fix typo: "oaram" --> "param"
Change-Id: Iff06f32c05cc83657770857b48d6201d1285eb07
2014-01-26 11:49:25 -08:00
Siebrand Mazeland
9a3bbd6d8b Update documentation for QueryPage::execute()
Change-Id: I3f3ff6a8730daccfa093e6f8a7faeffb057472ba
2013-12-27 17:57:19 +01:00
Kunal Mehta
bc798535fd Deprecate SpecialPage::getTitle
Callers should use SpecialPage::getPageTitle, which is
exactly identical.

This is so that in the future we can turn SpecialPage
into a ContextSource, which requires getTitle to return
getContext()->getTitle.

Change-Id: Icdcf5d5295ef5e7f08b1d403e0c123f78738fd40
2013-12-24 12:53:11 -08:00
Tim Starling
2be2abf30f Fix QueryPage transaction plan
The COMMIT in updateSpecialPages.php was unmatched and just logged an
error. We would like the stale results to still be presented to the user
during the hours of query execution time, so doing a DELETE in
autocommit mode before the main query starts does not seem appropriate.
And holding a master transaction open for hours, with a lock on
querycache, is certainly not the right way to do it.

So, move the DELETE to after the completion of the main query, and wrap
a transaction around the updates to querycache and querycache_info so
that the user always sees a consistent populated UI. Remove the
unmatched COMMIT from updateSpecialPages.php.

Change-Id: I27c22b96f43a1064eb17a0c6a1c56d1f4a2dff9a
2013-12-11 11:57:00 +11:00
Tim Starling
758707593a Send QueryPage recache queries to a separate query group
This essential feature was broken 3 years ago, in r78786. The group
connection was being used only for a call to the archaic
Database::fetchObject().

Change-Id: Ia4c76c88ecc77eb663a535b0625a1509882a35c7
2013-12-11 11:48:47 +11:00
umherirrender
c3fb02a724 Break long lines and remove some spaces in QueryPage.php
Change-Id: Ia4840580ada4b42bb70d38965f7955d175db9247
2013-12-08 10:48:36 +01:00
kaldari
e517e9be57 Removing all disambiguation code from core
Disambiguation related functions have been re-implemented in the
Disambiguator extension.

Bug: 35981
Change-Id: I4afa30bf2677c6541ef355013f8eaef46abfbe03
Dependency: I41637ea43a9e5000bcb8a782441ce36f1068881f
2013-09-05 14:07:51 -07:00
Brian Wolff
3342fafb48 Make Special:MIMESearch a non-expensive special page.
This tries to use the index on (img_media_type, img_major_mime, img_minor_mime).
This is not the ideal index for this purpose (due to starting with
img_media_type, and not having an img_name at the end). However it
seems usable due to the low number of values img_media_type can have.
Thus we can just specify all values, and the index will get used
as a range index.

The only potentially problematic thing I see is that it uses
LIMIT X,Y for the offsets (due to being a query page) which can
be expensive on big offsets. If that's an issue, we could limit
the number of results to be at most $wgQueryCacheLimit or something.

Note: There's some discussion on the bug rather negative to this
special page in general. While I agree with much of the criticism,
I still think this special page can be useful, and if it can be
made efficient without needing to modify the indicies, we might
as well.

Bug: 13438
Change-Id: I88826ae7bff0812374157e596f86a19b248220e1
2013-07-25 00:05:09 -03:00
MatmaRex
0b7ecb1a64 Correctly use $wgFeedLimit in page history feed
The previous behavior enforced a minimal maximum of 10, even if
$wgFeedLimit was set to a lower value.

Also grepped everything for $wgFeedLimit and fixed all other
error-prone (but correct) uses.

Bug: 50886
Change-Id: Ia81bbadfcf4270b0f932b543265ca37f364530f3
2013-07-07 20:39:53 +02:00
umherirrender
ef2f507d23 Fixed spacing in files direct in includes folder
Added spaces before if, foreach
Added some braces for one line statements

Change-Id: Ibb8dd102db045522d12ff939075ba7420d95ab6b
2013-04-21 06:38:49 +00:00
jenkins-bot
a56052b07b Merge "Added spaces before and removed spaces after 'array'" 2013-04-14 22:01:51 +00:00
umherirrender
97234cc884 Added spaces before and removed spaces after 'array'
Fix some other spacing while at it

Change-Id: I13f81533eaf40e06c13cf377c0f08ef5cef01d00
2013-04-14 21:57:46 +02:00
Siebrand Mazeland
b84a680a32 Update/add documentation
Change-Id: I897d5833cdaf7dc2d3bca5bb5551958611f22bd9
2013-04-14 21:18:38 +02:00
Yuri Astrakhan
9506e3d812 Spellchecked /includes directory
* Ran spell-checker over code comments in /includes/
* A few spellchecking fixes for wfDebug() calls

Found one very strange (NOOP?) line in Linker.php - see "TODO: BUG?"

Change-Id: Ibb86b51073b980eda9ecce2cf0b8dd33f058adbf
2013-03-13 03:42:41 -04:00
umherirrender
d63121016d fix some spacing
Added/removed spaces around logical/arithmetic operator
Reduced multiple empty lines to one empty line
Removed wrong tabs before comments at end of line
Removed too many spaces in assigments

Change-Id: I2bba4e72f9b5f88c53324d7b70e6042f1aad8f6b
2013-03-07 17:53:21 +01:00
Aaron Schulz
1da33a49a0 Removed references to DB ignoreErrors() function.
Change-Id: I9441d897d45bca189c17b8bcca4ea7b3469af8b0
2012-12-11 11:24:12 -08:00
Reedy
d0a242abb4 Tidy up some unbalanced returns in methods
Leave a TODO

Change-Id: Ic49ac8630650b341aafb3c17abd22f3a07805d27
2012-12-09 02:59:04 +00:00
Siebrand Mazeland
d4b046a893 Update docs for return and exception info
* Removed some inline tabs in the process.
* IDE fixed some incorrect leading spaces, too.

Change-Id: Ic9303eff6db4424ac3f1fa2816839692b43e6190
2012-10-09 09:41:58 +00:00
umherirrender
fcd6bb547f (bug 22749) Create Special:MostInterwikis
This special pages counts all langlinks and shows the pages with the
highest count.
Update rate on WMF is every 3 days, like all other Most* special pages.

Change-Id: Ia60aed7599e8b9d6dcbae2be9bc4f91f4f8d4e55
2012-08-19 15:54:15 +02:00
umherirrender
33abda08a9 (bug 39429) Fix wrong counting on query pages [regression]
Change-Id: I1c5be7cd6b3dd0990dba8f30f9d859aa841a1f55
2012-08-16 17:40:28 +02:00
umherirrender
aff21af9ae Allow aliased field names with separated syntax
This introduce the syntax from aliased table names for aliased field
names into the abstract database layer:

array( 'alias' => 'field' ) gives 'field AS alias'

This patch also includes changes to query pages, api and some more
places to show, how the new syntax looks in "production".

This allow us to remove the "AS" for Non-PostgreSQL databases, if we
want that.

Change-Id: I5f0de1c2f29092c173aec3de93ffdef436799e8d
2012-08-15 15:16:09 +02:00
umherirrender
d8e166b1ac Fix at end navigation condition for query pages
When looking at offet=1950 and limit=50 with a maximum of 2000 pages,
the show next link should not be active.

Change-Id: I0c3c2f2e46449cb6c35c227dec69363a7530b8ca
2012-07-29 01:05:38 +02:00
Aaron Schulz
beebe060e3 Merge "(bug 23844) Add var dataCacheTime to mw.config" 2012-05-19 22:05:20 +00:00
umherirrender
dbaec6e71f Wrap message querypage-no-updates into a class
this allows easy styling of that message

Change-Id: Ief78cb598613e705dace65e4b8e36dcb544c6f4b
2012-05-19 19:48:13 +02:00
umherirrender
3992cd8f65 (bug 23844) Add var dataCacheTime to mw.config
Change-Id: I67c9cbf4fc01f4e8580b39852b27a1ac70993051
2012-05-19 19:44:09 +02:00
umherirrender
41988661e4 GROUP BY and ORDER BY supports arrays in Database class
Change-Id: Ib431b07ffa2ce6843e21536de2ff19c648e0a595
2012-05-13 00:06:48 +02:00
Alexandre Emsenhuber
d1f8640a3b Added missing GPLv2 headers in some places.
Also made file/class documentation more consistent.

Change-Id: Ia45d0756cd84138da267bf1cbd1a58be7f28c6d1
2012-05-11 10:34:29 +02:00
umherirrender
d2baedfa56 Use right case for Title::makeTitle
Change-Id: Ia91b3679f03eefb9970a790c784a92ea6fb0c274
2012-05-05 16:08:47 +02:00
Alexandre Emsenhuber
53a5959de4 * Don't execute the LinkBatch if there are now rows
* Call methods directly on ResultWrapper instead of DatabaseBase
2012-03-02 20:35:01 +00:00
Antoine Musso
73247df204 Remove backslash from @return types
Ping r111103
2012-02-13 16:35:59 +00:00
Sam Reed
09a78c1368 More return documentation 2012-02-09 21:36:14 +00:00
Antoine Musso
9bcf1b9f13 Fix some missing doc groups 2012-02-09 09:34:47 +00:00
Alexandre Emsenhuber
5237255860 Code cleanup:
* Group global declarations at the top
* Move wfGetDB() near where it's used
* Only do some stuff when really necessary
2012-01-29 22:02:27 +00:00
Alexandre Emsenhuber
f9ceae070d Use Language::userTimeAndDate() and related to get the time with user preferences instead of Language::timeanddate() and related 2012-01-27 07:23:55 +00:00
Alexandre Emsenhuber
b5c88474d5 * (bug 33762) QueryPage-based special pages no longer misses *-summary message 2012-01-27 07:15:18 +00:00
Brian Wolff
ec05848843 (bug 33456) show $wgQueryCacheLimit on cached query pages, so users know that the results are artificially cut off, and its not just that there is only 1000 wanted files (or whatever else) on the wiki. 2012-01-05 16:14:52 +00:00
John Du Hart
216d661d3b Bug 29524 - Rename RequestContext::getLang to getLanguage
I'll be amazed if this doens't break any tests.
2011-11-21 16:13:21 +00:00
Alexandre Emsenhuber
c19eee982e * Moved wfViewPrevNext() to Language::viewPrevNext() so that it can be used in the context and not always relying on $wgLang
* modified the parameters order in Language::viewPrevNext() in comparaison of wfViewPrevNext() and changed it to require a Title object and extra parameter to be passed as array
* Use more modern methods to genrate i18n and HTML
* Removed wfNumLink(), not used anymore, only referenced in a comment in MetavidWiki extension
* Inlinised wfShowingResults(); I don't see any reason why only this message should get its own function
* Replaced all calls to wfViewPrevNext() and wfShowingResults() in core
* Simply use OutputPage::addWikiMsg() to display 'specialpage-empty' message 
* Moved wfSpecialList() near wfViewPrevNext() in GlobalFunction.php
2011-10-14 14:57:06 +00:00
Alexandre Emsenhuber
82cc745a52 In WantedQueryPage:
* Call Linker methods statically
* Use $this->msg() to simplify parameter formatting and escaping
* Link to Special:Whatlinkshere/Page instead of Special:Whatlinkshere?target=Page for consistency
2011-10-14 14:20:02 +00:00
Alexandre Emsenhuber
4148b2512b Moved wfSpecialList() to Language::specialList() so that it can be used in the context of special pages instead of relying unconditionally of $wgLang. Updated all calls in core and added a @deprecated comment to wfSpecialList() but not a wfDeprecated() call since it's still used in SiteMatrix and StalePages extensions. 2011-10-13 11:46:21 +00:00
Sam Reed
4822df9467 More whitespace and comments 2011-10-03 22:51:38 +00:00
Brian Wolff
cb3a99fd8a Fix handling of qplimit/qpoffset and cachedtimestamp in QueryPage api module
Basically api was thinking qplimit was the offset, and qpoffset was the limit. Also remove an extra ! when checking for the cached timestamp which was stopping the display of cachedtimestamp property in the api output.

I'm going to tag this 1.18 since this module was introduced in 1.18, and I assume we'd want to fix the limit/offset parameter before the wrong behaviour gets released and people depend on it, etc.
2011-09-29 15:16:35 +00:00
Alexandre Emsenhuber
090f743683 Use local context instead of global variables 2011-08-08 21:07:17 +00:00
Sam Reed
bdc31bb9bc Change usages of $wgUser->getSkin() in special pages to use $this->getSkin()
Fix trailing whitespace
2011-07-01 02:25:19 +00:00