protection from multiple includes (from REL1_3A)
authorTim Starling <tstarling@users.mediawiki.org>
Sun, 26 Sep 2004 08:06:04 +0000 (08:06 +0000)
committerTim Starling <tstarling@users.mediawiki.org>
Sun, 26 Sep 2004 08:06:04 +0000 (08:06 +0000)
includes/SiteConfiguration.php

index fd4efc5..1abe48d 100644 (file)
  *
  * @package MediaWiki
  */
+
+/**
+ * The include paths change after this file is included from commandLine.inc, 
+ * meaning that require_once() fails to detect that it is including the same
+ * file again. We use DIY C-style protection as a workaround.
+ */
+if (!defined('SITE_CONFIGURATION')) {
+define('SITE_CONFIGURATION', 1);
+
 class SiteConfiguration {
        var $suffixes, $wikis, $settings;
        var $localDatabases;
@@ -84,6 +93,6 @@ class SiteConfiguration {
                return array( $site, $lang );
        }
 }
-
+}
        
 ?>