com web/pres2: Ouch, bad sort function here: index.php
[email protected] (Rasmus Lerdorf)
| Newsgroups | php.pres |
|---|---|
| Message-ID | <[email protected]> |
Commit: c9574f041b72a37516cdb9ed765f5b5e94cd96ae Author: Rasmus Lerdorf <[email protected]> Sun, 18 Jan 2015 21:08:44 -0800 Parents: 1ccda1ef00fb9655ef2938b0237ec06b54380223 Branches: master Link: http://git.php.net/?p=web/pres2.git;a=commitdiff;h=c9574f041b72a37516cdb9ed765f5b5e94cd96ae Log: Ouch, bad sort function here Changed paths: M index.php Diff: diff --git a/index.php b/index.php index 48673ec..e1425d6 100644 --- a/index.php +++ b/index.php @@ -219,7 +219,7 @@ switch($display_mode) { $prnum = sizeof($pr); function cmp($a,$b) { - return strtotime($a['date']) < strtotime($b['date']); + return strtotime($b['date']) - strtotime($a['date']); } usort($pr,'cmp');