From 8037157447e699234c75d4e03550ba7159f987e5 Mon Sep 17 00:00:00 2001 From: cajus Date: Thu, 24 Jan 2008 07:50:15 +0000 Subject: [PATCH] Fixed removing and adding of plugins git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@8576 594d385d-05f5-0310-b6e9-bd551577e9d8 --- gosa-core/update-gosa | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/gosa-core/update-gosa b/gosa-core/update-gosa index 9d3b2738d..186947d5a 100755 --- a/gosa-core/update-gosa +++ b/gosa-core/update-gosa @@ -290,7 +290,14 @@ function install_plugin($file) /* Check if dependencies are fullfilled */ foreach ($depends as $dep){ - if (!in_array($dep, $provides)){ + $found= false; + foreach ($provides as $provide => $dummy){ + if ($dep == $provide){ + $found= true; + break; + } + } + if (!$found){ echo "! Error: plugin depends on '$dep', but this is not installed\n\n"; exit (3); } @@ -388,7 +395,7 @@ function remove_plugin($name) /* Depends? */ foreach ($depends as $sname => $pl_depends){ - if (!in_array($name, $pl_depends)){ + if (in_array($name, $pl_depends)){ echo "! Error: plugin '$sname' depends on '$name' - cannot remove it\n\n"; exit (1); } -- 2.30.2