Commit graph

62 commits

Author SHA1 Message Date
Yuriy Shnitkovskiy
68a8243d49 Replace Linker::link() with LinkRenderer in some special pages
* SpecialEditTags
* SpecialEmailuser
* SpecialFewestrevisions
* SpecialImport
* SpecialListgrouprights
* SpecialMediaStatistics
* SpecialMergeHistory
* SpecialMIMEsearch
* SpecialMostcategories
* SpecialMostinerwikis
* SpecialMostlinked

Bug: T149346
Change-Id: Idee566dbff87f2e8bf909ba8371d551aaf0dd08b
2016-12-01 10:20:59 +02:00
Stanislav Malyshev
34b02d87ac Convert SearchEngine to service containers
Change-Id: Icef1ecbed3d831557e0256fdfa53743b194007cc
2016-04-25 16:25:17 -07:00
Yogesh K S
06ff3d45f0 Switch Special:FileDuplicateSearch to OOUI
Bug: T117745
Change-Id: I7541244cd06b6ea5c71e7f1e540474e8ae3740b5
2016-04-04 14:23:26 +00:00
Stanislav Malyshev
05959a15ea Fix double $search in other place too
Change-Id: If0013988a7af06f0d19162fbf574aa15f1685c35
2016-04-03 14:45:55 +03:00
Reedy
b5656b6953 Many more function case mismatches
Change-Id: I5d3a5eb8adea1ecbf136415bb9fd7a162633ccca
2016-03-19 00:20:58 +00:00
Reedy
1834ee3d8e Fix numerous class/function casing
Change-Id: I23982bfa0548c9ea3bdb432be7982f1563930715
2016-03-18 23:14:49 +00:00
Kunal Mehta
6e9b4f0e9c Convert all array() syntax to []
Per wikitech-l consensus:
 https://lists.wikimedia.org/pipermail/wikitech-l/2016-February/084821.html

Notes:
* Disabled CallTimePassByReference due to false positives (T127163)

Change-Id: I2c8ce713ce6600a0bb7bf67537c87044c7a45c4b
2016-02-17 01:33:00 -08:00
Stanislav Malyshev
027972a20f Include completion search into SearchEngine
By default it still uses PrefixSearch and supports PrefixSearchBackend
but it can be deprecated and phased out and SearchEngine extensions used
instead.

New APIs:
- SearchEngine
	public function defaultPrefixSearch( $search );
	public function completionSearch( $search );
	public function completionSearchWithVariants( $search );

Search engines should override:
protected function completionSearchBackend( $search );

Bug: T121430
Change-Id: Ie78649591dff94d21b72fad8e4e5eab010a461df
2016-02-03 23:41:49 +00:00
umherirrender
83a15d8d6c Fix SpecialFileDuplicateSearch::prefixSearchSubpages
search suggestion without namespaces was not showing any list

Follows I71f77c3001a12d75b901807c20115cead9c64e93

Change-Id: Ib361e3de0cfd595e9f8949b9225ed37c29b8a3ef
2015-12-28 23:11:02 +01:00
umherirrender
345356c747 No prefix suggestion of special and media namespace on special pages
As mention in comments of I71f77c3001a12d75b901807c20115cead9c64e93 the
added prefix suggestion can get called recursive.
Avoid this by disable prefix suggestion for media and special namespace,
because a special page cannot be used on that special pages.

Follows I71f77c3001a12d75b901807c20115cead9c64e93

Change-Id: I8978e3bd0783f62bc25b32a0fdaa90361abefcf3
2015-12-13 18:39:14 +01:00
umherirrender
95b432758c Allow auto suggestion for subpages of some special pages
The autocomplete search allows special pages to define the list of
subpages to be excepted. Fill up the function to show auto suggestion
for subpages of the following special pages:

Special:AllPages
Special:ChangeContentModel
Special:FileDuplicateSearch
Special:Movepage
Special:PageLanguage
Special:Prefixindex
Special:Recentchangeslinked
Special:Undelete

This makes it easier to navigate to this special pages with a prefilled
title/target field.

Change-Id: I71f77c3001a12d75b901807c20115cead9c64e93
2015-12-06 18:29:08 +01:00
umherirrender
e7795c8266 Move styles for Special:FileDuplicateSearch to mediawiki.special
Style for #mw-fileduplicatesearch-icon is just needed on that special
page

Change-Id: If06b451d1ca8c25e9e86e9992b23d6380f7111ee
2015-10-13 20:20:41 +00:00
Ricordisamoa
eec968e7a8 Add public keywords to QueryPage subclasses
Follows a5c9c9607e

Change-Id: I81b1d49e017792dea2c7eb0d98e99656576cf497
2015-08-20 15:02:54 +02:00
Florianschmidtwelzow
e4f5c50652 Use HTMLForm for Special:FileDuplicateSearch
* Prepare the usage of MediaWiki UI.
* Add new HTMLForm output mode "inline" (very close to "raw")

Bug: 71436
Change-Id: I12240aaf624dff5219b344648b20373594b5ec46
2015-03-29 17:23:12 +02:00
umherirrender
6dcb4408c7 Avoid double word-separator when using Linker::userToolLinks
The word-separator is already part of the return value of
Linker::userToolLinks which results in a double space when add an own
word-separator

Change-Id: Id9d3125b9cae4a92f489215dda0b32c487f3fb11
2015-02-12 18:54:18 +01:00
umherirrender
a0653f7dd0 Fully escape return value from FileDuplicateSearchPage::formatResult
Also avoids unneeded recreation of a title object

Bug: T85864
Change-Id: I0298887e2ee5da9c1694393fb06cfa5eed0e46d3
2015-01-28 16:38:00 +01:00
umherirrender
3cf03a2ac7 Escape message 'word-separator' on Special:FileDuplicateSearch
Change-Id: Ib00cbca264d5723434e5db476293364267a13a85
2014-12-20 22:36:43 +01:00
Kunal Mehta
5984c77899 Use wfScript() instead of global in a few places
Change-Id: I3bb8eb52508e0f0ba40a889b400b0fc303311e29
2014-08-03 15:23:23 -07:00
umherirrender
768ac15c70 Cleanup some docs (includes/[s-z])
- Swap "$variable type" to "type $variable"
- Added missing types
- Fixed spacing inside docs
- Makes beginning of @param/@return/@var/@throws in capital
- Changed some types to match the more common spelling

Change-Id: Ie419638e909a47aa72a274043604247830ee1a81
2014-07-24 19:43:44 +02:00
Alexandre Emsenhuber
ad86d32875 Don't use isset() to check for null
Fixes in includes/specials

Change-Id: I6c382aeaa92372bc11220694c479006e3c658362
2014-05-24 07:45:33 +02: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
Siebrand Mazeland
87ec7ad22e Update formatting
Change-Id: I0e334d910a311f067276215b6bff94cd814fc3b3
2013-04-20 10:02:19 +02:00
Siebrand Mazeland
b84a680a32 Update/add documentation
Change-Id: I897d5833cdaf7dc2d3bca5bb5551958611f22bd9
2013-04-14 21:18:38 +02:00
Alexandre Emsenhuber
204d15fdb8 Fixes to Special:FileDuplicateSearch form
- Use Html class instead of Xml where possible
- Add line breaks to the output for better readability

Change-Id: Ia58e0d017a2a54c2458da625bd27a775204908d9
2013-03-24 07:53:59 +00:00
jenkins-bot
6114f05fc1 Merge "Correct case of Title::getPrefixedDBkey() calls" 2013-03-12 15:13:21 +00:00
Tyler Anthony Romeo
4dcc7961df Fixed @param tags to conform with Doxygen format.
Doxygen expects parameter types to come before the
parameter name in @param tags. Used a quick regex
to switch everything around where possible. This
only fixes cases where a primitve variable (or a
primitive followed by other types) is the variable
type. Other cases will need to be fixed manually.

Change-Id: Ic59fd20856eb0489d70f3469a56ebce0efb3db13
2013-03-11 13:15:01 -04:00
Alexandre Emsenhuber
cd4dd7ca85 Correct case of Title::getPrefixedDBkey() calls
Change-Id: Ic9ef0cc6dbb0a8eb0ee93432299ef59759223e2c
2013-03-09 21:14:22 +01:00
umherirrender
96a5486ed0 Add SpecialPage::getGroupName and use it
Having all group mapping for Special:SpecialPages in the global
$wgSpecialPageGroups is not a good OO style.
Created a method SpecialPage::getGroupName, which than can be overridden
by each subclasses to the featured group name.

Added also SpecialPage::getFinalGroupName to get the groupname on
Special:SpecialPages to handle the customization and
to keep $wgSpecialPageGroups for b/c

Change-Id: I1de3a186f0a59ec5ecb8996c5f805cf164e9637f
2013-03-07 21:15:54 +01:00
umherirrender
453264f904 fix some spacing
Change-Id: I2a59eb22bb8acf01b560507a48d6be55d9c87de7
2013-01-31 20:06:37 +00:00
umherirrender
2ea93f52e0 stylize one line method in includes/specials folder
Many of the isExpensive/isSyndicated method not written with new lines,
which are added with this change

Change-Id: I9b3a57035cdc718a8891a2428f9bed777a5f4fce
2012-09-24 19:44:57 +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
cf48e21668 Add userToolLinks on Special:FileDuplicateSearch
Adding LinkBatch for the file, user and user talk links

Also not linking to user of the foreign wiki, because that can bring
problems, when the user is not the same as the user on this wiki.
ImagePage.php is that already doing when showing the file history.

Change-Id: I72f94db11e7346036e53cddbe431d009de6ba2d3
2012-07-06 23:48:08 +02:00
Alexandre Emsenhuber
410cf6c1bb * Use local context to get messages
* Use Language::userTimeAndDate() instead of Language::timeanddate() to use user's timezone preference
2011-12-24 17:03:59 +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
Robin Pepermans
896521f1f5 Per Krinke on r91772, do not use general float/align classes. I removed them in shared.css because they are recent and not widely used yet.
(I removed the vertical-align:bottom; because it is added by css for .collection-creatorbox-row img)
2011-09-07 05:23:16 +00:00
Alexandre Emsenhuber
dcd5c027b1 * Use local context instead of global variables
* Call Linker methods statically
2011-08-05 14:58:37 +00:00
Robin Pepermans
7c624542f0 (bug 6100; follow-up to r91315) Being bold and removing $wgBetterDirectionality (and dependent wfUILang) in core, as most or all work is finished.
Also:
* Introduce classes mw-float-end, mw-float-start so we don't have to use inline css depending on wfUILang()/$wgLang (see HistoryPage and SpecialFileDuplicateSearch)
* Add direction mark to protection log
* Remove specialpageattributes as it is obsoleted by this commit (also fixes bug 28572)
* Add two direction marks in wfSpecialList, which makes ltr links on rtl wiki (and vice versa) display nicely as well (only on those special pages however)
* Revert r91340 partially: use mw-content-ltr/rtl class anyway in shared.css. Both ways have their [dis]advantages...
* Set the direction of input fields by default to the content language direction (except buttons etc.) in shared.css
2011-07-06 02:26:06 +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
Robin Pepermans
15f3df018f * Improvements as part of bug 6100: Use wfUILang() instead of $wgContLang where appropriate
* Remove $wgContLang in SpecialVersion per r90302
2011-06-21 10:14:34 +00:00
Sam Reed
b15737fa83 And even more documentation, the last of this batch 2011-05-28 19:00:01 +00:00
Sam Reed
0c2ce30777 * (bug 29101) Special:FileDuplicateSearch shows silly message
Patch by William Demchick
2011-05-22 23:20:59 +00:00
Mark A. Hershberger
6826aed670 w/s diff. mostly eol w/s and using only tabs of width 4 to indent. 2011-03-18 20:37:11 +00:00
Sam Reed
2c6e16e5e5 Remove unused variables 2011-02-18 01:10:38 +00:00
Brion Vibber
ad50776ead * (bug 18011) Special:FileDuplicateSearch UI fixes and remote file repo support
Fixes:
- now accepts file titles with or without File: prefix instead of demanding you must remove it
- moved result summary line from bottom to top
- added a line telling you no file was found if it wasn't found
- now pulls the reference file's SHA-1 via FileRepo, so can give it a remote file (eg from Commons)
- now pulls duplicate files via the main RepoGroup instead of querying image table manually, so turns up remote duplicates
- dropped the QueryPage standard paging header/footer; file dupe lists are usually very short and it's not worth copying the infrastructure

To make this work, I switched the special page class from using the standard QueryPage paths to doing the query and list itself; QueryPage is currently very tightly tied in to database queries, and doesn't provide a very clean way to drop in an alternative way of looking stuff up (say an API query or just getting a big array you've gotten from somewhere). If that gets improved, this page should be cleaned up to use more of the QueryPage infrastructure again so it's pretty and doesn't scare people coming in to maintain it.

Localization changes:
- added fileduplicatesearch-noresults message
- changed fileduplicatesearch-summary in English master to remove the supplementary line about taking out the 'File:' prefix
2011-02-07 02:35:35 +00:00
Alexandre Emsenhuber
847ed17b3e Force isCached() to false; otherwise the result is "This page is disabled for performance reason" when both $wgMiserMode and $wgDisableQueryPages are true 2011-02-02 14:48:26 +00:00
Roan Kattouw
56b5aa18ed Merge querypage-work2 branch from trunk. The most relevant changes are:
* QueryPage now uses array-based query building instead of raw SQL
* Converted all QueryPage-based special pages that were using old-style wfSpecialFoo functions to new-style SpecialPage subclasses; this is possible because QueryPage is changed to extend SpecialPage
* Backward compatibility for extensions is partly preserved: getSQL() is fallen back on for QueryPage subclasses that don't implement getQueryInfo(), but getOrder() will be ignored (implement getOrderFields() instead). This also means that dual compatibility (1.18 compat and b/c with pre-1.18) is trivial

Extension changes will be merged after this commit.

These changes make it easier to write an API module for QueryPages (bug 14869); this wasn't done in the branch but will be done in trunk soon.
2010-12-22 14:16:25 +00:00
Sam Reed
604ae0ca1c Update deprecated method calls
Remove some unused stuff
2010-10-31 16:20:48 +00:00
Chad Horohoe
9e6c7cc8ef Get rid of PHP4-style constructors 2010-08-30 16:52:51 +00:00
Alexandre Emsenhuber
144c825809 Standardised file description headers; first path 2010-08-14 19:19:41 +00:00
Chad Horohoe
4c74490bb8 Big commit: kill almost every freeResult() call as useless 2010-08-08 12:27:48 +00:00