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
Update jetbrains/phpstorm-stubs
[lhc/web/wiklou.git]
/
profileinfo.php
diff --git
a/profileinfo.php
b/profileinfo.php
index
ca8c1bb
..
8bd37dd
100644
(file)
--- a/
profileinfo.php
+++ b/
profileinfo.php
@@
-291,24
+291,26
@@
function compare_point( profile_point $a, profile_point $b ) {
global $sort;
switch ( $sort ) {
global $sort;
switch ( $sort ) {
+ // Sorted ascending:
case 'name':
return strcmp( $a->name(), $b->name() );
case 'name':
return strcmp( $a->name(), $b->name() );
+ // Sorted descending:
case 'time':
case 'time':
- return $
a->time() > $b->time() ? -1 : 1
;
+ return $
b->time() <=> $a->time()
;
case 'memory':
case 'memory':
- return $
a->memory() > $b->memory() ? -1 : 1
;
+ return $
b->memory() <=> $a->memory()
;
case 'count':
case 'count':
- return $
a->count() > $b->count() ? -1 : 1
;
+ return $
b->count() <=> $a->count()
;
case 'time_per_call':
case 'time_per_call':
- return $
a->timePerCall() > $b->timePerCall() ? -1 : 1
;
+ return $
b->timePerCall() <=> $a->timePerCall()
;
case 'memory_per_call':
case 'memory_per_call':
- return $
a->memoryPerCall() > $b->memoryPerCall() ? -1 : 1
;
+ return $
b->memoryPerCall() <=> $a->memoryPerCall()
;
case 'calls_per_req':
case 'calls_per_req':
- return $
a->callsPerRequest() > $b->callsPerRequest() ? -1 : 1
;
+ return $
b->callsPerRequest() <=> $a->callsPerRequest()
;
case 'time_per_req':
case 'time_per_req':
- return $
a->timePerRequest() > $b->timePerRequest() ? -1 : 1
;
+ return $
b->timePerRequest() <=> $a->timePerRequest()
;
case 'memory_per_req':
case 'memory_per_req':
- return $
a->memoryPerRequest() > $b->memoryPerRequest() ? -1 : 1
;
+ return $
b->memoryPerRequest() <=> $a->memoryPerRequest()
;
}
}
}
}
@@
-394,8
+396,8
@@
if ( isset( $_REQUEST['filter'] ) ) {
return htmlspecialchars(
'?' .
wfArrayToCgi( [
return htmlspecialchars(
'?' .
wfArrayToCgi( [
- 'filter' => $_filter ?
$_filter
: $filter,
- 'sort' => $_sort ?
$_sort
: $sort,
+ 'filter' => $_filter ?: $filter,
+ 'sort' => $_sort ?: $sort,
'expand' => implode( ',', array_keys( $_expand ) )
] )
);
'expand' => implode( ',', array_keys( $_expand ) )
] )
);