From: Reedy Date: Sat, 19 Mar 2016 00:08:06 +0000 (+0000) Subject: Many more function case mismatches X-Git-Tag: 1.31.0-rc.0~7562^2 X-Git-Url: http://git.cyclocoop.org/?a=commitdiff_plain;h=b5656b6953888ceae07889d1e3b96c42d824990e;p=lhc%2Fweb%2Fwiklou.git Many more function case mismatches Change-Id: I5d3a5eb8adea1ecbf136415bb9fd7a162633ccca --- diff --git a/includes/Block.php b/includes/Block.php index b8e900d90a..93df004c5f 100644 --- a/includes/Block.php +++ b/includes/Block.php @@ -137,7 +137,7 @@ class Block { if ( $options['by'] ) { # Local user - $this->setBlocker( User::newFromID( $options['by'] ) ); + $this->setBlocker( User::newFromId( $options['by'] ) ); } else { # Foreign user $this->setBlocker( $options['byText'] ); @@ -568,7 +568,7 @@ class Block { if ( $this->forcedTargetID ) { $uid = $this->forcedTargetID; } else { - $uid = $this->target instanceof User ? $this->target->getID() : 0; + $uid = $this->target instanceof User ? $this->target->getId() : 0; } $a = [ diff --git a/includes/EditPage.php b/includes/EditPage.php index 520ca57cfe..b3bb07aa37 100644 --- a/includes/EditPage.php +++ b/includes/EditPage.php @@ -1521,7 +1521,7 @@ class EditPage { // is if an extension hook aborted from inside ArticleSave. // Render the status object into $this->hookError // FIXME this sucks, we should just use the Status object throughout - $this->hookError = '
' . $status->getWikitext() . + $this->hookError = '
' . $status->getWikiText() . '
'; return true; } diff --git a/includes/HistoryBlob.php b/includes/HistoryBlob.php index 87fc0122e7..8673125550 100644 --- a/includes/HistoryBlob.php +++ b/includes/HistoryBlob.php @@ -263,7 +263,7 @@ class HistoryBlobStub { if ( !isset( $parts[1] ) || $parts[1] == '' ) { return false; } - $row->old_text = ExternalStore::fetchFromUrl( $url ); + $row->old_text = ExternalStore::fetchFromURL( $url ); } diff --git a/includes/HtmlFormatter.php b/includes/HtmlFormatter.php index 5b8122dcca..5749775749 100644 --- a/includes/HtmlFormatter.php +++ b/includes/HtmlFormatter.php @@ -290,7 +290,7 @@ class HtmlFormatter { } $html = $this->doc->saveHTML(); - $html = $this->fixLibXml( $html ); + $html = $this->fixLibXML( $html ); if ( wfIsWindows() ) { // Cleanup for CRLF misprocessing of unknown origin on Windows. // If this error continues in the future, please track it down in the diff --git a/includes/HttpFunctions.php b/includes/HttpFunctions.php index f980a93d56..1a6e38292b 100644 --- a/includes/HttpFunctions.php +++ b/includes/HttpFunctions.php @@ -991,7 +991,7 @@ class PhpHttpRequest extends MWHttpRequest { ]; if ( $this->proxy ) { - $options['http']['proxy'] = $this->urlToTCP( $this->proxy ); + $options['http']['proxy'] = $this->urlToTcp( $this->proxy ); $options['http']['request_fulluri'] = true; } diff --git a/includes/Linker.php b/includes/Linker.php index 43df8397cf..4ba3a755a3 100644 --- a/includes/Linker.php +++ b/includes/Linker.php @@ -992,7 +992,7 @@ class Linker { */ public static function makeMediaLinkFile( Title $title, $file, $html = '' ) { if ( $file && $file->exists() ) { - $url = $file->getURL(); + $url = $file->getUrl(); $class = 'internal'; } else { $url = self::getUploadUrl( $title ); diff --git a/includes/MediaWiki.php b/includes/MediaWiki.php index 45a13853e4..edc5a95cb8 100644 --- a/includes/MediaWiki.php +++ b/includes/MediaWiki.php @@ -246,13 +246,13 @@ class MediaWiki { } elseif ( !$this->tryNormaliseRedirect( $title ) ) { // Prevent information leak via Special:MyPage et al (T109724) if ( $title->isSpecialPage() ) { - $specialPage = SpecialPageFactory::getPage( $title->getDBKey() ); + $specialPage = SpecialPageFactory::getPage( $title->getDBkey() ); if ( $specialPage instanceof RedirectSpecialPage ) { $specialPage->setContext( $this->context ); if ( $this->config->get( 'HideIdentifiableRedirects' ) && $specialPage->personallyIdentifiableTarget() ) { - list( , $subpage ) = SpecialPageFactory::resolveAlias( $title->getDBKey() ); + list( , $subpage ) = SpecialPageFactory::resolveAlias( $title->getDBkey() ); $target = $specialPage->getRedirect( $subpage ); // target can also be true. We let that case fall through to normal processing. if ( $target instanceof Title ) { diff --git a/includes/MovePage.php b/includes/MovePage.php index 321b7e3339..b9af755325 100644 --- a/includes/MovePage.php +++ b/includes/MovePage.php @@ -238,7 +238,7 @@ class MovePage { $file->load( File::READ_LATEST ); if ( $file->exists() ) { $status = $file->move( $this->newTitle ); - if ( !$status->isOk() ) { + if ( !$status->isOK() ) { return $status; } } diff --git a/includes/OutputPage.php b/includes/OutputPage.php index 6774072d11..6949f8b92c 100644 --- a/includes/OutputPage.php +++ b/includes/OutputPage.php @@ -3209,7 +3209,7 @@ class OutputPage extends ContextSource { 'wgMonthNames' => $lang->getMonthNamesArray(), 'wgMonthNamesShort' => $lang->getMonthAbbreviationsArray(), 'wgRelevantPageName' => $relevantTitle->getPrefixedDBkey(), - 'wgRelevantArticleId' => $relevantTitle->getArticleId(), + 'wgRelevantArticleId' => $relevantTitle->getArticleID(), ]; if ( $user->isLoggedIn() ) { diff --git a/includes/Title.php b/includes/Title.php index 0ac3e461a6..1a9ee39134 100644 --- a/includes/Title.php +++ b/includes/Title.php @@ -3570,9 +3570,9 @@ class Title implements LinkTarget { // If we are looking at a css/js user subpage, purge the action=raw. if ( $this->isJsSubpage() ) { - $urls[] = $this->getInternalUrl( 'action=raw&ctype=text/javascript' ); + $urls[] = $this->getInternalURL( 'action=raw&ctype=text/javascript' ); } elseif ( $this->isCssSubpage() ) { - $urls[] = $this->getInternalUrl( 'action=raw&ctype=text/css' ); + $urls[] = $this->getInternalURL( 'action=raw&ctype=text/css' ); } Hooks::run( 'TitleSquidURLs', [ $this, &$urls ] ); diff --git a/includes/WikiMap.php b/includes/WikiMap.php index dca0f32697..4534414c9f 100644 --- a/includes/WikiMap.php +++ b/includes/WikiMap.php @@ -221,10 +221,10 @@ class WikiReference { * @return string relative URL, without the server part. */ private function getLocalUrl( $page, $fragmentId = null ) { - $page = wfUrlEncode( str_replace( ' ', '_', $page ) ); + $page = wfUrlencode( str_replace( ' ', '_', $page ) ); if ( is_string( $fragmentId ) && $fragmentId !== '' ) { - $page .= '#' . wfUrlEncode( $fragmentId ); + $page .= '#' . wfUrlencode( $fragmentId ); } return str_replace( '$1', $page, $this->mPath ); diff --git a/includes/actions/InfoAction.php b/includes/actions/InfoAction.php index 4596e41379..f7c30b71af 100644 --- a/includes/actions/InfoAction.php +++ b/includes/actions/InfoAction.php @@ -820,7 +820,7 @@ class InfoAction extends FormlessAction { : $user->getUserPage(); $hiddenPrefs = $this->context->getConfig()->get( 'HiddenPrefs' ); - if ( $user->getID() == 0 ) { + if ( $user->getId() == 0 ) { $anon_ips[] = Linker::link( $page, htmlspecialchars( $user->getName() ) ); } elseif ( !in_array( 'realname', $hiddenPrefs ) && $user->getRealName() ) { $real_names[] = Linker::link( $page, htmlspecialchars( $user->getRealName() ) ); diff --git a/includes/cache/BacklinkCache.php b/includes/cache/BacklinkCache.php index a954d9fc85..361fe23236 100644 --- a/includes/cache/BacklinkCache.php +++ b/includes/cache/BacklinkCache.php @@ -279,7 +279,7 @@ class BacklinkCache { $conds = [ "{$prefix}_namespace" => $this->title->getNamespace(), "{$prefix}_title" => $this->title->getDBkey(), - $this->getDb()->makeList( [ + $this->getDB()->makeList( [ "{$prefix}_interwiki" => '', "{$prefix}_interwiki IS NULL", ], LIST_OR ), diff --git a/includes/diff/DifferenceEngine.php b/includes/diff/DifferenceEngine.php index 3b329da2d7..4fdacc544e 100644 --- a/includes/diff/DifferenceEngine.php +++ b/includes/diff/DifferenceEngine.php @@ -232,7 +232,7 @@ class DifferenceEngine extends ContextSource { ->params( $this->getLanguage()->listToText( $missing ) ) ->numParams( count( $missing ) ) ->parseAsBlock(); - $out->addHtml( $msg ); + $out->addHTML( $msg ); } public function showDiffPage( $diffOnly = false ) { @@ -715,7 +715,7 @@ class DifferenceEngine extends ContextSource { } // Short-circuit if ( $this->mOldRev === false || ( $this->mOldRev && $this->mNewRev - && $this->mOldRev->getID() == $this->mNewRev->getID() ) + && $this->mOldRev->getId() == $this->mNewRev->getId() ) ) { return ''; } @@ -1060,12 +1060,12 @@ class DifferenceEngine extends ContextSource { $title = $rev->getTitle(); $header = Linker::linkKnown( $title, $header, [], - [ 'oldid' => $rev->getID() ] ); + [ 'oldid' => $rev->getId() ] ); if ( $rev->userCan( Revision::DELETED_TEXT, $user ) ) { $editQuery = [ 'action' => 'edit' ]; if ( !$rev->isCurrent() ) { - $editQuery['oldid'] = $rev->getID(); + $editQuery['oldid'] = $rev->getId(); } $key = $title->quickUserCan( 'edit', $user ) ? 'editold' : 'viewsourceold'; diff --git a/includes/export/XmlDumpWriter.php b/includes/export/XmlDumpWriter.php index a3ec66cc0e..42168d7603 100644 --- a/includes/export/XmlDumpWriter.php +++ b/includes/export/XmlDumpWriter.php @@ -405,7 +405,7 @@ class XmlDumpWriter { " " . $comment . "\n" . " " . Xml::element( 'filename', null, $file->getName() ) . "\n" . $archiveName . - " " . Xml::element( 'src', null, $file->getCanonicalURL() ) . "\n" . + " " . Xml::element( 'src', null, $file->getCanonicalUrl() ) . "\n" . " " . Xml::element( 'size', null, $file->getSize() ) . "\n" . " " . Xml::element( 'sha1base36', null, $file->getSha1() ) . "\n" . " " . Xml::element( 'rel', null, $file->getRel() ) . "\n" . diff --git a/includes/filebackend/SwiftFileBackend.php b/includes/filebackend/SwiftFileBackend.php index 317346e4a1..1f2cb06181 100644 --- a/includes/filebackend/SwiftFileBackend.php +++ b/includes/filebackend/SwiftFileBackend.php @@ -802,7 +802,7 @@ class SwiftFileBackend extends FileBackendStore { protected function doDirectoryExists( $fullCont, $dir, array $params ) { $prefix = ( $dir == '' ) ? null : "{$dir}/"; $status = $this->objectListing( $fullCont, 'names', 1, null, $prefix ); - if ( $status->isOk() ) { + if ( $status->isOK() ) { return ( count( $status->value ) ) > 0; } @@ -854,7 +854,7 @@ class SwiftFileBackend extends FileBackendStore { // Non-recursive: only list dirs right under $dir if ( !empty( $params['topOnly'] ) ) { $status = $this->objectListing( $fullCont, 'names', $limit, $after, $prefix, '/' ); - if ( !$status->isOk() ) { + if ( !$status->isOK() ) { throw new FileBackendError( "Iterator page I/O error: {$status->getMessage()}" ); } $objects = $status->value; @@ -873,7 +873,7 @@ class SwiftFileBackend extends FileBackendStore { $lastDir = $getParentDir( $after ); // must be first page $status = $this->objectListing( $fullCont, 'names', $limit, $after, $prefix ); - if ( !$status->isOk() ) { + if ( !$status->isOK() ) { throw new FileBackendError( "Iterator page I/O error: {$status->getMessage()}" ); } @@ -949,7 +949,7 @@ class SwiftFileBackend extends FileBackendStore { } // Reformat this list into a list of (name, stat array or null) entries - if ( !$status->isOk() ) { + if ( !$status->isOK() ) { throw new FileBackendError( "Iterator page I/O error: {$status->getMessage()}" ); } diff --git a/includes/filerepo/file/File.php b/includes/filerepo/file/File.php index 433e39548e..7e007937c3 100644 --- a/includes/filerepo/file/File.php +++ b/includes/filerepo/file/File.php @@ -393,10 +393,10 @@ abstract class File implements IDBAccessObject { wfDebug( __METHOD__ . ': supposed to render ' . $this->getName() . ' (' . $this->getMimeType() . "), but can't!\n" ); - return $this->getURL(); # hm... return NULL? + return $this->getUrl(); # hm... return NULL? } } else { - return $this->getURL(); + return $this->getUrl(); } } diff --git a/includes/filerepo/file/LocalFile.php b/includes/filerepo/file/LocalFile.php index 29b5891a4b..609a8fb5af 100644 --- a/includes/filerepo/file/LocalFile.php +++ b/includes/filerepo/file/LocalFile.php @@ -2771,7 +2771,7 @@ class LocalFileMoveBatch { $this->newName = $this->file->repo->getNameFromTitle( $this->target ); $this->oldRel = $this->oldHash . $this->oldName; $this->newRel = $this->newHash . $this->newName; - $this->db = $file->getRepo()->getMasterDb(); + $this->db = $file->getRepo()->getMasterDB(); } /** diff --git a/includes/import/WikiImporter.php b/includes/import/WikiImporter.php index 98ae34f147..259d514870 100644 --- a/includes/import/WikiImporter.php +++ b/includes/import/WikiImporter.php @@ -693,7 +693,7 @@ class WikiImporter { if ( !isset( $logInfo['contributor']['username'] ) ) { $revision->setUsername( 'Unknown user' ); } else { - $revision->setUserName( $logInfo['contributor']['username'] ); + $revision->setUsername( $logInfo['contributor']['username'] ); } return $this->logItemCallback( $revision ); @@ -886,9 +886,9 @@ class WikiImporter { if ( isset( $revisionInfo['contributor']['ip'] ) ) { $revision->setUserIP( $revisionInfo['contributor']['ip'] ); } elseif ( isset( $revisionInfo['contributor']['username'] ) ) { - $revision->setUserName( $revisionInfo['contributor']['username'] ); + $revision->setUsername( $revisionInfo['contributor']['username'] ); } else { - $revision->setUserName( 'Unknown user' ); + $revision->setUsername( 'Unknown user' ); } $revision->setNoUpdates( $this->mNoUpdates ); @@ -992,7 +992,7 @@ class WikiImporter { $revision->setUserIP( $uploadInfo['contributor']['ip'] ); } if ( isset( $uploadInfo['contributor']['username'] ) ) { - $revision->setUserName( $uploadInfo['contributor']['username'] ); + $revision->setUsername( $uploadInfo['contributor']['username'] ); } $revision->setNoUpdates( $this->mNoUpdates ); diff --git a/includes/installer/CliInstaller.php b/includes/installer/CliInstaller.php index 7ecb71c4f3..661c3ec0b5 100644 --- a/includes/installer/CliInstaller.php +++ b/includes/installer/CliInstaller.php @@ -199,7 +199,7 @@ class CliInstaller extends Installer { } } - if ( !$status->isOk() ) { + if ( !$status->isOK() ) { echo "\n"; exit( 1 ); } diff --git a/includes/installer/DatabaseInstaller.php b/includes/installer/DatabaseInstaller.php index 152f33a42f..79bd961d47 100644 --- a/includes/installer/DatabaseInstaller.php +++ b/includes/installer/DatabaseInstaller.php @@ -202,7 +202,7 @@ abstract class DatabaseInstaller { $this->db->commit( __METHOD__ ); } // Resume normal operations - if ( $status->isOk() ) { + if ( $status->isOK() ) { $this->enableLB(); } diff --git a/includes/installer/MssqlInstaller.php b/includes/installer/MssqlInstaller.php index f70401b583..c6b8960263 100644 --- a/includes/installer/MssqlInstaller.php +++ b/includes/installer/MssqlInstaller.php @@ -634,7 +634,7 @@ class MssqlInstaller extends DatabaseInstaller { $status = parent::createTables(); // Do last-minute stuff like fulltext indexes (since they can't be inside a transaction) - if ( $status->isOk() ) { + if ( $status->isOK() ) { $searchindex = $this->db->tableName( 'searchindex' ); $schema = $this->db->addIdentifierQuotes( $this->getVar( 'wgDBmwschema' ) ); try { diff --git a/includes/installer/PostgresInstaller.php b/includes/installer/PostgresInstaller.php index 234c209afd..07284154dd 100644 --- a/includes/installer/PostgresInstaller.php +++ b/includes/installer/PostgresInstaller.php @@ -615,7 +615,7 @@ class PostgresInstaller extends DatabaseInstaller { $conn->commit( __METHOD__ ); } // Resume normal operations - if ( $status->isOk() ) { + if ( $status->isOK() ) { $this->enableLB(); } diff --git a/includes/installer/WebInstaller.php b/includes/installer/WebInstaller.php index 7d09fd72fe..4c4e6b7ed0 100644 --- a/includes/installer/WebInstaller.php +++ b/includes/installer/WebInstaller.php @@ -1058,7 +1058,7 @@ class WebInstaller extends Installer { if ( !$status->isGood() ) { $text = $status->getWikiText(); - if ( $status->isOk() ) { + if ( $status->isOK() ) { $box = $this->getWarningBox( $text ); } else { $box = $this->getErrorBox( $text ); @@ -1149,7 +1149,7 @@ class WebInstaller extends Installer { */ public function downloadLinkHook( $text, $attribs, $parser ) { $anchor = Html::rawElement( 'a', - [ 'href' => $this->getURL( [ 'localsettings' => 1 ] ) ], + [ 'href' => $this->getUrl( [ 'localsettings' => 1 ] ) ], wfMessage( 'config-download-localsettings' )->parse() ); diff --git a/includes/installer/WebInstallerOptions.php b/includes/installer/WebInstallerOptions.php index 938f77530f..0c01b6457b 100644 --- a/includes/installer/WebInstallerOptions.php +++ b/includes/installer/WebInstallerOptions.php @@ -136,13 +136,13 @@ class WebInstallerOptions extends WebInstallerPage { } $skinHtml .= $this->parent->getHelpBox( 'config-skins-help' ) . - $this->getFieldSetEnd(); + $this->getFieldsetEnd(); $this->addHTML( $skinHtml ); $extensions = $this->parent->findExtensions(); if ( $extensions ) { - $extHtml = $this->getFieldSetStart( 'config-extensions' ); + $extHtml = $this->getFieldsetStart( 'config-extensions' ); foreach ( $extensions as $ext ) { $extHtml .= $this->parent->getCheckBox( [ @@ -152,7 +152,7 @@ class WebInstallerOptions extends WebInstallerPage { } $extHtml .= $this->parent->getHelpBox( 'config-extensions-help' ) . - $this->getFieldSetEnd(); + $this->getFieldsetEnd(); $this->addHTML( $extHtml ); } @@ -167,7 +167,7 @@ class WebInstallerOptions extends WebInstallerPage { $uploadwrapperStyle = $this->getVar( 'wgEnableUploads' ) ? '' : 'display: none'; $this->addHTML( # Uploading - $this->getFieldSetStart( 'config-upload-settings' ) . + $this->getFieldsetStart( 'config-upload-settings' ) . $this->parent->getCheckBox( [ 'var' => 'wgEnableUploads', 'label' => 'config-upload-enable', @@ -195,7 +195,7 @@ class WebInstallerOptions extends WebInstallerPage { 'label' => 'config-instantcommons', 'help' => $this->parent->getHelpBox( 'config-instantcommons-help' ) ] ) . - $this->getFieldSetEnd() + $this->getFieldsetEnd() ); $caches = [ 'none' ]; @@ -219,7 +219,7 @@ class WebInstallerOptions extends WebInstallerPage { $hidden = ( $cacheval == 'memcached' ) ? '' : 'display: none'; $this->addHTML( # Advanced settings - $this->getFieldSetStart( 'config-advanced-settings' ) . + $this->getFieldsetStart( 'config-advanced-settings' ) . # Object cache settings // getRadioSet() builds a set of labeled radio buttons. // For grep: The following messages are used as the item labels: @@ -239,7 +239,7 @@ class WebInstallerOptions extends WebInstallerPage { 'help' => $this->parent->getHelpBox( 'config-memcached-help' ) ] ) . '
' . - $this->getFieldSetEnd() + $this->getFieldsetEnd() ); $this->endForm(); diff --git a/includes/jobqueue/JobSpecification.php b/includes/jobqueue/JobSpecification.php index 616c6d6ab9..d636dc6516 100644 --- a/includes/jobqueue/JobSpecification.php +++ b/includes/jobqueue/JobSpecification.php @@ -216,7 +216,7 @@ class JobSpecification implements IJobSpecification { 'opts' => $this->opts, 'title' => [ 'ns' => $this->title->getNamespace(), - 'key' => $this->title->getDbKey() + 'key' => $this->title->getDBkey() ] ]; } diff --git a/includes/logging/LogEventsList.php b/includes/logging/LogEventsList.php index c96c0dbf0c..039161aa9d 100644 --- a/includes/logging/LogEventsList.php +++ b/includes/logging/LogEventsList.php @@ -184,7 +184,7 @@ class LogEventsList extends ContextSource { $selector = $this->getTypeSelector(); $selector->setDefault( $queryType ); - return $selector->getHtml(); + return $selector->getHTML(); } /** diff --git a/includes/logging/LogPager.php b/includes/logging/LogPager.php index 11ae5d636a..8518c910ff 100644 --- a/includes/logging/LogPager.php +++ b/includes/logging/LogPager.php @@ -209,7 +209,7 @@ class LogPager extends ReverseChronologicalPager { $doUserRightsLogLike = false; if ( $this->types == [ 'rights' ] ) { - $parts = explode( $wgUserrightsInterwikiDelimiter, $title->getDBKey() ); + $parts = explode( $wgUserrightsInterwikiDelimiter, $title->getDBkey() ); if ( count( $parts ) == 2 ) { list( $name, $database ) = array_map( 'trim', $parts ); if ( strstr( $database, '*' ) ) { // Search for wildcard in database name diff --git a/includes/mail/EmailNotification.php b/includes/mail/EmailNotification.php index 4f8f6b3da1..fe24c34ac2 100644 --- a/includes/mail/EmailNotification.php +++ b/includes/mail/EmailNotification.php @@ -155,7 +155,7 @@ class EmailNotification { $title, [ 'editor' => $editor->getName(), - 'editorID' => $editor->getID(), + 'editorID' => $editor->getId(), 'timestamp' => $timestamp, 'summary' => $summary, 'minorEdit' => $minorEdit, @@ -232,7 +232,7 @@ class EmailNotification { if ( $watchingUser->getOption( 'enotifwatchlistpages' ) && ( !$minorEdit || $watchingUser->getOption( 'enotifminoredits' ) ) && $watchingUser->isEmailConfirmed() - && $watchingUser->getID() != $userTalkId + && $watchingUser->getId() != $userTalkId && !in_array( $watchingUser->getName(), $wgUsersNotifiedOnAllChanges ) && !( $wgBlockDisablesLogin && $watchingUser->isBlocked() ) ) { diff --git a/includes/media/MediaTransformOutput.php b/includes/media/MediaTransformOutput.php index 9a6547f2aa..9176b54666 100644 --- a/includes/media/MediaTransformOutput.php +++ b/includes/media/MediaTransformOutput.php @@ -395,7 +395,7 @@ class ThumbnailImage extends MediaTransformOutput { $query ); } elseif ( !empty( $options['file-link'] ) ) { - $linkAttribs = [ 'href' => $this->file->getURL() ]; + $linkAttribs = [ 'href' => $this->file->getUrl() ]; } else { $linkAttribs = false; if ( !empty( $options['title'] ) ) { diff --git a/includes/media/SVG.php b/includes/media/SVG.php index 7e77b25be3..2bb6d139f2 100644 --- a/includes/media/SVG.php +++ b/includes/media/SVG.php @@ -468,7 +468,7 @@ class SvgHandler extends ImageHandler { return ( $value > 0 ); } elseif ( $name == 'lang' ) { // Validate $code - if ( $value === '' || !Language::isValidBuiltinCode( $value ) ) { + if ( $value === '' || !Language::isValidBuiltInCode( $value ) ) { wfDebug( "Invalid user language code\n" ); return false; diff --git a/includes/media/SVGMetadataExtractor.php b/includes/media/SVGMetadataExtractor.php index f777230e39..62b5c2c01c 100644 --- a/includes/media/SVGMetadataExtractor.php +++ b/includes/media/SVGMetadataExtractor.php @@ -229,7 +229,7 @@ class SVGReader { } // @todo Find and store type of xml snippet. metadata['metadataType'] = "rdf" if ( method_exists( $this->reader, 'readInnerXML' ) ) { - $this->metadata[$metafield] = trim( $this->reader->readInnerXML() ); + $this->metadata[$metafield] = trim( $this->reader->readInnerXml() ); } else { throw new MWException( "The PHP XMLReader extension does not come " . "with readInnerXML() method. Your libxml is probably out of " . diff --git a/includes/media/TransformationalImageHandler.php b/includes/media/TransformationalImageHandler.php index f6483a15fb..f1f21616db 100644 --- a/includes/media/TransformationalImageHandler.php +++ b/includes/media/TransformationalImageHandler.php @@ -335,7 +335,7 @@ abstract class TransformationalImageHandler extends ImageHandler { 'height' => $scalerParams['clientHeight'] ]; - return new ThumbnailImage( $image, $image->getURL(), null, $params ); + return new ThumbnailImage( $image, $image->getUrl(), null, $params ); } /** diff --git a/includes/media/XCF.php b/includes/media/XCF.php index 526b45ef6a..6ac675e8fb 100644 --- a/includes/media/XCF.php +++ b/includes/media/XCF.php @@ -155,7 +155,7 @@ class XCFHandler extends BitmapHandler { * @return string */ public function getMetadata( $file, $filename ) { - $header = self::getXCFMetadata( $filename ); + $header = self::getXCFMetaData( $filename ); $metadata = []; if ( $header ) { // Try to be consistent with the names used by PNG files. diff --git a/includes/page/Article.php b/includes/page/Article.php index f6b490ae3d..b561407694 100644 --- a/includes/page/Article.php +++ b/includes/page/Article.php @@ -225,7 +225,7 @@ class Article implements Page { */ protected function getContentObject() { - if ( $this->mPage->getID() === 0 ) { + if ( $this->mPage->getId() === 0 ) { # If this is a MediaWiki:x message, then load the messages # and return the message value for x. if ( $this->getTitle()->getNamespace() == NS_MEDIAWIKI ) { @@ -282,7 +282,7 @@ class Article implements Page { $this->mRevision = Revision::newFromId( $oldid ); if ( $this->mRevision !== null ) { // Revision title doesn't match the page title given? - if ( $this->mPage->getID() != $this->mRevision->getPage() ) { + if ( $this->mPage->getId() != $this->mRevision->getPage() ) { $function = [ get_class( $this->mPage ), 'newFromID' ]; $this->mPage = call_user_func( $function, $this->mRevision->getPage() ); } @@ -768,7 +768,7 @@ class Article implements Page { ->params( $oldid ) ->numParams( 1 ) ->parseAsBlock(); - $this->getContext()->getOutput()->addHtml( $msg ); + $this->getContext()->getOutput()->addHTML( $msg ); return; } @@ -863,7 +863,7 @@ class Article implements Page { } } - if ( $this->mPage->getID() === 0 || $this->getOldID() ) { + if ( $this->mPage->getId() === 0 || $this->getOldID() ) { # Non-articles (special pages etc), and old revisions return [ 'index' => 'noindex', @@ -1445,7 +1445,7 @@ class Article implements Page { $outputPage->addSubtitle( "
" . $context->msg( $infomsg, $td ) ->rawParams( $userlinks ) - ->params( $revision->getID(), $tddate, $tdtime, $revision->getUserText() ) + ->params( $revision->getId(), $tddate, $tdtime, $revision->getUserText() ) ->rawParams( Linker::revComment( $revision, true, true ) ) ->parse() . "
" @@ -1961,7 +1961,7 @@ class Article implements Page { $cacheable = false; if ( HTMLFileCache::useFileCache( $this->getContext() ) ) { - $cacheable = $this->mPage->getID() + $cacheable = $this->mPage->getId() && !$this->mRedirectedFrom && !$this->getTitle()->isRedirect(); // Extension may have reason to disable file caching on some pages. if ( $cacheable ) { diff --git a/includes/page/ImagePage.php b/includes/page/ImagePage.php index e569762f43..106911c5fe 100644 --- a/includes/page/ImagePage.php +++ b/includes/page/ImagePage.php @@ -160,7 +160,7 @@ class ImagePage extends Article { } # No need to display noarticletext, we use our own message, output in openShowImage() - if ( $this->mPage->getID() ) { + if ( $this->mPage->getId() ) { # NS_FILE is in the user language, but this section (the actual wikitext) # should be in page content language $pageLang = $this->getTitle()->getPageViewLanguage(); @@ -299,7 +299,7 @@ class ImagePage extends Article { */ public function getContentObject() { $this->loadFile(); - if ( $this->mPage->getFile() && !$this->mPage->getFile()->isLocal() && 0 == $this->getID() ) { + if ( $this->mPage->getFile() && !$this->mPage->getFile()->isLocal() && 0 == $this->getId() ) { return null; } return parent::getContentObject(); @@ -565,7 +565,7 @@ EOT if ( is_null( $currentLanguage ) ) { $currentLanguage = $defaultLang; } - $out->addHtml( $this->doRenderLangOpt( $renderLangOptions, $currentLanguage, $defaultLang ) ); + $out->addHTML( $this->doRenderLangOpt( $renderLangOptions, $currentLanguage, $defaultLang ) ); } // Add cannot animate thumbnail warning @@ -592,7 +592,7 @@ EOT } } else { # Image does not exist - if ( !$this->getID() ) { + if ( !$this->getId() ) { # No article exists either # Show deletion log to be consistent with normal articles LogEventsList::showLogExtract( @@ -623,7 +623,7 @@ EOT // by Article::View(). $out->setRobotPolicy( 'noindex,nofollow' ); $out->wrapWikiMsg( "", $nofile ); - if ( !$this->getID() && $wgSend404Code ) { + if ( !$this->getId() && $wgSend404Code ) { // If there is no image, no shared image, and no description page, // output a 404, to be consistent with Article::showMissingArticle. $request->response()->statusHeader( 404 ); @@ -635,7 +635,7 @@ EOT /** * Make the text under the image to say what size preview * - * @param $params Array parameters for thumbnail + * @param $params array parameters for thumbnail * @param $sizeLinkBigImagePreview HTML for the current size * @return string HTML output */ @@ -704,7 +704,7 @@ EOT $descText = $this->mPage->getFile()->getDescriptionText( $this->getContext()->getLanguage() ); /* Add canonical to head if there is no local page for this shared file */ - if ( $descUrl && $this->mPage->getID() == 0 ) { + if ( $descUrl && $this->mPage->getId() == 0 ) { $out->setCanonicalUrl( $descUrl ); } diff --git a/includes/page/WikiPage.php b/includes/page/WikiPage.php index d81efa67e3..0e3512b5ae 100644 --- a/includes/page/WikiPage.php +++ b/includes/page/WikiPage.php @@ -2880,7 +2880,7 @@ class WikiPage implements Page, IDBAccessObject { $dbw->startAtomic( __METHOD__ ); $this->loadPageData( self::READ_LATEST ); - $id = $this->getID(); + $id = $this->getId(); // T98706: lock the page from various other updates but avoid using // WikiPage::READ_LOCKING as that will carry over the FOR UPDATE to // the revisions queries (which also JOIN on user). Only lock the page diff --git a/includes/parser/CoreParserFunctions.php b/includes/parser/CoreParserFunctions.php index 1cc0efccda..a55ddf3f66 100644 --- a/includes/parser/CoreParserFunctions.php +++ b/includes/parser/CoreParserFunctions.php @@ -634,7 +634,7 @@ class CoreParserFunctions { if ( is_null( $t ) ) { return ''; } - return wfEscapeWikiText( wfUrlEncode( str_replace( ' ', '_', $t->getRootText() ) ) ); + return wfEscapeWikiText( wfUrlencode( str_replace( ' ', '_', $t->getRootText() ) ) ); } public static function basepagename( $parser, $title = null ) { $t = Title::newFromText( $title ); @@ -648,7 +648,7 @@ class CoreParserFunctions { if ( is_null( $t ) ) { return ''; } - return wfEscapeWikiText( wfUrlEncode( str_replace( ' ', '_', $t->getBaseText() ) ) ); + return wfEscapeWikiText( wfUrlencode( str_replace( ' ', '_', $t->getBaseText() ) ) ); } public static function talkpagename( $parser, $title = null ) { $t = Title::newFromText( $title ); diff --git a/includes/parser/Parser.php b/includes/parser/Parser.php index d7ba266fea..5ee0c5a6a1 100644 --- a/includes/parser/Parser.php +++ b/includes/parser/Parser.php @@ -3000,7 +3000,7 @@ class Parser { $value = wfEscapeWikiText( $this->mTitle->getRootText() ); break; case 'rootpagenamee': - $value = wfEscapeWikiText( wfUrlEncode( str_replace( + $value = wfEscapeWikiText( wfUrlencode( str_replace( ' ', '_', $this->mTitle->getRootText() @@ -3010,7 +3010,7 @@ class Parser { $value = wfEscapeWikiText( $this->mTitle->getBaseText() ); break; case 'basepagenamee': - $value = wfEscapeWikiText( wfUrlEncode( str_replace( + $value = wfEscapeWikiText( wfUrlencode( str_replace( ' ', '_', $this->mTitle->getBaseText() diff --git a/includes/parser/ParserOptions.php b/includes/parser/ParserOptions.php index d2559f748b..729b9db8a9 100644 --- a/includes/parser/ParserOptions.php +++ b/includes/parser/ParserOptions.php @@ -860,7 +860,7 @@ class ParserOptions { 'page' => $title->getArticleID(), 'user_text' => $user->getName(), 'user' => $user->getId(), - 'parent_id' => $title->getLatestRevId(), + 'parent_id' => $title->getLatestRevID(), 'title' => $title, 'content' => $content ] ); diff --git a/includes/resourceloader/ResourceLoaderImage.php b/includes/resourceloader/ResourceLoaderImage.php index 43fd2dbb9c..f784d0346c 100644 --- a/includes/resourceloader/ResourceLoaderImage.php +++ b/includes/resourceloader/ResourceLoaderImage.php @@ -272,7 +272,7 @@ class ResourceLoaderImage { */ protected function variantize( $variantConf, ResourceLoaderContext $context ) { $dom = new DomDocument; - $dom->loadXml( file_get_contents( $this->getPath( $context ) ) ); + $dom->loadXML( file_get_contents( $this->getPath( $context ) ) ); $root = $dom->documentElement; $wrapper = $dom->createElement( 'g' ); while ( $root->firstChild ) { @@ -280,7 +280,7 @@ class ResourceLoaderImage { } $root->appendChild( $wrapper ); $wrapper->setAttribute( 'fill', $variantConf['color'] ); - return $dom->saveXml(); + return $dom->saveXML(); } /** @@ -295,7 +295,7 @@ class ResourceLoaderImage { */ protected function massageSvgPathdata( $svg ) { $dom = new DomDocument; - $dom->loadXml( $svg ); + $dom->loadXML( $svg ); foreach ( $dom->getElementsByTagName( 'path' ) as $node ) { $pathData = $node->getAttribute( 'd' ); // Make sure there is at least one space between numbers, and that leading zero is not omitted. @@ -305,7 +305,7 @@ class ResourceLoaderImage { $pathData = preg_replace( '/([ -])0(\d)/', '$1$2', $pathData ); $node->setAttribute( 'd', $pathData ); } - return $dom->saveXml(); + return $dom->saveXML(); } /** diff --git a/includes/session/BotPasswordSessionProvider.php b/includes/session/BotPasswordSessionProvider.php index bbdfdc3f26..5831b098fa 100644 --- a/includes/session/BotPasswordSessionProvider.php +++ b/includes/session/BotPasswordSessionProvider.php @@ -147,7 +147,7 @@ class BotPasswordSessionProvider extends ImmutableSessionProviderWithCookie { } $status = $bp->getRestrictions()->check( $request ); - if ( !$status->isOk() ) { + if ( !$status->isOK() ) { $this->logger->info( 'Session "{session}": Restrictions check failed', [ diff --git a/includes/specials/SpecialChangePassword.php b/includes/specials/SpecialChangePassword.php index 2d0d020cac..5adc315095 100644 --- a/includes/specials/SpecialChangePassword.php +++ b/includes/specials/SpecialChangePassword.php @@ -332,7 +332,7 @@ class SpecialChangePassword extends FormSpecialPage { $dbw->update( 'user', [ 'user_password_expires' => $dbw->timestampOrNull( $newExpire ) ], - [ 'user_id' => $user->getID() ], + [ 'user_id' => $user->getId() ], __METHOD__ ); } diff --git a/includes/specials/SpecialDeletedContributions.php b/includes/specials/SpecialDeletedContributions.php index b790fdf5a8..6256bbf21a 100644 --- a/includes/specials/SpecialDeletedContributions.php +++ b/includes/specials/SpecialDeletedContributions.php @@ -470,7 +470,7 @@ class DeletedContributionsPage extends SpecialPage { } $links = ''; $nt = $userObj->getUserPage(); - $id = $userObj->getID(); + $id = $userObj->getId(); $talk = $nt->getTalkPage(); if ( $talk ) { # Talk page link diff --git a/includes/specials/SpecialFileDuplicateSearch.php b/includes/specials/SpecialFileDuplicateSearch.php index 7f3eff7317..68960d3aad 100644 --- a/includes/specials/SpecialFileDuplicateSearch.php +++ b/includes/specials/SpecialFileDuplicateSearch.php @@ -122,7 +122,7 @@ class FileDuplicateSearchPage extends QueryPage { ], ]; $hiddenFields = [ - 'title' => $this->getPageTitle()->getPrefixedDBKey(), + 'title' => $this->getPageTitle()->getPrefixedDBkey(), ]; $htmlForm = HTMLForm::factory( 'inline', $formFields, $this->getContext() ); $htmlForm->addHiddenFields( $hiddenFields ); diff --git a/includes/specials/SpecialJavaScriptTest.php b/includes/specials/SpecialJavaScriptTest.php index e20382cba0..37dba53774 100644 --- a/includes/specials/SpecialJavaScriptTest.php +++ b/includes/specials/SpecialJavaScriptTest.php @@ -168,12 +168,12 @@ class SpecialJavaScriptTest extends SpecialPage { HTML; - $out->addHtml( $this->getSummaryHtml() . $baseHtml ); + $out->addHTML( $this->getSummaryHtml() . $baseHtml ); // The testrunner configures QUnit and essentially depends on it. However, test suites // are reusable in environments that preload QUnit (or a compatibility interface to // another framework). Therefore we have to load it ourselves. - $out->addHtml( ResourceLoader::makeInlineScript( + $out->addHTML( ResourceLoader::makeInlineScript( Xml::encodeJsCall( 'mw.loader.using', [ [ 'jquery.qunit', 'jquery.qunit.completenessTest' ], new XmlJsCode( diff --git a/includes/specials/SpecialListfiles.php b/includes/specials/SpecialListfiles.php index 16471feb71..968af1e544 100644 --- a/includes/specials/SpecialListfiles.php +++ b/includes/specials/SpecialListfiles.php @@ -482,7 +482,7 @@ class ImageListPager extends TablePager { htmlspecialchars( $filePage->getText() ) ); $download = Xml::element( 'a', - [ 'href' => wfLocalFile( $filePage )->getURL() ], + [ 'href' => wfLocalFile( $filePage )->getUrl() ], $imgfile ); $download = $this->msg( 'parentheses' )->rawParams( $download )->escaped(); diff --git a/includes/specials/SpecialListusers.php b/includes/specials/SpecialListusers.php index da31f009a2..7eb3757a3d 100644 --- a/includes/specials/SpecialListusers.php +++ b/includes/specials/SpecialListusers.php @@ -388,7 +388,7 @@ class UsersPager extends AlphabeticPager { * @return string */ protected static function buildGroupLink( $group, $username ) { - return User::makeGroupLinkHtml( + return User::makeGroupLinkHTML( $group, User::getGroupMember( $group, $username ) ); diff --git a/includes/specials/SpecialMediaStatistics.php b/includes/specials/SpecialMediaStatistics.php index ed12e047c7..8ba90a6a6a 100644 --- a/includes/specials/SpecialMediaStatistics.php +++ b/includes/specials/SpecialMediaStatistics.php @@ -154,7 +154,7 @@ class MediaStatisticsPage extends QueryPage { * Output closing */ protected function outputTableEnd() { - $this->getOutput()->addHtml( Html::closeElement( 'table' ) ); + $this->getOutput()->addHTML( Html::closeElement( 'table' ) ); $this->getOutput()->addWikiText( $this->msg( 'mediastatistics-bytespertype' ) ->numParams( $this->totalPerType ) diff --git a/includes/specials/SpecialNewimages.php b/includes/specials/SpecialNewimages.php index 9e28908204..629a50875b 100644 --- a/includes/specials/SpecialNewimages.php +++ b/includes/specials/SpecialNewimages.php @@ -196,7 +196,7 @@ class NewFilesPager extends ReverseChronologicalPager { $user = User::newFromId( $row->img_user ); $title = Title::makeTitle( NS_FILE, $name ); - $ul = Linker::link( $user->getUserpage(), $user->getName() ); + $ul = Linker::link( $user->getUserPage(), $user->getName() ); $time = $this->getLanguage()->userTimeAndDate( $row->img_timestamp, $this->getUser() ); $this->gallery->add( diff --git a/includes/specials/SpecialNewpages.php b/includes/specials/SpecialNewpages.php index f1b231d546..ab29d13794 100644 --- a/includes/specials/SpecialNewpages.php +++ b/includes/specials/SpecialNewpages.php @@ -265,11 +265,11 @@ class SpecialNewpages extends IncludableSpecialPage { ); $htmlForm->setMethod( 'get' ); - $out->addHtml( Xml::fieldset( $this->msg( 'newpages' )->text() ) ); + $out->addHTML( Xml::fieldset( $this->msg( 'newpages' )->text() ) ); $htmlForm->show(); - $out->addHtml( + $out->addHTML( Html::rawElement( 'div', null, diff --git a/includes/specials/SpecialPasswordReset.php b/includes/specials/SpecialPasswordReset.php index 44f31a53e6..c3ed91feca 100644 --- a/includes/specials/SpecialPasswordReset.php +++ b/includes/specials/SpecialPasswordReset.php @@ -218,7 +218,7 @@ class SpecialPasswordReset extends FormSpecialPage { $firstUser = $users[0]; - if ( !$firstUser instanceof User || !$firstUser->getID() ) { + if ( !$firstUser instanceof User || !$firstUser->getId() ) { // Don't parse username as wikitext (bug 65501) return [ [ 'nosuchuser', wfEscapeWikiText( $data['Username'] ) ] ]; } diff --git a/includes/specials/SpecialRandomInCategory.php b/includes/specials/SpecialRandomInCategory.php index d4c1004ab5..efb1748913 100644 --- a/includes/specials/SpecialRandomInCategory.php +++ b/includes/specials/SpecialRandomInCategory.php @@ -206,7 +206,7 @@ class SpecialRandomInCategory extends FormSpecialPage { 'tables' => [ 'categorylinks', 'page' ], 'fields' => [ 'page_title', 'page_namespace' ], 'conds' => array_merge( [ - 'cl_to' => $this->category->getDBKey(), + 'cl_to' => $this->category->getDBkey(), ], $this->extra ), 'options' => [ 'ORDER BY' => 'cl_timestamp ' . $dir, diff --git a/includes/specials/SpecialRecentchanges.php b/includes/specials/SpecialRecentchanges.php index 7be95fa842..de773800ac 100644 --- a/includes/specials/SpecialRecentchanges.php +++ b/includes/specials/SpecialRecentchanges.php @@ -366,7 +366,7 @@ class SpecialRecentChanges extends ChangesListSpecialPage { $rclistOutput .= $list->endRecentChangesList(); if ( $rows->numRows() === 0 ) { - $this->getOutput()->addHtml( + $this->getOutput()->addHTML( '
' . $this->msg( 'recentchanges-noresult' )->parse() . '
' @@ -399,7 +399,7 @@ class SpecialRecentChanges extends ChangesListSpecialPage { $extraOpts = $this->getExtraOptions( $opts ); $extraOptsCount = count( $extraOpts ); $count = 0; - $submit = ' ' . Xml::submitbutton( $this->msg( 'recentchanges-submit' )->text() ); + $submit = ' ' . Xml::submitButton( $this->msg( 'recentchanges-submit' )->text() ); $out = Xml::openElement( 'table', [ 'class' => 'mw-recentchanges-table' ] ); foreach ( $extraOpts as $name => $optionRow ) { diff --git a/includes/specials/SpecialSearch.php b/includes/specials/SpecialSearch.php index 9bb5d9592e..dfab8d437c 100644 --- a/includes/specials/SpecialSearch.php +++ b/includes/specials/SpecialSearch.php @@ -299,7 +299,7 @@ class SpecialSearch extends SpecialPage { } // start rendering the page - $out->addHtml( + $out->addHTML( Xml::openElement( 'form', [ @@ -323,7 +323,7 @@ class SpecialSearch extends SpecialPage { $num = $titleMatchesNum + $textMatchesNum; $totalRes = $numTitleMatches + $numTextMatches; - $out->addHtml( + $out->addHTML( # This is an awful awful ID name. It's not a table, but we # named it poorly from when this was a table so now we're # stuck with it @@ -342,7 +342,7 @@ class SpecialSearch extends SpecialPage { return; } - $out->addHtml( "
" ); + $out->addHTML( "
" ); // prev/next links $prevnext = null; @@ -429,7 +429,7 @@ class SpecialSearch extends SpecialPage { $out->addHTML( "

{$prevnext}

\n" ); } - $out->addHtml( "
" ); + $out->addHTML( "
" ); Hooks::run( 'SpecialSearchResultsAppend', [ $this, $out, $term ] ); @@ -551,7 +551,7 @@ class SpecialSearch extends SpecialPage { ) { // invalid title // preserve the paragraph for margins etc... - $this->getOutput()->addHtml( '

' ); + $this->getOutput()->addHTML( '

' ); return; } @@ -580,7 +580,7 @@ class SpecialSearch extends SpecialPage { $this->getOutput()->wrapWikiMsg( "

\n$1

", $params ); } else { // preserve the paragraph for margins etc... - $this->getOutput()->addHtml( '

' ); + $this->getOutput()->addHTML( '

' ); } } diff --git a/includes/specials/SpecialTags.php b/includes/specials/SpecialTags.php index 2ff21228c6..e79fd6ee0f 100644 --- a/includes/specials/SpecialTags.php +++ b/includes/specials/SpecialTags.php @@ -297,7 +297,7 @@ class SpecialTags extends SpecialPage { $headerText = $this->msg( 'tags-create-warnings-above', $tag, count( $status->getWarningsArray() ) )->parseAsBlock() . - $out->parse( $status->getWikitext() ) . + $out->parse( $status->getWikiText() ) . $this->msg( 'tags-create-warnings-below' )->parseAsBlock(); $subform = new HTMLForm( $fields, $this->getContext() ); @@ -311,7 +311,7 @@ class SpecialTags extends SpecialPage { $out->addBacklinkSubtitle( $this->getPageTitle() ); return true; } else { - $out->addWikiText( "
\n" . $status->getWikitext() . + $out->addWikiText( "
\n" . $status->getWikiText() . "\n
" ); return false; } diff --git a/includes/specials/SpecialUnblock.php b/includes/specials/SpecialUnblock.php index d14e02f573..cc7a09146f 100644 --- a/includes/specials/SpecialUnblock.php +++ b/includes/specials/SpecialUnblock.php @@ -218,7 +218,7 @@ class SpecialUnblock extends SpecialPage { if ( $block->mHideName ) { # Something is deeply FUBAR if this is not a User object, but who knows? $id = $block->getTarget() instanceof User - ? $block->getTarget()->getID() + ? $block->getTarget()->getId() : User::idFromName( $block->getTarget() ); RevisionDeleteUser::unsuppressUserName( $block->getTarget(), $id ); @@ -229,7 +229,7 @@ class SpecialUnblock extends SpecialPage { $page = Title::makeTitle( NS_USER, '#' . $block->getId() ); } else { $page = $block->getTarget() instanceof User - ? $block->getTarget()->getUserpage() + ? $block->getTarget()->getUserPage() : Title::makeTitle( NS_USER, $block->getTarget() ); } diff --git a/includes/specials/SpecialUploadStash.php b/includes/specials/SpecialUploadStash.php index 199eebd64f..b20844bb93 100644 --- a/includes/specials/SpecialUploadStash.php +++ b/includes/specials/SpecialUploadStash.php @@ -398,11 +398,11 @@ class SpecialUploadStash extends UnlistedSpecialPage { $this->getPageTitle( "file/$file" )->getLocalURL() ], $file ) ); } - $this->getOutput()->addHtml( Html::rawElement( 'ul', [], $fileListItemsHtml ) ); + $this->getOutput()->addHTML( Html::rawElement( 'ul', [], $fileListItemsHtml ) ); $form->displayForm( $formResult ); - $this->getOutput()->addHtml( Html::rawElement( 'p', [], $refreshHtml ) ); + $this->getOutput()->addHTML( Html::rawElement( 'p', [], $refreshHtml ) ); } else { - $this->getOutput()->addHtml( Html::rawElement( 'p', [], + $this->getOutput()->addHTML( Html::rawElement( 'p', [], Html::element( 'span', [], $this->msg( 'uploadstash-nofiles' )->text() ) . ' ' . $refreshHtml diff --git a/includes/specials/SpecialUserlogin.php b/includes/specials/SpecialUserlogin.php index 1ed8407019..49d3345802 100644 --- a/includes/specials/SpecialUserlogin.php +++ b/includes/specials/SpecialUserlogin.php @@ -792,7 +792,7 @@ class LoginForm extends SpecialPage { } $isAutoCreated = false; - if ( $u->getID() == 0 ) { + if ( $u->getId() == 0 ) { $status = $this->attemptAutoCreate( $u ); if ( $status !== self::SUCCESS ) { return $status; diff --git a/includes/specials/SpecialUserrights.php b/includes/specials/SpecialUserrights.php index 29261f325a..740f2f7e36 100644 --- a/includes/specials/SpecialUserrights.php +++ b/includes/specials/SpecialUserrights.php @@ -119,7 +119,7 @@ class UserrightsPage extends SpecialPage { } $fetchedStatus = $this->fetchUser( $this->mTarget ); - if ( $fetchedStatus->isOk() ) { + if ( $fetchedStatus->isOK() ) { $this->mFetchedUser = $fetchedStatus->value; if ( $this->mFetchedUser instanceof User ) { // Set the 'relevant user' in the skin, so it displays links like Contributions, @@ -627,7 +627,7 @@ class UserrightsPage extends SpecialPage { * @return string */ private static function buildGroupLink( $group ) { - return User::makeGroupLinkHtml( $group, User::getGroupName( $group ) ); + return User::makeGroupLinkHTML( $group, User::getGroupName( $group ) ); } /** @@ -637,7 +637,7 @@ class UserrightsPage extends SpecialPage { * @return string */ private static function buildGroupMemberLink( $group ) { - return User::makeGroupLinkHtml( $group, User::getGroupMember( $group ) ); + return User::makeGroupLinkHTML( $group, User::getGroupMember( $group ) ); } /** diff --git a/includes/specials/SpecialVersion.php b/includes/specials/SpecialVersion.php index 5b452a682a..ce5cbeb56c 100644 --- a/includes/specials/SpecialVersion.php +++ b/includes/specials/SpecialVersion.php @@ -132,7 +132,7 @@ class SpecialVersion extends SpecialPage { $this->softwareInformation() . $this->getEntryPointInfo() ); - $out->addHtml( + $out->addHTML( $this->getSkinCredits() . $this->getExtensionCredits() . $this->getExternalLibraries() . diff --git a/includes/specials/SpecialWhatlinkshere.php b/includes/specials/SpecialWhatlinkshere.php index b1c3f16915..baa55f098a 100644 --- a/includes/specials/SpecialWhatlinkshere.php +++ b/includes/specials/SpecialWhatlinkshere.php @@ -160,7 +160,7 @@ class SpecialWhatLinksHere extends IncludableSpecialPage { ]; $on['rd_namespace'] = $target->getNamespace(); // Inner LIMIT is 2X in case of stale backlinks with wrong namespaces - $subQuery = $dbr->selectSqlText( + $subQuery = $dbr->selectSQLText( [ $table, 'redirect', 'page' ], [ $fromCol, 'rd_from' ], $conds[$table], diff --git a/includes/upload/UploadFromChunks.php b/includes/upload/UploadFromChunks.php index ebb4ebb9e8..0323b685b8 100644 --- a/includes/upload/UploadFromChunks.php +++ b/includes/upload/UploadFromChunks.php @@ -142,7 +142,7 @@ class UploadFromChunks extends UploadFromFile { $tStart = microtime( true ); $status = $this->repo->concatenate( $fileList, $tmpPath, FileRepo::DELETE_SOURCE ); $tAmount = microtime( true ) - $tStart; - if ( !$status->isOk() ) { + if ( !$status->isOK() ) { return $status; } @@ -234,7 +234,7 @@ class UploadFromChunks extends UploadFromFile { wfDebug( __METHOD__ . " update chunk status for {$this->mFileKey} offset:" . $this->getOffset() . ' inx:' . $this->getChunkIndex() . "\n" ); - $dbw = $this->repo->getMasterDb(); + $dbw = $this->repo->getMasterDB(); // Use a quick transaction since we will upload the full temp file into shared // storage, which takes time for large files. We don't want to hold locks then. $dbw->update( @@ -256,7 +256,7 @@ class UploadFromChunks extends UploadFromFile { private function getChunkStatus() { // get Master db to avoid race conditions. // Otherwise, if chunk upload time < replag there will be spurious errors - $dbw = $this->repo->getMasterDb(); + $dbw = $this->repo->getMasterDB(); $row = $dbw->selectRow( 'uploadstash', [ diff --git a/includes/upload/UploadFromUrl.php b/includes/upload/UploadFromUrl.php index 342bd79ccb..6639c340ae 100644 --- a/includes/upload/UploadFromUrl.php +++ b/includes/upload/UploadFromUrl.php @@ -286,7 +286,7 @@ class UploadFromUrl extends UploadBase { } wfDebugLog( 'fileupload', $status ); - if ( $status->isOk() ) { + if ( $status->isOK() ) { wfDebugLog( 'fileupload', 'Download by URL completed successfuly.' ); } else { wfDebugLog( diff --git a/includes/upload/UploadStash.php b/includes/upload/UploadStash.php index d5e573b8b3..c171ded7da 100644 --- a/includes/upload/UploadStash.php +++ b/includes/upload/UploadStash.php @@ -276,7 +276,7 @@ class UploadStash { // insert the file metadata into the db. wfDebug( __METHOD__ . " inserting $stashPath under $key\n" ); - $dbw = $this->repo->getMasterDb(); + $dbw = $this->repo->getMasterDB(); $serializedFileProps = serialize( $fileProps ); if ( strlen( $serializedFileProps ) > self::MAX_US_PROPS_SIZE ) { @@ -336,7 +336,7 @@ class UploadStash { } wfDebug( __METHOD__ . ' clearing all rows for user ' . $this->userId . "\n" ); - $dbw = $this->repo->getMasterDb(); + $dbw = $this->repo->getMasterDB(); $dbw->delete( 'uploadstash', [ 'us_user' => $this->userId ], @@ -364,7 +364,7 @@ class UploadStash { . ' No user is logged in, files must belong to users' ); } - $dbw = $this->repo->getMasterDb(); + $dbw = $this->repo->getMasterDB(); // this is a cheap query. it runs on the master so that this function // still works when there's lag. It won't be called all that often. @@ -399,7 +399,7 @@ class UploadStash { // Ensure we have the UploadStashFile loaded for this key $this->getFile( $key, true ); - $dbw = $this->repo->getMasterDb(); + $dbw = $this->repo->getMasterDB(); $dbw->delete( 'uploadstash', @@ -430,7 +430,7 @@ class UploadStash { . ' No user is logged in, files must belong to users' ); } - $dbr = $this->repo->getSlaveDb(); + $dbr = $this->repo->getSlaveDB(); $res = $dbr->select( 'uploadstash', 'us_key', @@ -507,9 +507,9 @@ class UploadStash { $dbr = null; if ( $readFromDB === DB_MASTER ) { // sometimes reading from the master is necessary, if there's replication lag. - $dbr = $this->repo->getMasterDb(); + $dbr = $this->repo->getMasterDB(); } else { - $dbr = $this->repo->getSlaveDb(); + $dbr = $this->repo->getSlaveDB(); } $row = $dbr->selectRow( diff --git a/includes/user/BotPassword.php b/includes/user/BotPassword.php index c758f26193..7346a90fe9 100644 --- a/includes/user/BotPassword.php +++ b/includes/user/BotPassword.php @@ -429,7 +429,7 @@ class BotPassword implements IDBAccessObject { // Check restrictions $status = $bp->getRestrictions()->check( $request ); - if ( !$status->isOk() ) { + if ( !$status->isOK() ) { return Status::newFatal( 'botpasswords-restriction-failed' ); } diff --git a/includes/user/User.php b/includes/user/User.php index 831966e43c..e553ddcbec 100644 --- a/includes/user/User.php +++ b/includes/user/User.php @@ -2162,7 +2162,7 @@ class User implements IDBAccessObject { // Get the "last viewed rev" timestamp from the oldest message notification $timestamp = $dbr->selectField( 'user_newtalk', 'MIN(user_last_timestamp)', - $this->isAnon() ? [ 'user_ip' => $this->getName() ] : [ 'user_id' => $this->getID() ], + $this->isAnon() ? [ 'user_ip' => $this->getName() ] : [ 'user_id' => $this->getId() ], __METHOD__ ); $rev = $timestamp ? Revision::loadFromTimestamp( $dbr, $utp, $timestamp ) : null; return [ [ 'wiki' => wfWikiID(), 'link' => $utp->getLocalURL(), 'rev' => $rev ] ]; @@ -3268,7 +3268,7 @@ class User implements IDBAccessObject { if ( $this->getId() ) { $dbw->insert( 'user_groups', [ - 'ug_user' => $this->getID(), + 'ug_user' => $this->getId(), 'ug_group' => $group, ], __METHOD__, @@ -3306,14 +3306,14 @@ class User implements IDBAccessObject { $dbw = wfGetDB( DB_MASTER ); $dbw->delete( 'user_groups', [ - 'ug_user' => $this->getID(), + 'ug_user' => $this->getId(), 'ug_group' => $group, ], __METHOD__ ); // Remember that the user was in this group $dbw->insert( 'user_former_groups', [ - 'ufg_user' => $this->getID(), + 'ufg_user' => $this->getId(), 'ufg_group' => $group, ], __METHOD__, @@ -3338,7 +3338,7 @@ class User implements IDBAccessObject { * @return bool */ public function isLoggedIn() { - return $this->getID() != 0; + return $this->getId() != 0; } /** diff --git a/languages/Language.php b/languages/Language.php index a14a376a6a..93ce8eb1f3 100644 --- a/languages/Language.php +++ b/languages/Language.php @@ -4464,7 +4464,7 @@ class Language { * @return array Array of message keys (strings) */ public static function getMessageKeysFor( $code ) { - return self::getLocalisationCache()->getSubItemList( $code, 'messages' ); + return self::getLocalisationCache()->getSubitemList( $code, 'messages' ); } /** diff --git a/maintenance/namespaceDupes.php b/maintenance/namespaceDupes.php index 6d2a553f7e..55f361c941 100644 --- a/maintenance/namespaceDupes.php +++ b/maintenance/namespaceDupes.php @@ -583,7 +583,7 @@ class NamespaceConflictChecker extends Maintenance { $wikiPage = new WikiPage( $sourceTitle ); $wikiPage->loadPageData( 'fromdbmaster' ); - $destId = $newTitle->getArticleId(); + $destId = $newTitle->getArticleID(); $this->beginTransaction( $this->db, __METHOD__ ); $this->db->update( 'revision', // SET diff --git a/maintenance/sqlite.php b/maintenance/sqlite.php index 2d4e82abd6..454c506365 100644 --- a/maintenance/sqlite.php +++ b/maintenance/sqlite.php @@ -128,7 +128,7 @@ class SqliteMaintenance extends Maintenance { } private function checkSyntax() { - if ( !Sqlite::IsPresent() ) { + if ( !Sqlite::isPresent() ) { $this->error( "Error: SQLite support not found\n" ); } $files = [ $this->getOption( 'check-syntax' ) ]; diff --git a/maintenance/storage/fixBug20757.php b/maintenance/storage/fixBug20757.php index 8ea5d58fc5..0ea52cab0f 100644 --- a/maintenance/storage/fixBug20757.php +++ b/maintenance/storage/fixBug20757.php @@ -319,7 +319,7 @@ class FixBug20757 extends Maintenance { if ( $path == "" ) { return false; } - $text = ExternalStore::fetchFromUrl( $url ); + $text = ExternalStore::fetchFromURL( $url ); } if ( !in_array( 'object', $flags ) ) { return false; diff --git a/maintenance/update.php b/maintenance/update.php index ed8dfa9dfc..43b10c858b 100755 --- a/maintenance/update.php +++ b/maintenance/update.php @@ -127,7 +127,7 @@ class UpdateMediaWiki extends Maintenance { $this->compatChecks(); } else { $this->output( "Skipping compatibility checks, proceed at your own risk (Ctrl+C to abort)\n" ); - wfCountdown( 5 ); + wfCountDown( 5 ); } // Check external dependencies are up to date @@ -168,7 +168,7 @@ class UpdateMediaWiki extends Maintenance { $updates[] = 'stats'; } - $updater = DatabaseUpdater::newForDb( $db, $shared, $this ); + $updater = DatabaseUpdater::newForDB( $db, $shared, $this ); $updater->doUpdates( $updates ); foreach ( $updater->getPostDatabaseUpdateMaintenance() as $maint ) { diff --git a/tests/parser/parserTest.inc b/tests/parser/parserTest.inc index c10d3f734c..15f2dcf235 100644 --- a/tests/parser/parserTest.inc +++ b/tests/parser/parserTest.inc @@ -195,7 +195,7 @@ class ParserTest { 'transformVia404' => false, 'backend' => new FSFileBackend( [ 'name' => 'local-backend', - 'wikiId' => wfWikiId(), + 'wikiId' => wfWikiID(), 'containerPaths' => [ 'local-public' => $this->uploadDir . '/public', 'local-thumb' => $this->uploadDir . '/thumb', @@ -849,7 +849,7 @@ class ParserTest { 'transformVia404' => false, 'backend' => new FSFileBackend( [ 'name' => 'local-backend', - 'wikiId' => wfWikiId(), + 'wikiId' => wfWikiID(), 'containerPaths' => [ 'local-public' => $this->uploadDir, 'local-thumb' => $this->uploadDir . '/thumb', diff --git a/tests/phpunit/includes/BlockTest.php b/tests/phpunit/includes/BlockTest.php index f8d2003f11..9f386599eb 100644 --- a/tests/phpunit/includes/BlockTest.php +++ b/tests/phpunit/includes/BlockTest.php @@ -365,7 +365,7 @@ class BlockTest extends MediaWikiLangTestCase { # Set up the target $u = User::newFromName( $username ); - if ( $u->getID() == 0 ) { + if ( $u->getId() == 0 ) { $u->addToDatabase(); TestUser::setPasswordForUser( $u, 'TotallyObvious' ); } diff --git a/tests/phpunit/includes/RevisionStorageTest.php b/tests/phpunit/includes/RevisionStorageTest.php index 42b9beead6..0ac9c3c46b 100644 --- a/tests/phpunit/includes/RevisionStorageTest.php +++ b/tests/phpunit/includes/RevisionStorageTest.php @@ -145,7 +145,7 @@ class RevisionStorageTest extends MediaWikiTestCase { public function testConstructFromRow() { $orig = $this->makeRevision(); - $dbr = wfgetDB( DB_SLAVE ); + $dbr = wfGetDB( DB_SLAVE ); $res = $dbr->select( 'revision', '*', [ 'rev_id' => $orig->getId() ] ); $this->assertTrue( is_object( $res ), 'query failed' ); @@ -163,7 +163,7 @@ class RevisionStorageTest extends MediaWikiTestCase { public function testNewFromRow() { $orig = $this->makeRevision(); - $dbr = wfgetDB( DB_SLAVE ); + $dbr = wfGetDB( DB_SLAVE ); $res = $dbr->select( 'revision', '*', [ 'rev_id' => $orig->getId() ] ); $this->assertTrue( is_object( $res ), 'query failed' ); @@ -187,7 +187,7 @@ class RevisionStorageTest extends MediaWikiTestCase { $orig = $page->getRevision(); $page->doDeleteArticle( 'test Revision::newFromArchiveRow' ); - $dbr = wfgetDB( DB_SLAVE ); + $dbr = wfGetDB( DB_SLAVE ); $res = $dbr->select( 'archive', '*', [ 'ar_rev_id' => $orig->getId() ] ); $this->assertTrue( is_object( $res ), 'query failed' ); diff --git a/tests/phpunit/includes/TitlePermissionTest.php b/tests/phpunit/includes/TitlePermissionTest.php index 6048ca7849..5ecdf56134 100644 --- a/tests/phpunit/includes/TitlePermissionTest.php +++ b/tests/phpunit/includes/TitlePermissionTest.php @@ -658,7 +658,7 @@ class TitlePermissionTest extends MediaWikiLangTestCase { $this->setUserPerm( [ "createpage" ] ); $this->setTitle( NS_MAIN, "test page" ); $this->title->mTitleProtection['permission'] = ''; - $this->title->mTitleProtection['user'] = $this->user->getID(); + $this->title->mTitleProtection['user'] = $this->user->getId(); $this->title->mTitleProtection['expiry'] = 'infinity'; $this->title->mTitleProtection['reason'] = 'test'; $this->title->mCascadeRestriction = false; diff --git a/tests/phpunit/includes/api/ApiLoginTest.php b/tests/phpunit/includes/api/ApiLoginTest.php index 46a3cf4f64..3052915d78 100644 --- a/tests/phpunit/includes/api/ApiLoginTest.php +++ b/tests/phpunit/includes/api/ApiLoginTest.php @@ -153,7 +153,7 @@ class ApiLoginTest extends ApiTestCase { $this->assertNotEquals( false, $serverName ); $serializedCookie = $cj->serializeToHttpRequest( $wgScriptPath, $serverName ); $this->assertNotEquals( '', $serializedCookie ); - $this->assertRegexp( + $this->assertRegExp( '/_session=[^;]*; .*UserID=[0-9]*; .*UserName=' . $user->userName . '; .*Token=/', $serializedCookie ); diff --git a/tests/phpunit/includes/api/ApiUploadTest.php b/tests/phpunit/includes/api/ApiUploadTest.php index bacc061f54..873917e8ec 100644 --- a/tests/phpunit/includes/api/ApiUploadTest.php +++ b/tests/phpunit/includes/api/ApiUploadTest.php @@ -137,7 +137,7 @@ class ApiUploadTest extends ApiTestCaseUpload { $this->assertFalse( $exception ); // clean up - $this->deleteFileByFilename( $fileName ); + $this->deleteFileByFileName( $fileName ); } /** @@ -173,7 +173,7 @@ class ApiUploadTest extends ApiTestCaseUpload { $this->assertTrue( $exception ); // clean up - $this->deleteFileByFilename( $fileName ); + $this->deleteFileByFileName( $fileName ); } /** @@ -243,7 +243,7 @@ class ApiUploadTest extends ApiTestCaseUpload { $this->assertFalse( $exception ); // clean up - $this->deleteFileByFilename( $fileName ); + $this->deleteFileByFileName( $fileName ); } /** @@ -322,8 +322,8 @@ class ApiUploadTest extends ApiTestCaseUpload { $this->assertFalse( $exception ); // clean up - $this->deleteFileByFilename( $fileNames[0] ); - $this->deleteFileByFilename( $fileNames[1] ); + $this->deleteFileByFileName( $fileNames[0] ); + $this->deleteFileByFileName( $fileNames[1] ); } /** @@ -406,7 +406,7 @@ class ApiUploadTest extends ApiTestCaseUpload { $this->assertFalse( $exception, "No UsageException exception." ); // clean up - $this->deleteFileByFilename( $fileName ); + $this->deleteFileByFileName( $fileName ); } /** @@ -550,6 +550,6 @@ class ApiUploadTest extends ApiTestCaseUpload { $this->assertFalse( $exception ); // clean up - $this->deleteFileByFilename( $fileName ); + $this->deleteFileByFileName( $fileName ); } } diff --git a/tests/phpunit/includes/filebackend/FileBackendTest.php b/tests/phpunit/includes/filebackend/FileBackendTest.php index f259c0f171..4aeddc6b6f 100644 --- a/tests/phpunit/includes/filebackend/FileBackendTest.php +++ b/tests/phpunit/includes/filebackend/FileBackendTest.php @@ -2431,7 +2431,7 @@ class FileBackendTest extends MediaWikiTestCase { $be = TestingAccessWrapper::newFromObject( new FileBackendMultiWrite( [ 'name' => 'localtesting', - 'wikiId' => wfWikiId() . mt_rand(), + 'wikiId' => wfWikiID() . mt_rand(), 'backends' => [ [ // backend 0 'name' => 'multitesting0', @@ -2481,7 +2481,7 @@ class FileBackendTest extends MediaWikiTestCase { $be = TestingAccessWrapper::newFromObject( new FileBackendMultiWrite( [ 'name' => 'localtesting', - 'wikiId' => wfWikiId() . mt_rand(), + 'wikiId' => wfWikiID() . mt_rand(), 'backends' => [ [ // backend 0 'name' => 'multitesting0', diff --git a/tests/phpunit/includes/filerepo/FileBackendDBRepoWrapperTest.php b/tests/phpunit/includes/filerepo/FileBackendDBRepoWrapperTest.php index 77a7320fed..836654103c 100644 --- a/tests/phpunit/includes/filerepo/FileBackendDBRepoWrapperTest.php +++ b/tests/phpunit/includes/filerepo/FileBackendDBRepoWrapperTest.php @@ -120,7 +120,7 @@ class FileBackendDBRepoWrapperTest extends MediaWikiTestCase { [], [ [ 'name' => $this->backendName, - 'wikiId' => wfWikiId() + 'wikiId' => wfWikiID() ] ] ); $wrapperMock = $this->getMock( 'FileBackendDBRepoWrapper', diff --git a/tests/phpunit/includes/filerepo/file/FileTest.php b/tests/phpunit/includes/filerepo/file/FileTest.php index a7408f2cd9..c5fd369f14 100644 --- a/tests/phpunit/includes/filerepo/file/FileTest.php +++ b/tests/phpunit/includes/filerepo/file/FileTest.php @@ -137,7 +137,7 @@ class FileTest extends MediaWikiMediaTestCase { */ public function testGetThumbnailSource( $data ) { $backendMock = $this->getMockBuilder( 'FSFileBackend' ) - ->setConstructorArgs( [ [ 'name' => 'backendMock', 'wikiId' => wfWikiId() ] ] ) + ->setConstructorArgs( [ [ 'name' => 'backendMock', 'wikiId' => wfWikiID() ] ] ) ->getMock(); $repoMock = $this->getMockBuilder( 'FileRepo' ) @@ -247,7 +247,7 @@ class FileTest extends MediaWikiMediaTestCase { $this->setMwGlobals( 'wgThumbnailBuckets', $data['buckets'] ); $backendMock = $this->getMockBuilder( 'FSFileBackend' ) - ->setConstructorArgs( [ [ 'name' => 'backendMock', 'wikiId' => wfWikiId() ] ] ) + ->setConstructorArgs( [ [ 'name' => 'backendMock', 'wikiId' => wfWikiID() ] ] ) ->getMock(); $repoMock = $this->getMockBuilder( 'FileRepo' ) diff --git a/tests/phpunit/includes/media/BitmapMetadataHandlerTest.php b/tests/phpunit/includes/media/BitmapMetadataHandlerTest.php index 60908038cf..a70c005497 100644 --- a/tests/phpunit/includes/media/BitmapMetadataHandlerTest.php +++ b/tests/phpunit/includes/media/BitmapMetadataHandlerTest.php @@ -131,7 +131,7 @@ class BitmapMetadataHandlerTest extends MediaWikiTestCase { $this->markTestSkipped( "This test needs the xml extension." ); } $handler = new BitmapMetadataHandler(); - $result = $handler->png( $this->filePath . 'xmp.png' ); + $result = $handler->PNG( $this->filePath . 'xmp.png' ); $expected = [ 'frameCount' => 0, 'loopCount' => 1, @@ -151,7 +151,7 @@ class BitmapMetadataHandlerTest extends MediaWikiTestCase { */ public function testPNGNative() { $handler = new BitmapMetadataHandler(); - $result = $handler->png( $this->filePath . 'Png-native-test.png' ); + $result = $handler->PNG( $this->filePath . 'Png-native-test.png' ); $expected = 'http://example.com/url'; $this->assertEquals( $expected, $result['metadata']['Identifier']['x-default'] ); } diff --git a/tests/phpunit/includes/parser/NewParserTest.php b/tests/phpunit/includes/parser/NewParserTest.php index 0ad4b27972..b0c15250e3 100644 --- a/tests/phpunit/includes/parser/NewParserTest.php +++ b/tests/phpunit/includes/parser/NewParserTest.php @@ -411,7 +411,7 @@ class NewParserTest extends MediaWikiTestCase { # informations. $backend = new MockFileBackend( [ 'name' => 'local-backend', - 'wikiId' => wfWikiId() + 'wikiId' => wfWikiID() ] ); } diff --git a/tests/phpunit/includes/password/PasswordPolicyChecksTest.php b/tests/phpunit/includes/password/PasswordPolicyChecksTest.php index e28614e891..6357510f4f 100644 --- a/tests/phpunit/includes/password/PasswordPolicyChecksTest.php +++ b/tests/phpunit/includes/password/PasswordPolicyChecksTest.php @@ -130,7 +130,7 @@ class PasswordPolicyChecksTest extends MediaWikiTestCase { 'Passpass1' // password ); $this->assertFalse( $statusLong->isGood(), 'Password matches blacklist' ); - $this->assertTrue( $statusLong->isOk(), 'Password matches blacklist, not fatal' ); + $this->assertTrue( $statusLong->isOK(), 'Password matches blacklist, not fatal' ); } } diff --git a/tests/phpunit/includes/session/BotPasswordSessionProviderTest.php b/tests/phpunit/includes/session/BotPasswordSessionProviderTest.php index 5126a42138..d76d9dfc8a 100644 --- a/tests/phpunit/includes/session/BotPasswordSessionProviderTest.php +++ b/tests/phpunit/includes/session/BotPasswordSessionProviderTest.php @@ -154,7 +154,7 @@ class BotPasswordSessionProviderTest extends MediaWikiTestCase { public function testBasics() { $provider = $this->getProvider(); - $this->assertTrue( $provider->persistsSessionID() ); + $this->assertTrue( $provider->persistsSessionId() ); $this->assertFalse( $provider->canChangeUser() ); $this->assertNull( $provider->newSessionInfo() ); diff --git a/tests/phpunit/includes/session/CookieSessionProviderTest.php b/tests/phpunit/includes/session/CookieSessionProviderTest.php index a52aa4bbbe..70e89d4b0f 100644 --- a/tests/phpunit/includes/session/CookieSessionProviderTest.php +++ b/tests/phpunit/includes/session/CookieSessionProviderTest.php @@ -145,7 +145,7 @@ class CookieSessionProviderTest extends MediaWikiTestCase { public function testBasics() { $provider = new CookieSessionProvider( [ 'priority' => 10 ] ); - $this->assertTrue( $provider->persistsSessionID() ); + $this->assertTrue( $provider->persistsSessionId() ); $this->assertTrue( $provider->canChangeUser() ); $msg = $provider->whyNoSession(); diff --git a/tests/phpunit/includes/session/SessionManagerTest.php b/tests/phpunit/includes/session/SessionManagerTest.php index cd3177cf6b..cf59ced36b 100644 --- a/tests/phpunit/includes/session/SessionManagerTest.php +++ b/tests/phpunit/includes/session/SessionManagerTest.php @@ -809,7 +809,7 @@ class SessionManagerTest extends MediaWikiTestCase { \ObjectCache::$instances[__METHOD__] = new TestBagOStuff(); $this->setMwGlobals( [ 'wgMainCacheType' => __METHOD__ ] ); - $this->setMWGlobals( [ + $this->setMwGlobals( [ 'wgAuth' => new AuthPlugin, ] ); diff --git a/tests/phpunit/languages/LanguageTest.php b/tests/phpunit/languages/LanguageTest.php index 20f4c4fb79..3f80b90eed 100644 --- a/tests/phpunit/languages/LanguageTest.php +++ b/tests/phpunit/languages/LanguageTest.php @@ -281,7 +281,7 @@ class LanguageTest extends LanguageClassesTestCase { // Actual HTML... $this->assertEquals( $expected, - $this->getLang()->truncateHTML( $input, $len, $ellipsis ) + $this->getLang()->truncateHtml( $input, $len, $ellipsis ) ); } diff --git a/tests/phpunit/maintenance/backupTextPassTest.php b/tests/phpunit/maintenance/backupTextPassTest.php index 69a5a7e198..d7e72bb023 100644 --- a/tests/phpunit/maintenance/backupTextPassTest.php +++ b/tests/phpunit/maintenance/backupTextPassTest.php @@ -183,7 +183,7 @@ class TextPassDumperDatabaseTest extends DumpTestCase { $dumper->prefetch = $prefetchMock; $dumper->reporting = false; - $dumper->setDb( $this->db ); + $dumper->setDB( $this->db ); // Performing the dump $dumper->dump( WikiExporter::FULL, WikiExporter::TEXT ); @@ -274,7 +274,7 @@ class TextPassDumperDatabaseTest extends DumpTestCase { "--maxtime=1" /*This is in minutes. Fixup is below*/, "--buffersize=32768", // The default of 32 iterations fill up 32KB about twice "--checkpointfile=checkpoint-%s-%s.xml.gz" ] ); - $dumper->setDb( $this->db ); + $dumper->setDB( $this->db ); $dumper->maxTimeAllowed = $checkpointAfter; // Patching maxTime from 1 minute $dumper->stderr = $stderr; diff --git a/tests/phpunit/maintenance/backup_LogTest.php b/tests/phpunit/maintenance/backup_LogTest.php index 0b2f7fb541..0019a3fc9f 100644 --- a/tests/phpunit/maintenance/backup_LogTest.php +++ b/tests/phpunit/maintenance/backup_LogTest.php @@ -146,7 +146,7 @@ class BackupDumperLoggerTest extends DumpTestCase { $dumper->startId = $this->logId1; $dumper->endId = $this->logId3 + 1; $dumper->reporting = false; - $dumper->setDb( $this->db ); + $dumper->setDB( $this->db ); // Performing the dump $dumper->dump( WikiExporter::LOGS, WikiExporter::TEXT ); @@ -185,7 +185,7 @@ class BackupDumperLoggerTest extends DumpTestCase { '--reporting=2' ] ); $dumper->startId = $this->logId1; $dumper->endId = $this->logId3 + 1; - $dumper->setDb( $this->db ); + $dumper->setDB( $this->db ); // xmldumps-backup demands reporting, although this is currently not // implemented in BackupDumper, when dumping logging data. We diff --git a/tests/phpunit/maintenance/backup_PageTest.php b/tests/phpunit/maintenance/backup_PageTest.php index a07e62c9b8..2262cc0f39 100644 --- a/tests/phpunit/maintenance/backup_PageTest.php +++ b/tests/phpunit/maintenance/backup_PageTest.php @@ -160,7 +160,7 @@ class BackupDumperPageTest extends DumpTestCase { $dumper->loadWithArgv( [ '--full', '--quiet', '--output', 'file:' . $fname, '--stub' ] ); $dumper->startId = $this->pageId1; $dumper->endId = $this->pageId4 + 1; - $dumper->setDb( $this->db ); + $dumper->setDB( $this->db ); // Performing the dump $dumper->execute(); @@ -210,7 +210,7 @@ class BackupDumperPageTest extends DumpTestCase { $dumper->startId = $this->pageId1; $dumper->endId = $this->pageId4 + 1; $dumper->reporting = false; - $dumper->setDb( $this->db ); + $dumper->setDB( $this->db ); // Performing the dump $dumper->dump( WikiExporter::CURRENT, WikiExporter::STUB ); @@ -256,7 +256,7 @@ class BackupDumperPageTest extends DumpTestCase { $dumper->startId = $this->pageId1; $dumper->endId = $this->pageId4 + 1; $dumper->reporting = false; - $dumper->setDb( $this->db ); + $dumper->setDB( $this->db ); // Performing the dump $dumper->dump( WikiExporter::CURRENT, WikiExporter::STUB ); @@ -318,7 +318,7 @@ class BackupDumperPageTest extends DumpTestCase { "--reporting=1000" ] ); $dumper->startId = $this->pageId1; $dumper->endId = $this->pageId4 + 1; - $dumper->setDb( $this->db ); + $dumper->setDB( $this->db ); // xmldumps-backup uses reporting. We will not check the exact reported // message, as they are dependent on the processing power of the used diff --git a/tests/phpunit/skins/SideBarTest.php b/tests/phpunit/skins/SideBarTest.php index 0945b8f55d..aaa1febbd1 100644 --- a/tests/phpunit/skins/SideBarTest.php +++ b/tests/phpunit/skins/SideBarTest.php @@ -128,7 +128,7 @@ class SideBarTest extends MediaWikiLangTestCase { * @covers SkinTemplate::addToSidebarPlain */ public function testTrickyPipe() { - $this->assertSidebar( + $this->assertSideBar( [ 'Title' => [ # The first 2 are skipped # Doesn't really test the url properly @@ -163,7 +163,7 @@ class SideBarTest extends MediaWikiLangTestCase { ** http://www.mediawiki.org/| Home'; $bar = []; - $this->skin->addToSideBarPlain( $bar, $text ); + $this->skin->addToSidebarPlain( $bar, $text ); return $bar['Title'][0]; }