dépôts
/
lhc
/
web
/
wiklou.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Replace very trivial mock builders with createMock()
[lhc/web/wiklou.git]
/
profileinfo.php
diff --git
a/profileinfo.php
b/profileinfo.php
index
0a60b08
..
dccdd38
100644
(file)
--- a/
profileinfo.php
+++ b/
profileinfo.php
@@
-37,9
+37,8
@@
*/
// This endpoint is supposed to be independent of request cookies and other
*/
// This endpoint is supposed to be independent of request cookies and other
-// details of the session. Log warnings for violations of the no-session
-// constraint.
-define( 'MW_NO_SESSION', 'warn' );
+// details of the session. Enforce this constraint with respect to session use.
+define( 'MW_NO_SESSION', 1 );
ini_set( 'zlib.output_compression', 'off' );
ini_set( 'zlib.output_compression', 'off' );
@@
-339,11
+338,7
@@
$res = $dbr->select(
[ 'ORDER BY' => 'pf_name ASC' ]
);
[ 'ORDER BY' => 'pf_name ASC' ]
);
-if ( isset( $_REQUEST['filter'] ) ) {
- $filter = $_REQUEST['filter'];
-} else {
- $filter = '';
-}
+$filter = $_REQUEST['filter'] ?? '';
?>
<form method="get" action="profileinfo.php">
?>
<form method="get" action="profileinfo.php">
@@
-417,6
+412,7
@@
if ( isset( $_REQUEST['filter'] ) ) {
$queries = [];
$sqltotal = 0.0;
$queries = [];
$sqltotal = 0.0;
+ /** @var profile_point|false $last */
$last = false;
foreach ( $res as $o ) {
$next = new profile_point( $o->pf_name, $o->pf_count, $o->pf_time, $o->pf_memory );
$last = false;
foreach ( $res as $o ) {
$next = new profile_point( $o->pf_name, $o->pf_count, $o->pf_time, $o->pf_memory );
@@
-440,7
+436,7
@@
if ( isset( $_REQUEST['filter'] ) ) {
}
}
}
}
- $s = new profile_point( 'SQL Queries', 0, $sqltotal, 0
, 0
);
+ $s = new profile_point( 'SQL Queries', 0, $sqltotal, 0 );
foreach ( $queries as $q ) {
$s->add_child( $q );
}
foreach ( $queries as $q ) {
$s->add_child( $q );
}