Hooks::run( 'AddNewAccountApiForm', array( $this, $loginForm ) );
$loginForm->load();
- $status = $loginForm->addNewaccountInternal();
+ $status = $loginForm->addNewAccountInternal();
LoggerFactory::getInstance( 'authmanager' )->info( 'Account creation attempt via API', array(
'event' => 'accountcreation',
'status' => $status,
$this->dieUsageMsg( array( 'nosuchrevid', $params['undoafter'] ) );
}
- if ( $undoRev->getPage() != $pageObj->getID() ) {
- $this->dieUsageMsg( array( 'revwrongpage', $undoRev->getID(),
+ if ( $undoRev->getPage() != $pageObj->getId() ) {
+ $this->dieUsageMsg( array( 'revwrongpage', $undoRev->getId(),
$titleObj->getPrefixedText() ) );
}
- if ( $undoafterRev->getPage() != $pageObj->getID() ) {
- $this->dieUsageMsg( array( 'revwrongpage', $undoafterRev->getID(),
+ if ( $undoafterRev->getPage() != $pageObj->getId() ) {
+ $this->dieUsageMsg( array( 'revwrongpage', $undoafterRev->getId(),
$titleObj->getPrefixedText() ) );
}
// If no summary was given and we only undid one rev,
// use an autosummary
if ( is_null( $params['summary'] ) &&
- $titleObj->getNextRevisionID( $undoafterRev->getID() ) == $params['undo']
+ $titleObj->getNextRevisionID( $undoafterRev->getId() ) == $params['undo']
) {
$params['summary'] = wfMessage( 'undo-summary' )
->params( $params['undo'], $undoRev->getUserText() )->inContentLanguage()->text();
// Probably a formerly-valid title that's now conflicting with an
// interwiki prefix or the like.
if ( isset( $info['pageid'] ) ) {
- $title = Title::newFromId( $info['pageid'] );
+ $title = Title::newFromID( $info['pageid'] );
$curidParam = array( 'curid' => $info['pageid'] );
}
if ( !$title || $title->isExternal() ) {
// API handles its own clickjacking protection.
// Note, that $wgBreakFrames will still override $wgApiFrameOptions for format mode.
- $out->allowClickJacking();
+ $out->allowClickjacking();
$out->output();
} else {
// For non-HTML output, clear all errors that might have been
$href = $m[2] === '' ? '#' . $m[1] : $m[2];
} elseif ( $helptitle !== null ) {
$href = Title::newFromText( str_replace( '$1', $m[1], $helptitle ) . $m[2] )
- ->getFullUrl();
+ ->getFullURL();
} else {
$href = wfAppendQuery( wfScript( 'api' ), array(
'action' => 'help',
}
if ( $config->get( 'ShowHostnames' ) ) {
// servedby is especially useful when debugging errors
- $result->addValue( null, 'servedby', wfHostName(), ApiResult::NO_SIZE_CHECK );
+ $result->addValue( null, 'servedby', wfHostname(), ApiResult::NO_SIZE_CHECK );
}
if ( $warnings !== null ) {
$result->addValue( null, 'warnings', $warnings, ApiResult::NO_SIZE_CHECK );
$tocnumber = &$options['tocnumber'];
$header = $this->msg( 'api-help-datatypes-header' )->parse();
- $help['datatypes'] .= Html::rawelement( 'h' . min( 6, $level ),
+ $help['datatypes'] .= Html::rawElement( 'h' . min( 6, $level ),
array( 'id' => 'main/datatypes', 'class' => 'apihelp-header' ),
Html::element( 'span', array( 'id' => Sanitizer::escapeId( 'main/datatypes' ) ) ) .
$header
}
$header = $this->msg( 'api-credits-header' )->parse();
- $help['credits'] .= Html::rawelement( 'h' . min( 6, $level ),
+ $help['credits'] .= Html::rawElement( 'h' . min( 6, $level ),
array( 'id' => 'main/credits', 'class' => 'apihelp-header' ),
Html::element( 'span', array( 'id' => Sanitizer::escapeId( 'main/credits' ) ) ) .
$header
$redirects = array();
$lb = new LinkBatch( $titles );
if ( !$lb->isEmpty() ) {
- $db = $this->getDb();
+ $db = $this->getDB();
$res = $db->select(
array( 'page', 'redirect' ),
array( 'page_namespace', 'page_title', 'rd_namespace', 'rd_title' ),
}
if ( !isset( $seen[$ns][$dbkey] ) ) {
$seen[$ns][$dbkey] = true;
- $resultId = $title->getArticleId();
+ $resultId = $title->getArticleID();
if ( $resultId === 0 ) {
$resultId = $nextSpecialPageId;
$nextSpecialPageId -= 1;
'extract' => false,
'extract trimmed' => false,
'image' => false,
- 'url' => wfExpandUrl( $title->getFullUrl(), PROTO_CURRENT ),
+ 'url' => wfExpandUrl( $title->getFullURL(), PROTO_CURRENT ),
);
}
}
$ret['sourcename'] = $ret['source'];
}
- $link = SpecialPage::getTitleFor( 'Version', 'License/' . $sourceInfo['name'] )->getFullUrl();
+ $link = SpecialPage::getTitleFor( 'Version', 'License/' . $sourceInfo['name'] )->getFullURL();
if ( isset( $sourceInfo['license-name'] ) ) {
$ret['licensetag'] = $sourceInfo['license-name'];
$ret['licenselink'] = (string)$link;
* @param bool $sort
*/
protected function addTimestampWhereRange( $field, $dir, $start, $end, $sort = true ) {
- $db = $this->getDb();
+ $db = $this->getDB();
$this->addWhereRange( $field, $dir,
$db->timestampOrNull( $start ), $db->timestampOrNull( $end ), $sort );
}
* @return null|string
*/
public function prepareUrlQuerySearchString( $query = null, $protocol = null ) {
- $db = $this->getDb();
+ $db = $this->getDB();
if ( !is_null( $query ) || $query != '' ) {
if ( is_null( $protocol ) ) {
$protocol = 'http://';
$this->dieUsageMsg( array( 'invalidtitle', $titlePart ) );
}
- return substr( $t->getDbKey(), 0, -1 );
+ return substr( $t->getDBkey(), 0, -1 );
}
/**
$this->dieUsageMsg( array( 'invalidtitle', $titlePart ) );
}
- return array( $t->getNamespace(), substr( $t->getDbKey(), 0, -1 ) );
+ return array( $t->getNamespace(), substr( $t->getDBkey(), 0, -1 ) );
}
/**
$this->addWhereRange( 'cl_from', $dir, null, null );
} else {
if ( $params['startsortkeyprefix'] !== null ) {
- $startsortkey = Collation::singleton()->getSortkey( $params['startsortkeyprefix'] );
+ $startsortkey = Collation::singleton()->getSortKey( $params['startsortkeyprefix'] );
} elseif ( $params['starthexsortkey'] !== null ) {
if ( !$this->validateHexSortkey( $params['starthexsortkey'] ) ) {
$this->dieUsage( 'The starthexsortkey provided is not valid', 'bad_starthexsortkey' );
$startsortkey = $params['startsortkey'];
}
if ( $params['endsortkeyprefix'] !== null ) {
- $endsortkey = Collation::singleton()->getSortkey( $params['endsortkeyprefix'] );
+ $endsortkey = Collation::singleton()->getSortKey( $params['endsortkeyprefix'] );
} elseif ( $params['endhexsortkey'] !== null ) {
if ( !$this->validateHexSortkey( $params['endhexsortkey'] ) ) {
$this->dieUsage( 'The endhexsortkey provided is not valid', 'bad_endhexsortkey' );
$vals['thumberror'] = $mto->toText();
}
}
- $vals['url'] = wfExpandUrl( $file->getFullURL(), PROTO_CURRENT );
+ $vals['url'] = wfExpandUrl( $file->getFullUrl(), PROTO_CURRENT );
$vals['descriptionurl'] = wfExpandUrl( $file->getDescriptionUrl(), PROTO_CURRENT );
}
*/
public static function getEmailToken( $pageid, $title ) {
global $wgUser;
- if ( !$wgUser->canSendEmail() || $wgUser->isBlockedFromEmailUser() ) {
+ if ( !$wgUser->canSendEmail() || $wgUser->isBlockedFromEmailuser() ) {
return false;
}
$this->addFieldsIf( 'wl_notificationtimestamp', $this->fld_notificationtimestamp );
$this->addWhere( array(
$lb->constructSet( 'wl', $db ),
- 'wl_user' => $user->getID()
+ 'wl_user' => $user->getId()
) );
$res = $this->select( __METHOD__ );
$this->dieUsageMsg( array( 'nosuchrevid', $params['diffto'] ) );
}
if ( !$difftoRev->userCan( Revision::DELETED_TEXT, $this->getUser() ) ) {
- $this->setWarning( "Couldn't diff to r{$difftoRev->getID()}: content is hidden" );
+ $this->setWarning( "Couldn't diff to r{$difftoRev->getId()}: content is hidden" );
$params['diffto'] = null;
}
}
$engine->setContent( $content, $difftocontent );
}
} else {
- $engine = $handler->createDifferenceEngine( $context, $revision->getID(), $this->diffto );
+ $engine = $handler->createDifferenceEngine( $context, $revision->getId(), $this->diffto );
$vals['diff']['from'] = $engine->getOldid();
$vals['diff']['to'] = $engine->getNewid();
}
$arr['number'] = SiteStats::users();
// '*' and autopromote groups have no size
} elseif ( $group !== '*' && !isset( $autopromote[$group] ) ) {
- $arr['number'] = SiteStats::numberInGroup( $group );
+ $arr['number'] = SiteStats::numberingroup( $group );
}
}
if ( $params['entirewatchlist'] ) {
// Entire watchlist mode: Just update the thing and return a success indicator
$dbw->update( 'watchlist', array( 'wl_notificationtimestamp' => $timestamp ),
- array( 'wl_user' => $user->getID() ),
+ array( 'wl_user' => $user->getId() ),
__METHOD__
);
// Now process the valid titles
$lb = new LinkBatch( $pageSet->getTitles() );
$dbw->update( 'watchlist', array( 'wl_notificationtimestamp' => $timestamp ),
- array( 'wl_user' => $user->getID(), $lb->constructSet( 'wl', $dbw ) ),
+ array( 'wl_user' => $user->getId(), $lb->constructSet( 'wl', $dbw ) ),
__METHOD__
);
$res = $dbw->select(
'watchlist',
array( 'wl_namespace', 'wl_title', 'wl_notificationtimestamp' ),
- array( 'wl_user' => $user->getID(), $lb->constructSet( 'wl', $dbw ) ),
+ array( 'wl_user' => $user->getId(), $lb->constructSet( 'wl', $dbw ) ),
__METHOD__
);
foreach ( $res as $row ) {