Changed inclusion style, require_once('includes/SpecialPage.php') was allowing duplic...
authorTim Starling <tstarling@users.mediawiki.org>
Sun, 24 Oct 2004 01:56:23 +0000 (01:56 +0000)
committerTim Starling <tstarling@users.mediawiki.org>
Sun, 24 Oct 2004 01:56:23 +0000 (01:56 +0000)
extensions/ShowProcesslist.php
extensions/SiteMatrix.php
extensions/UnicodeConverter.php

index 1ee9d40..23f1597 100644 (file)
@@ -1,10 +1,12 @@
 <?php
+# Not a valid entry point, skip unless MEDIAWIKI is defined
+if (defined('MEDIAWIKI')) {
 
 $wgExtensionFunctions[] = "wfShowProcesslist";
 
 function wfShowProcesslist() {
-
-require_once( 'includes/SpecialPage.php' );
+global $IP;
+require_once( "$IP/includes/SpecialPage.php" );
 
 class ShowProcesslistPage extends UnlistedSpecialPage
 {
@@ -41,4 +43,5 @@ class ShowProcesslistPage extends UnlistedSpecialPage
 SpecialPage::addPage( new ShowProcesslistPage );
 
 } # End of extension function
+} # End of invocation guard
 ?>
index 94beb5c..aa25a83 100644 (file)
@@ -2,10 +2,15 @@
 
 # Make an HTML table showing all the wikis on the site
 
-
+# Not a valid entry point, skip unless MEDIAWIKI is defined
+if (defined('MEDIAWIKI')) {
+       
 $wgExtensionFunctions[] = "wfSiteMatrix";
 
 function wfSiteMatrix() {
+global $IP;
+require_once( "$IP/includes/SpecialPage.php" );
+
 class SiteMatrixPage extends SpecialPage
 {
        function SiteMatrixPage() {
@@ -93,4 +98,5 @@ global $wgMessageCache;
 $wgMessageCache->addMessage( "sitematrix", "List of Wikimedia wikis" );
 
 } # End of extension function
+} # End of invocation protection
 ?>
index 1012889..7ab7fe3 100644 (file)
@@ -4,11 +4,13 @@
 # Given a string in UTF-8, it converts it to HTML entities suitable for 
 # an ISO 8859-1 web page.
 
+# Not a valid entry point, skip unless MEDIAWIKI is defined
+if (defined('MEDIAWIKI')) {
 $wgExtensionFunctions[] = "wfUnicodeConverter";
 
 function wfUnicodeConverter() {
-
-require_once( "includes/SpecialPage.php" );
+global $IP;
+require_once( "$IP/includes/SpecialPage.php" );
 
 class UnicodeConverter extends SpecialPage
 {
@@ -47,4 +49,5 @@ SpecialPage::addPage( new UnicodeConverter );
 $wgMessageCache->addMessage( "unicodeconverter", "Unicode Converter" );
 
 } # End of extension function
+} # End of invocation guard
 ?>