phpgroupware-developers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Phpgroupware-developers] admin config


From: Miles Lott
Subject: [Phpgroupware-developers] admin config
Date: Fri, 21 Dec 2001 16:07:55 -0600

I am trying to add a hook that can be used to validate
the input to config.php for each app.  It is working
here now, but I want to see what you think.

The hook file, hook_config_validate.inc.php would be
included before looping through the posted values.  If
a function exists in the hook file with the same name
as the config being checked, it will run, setting the
value of $GLOBALS['config_error'].  The function takes
one argument - the value entered for that config.

A final_validation() function can also be included to check
for missing values which otherwise would be missed in
the while loop of posted values.  This function takes
one argument - the whole array of form values.

Both functions set the value of $GLOBALS['config_error']
to a string.  If there are multiple errors on the page,
they are appended.  This is then passed through lang().
If this variable is not set, then the form processes
as before, redirecting back to admin/index.php.

In the case of addressbook, I need to make sure that
the admin does not try to set the ldap context to the
same as is set for accounts or groups in ldap.  It is
still up to the admin to pick one that exists, of course.

-- 

Miles Lott - http://milosch.net
phpGroupWare - http://www.phpgroupware.org



reply via email to

[Prev in Thread] Current Thread [Next in Thread]