/[smecontribs]/rpms/phpki/contribs10/phpki-0.82-fix-dates-3.patch
ViewVC logotype

Annotation of /rpms/phpki/contribs10/phpki-0.82-fix-dates-3.patch

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.1 - (hide annotations) (download)
Tue Nov 24 14:35:53 2020 UTC (3 years, 11 months ago) by brianr
Branch: MAIN
CVS Tags: phpki-0_82-24_el7_sme, HEAD
Initial import

1 brianr 1.1 diff -ruN phpki.old/phpki-0.82/include/my_functions.php phpki/phpki-0.82/include/my_functions.php
2     --- phpki.old/phpki-0.82/include/my_functions.php 2020-04-02 14:27:14.041463385 +0200
3     +++ phpki/phpki-0.82/include/my_functions.php 2020-04-02 14:28:41.770684362 +0200
4     @@ -73,17 +73,25 @@
5     #
6     # Sort a two multidimensional array by one of it's columns
7     #
8     -function csort($array, $column, $ascdec=SORT_ASC){
9     - if (sizeof($array) == 0) return $array;
10     +function csort($array, $column, $ascdec=SORT_ASC){
11    
12     - // Sort by digital date rather than text date
13     - if ($column == 'issued') $column = "issuedSort";
14     - if ($column == 'expires') $column = 'expiresSort';
15     + if (sizeof($array) == 0) return $array;
16    
17     - foreach($array as $x) $sortarr[]=$x[$column];
18     - array_multisort($sortarr, $ascdec, $array);
19     -
20     - return $array;
21     + // Sort by digital date rather than text date
22     + if ($column == 'issued') $column = "issuedSort";
23     + if ($column == 'expires') $column = 'expiresSort';
24     +
25     + if ($column == 'status') {
26     + foreach($array as $x) {
27     + $sortarr[]=$x[$column];
28     + $sortdate[] = $x['expiresSort'];
29     + }
30     + array_multisort($sortarr, $ascdec, $sortdate, SORT_ASC, $array);
31     + } else {
32     + foreach($array as $x) $sortarr[]=$x[$column];
33     + array_multisort($sortarr, $ascdec, $array);
34     + }
35     + return $array;
36     }
37    
38    

admin@koozali.org
ViewVC Help
Powered by ViewVC 1.2.1 RSS 2.0 feed