fixed some warning messages

This commit is contained in:
Roland Gruber 2006-09-09 11:43:19 +00:00
parent 3752257f4a
commit d4cdd87d0a
1 changed files with 15 additions and 13 deletions

View File

@ -25,7 +25,7 @@ $Id$
/** /**
* Interface between modules and self service pages. * Interface between modules and self service pages.
* This file also includes the self service profile class and helper functions. * This file also includes the self service profile class and helper functions.
* *
* @package selfService * @package selfService
* @author Roland Gruber * @author Roland Gruber
*/ */
@ -86,6 +86,7 @@ function getSelfServiceOptions($scope, $fields, $attributes) {
$return = array(); $return = array();
$modules = getAvailableModules($scope); $modules = getAvailableModules($scope);
for ($i = 0; $i < sizeof($modules); $i++) { for ($i = 0; $i < sizeof($modules); $i++) {
if (!isset($fields[$modules[$i]])) continue;
$m = new $modules[$i]($scope); $m = new $modules[$i]($scope);
$code = $m->getSelfServiceOptions($fields[$modules[$i]], $attributes); $code = $m->getSelfServiceOptions($fields[$modules[$i]], $attributes);
if (sizeof($code) > 0) $return[$modules[$i]] = $code; if (sizeof($code) > 0) $return[$modules[$i]] = $code;
@ -106,6 +107,7 @@ function checkSelfServiceOptions($scope, $fields, $attributes) {
$return = array('messages' => array(), 'add' => array(), 'del' => array(), 'mod' => array()); $return = array('messages' => array(), 'add' => array(), 'del' => array(), 'mod' => array());
$modules = getAvailableModules($scope); $modules = getAvailableModules($scope);
for ($i = 0; $i < sizeof($modules); $i++) { for ($i = 0; $i < sizeof($modules); $i++) {
if (!isset($fields[$modules[$i]])) continue;
$m = new $modules[$i]($scope); $m = new $modules[$i]($scope);
$result = $m->checkSelfServiceOptions($fields[$modules[$i]], $attributes); $result = $m->checkSelfServiceOptions($fields[$modules[$i]], $attributes);
if (sizeof($result['messages']) > 0) $return['messages'] = array_merge($result['messages'], $return['messages']); if (sizeof($result['messages']) > 0) $return['messages'] = array_merge($result['messages'], $return['messages']);
@ -207,37 +209,37 @@ function saveSelfServiceProfile($name, $scope, $profile) {
* @package selfService * @package selfService
*/ */
class selfServiceProfile { class selfServiceProfile {
/** server address */ /** server address */
var $serverURL; var $serverURL;
/** LDAP suffix */ /** LDAP suffix */
var $LDAPSuffix; var $LDAPSuffix;
/** LDAP user DN*/ /** LDAP user DN*/
var $LDAPUser; var $LDAPUser;
/** LDAP password */ /** LDAP password */
var $LDAPPassword; var $LDAPPassword;
/** LDAP search attribute */ /** LDAP search attribute */
var $searchAttribute; var $searchAttribute;
/** describing text for user login */ /** describing text for user login */
var $loginCaption; var $loginCaption;
/** describing text for search attribute */ /** describing text for search attribute */
var $loginAttributeText; var $loginAttributeText;
/** describing text for self service main page */ /** describing text for self service main page */
var $mainPageText; var $mainPageText;
/** input fields /** input fields
* Format: array(<module> => array(array('name' => <group name>, 'fields' => array(<field1>, <field2>)))) * Format: array(<module> => array(array('name' => <group name>, 'fields' => array(<field1>, <field2>))))
* *
*/ */
var $inputFields; var $inputFields;
/** /**
* Constructor * Constructor
* *
@ -262,7 +264,7 @@ class selfServiceProfile {
'fields' => array('posixAccount_password')) 'fields' => array('posixAccount_password'))
); );
} }
} }
?> ?>