From: Brion Vibber Date: Fri, 3 Dec 2004 10:57:19 +0000 (+0000) Subject: Add some conditional die()s to suppress fatal error messages if certain files are... X-Git-Tag: 1.5.0alpha1~1161 X-Git-Url: https://git.cyclocoop.org/admin/?a=commitdiff_plain;h=0ec30e2f98b1cf1c6cfd7da8ac6bdfd4f207e920;p=lhc%2Fweb%2Fwiklou.git Add some conditional die()s to suppress fatal error messages if certain files are run directly from the web. On a server concerned about path disclosure, display_errors should be off, but we can play nice anyway. --- diff --git a/includes/CategoryPage.php b/includes/CategoryPage.php index 42dae594c5..cb749cf4f3 100644 --- a/includes/CategoryPage.php +++ b/includes/CategoryPage.php @@ -5,8 +5,11 @@ * * @package MediaWiki */ + +if( !defined( 'MEDIAWIKI' ) ) + die(); -if ( $wgCategoryMagicGallery ) +if( $wgCategoryMagicGallery ) require_once('ImageGallery.php'); /** diff --git a/includes/ImagePage.php b/includes/ImagePage.php index d29a431180..0a28e55f94 100644 --- a/includes/ImagePage.php +++ b/includes/ImagePage.php @@ -6,6 +6,9 @@ /** * */ +if( !defined( 'MEDIAWIKI' ) ) + die(); + require_once( 'Image.php' ); /** diff --git a/includes/SpecialMakesysop.php b/includes/SpecialMakesysop.php index 57eb11ba30..bc6dcf5b1f 100644 --- a/includes/SpecialMakesysop.php +++ b/includes/SpecialMakesysop.php @@ -6,7 +6,7 @@ * @deprecated */ -wfDebugDieBacktrace('Use SpecialUserlevels instead !!'); // [av] +die('Use SpecialUserlevels instead !!'); // [av] /** diff --git a/includes/SpecialPreferences.php b/includes/SpecialPreferences.php index 6d9e60219a..dbb452d356 100644 --- a/includes/SpecialPreferences.php +++ b/includes/SpecialPreferences.php @@ -5,6 +5,9 @@ * @subpackage SpecialPage */ +if( !defined( 'MEDIAWIKI' ) ) + die(); + /* to get a list of languages in setting user's language preference */ require_once('languages/Names.php'); diff --git a/includes/templates/Userlogin.php b/includes/templates/Userlogin.php index 05da76a101..0fcc73e105 100644 --- a/includes/templates/Userlogin.php +++ b/includes/templates/Userlogin.php @@ -1,5 +1,7 @@