From 75c6696aa84712669d2cf82856e2af838ed877e0 Mon Sep 17 00:00:00 2001 From: Siebrand Mazeland Date: Tue, 17 May 2011 22:03:20 +0000 Subject: [PATCH] Use consistent notation for "@todo FIXME". Should update http://svn.wikimedia.org/doc/todo.html nicely. --- includes/Article.php | 19 +++++++-------- includes/BacklinkCache.php | 4 ++-- includes/Block.php | 4 ++-- includes/CategoryPage.php | 4 ++-- includes/Categoryfinder.php | 1 + includes/ConfEditor.php | 4 ++-- includes/DjVuImage.php | 10 ++++---- includes/EditPage.php | 2 +- includes/Feed.php | 2 +- includes/GlobalFunctions.php | 14 +++++------ includes/HTMLForm.php | 8 ++++--- includes/Html.php | 7 +++--- includes/ImagePage.php | 8 +++---- includes/Import.php | 14 +++++------ includes/Linker.php | 12 +++++----- includes/Message.php | 5 ++-- includes/MimeMagic.php | 7 +++--- includes/OutputHandler.php | 2 +- includes/OutputPage.php | 10 ++++---- includes/ProtectionForm.php | 4 ++-- includes/RecentChange.php | 2 +- includes/Revision.php | 2 +- includes/Sanitizer.php | 2 +- includes/Skin.php | 2 +- includes/SkinTemplate.php | 10 ++++---- includes/SpecialPage.php | 4 ++-- includes/SpecialPageFactory.php | 2 +- includes/Title.php | 14 ++++++----- includes/User.php | 8 +++---- includes/UserMailer.php | 3 ++- includes/WebRequest.php | 2 +- includes/WebStart.php | 2 +- includes/Wiki.php | 2 +- includes/WikiMap.php | 2 +- includes/api/ApiEditPage.php | 2 +- includes/api/ApiLogin.php | 5 ++-- includes/cache/SquidUpdate.php | 2 +- includes/db/Database.php | 2 +- includes/db/DatabasePostgres.php | 7 +++--- includes/db/LoadBalancer.php | 2 +- includes/diff/DifferenceEngine.php | 1 + includes/extauth/MediaWiki.php | 4 ++-- includes/filerepo/ForeignAPIFile.php | 2 +- includes/filerepo/ForeignAPIRepo.php | 4 ++-- includes/installer/Installer.php | 4 ++-- includes/installer/SqliteInstaller.php | 2 +- includes/json/FormatJson.php | 2 +- includes/media/Bitmap.php | 2 +- includes/media/Exif.php | 2 +- includes/media/FormatMetadata.php | 8 +++---- includes/media/Generic.php | 2 +- includes/media/PNGMetadataExtractor.php | 2 +- includes/media/XMP.php | 2 +- includes/parser/CoreParserFunctions.php | 4 ++-- includes/parser/LinkHolderArray.php | 6 ++--- includes/parser/Parser.php | 23 ++++++++++--------- includes/parser/ParserOptions.php | 2 +- includes/revisiondelete/RevisionDelete.php | 2 +- includes/revisiondelete/RevisionDeleter.php | 2 +- includes/search/SearchEngine.php | 8 +++---- includes/search/SearchIBM_DB2.php | 2 +- includes/search/SearchMssql.php | 2 +- includes/search/SearchMySQL.php | 2 +- includes/search/SearchOracle.php | 2 +- includes/specials/SpecialBlock.php | 2 +- includes/specials/SpecialContributions.php | 4 ++-- .../specials/SpecialDeletedContributions.php | 2 +- includes/specials/SpecialDisambiguations.php | 4 ++-- includes/specials/SpecialExport.php | 4 ++-- includes/specials/SpecialImport.php | 4 ++-- includes/specials/SpecialMovepage.php | 10 ++++---- includes/specials/SpecialNewpages.php | 2 +- includes/specials/SpecialPasswordReset.php | 2 +- includes/specials/SpecialPrefixindex.php | 4 ++-- includes/specials/SpecialRevisiondelete.php | 2 +- .../specials/SpecialUncategorizedimages.php | 2 +- .../specials/SpecialUncategorizedpages.php | 2 +- includes/specials/SpecialUndelete.php | 4 ++-- includes/specials/SpecialUpload.php | 2 +- includes/specials/SpecialUserrights.php | 2 +- includes/specials/SpecialWantedpages.php | 2 +- includes/upload/UploadBase.php | 2 +- languages/LanguageConverter.php | 2 +- languages/classes/LanguageAr.php | 2 +- languages/classes/LanguageBe.php | 2 +- languages/classes/LanguageBe_tarask.php | 2 +- languages/classes/LanguageBs.php | 2 +- languages/classes/LanguageCy.php | 2 +- languages/classes/LanguageHr.php | 2 +- languages/classes/LanguageLv.php | 2 +- languages/classes/LanguageMl.php | 2 +- languages/classes/LanguageRu.php | 2 +- languages/classes/LanguageSh.php | 2 +- languages/classes/LanguageSr.php | 2 +- languages/classes/LanguageUk.php | 2 +- languages/classes/LanguageYue.php | 2 +- languages/classes/LanguageZh_hans.php | 2 +- languages/messages/MessagesKs.php | 2 +- maintenance/cleanupImages.php | 2 +- maintenance/doMaintenance.php | 4 ++-- maintenance/fixDoubleRedirects.php | 2 +- maintenance/fuzz-tester.php | 10 ++++---- maintenance/importUseModWiki.php | 2 +- maintenance/mwdocgen.php | 3 ++- maintenance/populateSha1.php | 2 +- tests/phpunit/includes/GlobalTest.php | 8 ++++--- tests/phpunit/includes/IPTest.php | 4 ++-- tests/phpunit/includes/MWNamespaceTest.php | 4 ++-- tests/phpunit/includes/TitleTest.php | 4 ++-- tests/phpunit/includes/XmlTest.php | 2 +- .../includes/parser/MagicVariableTest.php | 2 +- .../specials/SpecialRecentchanges.php | 2 +- tests/selenium/SeleniumServerManager.php | 2 +- 113 files changed, 233 insertions(+), 218 deletions(-) diff --git a/includes/Article.php b/includes/Article.php index d310c4081d..ff8546f074 100644 --- a/includes/Article.php +++ b/includes/Article.php @@ -80,7 +80,7 @@ class Article { * @param $oldId Integer revision ID, null to fetch from request, zero for current */ public function __construct( Title $title, $oldId = null ) { - // FIXME: does the reference play any role here? + // @todo FIXME: Does the reference play any role here? $this->mTitle =& $title; $this->mOldId = $oldId; } @@ -91,7 +91,7 @@ class Article { */ public static function newFromID( $id ) { $t = Title::newFromID( $id ); - # FIXME: doesn't inherit right + # @todo FIXME: Doesn't inherit right return $t == null ? null : new self( $t ); # return $t == null ? null : new static( $t ); // PHP 5.3 } @@ -246,7 +246,7 @@ class Article { /** * Clear the object - * FIXME: shouldn't this be public? + * @todo FIXME: Shouldn't this be public? * @private */ public function clear() { @@ -564,7 +564,7 @@ class Article { } } - // FIXME: Horrible, horrible! This content-loading interface just plain sucks. + // @todo FIXME: Horrible, horrible! This content-loading interface just plain sucks. // We should instead work with the Revision object when we need it... $this->mContent = $revision->getText( Revision::FOR_THIS_USER ); // Loads if user is allowed @@ -833,7 +833,7 @@ class Article { * @return UserArray */ public function getContributors() { - # FIXME: this is expensive; cache this info somewhere. + # @todo FIXME: This is expensive; cache this info somewhere. $dbr = wfGetDB( DB_SLAVE ); $userTable = $dbr->tableName( 'user' ); @@ -2213,7 +2213,8 @@ class Article { $revisionId = $revision->insertOn( $dbw ); $this->mTitle->resetArticleID( $newid ); - # Update the LinkCache. Resetting the Title ArticleID means it will rely on having that already cached (FIXME?) + # Update the LinkCache. Resetting the Title ArticleID means it will rely on having that already cached + # @todo FIXME? LinkCache::singleton()->addGoodLinkObj( $newid, $this->mTitle, strlen( $text ), (bool)Title::newFromRedirect( $text ), $revisionId ); # Update the page record with revision data @@ -2437,7 +2438,7 @@ class Article { // Take this opportunity to purge out expired restrictions Title::purgeExpiredRestrictions(); - # FIXME: Same limitations as described in ProtectionForm.php (line 37); + # @todo FIXME: Same limitations as described in ProtectionForm.php (line 37); # we expect a single selection, but the schema allows otherwise. $current = array(); $updated = Article::flattenRestrictions( $limit ); @@ -2802,7 +2803,7 @@ class Article { global $wgLang; $revisions = $this->estimateRevisionCount(); - //FIXME: lego + // @todo FIXME: i18n issue/patchwork message $wgOut->addHTML( '' . wfMsgExt( 'historywarning', array( 'parseinline' ), $wgLang->formatNum( $revisions ) ) . wfMsgHtml( 'word-separator' ) . Linker::link( $this->mTitle, @@ -2904,7 +2905,7 @@ class Article { /** * Output deletion confirmation dialog - * FIXME: Move to another file? + * @todo FIXME: Move to another file? * @param $reason String: prefilled reason */ public function confirmDelete( $reason ) { diff --git a/includes/BacklinkCache.php b/includes/BacklinkCache.php index 6715d256e2..4677ef1c87 100644 --- a/includes/BacklinkCache.php +++ b/includes/BacklinkCache.php @@ -151,7 +151,7 @@ class BacklinkCache { return $ta; } - // FIXME : make this a function? + // @todo FIXME: Make this a function? if ( !isset( $this->fullResultCache[$table] ) ) { wfDebug( __METHOD__ . ": from DB\n" ); $res = $this->getDB()->select( @@ -200,7 +200,7 @@ class BacklinkCache { protected function getConditions( $table ) { $prefix = $this->getPrefix( $table ); - // FIXME imagelinks and categorylinks do not rely on getNamespace, + // @todo FIXME: imagelinks and categorylinks do not rely on getNamespace, // they could be moved up for nicer case statements switch ( $table ) { case 'pagelinks': diff --git a/includes/Block.php b/includes/Block.php index f1b3e7f821..c9404a5c03 100644 --- a/includes/Block.php +++ b/includes/Block.php @@ -54,7 +54,7 @@ class Block { /** * Constructor - * FIXME: Don't know what the best format to have for this constructor is, but fourteen + * @todo FIXME: Don't know what the best format to have for this constructor is, but fourteen * optional parameters certainly isn't it. */ function __construct( $address = '', $user = 0, $by = 0, $reason = '', @@ -1059,7 +1059,7 @@ class Block { * this returns the unredacted name; frontend functions need to call $block->getRedactedName() * in this situation. * @return array( User|String, Block::TYPE_ constant ) - * FIXME: this should be an integral part of the Block member variables + * @todo FIXME: This should be an integral part of the Block member variables */ public function getTargetAndType() { return array( $this->getTarget(), $this->getType() ); diff --git a/includes/CategoryPage.php b/includes/CategoryPage.php index bcb906ed2a..7ffaec8bf3 100644 --- a/includes/CategoryPage.php +++ b/includes/CategoryPage.php @@ -164,7 +164,7 @@ class CategoryViewer { if ( $r == '' ) { // If there is no category content to display, only // show the top part of the navigation links. - // FIXME: cannot be completely suppressed because it + // @todo FIXME: Cannot be completely suppressed because it // is unknown if 'until' or 'from' makes this // give 0 results. $r = $r . $this->getCategoryTop(); @@ -425,7 +425,7 @@ class CategoryViewer { # Don't show articles section if there are none. $r = ''; - # FIXME, here and in the other two sections: we don't need to bother + # @todo FIXME: Here and in the other two sections: we don't need to bother # with this rigamarole if the entire category contents fit on one page # and have already been retrieved. We can just use $rescnt in that # case and save a query and some logic. diff --git a/includes/Categoryfinder.php b/includes/Categoryfinder.php index 1f08b7f837..cc9bf5e90e 100644 --- a/includes/Categoryfinder.php +++ b/includes/Categoryfinder.php @@ -42,6 +42,7 @@ class Categoryfinder { * @param $article_ids Array of article IDs * @param $categories FIXME * @param $mode String: FIXME, default 'AND'. + * @todo FIXME: $categories/$mode */ function seed( $article_ids, $categories, $mode = 'AND' ) { $this->articles = $article_ids; diff --git a/includes/ConfEditor.php b/includes/ConfEditor.php index c9fd2079da..324a4754b2 100644 --- a/includes/ConfEditor.php +++ b/includes/ConfEditor.php @@ -306,14 +306,14 @@ class ConfEditor { function parseScalar( $str ) { if ( $str !== '' && $str[0] == '\'' ) // Single-quoted string - // @todo Fixme: trim() call is due to mystery bug where whitespace gets + // @todo FIXME: trim() call is due to mystery bug where whitespace gets // appended to the token; without it we ended up reading in the // extra quote on the end! return strtr( substr( trim( $str ), 1, -1 ), array( '\\\'' => '\'', '\\\\' => '\\' ) ); if ( $str !== '' && @$str[0] == '"' ) // Double-quoted string - // @todo Fixme: trim() call is due to mystery bug where whitespace gets + // @todo FIXME: trim() call is due to mystery bug where whitespace gets // appended to the token; without it we ended up reading in the // extra quote on the end! return stripcslashes( substr( trim( $str ), 1, -1 ) ); diff --git a/includes/DjVuImage.php b/includes/DjVuImage.php index f2effcb666..80b7408cbe 100644 --- a/includes/DjVuImage.php +++ b/includes/DjVuImage.php @@ -72,7 +72,7 @@ class DjVuImage { function dump() { $file = fopen( $this->mFilename, 'rb' ); $header = fread( $file, 12 ); - // FIXME: Would be good to replace this extract() call with something that explicitly initializes local variables. + // @todo FIXME: Would be good to replace this extract() call with something that explicitly initializes local variables. extract( unpack( 'a4magic/a4chunk/NchunkLength', $header ) ); echo "$chunk $chunkLength\n"; $this->dumpForm( $file, $chunkLength, 1 ); @@ -88,7 +88,7 @@ class DjVuImage { if( $chunkHeader == '' ) { break; } - // FIXME: Would be good to replace this extract() call with something that explicitly initializes local variables. + // @todo FIXME: Would be good to replace this extract() call with something that explicitly initializes local variables. extract( unpack( 'a4chunk/NchunkLength', $chunkHeader ) ); echo str_repeat( ' ', $indent * 4 ) . "$chunk $chunkLength\n"; @@ -119,7 +119,7 @@ class DjVuImage { if( strlen( $header ) < 16 ) { wfDebug( __METHOD__ . ": too short file header\n" ); } else { - // FIXME: Would be good to replace this extract() call with something that explicitly initializes local variables. + // @todo FIXME: Would be good to replace this extract() call with something that explicitly initializes local variables. extract( unpack( 'a4magic/a4form/NformLength/a4subtype', $header ) ); if( $magic != 'AT&T' ) { @@ -143,7 +143,7 @@ class DjVuImage { if( strlen( $header ) < 8 ) { return array( false, 0 ); } else { - // FIXME: Would be good to replace this extract() call with something that explicitly initializes local variables. + // @todo FIXME: Would be good to replace this extract() call with something that explicitly initializes local variables. extract( unpack( 'a4chunk/Nlength', $header ) ); return array( $chunk, $length ); } @@ -202,7 +202,7 @@ class DjVuImage { return false; } - // FIXME: Would be good to replace this extract() call with something that explicitly initializes local variables. + // @todo FIXME: Would be good to replace this extract() call with something that explicitly initializes local variables. extract( unpack( 'nwidth/' . 'nheight/' . diff --git a/includes/EditPage.php b/includes/EditPage.php index 6bffb58148..cee2496382 100644 --- a/includes/EditPage.php +++ b/includes/EditPage.php @@ -705,7 +705,7 @@ class EditPage { $this->bot = $request->getBool( 'bot', true ); $this->nosummary = $request->getBool( 'nosummary' ); - // FIXME: unused variable? + // @todo FIXME: Unused variable? $this->oldid = $request->getInt( 'oldid' ); $this->live = $request->getCheck( 'live' ); diff --git a/includes/Feed.php b/includes/Feed.php index 183b8e6e59..e22ed9383b 100644 --- a/includes/Feed.php +++ b/includes/Feed.php @@ -418,7 +418,7 @@ class AtomFeed extends ChannelFeed { getAuthor() ) { ?>getAuthor() ?> -getComments() ) { ?>getComments() ?> */ } diff --git a/includes/GlobalFunctions.php b/includes/GlobalFunctions.php index 9c9ea74ef8..b5afa9d5cc 100644 --- a/includes/GlobalFunctions.php +++ b/includes/GlobalFunctions.php @@ -386,7 +386,7 @@ function wfLogProfilingData() { $forward = "\t(proxied via {$_SERVER['REMOTE_ADDR']}{$forward})"; } // Don't load $wgUser at this late stage just for statistics purposes - // FIXME: We can detect some anons even if it is not loaded. See User::getId() + // @todo FIXME: We can detect some anons even if it is not loaded. See User::getId() if ( $wgUser->isItemLoaded( 'id' ) && $wgUser->isAnon() ) { $forward .= ' anon'; } @@ -1060,7 +1060,7 @@ function wfShowingResultsNum( $offset, $limit, $num ) { function wfViewPrevNext( $offset, $limit, $link, $query = '', $atend = false ) { global $wgLang; $fmtLimit = $wgLang->formatNum( $limit ); - // FIXME: Why on earth this needs one message for the text and another one for tooltip?? + // @todo FIXME: Why on earth this needs one message for the text and another one for tooltip? # Get prev/next link display text $prev = wfMsgExt( 'prevn', array( 'parsemag', 'escape' ), $fmtLimit ); $next = wfMsgExt( 'nextn', array( 'parsemag', 'escape' ), $fmtLimit ); @@ -1134,7 +1134,7 @@ function wfNumLink( $offset, $limit, $title, $query = '' ) { /** * @todo document - * @todo FIXME: we may want to blacklist some broken browsers + * @todo FIXME: We may want to blacklist some broken browsers * * @param $force Bool * @return bool Whereas client accept gzip compression @@ -1144,7 +1144,7 @@ function wfClientAcceptsGzip( $force = false ) { if ( $result === null || $force ) { $result = false; if( isset( $_SERVER['HTTP_ACCEPT_ENCODING'] ) ) { - # FIXME: we may want to blacklist some broken browsers + # @todo FIXME: We may want to blacklist some broken browsers $m = array(); if( preg_match( '/\bgzip(?:;(q)=([0-9]+(?:\.[0-9]+)))?\b/', @@ -1699,7 +1699,7 @@ function wfAcceptToPrefs( $accept, $def = '*/*' ) { $parts = explode( ',', $accept ); foreach( $parts as $part ) { - # FIXME: doesn't deal with params like 'text/html; level=1' + # @todo FIXME: Doesn't deal with params like 'text/html; level=1' @list( $value, $qpart ) = explode( ';', trim( $part ) ); $match = array(); if( !isset( $qpart ) ) { @@ -1749,7 +1749,7 @@ function mimeTypeMatch( $type, $avail ) { * @param $sprefs Array: server's offered types * @return string * - * @todo FIXME: doesn't handle params like 'text/plain; charset=UTF-8' + * @todo FIXME: Doesn't handle params like 'text/plain; charset=UTF-8' * XXX: generalize to negotiate other stuff */ function wfNegotiateType( $cprefs, $sprefs ) { @@ -2613,7 +2613,7 @@ function wfMergeErrorArrays( /*...*/ ) { $out = array(); foreach ( $args as $errors ) { foreach ( $errors as $params ) { - # FIXME: sometimes get nested arrays for $params, + # @todo FIXME: Sometimes get nested arrays for $params, # which leads to E_NOTICEs $spec = implode( "\t", $params ); $out[$spec] = $params; diff --git a/includes/HTMLForm.php b/includes/HTMLForm.php index e5f7a4c4f5..44669df8b5 100644 --- a/includes/HTMLForm.php +++ b/includes/HTMLForm.php @@ -582,7 +582,8 @@ class HTMLForm { /** * Set the id for the submit button. - * @param $t String. FIXME: Integrity is *not* validated + * @param $t String. + * @todo FIXME: Integrity of $t is *not* validated */ function setSubmitID( $t ) { $this->mSubmitID = $t; @@ -1535,7 +1536,8 @@ class HTMLMultiSelectField extends HTMLFormField { # field, is it because the user has not yet submitted the form, or that they # have submitted it with all the options unchecked? We will have to assume the # latter, which basically means that you can't specify 'positive' defaults - # for GET forms. FIXME... + # for GET forms. + # @todo FIXME... return $request->getArray( $this->mName, array() ); } } @@ -1562,7 +1564,7 @@ class HTMLMultiSelectField extends HTMLFormField { * Plus a text field underneath for an additional reason. The 'value' of the field is * ""