r102411 fixup. Close register globals vuln, and document
authorPlatonides <platonides@users.mediawiki.org>
Sat, 7 Jan 2012 22:42:05 +0000 (22:42 +0000)
committerPlatonides <platonides@users.mediawiki.org>
Sat, 7 Jan 2012 22:42:05 +0000 (22:42 +0000)
why is there that require_once.

tests/phpunit/includes/specials/QueryAllSpecialPagesTest.php

index 3debaf7..95d60e9 100644 (file)
@@ -7,8 +7,14 @@
  * @author Antoine Musso
  * @group Database
  */
+
+if ( !defined( 'MEDIAWIKI' ) ) {
+       die( 1 );
+}
+
 global $IP;
-require_once("$IP/includes/QueryPage.php");
+require_once "$IP/includes/QueryPage.php"; // Needed to populate $wgQueryPages
+
 class QueryAllSpecialPagesTest extends MediaWikiTestCase {
 
        /** List query pages that can not be tested automatically */