$timestamp = 0, $auto = 0, $expiry = '', $anonOnly = 0, $createAccount = 0, $enableAutoblock = 0,
$hideName = 0, $blockEmail = 0, $allowUsertalk = 0, $byText = '' )
{
- if( $timestamp === 0 ){
+ if( $timestamp === 0 ) {
$timestamp = wfTimestampNow();
}
*/
public function load( $address = '', $user = 0 ) {
wfDeprecated( __METHOD__, '1.18' );
- if( $user ){
+ if( $user ) {
$username = User::whoIs( $user );
$block = self::newFromTarget( $username, $address );
} else {
$block = self::newFromTarget( null, $address );
}
- if( $block instanceof Block ){
+ if( $block instanceof Block ) {
# This is mildly evil, but hey, it's B/C :D
- foreach( $block as $variable => $value ){
+ foreach( $block as $variable => $value ) {
$this->$variable = $value;
}
return true;
protected function newLoad( $vagueTarget = null ) {
$db = wfGetDB( $this->mFromMaster ? DB_MASTER : DB_SLAVE );
- if( $this->type !== null ){
+ if( $this->type !== null ) {
$conds = array(
'ipb_address' => array( (string)$this->target ),
);
# Be aware that the != '' check is explicit, since empty values will be
# passed by some callers (bug 29116)
- if( $vagueTarget != ''){
+ if( $vagueTarget != '' ) {
list( $target, $type ) = self::parseTarget( $vagueTarget );
switch( $type ) {
case self::TYPE_USER:
# This is begging for $this = $bestBlock, but that's not allowed in PHP :(
$bestBlockPreventsEdit = null;
- foreach( $res as $row ){
+ foreach( $res as $row ) {
$block = self::newFromRow( $row );
# Don't use expired blocks
- if( $block->deleteIfExpired() ){
+ if( $block->deleteIfExpired() ) {
continue;
}
# Don't use anon only blocks on users
- if( $this->type == self::TYPE_USER && !$block->isHardblock() ){
+ if( $this->type == self::TYPE_USER && !$block->isHardblock() ) {
continue;
}
- if( $block->getType() == self::TYPE_RANGE ){
+ if( $block->getType() == self::TYPE_RANGE ) {
# This is the number of bits that are allowed to vary in the block, give
# or take some floating point errors
$end = wfBaseconvert( $block->getRangeEnd(), 16, 10 );
$score = $block->getType();
}
- if( $score < $bestBlockScore ){
+ if( $score < $bestBlockScore ) {
$bestBlockScore = $score;
$bestRow = $row;
$bestBlockPreventsEdit = $block->prevents( 'edit' );
}
}
- if( $bestRow !== null ){
+ if( $bestRow !== null ) {
$this->initFromRow( $bestRow );
$this->prevents( 'edit', $bestBlockPreventsEdit );
return true;
protected static function getIpFragment( $hex ) {
global $wgBlockCIDRLimit;
if ( substr( $hex, 0, 3 ) == 'v6-' ) {
- return 'v6-' . substr( substr( $hex, 3 ), 0, floor( $wgBlockCIDRLimit['IPv6'] / 4 ) );
+ return 'v6-' . substr( substr( $hex, 3 ), 0, floor( $wgBlockCIDRLimit['IPv6'] / 4 ) );
} else {
- return substr( $hex, 0, floor( $wgBlockCIDRLimit['IPv4'] / 4 ) );
+ return substr( $hex, 0, floor( $wgBlockCIDRLimit['IPv4'] / 4 ) );
}
}
* @return Array
*/
protected function getDatabaseArray( $db = null ) {
- if( !$db ){
+ if( !$db ) {
$db = wfGetDB( DB_SLAVE );
}
$expiry = $db->encodeExpiry( $this->mExpiry );
$options['LIMIT'] = 1;
$res = $dbr->select( 'recentchanges', array( 'rc_ip' ), $conds,
- __METHOD__ , $options );
+ __METHOD__, $options );
if ( !$res->numRows() ) {
# No results, don't autoblock anything
public static function newFromTarget( $specificTarget, $vagueTarget = null, $fromMaster = false ) {
list( $target, $type ) = self::parseTarget( $specificTarget );
- if( $type == Block::TYPE_ID || $type == Block::TYPE_AUTO ){
+ if( $type == Block::TYPE_ID || $type == Block::TYPE_AUTO ) {
return Block::newFromID( $target );
- } elseif( $target === null && $vagueTarget == '' ){
+ } elseif( $target === null && $vagueTarget == '' ) {
# We're not going to find anything useful here
# Be aware that the == '' check is explicit, since empty values will be
# passed by some callers (bug 29116)
$block = new Block();
$block->fromMaster( $fromMaster );
- if( $type !== null ){
+ if( $type !== null ) {
$block->setTarget( $target );
}
- if( $block->newLoad( $vagueTarget ) ){
+ if( $block->newLoad( $vagueTarget ) ) {
return $block;
}
}
*/
public static function parseTarget( $target ) {
# We may have been through this before
- if( $target instanceof User ){
- if( IP::isValid( $target->getName() ) ){
+ if( $target instanceof User ) {
+ if( IP::isValid( $target->getName() ) ) {
return array( $target, self::TYPE_IP );
} else {
return array( $target, self::TYPE_USER );
}
- } elseif( $target === null ){
+ } elseif( $target === null ) {
return array( null, null );
}
# Consider the possibility that this is not a username at all
# but actually an old subpage (bug #29797)
- if( strpos( $target, '/' ) !== false ){
+ if( strpos( $target, '/' ) !== false ) {
# An old subpage, drill down to the user behind it
$parts = explode( '/', $target );
$target = $parts[0];
*/
protected function recentChangesFlags( $flags, $nothing = ' ' ) {
$f = '';
- foreach( array( 'newpage', 'minor', 'bot', 'unpatrolled' ) as $flag ){
+ foreach( array( 'newpage', 'minor', 'bot', 'unpatrolled' ) as $flag ) {
$f .= isset( $flags[$flag] ) && $flags[$flag]
? self::flag( $flag )
: $nothing;
array( 'class' => 'mw-changeslist-title' ),
$params
);
- if( $this->isDeleted($rc,Revision::DELETED_TEXT) ) {
+ if( $this->isDeleted( $rc, Revision::DELETED_TEXT ) ) {
$articlelink = '<span class="history-deleted">' . $articlelink . '</span>';
}
# To allow for boldening pages watched by this user
$this->rc_cache['@@' . ($this->rcMoveIndex++)] = array($rc);
} else {
# Logs are grouped by type
- if( $type == RC_LOG ){
+ if( $type == RC_LOG ) {
$secureName = SpecialPage::getTitleFor( 'Log', $logType )->getPrefixedDBkey();
}
if( !isset( $this->rc_cache[$secureName] ) ) {
$this->isConflict = false;
wfDebug( __METHOD__ . ": conflict suppressed; new section\n" );
}
- } elseif ( $this->section == '' && Revision::userWasLastToEdit( DB_MASTER, $this->mTitle->getArticleID(),
+ } elseif ( $this->section == '' && Revision::userWasLastToEdit( DB_MASTER, $this->mTitle->getArticleID(),
$wgUser->getId(), $this->edittime ) ) {
# Suppress edit conflict with self, except for section edits where merging is required.
wfDebug( __METHOD__ . ": Suppressing edit conflict, same user.\n" );
* @return bool
* @deprecated since 1.21, use mergeChangesIntoContent() instead
*/
- function mergeChangesInto( &$editText ){
+ function mergeChangesInto( &$editText ) {
ContentHandler::deprecated( __METHOD__, "1.21" );
$editContent = $this->toEditContent( $editText );
*
* @return bool
*/
- private function mergeChangesIntoContent( &$editContent ){
+ private function mergeChangesIntoContent( &$editContent ) {
wfProfileIn( __METHOD__ );
$db = wfGetDB( DB_MASTER );
global $wgOut, $wgLang;
$this->textbox2 = $this->textbox1;
- if( is_array( $match ) ){
+ if( is_array( $match ) ) {
$match = $wgLang->listToText( $match );
}
$wgOut->prepareErrorPage( wfMessage( 'spamprotectiontitle' ) );
$this->msg = $msg;
$this->params = $params;
- if( $msg instanceof Message ){
+ if( $msg instanceof Message ) {
parent::__construct( $msg );
} else {
parent::__construct( wfMessage( $msg )->text() );
* @ingroup Exception
*/
class ReadOnlyError extends ErrorPageError {
- public function __construct(){
+ public function __construct() {
parent::__construct(
'readonly',
'readonlytext',
* @ingroup Exception
*/
class ThrottledError extends ErrorPageError {
- public function __construct(){
+ public function __construct() {
parent::__construct(
'actionthrottled',
'actionthrottledtext'
);
}
- public function report(){
+ public function report() {
global $wgOut;
$wgOut->setStatusCode( 503 );
parent::report();
* @ingroup Exception
*/
class UserBlockedError extends ErrorPageError {
- public function __construct( Block $block ){
+ public function __construct( Block $block ) {
global $wgLang, $wgRequest;
$blocker = $block->getBlocker();
* @param $content String|Message: content of the message
* @param $header String|Message: content of the header (\<title\> and \<h1\>)
*/
- public function __construct( $httpCode, $content, $header = null ){
+ public function __construct( $httpCode, $content, $header = null ) {
parent::__construct( $content );
$this->httpCode = (int)$httpCode;
$this->header = $header;
$join['revision'] = array( 'INNER JOIN', 'page_id=rev_page' );
} elseif ( $this->history & WikiExporter::CURRENT ) {
# Latest revision dumps...
- if ( $this->list_authors && $cond != '' ) { // List authors, if so desired
+ if ( $this->list_authors && $cond != '' ) { // List authors, if so desired
$this->do_list_authors( $cond );
}
$join['revision'] = array( 'INNER JOIN', 'page_id=rev_page AND page_latest=rev_id' );
'URL' => $image->getCanonicalURL()
)
);
- } else{
+ } else {
$urls = array();
}
} else {
* a local user.
* @return Mixed User if the account is linked, Null otherwise.
*/
- final public function getLocalUser(){
+ final public function getLocalUser() {
$dbr = wfGetDB( DB_SLAVE );
$row = $dbr->selectRow(
'external_user',
* @throws MWException
*/
function compress() {
- if ( !function_exists( 'xdiff_string_rabdiff' ) ){
+ if ( !function_exists( 'xdiff_string_rabdiff' ) ) {
throw new MWException( "Need xdiff 1.5+ support to write DiffHistoryBlob\n" );
}
if ( isset( $this->mDiffs ) ) {
params( count( $otherSizes ) )->parse()
);
}
- } elseif ( $width == 0 && $height == 0 ){
+ } elseif ( $width == 0 && $height == 0 ) {
# Some sort of audio file that doesn't have dimensions
# Don't output a no hi res message for such a file
$msgsmall = '';
protected function getThumbForLine( $file ) {
$lang = $this->getLanguage();
$user = $this->getUser();
- if ( $file->allowInlineDisplay() && $file->userCan( File::DELETED_FILE,$user )
+ if ( $file->allowInlineDisplay() && $file->userCan( File::DELETED_FILE, $user )
&& !$file->isDeleted( File::DELETED_FILE ) )
{
$params = array(
return Status::newFatal( 'importnofile' );
}
if( !empty( $upload['error'] ) ) {
- switch($upload['error']){
+ switch( $upload['error'] ) {
case 1: # The uploaded file exceeds the upload_max_filesize directive in php.ini.
return Status::newFatal( 'importuploaderrorsize' );
case 2: # The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the HTML form.
function replaceMultiple( $magicarr, $subject, &$result ) {
$search = array();
$replace = array();
- foreach( $magicarr as $id => $replacement ){
+ foreach( $magicarr as $id => $replacement ) {
$mw = MagicWord::get( $id );
$search[] = $mw->getRegex();
$replace[] = $replacement;
if( preg_match( '/^<p>(.*)\n?<\/p>\n?$/sU', $string, $m ) ) {
$string = $m[1];
}
- } elseif( $this->format === 'block-parse' ){
+ } elseif( $this->format === 'block-parse' ) {
$string = $this->parseText( $string );
- } elseif( $this->format === 'text' ){
+ } elseif( $this->format === 'text' ) {
$string = $this->transformText( $string );
- } elseif( $this->format === 'escaped' ){
+ } elseif( $this->format === 'escaped' ) {
$string = $this->transformText( $string );
$string = htmlspecialchars( $string, ENT_QUOTES, 'UTF-8', false );
}
$httpaccept = isset( $_SERVER['HTTP_ACCEPT'] ) ? $_SERVER['HTTP_ACCEPT'] : null;
$rdftype = wfNegotiateType( wfAcceptToPrefs( $httpaccept ), wfAcceptToPrefs( self::RDF_TYPE_PREFS ) );
- if( !$rdftype ){
+ if( !$rdftype ) {
throw new HttpError( 406, wfMessage( 'notacceptable' ) );
}
$lastEditor = User::newFromId( $this->mArticle->getUser() );
$this->person( 'creator', $lastEditor );
- foreach( $this->mArticle->getContributors() as $user ){
+ foreach( $this->mArticle->getContributors() as $user ) {
$this->person( 'contributor', $user );
}
$nt = Title::newFromText( $page );
}
- if( !$nt || $nt->getArticleID() == 0 ){
+ if( !$nt || $nt->getArticleID() == 0 ) {
$this->element( $name, $str );
} else {
$this->page( $name, $nt );
}
protected function person( $name, User $user ) {
- if( $user->isAnon() ){
+ if( $user->isAnon() ) {
$this->element( $name, wfMessage( 'anonymous' )->numParams( 1 )->text() );
} else {
$real = $user->getRealName();
global $wgRightsPage, $wgRightsUrl, $wgRightsText;
if( $wgRightsPage && ( $nt = Title::newFromText( $wgRightsPage ) )
- && ($nt->getArticleID() != 0)) {
- $this->page('rights', $nt);
- } elseif( $wgRightsUrl ){
- $this->url('rights', $wgRightsUrl);
- } elseif( $wgRightsText ){
+ && ( $nt->getArticleID() != 0 ) ) {
+ $this->page( 'rights', $nt );
+ } elseif( $wgRightsUrl ) {
+ $this->url( 'rights', $wgRightsUrl );
+ } elseif( $wgRightsText ) {
$this->element( 'rights', $wgRightsText );
}
}
protected function getTerms( $url ) {
global $wgLicenseTerms;
- if( $wgLicenseTerms ){
+ if( $wgLicenseTerms ) {
return $wgLicenseTerms;
} else {
$known = $this->getKnownLicenses();
return $knownLicenses;
}
}
-
protected function filterModules( $modules, $position = null, $type = ResourceLoaderModule::TYPE_COMBINED ) {
$resourceLoader = $this->getResourceLoader();
$filteredModules = array();
- foreach( $modules as $val ){
+ foreach( $modules as $val ) {
$module = $resourceLoader->getModule( $val );
if( $module instanceof ResourceLoaderModule
&& $module->getOrigin() <= $this->getAllowedModules( $type )
* @return Array of module names
*/
public function getModuleStyles( $filter = false, $position = null ) {
- return $this->getModules( $filter, $position, 'mModuleStyles' );
+ return $this->getModules( $filter, $position, 'mModuleStyles' );
}
/**
* @return Int ResourceLoaderModule ORIGIN_ class constant
*/
public function getAllowedModules( $type ) {
- if( $type == ResourceLoaderModule::TYPE_COMBINED ){
+ if( $type == ResourceLoaderModule::TYPE_COMBINED ) {
return min( array_values( $this->mAllowedModules ) );
} else {
return isset( $this->mAllowedModules[$type] )
$this->prepareErrorPage( $title );
- if ( $msg instanceof Message ){
+ if ( $msg instanceof Message ) {
$this->addHTML( $msg->parseAsBlock() );
} else {
$this->addWikiMsgArray( $msg, $params );
'mediawiki.page.startup',
'mediawiki.page.ready',
) );
- if ( $wgIncludeLegacyJavaScript ){
+ if ( $wgIncludeLegacyJavaScript ) {
$this->addModules( 'mediawiki.legacy.wikibits' );
}
}
}
- if( $group == 'noscript' ){
+ if( $group == 'noscript' ) {
$links .= Html::rawElement( 'noscript', array(), $link ) . "\n";
} else {
$links .= $link . "\n";
if ( $wgUseSiteCss ) {
$moduleStyles[] = 'site';
$moduleStyles[] = 'noscript';
- if( $this->getUser()->isLoggedIn() ){
+ if( $this->getUser()->isLoggedIn() ) {
$moduleStyles[] = 'user.groups';
}
}
* @note Since we can't rely on anything, the minimum PHP versions and MW current
* version are hardcoded here
*/
-function wfPHPVersionError( $type ){
+function wfPHPVersionError( $type ) {
$mwVersion = '1.21';
$phpVersion = PHP_VERSION;
$message = "MediaWiki $mwVersion requires at least PHP version 5.3.2, you are using PHP $phpVersion.";
# The pair is either $index => $limit, in which case the $value
# will be numeric, or $limit => $text, in which case the $value
# will be a string.
- if( is_int( $value ) ){
+ if( is_int( $value ) ) {
$limit = $value;
$text = $this->getLanguage()->formatNum( $limit );
} else {
# via $wgHiddenPrefs, we don't want to destroy that setting in case the preference
# is subsequently re-enabled
# TODO: maintenance script to actually delete these
- foreach( $wgHiddenPrefs as $pref ){
+ foreach( $wgHiddenPrefs as $pref ) {
# If the user has not set a non-default value here, the default will be returned
# and subsequently discarded
$formData[$pref] = $user->getOption( $pref, null, true );
$extratags = array_flip( $extratags );
$removetags = array_flip( $removetags );
$htmlpairs = array_merge( $extratags, $htmlpairsStatic );
- $htmlelements = array_diff_key( array_merge( $extratags, $htmlelementsStatic ) , $removetags );
+ $htmlelements = array_diff_key( array_merge( $extratags, $htmlelementsStatic ), $removetags );
# Remove HTML comments
$text = Sanitizer::removeHTMLcomments( $text );
$id = str_replace( array_keys( $replace ), array_values( $replace ), $id );
if ( !preg_match( '/^[a-zA-Z]/', $id )
- && !in_array( 'noninitial', $options ) ) {
+ && !in_array( 'noninitial', $options ) ) {
// Initial character must be a letter!
$id = "x$id";
}
if ( $wgArticlePath === false ) {
if ( $wgUsePathInfo ) {
- $wgArticlePath = "$wgScript/$1";
+ $wgArticlePath = "$wgScript/$1";
} else {
- $wgArticlePath = "$wgScript?title=$1";
+ $wgArticlePath = "$wgScript?title=$1";
}
}
}
# $wgDisabledActions is deprecated as of 1.18
-foreach( $wgDisabledActions as $action ){
+foreach( $wgDisabledActions as $action ) {
$wgActions[$action] = false;
}
public function extractGlobalSetting( $setting, $wiki, $params ) {
$value = $this->getSetting( $setting, $wiki, $params );
if ( !is_null( $value ) ) {
- if (substr($setting,0,1) == '+' && is_array($value)) {
- $setting = substr($setting,1);
- if ( is_array($GLOBALS[$setting]) ) {
+ if ( substr( $setting, 0, 1 ) == '+' && is_array( $value ) ) {
+ $setting = substr( $setting, 1 );
+ if ( is_array( $GLOBALS[$setting] ) ) {
$GLOBALS[$setting] = self::arrayMerge( $GLOBALS[$setting], $value );
} else {
$GLOBALS[$setting] = $value;
return $default;
}
- foreach( $default as $name => $def ){
+ foreach( $default as $name => $def ) {
if( !isset( $ret[$name] ) || ( is_array( $default[$name] ) && !is_array( $ret[$name] ) ) ) {
$ret[$name] = $default[$name];
}
$ret['params'] += $params;
// Automatically fill that ones if needed
- if( !isset( $ret['params']['lang'] ) && !is_null( $ret['lang'] ) ){
+ if( !isset( $ret['params']['lang'] ) && !is_null( $ret['lang'] ) ) {
$ret['params']['lang'] = $ret['lang'];
}
if( !isset( $ret['params']['site'] ) && !is_null( $ret['suffix'] ) ) {
if ( count( $lines ) < 2 ) {
return 'done';
}
- if ( $this->readState == 'status' ) {
+ if ( $this->readState == 'status' ) {
$this->processStatusLine( $lines[0] );
} else { // header
$this->processHeaderLine( $lines[0] );
}
# Get the article text
$rev = Revision::newFromTitle( $nt, false, Revision::READ_LATEST );
- if( !is_object( $rev ) ){
+ if( !is_object( $rev ) ) {
return false;
}
$content = $rev->getContent();
* @return Bool
*/
public static function isIP( $name ) {
- return preg_match('/^\d{1,3}\.\d{1,3}\.\d{1,3}\.(?:xxx|\d{1,3})$/',$name) || IP::isIPv6($name);
+ return preg_match( '/^\d{1,3}\.\d{1,3}\.\d{1,3}\.(?:xxx|\d{1,3})$/', $name ) || IP::isIPv6( $name );
}
/**
* @param $bFromSlave Bool Whether to check the slave database instead of the master
* @return Block|null
*/
- public function getBlock( $bFromSlave = true ){
+ public function getBlock( $bFromSlave = true ) {
$this->getBlockedStatus( $bFromSlave );
return $this->mBlock instanceof Block ? $this->mBlock : null;
}
# set it, and then it was disabled removing their ability to change it). But
# we don't want to erase the preferences in the database in case the preference
# is re-enabled again. So don't touch $mOptions, just override the returned value
- if( in_array( $oname, $wgHiddenPrefs ) && !$ignoreHidden ){
+ if( in_array( $oname, $wgHiddenPrefs ) && !$ignoreHidden ) {
return self::getDefaultOption( $oname );
}
# set it, and then it was disabled removing their ability to change it). But
# we don't want to erase the preferences in the database in case the preference
# is re-enabled again. So don't touch $mOptions, just override the returned value
- foreach( $wgHiddenPrefs as $pref ){
+ foreach( $wgHiddenPrefs as $pref ) {
$default = self::getDefaultOption( $pref );
- if( $default !== null ){
+ if( $default !== null ) {
$options[$pref] = $default;
}
}
*/
public function isAllowedAny( /*...*/ ) {
$permissions = func_get_args();
- foreach( $permissions as $permission ){
- if( $this->isAllowed( $permission ) ){
+ foreach( $permissions as $permission ) {
+ if( $this->isAllowed( $permission ) ) {
return true;
}
}
*/
public function isAllowedAll( /*...*/ ) {
$permissions = func_get_args();
- foreach( $permissions as $permission ){
- if( !$this->isAllowed( $permission ) ){
+ foreach( $permissions as $permission ) {
+ if( !$this->isAllowed( $permission ) ) {
return false;
}
}
return;
}
$id = $this->getId();
- if( $id != 0 ) {
+ if( $id != 0 ) {
$dbw = wfGetDB( DB_MASTER );
$dbw->update( 'watchlist',
array( /* SET */
wfDeprecated( __METHOD__, '1.17' );
global $wgUseDynamicDates, $wgRenderHashAppend, $wgLang, $wgContLang;
- if( $this->mHash ){
+ if( $this->mHash ) {
return $this->mHash;
}
*/
public function isBlockedFromCreateAccount() {
$this->getBlockedStatus();
- if( $this->mBlock && $this->mBlock->prevents( 'createaccount' ) ){
+ if( $this->mBlock && $this->mBlock->prevents( 'createaccount' ) ) {
return $this->mBlock;
}
* @param $name string
* @return string
*/
- public function getcookie( $name ) {
+ public function getcookie( $name ) {
if ( isset( $this->cookies[$name] ) ) {
return $this->cookies[$name];
}
* @return Title
*/
public function getTitle() {
- if( $this->context->getTitle() === null ){
+ if( $this->context->getTitle() === null ) {
$this->context->setTitle( $this->parseTitle() );
}
return $this->context->getTitle();
&& $request->getMethod() == 'GET'
) {
$redirUrl = $request->getFullRequestURL();
- $redirUrl = str_replace( 'http://' , 'https://' , $redirUrl );
+ $redirUrl = str_replace( 'http://', 'https://', $redirUrl );
// Setup dummy Title, otherwise OutputPage::redirect will fail
$title = Title::newFromText( NS_MAIN, 'REDIR' );
public function doPurge() {
global $wgUseSquid;
- if( !wfRunHooks( 'ArticlePurge', array( &$this ) ) ){
+ if( !wfRunHooks( 'ArticlePurge', array( &$this ) ) ) {
return false;
}
public function prepareTextForEdit( $text, $revid = null, User $user = null ) {
ContentHandler::deprecated( __METHOD__, '1.21' );
$content = ContentHandler::makeContent( $text, $this->getTitle() );
- return $this->prepareContentForEdit( $content, $revid , $user );
+ return $this->prepareContentForEdit( $content, $revid, $user );
}
/**
ContentHandler::deprecated( __METHOD__, "1.21" );
$content = ContentHandler::makeContent( $text, $this->getTitle() );
- return $this->doQuickEditContent( $content, $user, $comment , $minor );
+ return $this->doQuickEditContent( $content, $user, $comment, $minor );
}
/**
if ( $encodedExpiry[$action] != 'infinity' ) {
$expiryText = wfMessage(
'protect-expiring',
- $wgContLang->timeanddate( $expiry[$action], false, false ) ,
- $wgContLang->date( $expiry[$action], false, false ) ,
+ $wgContLang->timeanddate( $expiry[$action], false, false ),
+ $wgContLang->date( $expiry[$action], false, false ),
$wgContLang->time( $expiry[$action], false, false )
)->inContentLanguage()->text();
} else {
return false;
}
}
-
$a = array( 'for' => $id );
# FIXME avoid copy pasting below:
- if( isset( $attribs['class'] ) ){
+ if( isset( $attribs['class'] ) ) {
$a['class'] = $attribs['class'];
}
- if( isset( $attribs['title'] ) ){
+ if( isset( $attribs['title'] ) ) {
$a['title'] = $attribs['title'];
}