MediaWiki REL1_34
router.php File Reference

Router for the php cli-server built-in webserver. More...

Go to the source code of this file.

Variables

 $acceptGzip = preg_match( '/\bgzip\b/', $_SERVER['HTTP_ACCEPT_ENCODING'] ?? '' )
 
 $content = file_get_contents( $file )
 
if(!is_readable( $file)) $ext = pathinfo( $file, PATHINFO_EXTENSION )
 
if(PHP_SAPI !='cli-server') if(!isset( $_SERVER['SCRIPT_FILENAME'])) $file = $_SERVER['SCRIPT_FILENAME']
 Item class for a filearchive table row.
 
 $lines = explode( "\n", file_get_contents( "includes/libs/mime/mime.types" ) )
 
if( $ext=='php') else
 
return true
 

Detailed Description

Router for the php cli-server built-in webserver.

https://www.php.net/manual/en/features.commandline.webserver.php

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 router.php.

Variable Documentation

◆ $acceptGzip

$acceptGzip = preg_match( '/\bgzip\b/', $_SERVER['HTTP_ACCEPT_ENCODING'] ?? '' )

Definition at line 81 of file router.php.

◆ $content

$content = file_get_contents( $file )

Definition at line 78 of file router.php.

Referenced by PoolWorkArticleView\__construct(), OutputPage\addContentOverride(), InfoAction\addTable(), ResourceLoaderModule\buildContent(), MediaWiki\Revision\RevisionStore\checkContent(), MediaWiki\Permissions\PermissionManager\checkUserConfigPermissions(), CleanupSpam\cleanupArticle(), MediaWiki\Storage\PageUpdater\computeEffectiveTags(), ConfirmEditHooks\confirmEditMerged(), SimpleCaptcha\confirmEditMerged(), Installer\createMainpage(), EditPage\displayPermissionsError(), EditPage\displayViewSourcePage(), WikiPage\doDeleteArticleBatched(), Article\doDeleteUpdates(), WikiPage\doDeleteUpdates(), Article\doEditContent(), WikiPage\doEditContent(), FileBackendStore\doGetFileContentsMulti(), SwiftFileBackend\doGetFileContentsMulti(), EditPage\doPreviewParse(), MediaWiki\Revision\RevisionStore\emulateMainSlot_1_29(), ApiEditPage\execute(), ApiStashEdit\execute(), BenchmarkJavaScriptMinifier\execute(), BenchmarkJSMinPlus\execute(), EditCLI\execute(), GetTextMaint\execute(), ImportSiteScripts\execute(), MakeTestEdits\execute(), DumpRev\execute(), ViewCLI\execute(), Parser\extensionSubstitution(), ApiQueryRevisionsBase\extractAllSlotInfo(), ApiQueryRevisionsBase\extractDeprecatedContent(), ApiQueryRevisionsBase\extractSlotInfo(), Parser\extractTagsAndParams(), SpecialNewpages\feedItemDesc(), ApiFeedContributions\feedItemDesc(), Xml\fieldset(), PopulateContentTables\fillMissingFields(), SpamBlacklistHooks\filterMergedContent(), WikiImporter\finishImportPage(), RefreshLinks\fixRedirect(), FormatMetadata\flattenArrayReal(), CoreTagHooks\gallery(), AutoloadGenerator\generatePHPAutoload(), BaseTemplate\getAfterPortlet(), BaseBlacklist\getArticleText(), ContentHandler\getAutoDeleteReason(), FindHooks\getBadHooksFromFile(), PreferencesFormOOUI\getBody(), MediaWiki\Widget\CheckMatrixWidget\getCellTag(), MediaWiki\Revision\RevisionRecord\getContent(), Scribunto_LuaTitleLibrary\getContent(), ResourceLoaderWikiModule\getContent(), MWHttpRequest\getContent(), MediaWiki\Storage\PageEditStash\getContentHash(), ResourceLoaderWikiModule\getContentObj(), EditPage\getContentObject(), Article\getContentObject(), ContentHandler\getContentText(), EditPage\getCurrentContent(), ContentHandler\getDataForSearchIndex(), WikiPage\getDeletionUpdates(), Article\getDeletionUpdates(), ApiComparePages\getDiffRevision(), Article\getEmptyPageParserOutput(), FileBackendStore\getFileContentsMulti(), ContentHandler\getForContent(), GadgetDefinitionNamespaceRepo\getGadget(), FindHooks\getHooksFromFile(), FindHooks\getHooksFromLocalDoc(), ChangeTagsLogItem\getHTML(), ChangeTagsRevisionItem\getHTML(), RevDelRevisionItem\getHTML(), BaseTemplate\getIndicators(), PageImages\Tests\Hooks\LinksUpdateHookHandlerTest\getLinksUpdate(), TimelessTemplate\getMainNavigation(), MessageCache\getMessageTextFromContent(), PNGMetadataExtractor\getMetadata(), EditPage\getOriginalContent(), ResourceLoaderFileModule\getPackageFiles(), PageImages\Hooks\LinksUpdateHookHandler\getPageImageCandidates(), ContentHandler\getPageViewLanguage(), MonoBookTemplate\getPortlet(), TimelessTemplate\getPortlet(), EditPage\getPreloadedContent(), EditPage\getPreviewText(), RawAction\getRawText(), MonoBookTemplate\getRenderedSidebar(), LogFormatter\getRestrictedElement(), Article\getRevisionRedirectTarget(), Revision\getRevisionText(), OutputPage\getRlClientContext(), MediaWiki\Storage\DerivedPageDataUpdater\getSecondaryDataUpdates(), BaseTemplate\getSidebar(), TimelessTemplate\getSidebarChunk(), DifferenceEngine\getSlotDiffRenderers(), MediaWiki\Revision\RenderedRevision\getSlotParserOutput(), MediaWiki\Revision\RenderedRevision\getSlotParserOutputUncached(), Article\getSubstituteContent(), ResourceLoaderFileModule\getTemplates(), ResourceLoaderWikiModule\getTitleInfo(), FileBackendGroup\guessMimeInternal(), DumpRenderer\handleRevision(), FixDefaultJsonContentPages\handleRow(), CoreTagHooks\html(), implodeTokens(), CheckStorage\importRevision(), MediaWiki\Storage\PageEditStash\incrStatsByContent(), CoreTagHooks\indicator(), EditPage\initialiseForm(), initText(), WikiPage\insertRedirect(), EditPage\internalAttemptSave(), WikiPage\isCountable(), MediaWiki\Storage\DerivedPageDataUpdater\isCountable(), Title\isValidMoveTarget(), MovePage\isValidMoveTarget(), JobRunner\loadBackoffs(), MessageCache\loadCachedMessagePageEntry(), Benchmarker\loadFile(), MessageCache\loadFromDB(), MediaWiki\Revision\RevisionStore\loadSlotContent(), SimpleCaptcha\loadText(), MediaWiki\Storage\PageUpdater\makeAutoSummary(), ResourceLoader\makeModuleResponse(), MediaWiki\Storage\PageUpdater\makeNewRevision(), LinkFilter\matchEntry(), MediaWiki\Storage\RevisionSlotsUpdate\modifyContent(), MediaWiki\Storage\RevisionSlotsUpdate\newFromContent(), Gadget\newFromDefinitionContent(), MediaWiki\Revision\RevisionStore\newMutableRevisionFromArray(), CoreTagHooks\nowiki(), ConfirmEditHooks\onAlternateEditPreview(), onContentGetParserOutput(), GadgetHooks\onEditFilterMergedContent(), SpamBlacklistHooks\onUploadVerifyUpload(), InfoAction\onView(), SpecialUploadStash\outputContents(), MediaWiki\Storage\PageEditStash\parseAndCache(), ApiStashEdit\parseAndStash(), RebuildTextIndex\populateSearchIndex(), CoreTagHooks\pre(), MediaWiki\Storage\DerivedPageDataUpdater\prepareContent(), Article\prepareContentForEdit(), WikiPage\prepareContentForEdit(), CompareParsers\processRevision(), PreprocessDump\processRevision(), MWHttpRequest\read(), CurlHttpRequest\readHeader(), ApiFormatXml\recXmlPrint(), Scribunto_LuaTitleLibrary\redirectTarget(), VectorTemplate\renderPortal(), VectorTemplate\renderPortals(), Parser\replaceTransparentTags(), DoubleRedirectJob\run(), BenchmarkParse\runParser(), EditPage\runPostMergeFilters(), TextContentHandler\serializeContent(), UnknownContentHandler\serializeContent(), WikitextContentHandler\serializeContent(), MediaWiki\Revision\MutableRevisionRecord\setContent(), MediaWiki\Revision\MutableRevisionSlots\setContent(), MediaWiki\Storage\PageUpdater\setContent(), ParserOutput\setIndicator(), EditPage\setPreloadedContent(), SpecialRecentChanges\setTopText(), ParserOptions\setupFakeRevision(), SimpleCaptcha\shouldCheck(), EditPage\showEditForm(), SpecialBookSources\showList(), SpecialUndelete\showRevision(), FSFileBackend\stageContentAsTempFile(), Parser\statelessFetchTemplate(), MediaWiki\Revision\RevisionStore\storeContentBlob(), LogFormatter\styleRestricedElement(), JobRunner\syncBackoffDeltas(), Xml\textarea(), EditPage\toEditContent(), EditPage\toEditText(), PageArchive\undeleteRevisions(), MessageCache\updateMessageOverride(), WikiPage\updateRevisionOn(), PopulateRevisionLength\upgradeRow(), ScribuntoHooks\validateScript(), wfThumbError(), OOUIHTMLForm\wrapForm(), XmlDumpWriter\writeRevision(), XmlDumpWriter\writeSlot(), and XmlDumpWriter\writeText().

◆ $ext

if (!is_readable($file)) $ext = pathinfo( $file, PATHINFO_EXTENSION )

Definition at line 48 of file router.php.

Referenced by ResourceLoaderImage\__construct(), ApiQuerySiteinfo\appendExtensions(), ApiQuerySiteinfo\appendFileExtensions(), PHPVersionCheck\checkExtensionExistence(), UploadBase\checkFileExtension(), UploadBase\checkFileExtensionList(), UploadFromChunks\concatenateChunks(), HTTPFileStreamer\contentTypeFromPath(), StreamFile\contentTypeFromPath(), Installer\dirIsExecutable(), LocalFileDeleteBatch\doDBInserts(), FSFileBackend\doGetLocalCopyMulti(), MemoryFileBackend\doGetLocalCopyMulti(), SwiftFileBackend\doGetLocalCopyMulti(), SpecialVersion\execute(), ApiImageRotate\execute(), LocalFileDeleteBatch\execute(), WebInstallerOptions\execute(), FileBackend\extensionFromPath(), ImportImages\findFiles(), File\getArchiveThumbUrl(), File\getArchiveUrl(), MediaWiki\Revision\MainSlotRoleHandler\getDefaultModel(), SpecialMediaStatistics\getExtensionList(), ApiFormatBase\getFilename(), CSSMin\getMimeType(), ResourceLoaderImage\getMimeType(), IEContentAnalyzer\getMimeTypeForVersion(), ApiBase\getModuleSourceInfo(), MWFileProps\getPropsFromPath(), FSFile\getPropsFromPath(), File\getStorageKey(), MediaHandler\getThumbType(), UploadBase\getTitle(), File\getUrl(), FileRepo\getZoneUrl(), ForeignAPIRepo\getZoneUrl(), File\getZoneUrl(), FileBackendGroup\guessMimeInternal(), MediaWiki\OutputHandler\handleGzip(), LocalRepo\hiddenFileHasKey(), ChannelFeed\httpHeaders(), FileRepo\nameForThumb(), MediaWiki\FileBackend\FSFile\TempFSFileFactory\newTempFSFile(), GadgetHooks\onContentHandlerDefaultModelFor(), ImagePage\openShowImage(), AutoloadGenerator\readDir(), GenerateSitemap\sitemapFilename(), WebInstallerOptions\submit(), and wfLoadExtensions().

◆ $file

ArchivedFile $file = $_SERVER['SCRIPT_FILENAME']

Item class for a filearchive table row.

Definition at line 42 of file router.php.

Referenced by DumpPipeOutput\__construct(), DumpBZip2Output\__construct(), DumpDBZip2Output\__construct(), DumpFileOutput\__construct(), DumpGZipOutput\__construct(), DumpLBZip2Output\__construct(), Dump7ZipOutput\__construct(), UnlistedSpecialPage\__construct(), IncludableSpecialPage\__construct(), ImageBuilder\addMissingImage(), OutputPage\addScriptFile(), HHVMMakeRepo\appendDir(), Wikimedia\Rdbms\DatabaseSqlite\attachDatabase(), AutoLoader\autoload(), OutputPage\buildCssLinksArray(), PageImages\Hooks\ParserFileProcessingHookHandlers\calcWidth(), GIFHandler\canAnimateThumbnail(), ApiDelete\canDeleteFile(), ImageHandler\canRender(), TiffHandler\canRender(), WebPHandler\canRender(), XCFHandler\canRender(), FindOrphanedFiles\checkFiles(), Sqlite\checkSqlSyntax(), UploadBase\checkXMLEncodingMissmatch(), ForeignResourceManager\cleanUp(), ImagePage\delete(), ApiDelete\deleteFile(), UploadBase\detectScript(), UploadBase\detectVirus(), Installer\dirIsExecutable(), SpecialRedirect\dispatchFile(), PopulateImageSha1\doDBUpdates(), SpecialNuke\doDelete(), PageImages\Hooks\ParserFileProcessingHookHandlers\doParserMakeImageParams(), FileOpPerfTest\doPerfTest(), RevDelFileList\doPostCommitUpdates(), UploadBase\doStashFile(), MovePageForm\doSubmit(), DjVuImage\dump(), DjVuImage\dumpForm(), MediaWiki\Logger\LegacyLogger\emit(), CSSMin\encodeImageAsDataURI(), SpecialUndelete\execute(), SpecialVersion\execute(), DeleteOldFancyCaptchas\execute(), GenerateFancyCaptchas\execute(), ApiImageRotate\execute(), ApiQueryFilearchive\execute(), ApiQueryStashImageInfo\execute(), BenchmarkCSSMin\execute(), BenchmarkJavaScriptMinifier\execute(), BenchmarkTidy\execute(), CheckImages\execute(), CleanupUploadStash\execute(), CreateCommonPasswordCdb\execute(), DeleteArchivedFiles\execute(), DeleteBatch\execute(), EraseArchivedFile\execute(), ExportSites\execute(), FindDeprecated\execute(), FindHooks\execute(), FindMissingFiles\execute(), HHVMMakeRepo\execute(), ImportImages\execute(), ImportSites\execute(), ImportTextFiles\execute(), InvalidateUserSesssions\execute(), GenerateNormalizerDataAr\execute(), GeneratePhpCharToUpperMappings\execute(), MigrateFileRepoLayout\execute(), MoveBatch\execute(), PatchSql\execute(), RefreshFileHeaders\execute(), RefreshImageMetadata\execute(), MwSql\execute(), UpdateMediaWiki\execute(), UpdateSearchIndex\execute(), ResourceLoaderFileModule\expandPackageFiles(), ResourceLoaderOOUIFileModule\extendSkinSpecific(), ExtensionProcessor\extractExtensionMessagesFiles(), ExtensionProcessor\extractMessagesDirs(), LocalisationUpdate\FileSystemFetcher\fetchDirectory(), LocalisationUpdate\GitHubFetcher\fetchDirectory(), LocalisationUpdate\HttpFetcher\fetchDirectory(), FormatMetadata\fetchExtendedMetadata(), Parser\fetchFileAndTitle(), PageImages\Hooks\LinksUpdateHookHandler\fetchFileMetadata(), Parser\fetchFileNoRegister(), FileRepo\fileExists(), FileRepo\fileExistsBatch(), ForeignAPIRepo\fileExistsBatch(), CoreParserFunctions\filepath(), DumpUploads\filterItem(), ImportImages\findAuxFile(), LocalRepo\findBySha1s(), RiffExtractor\findChunks(), RiffExtractor\findChunksFromFile(), Installer\findExtensionsByType(), RepoGroup\findFileFromKey(), ImportImages\findFiles(), FileRepo\findFiles(), LocalRepo\findFiles(), SpecialUndelete\formatFileRow(), SvgHandler\formatMetadata(), ImageListPager\formatValue(), GenerateCollationData\generateFirstChars(), SvgHandler\getAvailableLanguages(), ImageHistoryPseudoPager\getBody(), MWDebug\getCallerDescription(), ExifBitmapHandler\getCommonMetaArray(), SvgHandler\getCommonMetaArray(), FileContentHandler\getDataForSearchIndex(), PurgeChangedFiles\getDeletedPath(), UploadForm\getDescriptionSection(), PdfHandler\getDimensionInfo(), DjVuHandler\getDimensionInfo(), ImageHandler\getDimensionsString(), SpecialUpload\getDupeWarning(), WikiFilePage\getDuplicates(), MediaHandler\getEntireText(), SpecialUpload\getExistsWarning(), SpecialVersion\getExtAuthorsFileName(), FormatMetadata\getExtendedMetadataFromFile(), FormatMetadata\getExtendedMetadataFromHook(), SpecialVersion\getExtLicenseFileName(), SpecialUndelete\getFileComment(), ImportImages\getFileCommentFromSourceWiki(), WebInstallerDocument\getFileContents(), Scribunto_LuaTitleLibrary\getFileInfo(), SpecialUndelete\getFileLink(), WebRequest\getFileName(), MWDebug\getFilesIncluded(), WebRequest\getFileTempname(), SpecialUndelete\getFileUser(), ImportImages\getFileUserFromSourceWiki(), WikiFilePage\getForeignCategories(), MediaHandler\getGeneralLongDesc(), MediaHandler\getGeneralShortDesc(), SvgHandler\getImageSize(), WebPHandler\getImageSize(), ApiQueryImageInfo\getInfo(), DjVuImage\getInfo(), ImagePage\getLanguageForRendering(), GIFHandler\getLength(), PNGHandler\getLength(), MWExceptionHandler\getLogMessage(), MWExceptionHandler\getLogNormalMessage(), TimelessTemplate\getLogoImage(), ImageHandler\getLongDesc(), MediaHandler\getLongDesc(), SvgHandler\getLongDesc(), MediaWiki\Languages\LanguageNameUtils\getMessagesFileName(), CSSMin\getMimeType(), DjVuImage\getMultiPageInfo(), InstallerOverrides\getOverrides(), PageImages\getPageImage(), DjVuImage\getPageInfo(), SpecialFilepath\getRedirect(), ReplaceAll\getReplacements(), PageImages\Tests\Hooks\LinksUpdateHookHandlerTest\getRepoGroup(), ExifBitmapHandler\getRotation(), ResourceLoaderFileModule\getScriptURLsForDebug(), ImageHandler\getShortDesc(), MediaHandler\getShortDesc(), ResourceLoaderFileModule\getStyleURLsForDebug(), ImageHistoryList\getThumbForLine(), LocalFile\getThumbnails(), ForeignAPIFile\getThumbnails(), TransformationalImageHandler\getThumbnailSource(), DjVuHandler\getUnserializedMetadata(), Wikimedia\ParamValidator\SimpleCallbacks\getUploadedFile(), WebRequest\getUploadError(), MWExceptionHandler\handleError(), ConvertExtensionToRegistration\handleExtensionMessagesFiles(), MWExceptionHandler\handleFatalError(), ForeignResourceManager\handleTypeMultiFile(), ForeignResourceManager\handleTypeTar(), ThumbnailRenderJob\hitThumbUrl(), MediaWiki\Extensions\ParserFunctions\ParserFunctions\ifexistInternal(), ImageBuilder\imageCallback(), ImagePage\imageDupes(), ImageHistoryList\imageHistoryLine(), FancyCaptcha\imagePath(), ImportableUploadRevisionImporter\import(), SiteImporter\importFromFile(), BackupReader\importFromFile(), BackupReader\importFromStdin(), UploadStash\initFile(), MediaWiki\initializeArticle(), AutoloadGenerator\initMediaWikiDefault(), SvgHandler\isAnimatedImage(), MediaWiki\BadFileLookup\isBadFile(), DjVuHandler\isExpensiveToThumbnail(), TiffHandler\isExpensiveToThumbnail(), TransformationalImageHandler\isImageAreaOkForThumbnaling(), PageImages\Hooks\LinksUpdateHookHandler\isImageFree(), MovePage\isValidFileMove(), Title\isValidMoveTarget(), MovePage\isValidMoveTarget(), JobRunner\loadBackoffs(), Benchmarker\loadFile(), BackupDumper\loadPlugin(), Wikimedia\Services\ServiceContainer\loadWiringFiles(), RecompressTracked\logToFile(), Parser\makeImage(), Linker\makeImageLink(), DummyLinker\makeImageLink(), Linker\makeMediaLinkFile(), DummyLinker\makeMediaLinkFile(), SqliteInstaller\makeStubDBFile(), Linker\makeThumbLink2(), DummyLinker\makeThumbLink2(), Linker\makeThumbLinkObj(), DummyLinker\makeThumbLinkObj(), MovePage\moveFile(), TransformationalImageHandler\mustRender(), ImportStreamSource\newFromFile(), ArchivedFile\newFromRow(), LocalFile\newFromRow(), OldLocalFile\newFromRow(), ImportStreamSource\newFromURL(), ImageBuilder\oldimageCallback(), PageImages\Hooks\ParserFileProcessingHookHandlers\onParserMakeImageParams(), MultimediaViewerHooks\onThumbnailBeforeProduceHTML(), DumpUploads\outputItem(), SpecialUploadStash\outputLocalFile(), SpecialUploadStash\outputLocallyScaledThumb(), SpecialUploadStash\outputRemoteScaledThumb(), SpecialUploadStash\outputThumbFromStash(), SpecialUploadStash\parseKey(), ApiUpload\performUpload(), ExtensionRegistry\processAutoLoader(), PageImages\Hooks\ParserFileProcessingHookHandlers\processFile(), BackupDumper\processOptions(), DummyLinker\processResponsiveImages(), Linker\processResponsiveImages(), PruneFileCache\prune_directory(), FileRepo\publishBatch(), PurgeChangedFiles\purgeFromArchiveTable(), PurgeChangedFiles\purgeFromLogType(), LocalFile\purgeOldThumbnails(), LocalFile\purgeThumbList(), ForeignAPIFile\purgeThumbnails(), LocalFile\purgeThumbnails(), DjVuImage\readChunk(), AutoloadGenerator\readDir(), ResourceLoaderFileModule\readStyleFile(), ResourceLoaderFileModule\readStyleFiles(), CSSMin\remap(), CSSMin\remapOne(), MediaWiki\Widget\Search\FullSearchResultWidget\render(), Parser\renderImageGallery(), CheckStorage\restoreText(), BitmapHandler\rotate(), JpegHandler\rotate(), ApiQueryAllImages\run(), ApiQueryDuplicateFiles\run(), CreatePdfThumbnailsJob\run(), ThumbnailRenderJob\run(), ImagePage\setFile(), WikiFilePage\setFile(), OutputPage\setFileVersion(), ApiQueryPageImages\setResultValues(), Dump7ZipOutput\setup7zCommand(), SpecialUndelete\showFileConfirmationForm(), EditPage\showIntro(), SpecialUploadStash\showUploads(), SpecialUpload\showUploadWarning(), DjVuImage\skipChunk(), JobRunner\syncBackoffDeltas(), Language\transformUsingPairFile(), ApiUpload\transformWarnings(), UploadBase\tryStashFile(), wfBacktrace(), wfExtractThumbParams(), wfGenerateThumbnail(), wfGetPrecompiledData(), wfThumbIsStandard(), and XmlDumpWriter\writeUpload().

◆ $lines

$lines = explode( "\n", file_get_contents( "includes/libs/mime/mime.types" ) )

Definition at line 61 of file router.php.

Referenced by DiffOpAdd\__construct(), DiffOpDelete\__construct(), DiffFormatter\added(), TableDiffFormatter\added(), UnifiedDiffFormatter\added(), Skin\addToSidebarPlain(), SimpleCaptcha\buildRegexes(), SpamRegexBatch\buildRegexes(), SpamRegexBatch\buildSafeRegexes(), Diff\closing(), WordLevelDiff\closing(), DiffFormatter\context(), TableDiffFormatter\context(), PdfImage\convertDumpToArray(), DiffFormatter\deleted(), TableDiffFormatter\deleted(), UnifiedDiffFormatter\deleted(), Installer\envCheckShellLocale(), MediaWiki\Shell\Command\execute(), HTMLFormField\formatErrors(), SpamRegexBatch\getBadLines(), ClassCollector\getClasses(), UploadBase\getFilenamePrefixBlacklist(), TextExtracts\TextTruncator\getFirstSentences(), WikiTextStructure\getIgnoredHeadings(), Scribunto_LuaSandboxEngine\getLimitReportData(), MediaWiki\Rest\HeaderContainer\getRawHeaderLines(), FormatMetadata\getVisibleFields(), Parser\handleAllQuotes(), Parser\handleTables(), SyntaxHighlight\highlight(), SearchHighlighter\highlightSimple(), MediaWiki\BadFileLookup\isBadFile(), MediaWiki\Block\DatabaseBlock\isWhitelistedFromAutoblocks(), DiffFormatter\lines(), UnifiedDiffFormatter\lines(), MediaWikiGadgetsDefinitionRepo\listFromDefinition(), ConfirmEditHooks\onAlternateEditPreview(), Diff\orig(), WordLevelDiff\orig(), ForeignResourceManager\parseBasicYaml(), TitleBlacklist\parseBlacklist(), parseHighlightLines(), WikiTextStructure\parseSettingsInMessage(), SquidPurgeClient\processReadBuffer(), EnhancedChangesList\recentChangesBlockGroup(), SpamRegexBatch\regexesFromText(), ImageMap\render(), Parser\renderImageGallery(), DiffEngine\shiftBoundaries(), WordLevelDiff\split(), SpamRegexBatch\stripLines(), SpamBlacklistHooks\validate(), and MediaWiki\Logger\Monolog\MwlogHandler\write().

◆ else

foreach( $lines as $line) if (preg_match('#^text/#', $mime) else)
Initial value:
{
$mime = 'text/plain'

Definition at line 52 of file router.php.

◆ true

return true

Definition at line 94 of file router.php.

Referenced by MemcachedPeclBagOStuff\__construct(), MediaWiki\Tidy\RemexDriver\__construct(), DatabaseUpdater\addExtensionField(), DatabaseUpdater\addExtensionIndex(), DatabaseUpdater\addExtensionTable(), SkinTemplate\buildContentNavigationUrls(), Wikimedia\Rdbms\MySQLMasterPos\channelsMatch(), FileRepo\cleanupBatch(), FileBackendMultiWrite\consistencyCheck(), CommentStore\createComment(), FileRepo\deleteBatch(), MemcachedPeclBagOStuff\doDelete(), MemcachedPeclBagOStuff\doSet(), DatabaseUpdater\dropExtensionField(), DatabaseUpdater\dropExtensionIndex(), DatabaseUpdater\dropExtensionTable(), ApiEditPage\execute(), ApiFormatJson\execute(), ApiHelp\execute(), ApiQueryUsers\execute(), FixDoubleRedirects\execute(), HHVMMakeRepo\execute(), Parser\expandMagicVariable(), InputBox\extractOptions(), EtcdConfig\fetchAllFromEtcdServer(), FileOp\fileExists(), CoreParserFunctions\filepath(), FileOp\fileSha1(), ApiImageRotate\getAllowedParams(), ApiWatch\getAllowedParams(), MediaWiki\Extension\OATHAuth\Api\Module\ApiOATHValidate\getAllowedParams(), ApiEmailUser\getAllowedParams(), ApiMove\getAllowedParams(), ApiOptions\getAllowedParams(), ApiQueryAllPages\getAllowedParams(), ApiQueryBlocks\getAllowedParams(), ApiQueryDeletedrevs\getAllowedParams(), ApiQueryQueryPage\getAllowedParams(), ApiQueryRandom\getAllowedParams(), ApiQueryRecentChanges\getAllowedParams(), ApiQueryRevisions\getAllowedParams(), ApiQuerySearch\getAllowedParams(), ApiQueryUserContribs\getAllowedParams(), ApiQueryUsers\getAllowedParams(), ApiRevisionDelete\getAllowedParams(), ApiRollback\getAllowedParams(), ApiStashEdit\getAllowedParams(), ApiUndelete\getAllowedParams(), ApiUserrights\getAllowedParams(), ApiValidatePassword\getAllowedParams(), Wikimedia\Rdbms\DatabasePostgres\getAttributes(), Wikimedia\Rdbms\DatabaseSqlite\getAttributes(), OOUIHTMLForm\getButtons(), PostgresUpdater\getCoreUpdateList(), ParserCache\getDirty(), SpecialChangeContentModel\getFormFields(), DatabaseUpdater\getOldGlobalUpdates(), PostgresUpdater\getOldGlobalUpdates(), MWFileProps\getPropsFromPath(), ReplaceAll\getReplacements(), UploadForm\getSourceSection(), FileRepo\initDirectory(), MemcachedPeclBagOStuff\initializeClient(), Language\internalUserTimeAndDate(), MediaWiki\Block\DatabaseBlock\isHardblock(), User\isItemLoaded(), ApiAuthManagerHelper\loadAuthenticationRequests(), Skin\makeKnownUrlDetails(), JavaScriptMinifier\minify(), DatabaseUpdater\modifyExtensionField(), DatabaseUpdater\modifyExtensionTable(), MediaWiki\Session\UserInfo\newAnonymous(), HTMLCacheUpdateJob\newForBacklinks(), XmlTypeCheck\newFromFilename(), DuplicateJob\newFromJob(), ForeignAPIFile\newFromTitle(), ApiQuery\outputGeneralPageInfo(), ConverterRule\parse(), ConverterRule\parseFlags(), CategoryTreeHooks\parserFunction(), SpecialNuke\promptForm(), CaptchaTest\provideAttributeOverwritten(), CaptchaTest\provideAttributeSet(), CaptchaTest\provideCanSkipCaptchaMailconfirmed(), CaptchaTest\provideCanSkipCaptchaUserright(), ScribuntoHooksTest\provideContentHandlerDefaultModelFor(), PageImages\Tests\Hooks\LinksUpdateHookHandlerTest\provideDoLinksUpdate(), TextExtracts\Test\ExtractFormatterTest\provideExtracts(), CaptchaPreAuthenticationProviderTest\provideGetAuthenticationRequests(), PageImages\Tests\Hooks\LinksUpdateHookHandlerTest\provideIsFreeImage(), TitleBlacklistAuthenticationRequestTest\provideLoadFromSubmission(), CaptchaTest\provideNamespaceOverwrites(), CaptchaPreAuthenticationProviderTest\providePingLimiter(), Scribunto_LuaInterpreterTest\provideRoundtrip(), CaptchaTest\provideSimpleTriggersCaptcha(), CaptchaPreAuthenticationProviderTest\provideTestForAccountCreation(), CaptchaPreAuthenticationProviderTest\provideTestForAuthentication(), FileRepo\publishBatch(), FileRepo\quickPurgeBatch(), UploadFromUrl\reallyFetchFile(), CSSMin\remap(), DatabaseUpdater\renameExtensionIndex(), FileBackendMultiWrite\resyncFiles(), Message\setContext(), Cite\setHooks(), Profiler\setTemplated(), ReplaceAll\shouldContinueByDefault(), FileRepo\storeBatch(), MediaWiki\Storage\PageEditStash\storeStashValue(), WebInstallerName\submit(), SkinTemplate\tabAction(), Wikimedia\Rdbms\DatabaseSqlite\tableExists(), PageArchive\undeleteRevisions(), and MediaWiki\Session\UserInfo\verified().