Code review!
authorÆvar Arnfjörð Bjarmason <avar@users.mediawiki.org>
Sat, 7 Jan 2006 12:31:39 +0000 (12:31 +0000)
committerÆvar Arnfjörð Bjarmason <avar@users.mediawiki.org>
Sat, 7 Jan 2006 12:31:39 +0000 (12:31 +0000)
* Don't start a new scope with if defined 'MEDIAWIKI...

includes/ImageGallery.php
includes/Namespace.php
includes/ProxyTools.php
includes/Skin.php
includes/SkinPHPTal.php
includes/SkinTemplate.php

index c33a3f2..c96a699 100644 (file)
@@ -1,14 +1,11 @@
 <?php
+if ( ! defined( 'MEDIAWIKI' ) )
+       die();
+       
 /**
  * @package MediaWiki
  */
 
-/**
- * This is not a valid entry point, perform no further processing unless MEDIAWIKI is defined
- */
-if( defined( 'MEDIAWIKI' ) ) {
-
-
 /**
  * Image gallery
  * 
@@ -152,9 +149,4 @@ class ImageGallery
        }
 
 } //class
-
-
-
-
-} // defined( 'MEDIAWIKI' )
 ?>
index 15fc36e..e366c0a 100644 (file)
@@ -1,15 +1,11 @@
 <?php
+if ( ! defined( 'MEDIAWIKI' ) )
+       die();
 /**
  * Provide things related to namespaces
  * @package MediaWiki
  */
 
-/**
- * This is not a valid entry point, perform no further processing unless MEDIAWIKI is defined
- */
-if( defined( 'MEDIAWIKI' ) ) {
-
-
 /**
  * Definitions of the NS_ constants are in Defines.php
  * @private
@@ -124,6 +120,4 @@ class Namespace {
                }
        }
 }
-
-}
 ?>
index dfddd4c..383878d 100644 (file)
@@ -1,13 +1,11 @@
 <?php
+if ( ! defined( 'MEDIAWIKI' ) )
+       die();
 /**
  * Functions for dealing with proxies
  * @package MediaWiki
  */
 
-if ( !defined( 'MEDIAWIKI' ) ) {
-       die();
-}
-
 /** Work out the IP address based on various globals */
 function wfGetIP() {
        global $wgSquidServers, $wgSquidServersNoPurge, $wgIP;
index 3e12c77..8be9f86 100644 (file)
@@ -1,4 +1,6 @@
 <?php
+if ( ! defined( 'MEDIAWIKI' ) )
+       die();
 
 /**
  *
@@ -6,11 +8,6 @@
  * @subpackage Skins
  */
 
-/**
- * This is not a valid entry point, perform no further processing unless MEDIAWIKI is defined
- */
-if( defined( "MEDIAWIKI" ) ) {
-
 # See skin.txt
 require_once( 'Linker.php' );
 require_once( 'Image.php' );
@@ -1437,6 +1434,4 @@ END;
                return $bar;
        }
 }
-
-}
 ?>
index 3efb2e3..c6159bd 100644 (file)
@@ -1,4 +1,6 @@
 <?php
+if ( ! defined( 'MEDIAWIKI' ) )
+       die();
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
 # the Free Software Foundation; either version 2 of the License, or
  * @subpackage Skins
  */
 
-/**
- * This is not a valid entry point, perform no further processing unless
- * MEDIAWIKI is defined
- */
-if( defined( 'MEDIAWIKI' ) ) {
-
 require_once 'GlobalFunctions.php';
 require_once 'SkinTemplate.php';
 
@@ -151,5 +147,4 @@ class PHPTAL_version_bridge {
 
 } // end of if( class_exists( 'PHPTAL' ) )
 } // end of if( class_exists( 'PEAR' ) )
-} // end of if( defined( 'MEDIAWIKI' ) ) 
 ?>
index fbb95fb..850f66d 100644 (file)
@@ -1,4 +1,7 @@
 <?php
+if ( ! defined( 'MEDIAWIKI' ) )
+       die();
+
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
 # the Free Software Foundation; either version 2 of the License, or
  * @subpackage Skins
  */
 
-/**
- * This is not a valid entry point, perform no further processing unless
- * MEDIAWIKI is defined
- */
-if( defined( 'MEDIAWIKI' ) ) {
-
 require_once 'GlobalFunctions.php';
 
 /**
@@ -1128,6 +1125,4 @@ class QuickTemplate {
                return ($msg != '-') && ($msg != ''); # ????
        }
 }
-
-} // end of if( defined( 'MEDIAWIKI' ) )
 ?>