summaryrefslogtreecommitdiff
path: root/profileinfo.php
diff options
context:
space:
mode:
authorPierre Schmitz <pierre@archlinux.de>2006-10-11 20:21:25 +0000
committerPierre Schmitz <pierre@archlinux.de>2006-10-11 20:21:25 +0000
commitd81f562b712f2387fa02290bf2ca86392ab356f2 (patch)
treed666cdefbe6ac320827a2c6cb473581b46e22c4c /profileinfo.php
parent183851b06bd6c52f3cae5375f433da720d410447 (diff)
Aktualisierung auf Version 1.8.1
Diffstat (limited to 'profileinfo.php')
-rw-r--r--profileinfo.php26
1 files changed, 12 insertions, 14 deletions
diff --git a/profileinfo.php b/profileinfo.php
index 52658fb4..4e2a3d76 100644
--- a/profileinfo.php
+++ b/profileinfo.php
@@ -46,23 +46,21 @@
$wgDBadminuser = $wgDBadminpassword = $wgDBserver = $wgDBname = $wgEnableProfileInfo = false;
-define("MEDIAWIKI", 1);
-if ( isset( $_REQUEST['GLOBALS'] ) ) {
- echo '<a href="http://www.hardened-php.net/index.76.html">$GLOBALS overwrite vulnerability</a>';
- die( -1 );
-}
-
-require_once("./includes/Defines.php");
-require_once("./LocalSettings.php");
+define( 'MW_NO_SETUP', 1 );
+require_once( './includes/WebStart.php' );
require_once("./AdminSettings.php");
if (!$wgEnableProfileInfo) {
- wfDie("disabled");
+ echo "disabled\n";
+ exit( 1 );
}
foreach (array("wgDBadminuser", "wgDBadminpassword", "wgDBserver", "wgDBname") as $var)
- if ($$var === false)
- wfDie("AdminSettings.php not correct");
+ if ($$var === false) {
+ echo "AdminSettings.php not correct\n";
+ exit( 1 );
+ }
+
$expand = array();
if (isset($_REQUEST['expand']))
@@ -156,13 +154,13 @@ if (isset($_REQUEST['sort']) && in_array($_REQUEST['sort'], $sorts))
$sort = $_REQUEST['sort'];
$dbh = mysql_connect($wgDBserver, $wgDBadminuser, $wgDBadminpassword)
- or wfDie("mysql server failed: " . mysql_error());
-mysql_select_db($wgDBname, $dbh) or wfDie(mysql_error($dbh));
+ or die("mysql server failed: " . mysql_error());
+mysql_select_db($wgDBname, $dbh) or die(mysql_error($dbh));
$res = mysql_query("
SELECT pf_count, pf_time, pf_name
FROM profiling
ORDER BY pf_name ASC
-", $dbh) or wfDie("query failed: " . mysql_error());
+", $dbh) or die("query failed: " . mysql_error());
if (isset($_REQUEST['filter']))
$filter = $_REQUEST['filter'];