X-Git-Url: http://git.heureux-cyclage.org/?a=blobdiff_plain;f=profileinfo.php;h=bdc235bdc352ae3b74d0e6e1800e2ac4835cb738;hb=3ccace42c0b0900ae720ad5a73d0512e2131c3ff;hp=91e6589463f32c296835cc5c21c8f5708ed05b2f;hpb=152a60a024b0184b3f6a01ed6f95e3459c157b9e;p=lhc%2Fweb%2Fwiklou.git diff --git a/profileinfo.php b/profileinfo.php index 91e6589463..bdc235bdc3 100644 --- a/profileinfo.php +++ b/profileinfo.php @@ -21,7 +21,6 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - $Id$ --> @@ -48,6 +47,10 @@ $wgDBadminuser = $wgDBadminpassword = $wgDBserver = $wgDBname = $wgEnableProfileInfo = false; define("MEDIAWIKI", 1); +if ( isset( $_REQUEST['GLOBALS'] ) ) { + print $GLOBALS; + die( '$GLOBALS overwrite vulnerability'); +} require_once("./includes/Defines.php"); require_once("./LocalSettings.php"); @@ -196,6 +199,8 @@ function makeurl($_filter = false, $_sort = false, $_expand = false) { } $points = array(); +$queries = array(); +$sqltotal = 0.0; $last = false; while (($o = mysql_fetch_object($res)) !== false) { @@ -208,9 +213,19 @@ while (($o = mysql_fetch_object($res)) !== false) { } } $last = $next; - $points[] = $next; + if (preg_match("/^query: /", $next->name())) { + $sqltotal += $next->time(); + $queries[] = $next; + } else { + $points[] = $next; + } } +$s = new profile_point("SQL Queries", 0, $sqltotal); +foreach ($queries as $q) + $s->add_child($q); +$points[] = $s; + usort($points, "compare_point"); foreach ($points as $point) { @@ -230,4 +245,4 @@ mysql_close($dbh); ?> -