*/
/**
- * @var RequestContext
+ * @var IContextSource
*/
protected $mContext;
* Create an Article object of the appropriate class for the given page.
*
* @param $title Title
- * @param $context RequestContext
+ * @param $context IContextSource
* @return Article object
*/
- public static function newFromTitle( $title, RequestContext $context ) {
+ public static function newFromTitle( $title, IContextSource $context ) {
if ( NS_MEDIA == $title->getNamespace() ) {
// FIXME: where should this go?
$title = Title::makeTitle( NS_FILE, $title->getDBkey() );
# tents of 'pagetitle-view-mainpage' instead of the default (if
# that's not empty).
# This message always exists because it is in the i18n files
- if ( $this->getTitle()->equals( Title::newMainPage() ) ) {
+ if ( $this->getTitle()->isMainPage() ) {
$msg = wfMessage( 'pagetitle-view-mainpage' )->inContentLanguage();
if ( !$msg->isDisabled() ) {
$wgOut->setHTMLTitle( $msg->title( $this->getTitle() )->text() );
/**
* Sets the context this Article is executed in
*
- * @param $context RequestContext
+ * @param $context IContextSource
* @since 1.18
*/
public function setContext( $context ) {
/**
* Gets the context this Article is executed in
*
- * @return RequestContext
+ * @return IContextSource
* @since 1.18
*/
public function getContext() {
- if ( $this->mContext instanceof RequestContext ) {
+ if ( $this->mContext instanceof IContextSource ) {
return $this->mContext;
} else {
wfDebug( __METHOD__ . " called and \$mContext is null. Return RequestContext::getMain(); for sanity\n" );