diff --git a/lam/docs/devel/mod_accountPages.htm b/lam/docs/devel/mod_accountPages.htm index 2c49d69b..f7d56ec4 100644 --- a/lam/docs/devel/mod_accountPages.htm +++ b/lam/docs/devel/mod_accountPages.htm @@ -79,42 +79,7 @@ $this->orig['macAddress'] = $attr['macAddress'];


-

2. Defining pages
-

-You can define multiple subpages for your account page. Usually one -page is enough but you may display certain attribute settings on an -extra page (e.g. Unix group memberships are on a second page).
-
-The page names are set by pages() which -returns an array of names.
-
-Example:
-
-The -ieee802Device -module needs only one page which is called 'attributes'.
-
- - - - - - -
    /**
-    * This function returns a list of all account pages -in this module.
-    */
-    function pages() {
-        return array('attributes');
-    }
-
-
-
-

3. Page display

+

2. Page display

Now that you have defined your subpages you will need one function for each page to display it. The function must return meta HTML code as defined in the

-

4. Processing input data
+

3. Processing input data

Every time the user clicks on a submit button while your page is displayed LAM will call a function in your module.
@@ -306,7 +271,7 @@ $this->inputCorrect = true;


-

5. Defining that your module is ready for LDAP add/modify

+

4. Defining that your module is ready for LDAP add/modify

Before a new account can be created or modified all modules are asked if they are ready.

@@ -367,7 +332,7 @@ correct.


-

6. Saving the LDAP attributes
+

5. Saving the LDAP attributes

When all modules report that they are ready for LDAP add/modify and the user clicks on the add/modify button your module will be asked what diff --git a/lam/lib/modules/account.inc b/lam/lib/modules/account.inc index d5c2819b..70464550 100644 --- a/lam/lib/modules/account.inc +++ b/lam/lib/modules/account.inc @@ -140,15 +140,6 @@ class account extends baseModule { return "enabled"; } - /** - * This function returns a list of all possible pages of this module. - * - * @return array list of page names - */ - function pages() { - return array('attributes'); - } - /** * This function loads all attributes into the object. * diff --git a/lam/lib/modules/ieee802device.inc b/lam/lib/modules/ieee802device.inc index e5c93532..394db370 100644 --- a/lam/lib/modules/ieee802device.inc +++ b/lam/lib/modules/ieee802device.inc @@ -124,13 +124,6 @@ class ieee802Device extends baseModule { return $_SESSION[$this->base]->save_module_attributes($this->attributes, $this->orig); } - /** - * This function returns a list of all account pages in this module. - */ - function pages() { - return array('attributes'); - } - /** * This function will create the meta HTML code to show a page with all attributes. * diff --git a/lam/lib/modules/inetLocalMailRecipient.inc b/lam/lib/modules/inetLocalMailRecipient.inc index ad1d42ef..5fff22fc 100644 --- a/lam/lib/modules/inetLocalMailRecipient.inc +++ b/lam/lib/modules/inetLocalMailRecipient.inc @@ -176,13 +176,6 @@ class inetLocalMailRecipient extends baseModule { return $_SESSION[$this->base]->save_module_attributes($this->attributes, $this->orig); } - /** - * This function returns a list of all account pages in this module. - */ - function pages() { - return array('attributes'); - } - /** * This function will create the meta HTML code to show a page with all attributes. * diff --git a/lam/lib/modules/inetOrgPerson.inc b/lam/lib/modules/inetOrgPerson.inc index 2edfe40f..f2a068ca 100644 --- a/lam/lib/modules/inetOrgPerson.inc +++ b/lam/lib/modules/inetOrgPerson.inc @@ -377,15 +377,6 @@ class inetOrgPerson extends baseModule { return "enabled"; } - /* This function returns a list of all html-pages in module - * This is usefull for mass upload and pdf-files - * because lam can walk trough all pages itself and do some - * error checkings - */ - function pages() { - return array('attributes'); - } - /* This function returns an array with 4 entries: * array( DN1 ('add' => array($attr), 'remove' => array($attr), 'modify' => array($attr), 'lamdaemon' => array(cmds)), DN2 .... ) * DN is the DN to change. It may be possible to change several DNs, diff --git a/lam/lib/modules/kolabUser.inc b/lam/lib/modules/kolabUser.inc index 7f401ade..f1f39b2c 100644 --- a/lam/lib/modules/kolabUser.inc +++ b/lam/lib/modules/kolabUser.inc @@ -280,13 +280,6 @@ class kolabUser extends baseModule { return $_SESSION[$this->base]->save_module_attributes($this->attributes, $this->orig); } - /** - * This function returns a list of all account pages in this module. - */ - function pages() { - return array('attributes'); - } - /** * This function will create the meta HTML code to show a page with all attributes. * diff --git a/lam/lib/modules/nisMailAlias.inc b/lam/lib/modules/nisMailAlias.inc index 1282bd2f..086968f4 100644 --- a/lam/lib/modules/nisMailAlias.inc +++ b/lam/lib/modules/nisMailAlias.inc @@ -153,13 +153,6 @@ class nisMailAlias extends baseModule { return $_SESSION[$this->base]->save_module_attributes($this->attributes, $this->orig); } - /** - * This function returns a list of all account pages in this module. - */ - function pages() { - return array('attributes'); - } - /** * This function will create the meta HTML code to show a page with all attributes. * diff --git a/lam/lib/modules/posixAccount.inc b/lam/lib/modules/posixAccount.inc index 6ffac0b6..4bb9a3a2 100644 --- a/lam/lib/modules/posixAccount.inc +++ b/lam/lib/modules/posixAccount.inc @@ -443,15 +443,6 @@ class posixAccount extends baseModule { return true; } - /* This function returns a list of all html-pages in module - * This is usefull for mass upload and pdf-files - * because lam can walk trough all pages itself and do some - * error checkings - */ - function pages() { - return array('attributes', 'group'); - } - /* This function loads all attributes into the object * $attr is an array as it's retured from ldap_get_attributes */ diff --git a/lam/lib/modules/posixGroup.inc b/lam/lib/modules/posixGroup.inc index f6858afd..ff2a5840 100644 --- a/lam/lib/modules/posixGroup.inc +++ b/lam/lib/modules/posixGroup.inc @@ -519,16 +519,6 @@ class posixGroup extends baseModule { } - /* This function returns a list of all html-pages in module - * This is usefull for mass upload and pdf-files - * because lam can walk trough all pages itself and do some - * error checkings - */ - function pages() { - return array('attributes', 'user'); - } - - /** * Processes user input of the primary module page. * It checks if all input values are correct and updates the associated LDAP attributes. diff --git a/lam/lib/modules/quota.inc b/lam/lib/modules/quota.inc index 43220cbe..5f6161e7 100644 --- a/lam/lib/modules/quota.inc +++ b/lam/lib/modules/quota.inc @@ -174,23 +174,6 @@ class quota extends baseModule { return true; } - /* This function returns a list of all html-pages in module - * This is usefull for mass upload and pdf-files - * because lam can walk trough all pages itself and do some - * error checkings - */ - function pages() { - return array('attributes'); - } - - /* This function returns all ldap attributes - * which are part of quota and returns - * also their values. - */ - function get_attributes() { - return $this->quota; - } - /* This function loads all attributes into the object * $attr is an array as it's retured from ldap_get_attributes */ @@ -468,6 +451,9 @@ class quota extends baseModule { return array( 'quota_quotas' => $quotas); } + else { + return array(); + } } /** diff --git a/lam/lib/modules/sambaAccount.inc b/lam/lib/modules/sambaAccount.inc index a18cb86d..2cddfcbd 100644 --- a/lam/lib/modules/sambaAccount.inc +++ b/lam/lib/modules/sambaAccount.inc @@ -433,7 +433,7 @@ class sambaAccount extends baseModule { if ($_SESSION[$this->base]->module['posixAccount']->attributes['gidNumber'][0]=='') return false; if ($_SESSION[$this->base]->module['posixAccount']->attributes['uidNumber'][0]=='') return false; return true; - } + } /** * This functions returns true if all needed settings are done @@ -446,15 +446,6 @@ class sambaAccount extends baseModule { return true; } - /* This function returns a list of all html-pages in module - * This is usefull for mass upload and pdf-files - * because lam can walk trough all pages itself and do some - * error checkings - */ - function pages() { - return array('attributes', 'userWorkstations'); - } - /* This function loads all attributes into the object * $attr is an array as it's retured from ldap_get_attributes */ diff --git a/lam/lib/modules/sambaGroupMapping.inc b/lam/lib/modules/sambaGroupMapping.inc index 04f5fa3a..2d939f4b 100644 --- a/lam/lib/modules/sambaGroupMapping.inc +++ b/lam/lib/modules/sambaGroupMapping.inc @@ -201,15 +201,6 @@ class sambaGroupMapping extends baseModule { return $return; } - /* This function returns all ldap attributes - * which are part of sambaGroupMapping and returns - * also their values. - */ - function get_attributes() { - return $this->attributes; - } - - /** * Returns meta data that is interpreted by parent class * @@ -367,23 +358,13 @@ class sambaGroupMapping extends baseModule { if ($this->attributes['sambaSID'][0] == '') return false; if ($this->attributes['sambaGroupType'][0] == '') return false; return true; - } + } function module_ready() { if ($_SESSION[$this->base]->module['posixGroup']->attributes['gidNumber'][0]=='') return false; return true; - } - - - /* This function returns a list of all html-pages in module - * This is usefull for mass upload and pdf-files - * because lam can walk trough all pages itself and do some - * error checkings - */ - function pages() { - return array('attributes'); - } + } /** diff --git a/lam/lib/modules/sambaSamAccount.inc b/lam/lib/modules/sambaSamAccount.inc index c0fef66a..ab289a5b 100644 --- a/lam/lib/modules/sambaSamAccount.inc +++ b/lam/lib/modules/sambaSamAccount.inc @@ -426,7 +426,7 @@ class sambaSamAccount extends baseModule { if ($_SESSION[$this->base]->module['posixAccount']->attributes['uidNumber'][0]=='') return false; if ($this->attributes['uid'][0]=='') return false; return true; - } + } /* This functions return true * if all needed settings are done @@ -435,17 +435,8 @@ class sambaSamAccount extends baseModule { if (!$this->module_ready()) return false; if ($this->attributes['sambaSID'][0] == '') return false; return true; - } + } - /* This function returns a list of all html-pages in module - * This is usefull for mass upload and pdf-files - * because lam can walk trough all pages itself and do some - * error checkings - */ - function pages() { - return array('attributes', 'sambaUserWorkstations'); - } - /* This function loads all attributes into the object * $attr is an array as it's retured from ldap_get_attributes */ diff --git a/lam/lib/modules/shadowAccount.inc b/lam/lib/modules/shadowAccount.inc index ad4b6836..03a0f8a1 100644 --- a/lam/lib/modules/shadowAccount.inc +++ b/lam/lib/modules/shadowAccount.inc @@ -202,15 +202,6 @@ class shadowAccount extends baseModule { return $return; } - /** - * This function returns a list of all module pages. - * - * @return array list of page names - */ - function pages() { - return array('attributes'); - } - /** * Returns a list of modifications which have to be made to the LDAP account. *