projects
/
platal.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5ba8842
)
Order educations by graduation year in the database and in the display (Ooops, sorry).
author
Stéphane Jacob
<jacou@melix.net>
Thu, 21 Aug 2008 14:54:05 +0000
(16:54 +0200)
committer
Stéphane Jacob
<jacou@melix.net>
Thu, 21 Aug 2008 14:56:56 +0000
(16:56 +0200)
modules/profile/general.inc.php
patch
|
blob
|
blame
|
history
diff --git
a/modules/profile/general.inc.php
b/modules/profile/general.inc.php
index
794f746
..
59ed455
100644
(file)
--- a/
modules/profile/general.inc.php
+++ b/
modules/profile/general.inc.php
@@
-87,10
+87,12
@@
class ProfileEdu implements ProfileSetting
}
static function sortByGradYear($line1, $line2) {
- if ($line1['grad_year'] == $line2['grad_year']) {
+ $a = (int) $line1['grad_year'];
+ $b = (int) $line2['grad_year'];
+ if ($a == $b) {
return 0;
}
- return ($
line1['grad_year'] < $line2['grad_year']
) ? -1 : 1;
+ return ($
a < $b
) ? -1 : 1;
}
public function value(ProfilePage &$page, $field, $value, &$success)