From aad9d5fd6bb106fb66a2e960f3f6fd021bdf1547 Mon Sep 17 00:00:00 2001 From: Alexandre Emsenhuber Date: Wed, 23 May 2012 19:35:12 +0200 Subject: [PATCH] Removed checks for the "MEDIAWIKI" constant on files that only define classes. This checks are not needed in that case. Change-Id: Ia83447427de8b7ea32aced8ff43c7a252b8d504c --- includes/CategoryPage.php | 3 --- includes/CategoryViewer.php | 3 --- includes/ImageGallery.php | 3 --- includes/OutputPage.php | 4 ---- includes/Skin.php | 4 ---- includes/SkinLegacy.php | 4 ---- includes/SkinTemplate.php | 4 ---- includes/job/JobQueue.php | 4 ---- includes/json/FormatJson.php | 4 ---- includes/resourceloader/ResourceLoaderWikiModule.php | 2 -- includes/specials/SpecialTags.php | 3 --- 11 files changed, 38 deletions(-) diff --git a/includes/CategoryPage.php b/includes/CategoryPage.php index d7f78ec65f..32e270e8c1 100644 --- a/includes/CategoryPage.php +++ b/includes/CategoryPage.php @@ -21,9 +21,6 @@ * @file */ -if ( !defined( 'MEDIAWIKI' ) ) - die( 1 ); - /** * Special handling for category description pages, showing pages, * subcategories and file that belong to the category diff --git a/includes/CategoryViewer.php b/includes/CategoryViewer.php index 553d64f01e..d83e0e0616 100644 --- a/includes/CategoryViewer.php +++ b/includes/CategoryViewer.php @@ -20,9 +20,6 @@ * @file */ -if ( !defined( 'MEDIAWIKI' ) ) - die( 1 ); - class CategoryViewer extends ContextSource { var $limit, $from, $until, $articles, $articles_start_char, diff --git a/includes/ImageGallery.php b/includes/ImageGallery.php index 247acffeda..d391ead60e 100644 --- a/includes/ImageGallery.php +++ b/includes/ImageGallery.php @@ -20,9 +20,6 @@ * @file */ -if ( ! defined( 'MEDIAWIKI' ) ) - die( 1 ); - /** * Image gallery * diff --git a/includes/OutputPage.php b/includes/OutputPage.php index ad4e4ef6d2..560588f43d 100644 --- a/includes/OutputPage.php +++ b/includes/OutputPage.php @@ -20,10 +20,6 @@ * @file */ -if ( !defined( 'MEDIAWIKI' ) ) { - die( 1 ); -} - /** * This class should be covered by a general architecture document which does * not exist as of January 2011. This is one of the Core classes and should diff --git a/includes/Skin.php b/includes/Skin.php index 677664ae5a..64cf569796 100644 --- a/includes/Skin.php +++ b/includes/Skin.php @@ -24,10 +24,6 @@ * @defgroup Skins Skins */ -if ( !defined( 'MEDIAWIKI' ) ) { - die( 1 ); -} - /** * The main skin class that provide methods and properties for all other skins. * This base class is also the "Standard" skin. diff --git a/includes/SkinLegacy.php b/includes/SkinLegacy.php index 1deaf894a5..e1ec897d85 100644 --- a/includes/SkinLegacy.php +++ b/includes/SkinLegacy.php @@ -20,10 +20,6 @@ * @file */ -if ( !defined( 'MEDIAWIKI' ) ) { - die( 1 ); -} - class SkinLegacy extends SkinTemplate { var $useHeadElement = true; protected $mWatchLinkNum = 0; // Appended to end of watch link id's diff --git a/includes/SkinTemplate.php b/includes/SkinTemplate.php index 9807237148..114a55cc0b 100644 --- a/includes/SkinTemplate.php +++ b/includes/SkinTemplate.php @@ -20,10 +20,6 @@ * @file */ -if ( !defined( 'MEDIAWIKI' ) ) { - die( 1 ); -} - /** * Wrapper object for MediaWiki's localization functions, * to be passed to the template engine. diff --git a/includes/job/JobQueue.php b/includes/job/JobQueue.php index a53905fa90..00652473cb 100644 --- a/includes/job/JobQueue.php +++ b/includes/job/JobQueue.php @@ -21,10 +21,6 @@ * @defgroup JobQueue JobQueue */ -if ( !defined( 'MEDIAWIKI' ) ) { - die( "This file is part of MediaWiki, it is not a valid entry point\n" ); -} - /** * Class to both describe a background job and handle jobs. * diff --git a/includes/json/FormatJson.php b/includes/json/FormatJson.php index 4ef59ed603..cae3f12a5e 100644 --- a/includes/json/FormatJson.php +++ b/includes/json/FormatJson.php @@ -20,10 +20,6 @@ * @file */ -if ( !defined( 'MEDIAWIKI' ) ) { - die( 1 ); -} - require_once dirname( __FILE__ ) . '/Services_JSON.php'; /** diff --git a/includes/resourceloader/ResourceLoaderWikiModule.php b/includes/resourceloader/ResourceLoaderWikiModule.php index a69676df68..f35e774215 100644 --- a/includes/resourceloader/ResourceLoaderWikiModule.php +++ b/includes/resourceloader/ResourceLoaderWikiModule.php @@ -22,8 +22,6 @@ * @author Roan Kattouw */ -defined( 'MEDIAWIKI' ) || die( 1 ); - /** * Abstraction for resource loader modules which pull from wiki pages * diff --git a/includes/specials/SpecialTags.php b/includes/specials/SpecialTags.php index 1fc8ea5480..df720a125c 100644 --- a/includes/specials/SpecialTags.php +++ b/includes/specials/SpecialTags.php @@ -21,9 +21,6 @@ * @ingroup SpecialPage */ -if (!defined('MEDIAWIKI')) - die; - /** * A special page that lists tags for edits * -- 2.20.1