* @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;
}
*/
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
}
/**
* Clear the object
- * FIXME: shouldn't this be public?
+ * @todo FIXME: Shouldn't this be public?
* @private
*/
public function clear() {
}
}
- // 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
* @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' );
$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
// 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 );
global $wgLang;
$revisions = $this->estimateRevisionCount();
- //FIXME: lego
+ // @todo FIXME: i18n issue/patchwork message
$wgOut->addHTML( '<strong class="mw-delete-warning-revisions">' .
wfMsgExt( 'historywarning', array( 'parseinline' ), $wgLang->formatNum( $revisions ) ) .
wfMsgHtml( 'word-separator' ) . Linker::link( $this->mTitle,
/**
* Output deletion confirmation dialog
- * FIXME: Move to another file?
+ * @todo FIXME: Move to another file?
* @param $reason String: prefilled reason
*/
public function confirmDelete( $reason ) {
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(
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':
/**
* 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 = '',
* 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() );
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();
# 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.
* @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;
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 ) );
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 );
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";
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' ) {
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 );
}
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/' .
$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' );
<?php if( $item->getAuthor() ) { ?><author><name><?php print $item->getAuthor() ?></name></author><?php }?>
</entry>
-<?php /* FIXME need to add comments
+<?php /* @todo FIXME: Need to add comments
<?php if( $item->getComments() ) { ?><dc:comment><?php print $item->getComments() ?></dc:comment><?php }?>
*/
}
$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';
}
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 );
/**
* @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
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/',
$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 ) ) {
* @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 ) {
$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;
/**
* 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;
# 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() );
}
}
* Plus a text field underneath for an additional reason. The 'value' of the field is
* ""<select>: <extra reason>"", or "<extra reason>" if nothing has been selected in the
* select dropdown.
- * FIXME: If made 'required', only the text field should be compulsory.
+ * @todo FIXME: If made 'required', only the text field should be compulsory.
*/
class HTMLSelectAndOtherField extends HTMLSelectField {
# Apparently we need to entity-encode \n, \r, \t, although the
# spec doesn't mention that. Since we're doing strtr() anyway,
# and we don't need <> escaped here, we may as well not call
- # htmlspecialchars(). FIXME: verify that we actually need to
+ # htmlspecialchars().
+ # @todo FIXME: Verify that we actually need to
# escape \n\r\t here, and explain why, exactly.
#
# We could call Sanitizer::encodeAttribute() for this, but we
);
if ( $wgWellFormedXml ) {
# This is allowed per spec: <http://www.w3.org/TR/xml/#NT-AttValue>
- # But reportedly it breaks some XML tools? FIXME: is this
- # really true?
+ # But reportedly it breaks some XML tools?
+ # @todo FIXME: Is this really true?
$map['<'] = '<';
}
$ret .= " $key=$quote" . strtr( $value, $map ) . $quote;
$this->showRedirectedFromHeader();
if ( $wgShowEXIF && $this->displayImg->exists() ) {
- // FIXME: bad interface, see note on MediaHandler::formatMetadata().
+ // @todo FIXME: Bad interface, see note on MediaHandler::formatMetadata().
$formattedMetadata = $this->displayImg->formatMetadata();
$showmeta = $formattedMetadata !== false;
} else {
array( 'id' => 'filelinks' ),
wfMsg( 'imagelinks' ) ) . "\n" );
$this->imageDupes();
- # TODO! FIXME! For some freaky reason, we can't redirect to foreign images.
+ # @todo FIXME: For some freaky reason, we can't redirect to foreign images.
# Yet we return metadata about the target. Definitely an issue in the FileRepo
$this->imageLinks();
/**
* Make a table with metadata to be shown in the output page.
*
- * FIXME: bad interface, see note on MediaHandler::formatMetadata().
+ * @todo FIXME: Bad interface, see note on MediaHandler::formatMetadata().
*
* @param $metadata Array: the array containing the EXIF data
* @return String The metadata table. This is treated as Wikitext (!)
$r .= "<table id=\"mw_metadata\" class=\"mw_metadata\">\n";
foreach ( $metadata as $type => $stuff ) {
foreach ( $stuff as $v ) {
- # FIXME, why is this using escapeId for a class?!
+ # @todo FIXME: Why is this using escapeId for a class?!
$class = Sanitizer::escapeId( $v['id'] );
if ( $type == 'collapsed' ) {
$class .= ' collapsable';
// Don't override namespaces
$this->mTargetNamespace = null;
} elseif( $namespace >= 0 ) {
- // FIXME: Check for validity
+ // @todo FIXME: Check for validity
$this->mTargetNamespace = intval( $namespace );
} else {
return false;
__METHOD__
);
if( $prior ) {
- // FIXME: this could fail slightly for multiple matches :P
+ // @todo FIXME: This could fail slightly for multiple matches :P
wfDebug( __METHOD__ . ": skipping existing revision for [[" .
$this->title->getPrefixedText() . "]], timestamp " . $this->timestamp . "\n" );
return false;
}
}
- # FIXME: Use original rev_id optionally (better for backups)
+ # @todo FIXME: Use original rev_id optionally (better for backups)
# Insert the row
$revision = new Revision( array(
'page' => $pageId,
function importLogItem() {
$dbw = wfGetDB( DB_MASTER );
- # FIXME: this will not record autoblocks
+ # @todo FIXME: This will not record autoblocks
if( !$this->getTitle() ) {
wfDebug( __METHOD__ . ": skipping invalid {$this->type}/{$this->action} log time, timestamp " .
$this->timestamp . "\n" );
return;
}
# Check if it exists already
- // FIXME: use original log ID (better for backups)
+ // @todo FIXME: Use original log ID (better for backups)
$prior = $dbw->selectField( 'logging', '1',
array( 'log_type' => $this->getType(),
'log_action' => $this->getAction(),
'log_params' => $this->params ),
__METHOD__
);
- // FIXME: this could fail slightly for multiple matches :P
+ // @todo FIXME: This could fail slightly for multiple matches :P
if( $prior ) {
wfDebug( __METHOD__ . ": skipping existing item for Log:{$this->type}/{$this->action}, timestamp " .
$this->timestamp . "\n" );
return false;
}
- // @todo Fixme!
+ // @todo FIXME!
$src = $this->getSrc();
$data = Http::get( $src );
if( !$data ) {
static function getInterwikiLinkAttributes( $title, $unused = null, $class = 'external' ) {
global $wgContLang;
- # FIXME: We have a whole bunch of handling here that doesn't happen in
+ # @todo FIXME: We have a whole bunch of handling here that doesn't happen in
# getExternalLinkAttributes, why?
$title = urldecode( $title );
$title = $wgContLang->checkTitleEncoding( $title );
$threshold = $wgUser->getStubThreshold();
$colour = ( $size < $threshold ) ? 'stub' : '';
- // FIXME: replace deprecated makeColouredLinkObj by link()
+ // @todo FIXME: Replace deprecated makeColouredLinkObj by link()
return self::makeColouredLinkObj( $nt, $colour, $text, $query, $trail, $prefix );
}
* Formats wiki links and media links in text; all other wiki formatting
* is ignored
*
- * @todo Fixme: doesn't handle sub-links as in image thumb texts like the main parser
+ * @todo FIXME: Doesn't handle sub-links as in image thumb texts like the main parser
* @param $comment String: text to format links in
* @param $title An optional title object used to links to sections
* @param $local Boolean: whether section links should refer to local page
} else {
$accesskey = $message->plain();
if ( $accesskey === '' || $accesskey === '-' ) {
- # FIXME: Per standard MW behavior, a value of '-' means to suppress the
+ # @todo FIXME: Per standard MW behavior, a value of '-' means to suppress the
# attribute, but this is broken for accesskey: that might be a useful
# value.
$accesskey = false;
global $wgEnableTooltipsAndAccesskeys;
if ( !$wgEnableTooltipsAndAccesskeys )
return array();
- # FIXME: If Sanitizer::expandAttributes() treated "false" as "output
+ # @todo FIXME: If Sanitizer::expandAttributes() treated "false" as "output
# no attribute" instead of "output '' as value for attribute", this
# would be three lines.
$attribs = array(
global $wgEnableTooltipsAndAccesskeys;
if ( !$wgEnableTooltipsAndAccesskeys )
return '';
- # FIXME: If Sanitizer::expandAttributes() treated "false" as "output
+ # @todo FIXME: If Sanitizer::expandAttributes() treated "false" as "output
# no attribute" instead of "output '' as value for attribute", this
# would be two lines.
$tooltip = self::titleAttrib( $name, $options );
* $escaped = wfMessage( 'key' )->rawParams( 'apple' )->escaped();
* </pre>
*
- * TODO:
+ * @todo
* - test, can we have tests?
- * - sort out the details marked with fixme
*
* @since 1.17
* @author Niklas Laxström
/**
* Check whether a message does not exist, or is an empty string
* @return Bool: true if is is and false if not
- * @todo Merge with isDisabled()?
+ * @todo FIXME: Merge with isDisabled()?
*/
public function isBlank() {
$message = $this->fetchMessage();
private function doGuessMimeType( $file, $ext ) { // TODO: remove $ext param
// Read a chunk of the file
wfSuppressWarnings();
- $f = fopen( $file, 'rt' ); // FIXME: Shouldn't this be rb?
+ // @todo FIXME: Shouldn't this be rb?
+ $f = fopen( $file, 'rt' );
wfRestoreWarnings();
if( !$f ) {
* heuristic, and won't match a file with a lot of non-PHP before. It
* will also match text files which could be PHP. :)
*
- * FIXME: For this reason, the check is probably useless -- an attacker
+ * @todo FIXME: For this reason, the check is probably useless -- an attacker
* could almost certainly just pad the file with a lot of nonsense to
* circumvent the check in any case where it would be a security
* problem. On the other hand, it causes harmful false positives (bug
$m = null;
if ( $wgMimeDetectorCommand ) {
- // FIXME: Use wfShellExec
+ // @todo FIXME: Use wfShellExec
$fn = wfEscapeShellArg( $file );
$m = `$wgMimeDetectorCommand $fn`;
} elseif ( function_exists( "finfo_open" ) && function_exists( "finfo_file" ) ) {
* @private
*/
function wfRequestExtension() {
- /// @todo Fixme: this sort of dupes some code in WebRequest::getRequestUrl()
+ /// @todo FIXME: this sort of dupes some code in WebRequest::getRequestUrl()
if( isset( $_SERVER['REQUEST_URI'] ) ) {
// Strip the query string...
list( $path ) = explode( '?', $_SERVER['REQUEST_URI'], 2 );
* This class is used to prepare the final rendering. A skin is then
* applied to the output parameters (links, javascript, html, categories ...).
*
- * Another class (fixme) handles sending the whole page to the client.
+ * @todo FIXME: Another class handles sending the whole page to the client.
*
* Some comments comes from a pairing session between Zak Greant and Ashar Voultoiz
* in November 2010.
/// Array of elements in <head>. Parser might add its own headers!
var $mHeadItems = array();
- // Next variables probably comes from the resource loader @todo FIXME
+ // @todo FIXME: Next variables probably comes from the resource loader
var $mModules = array(), $mModuleScripts = array(), $mModuleStyles = array(), $mModuleMessages = array();
var $mResourceLoader;
- /** @fixme is this still used ?*/
+ /** @todo FIXME: Is this still used ?*/
var $mInlineMsg = array();
var $mTemplateIds = array();
*
* @param $header String: header name
* @param $option Array|null
- * @fixme Document the $option parameter; it appears to be for
+ * @todo FIXME: Document the $option parameter; it appears to be for
* X-Vary-Options but what format is acceptable?
*/
public function addVaryHeader( $header, $option = null ) {
# XXX: additional security check/prompt?
$scripts .= Html::inlineScript( "\n" . $this->getRequest()->getText( 'wpTextbox1' ) . "\n" ) . "\n";
} else {
- # FIXME: this means that User:Me/Common.js doesn't load when previewing
+ # @todo FIXME: This means that User:Me/Common.js doesn't load when previewing
# User:Me/Vector.js, and vice versa (bug26283)
$userScripts[] = 'user';
}
$this->mCascade = $wgRequest->getBool( 'mwProtect-cascade', $this->mCascade );
foreach( $this->mApplicableTypes as $action ) {
- // Fixme: this form currently requires individual selections,
+ // @todo FIXME: This form currently requires individual selections,
// but the db allows multiples separated by commas.
// Pull the actual restriction from the DB
return false;
}
- // Fixme: non-qualified absolute times are not in users specified timezone
+ // @todo FIXME: Non-qualified absolute times are not in users specified timezone
// and there isn't notice about it in the ui
$time = wfTimestamp( TS_MW, $unix );
}
$editor = ($wgUser->getName() == $this->mAttribs['rc_user_text']) ?
$wgUser : User::newFromName( $this->mAttribs['rc_user_text'], false );
}
- # FIXME: this would be better as an extension hook
+ # @todo FIXME: This would be better as an extension hook
$enotif = new EmailNotification();
$title = Title::makeTitle( $this->mAttribs['rc_namespace'], $this->mAttribs['rc_title'] );
$enotif->notifyOnPageChange( $editor, $title,
/**
* Make a fake revision object from an archive table row. This is queried
* for permissions or even inserted (as in Special:Undelete)
- * @todo Fixme: should be a subclass for RevisionDelete. [TS]
+ * @todo FIXME: Should be a subclass for RevisionDelete. [TS]
*/
public static function newFromArchiveRow( $row, $overrides = array() ) {
$attribs = $overrides + array(
$host = preg_replace( $strip, '', $host );
- // @todo Fixme: validate hostnames here
+ // @todo FIXME: Validate hostnames here
return $protocol . $host . $rest;
} else {
// Per-user custom styles
if ( $wgAllowUserCss ) {
if ( $this->getTitle()->isCssSubpage() && $this->userCanPreview( $this->getContext()->getRequest()->getVal( 'action' ) ) ) {
- // @FIXME: properly escape the cdata!
+ // @todo FIXME: Properly escape the cdata!
$out->addInlineStyle( $this->getContext()->getRequest()->getText( 'wpTextbox1' ) );
} else {
$out->addModuleStyles( 'user' );
$tpl->set( 'usercss', false );
$this->userjs = $this->userjsprev = false;
- # FIXME: this is the only use of OutputPage::isUserJsAllowed() anywhere; can we
+ # @todo FIXME: This is the only use of OutputPage::isUserJsAllowed() anywhere; can we
# get rid of it? For that matter, why is any of this here at all?
$this->setupUserJs( $out->isUserJsAllowed() );
$tpl->setRef( 'userjs', $this->userjs );
$title = SpecialPage::getTitleFor( 'Userlogin' );
$https_url = preg_replace( '/^http:/', 'https:', $title->getFullURL() );
$login_url['href'] = $https_url;
- $login_url['class'] = 'link-https'; # FIXME class depends on skin
+ # @todo FIXME: Class depends on skin
+ $login_url['class'] = 'link-https';
if ( isset($createaccount_url) ) {
$https_url = preg_replace( '/^http:/', 'https:', $title->getFullURL("type=signup") );
$createaccount_url['href'] = $https_url;
- $createaccount_url['class'] = 'link-https'; # FIXME class depends on skin
+ # @todo FIXME: Class depends on skin
+ $createaccount_url['class'] = 'link-https';
}
}
/**
* @private
- * FIXME: why is this duplicated in/from OutputPage::getHeadScripts()??
+ * @todo FIXME: Why is this duplicated in/from OutputPage::getHeadScripts()??
*/
function setupUserJs( $allowUserJs ) {
global $wgRequest, $wgJsMimeType;
return $this->mFile;
}
- // FIXME: decide which syntax to use for this, and stick to it
+ // @todo FIXME: Decide which syntax to use for this, and stick to it
/**
* Whether this special page is listed in Special:SpecialPages
* @since r3583 (v1.3)
/**
* CreateAccount --> UserLogin/signup
- * FIXME: this (and the rest of the login frontend) needs to die a horrible painful death
+ * @todo FIXME: This (and the rest of the login frontend) needs to die a horrible painful death
*/
class SpecialCreateAccount extends SpecialRedirectToSpecial {
function __construct(){
public static function executePath( Title &$title, RequestContext &$context, $including = false ) {
wfProfileIn( __METHOD__ );
- // FIXME: redirects broken due to this call
+ // @todo FIXME: Redirects broken due to this call
$bits = explode( '/', $title->getDBkey(), 2 );
$name = $bits[0];
if ( !isset( $bits[1] ) ) { // bug 2087
* @return String the prefixed title, with spaces
*/
public function getPrefixedText() {
- if ( empty( $this->mPrefixedText ) ) { // FIXME: bad usage of empty() ?
+ // @todo FIXME: Bad usage of empty() ?
+ if ( empty( $this->mPrefixedText ) ) {
$s = $this->prefix( $this->mTextform );
$s = str_replace( '_', ' ', $s );
$this->mPrefixedText = $s;
}
}
- // FIXME: this causes breakage in various places when we
+ // @todo FIXME: This causes breakage in various places when we
// actually expected a local URL and end up with dupe prefixes.
if ( $wgRequest->getVal( 'action' ) == 'render' ) {
$url = $wgServer . $url;
global $wgActionPaths;
if( !array_key_exists( 'action', $queryArray ) ) {
// Makes the default action 'view' and points to $wgArticlePath
- // FIXME: this should be handled in Setup or Wiki!
+ // @todo FIXME: This should be handled in Setup or Wiki!
global $wgArticlePath;
$url = str_replace( '$1', $dbkey, $wgArticlePath );
} elseif( isset( $wgActionPaths[$queryArray['action']] ) ) {
/**
* Can $user perform $action on this page?
*
- * FIXME: This *does not* check throttles (User::pingLimiter()).
+ * @todo FIXME: This *does not* check throttles (User::pingLimiter()).
*
* @param $action String action that permission needs to be checked for
* @param $user User to check
// Do the actual move
$err = $this->moveToInternal( $nt, $reason, $createRedirect );
if ( is_array( $err ) ) {
- # FIXME: What about the File we have already moved?
+ # @todo FIXME: What about the File we have already moved?
$dbw->rollback();
return $err;
}
if ( $reason ) {
$comment .= wfMsgForContent( 'colon-separator' ) . $reason;
}
- $log->addEntry( 'move_prot', $nt, $comment, array( $this->getPrefixedText() ) ); // FIXME: $params?
+ // @todo FIXME: $params?
+ $log->addEntry( 'move_prot', $nt, $comment, array( $this->getPrefixedText() ) );
}
# Update watchlists
wfProfileIn( __METHOD__ );
$found = false;
- // FIXME: IPv6 ??? (http://bugs.php.net/bug.php?id=33170)
+ // @todo FIXME: IPv6 ??? (http://bugs.php.net/bug.php?id=33170)
if( IP::isIPv4( $ip ) ) {
# Reverse IP, bug 21255
$ipReversed = implode( '.', array_reverse( explode( '.', $ip ) ) );
/**
* Get the current skin, loading it if required
* @return Skin The current skin
- * @todo FIXME : need to check the old failback system [AV]
+ * @todo FIXME: Need to check the old failback system [AV]
* @deprecated since 1.18 Use ->getSkin() in the most relevant outputting context you have
*/
function getSkin() {
* actually just returns array() unconditionally at the moment. May as
* well keep it around for when the browser bugs get fixed, though.
*
- * FIXME : This does not belong here; put it in Html or Linker or somewhere
+ * @todo FIXME: This does not belong here; put it in Html or Linker or somewhere
*
* @return array Array of HTML attributes suitable for feeding to
* Html::element(), directly or indirectly. (Don't feed to Xml::*()!
# Note that the pattern requirement will always be satisfied if the
# input is empty, so we need required in all cases.
#
- # FIXME (bug 23769): This needs to not claim the password is required
+ # @todo FIXME: Bug 23769: This needs to not claim the password is required
# if e-mail confirmation is being used. Since HTML5 input validation
# is b0rked anyway in some browsers, just return nothing. When it's
# re-enabled, fix this code to not output required for e-mail
$headers['Content-type'] = ( is_null( $contentType ) ?
'text/plain; charset=UTF-8' : $contentType );
$headers['Content-transfer-encoding'] = '8bit';
- $headers['Message-ID'] = "<$msgid@" . $wgSMTP['IDHost'] . '>'; // FIXME
+ // @todo FIXME
+ $headers['Message-ID'] = "<$msgid@" . $wgSMTP['IDHost'] . '>';
$headers['X-Mailer'] = 'MediaWiki mailer';
wfSuppressWarnings();
private $response;
public function __construct() {
- /// @todo Fixme: this preemptive de-quoting can interfere with other web libraries
+ /// @todo FIXME: This preemptive de-quoting can interfere with other web libraries
/// and increases our memory footprint. It would be cleaner to do on
/// demand; but currently we have no wrapper for $_SERVER etc.
$this->checkMagicQuotes();
require_once( "$IP/includes/AutoLoader.php" );
# Start profiler
- # FIXME: rewrite wfProfileIn/wfProfileOut so that they can work in compiled mode
+ # @todo FIXME: Rewrite wfProfileIn/wfProfileOut so that they can work in compiled mode
require_once( "$IP/includes/profiler/Profiler.php" );
if ( file_exists( "$IP/StartProfiler.php" ) ) {
require_once( "$IP/StartProfiler.php" );
*/
public static function articleFromTitle( $title, RequestContext $context ) {
if ( NS_MEDIA == $title->getNamespace() ) {
- // FIXME: where should this go?
+ // @todo FIXME: Where should this go?
$title = Title::makeTitle( NS_FILE, $title->getDBkey() );
}
/**
* Helper function for getUrl()
*
- * @todo FIXME: this may be generalized...
+ * @todo FIXME: This may be generalized...
* @param $page String: page name (must be normalised before calling this function!)
* @return String: Url fragment
*/
$oldRevId = $articleObj->getRevIdFetched();
$result = null;
// Fake $wgRequest for some hooks inside EditPage
- // FIXME: This interface SUCKS
+ // @todo FIXME: This interface SUCKS
$oldRequest = $wgRequest;
$wgRequest = $req;
$wgUser->setOption( 'rememberpassword', 1 );
$wgUser->setCookies( $this->getMain()->getRequest() );
- // Run hooks. FIXME: split back and frontend from this hook.
- // FIXME: This hook should be placed in the backend
+ // Run hooks.
+ // @todo FIXME: Split back and frontend from this hook.
+ // @todo FIXME: This hook should be placed in the backend
$injected_html = '';
wfRunHooks( 'UserLoginComplete', array( &$wgUser, &$injected_html ) );
$htcpOpCLR = 4; // HTCP CLR
- // FIXME PHP doesn't support these socket constants (include/linux/in.h)
+ // @todo FIXME: PHP doesn't support these socket constants (include/linux/in.h)
if( !defined( "IPPROTO_IP" ) ) {
define( "IPPROTO_IP", 0 );
define( "IP_MULTICAST_LOOP", 34 );
/**
* The DBMS-dependent part of query()
- * @todo Fixme: Make this private someday
+ * @todo FIXME: Make this private someday
*
* @param $sql String: SQL query.
* @return Result object to feed to fetchObject, fetchRow, ...; or false on failure
$res = $res->result;
}
@$row = pg_fetch_object( $res );
- # FIXME: HACK HACK HACK HACK debug
+ # @todo FIXME: HACK HACK HACK HACK debug
- # TODO:
- # hashar : not sure if the following test really trigger if the object
+ # @todo hashar: not sure if the following test really trigger if the object
# fetching failed.
if( pg_last_error( $this->mConn ) ) {
throw new DBUnexpectedError( $this, 'SQL error: ' . htmlspecialchars( pg_last_error( $this->mConn ) ) );
* Source items may be literals rather then field names, but strings should be quoted with Database::addQuotes()
* $conds may be "*" to copy the whole table
* srcTable may be an array of tables.
- * @todo FIXME: implement this a little better (seperate select/insert)?
+ * @todo FIXME: Implement this a little better (seperate select/insert)?
*/
function insertSelect( $destTable, $srcTable, $varMap, $conds, $fname = 'DatabasePostgres::insertSelect',
$insertOptions = array(), $selectOptions = array() )
function getReaderIndex( $group = false, $wiki = false ) {
global $wgReadOnly, $wgDBClusterTimeout, $wgDBAvgStatusPoll, $wgDBtype;
- # FIXME: For now, only go through all this for mysql databases
+ # @todo FIXME: For now, only go through all this for mysql databases
if ($wgDBtype != 'mysql') {
return $this->getWriterIndex();
}
* @param $titleObj Title object that the diff is associated with
* @param $old Integer: old ID we want to show and diff with.
* @param $new String: either 'prev' or 'next'.
+ * @todo FIXME: $rcid ???
* @param $rcid Integer: ??? FIXME (default 0)
* @param $refreshCache boolean If set, refreshes the diff cache
* @param $unhide boolean If set, allow viewing deleted revs
}
public function getPref( $pref ) {
- # FIXME: Return other prefs too. Lots of global-riddled code that does
+ # @todo FIXME: Return other prefs too. Lots of global-riddled code that does
# this normally.
if ( $pref === 'emailaddress'
&& $this->row->user_email_authenticated !== null ) {
}
public function getGroups() {
- # FIXME: Untested.
+ # @todo FIXME: Untested.
$groups = array();
$res = $this->mDb->select(
'user_groups',
return $this->mInfo['mime'];
}
- /// @todo Fixme: may guess wrong on file types that can be eg audio or video
+ /// @todo FIXME: May guess wrong on file types that can be eg audio or video
function getMediaType() {
$magic = MimeMagic::singleton();
return $magic->getMediaType( null, $this->getMimeType() );
$results[$k] = true;
unset( $files[$k] );
} elseif( self::isVirtualUrl( $f ) ) {
- # TODO! FIXME! We need to be able to handle virtual
+ # @todo FIXME: We need to be able to handle virtual
# URLs better, at least when we know they refer to the
# same repo.
$results[$k] = false;
}
}
- # FIXME: Delete old thumbs that aren't being used. Maintenance script?
+ # @todo FIXME: Delete old thumbs that aren't being used. Maintenance script?
wfSuppressWarnings();
if( !file_put_contents( $localFilename, $thumb ) ) {
wfRestoreWarnings();
if ( !$compiledDBs ) {
$this->showError( 'config-no-db', $wgLang->commaList( $allNames ) );
- // FIXME: this only works for the web installer!
+ // @todo FIXME: This only works for the web installer!
return false;
}
* Environment check for setting the preferred PHP file extension.
*/
protected function envCheckExtension() {
- // FIXME: detect this properly
+ // @todo FIXME: Detect this properly
if ( defined( 'MW_INSTALL_PHP5_EXT' ) ) {
$ext = 'php5';
} else {
$dir = $this->getVar( 'wgSQLiteDataDir' );
$dbName = $this->getVar( 'wgDBname' );
try {
- # FIXME: need more sensible constructor parameters, e.g. single associative array
+ # @todo FIXME: Need more sensible constructor parameters, e.g. single associative array
# Setting globals kind of sucks
$wgSQLiteDataDir = $dir;
$db = new DatabaseSqlite( false, false, false, $dbName );
* @param $value Mixed: the value being encoded. Can be any type except a resource.
* @param $isHtml Boolean
*
- * @fixme "$isHtml" parameter's purpose is not documented. It appears to
+ * @todo FIXME: "$isHtml" parameter's purpose is not documented. It appears to
* map to a parameter labeled "pretty-print output with indents and
* newlines" in Services_JSON::encode(), which has no string relation
* to HTML output.
# Don't thumbnail an image so big that it will fill hard drives and send servers into swap
# JPEG has the handy property of allowing thumbnailing without full decompression, so we make
# an exception for it.
- # FIXME: This actually only applies to ImageMagick
+ # @todo FIXME: This actually only applies to ImageMagick
if ( $mimeType !== 'image/jpeg' &&
$srcWidth * $srcHeight > $wgMaxImageArea )
{
* Constructor
*
* @param $file String: filename.
- * @fixme the following are broke:
+ * @todo FIXME: The following are broke:
* SubjectArea. Need to test the more obscure tags.
*
* DigitalZoomRatio = 0/0 is rejected. need to determine if that's valid.
wfDebug( __METHOD__ . ' metadata array with 0 elements!' );
return ""; // paranoia. This should never happen
}
- /* Fixme: This should hide some of the list entries if there are
- * say more than four. Especially if a field is translated into 20
- * languages, we don't want to show them all by default
- */
+ /* @todo FIXME: This should hide some of the list entries if there are
+ * say more than four. Especially if a field is translated into 20
+ * languages, we don't want to show them all by default
+ */
else {
global $wgContLang;
switch( $type ) {
*/
/**
- * FIXME: I don't really like this interface, it's not very flexible
+ * @todo FIXME: I don't really like this interface, it's not very flexible
* I think the media handler should generate HTML instead. It can do
* all the formatting according to some standard. That makes it possible
* to do things like visual indication of grouped and chained streams
continue;
}
- // fixme: currently timezones are ignored.
+ // @todo FIXME: Currently timezones are ignored.
// possibly should be wfTimestamp's
// responsibility. (at least for numeric TZ)
$formatted = wfTimestamp( TS_EXIF, $value );
* @return Boolean If it succeeded.
*/
public function parseExtended( $content ) {
- // FIXME: This is untested. Hard to find example files
+ // @todo FIXME: This is untested. Hard to find example files
// or programs that make such files..
$guid = substr( $content, 0, 32 );
if ( !isset( $this->results['xmp-special']['HasExtendedXMP'] )
* Return the size of the given page, or 0 if it's nonexistent. This is an
* expensive parser function and can't be called too many times per page.
*
- * @todo Fixme: This doesn't work correctly on preview for getting the size
+ * @todo FIXME: This doesn't work correctly on preview for getting the size
* of the current page.
- * @todo Fixme: Title::getLength() documentation claims that it adds things
+ * @todo FIXME: Title::getLength() documentation claims that it adds things
* to the link cache, so the local cache here should be unnecessary, but
* in fact calling getLength() repeatedly for the same $page does seem to
* run one query for each call?
}
/**
- * FIXME: update documentation. makeLinkObj() is deprecated.
+ * @todo FIXME: Update documentation. makeLinkObj() is deprecated.
* Replace <!--LINK--> link placeholders with actual links, in the buffer
* Placeholders created in Skin::makeLinkObj()
* Returns an array of link CSS classes, indexed by PDBK.
$pdbk = $title->getPrefixedDBkey();
$linkCache->addGoodLinkObj( $s->page_id, $title, $s->page_len, $s->page_is_redirect, $s->page_latest );
$output->addLink( $title, $s->page_id );
- # FIXME: convoluted data flow
+ # @todo FIXME: Convoluted data flow
# The redirect status and length is passed to getLinkColour via the LinkCache
# Use formal parameters instead
$colours[$pdbk] = Linker::getLinkColour( $title, $threshold );
$entry['pdbk'] = $varPdbk;
// set pdbk and colour
- # FIXME: convoluted data flow
+ # @todo FIXME: Convoluted data flow
# The redirect status and length is passed to getLinkColour via the LinkCache
# Use formal parameters instead
$colours[$varPdbk] = Linker::getLinkColour( $variantTitle, $threshold );
*/
public function uniqPrefix() {
if ( !isset( $this->mUniqPrefix ) ) {
- # @todo Fixme: this is probably *horribly wrong*
+ # @todo FIXME: This is probably *horribly wrong*
# LanguageConverter seems to want $wgParser's uniqPrefix, however
# if this is called for a parser cache hit, the parser may not
# have ever been initialized in the first place.
}
# NS_MEDIA is a pseudo-namespace for linking directly to a file
- # FIXME: Should do batch file existence checks, see comment below
+ # @todo FIXME: Should do batch file existence checks, see comment below
if ( $ns == NS_MEDIA ) {
wfProfileIn( __METHOD__."-media" );
# Give extensions a chance to select the file revision for us
# Some titles, such as valid special pages or files in foreign repos, should
# be shown as bluelinks even though they're not included in the page table
#
- # FIXME: isAlwaysKnown() can be expensive for file links; we should really do
+ # @todo FIXME: isAlwaysKnown() can be expensive for file links; we should really do
# batch file existence checks for NS_FILE and NS_MEDIA
if ( $iw == '' && $nt->isAlwaysKnown() ) {
$this->mOutput->addLink( $nt );
$output .= $this->openList( $char );
if ( ';' === $char ) {
- # FIXME: This is dupe of code above
+ # @todo FIXME: This is dupe of code above
if ( $this->findColonNoLinks( $t, $term, $t2 ) !== false ) {
$t = $t2;
$output .= $term . $this->nextItem( ':' );
$originalTitle = $part1;
# $args is a list of argument nodes, starting from index 0, not including $part1
- # *** FIXME if piece['parts'] is null then the call to getLength() below won't work b/c this $args isn't an object
+ # @todo FIXME: If piece['parts'] is null then the call to getLength() below won't work b/c this $args isn't an object
$args = ( null == $piece['parts'] ) ? array() : $piece['parts'];
wfProfileOut( __METHOD__.'-setup' );
wfProfileIn( __METHOD__."-title-$originalTitle" );
}
# (bug 8068) Allow control over whether robots index a page.
#
- # FIXME (bug 14899): __INDEX__ always overrides __NOINDEX__ here! This
+ # @todo FIXME: Bug 14899: __INDEX__ always overrides __NOINDEX__ here! This
# is not desirable, the last one on the page should win.
if ( isset( $this->mDoubleUnderscores['noindex'] ) && $this->mTitle->canUseNoindex() ) {
$this->mOutput->setIndexPolicy( 'noindex' );
# HTML names must be case-insensitively unique (bug 10721).
# This does not apply to Unicode characters per
# http://dev.w3.org/html5/spec/infrastructure.html#case-sensitivity-and-string-comparison
- # FIXME: We may be changing them depending on the current locale.
+ # @todo FIXME: We may be changing them depending on the current locale.
$arrayKey = strtolower( $safeHeadline );
if ( $legacyHeadline === false ) {
$legacyArrayKey = false;
return $text;
}
- # FIXME: regex doesn't respect extension tags or nowiki
+ # @todo FIXME: Regex doesn't respect extension tags or nowiki
# => Move this logic to braceSubstitution()
$substWord = MagicWord::get( 'subst' );
$substRegex = '/\{\{(?!(?:' . $substWord->getBaseRegex() . '))/x' . $substWord->getRegexCase();
}
/**
- * FIXME: update documentation. makeLinkObj() is deprecated.
+ * @todo FIXME: Update documentation. makeLinkObj() is deprecated.
* Replace <!--LINK--> link placeholders with actual links, in the buffer
* Placeholders created in Skin::makeLinkObj()
* Returns an array of link CSS classes, indexed by PDBK.
switch( $paramName ) {
case 'manualthumb':
case 'alt':
- # @todo Fixme: possibly check validity here for
+ # @todo FIXME: Possibly check validity here for
# manualthumb? downstream behavior seems odd with
# missing manual thumbs.
$validated = true;
$text = preg_replace( '/\[\[:?([^[|]+)\|([^[]+)\]\]/', '$2', $text );
$text = preg_replace( '/\[\[:?([^[]+)\|?\]\]/', '$1', $text );
- # Strip external link markup (FIXME: Not Tolerant to blank link text
+ # Strip external link markup
+ # @todo FIXME: Not tolerant to blank link text
# I.E. [http://www.mediawiki.org] will render as [1] or something depending
# on how many empty links there are on the page - need to figure that out.
$text = preg_replace( '/\[(?:' . wfUrlProtocols() . ')([^ ]+?) ([^[]+)\]/', '$2', $text );
$confstr .= '!*';
// add in language specific options, if any
- // FIXME: This is just a way of retrieving the url/user preferred variant
+ // @todo FIXME: This is just a way of retrieving the url/user preferred variant
$confstr .= $wgContLang->getExtraHashOptions();
$confstr .= $wgRenderHashAppend;
public function setBits( $bits ) {
# Queue the file op
- # FIXME: move to LocalFile.php
+ # @todo FIXME: Move to LocalFile.php
if ( $this->isDeleted() ) {
if ( $bits & File::DELETED_FILE ) {
# Still deleted
// View/modify link...
if ( count( $undeletedRevisions ) ) {
- // FIXME THIS IS A HORRIBLE HORRIBLE HACK AND SHOULD DIE
+ // @todo FIXME: THIS IS A HORRIBLE HORRIBLE HACK AND SHOULD DIE
// It's not possible to pass a list of both deleted and
// undeleted revisions to SpecialRevisionDelete, so we're
// stuck with two links. See bug 23363.
/**
- * @todo Fixme: This class is horribly factored. It would probably be better to
+ * @todo FIXME: This class is horribly factored. It would probably be better to
* have a useful base class to which you pass some standard information, then
* let the fancy self-highlighters extend that.
* @ingroup Search
2 => '/(\[\[)|(\]\])/', // image
3 => "/(\n\\{\\|)|(\n\\|\\})/" ); // table
- // FIXME: this should prolly be a hook or something
+ // @todo FIXME: This should prolly be a hook or something
if ( function_exists( 'wfCite' ) ) {
$spat .= '|(<ref>)'; // references via cite extension
$endPatterns[4] = '/(<ref>)|(<\/ref>)/';
$anyterm = implode( '|', $terms );
$phrase = implode( "$wgSearchHighlightBoundaries+", $terms );
- // FIXME: a hack to scale contextchars, a correct solution
+ // @todo FIXME: A hack to scale contextchars, a correct solution
// would be to have contextchars actually be char and not byte
// length, and do proper utf-8 substrings and lengths everywhere,
// but PHP is making that very hard and unclean to implement :(
/**
* Dummy class to be used when non-supported Database engine is present.
- * @todo Fixme: dummy class should probably try something at least mildly useful,
+ * @todo FIXME: Dummy class should probably try something at least mildly useful,
* such as a LIKE search through titles.
* @ingroup Search
*/
$lc = SearchEngine::legalSearchChars();
$this->searchTerms = array();
- # FIXME: This doesn't handle parenthetical expressions.
+ # @todo FIXME: This doesn't handle parenthetical expressions.
$m = array();
$q = array();
$lc = SearchEngine::legalSearchChars();
$this->searchTerms = array();
- # FIXME: This doesn't handle parenthetical expressions.
+ # @todo FIXME: This doesn't handle parenthetical expressions.
$m = array();
$q = array();
$searchon = '';
$this->searchTerms = array();
- # FIXME: This doesn't handle parenthetical expressions.
+ # @todo FIXME: This doesn't handle parenthetical expressions.
$m = array();
if( preg_match_all( '/([-+<>~]?)(([' . $lc . ']+)(\*?)|"[^"]*")/',
$filteredText, $m, PREG_SET_ORDER ) ) {
$lc = SearchEngine::legalSearchChars();
$this->searchTerms = array();
- # FIXME: This doesn't handle parenthetical expressions.
+ # @todo FIXME: This doesn't handle parenthetical expressions.
$m = array();
$searchon = '';
if (preg_match_all('/([-+<>~]?)(([' . $lc . ']+)(\*?)|"[^"]*")/',
/**
* Get an array of suggested block durations from MediaWiki:Ipboptions
- * FIXME: this uses a rather odd syntax for the options, should it be converted
+ * @todo FIXME: This uses a rather odd syntax for the options, should it be converted
* to the standard "**<duration>|<displayname>" format?
* @return Array
*/
* @param $nt Title object for the target
* @param $id Integer: User ID for the target
* @return String: appropriately-escaped HTML to be output literally
- * @todo Fixme: almost the same as getSubTitle in SpecialDeletedContributions.php. Could be combined.
+ * @todo FIXME: Almost the same as getSubTitle in SpecialDeletedContributions.php. Could be combined.
*/
protected function contributionsSub( $nt, $id ) {
global $wgLang, $wgUser, $wgOut;
$condition[] = 'rev_user >' . (int)($max - $max / 100);
$condition[] = 'ug_group IS NULL';
$index = 'user_timestamp';
- # FIXME: other groups may have 'bot' rights
+ # @todo FIXME: Other groups may have 'bot' rights
$join_conds['user_groups'] = array( 'LEFT JOIN', "ug_user = rev_user AND ug_group = 'bot'" );
} else {
$tables = array( 'page', 'revision' );
* @param $nt Title object for the target
* @param $id Integer: User ID for the target
* @return String: appropriately-escaped HTML to be output literally
- * @todo Fixme: almost the same as contributionsSub in SpecialContributions.php. Could be combined.
+ * @todo FIXME: Almost the same as contributionsSub in SpecialContributions.php. Could be combined.
*/
function getSubTitle( $nt, $id ) {
global $wgLang, $wgUser, $wgOut;
$dp = Title::newFromText($dMsgText);
if( $dp ) {
if( $dp->getNamespace() != NS_TEMPLATE ) {
- # FIXME we assume the disambiguation message is a template but
+ # @todo FIXME: We assume the disambiguation message is a template but
# the page can potentially be from another namespace :/
wfDebug("Mediawiki:disambiguationspage message does not refer to a template!\n");
}
wfDebug("Mediawiki:disambiguationspage message does not link to any templates!\n");
}
- // FIXME: What are pagelinks and p2 doing here?
+ // @todo FIXME: What are pagelinks and p2 doing here?
return array (
'tables' => array( 'templatelinks', 'p1' => 'page', 'pagelinks', 'p2' => 'page' ),
'fields' => array( 'p1.page_namespace AS namespace',
$t = Title::makeTitleSafe( NS_MAIN, $catname );
if ( $t ) {
/**
- * @todo Fixme: this can lead to hitting memory limit for very large
+ * @todo FIXME: This can lead to hitting memory limit for very large
* categories. Ideally we would do the lookup synchronously
* during the export in a single query.
*/
if( $title ) {
$pageSet[$title->getPrefixedText()] = true;
- /// @todo Fixme: May or may not be more efficient to batch these
+ /// @todo FIXME: May or may not be more efficient to batch these
/// by namespace when given multiple input pages.
$result = $dbr->select(
array( 'page', $table ),
return $wgOut->permissionRequired( 'import' );
}
- # TODO: allow Title::getUserPermissionsErrors() to take an array
- # FIXME: Title::checkSpecialsAndNSPermissions() has a very wierd expectation of what
+ # @todo Allow Title::getUserPermissionsErrors() to take an array
+ # @todo FIXME: Title::checkSpecialsAndNSPermissions() has a very wierd expectation of what
# getUserPermissionsErrors() might actually be used for, hence the 'ns-specialprotected'
$errors = wfMergeErrorArrays(
$this->getTitle()->getUserPermissionsErrors(
# Do the actual move.
$error = $ot->moveTo( $nt, true, $this->reason, $createRedirect );
if ( $error !== true ) {
- # FIXME: show all the errors in a list, not just the first one
+ # @todo FIXME: Show all the errors in a list, not just the first one
$this->showForm( reset( $error ) );
return;
}
#
# If the target namespace doesn't allow subpages, moving with subpages
# would mean that you couldn't move them back in one operation, which
- # is bad. FIXME: A specific error message should be given in this
- # case.
+ # is bad.
+ # @todo FIXME: A specific error message should be given in this case.
- // FIXME: Use Title::moveSubpages() here
+ // @todo FIXME: Use Title::moveSubpages() here
$dbr = wfGetDB( DB_MASTER );
if( $this->moveSubpages && (
MWNamespace::hasSubpages( $nt->getNamespace() ) || (
# Re-clear the file redirect cache, which may have been polluted by
# parsing in messages above. See CR r56745.
- # FIXME: needs a more robust solution inside FileRepo.
+ # @todo FIXME: Needs a more robust solution inside FileRepo.
if( $ot->getNamespace() == NS_FILE ) {
RepoGroup::singleton()->getLocalRepo()->invalidateImageRedirect( $ot );
}
);
// Disable some if needed
- # FIXME: throws E_NOTICEs if not set; and doesn't obey hooks etc.
+ # @todo FIXME: Throws E_NOTICEs if not set; and doesn't obey hooks etc.
if ( $wgGroupPermissions['*']['createpage'] !== true ) {
unset( $filters['hideliu'] );
}
if ( $result->isGood() ) {
return true;
} else {
- // FIXME: The email didn't send, but we have already set the password throttle
+ // @todo FIXME: The email didn't send, but we have already set the password throttle
// timestamp, so they won't be able to try again until it expires... :(
return array( array( 'mailerror', $result->getMessage() ) );
}
list( $namespace, $prefixKey, $prefix ) = $prefixList;
list( /* $fromNS */, $fromKey, ) = $fromList;
- ### FIXME: should complain if $fromNs != $namespace
+ ### @todo FIXME: Should complain if $fromNs != $namespace
$dbr = wfGetDB( DB_SLAVE );
)
);
- ### FIXME: side link to previous
+ ### @todo FIXME: Side link to previous
$n = 0;
if( $res->numRows() > 0 ) {
/**
* Show some introductory text
- * FIXME Wikimedia-specific policy text
+ * @todo FIXME: Wikimedia-specific policy text
*/
protected function addUsageText() {
global $wgOut, $wgUser;
*
* @ingroup SpecialPage
*/
-// FIXME: Use an instance of UncategorizedPagesPage or something
+// @todo FIXME: Use an instance of UncategorizedPagesPage or something
class UncategorizedImagesPage extends ImageQueryPage {
function __construct( $name = 'Uncategorizedimages' ) {
*
* @ingroup SpecialPage
*/
-// FIXME: Make $requestedNamespace selectable, unify all subclasses into one
+// @todo FIXME: Make $requestedNamespace selectable, unify all subclasses into one
class UncategorizedPagesPage extends PageQueryPage {
protected $requestedNamespace = false;
$sk = $wgUser->getSkin();
$isDeleted = !( $rev->getId() && $rev->getTitle() );
if( $isDeleted ) {
- /// @todo Fixme: $rev->getTitle() is null for deleted revs...?
+ /// @todo FIXME: $rev->getTitle() is null for deleted revs...?
$targetPage = $this->getTitle();
$targetQuery = array(
'target' => $this->mTargetObj->getPrefixedText(),
'timestamp' => wfTimestamp( TS_MW, $rev->getTimestamp() )
);
} else {
- /// @todo Fixme getId() may return non-zero for deleted revs...
+ /// @todo FIXME: getId() may return non-zero for deleted revs...
$targetPage = $rev->getTitle();
$targetQuery = array( 'oldid' => $rev->getId() );
}
'label-message' => 'destfilename',
'size' => 60,
'default' => $this->mDestFile,
- # FIXME: hack to work around poor handling of the 'default' option in HTMLForm
+ # @todo FIXME: Hack to work around poor handling of the 'default' option in HTMLForm
'nodata' => strval( $this->mDestFile ) !== '',
),
'UploadDescription' => array(
}
if( !$this->userCanChangeRights( $wgUser, true ) ) {
- // fixme... there may be intermediate groups we can mention.
+ // @todo FIXME: There may be intermediate groups we can mention.
$wgOut->showPermissionsErrorPage( array( array(
$wgUser->isAnon()
? 'userrights-nologin'
if ( $inc ) {
@list( $limit, $nlinks ) = explode( '/', $par, 2 );
$this->limit = (int)$limit;
- // FIXME: nlinks is ignored
+ // @todo FIXME: nlinks is ignored
$nlinks = $nlinks === 'nlinks';
$this->offset = 0;
} else {
$chunk = trim( $chunk );
- # FIXME: convert from UTF-16 if necessarry!
+ # @todo FIXME: Convert from UTF-16 if necessarry!
wfDebug( __METHOD__ . ": checking for embedded scripts and HTML stuff\n" );
# check for HTML doctype
if ( strpos( $code, '/' ) === false ) {
$txt = MessageCache::singleton()->get( 'Conversiontable', true, $code );
if ( $txt === false ) {
- # FIXME: this method doesn't seem to be expecting
+ # @todo FIXME: This method doesn't seem to be expecting
# this possible outcome...
$txt = '<Conversiontable>';
}
* Temporary hack for bug 9413: replace Arabic presentation forms with their
* standard equivalents.
*
- * FIXME: This is language-specific for now only to avoid the negative
+ * @todo FIXME: This is language-specific for now only to avoid the negative
* performance impact of enabling it for all languages.
*/
function normalize( $s ) {
function convertPlural( $count, $forms ) {
if ( !count( $forms ) ) { return ''; }
- // FIXME: CLDR defines 4 plural forms instead of 3
+ // @todo FIXME: CLDR defines 4 plural forms instead of 3
// http://unicode.org/repos/cldr-tmp/trunk/diff/supplemental/language_plural_rules.html
$forms = $this->preConvertPlural( $forms, 3 );
// if no number with word, then use $form[0] for singular and $form[1] for plural or zero
if ( count( $forms ) === 2 ) return $count == 1 ? $forms[0] : $forms[1];
- // FIXME: CLDR defines 4 plural forms instead of 3
+ // @todo FIXME: CLDR defines 4 plural forms instead of 3
// http://unicode.org/repos/cldr-tmp/trunk/diff/supplemental/language_plural_rules.html
$forms = $this->preConvertPlural( $forms, 3 );
if ( !count( $forms ) ) { return ''; }
$forms = $this->preConvertPlural( $forms, 3 );
- // FIXME: CLDR defines 4 plural forms instead of 3. Plural for decimals is missing.
+ // @todo FIXME: CLDR defines 4 plural forms instead of 3. Plural for decimals is missing.
// http://unicode.org/repos/cldr-tmp/trunk/diff/supplemental/language_plural_rules.html
if ( $count > 10 && floor( ( $count % 100 ) / 10 ) == 1 ) {
return $forms[2];
function convertPlural( $count, $forms ) {
if ( !count( $forms ) ) { return ''; }
- // FIXME: CLDR defines 4 plural forms; very different, actually.
+ // @todo FIXME: CLDR defines 4 plural forms; very different, actually.
// See http://unicode.org/repos/cldr-tmp/trunk/diff/supplemental/language_plural_rules.html#cy
$forms = $this->preConvertPlural( $forms, 6 );
$count = abs( $count );
function convertPlural( $count, $forms ) {
if ( !count( $forms ) ) { return ''; }
- // FIXME: CLDR defines 4 plural forms instead of 3. Plural for for decimals is missing.
+ // @todo FIXME: CLDR defines 4 plural forms instead of 3. Plural for for decimals is missing.
// http://unicode.org/repos/cldr-tmp/trunk/diff/supplemental/language_plural_rules.html
$forms = $this->preConvertPlural( $forms, 3 );
function convertPlural( $count, $forms ) {
if ( !count( $forms ) ) { return ''; }
- // FIXME: CLDR defines 3 plural forms instead of 2. Form for 0 is missing.
+ // @todo FIXME: CLDR defines 3 plural forms instead of 2. Form for 0 is missing.
// http://unicode.org/repos/cldr-tmp/trunk/diff/supplemental/language_plural_rules.html#lv
$forms = $this->preConvertPlural( $forms, 2 );
* bug 9413. Also fixes miscellaneous problems due to mishandling of ZWJ,
* e.g. bug 11162.
*
- * FIXME: This is language-specific for now only to avoid the negative
+ * @todo FIXME: This is language-specific for now only to avoid the negative
* performance impact of enabling it for all languages.
*/
function normalize( $s ) {
// if no number with word, then use $form[0] for singular and $form[1] for plural or zero
if ( count( $forms ) === 2 ) return $count == 1 ? $forms[0] : $forms[1];
- // FIXME: CLDR defines 4 plural forms. Form with decimals missing.
+ // @todo FIXME: CLDR defines 4 plural forms. Form with decimals missing.
// See http://unicode.org/repos/cldr-tmp/trunk/diff/supplemental/language_plural_rules.html#ru
$forms = $this->preConvertPlural( $forms, 3 );
// if no number with word, then use $form[0] for singular and $form[1] for plural or zero
if ( count( $forms ) === 2 ) return $count == 1 ? $forms[0] : $forms[1];
- // FIXME: CLDR defines 4 plural forms. Form with decimals missing.
+ // @todo FIXME: CLDR defines 4 plural forms. Form with decimals missing.
// See http://unicode.org/repos/cldr-tmp/trunk/diff/supplemental/language_plural_rules.html#sh
$forms = $this->preConvertPlural( $forms, 3 );
return $count == 1 ? $forms[0] : $forms[1];
}
- // FIXME: CLDR defines 4 plural forms. Form with decimals missing.
+ // @todo FIXME: CLDR defines 4 plural forms. Form with decimals missing.
// See http://unicode.org/repos/cldr-tmp/trunk/diff/supplemental/language_plural_rules.html#ru
$forms = $this->preConvertPlural( $forms, 3 );
// if no number with word, then use $form[0] for singular and $form[1] for plural or zero
if ( count( $forms ) === 2 ) return $count == 1 ? $forms[0] : $forms[1];
- // FIXME: CLDR defines 4 plural forms. Form for decimals is missing/
+ // @todo FIXME: CLDR defines 4 plural forms. Form for decimals is missing/
// See http://unicode.org/repos/cldr-tmp/trunk/diff/supplemental/language_plural_rules.html#uk
$forms = $this->preConvertPlural( $forms, 3 );
/**
* Eventually this should be a word segmentation;
* for now just treat each character as a word.
- * @todo Fixme: only do this for Han characters...
+ * @todo FIXME: Only do this for Han characters...
*/
function segmentByWord( $string ) {
$reg = "/([\\xc0-\\xff][\\x80-\\xbf]*)/";
/**
* Eventually this should be a word segmentation;
* for now just treat each character as a word.
- * @todo Fixme: only do this for Han characters...
+ * @todo FIXME: Only do this for Han characters...
*/
function segmentByWord( $string ) {
$reg = "/([\\xc0-\\xff][\\x80-\\xbf]*)/";
*
*/
-# FIXME: inherit almost everything for now
+# @todo FIXME: Inherit almost everything for now
$rtl = true;
$digitTransformTable = array(
$this->output( "DRY RUN: would rename $path to $finalPath\n" );
} else {
$this->output( "renaming $path to $finalPath\n" );
- // XXX: should this use File::move()? FIXME?
+ // @todo FIXME: Should this use File::move()?
$db->begin();
$db->update( 'image',
array( 'img_name' => $final ),
MWFunction::call( MW_CONFIG_CALLBACK );
} elseif ( file_exists( "$IP/wmf-config/wikimedia-mode" ) ) {
// Load settings, using wikimedia-mode if needed
- // Fixme: replace this hack with general farm-friendly code
- # TODO FIXME! Wikimedia-specific stuff needs to go away to an ext
+ // @todo FIXME: Replace this hack with general farm-friendly code
+ # @todo FIXME: Wikimedia-specific stuff needs to go away to an ext
# Maybe a hook?
global $cluster;
$wgWikiFarm = true;
}
} else {
$jobs[] = $job;
- // FIXME: hardcoded constant 10000 copied from DoubleRedirectJob class
+ // @todo FIXME: Hardcoded constant 10000 copied from DoubleRedirectJob class
if ( count( $jobs ) > 10000 ) {
$this->queueJobs( $jobs, $dryrun );
$jobs = array();
// API watchlist feed mode.
private static function feedwatchlistMode() {
- // FIXME: add "wikiFuzz::makeFuzz(2)" as possible value below?
+ // @todo FIXME: Add "wikiFuzz::makeFuzz(2)" as possible value below?
return array ( "feedformat" => wikiFuzz::chooseInput( array( "rss", "atom" ) ) );
}
// API query mode.
private static function queryMode() {
- // FIXME: add "wikiFuzz::makeFuzz(2)" as possible params for the elements below?
+ // @todo FIXME: Add "wikiFuzz::makeFuzz(2)" as possible params for the elements below?
// Suspect this will stuff up the tests more, but need to check.
$params = array (
- // FIXME: More titles.
+ // @todo FIXME: More titles.
"titles" => wikiFuzz::chooseInput( array( "Main Page" ) ),
- // FIXME: More pageids.
+ // @todo FIXME: More pageids.
"pageids" => 1,
"prop" => wikiFuzz::chooseInput( array( "info", "revisions", "watchlist" ) ),
"list" => wikiFuzz::chooseInput( array( "allpages", "logevents", "watchlist", "usercontribs", "recentchanges", "backlinks", "embeddedin", "imagelinks" ) ),
$this->params["action"] = $action;
// Set the cookie:
- // FIXME: need to get this cookie dynamically set, rather than hard-coded.
+ // @todo FIXME: Need to get this cookie dynamically set, rather than hard-coded.
$this->cookie = "wikidbUserID=10001; wikidbUserName=Test; wikidb_session=178df0fe68c75834643af65dec9ec98a; wikidbToken=1adc6753d62c44aec950c024d7ae0540";
// Output format
}
/**
- * @fixme don't use /e
+ * @todo FIXME: Don't use /e
*/
private function mungeToUtf8( $string ) {
$string = preg_replace ( '/&#([0-9]+);/e', 'wfUtf8Sequence($1)', $string );
$versionNumber = getSvnRevision( $input );
if ( $versionNumber === false ) { # Not using subversion ?
$svnstat = ''; # Not really useful if subversion not available
- $version = 'trunk'; # FIXME
+ # @todo FIXME
+ $version = 'trunk';
} else {
$version = "trunk (r$versionNumber)";
}
$imageTable = $dbw->tableName( 'image' );
if ( $method == 'pipe' ) {
- // @fixme kill this and replace with a second unbuffered DB connection.
+ // @todo FIXME: Kill this and replace with a second unbuffered DB connection.
global $wgDBuser, $wgDBserver, $wgDBpassword, $wgDBname;
$cmd = 'mysql -u' . wfEscapeShellArg( $wgDBuser ) .
' -h' . wfEscapeShellArg( $wgDBserver ) .
wfTimestamp( TS_RFC2822, '0117-08-09 12:34:56'),
'Death of Roman Emperor [[Trajan]]');
- /* FIXME: 00 to 101 years are taken as being in [1970-2069] */
+ /* @todo FIXME: 00 to 101 years are taken as being in [1970-2069] */
$this->assertEquals( 'Sun, 01 Jan 0101 00:00:00 GMT',
wfTimestamp( TS_RFC2822, '-58979923200'),
$old_log_file = $wgDebugLogFile;
$wgDebugLogFile = tempnam( wfTempDir(), 'mw-' );
- $wgDebugTimestamps = false; # FIXME: this setting should be tested
+ # @todo FIXME: This setting should be tested
+ $wgDebugTimestamps = false;
/*
// ISO 15924 :
array( 'sr-Cyrl', 'sr-Cyrl' ),
- array( 'SR-lATN', 'sr-Latn' ), # FIXME fix our function?
+ # @todo FIXME: Fix our function?
+ array( 'SR-lATN', 'sr-Latn' ),
array( 'fr-latn', 'fr-Latn' ),
// Use lowercase for single segment
// ISO 3166-1-alpha-2 code
* @covers IP::toUnsigned
*/
public function testip2longWrapper() {
- // fixme : add more tests ?
+ // @todo FIXME: Add more tests ?
$this->assertEquals( pow(2,32) - 1, IP::toUnsigned( '255.255.255.255' ));
$i = 'IN.VA.LI.D';
$this->assertFalse( IP::toUnSigned( $i ) );
$this->assertEquals( array( 0, 0 ), IP::parseCIDR('0.0.0.0/0') );
$this->assertEquals( array( 0, 0 ), IP::parseCIDR('255.255.255.255/0') );
- // FIXME : add more tests.
+ // @todo FIXME: Add more tests.
# This part test network shifting
$this->assertNet( '192.0.0.0' , '192.0.0.2/24' );
*/
public function testIsMovable() {
$this->assertFalse( MWNamespace::isMovable( NS_CATEGORY ) );
- # FIXME : write more tests!!
+ # @todo FIXME: Write more tests!!
}
/**
// Tests that user defined namespace #252 is not content:
$this->assertFalse( MWNamespace::isContent( 252 ) );
- # FIXME: is global saving really required for PHPUnit?
+ # @todo FIXME: Is global saving really required for PHPUnit?
// Bless namespace # 252 as a content namespace
global $wgContentNamespaces;
$savedGlobal = $wgContentNamespaces;
array( '/wiki/edit/Recentchanges?foo=A&bar=1', 'Recentchanges', 'foo=A&action=edit&bar=1' ),
array( '/wiki/edit/Recentchanges?foo=A&bar=1', 'Recentchanges', 'action=edit&foo=A&bar=1' ),
- # FIXME The next two are equals but need investigation:
+ # @todo FIXME: The next two are equals but need investigation:
array( '/wiki/edit/Recentchanges', 'Recentchanges', 'action=view&action=edit' ),
array( '/wiki/view/Recentchanges?action=edit&action=view', 'Recentchanges', 'action=edit&action=view' ),
);
*/
function testGetLocalUrlWithVariantArticlePaths( $expected, $dbkey, $query )
{
- # FIXME find a language with variants!
+ # @todo FIXME: Find a language with variants!
$this->markTestIncomplete();
$actions = array( 'edit' => '/wiki/edit/$1' );
"Date menu next month is 11 months ago"
);
- # FIXME: please note there is no year there!
+ # @todo FIXME: Please note there is no year there!
$this->assertEquals(
'<label for="year">From year (and earlier):</label> <input name="year" size="4" value="" id="year" maxlength="4" /> <label for="month">From month (and earlier):</label> <select id="month" name="month" class="mw-month-selector"><option value="-1">all</option>
<option value="1">January</option>
}
############### TESTS #############################################
- # FIXME:
+ # @todo FIXME:
# - those got copy pasted, we can probably make them cleaner
# - tests are lacking useful messages
# Filter out rc_timestamp conditions which depends on the test runtime
# This condition is not needed as of march 2, 2011 -- hashar
- # FIXME: find a way to generate the correct rc_timestamp
+ # @todo FIXME: Find a way to generate the correct rc_timestamp
$queryConditions = array_filter(
$this->rc->buildMainQueryConds( $formOptions ),
'SpecialRecentchangesTest::filterOutRcTimestampCondition'
$output = array();
$user = $_ENV['USER'];
- // @fixme this should be a little more generalized :)
+ // @todo FIXME: This should be a little more generalized :)
if (PHP_OS == 'Darwin') {
// Mac OS X's ps barfs on the 'w' param, but doesn't need it.
$ps = "ps -U %s";