diff --git a/lam/HISTORY b/lam/HISTORY index 2eddeda6..51b2ff91 100644 --- a/lam/HISTORY +++ b/lam/HISTORY @@ -1,3 +1,11 @@ +??? 1.2.0 + - Samba: better handling of date values + + Developers: + API changes: + - removed get_configDescription() from module interface + + 01.11.2006 1.1.1 - Lamdaemon: added test page (Tools -> Tests -> Lamdaemon test) - LAM Pro: Samba passwords can now be synchronized with Unix password @@ -18,6 +26,7 @@ - process_...() functions: returned messages are no longer grouped (e.g. return: array(array('INFO', 'headline', 'text'), array('INFO', 'headline2', 'text2'))) + 10.08.2006 1.0.4 - added Russian translation - Samba 3: added policies for domain objects diff --git a/lam/docs/README.upgrade.txt b/lam/docs/README.upgrade.txt index e6d66a63..9c7e7981 100644 --- a/lam/docs/README.upgrade.txt +++ b/lam/docs/README.upgrade.txt @@ -1,6 +1,23 @@ Upgrade instructions: ===================== + +1.1.x -> 1.2.0: +=============== + + +Users: + +No changes. + + +Developers: + +API changes: + - removed get_configDescription() from module interface + + + 1.0.4 -> 1.1.0: =============== @@ -19,6 +36,7 @@ API changes: (e.g. return: array(array('INFO', 'headline', 'text'), array('INFO', 'headline2', 'text2'))) + 1.0.0 -> 1.0.2: =============== diff --git a/lam/docs/devel/modules-specification.htm b/lam/docs/devel/modules-specification.htm index e23f0f6c..86a895ad 100644 --- a/lam/docs/devel/modules-specification.htm +++ b/lam/docs/devel/modules-specification.htm @@ -1,9 +1,7 @@ - - - - Module specification + + Module specification + - +

This document describes the module interface for LDAP Account Manager

@@ -45,8 +42,7 @@ All module classes should extend the baseModule class.
- @@ -62,8 +58,7 @@ otherwise false.
function can_manage()
+
function can_manage()
- @@ -83,8 +78,7 @@ sure that there is a general alias for unknown types.
function get_alias()
+
function get_alias()
- @@ -103,8 +97,7 @@ is structural.
function is_base_module()
+
function is_base_module()
- @@ -119,8 +112,7 @@ combined with the "and" parts.
The resulting LDAP filter will look like this: (&(|(OR1)(OR2)(OR3))(AND1)(AND2)(AND3))

-Example: return "('or' => +Example: return "('or' => '(objectClass=posixAccount)', 'and' => '(!(uid=*$))')"

2.1.5. getManagedObjectClasses*

@@ -128,8 +120,7 @@ The resulting LDAP filter will look like this:
function get_ldap_filter()
+
function get_ldap_filter()
- @@ -140,16 +131,14 @@ Returns an array of object class names which are managed by this module.
This is used to fix spelling errors in LDAP-Entries (e.g. if "posixACCOUNT" is read instead of "posixAccount" from LDAP).

-Example: return "('posixAccount')"
+Example: return "('posixAccount')"

2.1.6. getLDAPAliases*


function getManagedObjectClasses()
+
function getManagedObjectClasses()
- @@ -165,8 +154,7 @@ This function returns a list of LDAP attribute alias names.
function getLDAPAliases()
+
function getLDAPAliases()
- @@ -180,8 +168,7 @@ priority ("low"/"normal"/"high").
Attributes with higher priority are placed higher in the drop down box for the RDN selection.

-Example: return "('uid' => +Example: return "('uid' => 'normal', 'cn' => 'low')"

@@ -190,8 +177,7 @@ for the RDN selection.
function get_RDNAttributes()
+
function get_RDNAttributes()
- @@ -200,28 +186,23 @@ get_dependencies()

This function returns a list of modules it depends on.

-The return value is an array with two sub arrays, "depends" and "conficts".
+The return value is an array with two sub arrays, "depends" and "conficts".
All values of the conflict array are string values with module names.
All values of the depends array are either string values with module names or arrays which include only string values with module names. If an element of the depends array is itself an array, this means that your module depends on one of these modules.

-Example: return array("depends" +Example: return array("depends" => array("posixAccount", array("qmail", "sendmail")), "conflicts" -=> array("exim"));
+=> array("exim"));


2.1.9. get_metaData()


function + function get_dependencies()
- @@ -237,8 +218,7 @@ true);
function get_metaData()
+
function get_metaData()
- @@ -246,8 +226,7 @@ $allScopes)
function get_configOptions($scopes, + function get_configOptions($scopes, $allScopes)

Returns a list of configuration options.
-$scopes is a list of account types (user, group, host) +$scopes is a list of account types (user, group, host) which are used.
$allScopes is a list of all active account modules and their scopes (module => array(scopes))
@@ -260,39 +239,12 @@ The name attributes are used as keywords to load and save settings. We recommend to use the module name as prefix for them (e.g. posixAccount_homeDirectory) to avoid naming confilcts.
-
-

2.1.11. get_configDescriptions()*

+

2.1.11. check_configOptions*


- - - -
function get_configDescriptions()
-
-
-Returns the description of every configuration option and the legend of -the module fieldset on the configuration page.
-
-The return value is a hash -array with this format:
-   
-    array( 'legend' -=> 'Some general description for fieldset',
-       -       'descriptions' => array('option1' -=> 'description1', ...))
-
-

2.1.12. check_configOptions*

-
- - - - @@ -310,17 +262,15 @@ are all arrays containing one or more elements.
If the input data is invalid the return value is an array that contains arrays to build StatusMessages (0 => message type, 1 => message head, 2 => message text, 3 => additional variables).
-If no errors occured the function returns an empty array.
+If no errors occured the function returns an empty array.

-

2.1.13. get_scope()

+

2.1.12. get_scope()


function check_configOptions($scopes, + function check_configOptions($scopes, $options)
- @@ -331,13 +281,12 @@ Returns the account type (user/group/host) of this module object.
This function is provided by the baseModule and should not be overwritten.

-

2.1.14. get_uploadColumns*

+

2.1.13. get_uploadColumns*


function get_scope()
+
function get_scope()
- @@ -356,33 +305,26 @@ help: help ID
  • string example: example value
  • string -values: possible input values (optional)
  • -
  • string default: default value (optional)
    +values: possible input values (optional)
  • +
  • string default: default value (optional)
  • boolean -required: true, if user must set a value for this column (optional, default: +required: true, if user must set a value for this column (optional, default: "false")
  • boolean unique: true if -all values of this column must be different values (optional, default: +all values of this column must be different values (optional, default: "false")

  • -

    2.1.15. get_uploadPreDepends*

    +

    2.1.14. get_uploadPreDepends*


    function get_uploadColumns()
    +
    function get_uploadColumns()
    - @@ -392,13 +334,12 @@ Returns a list of module names which must be processed before this module at builing accounts.
    The named modules may not be active, LAM will check this automatically.

    -

    2.1.16. build_uploadAccounts

    +

    2.1.15. build_uploadAccounts


    function get_uploadPreDepends()
    +
    function get_uploadPreDepends()
    - @@ -419,13 +360,12 @@ format is the same as used for ldap_add().
    Returns an array which contains sub arrays to generate StatusMessages if any errors occured.

    -

    2.1.17. do_uploadPostActions

    +

    2.1.16. do_uploadPostActions


    function get_uploadAccounts($rawAccounts, + function get_uploadAccounts($rawAccounts, $ids, $partialAccounts)
    - @@ -436,8 +376,7 @@ This function is responsible to do additional tasks after the account has been created in LDAP.
    E.g. modifying group memberships, adding Quota etc..

    -This function is called as long as the returned status is 'finished'. Please make sure that +This function is called as long as the returned status is 'finished'. Please make sure that one function call lasts no longer than 3-4 seconds. Otherwise the upload may fail because the time limit is exceeded. You should not make more than one LDAP operation in each call.
    @@ -465,13 +404,12 @@ array()   // List of arrays which are used to generate StatusMessages
        )

    -

    2.1.18. get_profileOptions*

    +

    2.1.17. get_profileOptions*


    function do_uploadPostActions($data, $ids, + function do_uploadPostActions($data, $ids, $failed, &$temp)
    - @@ -489,13 +427,12 @@ as keywords to load and save profiles. We recommend to use the module name as prefix for them (e.g. posixAccount_homeDirectory) to avoid naming confilcts.

    -

    2.1.19. check_profileOptions*

    +

    2.1.18. check_profileOptions*


    function get_profileOptions()
    +
    function get_profileOptions()
    - @@ -510,16 +447,14 @@ are all arrays containing one or more elements.
    If the input data is invalid the return value is an array that contains arrays to build StatusMessages (0 => message type, 1 => message head, 2 => message text, 3 => additional variables).
    -If no errors occured the function returns an empty array.
    +If no errors occured the function returns an empty array.

    -

    2.1.20. load_profile*

    +

    2.1.19. load_profile*


    function check_profileOptions($options)
    +
    function check_profileOptions($options)
    - @@ -532,13 +467,12 @@ internal data structures.
    is an hash array (identifier => array(values))  with all values of an account profile.

    -

    2.1.21. getRequiredExtensions*

    +

    2.1.20. getRequiredExtensions*


    function load_profile($profile)
    +
    function load_profile($profile)
    - @@ -547,6 +481,95 @@ of an account profile.
    This function returns a list of PHP extensions (e.g. mhash) which are needed by this module.

    + +

    2.1.21. getSelfServiceSearchAttributes*

    + +
    + +
    function getRequiredExtensions()
    +
    function getRequiredExtensions()
    + + + + + + +
    function getSelfServiceSearchAttributes()
    +
    + +
    + +This function returns a list of possible LDAP attributes (e.g. uid, cn, ...) which can be used to search for LDAP objects.
    +
    + +

    2.1.22. getSelfServiceFields*

    + +
    + + + + + + + + +
    function getSelfServiceFields()
    +
    + +
    + +This function returns a list of possible self service fields and their descriptions.
    +
    +return array ('myField' => 'Field description');
    +
    + +

    2.1.23. getSelfServiceOptions

    + +
    + + + + + + + + +
    function getSelfServiceOptions($fields, $attributes)
    +
    + +
    +Builds and returns the meta HTML code for each self service field.
    +
    +$fields: list of self service field names
    +$attributes: LDAP attributes of the current account (all lower case)
    +
    + +

    2.1.24. checkSelfServiceOptions

    + +
    + + + + + + + + +
    function checkSelfServiceOptions($fields, $attributes)
    +
    + +
    +Returns a list of LDAP operations and error messages.
    +
    +$fields:
    list of self service field names
    + +$attributes: LDAP attributes of the current account (all lower case)
    +
    +return array(
    +    'messages' => array(array('ERROR', 'Error topic', 'Error message')),
    +    'add' => array('mail' => array('test@test.com')),
    +    'mod' => array(),
    +    'del' => array(),
    +);


    @@ -557,15 +580,13 @@ needed by this module.
    -
    function init($base)
    +
    function init($base)

    -Every module needs a initializing function that has an account +Every module needs a initializing function that has an account container as argument $base.
    With this account container you can interact with other modules and use several helper functions.
    @@ -575,8 +596,7 @@ several helper functions.
    - @@ -595,16 +615,14 @@ which returns true as default.
    function module_ready()
    +
    function module_ready()
    -
    function module_complete()
    +
    function module_complete()

    This function tells LAM if it can create/modify the LDAP account. If -your module needs any additional input then set this to false. The user will be notified +your module needs any additional input then set this to false. The user will be notified that your module needs more input.

    This function is implemented by the baseModule @@ -616,8 +634,7 @@ which returns true as default.
    - @@ -641,8 +658,7 @@ shown
    function getButtonStatus()
    +
    function getButtonStatus()
    - @@ -662,8 +678,7 @@ section 4. "Help entry syntax".
    function get_help($helpID)
    +
    function get_help($helpID)
    - @@ -684,8 +699,7 @@ syntax".
    function get_PDF_Entries()
    +
    function get_PDF_Entries()
    - @@ -705,8 +719,7 @@ Returnis an array as expected from StatusMessage().
    function dynamic_Message($attribute, $id)
    +
    function dynamic_Message($attribute, $id)
    - @@ -724,8 +737,7 @@ $this->messages[x][y][z]
    function load_Messages()
    +
    function load_Messages()
    - @@ -750,8 +762,7 @@ separat.
    function load_attributes($attr)
    +
    function load_attributes($attr)
    - @@ -780,8 +791,7 @@ and $this->orig.
    function save_attributes()
    +
    function save_attributes()
    - @@ -799,8 +809,7 @@ deleted.
    function delete_attributes($post)
    +
    function delete_attributes($post)
    - @@ -826,8 +835,7 @@ allowed here.'));
    function process_attributes($post)
    +
    function process_attributes($post)
    - @@ -846,8 +854,7 @@ is needed to interact with the user.
    function process_*($post)
    +
    function process_*($post)
    - @@ -866,8 +873,7 @@ is needed t interact with the user.
    function display_html_attributes($post)
    +
    function display_html_attributes($post)
    - @@ -887,8 +893,7 @@ is needed t interact with the user.
    function display_html_*($post)
    +
    function display_html_*($post)
    - @@ -913,15 +918,9 @@ formats.
    The modules are not allowed to display HTML code directly but return meta HTML code. This allows to have a common design for all module pages.
    -Meta HTML code is always returned as a three dimensional array[a][b][c] where a is the row number, b is the coumn number and c is is a data elememt.
    +Meta HTML code is always returned as a three dimensional array[a][b][c] where a is the row number, b is the coumn number and c is is a data elememt.

    -Format for data elements:
    +Format for data elements:

    A data element is an array which contains the data to display.
    @@ -938,8 +937,7 @@ fieldset.
  • help: Adds a help link.
  • @@ -998,8 +996,7 @@ true then the entries will not be sorted. Default is false.
  • table: Adds a table. Can be used recursively.
  • text: Inserts a text @@ -1058,10 +1055,7 @@ height attribute for td elements
    Input buttons which should load a different subpage of a module must have a special name attribute:

    -name => 'form_subpage_' . <module name> . '_' . <subpage name> . '_' . <button name>
    +name => 'form_subpage_' . <module name> . '_' . <subpage name> . '_' . <button name>
    • <module name>: name of this account module (e.g. 'posixAccount')
    • @@ -1073,8 +1067,7 @@ name to distinguish buttons (e.g. 'ok'/'cancel'/'back')


    -Example:
    +Example:

    array(
      0 => array(
    @@ -1112,19 +1105,16 @@ the help entry.


    4.1. Internal help entries

    -ext (REQUIRED)
    +ext (REQUIRED)
    Must be FALSE in this case.

    -Headline (REQUIRED)
    +Headline (REQUIRED)
    The headline of this help entry. Can consist of any alpha-numeric characters. No HTML/CSS elements are not allowed here.

    -Text (REQUIRED)
    +Text (REQUIRED)
    The text of this help entry. Can constist if any alpha-numeric characters and can contain placeholder for variables passed to this help entry. The placeholder must follow the syntax for placeholder @@ -1141,8 +1131,7 @@ number except the '0'.
  • 2. This number ($i) must either be '1' or $i -1 must be present.

  • -SeeAlso (OPTIONAL)
    +SeeAlso (OPTIONAL)
    An array of references to anonther related subjects. Each row of the array must contain a field called "text" with the text that should be displayed and may contain a field called "link" which is used as value @@ -1151,13 +1140,11 @@ for the href attribute of a HTML tag when set.


    4.2. External help entries

    -ext (REQUIRED)
    +
    ext (REQUIRED)
    Must be TRUE in this case.

    -Link (REQUIRED)
    +Link (REQUIRED)
    The complete filename of the file stored under the help/ directory which should be displayed when this help entry is called.

    @@ -1166,8 +1153,7 @@ which should be displayed when this help entry is called.

    5. PDF syntax

    The get_pdfEntries() function uses XML formatted commands to define the -PDF output. Each part in the PDF document is surrounded by "<block>" +PDF output. Each part in the PDF document is surrounded by "<block>" and "</block>".

    Inside the <block> tags there are different ways to format the @@ -1177,54 +1163,35 @@ output:
    and value: <block><key>attribute name</key><value>attribute value</value></block> -
  • table: <block><key>attribute -name</key><tr><td>value<td><td>value<td></tr></block><block><tr><td>value</td><td>value<td></tr></block>
  • +
  • table: <block><key>attribute +name</key><tr><td>value<td><td>value<td></tr></block><block><tr><td>value</td><td>value<td></tr></block>

  • Special commands:
    • Alignment in <td>: -You can specify the alignment in <td> tags with align=(L|R|C) +You can specify the alignment in <td> tags with align=(L|R|C) (e.g. <td align=\"L\">)
    • Cell width: <td> allows an attribute "width" to set the cell width (e.g. <td width=20%> or <td width=30>).
    • Line breaks: Line breaks -can be specified by adding a <br /> +can be specified by adding a <br /> tag. The new line will start at the left border of the PDF document.

    -Examples:
    +Examples:

    -1. Simple name+value lines:
    +1. Simple name+value lines:

    In most cases you will just want to display a single line per attribute with its name and value.

        'myAttribute' -=> '<block><key>AttrName</key><value>12345</value></block>'
    +=> '<block><key>AttrName</key><value>12345</value></block>'

    -This will give the following PDF output: AttrName: 12345
    +This will give the following PDF output: AttrName: 12345


    2. Multiline values:

    @@ -1237,22 +1204,14 @@ one column but can just use more <td> tags per <block> tag to display more columns.

        'myAttribute' -=> '<block><key>AttrName</key><tr><td -align=\"L\">123</td></tr></block><block><tr><td -align=\"L\">456</td></tr></block><block><tr><td -align=\"L\">789</td></tr></block>'
    +=> '<block><key>AttrName</key><tr><td +align=\"L\">123</td></tr></block><block><tr><td +align=\"L\">456</td></tr></block><block><tr><td +align=\"L\">789</td></tr></block>'

    This will give the following PDF output:

    -
    function display_html_delete($post)
    +
    function display_html_delete($post)
    +
    - @@ -1293,25 +1251,21 @@ array("user", "host")

    6.3 get_ldap_filter()

        "ldap_filter" => array

    -   Example: array('or' => +   Example: array('or' => 'objectClass=posixAccount', 'and' => '(!(uid=*$))')

    6.4 getManagedObjectClasses()

        "objectClasses" => array

    -   Example: array('posixAccount')
    +   Example: array('posixAccount')

    6.5 getLDAPaliases()

    "LDAPaliases" => array()

    -
    Example: array('commonName' +Example: array('commonName' => 'cn')


    @@ -1320,8 +1274,7 @@ array("user", "host")

    6.6 get_RDNAttributes()

        "RDN" => array

    -   Example: array('uid' => +   Example: array('uid' => 'normal', 'cn' => 'low')

    @@ -1330,20 +1283,15 @@ array("user", "host")

        "dependencies" => array

    -   Example: array("depends" +   Example: array("depends" => array("posixAccount", array("qmail", "sendmail")), "conflicts" -=> array("exim"))
    +=> array("exim")
    )

    6.8 get_profileOptions()

        "profile_options" => array

    -   Syntax for array is the same as for the +   Syntax for array is the same as for the return value of get_profileOptions().

    @@ -1360,61 +1308,32 @@ the names of the option identifiers.
  • type: determines how to check input
    • -
    • regex: check with regular expression from regex variable, case sensitive
    • -
    • regex_i: check with regular expression from regex variable, case insensitive
    • -
    • int_greater: integer value of cmp_name1 must be -greater than the integer value from the option cmp_name2
    • -
    • int_greaterOrEqual: integer value of cmp_name1 -must be greater or equal than the integer value from the option cmp_name2
    • +
    • regex: check with regular expression from regex variable, case sensitive
    • +
    • regex_i: check with regular expression from regex variable, case insensitive
    • +
    • int_greater: integer value of cmp_name1 must be +greater than the integer value from the option cmp_name2
    • +
    • int_greaterOrEqual: integer value of cmp_name1 +must be greater or equal than the integer value from the option cmp_name2
    -
  • error_message: message that is displayed if input value +
  • error_message: message that is displayed if input value was syntactically incorrect
    • array to build StatusMessages (0 => message type, 1 => message -head, 2 => message text, 3 => additional variables)
    • +head, 2 => message text, 3 => additional variables)
    -
  • regex: regular expression string (only if type is regex/regex_i)
  • -
  • cmp_name1: +
  • regex: regular expression string (only if type is regex/regex_i)
  • +
  • cmp_name1: name of first input -variable that is used for comparison (only if type is int_greater/int_greaterOrEqual)
  • -
  • cmp_name2: name of second input -variable that is used for comparison (only if type is int_greater/int_greaterOrEqual)
    +variable that is used for comparison (only if type is int_greater/int_greaterOrEqual)
  • +
  • cmp_name2: name of second input +variable that is used for comparison (only if type is int_greater/int_greaterOrEqual)
  • -
  • required: true or false, if this input field must be +
  • required: true or false, if this input field must be filled set to true (optional)
  • -
  • required_message: message that is displayed if no input value was -given (only if required == true)
  • +
  • required_message: message that is displayed if no input value was +given (only if required == true)
    •  array to build StatusMessages (0 => message type, 1 => message @@ -1437,65 +1356,60 @@ $this->attributes.
      'host' => array, 'all' => array)

          The values from 'all' -are always returned, the other values only if they are inside the $scopes array.
      +are always returned, the other values only if they are inside the $scopes array.

      -   Syntax for sub arrays is the same as for +   Syntax for sub arrays is the same as for the return value of get_configOptions().
      -
      -
      -

      6.12 get_configDescriptions()
      -

      -    "config_descriptions" => array
      -
      -   Syntax for array is the same as for the -return value of get_configDescriptions().
      -
      -
      -

      6.13 check_configOptions()
      +

      6.12 check_configOptions()

          "config_checks" => array('user' => array, 'host' => 'array', 'all' => array)

          The values from 'all' are always used for checking, -the other values only if they are inside the $scopes array.
      +the other values only if they are inside the $scopes array.

      -
         Syntax for sub arrays is the same as for +   Syntax for sub arrays is the same as for check_profileOptions().

      -

      6.14 get_uploadColumns()

      +

      6.13 get_uploadColumns()

      "upload_columns" => array()

      Syntax for array is the same as for the return value of get_uploadColumns().

      -

      6.15 get_uploadPreDepends()

      +

      6.14 get_uploadPreDepends()

      "upload_preDepends" => array()

      Syntax for array is the same as for the return value of get_uploadPreDepends().

      -

      6.16 getRequiredExtensions()
      +

      6.15 getRequiredExtensions()

      "extensions" => array()

      -
      Example: array('mhash')
      +
      Example: array('mhash')

      - - - + +

      6.16 getSelfServiceSearchAttributes()
      +

      + +"selfServiceSearchAttributes" => array()
      + +
      +
      Example: array('uid')
      +
      + +

      6.17 getSelfServiceFields()
      +

      + +"selfServiceFieldSettings" => array()
      + +
      +
      Example: array('pwd' => 'Password')
      +
      + + \ No newline at end of file diff --git a/lam/lib/baseModule.inc b/lam/lib/baseModule.inc index d9503bc1..2282c681 100644 --- a/lam/lib/baseModule.inc +++ b/lam/lib/baseModule.inc @@ -340,20 +340,6 @@ class baseModule { return $return; } - /** - * Returns an array containing descriptions shown on configuration pages. - * - * The returned array has the format array('legend' => '...', descriptions => array('option1' => '...', ...)). - *
      The "legend" value is used as text for the fieldset, the descriptions are used when the configuration is printed. - * - * @return array configuration elements - */ - function get_configDescriptions() { - $return = array('legend' => 'no description', 'descriptions' => array()); - if (isset($this->meta['config_descriptions'])) $return = $this->meta['config_descriptions']; - return $return; - } - /** * Checks input values of module settings. * diff --git a/lam/lib/modules.inc b/lam/lib/modules.inc index 9620fc9c..230b0330 100644 --- a/lam/lib/modules.inc +++ b/lam/lib/modules.inc @@ -309,32 +309,6 @@ function getConfigOptions($scopes) { return $return; } -/** -* Returns a hash array (module name => descriptions) containing descriptions shown on configuration pages. -* -* The returned array has the format array('legend' => array('posixAccount' => '...', ...), descriptions => array('option1' => '...', ...)). -*
      The "legend" value is used as text for the fieldset, the descriptions are used when the configuration is printed. -* -* @return array configuration descriptions -*/ -function getConfigDescriptions() { - $return = array('legend' => array(), 'descriptions' => array()); - $modules = array(); - $types = $_SESSION['config']->get_ActiveTypes(); - for ($i = 0; $i < sizeof($types); $i++) { - $modules = array_merge($modules, getAvailableModules($types[$i])); - } - $modules = array_merge(getAvailableModules('user'), getAvailableModules('group'), getAvailableModules('host')); - $modules = array_values(array_unique($modules)); - for ($i = 0; $i < sizeof($modules); $i++) { - $m = new $modules[$i]('none'); - $desc = $m->get_configDescriptions(); - $return['legend'][$modules[$i]] = $desc['legend']; - $return['descriptions'] = array_merge($return['descriptions'], $desc['descriptions']); - } - return $return; -} - /** * Checks if the configuration options are valid * diff --git a/lam/lib/modules/posixAccount.inc b/lam/lib/modules/posixAccount.inc index 2cfd49e3..43959a9c 100644 --- a/lam/lib/modules/posixAccount.inc +++ b/lam/lib/modules/posixAccount.inc @@ -140,19 +140,19 @@ class posixAccount extends baseModule { // configuration options $return['config_options']['user'] = array( array( - 0 => array('kind' => 'text', 'text' => '' . _("Users") . ':  ' . _('Minimum UID number') . ": "), + 0 => array('kind' => 'text', 'text' => '' . _("Users") . ':  ' . _('Minimum UID number') . "*: "), 1 => array('kind' => 'input', 'name' => 'posixAccount_minUID', 'type' => 'text', 'size' => '10', 'maxlength' => '255'), 2 => array('kind' => 'text', 'value' => ' '), - 3 => array('kind' => 'text', 'text' => _('Maximum UID number') . ": "), + 3 => array('kind' => 'text', 'text' => _('Maximum UID number') . "*: "), 4 => array('kind' => 'input', 'name' => 'posixAccount_maxUID', 'type' => 'text', 'size' => '10', 'maxlength' => '255'), 5 => array('kind' => 'help', 'value' => 'minMaxUser')) ); $return['config_options']['host'] = array( array( - 0 => array('kind' => 'text', 'text' => '' . _("Hosts") . ':  ' . _('Minimum UID number') . ": "), + 0 => array('kind' => 'text', 'text' => '' . _("Hosts") . ':  ' . _('Minimum UID number') . "*: "), 1 => array('kind' => 'input', 'name' => 'posixAccount_minMachine', 'type' => 'text', 'size' => '10', 'maxlength' => '255'), 2 => array('kind' => 'text', 'value' => ' '), - 3 => array('kind' => 'text', 'text' => _('Maximum UID number') . ": "), + 3 => array('kind' => 'text', 'text' => _('Maximum UID number') . "*: "), 4 => array('kind' => 'input', 'name' => 'posixAccount_maxMachine', 'type' => 'text', 'size' => '10', 'maxlength' => '255'), 5 => array('kind' => 'help', 'value' => 'minMaxHost')) ); @@ -166,17 +166,6 @@ class posixAccount extends baseModule { 4 => array('kind' => 'text', 'value' => ' '), 5 => array('kind' => 'help', 'value' => 'pwdHash')) ); - // configuration descriptions - $return['config_descriptions'] = array( - 'legend' => _("UID ranges for Unix accounts"), - 'descriptions' => array( - 'posixAccount_minUID' => _("Minimum UID number for Unix accounts (users)"), - 'posixAccount_maxUID' => _("Maximum UID number for Unix accounts (users)"), - 'posixAccount_minMachine' => _("Minimum UID number for Unix accounts (hosts)"), - 'posixAccount_maxMachine' => _("Maximum UID number for Unix accounts (hosts)"), - 'posixAccount_pwdHash' => _("Password hash type for Unix accounts"), - ) - ); // upload $return['upload_preDepends'] = array('inetOrgPerson'); // user specific upload options diff --git a/lam/lib/modules/posixGroup.inc b/lam/lib/modules/posixGroup.inc index c1ad2a18..b91bc6d4 100644 --- a/lam/lib/modules/posixGroup.inc +++ b/lam/lib/modules/posixGroup.inc @@ -293,22 +293,13 @@ class posixGroup extends baseModule { // configuration options $return['config_options']['group'] = array( array( - 0 => array('kind' => 'text', 'text' => '' . _('Minimum GID number') . " *: "), + 0 => array('kind' => 'text', 'text' => '' . _("Groups") . ':  ' . _('Minimum GID number') . " *: "), 1 => array('kind' => 'input', 'name' => 'posixGroup_minGID', 'type' => 'text', 'size' => '10', 'maxlength' => '255'), 2 => array('kind' => 'text', 'value' => ' '), - 3 => array('kind' => 'text', 'text' => '' . _('Maximum GID number') . " *: "), + 3 => array('kind' => 'text', 'text' => _('Maximum GID number') . " *: "), 4 => array('kind' => 'input', 'name' => 'posixGroup_maxGID', 'type' => 'text', 'size' => '10', 'maxlength' => '255'), 5 => array('kind' => 'help', 'value' => 'minMaxGID')) ); - // configuration descriptions - $return['config_descriptions'] = array( - 'legend' => _("GID ranges for Unix groups"), - 'descriptions' => array( - 'posixGroup_minGID' => _("Minimum GID number for Unix groups"), - 'posixGroup_maxGID' => _("Maximum GID number for Unix groups"), - 'posixAccount_pwdHash' => _("Password hash type for Unix groups"), - ) - ); // configuration checks $return['config_checks']['group']['posixGroup_minGID'] = array ( 'type' => 'ext_preg', diff --git a/lam/lib/modules/sambaSamAccount.inc b/lam/lib/modules/sambaSamAccount.inc index 678d61e2..dada93a7 100644 --- a/lam/lib/modules/sambaSamAccount.inc +++ b/lam/lib/modules/sambaSamAccount.inc @@ -451,8 +451,6 @@ class sambaSamAccount extends baseModule { 'descriptiveOptions' => true), 2 => array('kind' => 'help', 'value' => 'timeZone')) ); - // configuration descriptions - $return['config_descriptions'] = array('legend' => _("Samba 3 settings"), 'descriptions' => array()); return $return; } diff --git a/lam/templates/config/confmain.php b/lam/templates/config/confmain.php index edcf92bd..ed3f7430 100644 --- a/lam/templates/config/confmain.php +++ b/lam/templates/config/confmain.php @@ -194,7 +194,9 @@ echo ("
      " . _("Account types and modules") . "" // Account modules $types = $conf->get_ActiveTypes(); for ($i = 0; $i < sizeof($types); $i++) { - echo "" . getTypeAlias($types[$i]) . ": " . implode(", ", $conf->get_AccountModules($types[$i])) . "
      \n"; + $moduleNames = $conf->get_AccountModules($types[$i]); + for ($m = 0; $m < sizeof($moduleNames); $m++) $moduleNames[$m] = getModuleAlias($moduleNames[$m], $types[$i]); + echo "" . getTypeAlias($types[$i]) . ": " . implode(", ", $moduleNames) . "
      \n"; } echo "
      \n"; echo "  "; @@ -223,8 +225,6 @@ for ($m = 0; $m < sizeof($types); $m++) { $options = getConfigOptions($scopes); // get current setting $old_options = $conf->get_moduleSettings(); -// get module descriptions -$moduleDescriptions = getConfigDescriptions(); // display module boxes @@ -233,7 +233,7 @@ $_SESSION['conf_types'] = array(); for ($i = 0; $i < sizeof($modules); $i++) { if (sizeof($options[$modules[$i]]) < 1) continue; echo "
      \n"; - echo "" . $moduleDescriptions['legend'][$modules[$i]] . "\n"; + echo "" . getModuleAlias($modules[$i], "none") . "\n"; $configTypes = parseHtml($modules[$i], $options[$modules[$i]], $old_options, true, $tabindex, $tabindexLink, 'config'); $_SESSION['conf_types'] = array_merge($configTypes, $_SESSION['conf_types']); echo "
      \n"; diff --git a/lam/templates/config/confmodules.php b/lam/templates/config/confmodules.php index 4756735e..69d6c824 100644 --- a/lam/templates/config/confmodules.php +++ b/lam/templates/config/confmodules.php @@ -184,12 +184,12 @@ function config_showAccountModules($scope, $title) { if (in_array($selected[$i], $available)) { // selected modules must be available if (is_base_module($selected[$i], $scope)) { // mark base modules echo "\n"; } else { echo "\n"; } } @@ -212,12 +212,12 @@ function config_showAccountModules($scope, $title) { if (! in_array($available[$i], $selected)) { // display non-selected modules if (is_base_module($available[$i], $scope)) { // mark base modules echo "\n"; } else { echo "\n"; } }
    AttrName:
    @@ -1263,8 +1222,7 @@ This will give the following PDF output:

    456
    +
    456