From 0c77b21df2f8ae686891b318ffe2cf41b0570797 Mon Sep 17 00:00:00 2001 From: Roland Gruber Date: Mon, 23 Aug 2004 20:01:40 +0000 Subject: [PATCH] added first interface for file upload --- lam/lib/baseModule.inc | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) diff --git a/lam/lib/baseModule.inc b/lam/lib/baseModule.inc index 571a6342..14d7085b 100644 --- a/lam/lib/baseModule.inc +++ b/lam/lib/baseModule.inc @@ -336,6 +336,47 @@ class baseModule { return ((isset($this->meta['PDF_entries'])) ? $this->meta['PDF_entries'] : array()); } + /** + * Returns an array containing all input columns for the file upload. + * + * Syntax: + *
array( + *
string: name, // fixed non-translated name which is used as column name (should be of format: _) + *
string: descriptive name, // short descriptive name + *
string: help entry, // help ID + *
string: example, // example value + *
boolean: required // true, if user must set a value for this column + *
) + * + * @return array column list + */ + function get_uploadColumns() { + if (isset($this->meta['upload_columns'])) return $this->meta['upload_columns']; + else return array(); + } + + /** + * Returns a list of module names which must be processed in building the account befor this module. + * + * @return array list of module names + */ + function get_uploadPreDepends() { + if (isset($this->meta['upload_preDepends'])) return $this->meta['upload_preDepends']; + else return array(); + } + + /** + * In this function the LDAP account is build up. + * + * @param array $rawAccounts list of hash arrays (name => value) from user input + * @param array $partialAccounts list of hash arrays (name => value) which are later added to LDAP + * @return array the updated partialAccouts + */ + function build_uploadAccounts($rawAccounts, $partialAccounts) { + // must be implemented in sub modules + return $partialAccounts; + } + // TODO implement missing interface }