Commit graph

14 commits

Author SHA1 Message Date
Brad Jorsch
3488f49532 Replace selectFields() methods with getQueryInfo()
Several classes have a "selectFields()" static method to tell callers
which fields to select from the database. With the recent comment table
change and the upcoming actor table change, this pattern has become too
simplistic as a SELECT will need to join several tables to be able to
retrieve all the needed fields.

Thus, we deprecate the selectFields() methods in favor of getQueryInfo()
methods that return tables and join conditions in addition to the
fields.

Change-Id: Idcfd15568489d9f03a7ba4460e96610d33bc4089
2017-10-30 22:57:33 +00:00
Aaron Schulz
488a647831 Move IDatabase/IMaintainableDatabase to Rdbms namespace
Change-Id: If7e8a8ff574661fd827de8bcec11d2c39a687300
2017-03-28 15:32:38 -07:00
Aaron Schulz
e01fd44388 Move ResultWrapper subclasses to Rdbms
Change-Id: I6f3f0e85e268b24c57c537aa6ad8016e0b4cdddb
2017-03-03 00:44:41 +00:00
Roan Kattouw
59f09caabc Force primary index for RevDelRevisionList query
To work around an optimizer bug in MySQL where the
index on (rev_page, rev_id) is picked which mysteriously
leads to very slow execution times and timeouts.

In theory, the index being forced here is (rev_id),
which is fine for this query. In WMF production,
it can also be (rev_id, rev_user) (still fine), or
(rev_page, rev_id) (the index we're trying to avoid).
Mysteriously, the optimizer bug doesn't happen if
(rev_page, rev_id) is the primary key, so this still
behaves OK.

Bug: T104313
Change-Id: I15c68ba29309dca8dea274f19389d139a82784aa
2016-09-10 17:25:10 -07:00
Aaron Schulz
751c4d395f Make the page JOIN in RevDelRevisionList actually apply
The table was missing from the tables array

Change-Id: I613a2075e5d18210c8187587462b0f000769aec2
2016-09-09 23:21:32 -07:00
Andrew Otto
ee75aa9bee Add $visibilityChangeMap parameter to RevDelList doPostCommitUpdates
This paramater contains a map of id => old and new visibility bits.
This allows doPostCommitUpdates to do something useful with the
differences before and after a visibility change.  Specifically,
RevDelRevisionList doPostCommitUpdates passes this to the
ArticleRevisionVisibilitySet hook.

Bug: T137287
Change-Id: I1824f56d2aadc15671c442cf30dc1f9f01e821f8
2016-07-06 10:36:08 -04:00
Matthew Flaschen
77884372c0 RevDel: Fix ChangeTags for archived items
Bug: T128980
Change-Id: Ibc9ec57da16e1b71c9efa0d2c062f8d7965f59bc
2016-05-24 18:33:25 +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
mhutti1
112bec5c0e Show change tags on Special:RevisionDelete
RevDelRevisionItem.php has been modifed to display tags and
RevDelREvisionList.php has been modifed to request tag data
its database query.

Bug: T109041
Change-Id: Icaae790b7d21a6670c692d11e25c6db7b7325530
2015-12-15 20:24:36 +01:00
Aaron Schulz
e34f304b8e Made ArticleRevisionVisibilitySet include the revision IDs
Change-Id: I6a14c7b95041fdd44d7962af6dc139bcc29f7223
2015-02-04 03:25:32 +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
a4a44f7731 Changed some DatabaseBase type hints to IDatabase
Change-Id: I1158c71f110b140473f56d5cbe352da1f4513ad9
2014-12-09 01:05:22 -08:00
addshore
6b40bbe016 Fix phpcs issues in actions and revisiondelete dirs
Change-Id: I54c1e336b8c44ff8720ac38c8b2d68ede42af305
2014-08-12 22:53:14 +00:00
Reedy
be02da8e1a Split RevisionDelete.php to separate files
Change-Id: I244a66fe19c089df4bcabcf745536d99b2103bc4
2014-08-07 20:46:46 +00:00