From 8199ea1d6743985a35777ddd745ee71b1cb935a1 Mon Sep 17 00:00:00 2001 From: janw Date: Mon, 14 Apr 2008 12:26:03 +0000 Subject: [PATCH] Reverted add function. Fixed bug in parse_ini git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@10420 594d385d-05f5-0310-b6e9-bd551577e9d8 --- gosa-core/update-gosa | 22 ++-------------------- 1 file changed, 2 insertions(+), 20 deletions(-) diff --git a/gosa-core/update-gosa b/gosa-core/update-gosa index 76693ce92..1f08fd1fe 100755 --- a/gosa-core/update-gosa +++ b/gosa-core/update-gosa @@ -257,9 +257,7 @@ function parse_ini($file) $res= $plugin['name']; $description[$res]= $plugin['description']; $versions[$res]= $plugin['version']; - if (isset($plugin['provides'])){ - $provides[$res]= explode(',', preg_replace('/\s+/', '', $plugin['provides'])); - } + $provides[$res]= $res; if (isset($plugin['depends'])){ $depends[$res]= explode(',', preg_replace('/\s+/', '', $plugin['depends'])); } @@ -280,7 +278,7 @@ function dependency_check() foreach ($depends as $name => $pl_depends){ foreach ($pl_depends as $pl){ - if (!is_provided($pl, $provides)){ + if (!in_array($pl, $provides)){ echo "! Error: plugin '$name' depends on '$pl' which is not provided by any plugin\n\n"; exit (1); } @@ -289,22 +287,6 @@ function dependency_check() } -function is_provided($dependency) -{ - global $provides; - - $result= FALSE; - foreach ($provides as $name => $pl_provides){ - if(in_array($dependency, $pl_provides)) { - $result= TRUE; - continue; - } - } - - return $result; -} - - function load_plugins() { if (!is_dir(PLUGSTATE_DIR)){ -- 2.30.2