From: hickert Date: Mon, 9 Feb 2009 13:58:09 +0000 (+0000) Subject: Added imagick dependency to the GOsa setup. X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=0a3ef51e22bc22c6f3386dfdc7af9168343d9558;p=gosa.git Added imagick dependency to the GOsa setup. -Fixes dependency problem in class_user.inc git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@13409 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/gosa-core/setup/class_setupStep_Checks.inc b/gosa-core/setup/class_setupStep_Checks.inc index 3bcf510c1..0afb98c5f 100644 --- a/gosa-core/setup/class_setupStep_Checks.inc +++ b/gosa-core/setup/class_setupStep_Checks.inc @@ -142,6 +142,19 @@ class Step_Checks extends setup_step $M = TRUE; $this->basic_checks[] = array("NAME" => $N , "DESC" => $D , "RESULT" => $R , "SOLUTION" => $S , "MUST" => $M ); + /* Read data written by convert */ + $output= ""; + $sh= popen("convert", 'r'); + while (!feof($sh)){ + $output.= fread($sh, 4096); + } + pclose($sh); + $N = msgPool::checkingFor(_("imagick")); + $D = _("GOsa requires this extension to handle images."); + $S = msgPool::installPhpModule("php5-imagick"); + $R = is_callable("imagick_blob2image") || !empty($output); + $M = TRUE; + $this->basic_checks[] = array("NAME" => $N , "DESC" => $D , "RESULT" => $R , "SOLUTION" => $S , "MUST" => $M ); /* PHP Configuration checks */ @@ -233,17 +246,6 @@ class Step_Checks extends setup_step $M = FALSE; $this->is_writeable[] = array("NAME" => $N , "DESC" => $D , "RESULT" => $R , "SOLUTION" => $S , "MUST" => $M ); - /* If we have writeaccess to the config dir, check if there is already a config file */ -# if($R){ -# -# /* check if there is already a config file. */ -# $N = _("No old configuration file."); -# $D = "";//_(""); -# $S = _("If there is already a configuration file, this file will be overwritten when GOsa setup finishes. Please move your old config file away."); -# $R = !file_exists(CONFIG_DIR."/".CONFIG_FILE); -# $M = FALSE; -# $this->is_writeable[] = array("NAME" => $N , "DESC" => $D , "RESULT" => $R , "SOLUTION" => $S , "MUST" => $M ); -# } }