From 3f53d002e96109a8afb5f7b2ccd02de2b002f623 Mon Sep 17 00:00:00 2001 From: Ben Klang Date: Sat, 15 Jul 2006 22:39:14 +0000 Subject: [PATCH] Various bugfixes git-svn-id: https://svn.alkaloid.net/gpl/shout/trunk@369 06cd67b6-e706-0410-b29e-9de616bca6e9 --- config/conf.xml | 4 ++-- index.php | 6 +++++- lib/Driver.php | 5 +++-- lib/Driver/ldap.php | 5 +++-- 4 files changed, 13 insertions(+), 7 deletions(-) diff --git a/config/conf.xml b/config/conf.xml index 10c100b75..9162f711e 100644 --- a/config/conf.xml +++ b/config/conf.xml @@ -1,7 +1,7 @@ - + Shout Storage getHomeContext(); + if (is_a($context, 'PEAR_Error')) { + $notification->push($context); + } + $context = ''; } $vars = &Variables::getDefaultVariables(); @@ -57,4 +61,4 @@ require SHOUT_BASE . "/$section.php"; #print '
'; #print '
'; -require $registry->get('templates', 'horde') . '/common-footer.inc'; \ No newline at end of file +require $registry->get('templates', 'horde') . '/common-footer.inc'; diff --git a/lib/Driver.php b/lib/Driver.php index 0d86a2224..841b41b4c 100644 --- a/lib/Driver.php +++ b/lib/Driver.php @@ -163,7 +163,8 @@ class Shout_Driver { require_once dirname(__FILE__) . '/Driver/' . $driver . '.php'; $class = 'Shout_Driver_' . $driver; if (class_exists($class)) { - return $shout = &new $class($params); + $shout = new $class($params); + return $shout; } else { return false; } @@ -214,4 +215,4 @@ class Shout_Driver { return $instances[$signature]; } } -// }}} \ No newline at end of file +// }}} diff --git a/lib/Driver/ldap.php b/lib/Driver/ldap.php index 5bcba9e77..0bcabc850 100644 --- a/lib/Driver/ldap.php +++ b/lib/Driver/ldap.php @@ -367,11 +367,12 @@ type"); # FIXME: Handle cases where the managing user isn't a valid telephone # system user # FIXME: Handle cases where no attribute is found? + if ($res['count'] != 1) { + return PEAR::raiseError(_("Unable to determine default context")); + } return $res[0]['context'][0]; } - // }}} - // {{{ /** * Get a context's properties * -- 2.11.0