Dotclear


Ignore:
Timestamp:
01/02/17 17:03:59 (9 years ago)
Author:
franck <carnet.franck.paul@…>
Branch:
default
Message:

Switch from functions to closures (PHP 5.3+), fix available favorites order

File:
1 edited

Legend:

Unmodified
Added
Removed
  • admin/preferences.php

    r3443 r3491  
    678678echo '<h5 class="pretty-title">'.__('Other available favorites').'</h5>'; 
    679679$count = 0; 
    680 function cmp($a,$b) { 
    681     if ($a['title'] == $b['title']) { 
    682         return 0; 
    683     } 
    684     return ($a['title'] < $b['title']) ? -1 : 1; 
    685 } 
    686 uasort($avail_fav,'cmp'); 
     680uasort($avail_fav,function($a,$b) { 
     681     return strcoll( 
     682          strtolower(dcUtils::removeDiacritics($a['title'])), 
     683          strtolower(dcUtils::removeDiacritics($b['title']))); 
     684}); 
    687685 
    688686foreach ($avail_fav as $k => $v) { 
Note: See TracChangeset for help on using the changeset viewer.

Sites map