From: Michael M Slusarz Date: Mon, 30 Nov 2009 20:50:31 +0000 (-0700) Subject: prefsHandle->prefsSpecial; add prefsSpecialGenerate callback X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=c636744bf76414e101c38cb30c3edb9cccd5db60;p=horde.git prefsHandle->prefsSpecial; add prefsSpecialGenerate callback --- diff --git a/framework/Prefs/lib/Horde/Prefs/Ui.php b/framework/Prefs/lib/Horde/Prefs/Ui.php index 12f7cbfe5..5c6c1a42b 100644 --- a/framework/Prefs/lib/Horde/Prefs/Ui.php +++ b/framework/Prefs/lib/Horde/Prefs/Ui.php @@ -1,7 +1,7 @@ isLocked($pref) || ($_prefs[$pref]['type'] == 'special')) { switch ($_prefs[$pref]['type']) { - - /* These either aren't set or are set in other - * parts of the UI. */ case 'implicit': case 'link': + /* These either aren't set or are set in other + * parts of the UI. */ break; case 'select': @@ -169,8 +176,8 @@ class Horde_Prefs_Ui case 'special': /* Code for special elements written specifically * for each application. */ - if ($registry->hasAppMethod($app, 'prefsHandle')) { - $updated = $updated | $registry->callAppMethod($app, 'prefsHandle', array('args' => array($pref, $updated))); + if ($registry->hasAppMethod($app, 'prefsSpecial')) { + $updated = $updated | $registry->callAppMethod($app, 'prefsSpecial', array('args' => array($pref, $updated))); } break; } @@ -260,7 +267,10 @@ class Horde_Prefs_Ui break; case 'special': - require $registry->get('templates', empty($_prefs[$pref]['shared']) ? $registry->getApp() : 'horde') . '/prefs/' . $pref . '.inc'; + if (!$registry->hasAppMethod($app, 'prefsSpecialGenerate') || + $registry->callAppMethod($app, 'prefsSpecialGenerate', array('args' => array($pref)))) { + require $registry->get('templates', empty($_prefs[$pref]['shared']) ? $registry->getApp() : 'horde') . '/prefs/' . $pref . '.inc'; + } break; default: