Overview
Comment:Try to have a deterministic output
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 5fd3652de0732e80710a0881d0c810301bff3325cc5c7847ea93f1f86326fb08
User & Date: bohwaz on 2021-06-01 21:27:13
Other Links: manifest | tags
Context
2021-06-01
21:28
Fix reminders sent when that reminder was already sent before but since has been renewed check-in: 85aaa801cb user: bohwaz tags: trunk
21:27
Try to have a deterministic output check-in: 5fd3652de0 user: bohwaz tags: trunk
19:20
Add page to list sent reminders for one user check-in: a36b543df1 user: bohwaz tags: trunk, stable
Changes

Modified src/include/lib/Garradin/Utils.php from [3c532cfff6] to [87963c7e33].

899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923

            // Don't use \Collator::NUMERIC_COLLATION here as it goes against what would feel logic
            // with NUMERIC_COLLATION: 1, 2, 10, 11, 101
            // without: 1, 10, 101, 11, 2
        }

        if (isset(self::$collator)) {
            return self::$collator->compare($a, $b);
        }

        if (function_exists('\mb_convert_case')) {
            $a = \mb_convert_case($a, \MB_CASE_LOWER);
            $b = \mb_convert_case($b, \MB_CASE_LOWER);
        }
        else {
            $a = strtoupper(self::transliterateToAscii($a));
            $b = strtoupper(self::transliterateToAscii($b));
        }

        return strcmp($a, $b);
    }

    /**
     * Transforms a unicode string to lowercase AND removes all diacritics
     *







|


<
<
<
<
<
|
|
<







899
900
901
902
903
904
905
906
907
908





909
910

911
912
913
914
915
916
917

            // Don't use \Collator::NUMERIC_COLLATION here as it goes against what would feel logic
            // with NUMERIC_COLLATION: 1, 2, 10, 11, 101
            // without: 1, 10, 101, 11, 2
        }

        if (isset(self::$collator)) {
            return (int) self::$collator->compare($a, $b);
        }






        $a = strtoupper(self::transliterateToAscii($a));
        $b = strtoupper(self::transliterateToAscii($b));


        return strcmp($a, $b);
    }

    /**
     * Transforms a unicode string to lowercase AND removes all diacritics
     *