MediaWiki REL1_35
ApiQueryBlockInfoTrait.php File Reference

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. More...

Go to the source code of this file.

Functions

 addBlockInfoToQuery ( $showBlockInfo)
 Filters hidden users (where the user doesn't have the right to view them) Also adds relevant block information.
 
Methods required from ApiQueryBase
 addFields ( $fields)
 
 addJoinConds ( $conds)
 
 addTables ( $tables, $alias=null)
 
 addWhere ( $conds)
 
 getDB ()
 
 getPermissionManager ()
 
 getUser ()
 

Variables

trait ApiQueryBlockInfoTrait
 

Detailed Description

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. http://www.gnu.org/copyleft/gpl.html

Definition in file ApiQueryBlockInfoTrait.php.

Function Documentation

◆ addBlockInfoToQuery()

addBlockInfoToQuery (   $showBlockInfo)
private

Filters hidden users (where the user doesn't have the right to view them) Also adds relevant block information.

Parameters
bool$showBlockInfo
Returns
void

Definition at line 38 of file ApiQueryBlockInfoTrait.php.

References addFields(), addJoinConds(), addTables(), addWhere(), getDB(), getPermissionManager(), and getUser().

Referenced by ApiQueryAllUsers\execute(), ApiQueryUsers\execute(), and ApiQueryBase\showHiddenUsersAddBlockInfo().

◆ addFields()

addFields (   $fields)
abstractprotected
See also
ApiQueryBase::addFields
Parameters
array | string$fields

Referenced by HTMLForm\__construct(), addBlockInfoToQuery(), and ApiQueryBase\addFieldsIf().

◆ addJoinConds()

addJoinConds (   $conds)
abstractprotected
See also
ApiQueryBase::addJoinConds
Parameters
array$conds

Referenced by addBlockInfoToQuery().

◆ addTables()

addTables (   $tables,
  $alias = null 
)
abstractprotected
See also
ApiQueryBase::addTables
Parameters
string | array$tables
string | null$alias

Referenced by addBlockInfoToQuery().

◆ addWhere()

addWhere (   $conds)
abstractprotected
See also
ApiQueryBase::addWhere
Parameters
string | array$conds

Referenced by addBlockInfoToQuery(), ApiQueryBase\addWhereIf(), and ApiQueryBase\addWhereRange().

◆ getDB()

getDB ( )
abstractprotected
See also
ApiBase::getDB
Returns
IDatabase

Referenced by SiteStatsInit\__construct(), addBlockInfoToQuery(), ApiQueryBase\addTimestampWhereRange(), ApiQueryBase\addWhereRange(), ApiQuerySiteinfo\appendGeneralInfo(), ChangesListSpecialPage\buildQuery(), ImageBuilder\buildTable(), SpecialRecentChanges\checkLastModified(), NamespaceDupes\checkLinkTable(), Orphans\checkOrphans(), Orphans\checkSeparation(), CleanupUsersWithNoId\cleanup(), CleanupSpam\cleanupArticle(), CleanupInvalidDbKeys\cleanupTable(), RebuildTextIndex\clearSearchIndex(), CompressOld\compressOldPages(), CompressOld\compressPage(), CompressOld\compressWithConcat(), RebuildTextIndex\createMysqlTextIndex(), ConvertLinks\createTempTable(), BotPassword\delete(), RefreshLinks\deleteLinksFromNonexistent(), NukePage\deleteRevisions(), RefreshLinks\dfnCheckInterval(), AddRFCandPMIDInterwiki\doDBUpdates(), CleanupRevActorPage\doDBUpdates(), DeduplicateArchiveRevId\doDBUpdates(), FixDefaultJsonContentPages\doDBUpdates(), FixExtLinksProtocolRelative\doDBUpdates(), MigrateActors\doDBUpdates(), MigrateArchiveText\doDBUpdates(), MigrateImageCommentTemp\doDBUpdates(), PopulateArchiveRevId\doDBUpdates(), PopulateBacklinkNamespace\doDBUpdates(), PopulateExternallinksIndex60\doDBUpdates(), PopulateFilearchiveSha1\doDBUpdates(), PopulateImageSha1\doDBUpdates(), PopulateIpChanges\doDBUpdates(), PopulateLogSearch\doDBUpdates(), PopulateLogUsertext\doDBUpdates(), PopulateParentId\doDBUpdates(), PopulatePPSortKey\doDBUpdates(), PopulateRecentChangesSource\doDBUpdates(), PopulateRevisionLength\doDBUpdates(), PopulateRevisionSha1\doDBUpdates(), RefreshExternallinksIndex\doDBUpdates(), DeleteOldRevisions\doDelete(), LinksDeletionUpdate\doIncrementalUpdate(), PopulateRevisionLength\doLenUpdates(), ChangesListSpecialPage\doMainQuery(), SpecialRecentChanges\doMainQuery(), SiteStatsInit\doPlaceholderInit(), ReassignEdits\doReassignEdits(), RefreshLinks\doRefreshLinks(), PopulateRevisionSha1\doSha1LegacyUpdates(), PopulateRevisionSha1\doSha1Updates(), LinksUpdate\doUpdate(), UpdateSearchIndex\doUpdateSearchIndex(), RecountCategories\doWork(), RebuildTextIndex\dropMysqlTextIndex(), ChangesListSpecialPage\execute(), AttachLatest\execute(), BenchmarkDeleteTruncate\execute(), CategoryChangesAsRdf\execute(), CheckBadRedirects\execute(), CheckImages\execute(), CheckUsernames\execute(), CleanupBlocks\execute(), CleanupPreferences\execute(), CleanupRemovedModules\execute(), CleanupSpam\execute(), ClearInterwikiCache\execute(), CompareParserCache\execute(), ConvertLinks\execute(), ConvertUserOptions\execute(), DeleteArchivedFiles\execute(), DeleteArchivedRevisions\execute(), DeleteDefaultMessages\execute(), DeleteEqualMessages\execute(), DeleteOrphanedRevisions\execute(), DeleteSelfExternals\execute(), DeleteTag\execute(), DumpCategoriesAsRdf\execute(), DumpLinks\execute(), EraseArchivedFile\execute(), FixDoubleRedirects\execute(), FixTimestamps\execute(), FixUserRegistration\execute(), GenerateSitemap\execute(), GetReplicaServer\execute(), LoggedUpdateMaintenance\execute(), InitEditCount\execute(), InitSiteStats\execute(), InitUserPreference\execute(), MigrateUserGroup\execute(), MoveBatch\execute(), NukeNS\execute(), NukePage\execute(), PatchSql\execute(), PopulateCategory\execute(), PurgeChangedFiles\execute(), PurgeChangedPages\execute(), PurgeModuleDeps\execute(), RebuildAll\execute(), RebuildFileCache\execute(), ImageBuilder\execute(), RebuildTextIndex\execute(), RefreshFileHeaders\execute(), RefreshImageMetadata\execute(), RemoveInvalidEmails\execute(), RemoveUnusedAccounts\execute(), RenameDbPrefix\execute(), ResetPageRandom\execute(), ResetUserTokens\execute(), RunBatchedQuery\execute(), ShowSiteStats\execute(), OrphanStats\execute(), StorageTypeStats\execute(), TidyUpT39714\execute(), UpdateMediaWiki\execute(), UpdateArticleCount\execute(), UpdateCollation\execute(), UpdateDoubleWidthSearch\execute(), UpdateRestrictions\execute(), UpdateSpecialPages\execute(), UppercaseTitlesForUnicodeTransition\execute(), WrapOldPasswords\execute(), DumpUploads\fetchLocal(), Wikimedia\Rdbms\ResultWrapper\fetchObject(), Wikimedia\Rdbms\ResultWrapper\fetchRow(), DumpUploads\fetchUsed(), TitleCleanup\fileExists(), ApiBase\filterIDs(), RefreshLinks\fixRedirect(), ApiParse\formatCategoryLinks(), LinksDeletionUpdate\getAsJobSpecification(), FileBackendDBRepoWrapper\getBackendPaths(), LinksUpdate\getCategoryInsertions(), LinksUpdate\getExistingCategories(), LinksUpdate\getExistingExternals(), LinksUpdate\getExistingImages(), LinksUpdate\getExistingInterlangs(), LinksUpdate\getExistingInterwikis(), LinksUpdate\getExistingLinks(), LinksUpdate\getExistingProperties(), LinksUpdate\getExistingTemplates(), JobQueueDB\getMasterDB(), BotPassword\getPassword(), ApiQueryBase\getQueryBuilder(), ApiPageSet\getRedirectTargets(), JobQueueDB\getReplicaDB(), BenchmarkParse\getRevIdForTime(), RollbackEdits\getRollbackTitles(), NamespaceDupes\getTargetList(), ResourceLoaderWikiModule\getTitleInfo(), DeleteLocalPasswords\getUserBatches(), DeleteLocalPasswords\getUserDB(), FixDefaultJsonContentPages\handleRow(), BackupReader\handleUpload(), LinksUpdate\incrTableUpdate(), ApiPageSet\initFromPageIds(), ApiPageSet\initFromRevIDs(), ApiPageSet\initFromTitles(), BackupDumper\initProgress(), PopulateContentTables\initServices(), BotPassword\invalidateAllPasswordsForCentralId(), LinksUpdate\invalidateCategories(), LinksUpdate\invalidateImageDescriptions(), RemoveUnusedAccounts\isInactiveAccount(), CleanupImages\killRow(), PopulateContentTables\loadContentMap(), NamespaceDupes\mergePage(), MigrateComments\migrate(), MigrateActors\migrate(), MigrateActors\migrateLogSearch(), MigrateActors\migrateToTemp(), MigrateComments\migrateToTemp(), TitleCleanup\moveIllegalPage(), TitleCleanup\moveInconsistentPage(), NamespaceDupes\movePage(), BotPassword\newFromCentralId(), UserRightsProxy\newFromLookup(), CleanupImages\pokeFile(), RebuildTextIndex\populateSearchIndex(), PurgeChangedFiles\purgeFromLogType(), PurgeList\purgeNamespace(), Maintenance\purgeRedundantText(), RebuildRecentchanges\rebuildRecentChangesTablePass1(), RebuildRecentchanges\rebuildRecentChangesTablePass2(), RebuildRecentchanges\rebuildRecentChangesTablePass3(), RebuildRecentchanges\rebuildRecentChangesTablePass4(), SiteStatsInit\refresh(), RefreshLinks\refreshCategory(), BotPassword\removeAllPasswordsForCentralId(), CleanupWatchlist\removeWatch(), ApiPageSet\resolvePendingRedirects(), Wikimedia\Rdbms\ResultWrapper\rewind(), TableCleanup\runTable(), BotPassword\save(), EraseArchivedFile\scrubAllVersions(), ApiQueryBase\select(), MediaWikiShell\setupLegacy(), LinksUpdate\updateCategoryCounts(), LinksUpdate\updateLinksTimestamp(), PopulateRevisionSha1\upgradeLegacyArchiveRow(), PopulateRevisionSha1\upgradeRow(), and PopulateRevisionLength\upgradeRow().

◆ getPermissionManager()

getPermissionManager ( )
abstractprotected
See also
ApiBase::getPermissionManager
Returns
PermissionManager

Referenced by PermissionsError\__construct(), UploadForm\__construct(), EmailNotification\actuallyNotifyOnPageChange(), addBlockInfoToQuery(), MediaWiki\Auth\AuthManager\autoCreateUser(), TemplatesOnThisPageFormatter\buildEditLink(), ChangeTags\canActivateTag(), ChangeTags\canAddTagsAccompanyingChange(), ApiMain\canApiHighLimits(), SpecialBlock\canBlockEmail(), ChangeTags\canCreateTag(), ChangeTags\canDeactivateTag(), ChangeTags\canDeleteTag(), ChangeTags\canUpdateTags(), ApiMain\checkAsserts(), ApiMain\checkExecutePermissions(), SpecialUndelete\checkPermissions(), ApiBase\checkTitleUserPermissions(), ApiBase\checkUserRightsAny(), WatchAction\doUnwatch(), SpecialConfirmEmail\execute(), SpecialApiSandbox\execute(), SpecialLog\execute(), SpecialUndelete\execute(), UserrightsPage\execute(), UserrightsPage\fetchUser(), SpecialDoubleRedirects\formatResult(), ProtectedPagesPager\formatValue(), BlockListPager\formatValue(), ProtectLogFormatter\getActionLinks(), SpecialAutoblockList\getBlockListPager(), SpecialBlockList\getBlockListPager(), LogEventsList\getExcludeClause(), SpecialContributions\getForm(), Skin\getPageClasses(), SpecialEmailUser\getPermissionsError(), ActiveUsersPager\getQueryInfo(), BlockListPager\getQueryInfo(), UsersPager\getQueryInfo(), LogEventsList\getTypeMenuDesc(), ApiPageSet\initFromRevIDs(), ChangesList\insertRollback(), UploadFromUrl\isAllowed(), LocalIdLookup\lookupCentralIds(), LocalIdLookup\lookupUserNames(), ApiMain\modifyHelp(), User\newFatalPermissionDeniedStatus(), ImagePage\openShowImage(), SpecialBlock\processForm(), UserNamePrefixSearch\search(), ApiMain\setCacheMode(), SpecialTags\showActivateDeactivateForm(), LoginSignupSpecialPage\showCreateAccountLink(), SpecialTags\showDeleteTagForm(), SpecialPreferences\showResetForm(), SpecialPreferences\submitReset(), ApiQueryBase\userCanSeeRevDel(), LogEventsList\userCanViewLogType(), and SpecialWhatLinksHere\wlhLink().

◆ getUser()

getUser ( )
abstract
See also
IContextSource::getUser
Returns
User

Referenced by LogEventsList\__construct(), HistoryPager\__construct(), addBlockInfoToQuery(), ApiBase\addBlockInfoToStatus(), DifferenceEngine\addHeader(), SpecialRecentChanges\addWatchlistJoins(), ImageHistoryList\beginImageHistoryList(), Parser\braceSubstitution(), SkinTemplate\buildContentNavigationUrls(), Skin\buildNavUrls(), SkinTemplate\buildPersonalUrls(), buildProfileApiParam(), ApiMain\canApiHighLimits(), ApiMain\checkAsserts(), ApiMain\checkConditionalRequestHeaders(), ApiMain\checkExecutePermissions(), OutputPage\checkLastModified(), ApiQueryRevisionsBase\checkRevDel(), ApiBase\checkTitleUserPermissions(), ApiBase\checkUserRightsAny(), SpecialEditWatchlist\cleanupWatchlist(), ChangesListSpecialPage\considerActionsForDefaultSavedQuery(), SpecialWatchlist\countItems(), SpecialWatchlist\cutoffselector(), ImagePage\delete(), SpecialWatchlist\doHeader(), MovePageForm\doSubmit(), ApiBase\errorArrayToStatus(), SpecialContributions\execute(), MovePageForm\execute(), SpecialUpload\execute(), ChangesListSpecialPage\execute(), ApiParse\execute(), ApiQueryStashImageInfo\execute(), ApiValidatePassword\execute(), RequestContext\exportSession(), ApiQueryRevisionsBase\extractDeprecatedContent(), ApiQueryWatchlist\extractOutputData(), ApiQueryRecentChanges\extractRowInfo(), Article\fetchRevisionRecord(), SpecialNewpages\filterLinks(), DeletedContribsPager\formatRevisionRow(), HistoryPager\formatRow(), ContribsPager\formatRow(), UsersPager\formatRow(), ImageListPager\formatValue(), Skin\getCategories(), Skin\getCategoryLinks(), EditPage\getCheckboxesDefinitionForWatchlist(), WikiPage\getContributors(), ChangesListSpecialPage\getDefaultDays(), ChangesListSpecialPage\getDefaultLimit(), SpecialRecentChanges\getDefaultLimit(), Skin\getDefaultModules(), HistoryPager\getEndBody(), SpecialContributions\getForm(), SpecialBlock\getFormFields(), SpecialMute\getFormFields(), ResourceLoaderContext\getHash(), OutputPage\getHeadLinksArray(), HTMLForm\getHiddenFields(), OutputPage\getJSVars(), RequestContext\getLanguage(), OutputPage\getLastSeenUserTalkRevId(), EnhancedChangesList\getLineData(), DifferenceEngine\getMarkPatrolledLinkInfo(), PreferencesFormOOUI\getModifiedUser(), SpecialMute\getMuteList(), Skin\getNewtalks(), Skin\getPageClasses(), ApiParse\getParsedContent(), ActiveUsersPager\getQueryInfo(), ContribsPager\getQueryInfo(), DeletedContribsPager\getQueryInfo(), UsersPager\getQueryInfo(), ArchivedFile\getRawUser(), ArchivedFile\getRawUserText(), SpecialMypage\getRedirect(), SpecialMytalk\getRedirect(), DifferenceEngine\getRevisionHeader(), Parser\getRevisionUser(), OutputPage\getRlClientContext(), LogEventsList\getShowHideLinks(), Skin\getSiteNotice(), RequestContext\getSkin(), HistoryPager\getStartBody(), ImageHistoryList\getThumbForLine(), ImagePage\getThumbSizes(), LogEventsList\getTypeMenuDesc(), Skin\getUndeleteLink(), ApiOptions\getUserForUpdates(), ResourceLoaderContext\getUserObj(), SpecialUpload\getWatchCheck(), SpecialEditWatchlist\getWatchlist(), SpecialEditWatchlist\getWatchlistInfo(), ApiBase\getWatchlistUser(), OutputPage\headElement(), HistoryPager\historyLine(), ImageHistoryList\imageHistoryLine(), ChangesListSpecialPage\includeRcFiltersApp(), ApiPageSet\initFromRevIDs(), ChangesList\insertDateHeader(), ChangesList\insertDiffHist(), ChangesList\insertRollback(), MediaWiki\Revision\RevisionRecord\isReadyForInsertion(), ChangesListSpecialPage\isStructuredFilterUiEnabled(), Skin\lastModified(), SpecialSearch\load(), DifferenceEngine\loadNewText(), SpecialUpload\loadRequest(), DifferenceEngine\loadText(), ApiBase\logFeatureUsage(), ApiMain\logRequest(), SpecialBlock\maybeAlterFormDefaults(), SpecialMute\muteTarget(), RawAction\onView(), ParserOptions\optionsHash(), SpecialRecentChanges\optionsPanel(), SpecialRecentChanges\outputChangesList(), OutputPage\parserOptions(), SpecialNewpages\patrollable(), SpecialBlock\postText(), Skin\preloadExistence(), SpecialUpload\processUpload(), SpecialSearch\redirectOnExactMatch(), ChangesListSpecialPage\registerFilters(), SpecialRecentChanges\registerFilters(), DifferenceEngine\revisionDeleteLink(), HistoryPager\revLink(), ApiQueryRecentChanges\run(), ApiQueryWatchlist\run(), ApiQueryAllDeletedRevisions\run(), ApiQueryAllRevisions\run(), ApiQueryDeletedRevisions\run(), ApiQueryRevisions\run(), SpecialEditWatchlist\runWatchUnwatchCompleteHook(), SpecialSearch\saveNamespaces(), DifferenceEngine\setRevisions(), SpecialWatchlist\setTopText(), SpecialNewpages\setup(), SkinTemplate\setupTemplateContext(), ChangesList\showAsUnpatrolled(), DifferenceEngine\showDiffPage(), Skin\showEmailUser(), MovePageForm\showForm(), OutputPage\showPermissionsErrorPage(), SpecialUpload\showRecoverableUploadError(), SpecialUpload\showUploadWarning(), SpecialUpload\showViewDeletedLinks(), HTMLForm\tryAuthorizedSubmit(), SpecialMute\unmuteTarget(), SpecialEditWatchlist\unwatchTitles(), Article\updateRestrictions(), ImagePage\uploadLinksBox(), DifferenceEngine\userCanEdit(), OutputPage\userCanPreview(), ApiQueryBase\userCanSeeRevDel(), ApiBase\validateToken(), CategoryPage\view(), ImagePage\view(), and SpecialEditWatchlist\watchTitles().