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
This patch adds an ug_expiry column to the user_groups table, a timestamp
giving a date when the user group expires. A new UserGroupMembership class,
based on the Block class, manages entries in this table.
When the expiry date passes, the row in user_groups is ignored, and will
eventually be purged from the DB when UserGroupMembership::insert is next
called. Old, expired user group memberships are not kept; instead, the log
entries are available to find the history of these memberships, similar
to the way it has always worked for blocks and protections.
Anyone getting user group info through the User object will get correct
information. However, code that reads the user_groups table directly will
now need to skip over rows with ug_expiry < wfTimestampNow(). See
UsersPager for an example of how to do this.
NULL is used to represent infinite (no) expiry, rather than a string
'infinity' or similar (except in the API). This allows existing user group
assignments and log entries, which are all infinite in duration, to be
treated the same as new, infinite-length memberships, without special
casing everything.
The whole thing is behind the temporary feature flag
$wgDisableUserGroupExpiry, in accordance with the WMF schema change policy.
The opportunity has been taken to refactor some static user-group-related
functions out of User into UserGroupMembership, and also to add a primary
key (ug_user, ug_group) to the user_groups table.
There are a few breaking changes:
- UserRightsProxy-like objects are now required to have a
getGroupMemberships() function.
- $user->mGroups (on a User object) is no longer present.
- Some protected functions in UsersPager are altered or removed.
- The UsersPagerDoBatchLookups hook (unused in any Wikimedia Git-hosted
extension) has a change of parameter.
Bug: T12493
Depends-On: Ia9616e1e35184fed9058d2d39afbe1038f56d7fa
Depends-On: I86eb1d5619347ce54a5f33a591417742ebe5d6f8
Change-Id: I93c955dc7a970f78e32aa503c01c67da30971d1a
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
Xml::inputLabel does not know about boolean parameters like autofocus,
so add it with an empty value or omitted it.
Fix validation error:
Bad value 1 for attribute autofocus on element input.
Change-Id: Idb7a7b58079d6c44b5a7f1fa226218bb685c8241
* This avoids writes on view and is more reliable
* Also made the wfWaitForSlaves() there actually work
Bug: T95501
Bug: T92357
Bug: T89027
Change-Id: I0a006fc92a9268feb185c9d88aa04002ea51ecd3
When the data on Special:ActiveUsers are up to date there is no need to
give a hint, seeing data from cache "which can be up to 0 seconds".
Change-Id: I46f80c7cdc083b997794fb9398887e2ef0088684
For GROUP BY queries, PostgreSQL require all columns in the
unaggregated part of the select list to also be in the
GROUP BY list.
To fix this, add user_name and user_id to the GROUP BY list along side
qcc_title.
This addition cannot change the query results, because user_name and
user_id are functionally dependent on qcc_title: user_name because
of the WHERE clause for this query, and user_id due to the 1 to 1
relationship between user_name and user_id enforced by their unique
and not null constraints on the underlying table.
This has been tested on PostgreSQL and MySQL.
Bug: 68087
Change-Id: I3aed715b40ff6e2290220122acbda0f0e74b5b36
Call parent of doBatchLookups to get the LinkBatch for the userpages.
Use than the populated user group cache to get the groups from to
display them.
Follow-Up: I4a945f83ad28edf5cc040139943cf743cb3d133c
Change-Id: Ibbabf40d60dd9f8e3667cf17455e7582b4ee472a
* Handle repeatable-read snapshots better for web requests
* In CLI mode, handle automatic reconnects better (rolling
back). It has to abort since it lost the lock in that case.
bug: 71086
Change-Id: I5228889cf05857c87a06f7d073b5aa46f0c240be
http://phpdoc.org/docs/latest/references/phpdoc/types.html
If IDEs have many warnings, we don't look at them.
Let's minimize the number of warnings, and make them useful again.
* Some function docs fixes
* Removed unused $iwprefixes var in ApiQuerySearch.php
* declared private $blockStatusByUid in SpecialActiveusers
* declared private $repo in UploadFromChunks
Change-Id: Ifd20f78b168b9a913fdb8d89dc26a76a173b1c29
* This does not do anything except waste time and connections.
The query should be small in that case anyway.
Change-Id: I010b3f09be36202ccf408e1a2b084fee0a598ff9
The cache of active users maintained by Special:ActiveUsers filters out
certain actions, but the displayed action count does not. Fix this.
Change-Id: Ifb9035a08328587c43c46520c5062602b9b9c6f5
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: Icf6f36bb53322b39cd5c89523dbd0e4ab10b9ec9
People usually want to know who the active users are on the local
wiki, not who edited something on Wikidata.
Note, this changes the query to no longer use a covering index
when joining against the recentchanges table when displaying
the page.
Bug: 63769
Change-Id: I919123f396d0901822108a4675593a2ff5b7307f
* The table was not in the table array so this did not affect
the SQL, but was still unused cruft.
Change-Id: Ia5aa934fb6e6de9daeb0072d902df6e681575fd7
This reverts commit 27104686ab.
Revert "Remove link to Special:ActiveUsers from Special:Statistics"
This reverts commit 62949af09e.
I used a sledgehammer where a scalpel would've done--and I should
be whacked with the cluebat. This should be done per-wiki, plus
improvements.
Change-Id: Ib43b42057b8d9f714a8a71ba9cbe375385254b7c
This feature was poorly thought out from the start. It's a huge
performance drain when used, for a mimimally useful set of data
Change-Id: I138622e1c184f74e2a7ce13a9a544ab4e610d7a0