Clean up access points
authorWaldir Pimenta <waldir@email.com>
Fri, 15 Feb 2013 07:31:48 +0000 (07:31 +0000)
committerKrinkle <krinklemail@gmail.com>
Fri, 28 Mar 2014 01:05:30 +0000 (01:05 +0000)
* Harmonize spacing
* Use // for comments rather than #
* Harmonize call style for 'require', 'include' etc.
* Add missing profileinfo.php5
* Use "./" for path to api.php in api.php5 (to match other php5 files).
* Move documentation related to Setup.php from index.php to WebStart.php
* Remove "Initialise common code." comment in api.php (was already remove
  in most entry points)

Change-Id: I8dc4a79fd13cee49e34f250a4039b3666bd42aca

16 files changed:
api.php
api.php5
img_auth.php5
includes/WebStart.php
includes/rcfeed/XMLRCFeedFormatter.php
index.php
index.php5
load.php5
mw-config/index.php
mw-config/index.php5
opensearch_desc.php5
profileinfo.php5 [new file with mode: 0644]
thumb.php5
thumb_handler.php
thumb_handler.php5
wiki.phtml

diff --git a/api.php b/api.php
index 554c272..e55ec75 100644 (file)
--- a/api.php
+++ b/api.php
@@ -40,7 +40,6 @@ if ( !function_exists( 'version_compare' ) || version_compare( phpversion(), '5.
        wfPHPVersionError( 'api.php' );
 }
 
-// Initialise common code.
 require __DIR__ . '/includes/WebStart.php';
 
 wfProfileIn( 'api.php' );
index 1828b7b..524dfd5 100644 (file)
--- a/api.php5
+++ b/api.php5
@@ -1,7 +1,7 @@
 <?php
 /**
- * Version of api.php to used in web server requiring .php5 extension
- * to execute scripts with PHP5 engine.
+ * Version of api.php to be used in web servers that require the .php5
+ * extension to execute scripts with the PHP5 engine.
  *
  * 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
@@ -21,4 +21,4 @@
  * @file
  */
 
-require 'api.php';
+require './api.php';
index a86d7c0..7aee69a 100644 (file)
@@ -1,7 +1,7 @@
 <?php
 /**
- * Version of img_auth.php to used in web server requiring .php5 extension
- * to execute scripts with PHP5 engine.
+ * Version of img_auth.php to be used in web servers that require the .php5
+ * extension to execute scripts with the PHP5 engine.
  *
  * 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
index eb79134..766b3bf 100644 (file)
@@ -1,10 +1,13 @@
 <?php
 /**
- * This does the initial setup for a web request.
+ * This does the initial set up for a web request.
  * It does some security checks, starts the profiler and loads the
  * configuration, and optionally loads Setup.php depending on whether
  * MW_NO_SETUP is defined.
  *
+ * Setup.php (if loaded) then sets up GlobalFunctions, the AutoLoader,
+ * and the configuration globals (though not $wgTitle).
+ *
  * 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
index d572426..d4df91a 100644 (file)
@@ -1,5 +1,4 @@
 <?php
-
 /**
  * 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
index 8885d0e..bc46111 100644 (file)
--- a/index.php
+++ b/index.php
@@ -40,9 +40,6 @@ if ( !function_exists( 'version_compare' ) || version_compare( phpversion(), '5.
        wfPHPVersionError( 'index.php' );
 }
 
-# Initialise common code.  This gives us access to GlobalFunctions, the
-# AutoLoader, and the globals $wgRequest, $wgOut, $wgUser, $wgLang and
-# $wgContLang, amongst others
 require __DIR__ . '/includes/WebStart.php';
 
 $mediaWiki = new MediaWiki();
index b3e40b6..b2ffe50 100644 (file)
@@ -1,7 +1,7 @@
 <?php
 /**
- * Version of index.php to used in web server requiring .php5 extension
- * to execute scripts with PHP5 engine.
+ * Version of index.php to be used in web servers that require the .php5
+ * extension to execute scripts with the PHP5 engine.
  *
  * 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
index 9471c65..fb3c764 100644 (file)
--- a/load.php5
+++ b/load.php5
@@ -1,7 +1,7 @@
 <?php
 /**
- * Version of load.php to used in web server requiring .php5 extension
- * to execute scripts with PHP5 engine.
+ * Version of load.php to be used in web servers that require the .php5
+ * extension to execute scripts with the PHP5 engine.
  *
  * 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
index 570b426..fc7eadb 100644 (file)
@@ -23,6 +23,8 @@
 define( 'MW_CONFIG_CALLBACK', 'Installer::overrideConfig' );
 define( 'MEDIAWIKI_INSTALL', true );
 
+// Resolve relative to regular MediaWiki root
+// instead of mw-config subdirectory.
 chdir( dirname( __DIR__ ) );
 require dirname( __DIR__ ) . '/includes/WebStart.php';
 
index bc9e891..8898653 100644 (file)
@@ -1,7 +1,7 @@
 <?php
 /**
- * Version of mw-config/index.php to used in web server requiring .php5
- * extension to execute scripts with PHP5 engine.
+ * Version of mw-config/index.php to be used in web servers that require the .php5
+ * extension to execute scripts with the PHP5 engine.
  *
  * 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
@@ -21,5 +21,6 @@
  * @file
  */
 
-define('MW_INSTALL_PHP5_EXT', 1);
+define( 'MW_INSTALL_PHP5_EXT', 1 );
+
 require './index.php';
index 0c499a4..a4dde37 100644 (file)
@@ -1,7 +1,7 @@
 <?php
 /**
- * Version of opensearch_desc.php to used in web server requiring .php5 extension
- * to execute scripts with PHP5 engine.
+ * Version of opensearch_desc.php to be used in web servers that require the .php5
+ * extension to execute scripts with the PHP5 engine.
  *
  * 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
diff --git a/profileinfo.php5 b/profileinfo.php5
new file mode 100644 (file)
index 0000000..14ef421
--- /dev/null
@@ -0,0 +1,24 @@
+<?php
+/**
+ * Version of profileinfo.php to be used in web servers that require the .php5
+ * extension to execute scripts with the PHP5 engine.
+ *
+ * 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
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * http://www.gnu.org/copyleft/gpl.html
+ *
+ * @file
+ */
+
+require './profileinfo.php';
index 2a57d4a..d07b86f 100644 (file)
@@ -1,7 +1,7 @@
 <?php
 /**
- * Version of thumb.php to used in web server requiring .php5 extension
- * to execute scripts with PHP5 engine.
+ * Version of thumb.php to be used in web servers that require the .php5
+ * extension to execute scripts with the PHP5 engine.
  *
  * 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
index 7afa9aa..e2b165b 100644 (file)
@@ -24,6 +24,6 @@
 
 define( 'THUMB_HANDLER', true );
 
-# Execute thumb.php, having set THUMB_HANDLER so that
-# it knows to extract params from a thumbnail file URL.
+// Execute thumb.php, having set THUMB_HANDLER so that
+// it knows to extract params from a thumbnail file URL.
 require __DIR__ . '/thumb.php';
index f160c87..0e0c3c0 100644 (file)
@@ -1,7 +1,7 @@
 <?php
 /**
- * Version of thumb_handler.php to used in web server requiring .php5 extension
- * to execute scripts with PHP5 engine.
+ * Version of thumb_handler.php to be used in web servers that require the .php5
+ * extension to execute scripts with the PHP5 engine.
  *
  * 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
index b5450e1..a197545 100644 (file)
@@ -1,3 +1,3 @@
 <?php
-// stub file for compatibility with older versions
+// Stub file for compatibility with older versions of MediaWiki
 include_once './index.php';