[ghelda-devel] [47] Add RequestFieldList functionality to plugin/Address |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/ghelda-devel Archives
]
Revision: 47
Author: odyx
Date: 2009-05-20 13:48:24 +0200 (Wed, 20 May 2009)
Log Message:
-----------
Add RequestFieldList functionality to plugin/Address
Modified Paths:
--------------
trunk/plugins/Address.php
Modified: trunk/plugins/Address.php
===================================================================
--- trunk/plugins/Address.php 2009-05-20 11:48:23 UTC (rev 46)
+++ trunk/plugins/Address.php 2009-05-20 11:48:24 UTC (rev 47)
@@ -110,6 +110,9 @@
case "People.edit.bottom":
return $this->People_edit_bottom($funcArgs);
break;
+ case "Requests.FieldsList":
+ return $this->RequestsFieldsList();
+ break;
}
}
@@ -364,5 +367,22 @@
// trigger_error(var_export($addresses,true),G_E_DISPLAY);
return $to_return;
}
+
+ private function RequestsFieldsList()
+ { $this->startTrad();
+
+ $to_return['name'] = T_('Addresses');
+ $to_return['fieldsList'] = $this->configH[$this->name]['fields'];
+
+ $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;
+ }
}
?>
\ No newline at end of file