Index: profileinfo.php =================================================================== --- profileinfo.php (revision 49983) +++ profileinfo.php (working copy) @@ -219,14 +219,14 @@ if (isset($_REQUEST['sort']) && in_array($_REQUEST['sort'], $sorts)) $sort = $_REQUEST['sort']; -$dbh = mysql_connect($wgDBserver, $wgDBadminuser, $wgDBadminpassword) + +$dbr = wfGetDB( DB_SLAVE) or die("mysql server failed: " . mysql_error()); -mysql_select_db($wgDBname, $dbh) or die(mysql_error($dbh)); -$res = mysql_query(" +$res = $dbr->query(" SELECT pf_count, pf_time, pf_memory, pf_name FROM {$wgDBprefix}profiling ORDER BY pf_name ASC -", $dbh) or die("query failed: " . mysql_error()); +"); if (isset($_REQUEST['filter'])) $filter = $_REQUEST['filter']; @@ -276,7 +276,7 @@ $sqltotal = 0.0; $last = false; -while (($o = mysql_fetch_object($res)) !== false) { +while (($o = $dbr->fetchObject($res)) !== false) { $next = new profile_point($o->pf_name, $o->pf_count, $o->pf_time, $o->pf_memory); if( $next->name() == '-total' ) { $totaltime = $next->time(); @@ -318,8 +318,7 @@

Total memory:

freeResult($res); ?>