| Summary | _callHooks($scope) always looks for hooks in 'horde' scope |
| Queue | Horde Framework Packages |
| Queue Version | FRAMEWORK_3 |
| Type | Bug |
| State | Resolved |
| Priority | 2. Medium |
| Owners | chuck (at) horde (dot) org |
| Requester | vlukashov (at) parallels (dot) com |
| Created | 10/07/2008 (6238 days ago) |
| Due | |
| Updated | 10/09/2008 (6236 days ago) |
| Assigned | 10/07/2008 (6238 days ago) |
| Resolved | 10/09/2008 (6236 days ago) |
| Github Issue Link | |
| Github Pull Request | |
| Milestone | 3.3.1 |
| Patch | Yes |
Assigned to Chuck Hagenbuch
Taken from
State ⇒ Resolved
http://cvs.horde.org/diff.php/framework/Prefs/Prefs.php?r1=1.194&r2=1.195&ty=u
http://cvs.horde.org/diff.php/horde/docs/CHANGES?r1=1.1169&r2=1.1170&ty=u
Assigned to
Milestone ⇒ 3.3.1
State ⇒ Assigned
Horde's hooks.php before version 3.3.
Priority ⇒ 2. Medium
State ⇒ Unconfirmed
New Attachment: callHooks.patch
Patch ⇒ Yes
Milestone ⇒
Queue ⇒ Horde Framework Packages
Summary ⇒ _callHooks($scope) always looks for hooks in 'horde' scope
Type ⇒ Bug
called. A log entry in Horde::callHook() [lib/Horde.php] showed that
the hook just is not found. Futher investigation brought me to the
_callHooks($scope) method in the Prefs class [lib/Horde/Prefs.php]. It
looks strange that the method always calls hooks in the 'horde' scope,
not in the scope specified by the $scope parameter.
I've created a simple patch [see attachment] and all seems to work
fine after it.
the definition of preference [imp/config/prefs.php]:
$_prefs['my_pref'] = array(
'type' => 'checkbox',
'value' => true,
'locked' => false,
'shared' => false,
'type' => 'checkbox',
'hook' => true,
'desc' => _("Sample"));
the definition of hook [imp/config/hooks.php]:
if (!function_exists('_prefs_hook_my_pref')) {
function _prefs_hook_my_pref() {
Horde::logMessage('HOOK FOR MY_PREF', __FILE__, __LINE__,
PEAR_LOG_DEBUG);
return 0;
}
}