From: Jan Schneider Date: Tue, 31 Mar 2009 09:23:49 +0000 (+0200) Subject: Catch empty source root lists. X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=7517d5e31876a79e46f10f54dde6ac8724b69e7b;p=horde.git Catch empty source root lists. --- diff --git a/chora/lib/Chora.php b/chora/lib/Chora.php index d11c536c1..4cc3a25be 100644 --- a/chora/lib/Chora.php +++ b/chora/lib/Chora.php @@ -42,6 +42,10 @@ class Chora global $acts, $defaultActs, $where, $atdir, $fullname, $sourceroot; $GLOBALS['sourceroots'] = Horde::loadConfiguration('sourceroots.php', 'sourceroots'); + if (is_a($GLOBALS['sourceroots'], 'PEAR_Error')) { + $GLOBALS['notification']->push($GLOBALS['sourceroots']); + $GLOBALS['sourceroots'] = array(); + } $sourceroots = self::sourceroots(); /** @@ -86,9 +90,13 @@ class Chora } } + $acts = array(); + if (!isset($defaultActs['rt'])) { + self::fatal(_("No repositories found.")); + } + /* See if any have been passed as GET variables, and if so, assign * them into the acts array. */ - $acts = array(); foreach ($defaultActs as $key => $default) { $acts[$key] = Util::getFormData($key, $default); }