removed old jpgraph version and added setup and pm level checks asking user to install a recent one

This commit is contained in:
Ralf Becker 2010-09-17 17:25:44 +00:00
parent 57bf6cf4bf
commit 409b8dd552
3 changed files with 50 additions and 2 deletions

View File

@ -270,7 +270,7 @@ foreach($setup_info as $app => $app_data)
}
}
$sorted_checks = array();
foreach(array('php_version','php_ini_check','extension_check','pear_check','gd_check','permission_check') as $func)
foreach(array('php_version','php_ini_check','extension_check','pear_check','gd_check','permission_check','jpgraph_check') as $func)
{
foreach($checks as $name => $data)
{
@ -737,6 +737,46 @@ function php_ini_check($name,$args)
return $result;
}
function jpgraph_check($name,array $args)
{
global $passed_icon, $error_icon, $warning_icon;
$egw_path = defined(EGW_SERVER_ROOT) ? EGW_SERVER_ROOT : dirname(dirname(__FILE__));
$jpgraph_path = realpath($egw_path.'/..').SEP.'jpgraph';
$min_version = isset($args['min_version']) ? $args['min_version'] : '1.13';
$available = false;
if (($check = file_exists($jpgraph_path) && is_dir($jpgraph_path)) &&
file_exists($jpgraph_path.'/src/jpgraph.php'))
{
if (file_exists($jpgraph_path.'/VERSION') && preg_match('/Version: v([0-9.]+)/',file_get_contents($jpgraph_path.'/VERSION'),$matches))
{
$version = $matches[1];
$available = version_compare($version,$min_version,'>=');
}
else
{
$version = 'unknown';
}
}
echo "<div>".($available ? $passed_icon : (isset($version) ? $warning_icon : $error_icon)).
' <span'.($available?'':' class="setup_warning"').'>'.
lang('Checking for JPGraph in %1',$jpgraph_path).': '.
(isset($version) ? lang('Version').' '.$version : lang('False'));
if (!$available)
{
echo "<br />\n".lang('You dont have JPGraph version %1 or higher installed! It is needed from ProjectManager for Ganttcharts.',$min_version)."<br />\n";
echo lang('Please download a recent version from %1 and install it as %2.',
'<a href="http://jpgraph.net/download/" target="_blank">jpgraph.net/download/</a>',
$jpgraph_path);
}
echo "</span></div>\n";
return $available;
}
function get_php_ini()
{
ob_start();
@ -831,7 +871,7 @@ if ($run_by_webserver)
{
echo lang('Please fix the above errors (%1) and warnings(%2)',$error_icon,$warning_icon).'. ';
}
echo '<br /><a href="'.str_replace('check_install.php','',$_SERVER['HTTP_REFERER']).'">'.lang('Return to Setup')."</a></h3>\n";
echo '<br /><a href="'.str_replace('check_install.php','',@$_SERVER['HTTP_REFERER']).'">'.lang('Return to Setup')."</a></h3>\n";
}
$setup_tpl->pparse('out','T_footer');
//echo "</body>\n</html>\n";

View File

@ -137,6 +137,7 @@ check to backup and restore the files directory (may use a lot of space, make su
checking extension %1 is loaded or loadable setup de Überprüfe ob die Erweiterung %1 geladen oder ladbar ist
checking file-permissions of %1 for %2 %3: %4 setup de Überprüfe Datei Zugriffsrechte von %1 für %2 %3: %4
checking for gd support... setup de Überprüfe die GD Unterstützung...
checking for jpgraph in %1 setup de Überprüfe JPGraph in %1
checking function %1 exists setup de Überprüfe ob die Funktion %1 verfügbar ist
checking if php.ini setting session.save_path='%1' is writable by the webserver setup de Überprüfe ob der Webserver auf die php.ini Einstellung session.save_path='%1' schreiben kann
checking pear%1 is installed setup de Überprüfe ob PEAR%1 installiert ist
@ -451,6 +452,7 @@ please check for sql scripts within the application's directory setup de Bitte s
please check read/write permissions on directories, or back up and use another option. setup de Bitte überprüfen Sie die Lese/Schreib-Rechte der Verzeichnisse oder gehen Sie zurück und benutzen eine andere Option.
please configure egroupware for your environment setup de Bitte konfigurieren Sie eGroupWare für Ihre Umgebung
please consult the %1. setup de Bitte konsultieren Sie das %1.
please download a recent version from %1 and install it as %2. setup de Bitte downloaden Sie die aktuelle Version von %1 und installieren Sie diese als %2.
please fix the above errors (%1) and warnings(%2) setup de Bitte beheben Sie die obigen Fehler (%1) und Warnungen (%2)
please install setup de Bitte installieren
please login setup de Bitte einloggen
@ -567,6 +569,7 @@ the ctype extension is needed by htmlpurifier to check content of fckeditor agai
the db_type in defaults (%1) is not supported on this server. using first supported type. setup de Der Datenbanktyp in den Vorgaben (%1) wird von diesem Server nicht unterstützt, verwende ersten unterstützten Typ.
the file setup de der Datei
the first step in installing egroupware is to ensure your environment has the necessary settings to correctly run the application. setup de Der erste Schritt bei Installation von eGroupWare ist sicherzustellen, dass Ihre Umgebung die notwendigen Einstellungen hat, um die Anwendung korrekt auszuführen.
the following applications are not installed: setup de Die folgenden Anwendungen sind NICHT installiert:
the following applications are required, but not installed: setup de Die folgenden Anwendungen werden benötigt, sind aber NICHT installiert:
the following applications need to be upgraded: setup de Die folgenden Anwendungen müssen aktualisiert werden:
the function %1 is needed from: %2. setup de Die Funktion %1 wird benötigt von: %2.
@ -670,6 +673,7 @@ you didn't enter a config username for domain %1 setup de Sie haben keinen Benut
you didn't enter a header admin password setup de Sie haben kein Passwort für die Headerverwaltung eingegeben
you didn't enter a header admin username setup de Sie haben keinen Benutzernamen für die Headerverwaltung eingegeben
you do not have any languages installed. please install one now <br /> setup de Sie installierten noch keine Sprache. bitte installieren Sie nun eine. <br />
you dont have jpgraph version %1 or higher installed! it is needed from projectmanager for ganttcharts. setup de Sie haben keine JPGraph Version %1 oder höher installiert! Diese wird vom Projektmanager für Ganttcharts benötigt.
you have not created your header.inc.php yet!<br /> you can create it now. setup de Sie haben bisher noch keine header.inc.php angelegt!<br />Sie können sie jetzt anlegen.
you have successfully logged out setup de Sie haben sich erfolgreich abgemeldet.
you must enter a username for the admin setup de Sie müssen einen Benutzernamen für den Administrator eingeben!

View File

@ -137,6 +137,7 @@ check to backup and restore the files directory (may use a lot of space, make su
checking extension %1 is loaded or loadable setup en Checking extension %1 is loaded or loadable
checking file-permissions of %1 for %2 %3: %4 setup en Checking file-permissions of %1 for %2 %3: %4
checking for gd support... setup en Checking for GD support...
checking for jpgraph in %1 setup en Checking for JPGraph in %1
checking function %1 exists setup en Checking function %1 exists
checking if php.ini setting session.save_path='%1' is writable by the webserver setup en Checking if php.ini setting session.save_path='%1' is writable by the webserver
checking pear%1 is installed setup en Checking PEAR%1 is installed
@ -451,6 +452,7 @@ please check for sql scripts within the application's directory setup en Please
please check read/write permissions on directories, or back up and use another option. setup en Please check read/write permissions on directories, or back up and use another option.
please configure egroupware for your environment setup en Please configure eGroupWare for your environment
please consult the %1. setup en Please consult the %1.
please download a recent version from %1 and install it as %2. setup en Please download a recent version from %1 and install it as %2.
please fix the above errors (%1) and warnings(%2) setup en Please fix the above errors (%1) and warnings(%2)
please install setup en Please install
please login setup en Please login
@ -567,6 +569,7 @@ the ctype extension is needed by htmlpurifier to check content of fckeditor agai
the db_type in defaults (%1) is not supported on this server. using first supported type. setup en The db_type in defaults (%1) is not supported on this server. using first supported type.
the file setup en the file
the first step in installing egroupware is to ensure your environment has the necessary settings to correctly run the application. setup en The first step in installing eGroupWare is to ensure your environment has the necessary settings to correctly run the application.
the following applications are not installed: setup en The following applications are NOT installed:
the following applications are required, but not installed: setup en The following applications are required, but NOT installed:
the following applications need to be upgraded: setup en The following applications need to be upgraded:
the function %1 is needed from: %2. setup en The function %1 is needed from: %2.
@ -670,6 +673,7 @@ you didn't enter a config username for domain %1 setup en You didn't enter a con
you didn't enter a header admin password setup en You didn't enter a header admin password
you didn't enter a header admin username setup en You didn't enter a header admin username
you do not have any languages installed. please install one now <br /> setup en You do not have any languages installed. Please install one now <br />
you dont have jpgraph version %1 or higher installed! it is needed from projectmanager for ganttcharts. setup en You dont have JPGraph version %1 or higher installed! It is needed from ProjectManager for Ganttcharts.
you have not created your header.inc.php yet!<br /> you can create it now. setup en You have not created your header.inc.php yet!<br /> You can create it now.
you have successfully logged out setup en You have successfully logged out
you must enter a username for the admin setup en You must enter a username for the admin