[ghelda-devel] [49] Add Requests functionality to Groups

[ Thread Index | Date Index | More lists.tuxfamily.org/ghelda-devel Archives ]


Revision: 49
Author:   odyx
Date:     2009-05-20 13:48:27 +0200 (Wed, 20 May 2009)

Log Message:
-----------
Add Requests functionality to Groups

Modified Paths:
--------------
    trunk/plugins/Groups.php


Modified: trunk/plugins/Groups.php
===================================================================
--- trunk/plugins/Groups.php	2009-05-20 11:48:26 UTC (rev 48)
+++ trunk/plugins/Groups.php	2009-05-20 11:48:27 UTC (rev 49)
@@ -111,6 +111,9 @@
             case "People.edit.bottom":
                 return $this->People_edit_bottom($funcArgs);
                 break;
+            case "Requests.FieldsList":
+                return $this->RequestsFieldsList();
+                break;
         }
     }
 
@@ -418,5 +421,27 @@
         $this->stopTrad();
         return $to_return;
     }
+    
+    private function RequestsFieldsList()
+    {   $this->startTrad();
+    
+        // Fill the necessary attributes
+        $fields     = $this->configH[$this->name]['fields'];
+        $fieldsLink = $this->configH[$this->name]['fields_link'];
+
+        $to_return['name'] = T_('Groups');
+        $to_return['fieldsList'] = array_merge($fields,$fieldsLink);
+
+        $i = 0;
+        // Sort the fields in descending Order 
+        foreach( $to_return['fieldsList'] as $fieldName => $field ) {
+            $orderArray[$fieldName] = !empty($field['order']) ? $field['order'] : $i--;
+        }
+        array_multisort($orderArray,SORT_DESC,$to_return['fieldsList']);
+
+        
+        $this->stopTrad();
+        return $to_return;
+    }
 }
 ?>


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/