Suppress some more warnings on separate execution of files. Shouldn't
authorBrion Vibber <brion@users.mediawiki.org>
Fri, 6 Aug 2004 22:30:47 +0000 (22:30 +0000)
committerBrion Vibber <brion@users.mediawiki.org>
Fri, 6 Aug 2004 22:30:47 +0000 (22:30 +0000)
be anything exploitable, it's just annoying.

includes/DatabasePostgreSQL.php
includes/DefaultSettings.php
includes/Namespace.php
includes/OutputPage.php
includes/Setup.php
includes/Skin.php
includes/SpecialImport.php
texvc.phtml

index af7d96e..6ada5ed 100644 (file)
@@ -14,6 +14,8 @@
 #
 # Hashar
 
+require_once( "Database.php" );
+
 class DatabasePgsql extends Database {
        var $mInsertId = NULL;
 
index bd10946..d9d64eb 100644 (file)
@@ -1,4 +1,6 @@
 <?php
+if( defined( "MEDIAWIKI" ) ) {
+
 # $Id$
 # DO NOT EDIT THIS FILE!
 # To customize your installation, edit "LocalSettings.php".
@@ -471,4 +473,7 @@ $wgUseGeoMode = false;
 # Validation for print or other production versions
 $wgUseValidation = false;
 
+} else {
+       die();
+}
 ?>
index a72d24a..bba5deb 100644 (file)
@@ -1,4 +1,6 @@
 <?php
+if( defined( "MEDIAWIKI" ) ) {
+
 # This is a utility class with only static functions
 # for dealing with namespaces that encodes all the
 # "magic" behaviors of them based on index.  The textual
@@ -105,4 +107,5 @@ class Namespace {
        }
 }
 
+}
 ?>
index d0b55a4..21fbe70 100644 (file)
@@ -1,4 +1,6 @@
 <?php
+if( defined( "MEDIAWIKI" ) ) {
+
 # See design.doc
 
 if($wgUseTeX) require_once( "Math.php" );
@@ -854,4 +856,6 @@ class OutputPage {
                return ( $out );
        }
 }
+
+}
 ?>
index 02ae368..e898d1f 100644 (file)
@@ -1,4 +1,6 @@
 <?php
+if( defined( "MEDIAWIKI" ) ) {
+
 # The main wiki script and things like database
 # conversion and maintenance scripts all share a
 # common setup of including lots of classes and
@@ -257,5 +259,5 @@ $wgFullyInitialised = true;
 wfProfileOut( $fname.'-extensions' );
 wfProfileOut( $fname );
 
-
+}
 ?>
index dbff5d6..ac21c37 100644 (file)
@@ -1,4 +1,6 @@
 <?php
+if( defined( "MEDIAWIKI" ) ) {
+
 # See skin.doc
 
 require_once( 'Feed.php' );  // should not be called if the actual page isn't feed enabled
@@ -2755,5 +2757,7 @@ class Skin {
                return $toolbar;
        }
 
+}
+
 }
 ?>
index a11e65c..1fc1eeb 100644 (file)
@@ -483,7 +483,7 @@ class WikiImporter {
                                'old_comment' => $this->getComment(),
                                'old_user' => intval( $user->getId() ),
                                'old_user_text' => $user->getName(),
-                               'old_timestamp' => $this->timestamp
+                               'old_timestamp' => $this->timestamp,
                                'inverse_timestamp' => wfInvertTimestamp( $this->timestamp ),
                                'old_minor_edit' => 0,
                                'old_flags' => ''
index a47416e..108dcbd 100644 (file)
@@ -13,7 +13,7 @@ print ">";
 <?php
 print "<form method=\"post\" action=\"{$wgServer}{$wgScriptPath}/texvc_cgi.phtml\">"
 ?>
-<textarea name='math' rows='10' cols='80'><?
+<textarea name='math' rows='10' cols='80'><?php
        global $math;
        $math = preg_replace ("/\\\\\\\\/", '\\', $math);
        print $math;