Commit graph

76 commits

Author SHA1 Message Date
Aaron Schulz
488a647831 Move IDatabase/IMaintainableDatabase to Rdbms namespace
Change-Id: If7e8a8ff574661fd827de8bcec11d2c39a687300
2017-03-28 15:32:38 -07:00
Umherirrender
4d16c2ad56 Use Database::addQuotes instead of hard coded apostrophs
Change-Id: I1404d68d7e2b7fde8f9a76c747bc2be0936f7bef
2017-02-22 18:55:56 +01:00
Matěj Suchánek
87bfd03d13 Provide context to ChangeTags::buildTagFilterSelector
Bug: T105649
Change-Id: I5f44f4c054010c865ddb51e7d69107bdf2e88c00
2016-12-08 16:24:49 +00:00
Haikal Izzuddin
2c657ec256 Replace Linker::link() usage with LinkRenderer
Bug: T149346
Change-Id: Ie384566617f18ad6c3bf836b39702365d59f714d
2016-12-01 12:04:38 -08:00
Max Semenik
2b51bd1847 Fix function name case
Change-Id: Ibd4f682d2ed8500a50d85aae38f17281646f7c2d
2016-09-26 15:32:54 -07:00
Glaisher
9653f9b1d5 LogEventsList::showLogExtract: allow providing custom URL parameters for "view full log" link
Optional 'extraUrlParams' parameter has been added. This is useful for example when you want to
link to subtypes: Special:Log/foo?subtype=bar.
Also change Special:Log link to linkKnown() instead of link() while at it.

Change-Id: I87a6403eb0639c4d93e49d6946b85650f478107b
2016-05-22 18:04:45 +00:00
jenkins-bot
866f164873 Merge "Enable filtering by action on Special:Log" 2016-03-25 22:08:42 +00:00
Reedy
b5656b6953 Many more function case mismatches
Change-Id: I5d3a5eb8adea1ecbf136415bb9fd7a162633ccca
2016-03-19 00:20:58 +00:00
cenarium
d603a4477c Enable filtering by action on Special:Log
This allows logs to be filtered by log actions, provided
the log type has been set as such in config.
There is an index for log actions so the queries should
be performant enough (already used by API).

Extensions can use $wgActionFilteredLogs to filter their
own logs in the same way.

Bug: T20954
Change-Id: I6a61175f9a111c03d15b4d41751c818e3a411ff6
2016-03-14 19:20:14 +01: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
Aashaka Shah
124026a712 Add IContextSource as parameter to ChangeTags::formatSummaryRow
Using IContextSource avoids the use of $wgLang and wfMessage which make
use of global $wgTtle.

Add IContextSource as parameter to ChangeTags::formatSummaryRow to avoid
globals. Define an IContextSource instance in all functions which
reference ChangeTags::formatSummaryRow and pass it in ChangeTags::formatSummaryRow
function call.

Also make the default value of IContextSource $context as null in
parameter, to avoid breaking changes for old callers in extensions.

Document default null value of IContextSource and add a @note to prefer
IContextSource over null value.

Remove trailing whitespace, and make code order according to parameter
order.

Bug: T105648
Change-Id: Ib54a6a96b73f6cd8fcdf8e520db2448a1e811cfa
2016-02-04 23:32:24 +05:30
Albert221
ed69044f80 Localization: Gave each special page its own message
Bug: T45502
Change-Id: I847c8b294d7e4596b229ad6180764c43c42af1e2
2015-12-13 16:16:25 +01:00
Bartosz Dziewoński
60e8b55856 Reduce usage of inline <span style="white-space: nowrap">
Inspired by T119055.

Change-Id: I6829a67fb77c00e87772983f35b884bf03fad7e3
2015-11-19 21:38:23 +01:00
Aaron Schulz
0f7893f877 Update various @params from DatabaseBase to IDatabase
Change-Id: I98e44cdffb0fc0d729f69f702799139afb988c20
2015-10-05 05:24:29 +00:00
cenarium
f827d5a261 Avoid muliple cache calls to explicitly defined tags
This avoids muliple cache calls to explicitly defined tags by
calling the showTagEditUI of ChangeTags only once in logs and
histories.

Change-Id: I2e36dbd96d3fcca06de0bf418bc6dc294d8d18d3
2015-06-14 20:02:30 +02:00
Brad Jorsch
a2415baa1a ChangeTags: Don't show UI when no editable tags exist
Bug: T97773
Change-Id: I001f15ca6f58bc9318eed84aa8ace2bddcb1b315
2015-05-01 11:12:31 -04:00
Brad Jorsch
4812913936 ChangeTags: Show checkbox on Special:Log when user lacks RevDel rights
The actual production of checkboxes in LogEventsList didn't get updated
to show checkboxes when the user can edit change tags but cannot use
RevDel on log entries.

This also renames LogEventsList::USE_REVDEL_CHECKBOXES to
LogEventsList::USE_CHECKBOXES to be accurate with the change here; no
extensions in Gerrit use this constant, so we should be safe.

Bug: T97501
Change-Id: I72ca7371fe73b650d5ef32d18da19788084f9aeb
2015-04-29 13:36:48 -04:00
Aaron Schulz
4bdbfe6c1b Removed BloomFilter classes
* This ends up being more complex than its worth
  and even more so for multi-DC support

Bug: T93006
Change-Id: Iaa774fe69061e42955b11dc82d30dba93208e606
2015-04-03 09:10:04 +00:00
Aaron Schulz
e369f66d00 Replace wfRunHooks calls with direct Hooks::run calls
* This avoids the overhead of an extra function call

Change-Id: I8ee996f237fd111873ab51965bded3d91e61e4dd
2014-12-10 12:26:59 -08:00
Aaron Schulz
09d9413795 Fixed regression that made log queries happen in spite of the bloom filter
Change-Id: I50f280a1db30cb1f9901a55a8a9558ebb2a9dffd
2014-11-20 09:03:29 +00:00
jenkins-bot
dd53b928b9 Merge "Add two hooks to allow for extensions to expose log_search values in the UI" 2014-11-06 23:00:16 +00:00
Fomafix
3055160858 Use getHtmlCode() instead of getCode() to set the lang attribute
The lang attribute of HTML elements should conform to BCP 47.

Bug: 72939
Change-Id: I9b4a734753af2c9dd7256eec60781553bc76edbf
2014-11-06 14:53:57 +00:00
Aaron Schulz
e7d5b09d1d Made LogEventsList use the log bloom filter, not just the Article class
Change-Id: I6c523d4ecd60dab080537cabc5aa1c632950e018
2014-11-03 21:44:15 +00:00
Kunal Mehta
777dd95cdf Add two hooks to allow for extensions to expose log_search values in the UI
* SpecialLogAddLogSearchRelations
   Allows for adding the extra conditions needed by the query

* LogEventsListGetExtraInputs
   Allows for adding extra input fields to interface

Bug: 70850
Change-Id: If8bdbadd882d67cae82c862c7c38000e9329b04f
2014-10-28 10:59:36 -07:00
Alex Monk
91ba0535b2 Implement autocompletion for Performer field on Special:Log
Bug: 48241
Change-Id: I5e6af5aba56de613f10f862aaf064aaa32b5b176
2014-09-30 01:03:55 +00:00
umherirrender
6ed0a552b5 Remove LogEventsList::getDisplayTitle (deprecated 1.20)
Change-Id: If8306adec1cd64064280f8ffa1163237ee427cf2
2014-09-26 14:36:13 -07:00
Leon Liesener
acc16e85f3 Adjusted show/hide links
This change replaces checkboxes with show links for users
with the 'viewsuppressed' right assigned who cannot
hide/unhide suppressed revisions.

Change-Id: Id575b9830c84a17075ba6d10a5a305a38afd94e2
2014-07-21 23:50:42 +02:00
Leon Liesener
3091b49e77 Shortened too long lines
Change-Id: Ia82162dd52b3fea7e76c1f47cb66bce3b7927cef
2014-07-20 20:10:37 +02:00
eikes
2f002458d5 Split "suppressrevision" into two user rights
In this change, a new passive user right named "viewsuppressed"
which can be used in order to view suppressed page content was added
to MediaWiki core.
Furthermore, this right was also added to the list of available rights,
to qqq.json and to en.json where also the description of the
"suppressrevision" right was adjusted in order to reflect reality.

Bug: 20476
Change-Id: Id1baacb9c782763db5e05ef8b5c1b761997efcc9
2014-07-19 18:11:15 +02:00
umherirrender
91fc59e12d Remove LogEventsList::showHeader() (deprecated since 1.19)
Change-Id: I9575329cb09f495f47032028d3693f8046b3e139
2014-06-24 20:13:27 +02:00
umherirrender
b45420410f 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: Iced714bca004756b461b66067a49a925a7e3b877
2014-04-19 22:22:20 +02:00
Bartosz Dziewoński
59002d8935 Consistently use '@deprecated since <version>'
Variants included 'in <version>', 'as of <version>' and just the
version number.

Some @deprecated annotations do not have the version number at all,
I want to hunt them down separately.

Change-Id: I8208c6097098f4735d4f51bc42254675f1f27f6d
2014-04-15 22:18:19 +02:00
Ladsgroup
a90f1a2d79 Changing URLs of mediawiki.org in scripts to the SSL-based website
http://www.mediawiki.org --> https://www.mediawiki.org

Part 3

Change-Id: Ica633881b1744fa2854f4b012b79dbf5a7e5e7e2
2014-03-13 22:28:14 +00:00
Brian Wolff
a2cd62c677 Use master db for showing log extract on RevDel success page
On revision delete success, we show an excerpt from the log,
it is very confusing when that excerpt doesn't include the
action that you just did.

Bug: 57033
Change-Id: Ica79bf76243f7ab7a2a0fb40689c34bd2ffc0297
2014-01-29 18:04:04 +00:00
Ebrahim Byagowi
2cb5ce0379 i18n: Make LogEventsList user language direction aware
Bug: 58685
Change-Id: I9627689febb296dfeed588a52bfd30d8a9a46cda
2013-12-19 18:08:19 +00:00
jenkins-bot
5c5255e227 Merge "Update documentation for log related classes" 2013-12-06 00:28:29 +00:00
jenkins-bot
1a60a9bd41 Merge "Set saner default for parameters of LogEventsList::showOptions()" 2013-12-05 23:29:25 +00:00
Siebrand Mazeland
e64f4d9f12 Update documentation for log related classes
Change-Id: I4e00cda46cc7bbcbd17ac2d3d025a76281ee84b6
2013-12-06 00:07:12 +01:00
jenkins-bot
64308ea107 Merge "Add deprecation warnings for log related methods" 2013-12-04 14:42:07 +00:00
Siebrand Mazeland
a222eb8767 Add deprecation warnings for log related methods
* LogEventsList::getDisplayTitle() was deprecated in 1.20.
* LogPage::logHeader() was deprecated in 1.19.
* LogPage::logName() was deprecated in 1.19.

No remaining uses in core.

Change-Id: I073f11a7776f6e3809d20d50e61e57486b77f494
2013-12-03 21:57:08 +00:00
Siebrand Mazeland
91c4204fc1 Remove unneeded else{} in LogEventsList::userCanBitfield()
Change-Id: I85c0db0637edb87eec7ec5b335e88113a3d8ebe2
2013-12-03 21:54:46 +00:00
Siebrand Mazeland
271eb32122 Set saner default for parameters of LogEventsList::showOptions()
Also cast input for Xml::dateMenu().

Change-Id: I28f9184626b01cce4a8080ba3337af0b3f941484
2013-12-03 21:54:09 +00:00
Siebrand Mazeland
86fe1da236 Break long lines in logging related classes
Also:
* Take function call out of for loop test part.
* Suppress CodeSniffer warnings for unavoidable long lines.

Change-Id: I14044f14b30d494d910541a1dac50921254a7398
2013-12-03 15:58:51 +01:00
Siebrand Mazeland
8a536b8591 Update formatting for log related classes
Change-Id: I6535467ed9b22d61b7c5caf3f18067a988871751
2013-12-03 15:36:21 +01:00
shirayuki
1b8155403c Give grep a chance to find the usages
Change-Id: I7fc00b055b21bbbbab209a1b1d23f23172862a0b
2013-09-05 18:29:47 +09:00
umherirrender
15ff79312d Fixed spacing and removed unneeded parenthesis
Added spaces after/before parenthesis
Removed unneeded parenthesis around some statements
Broke a long line

Change-Id: I7fbe129f7bbf524dd0598ece2a9708643f08453b
2013-05-17 16:12:08 +00:00
Brad Jorsch
38a74c7c78 (bug 25592) LogEventsList:showLogExtract should ignore WebRequest
LogEventsList:showLogExtract currently pays attention to WebRequest
parameters such as offset, dir, order, and limit (although limit is
typically overridden by callers, and offset sometimes too).

While these make sense for a pager that is driving the whole page, it
doesn't make much sense for the "most recent log entry" boxes that are
displayed using LogEventsList:showLogExtract. So let's have
LogEventsList:showLogExtract ignore these, and for good measure add in a
parameter to use the old behavior in case any caller really needs that.

Change-Id: Id4380cd863ba69fc9b9afb5a0034d82ad4d9cc34
2013-04-22 09:42:44 -04:00
umherirrender
6c38a5eb72 Fixed spacing in logging/parser/profiler/rl/revdel/search folder
Added spaces before if, foreach
Added some braces for one line statements

Change-Id: I11bbcfa351e945b7bde10c2105d61a3cf5622205
2013-04-20 17:38:24 +02:00
umherirrender
15abcf71ca Added/Removed spaces around string concatenation
And added/removed spaces around some other tokens,
like +, -, *, /, <, >, =, !

Fixed windows newline style

Change-Id: I0b9c8c408f3f6bfc0d685a074d7ec468fb848fc8
2013-04-13 13:36:24 +02: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