* page of the given title.
*/
public function view() {
- global $wgParser, $wgUseFileCache, $wgUseETag, $wgDebugToolbar;
+ global $wgUseFileCache, $wgUseETag, $wgDebugToolbar;
wfProfileIn( __METHOD__ );
* @return string An appropriate auto-summary, or an empty string.
*/
public function getAutosummary( Content $oldContent = null, Content $newContent = null, $flags ) {
- global $wgContLang;
-
// Decide what kind of auto-summary is needed.
// Redirect auto-summaries
* @return bool|mixed
*/
function getDescriptionText() {
- global $wgParser;
$revision = Revision::newFromTitle( $this->title, false, Revision::READ_NORMAL );
if ( !$revision ) return false;
$content = $revision->getContent();
* @param $rev Revision
*/
public function handleRevision( $rev ) {
- global $wgParserConf;
-
$title = $rev->getTitle();
if ( !$title ) {
$this->error( "Got bogus revision with null title!" );
class TitleMethodsTest extends MediaWikiTestCase {
public function setup() {
- global $wgExtraNamespaces, $wgNamespaceContentModels, $wgContLang;
+ global $wgContLang;
parent::setUp();
* @dataProvider dataMakeContent
*/
public function testMakeContent( $data, $title, $modelId, $format, $expectedModelId, $expectedNativeData, $shouldFail ) {
- global $wgExtraNamespaces, $wgNamespaceContentModels, $wgContentHandlers;
-
$title = Title::newFromText( $title );
try {
* @dataProvider dataGetAutosummary
*/
public function testGetAutosummary( $old, $new, $flags, $expected ) {
- global $wgLanguageCode, $wgContLang;
-
$oldContent = is_null( $old ) ? null : new WikitextContent( $old );
$newContent = is_null( $new ) ? null : new WikitextContent( $new );