Replace selectFields() methods with getQueryInfo()
authorBrad Jorsch <bjorsch@wikimedia.org>
Fri, 6 Oct 2017 17:03:55 +0000 (13:03 -0400)
committerTim Starling <tstarling@wikimedia.org>
Mon, 30 Oct 2017 22:57:33 +0000 (22:57 +0000)
commit3488f495321a01f808eebf87e90b6fb334817d81
tree8f04c0cfd88ce9a7a419d9980d884a84d0c011bc
parentdbcdb95209d38b920dbb8a52e784e3bddd7698a5
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
54 files changed:
RELEASE-NOTES-1.31
docs/hooks.txt
includes/Block.php
includes/FeedUtils.php
includes/Revision.php
includes/RevisionList.php
includes/Title.php
includes/actions/HistoryAction.php
includes/api/ApiComparePages.php
includes/api/ApiQueryAllDeletedRevisions.php
includes/api/ApiQueryAllImages.php
includes/api/ApiQueryAllRevisions.php
includes/api/ApiQueryDeletedRevisions.php
includes/api/ApiQueryFilearchive.php
includes/api/ApiQueryRevisions.php
includes/api/ApiQueryUsers.php
includes/changes/RecentChange.php
includes/changetags/ChangeTagsRevisionList.php
includes/diff/DifferenceEngine.php
includes/filerepo/LocalRepo.php
includes/filerepo/file/ArchivedFile.php
includes/filerepo/file/LocalFile.php
includes/filerepo/file/OldLocalFile.php
includes/jobqueue/jobs/CategoryMembershipChangeJob.php
includes/jobqueue/jobs/RecentChangesUpdateJob.php
includes/libs/objectcache/WANObjectCache.php
includes/logging/LogEntry.php
includes/page/PageArchive.php
includes/page/WikiPage.php
includes/revisiondelete/RevDelArchiveList.php
includes/revisiondelete/RevDelArchivedFileList.php
includes/revisiondelete/RevDelFileList.php
includes/revisiondelete/RevDelRevisionList.php
includes/specialpage/ChangesListSpecialPage.php
includes/specials/SpecialRecentchanges.php
includes/specials/SpecialRecentchangeslinked.php
includes/specials/SpecialWatchlist.php
includes/specials/pagers/ContribsPager.php
includes/specials/pagers/MergeHistoryPager.php
includes/user/PasswordReset.php
includes/user/User.php
includes/user/UserArray.php
maintenance/checkImages.php
maintenance/cleanupBlocks.php
maintenance/eraseArchivedFile.php
maintenance/populateRevisionLength.php
maintenance/populateRevisionSha1.php
maintenance/rebuildImages.php
maintenance/rebuildtextindex.php
maintenance/refreshFileHeaders.php
maintenance/refreshImageMetadata.php
maintenance/storage/testCompression.php
tests/phpunit/includes/RevisionIntegrationTest.php
tests/phpunit/includes/RevisionUnitTest.php