phpgroupware-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Phpgroupware-cvs] CVS: phpgwapi/inc class.arrayfunctions.inc.php,1.1.2


From: Lars Kneschke <address@hidden>
Subject: [Phpgroupware-cvs] CVS: phpgwapi/inc class.arrayfunctions.inc.php,1.1.2.2,1.1.2.3
Date: Thu, 20 Mar 2003 20:35:20 -0500

Update of /cvsroot/phpgroupware/phpgwapi/inc
In directory subversions:/tmp/cvs-serv13912

Modified Files:
      Tag: Version-0_9_14-branch
        class.arrayfunctions.inc.php 
Log Message:
added ascending descending sortig


Index: class.arrayfunctions.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/phpgwapi/inc/class.arrayfunctions.inc.php,v
retrieving revision 1.1.2.2
retrieving revision 1.1.2.3
diff -C2 -r1.1.2.2 -r1.1.2.3
*** class.arrayfunctions.inc.php        18 Dec 2002 00:20:46 -0000      1.1.2.2
--- class.arrayfunctions.inc.php        21 Mar 2003 01:35:17 -0000      1.1.2.3
***************
*** 35,41 ****
                */
                
!               function arfsort( $a, $fl )
                {
                        $GLOBALS['__ARFSORT_LIST__'] = $fl;
  
                        if (is_array($a))
--- 35,43 ----
                */
                
!               function arfsort( $a, $fl, $_sort='ASC' )
                {
                        $GLOBALS['__ARFSORT_LIST__'] = $fl;
+                       
+                       $this->sort=$_sort;
  
                        if (is_array($a))
***************
*** 54,58 ****
                        foreach( $GLOBALS['__ARFSORT_LIST__'] as $f )
                        {
!                               $strc = strcmp( $a[$f], $b[$f] );
                                if ( $strc != 0 )
                                {
--- 56,67 ----
                        foreach( $GLOBALS['__ARFSORT_LIST__'] as $f )
                        {
!                               if($this->sort == 'ASC')
!                               {
!                                       $strc = strcmp( $a[$f], $b[$f] );
!                               }
!                               else
!                               {
!                                       $strc = strcmp( $b[$f], $a[$f] );
!                               }
                                if ( $strc != 0 )
                                {





reply via email to

[Prev in Thread] Current Thread [Next in Thread]