Also, the $default value in LogEventsList#getFiltersDesc was not
being generated properly and would have always been an empty array.
Bug: T199856
Change-Id: Id286c76259406521f12cda67a4a715032e022637
* All Xml generation code has been removed.
* The LogEventsListGetExtraInputs hook now needs a form
descriptor array and not plain HTML.
See I37e0d3e81a46239750465b9299279fbbd7c7f87a.
* LogPager and LogEventList also take the $day parameter
for 'From date (and earlier)' and pass it to getDateCond
as well.
* Since FormOptions can't automatically extract the date
from the request this is being done manually in the
execute method of Special:Log using MWTimestamp.
Bug: T117737
Change-Id: Iba3c6aa5ac40dcdee0792c2d045b238b02d76521
The number provided by the query can be arbitrary, so let's narrow the
input validation to booleans.
Bug: T194616
Change-Id: If03e6e2d5bbcf4f2d85047cc23ee5388b39fe114
$pattern is a boolean, it is documented as "Do a prefix search rather
than an exact title match". However, its type was incorrectly
documented to be a string, and the default value was '' instead of
false (which was harmless, as it is correctly treated as a boolean
value everywhere).
Change-Id: Id093d12891a231d5934f9908e619065afff7380e
Make it possible to get a URL for a single log entry,
as an alternative to using Special:Redirect/logid/123.
The existing single-log-entry link of Special:Redirect/logid/123
is also simplified to be a redirect to this new parameter.
Bug: T191608
Bug: T187638
Change-Id: I5f2e52531cd2ba617a25570e40aa8c5168e284d9
Apparently when log_user_text was added no one bothered to populate it
for existing rows. Sigh, #Technical-Debt.
Bug: T188826
Change-Id: Ice1e6454e439a4abdf9594f6e964478dd484bc20
Follow-up to ce881e02e8 where the check for performer
restrictions and action restrictions was reversed.
Bug: T188145
Change-Id: I85a44f925212929ac87fb7a7e494023258f2d148
Storing the user name or IP in every row in large tables like revision
and logging takes up space and makes operations on these tables slower.
This patch begins the process of moving those into one "actor" table
which other tables can reference with a single integer field.
A subsequent patch will remove the old columns.
Bug: T167246
Depends-On: I9293fd6e0f958d87e52965de925046f1bb8f8a50
Change-Id: I8d825eb02c69cc66d90bd41325133fd3f99f0226
Previously, if you did not have the right to patrol/view patrolmarks,
you were not allowed to filter Special:Log to remove autopatrol
entries.
Now if wikiadmins want to disable the filtering, they have to
directly change the config value.
This was stupid because:
* Users without patrol rights are just as likely to not care about
autopatrol spam as users with the priv.
* Sometimes wikiadmins want to hide old patrol log entries even
after they disabled the patrol feature.
It should be noted there have been two previously attempts at fixing
this issue that didn't go anywhere:
* I9de17fc197a06402a4999a9fb792b86657641f76
* I88448ca0f09069943fd514a5b8213dfdafa57299
Bug: T44246
Change-Id: I590db72c169f3a9ad96c710f088923419d40e48d
Having such comments is worse than not having them. They add zero
information. But you must read the text to understand there is
nothing you don't already know from the class and the method name.
This is similar to I994d11e. Even more trivial, because this here is
about comments that don't say anything but "constructor".
Change-Id: I474dcdb5997bea3aafd11c0760ee072dfaff124c
ls_field_val was renamed to PRIMARY, but this is only partially
complete in WMF production. There is only one other index on the
log_search table, so ignoring that one is equivalent to forcing
the other one.
Bug: T17441
Change-Id: I63182a9f94eabb4cc47414d86b02c82bde1e58b0
It's unreasonable to expect newbies to know that "bug 12345" means "Task T14345"
except where it doesn't, so let's just standardise on the real numbers.
Change-Id: I6f59febaf8fc96e80f8cfc11f4356283f461142a
This is more consistent with LoadBalancer, modern, and inclusive
of master/master mysql, NDB cluster, and MariaDB galera cluster.
The old constant is an alias now.
Change-Id: I0b37299ecb439cc446ffbe8c341365d1eef45849
- This makes Special:Log's behaviour consistent with other special
pages, e.g. Special:Contributions.
Change-Id: Ic0a9322d920d7514bacac1f29a1da4fe57cae854
This moves the action filtering logic from SpecialLog to LogPager,
in a limitAction function, as this seems to be how this is done
for other params (title, performer, etc).
This also uses $pager->getPerformer and getTagFilter() for resp.
performer and tag filter as the options to show, rather than the
raw request values (in a WYSIWYG logic).
Change-Id: I4918a8a2dca3fdbadd7d65c9c9972e6f67a1761b
This was probably missed when 'suppressrevision' was split into
'suppressrevision' and 'viewsuppressed'.
It was properly separated in limitPerformer() but not in limitTitle().
Bug: T101982
Change-Id: I9c62599124cbb74d2004b416f6e490c231dbd7b2
These were flagged by mediawiki/tools/code-utils/check-vars.php
because they were located inside a switch statement, or inside an
if statement and used outside the statement. All other warnings
from that script are bogus, mostly because the script has no
support for PHP 5.3 namespaces.
Change-Id: If93bae4434b5c28845125095f6a22d6788a76efc
Xhprof generates this data now. Custom profiling of various
sub-function units are kept.
Calls to profiler represented about 3% of page execution
time on Special:BlankPage (1.5% in/out); after this change
it's down to about 0.98% of page execution time.
Change-Id: Id9a1dc9d8f80bbd52e42226b724a1e1213d07af7
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
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
Also 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.
Change-Id: Ic36c8c7820a6c2d603f1138130670c6bf6a1ca59
Previously, return values were inconsistent, and according to Chad,
no callers are interested in a return value.
Change-Id: Ib55e7a1c775953f8e90af4b4dedca403c33ac42d
Update limitPerformer to search for IPs based on log_user_text, rather
than preventing any results from being returned. Also, make a
corresponding adjustment to list=logevents in the API, and remove
indexes to match the LogPager code.
Bug: 58691
Bug: 54404
Change-Id: Iae3f4ee5c7fba5b0b0f4f8fb3e67ac054c7b8dd7
The Line continuation Coding conventions prefers the closing parenthesis
on the same line than the beginning curly braces. This is done for ifs
and functions.
Also move some boolean operator from the end of a line to the beginning
and changed some indentation to make the condition hopefully better
readable.
Change-Id: Id0437b06bde86eb5a75bc59eefa19e7edb624426
* This currently hurts some change tag queries by orders of mangitude.
MySQL/Maria query planning is also a fair bit smarter than it used to
be. Lastly, WMF table statistics are better maintained now.
Change-Id: I4d0ac7a35c9cec6b47771aae718b44bfc03bdfbe
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
This avoids $wgUser in that method
Also removed the double strencode for logtypes,
that is already done by Database::addQuotes/Database::makeList
Change-Id: I5f7f6da06594d92375f74ca48c04d180505642a9