be more specific about found pear packages, for which we could not check the version

This commit is contained in:
Ralf Becker 2014-08-27 10:25:45 +00:00
parent 0bfbfd8b0b
commit 7176b93602
3 changed files with 21 additions and 18 deletions

View File

@ -379,13 +379,13 @@ function pear_check($package,$args)
// check if egw-pear is availible and packages is included
if ($package && is_dir('../egw-pear') && file_exists('../egw-pear/'.str_replace('_','/',$package).'.php'))
{
$available = true;
$available = $found = true;
$version_available = '999.egw-pear';
}
// packages found in the pear registry --> use that info
elseif ($pear_packages)
{
$pear_available = true;
$pear_available = $found = true;
// check if package is installed
if ($package && isset($pear_packages[$package])) $available = true;
// check if it's the right version
@ -399,20 +399,21 @@ function pear_check($package,$args)
if (!class_exists('PEAR')) $pear_available = false;
}
$found = $pear_available;
if ($pear_available && $package)
{
$file = str_replace('_','/',$package == 'Mail_Mime' ? 'Mail_mime' : $package).'.php';
$available = @include_once($file);
$found = @include_once($file);
if (!class_exists($package)) $available = false;
if (!class_exists($package)) $found = false;
}
}
// is the right version availible
$available = (@$available || $pear_available && !$package) && (!$min_version || version_compare($min_version,$version_available) <= 0);
$available = $found && (!$min_version || version_compare($min_version,$version_available) <= 0);
echo '<div>'.($available ? $passed_icon : $warning_icon).' <span'.($available ? '' : ' class="setup_warning"').'>'.
lang('Checking PEAR%1 is installed',($package?($channel?' '.$channel.'/':'::').$package:'').($min_version?" ($min_version)":'')).': '.
($available ? ($version_available ? $version_available : lang('True')) : lang('False'))."</span></div>\n";
($available ? lang('True') : ($found ? lang('Found, but unknown version') : lang('False')))."</span></div>\n";
if (!$available) // give further info only if not availible
{
@ -421,26 +422,26 @@ function pear_check($package,$args)
if (!$pear_available)
{
echo ' '.lang('PEAR (%1) is a PHP repository and is usually in a package called %2.',
echo '<br/>'.lang('PEAR (%1) is a PHP repository and is usually in a package called %2.',
'<a href="http://pear.php.net" target="_blank">pear.php.net</a>','php-pear');
}
elseif ($package)
elseif ($package && !$found)
{
echo ' '.lang('You can install it by running:').
echo '<br/>'.lang('You can install it by running:').
($channel ? ' pear channel-discover '.$channel.' ;' : '').
' pear install '.($channel ? $channel.'/' : '').$package;
}
elseif ($min_version && !$version_available)
{
echo '<br/>'.lang('We could not determine the version of %1, please make sure it is at least %2',$package,$min_version);
}
elseif ($min_version && version_compare($min_version,$version_available) > 0)
{
echo '<br/>'.lang('Your installed version of %1 is %2, required is at least %3, please run: ',
$package,$version_available,$min_version).' pear update '.$package;
}
echo "</div>";
}
elseif ($min_version && !$version_available)
{
echo '<div class="setup_info">'.lang('We could not determine the version of %1, please make sure it is at least %2',$package,$min_version).'</div>';
}
elseif ($min_version && version_compare($min_version,$version_available) > 0)
{
echo '<div class="setup_info">'.lang('Your installed version of %1 is %2, required is at least %3, please run: ',
$package,$version_available,$min_version).' pear update '.$package.'</div>';
}
echo "\n";
return $available;

View File

@ -299,6 +299,7 @@ filename setup de Dateiname
filesystem setup de Dateisystem
filesystem (default) setup de Dateisystem (Vorgabe)
force selectbox setup de Auswahl erzwingen
found, but unknown version setup de Gefunden, aber unbekannte Version
give admin access to all installed apps setup de Admin Zugang zu allen installierten Anwendungen geben
give ldap root dn and password, if you need to create an instance specific admin user, user- or group-context setup de Tragen Sie das LDAP root DN und Passwort ein, wenn Sie einen Instanzspezifischen Adminbenutzer oder Gruppen-Kontext benötigen
gives further options setup de gibt zusätzliche Optionen

View File

@ -299,6 +299,7 @@ filename setup en File name
filesystem setup en File system
filesystem (default) setup en File system (default)
force selectbox setup en Force select box
found, but unknown version setup en Found, but unknown version
give admin access to all installed apps setup en Give admin access to all installed apps
give ldap root dn and password, if you need to create an instance specific admin user, user- or group-context setup en Give LDAP root DN and password, if you need to create an instance specific admin user, user- or group-context
gives further options setup en Gives further options