[dev] IMP: [patch] imp/lib/Identity/imp/php
Marc Jauvin
marc at register4less.com
Wed Jul 16 14:17:30 PDT 2003
This patch allow a hook to be used when there is no "from address" defined (no
default identity created yet).
--
Marc Jauvin
http://register4less.com
450-441-5458
-------------- next part --------------
Index: imp.php
===================================================================
RCS file: /repository/imp/lib/Identity/imp.php,v
retrieving revision 1.15
diff -u -r1.15 imp.php
--- imp.php 18 May 2003 14:05:22 -0000 1.15
+++ imp.php 16 Jul 2003 21:15:06 -0000
@@ -158,7 +158,12 @@
$val = $this->getValue('from_addr', $ident);
if (empty($val)) {
- $val = $imp['user'];
+ include_once HORDE_BASE . '/config/hooks.php';
+ if (function_exists('_imp_hook_from_addr')) {
+ $val = call_user_func('_imp_hook_from_addr');
+ } else {
+ $val = $imp['user'];
+ }
}
if (!strstr($val, '@')) {
More information about the dev
mailing list