Skip to content

Commit

Permalink
[jan] Pass current vacation addresses to hook (skhorde@smail.inf.fh-b…
Browse files Browse the repository at this point in the history
…onn-rhein-sieg.de, Request #13185).
  • Loading branch information
yunosh committed May 19, 2014
1 parent 98910cd commit f996a72
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 4 deletions.
8 changes: 7 additions & 1 deletion ingo/config/hooks.php.dist
Expand Up @@ -53,13 +53,19 @@ class Ingo_Hooks
* Set the default addresses used for the vacation module.
*
* @param string $user The username.
* @param array $value The default/current value.
*
* @return array A list of vacation addresses.
*/
// public function vacation_addresses($user = null)
// public function vacation_addresses($user = null, $value = null)
// {
// // Example #1: User has 2 vacation addresses.
// return array($user . '@example.com', $user . '@foobar.com');
//
// // Example #2: Keep user-supplied values, return defaults only
// return is_array($value) && count($array)
// ? $value
// : array($user . '@example.com', $user . '@foobar.com');
// }

}
2 changes: 2 additions & 0 deletions ingo/docs/CHANGES
Expand Up @@ -2,6 +2,8 @@
v3.2.0-git
----------

[jan] Pass current vacation addresses to hook
(skhorde@smail.inf.fh-bonn-rhein-sieg.de, Request #13185).


------------
Expand Down
2 changes: 1 addition & 1 deletion ingo/lib/Storage/Vacation.php
Expand Up @@ -120,7 +120,7 @@ public function getVacationAddresses()
{
try {
return $GLOBALS['injector']->getInstance('Horde_Core_Hooks')
->callHook('vacation_addresses', 'ingo', array(Ingo::getUser()));
->callHook('vacation_addresses', 'ingo', array(Ingo::getUser(), $this->_addr));
} catch (Horde_Exception_HookNotSet $e) {
return $this->_addr;
}
Expand Down
4 changes: 2 additions & 2 deletions ingo/package.xml
Expand Up @@ -33,7 +33,7 @@
</stability>
<license uri="http://www.horde.org/licenses/apache">ASL</license>
<notes>
*
* [jan] Pass current vacation addresses to hook (skhorde@smail.inf.fh-bonn-rhein-sieg.de, Request #13185).
</notes>
<contents>
<dir baseinstalldir="/" name="/">
Expand Down Expand Up @@ -1420,7 +1420,7 @@
<date>2014-05-05</date>
<license uri="http://www.horde.org/licenses/apache">ASL</license>
<notes>
*
* [jan] Pass current vacation addresses to hook (skhorde@smail.inf.fh-bonn-rhein-sieg.de, Request #13185).
</notes>
</release>
</changelog>
Expand Down

0 comments on commit f996a72

Please sign in to comment.