removed obsolete pages() and get_attributes() functions

This commit is contained in:
Roland Gruber 2005-09-19 18:43:10 +00:00
parent 3c0ebbb481
commit 4c5f43ffdd
14 changed files with 12 additions and 172 deletions

View File

@ -79,42 +79,7 @@ $this-&gt;orig['macAddress'] = $attr['macAddress'];<br>
</table> </table>
<br> <br>
<br> <br>
<h2>2. Defining pages<br> <h2>2. Page display</h2>
</h2>
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).<br>
<br>
The page names are set by <span style="font-weight: bold;">pages() </span>which
returns an array of names.<br>
<br>
<span style="font-weight: bold; text-decoration: underline;">Example:</span><br
style="font-weight: bold; text-decoration: underline;">
<br>
The
<span style="font-style: italic;">ieee802Device</span>
module needs only one page which is called <span
style="font-style: italic;">'attributes'</span>.<br>
<br>
<table style="width: 100%; text-align: left;" class="mod-code"
border="0" cellpadding="2" cellspacing="2">
<tbody>
<tr>
<td style="vertical-align: top;">&nbsp;&nbsp;&nbsp; /**<br>
&nbsp;&nbsp;&nbsp; * This function returns a list of all account pages
in this module.<br>
&nbsp;&nbsp;&nbsp; */<br>
&nbsp;&nbsp;&nbsp; <span style="font-weight: bold;">function</span> <span
style="color: rgb(255, 0, 0);">pages</span>() {<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; return array('attributes');<br>
&nbsp;&nbsp;&nbsp; }<br>
</td>
</tr>
</tbody>
</table>
<br>
<br>
<h2>3. Page display</h2>
Now that you have defined your subpages you will need one function for Now that you have defined your subpages you will need one function for
each page to display it. The function must return <span each page to display it. The function must return <span
style="font-style: italic;">meta HTML code</span> as defined in the <span style="font-style: italic;">meta HTML code</span> as defined in the <span
@ -190,7 +155,7 @@ sizeof($this-&gt;attributes['macAddress']), 'name' =&gt; 'mac_number'));<br>
</table> </table>
<br> <br>
<br> <br>
<h2>4. Processing input data<br> <h2>3. Processing input data<br>
</h2> </h2>
Every time the user clicks on a submit button while your page is Every time the user clicks on a submit button while your page is
displayed LAM will call a function in your module.<br> displayed LAM will call a function in your module.<br>
@ -306,7 +271,7 @@ $this-&gt;inputCorrect = true;<br>
</table> </table>
<br> <br>
<br> <br>
<h2>5. Defining that your module is ready for LDAP add/modify</h2> <h2>4. Defining that your module is ready for LDAP add/modify</h2>
Before a new account can be created or modified all modules are asked Before a new account can be created or modified all modules are asked
if they are ready.<br> if they are ready.<br>
<br> <br>
@ -367,7 +332,7 @@ correct.<br>
</table> </table>
<br> <br>
<br> <br>
<h2>6. Saving the LDAP attributes<br> <h2>5. Saving the LDAP attributes<br>
</h2> </h2>
When all modules report that they are ready for LDAP add/modify and the 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 user clicks on the add/modify button your module will be asked what

View File

@ -140,15 +140,6 @@ class account extends baseModule {
return "enabled"; 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. * This function loads all attributes into the object.
* *

View File

@ -124,13 +124,6 @@ class ieee802Device extends baseModule {
return $_SESSION[$this->base]->save_module_attributes($this->attributes, $this->orig); 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. * This function will create the meta HTML code to show a page with all attributes.
* *

View File

@ -176,13 +176,6 @@ class inetLocalMailRecipient extends baseModule {
return $_SESSION[$this->base]->save_module_attributes($this->attributes, $this->orig); 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. * This function will create the meta HTML code to show a page with all attributes.
* *

View File

@ -377,15 +377,6 @@ class inetOrgPerson extends baseModule {
return "enabled"; 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: /* This function returns an array with 4 entries:
* array( DN1 ('add' => array($attr), 'remove' => array($attr), 'modify' => array($attr), 'lamdaemon' => array(cmds)), DN2 .... ) * 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, * DN is the DN to change. It may be possible to change several DNs,

View File

@ -280,13 +280,6 @@ class kolabUser extends baseModule {
return $_SESSION[$this->base]->save_module_attributes($this->attributes, $this->orig); 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. * This function will create the meta HTML code to show a page with all attributes.
* *

View File

@ -153,13 +153,6 @@ class nisMailAlias extends baseModule {
return $_SESSION[$this->base]->save_module_attributes($this->attributes, $this->orig); 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. * This function will create the meta HTML code to show a page with all attributes.
* *

View File

@ -443,15 +443,6 @@ class posixAccount extends baseModule {
return true; 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 /* This function loads all attributes into the object
* $attr is an array as it's retured from ldap_get_attributes * $attr is an array as it's retured from ldap_get_attributes
*/ */

View File

@ -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. * Processes user input of the primary module page.
* It checks if all input values are correct and updates the associated LDAP attributes. * It checks if all input values are correct and updates the associated LDAP attributes.

View File

@ -174,23 +174,6 @@ class quota extends baseModule {
return true; 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 /* This function loads all attributes into the object
* $attr is an array as it's retured from ldap_get_attributes * $attr is an array as it's retured from ldap_get_attributes
*/ */
@ -468,6 +451,9 @@ class quota extends baseModule {
return array( return array(
'quota_quotas' => $quotas); 'quota_quotas' => $quotas);
} }
else {
return array();
}
} }
/** /**

View File

@ -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['gidNumber'][0]=='') return false;
if ($_SESSION[$this->base]->module['posixAccount']->attributes['uidNumber'][0]=='') return false; if ($_SESSION[$this->base]->module['posixAccount']->attributes['uidNumber'][0]=='') return false;
return true; return true;
} }
/** /**
* This functions returns true if all needed settings are done * This functions returns true if all needed settings are done
@ -446,15 +446,6 @@ class sambaAccount extends baseModule {
return true; 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 /* This function loads all attributes into the object
* $attr is an array as it's retured from ldap_get_attributes * $attr is an array as it's retured from ldap_get_attributes
*/ */

View File

@ -201,15 +201,6 @@ class sambaGroupMapping extends baseModule {
return $return; 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 * 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['sambaSID'][0] == '') return false;
if ($this->attributes['sambaGroupType'][0] == '') return false; if ($this->attributes['sambaGroupType'][0] == '') return false;
return true; return true;
} }
function module_ready() { function module_ready() {
if ($_SESSION[$this->base]->module['posixGroup']->attributes['gidNumber'][0]=='') return false; if ($_SESSION[$this->base]->module['posixGroup']->attributes['gidNumber'][0]=='') return false;
return true; 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');
}
/** /**

View File

@ -426,7 +426,7 @@ class sambaSamAccount extends baseModule {
if ($_SESSION[$this->base]->module['posixAccount']->attributes['uidNumber'][0]=='') return false; if ($_SESSION[$this->base]->module['posixAccount']->attributes['uidNumber'][0]=='') return false;
if ($this->attributes['uid'][0]=='') return false; if ($this->attributes['uid'][0]=='') return false;
return true; return true;
} }
/* This functions return true /* This functions return true
* if all needed settings are done * if all needed settings are done
@ -435,16 +435,7 @@ class sambaSamAccount extends baseModule {
if (!$this->module_ready()) return false; if (!$this->module_ready()) return false;
if ($this->attributes['sambaSID'][0] == '') return false; if ($this->attributes['sambaSID'][0] == '') return false;
return true; 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 /* This function loads all attributes into the object
* $attr is an array as it's retured from ldap_get_attributes * $attr is an array as it's retured from ldap_get_attributes

View File

@ -202,15 +202,6 @@ class shadowAccount extends baseModule {
return $return; 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. * Returns a list of modifications which have to be made to the LDAP account.
* *