[kronolith] Initial configuration issue...

Eric Jon Rostetter eric.rostetter@physics.utexas.edu
Sat, 23 Mar 2002 17:51:24 -0600


Quoting Craig White <craigwhite@azapple.com>:

> I have a few other modules - but I get this problem in both kronolith
> and nag... I can open the calendar, add events (which do make into the
> horde table kronolith events) - everything looks good until I click the
> 'options' button and then I get...
> 
> Fatal error: Call to undefined function: groupiseditable() in
> /var/www/html/horde/templates/prefs/overview.inc on line 24
> 
> I get the same message with nag - options...

I downloaded the kronolith and nag modules from CVS yesterday and also
had this problem with nag but not kronolith.  I fixed it by adding the
following to the top of nag/config/prefs.php right after the require for
constants:

/**
 * Encapsulate the logic saying whether or not a preferences group is
 * editable.
 */
if (!function_exists('groupIsEditable')) {
function groupIsEditable($group)
{
    global $prefs, $prefGroups;
    static $results;

    if (!isset($results)) $results = array();

    if (!isset($results[$group])) {
        $results[$group] = false;
        foreach ($prefGroups[$group]['members'] as $pref) {
            if (!$prefs->isLocked($pref)) {
                $results[$group] = true;
                return true;
            }
        }
    } else {
        return $results[$group];
    }

    return false;
}
} 

-- 
Eric Jon Rostetter 
The Department of Physics 
The University of Texas at Austin 
Austin, Texas 78712-1081 

Office:    RLM 7.126 
Telephone: 512-471-5821 
Email:     eric.rostetter@physics.utexas.edu 

Fragen Sie nicht was Ihre Kumputer tun koennen,
aber fragen Sie was Sie fur Ihre Kumputer koennen.