6.0.0-beta1
▾
Tasks
New Task
Search
Photos
Wiki
▾
Tickets
New Ticket
Search
dev.horde.org
Toggle Alerts Log
Help
11/5/25
H
istory
A
ttachments
C
omment
W
atch
Download
Comment on [#7445] _callHooks($scope) always looks for hooks in 'horde' scope
*
Your Email Address
*
Spam protection
Enter the letters below:
__ .__.. ..___..__. / `| ||\/| _/ | | \__.|__|| |./__.|__\
Comment
> I have a preference and a hook in the 'imp' scope but the hook is not > 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; > > } > > } > >
Attachment
Watch this ticket
N
ew Ticket
M
y Tickets
S
earch
Q
uery Builder
R
eports
Saved Queries
Open Bugs
Bugs waiting for Feedback
Open Bugs in Releases
Open Enhancements
Enhancements waiting for Feedback
Bugs with Patches
Enhancements with Patches
Release Showstoppers
Stalled Tickets
New Tickets
Horde 5 Showstoppers