Author: david
Date: Fri Oct 14 14:10:20 2011
New Revision: 10105

Log:
Sort dates in ascending order

Modified:
   trunk/apps/qubit/modules/informationobject/actions/fileListAction.class.php
   trunk/apps/qubit/modules/informationobject/actions/itemListAction.class.php

Modified: 
trunk/apps/qubit/modules/informationobject/actions/fileListAction.class.php
==============================================================================
--- trunk/apps/qubit/modules/informationobject/actions/fileListAction.class.php 
Fri Oct 14 14:09:45 2011        (r10104)
+++ trunk/apps/qubit/modules/informationobject/actions/fileListAction.class.php 
Fri Oct 14 14:10:20 2011        (r10105)
@@ -42,7 +42,7 @@
         $choices = array(
           'referenceCode' => $this->context->i18n->__('Reference code'),
           'title' => $this->context->i18n->__('Title'),
-          'startDate' => $this->context->i18n->__('Date (most recent first)')
+          'startDate' => $this->context->i18n->__('Date (based on start date)')
         );
 
         if ($this->getUser()->isAuthenticated())
@@ -150,14 +150,7 @@
         uasort($items, function($a, $b) use ($sortBy) {
            return strnatcasecmp($a[$sortBy], $b[$sortBy]); 
         });
-
-        // Sort dates in *descending* order
-        if ('startDate' == $sortBy)
-        {
-          $items = array_reverse($items, true);
-        }
       }
-
     }
   }
 

Modified: 
trunk/apps/qubit/modules/informationobject/actions/itemListAction.class.php
==============================================================================
--- trunk/apps/qubit/modules/informationobject/actions/itemListAction.class.php 
Fri Oct 14 14:09:45 2011        (r10104)
+++ trunk/apps/qubit/modules/informationobject/actions/itemListAction.class.php 
Fri Oct 14 14:10:20 2011        (r10105)
@@ -43,7 +43,7 @@
         $choices = array(
           'referenceCode' => $this->context->i18n->__('Reference code'),
           'title' => $this->context->i18n->__('Title'),
-          'startDate' => $this->context->i18n->__('Date (most recent first)')
+          'startDate' => $this->context->i18n->__('Date (based on start date)')
         );
 
         if ($this->getUser()->isAuthenticated())
@@ -169,12 +169,6 @@
         uasort($items, function($a, $b) use ($sortBy) {
            return strnatcasecmp($a[$sortBy], $b[$sortBy]); 
         });
-
-        // Sort dates in *descending* order
-        if ('startDate' == $sortBy)
-        {
-          $items = array_reverse($items, true);
-        }
       }
 
     }

-- 
You received this message because you are subscribed to the Google Groups 
"Qubit Toolkit Commits" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/qubit-commits?hl=en.

Reply via email to