* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
use Wikimedia\Assert\Assert;
use Wikimedia\Rdbms\Database;
use Wikimedia\Rdbms\IDatabase;
use Wikimedia\Assert\Assert;
use Wikimedia\Rdbms\Database;
use Wikimedia\Rdbms\IDatabase;
* @param int|null $maxRedirects Maximum number of redirects to follow. If
* null, uses $wgMaxRedirects
* @return Content|null
* @since 1.32 added the $context and $maxRedirects parameters
*/
protected function getContentObj(
* @param int|null $maxRedirects Maximum number of redirects to follow. If
* null, uses $wgMaxRedirects
* @return Content|null
* @since 1.32 added the $context and $maxRedirects parameters
*/
protected function getContentObj(
- if ( $context === null ) {
- wfDeprecated( __METHOD__ . ' without a ResourceLoader context', '1.32' );
- }
-
- $overrideCallback = $context ? $context->getContentOverrideCallback() : null;
+ $overrideCallback = $context->getContentOverrideCallback();
$content = $overrideCallback ? call_user_func( $overrideCallback, $title ) : null;
if ( $content ) {
if ( !$content instanceof Content ) {
$content = $overrideCallback ? call_user_func( $overrideCallback, $title ) : null;
if ( $content ) {
if ( !$content instanceof Content ) {