From: Michael M Slusarz Date: Fri, 8 Jan 2010 19:31:35 +0000 (-0700) Subject: Move to new Horde_Test system. X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=ce90d817080e0734cc65aff3b9a487b3d1aae0ce;p=horde.git Move to new Horde_Test system. --- diff --git a/ansel/lib/Test.php b/ansel/lib/Test.php new file mode 100644 index 000000000..871f96f65 --- /dev/null +++ b/ansel/lib/Test.php @@ -0,0 +1,102 @@ + + * @package Ansel + */ +class Ansel_Test extends Horde_Test +{ + /** + * The module list + * + * @var array + */ + protected $_moduleList = array( + 'facedetect' => array( + 'descrip' => 'Facedetect Face Detection Library', + 'required' => false, + 'error' => 'Ansel can make use of the Facedetect PHP extension for automatically detecting human faces in images. You need either OpenCV (above) or Facedetect to detect human faces.' + ), + 'gd' => array( + 'descrip' => 'GD Support', + 'error' => 'You need either GD2 support in PHP, or an external driver like ImageMagick. Either recompile PHP with GD2 support, or make sure that the path to ImageMagick\'s convert utility is set in horde/config/conf.php.' + ), + 'imagick' => array( + 'descrip' => 'Imagick Library', + 'required' => false, + 'error' => 'Ansel can make use of the Imagick Library, if it is installed on your system. It is highly recommended to use either ImageMagick\'s convert utility or the Imagick php library for faster results.' + ), + 'libpuzzle' => array( + 'descrip' => 'Puzzle Library', + 'required' => false, + 'error' => 'Ansel can make use of the libpuzzle PHP extension for finding similar images based on image content.' + ), + 'opencv' => array( + 'descrip' => 'OpenCV Library', + 'required' => false, + 'error' => 'Ansel can make use of the OpenCV PHP extension for automatically detecting human faces in images. You need either this library or the one immediately below to detect human faces.' + ), + 'zip' => array( + 'descrip' => 'Zip Support', + 'required' => false, + 'error' => 'Ansel can make use of PHP\'s Zip extension for more efficiently processing uploaded ZIP files.' + ) + ); + + /** + * PHP settings list. + * + * @var array + */ + protected $_settingsList = array(); + + /** + * PEAR modules list. + * + * @var array + */ + protected $_pearList = array( + 'MDB2' => array( + 'required' => true, + 'error' => 'You do not have the MDB2 package installed on your system. In addition to this package, you will need the appropriate MDB2_Driver package for your database backend.' + ) + ); + + /** + * Required configuration files. + * + * @var array + */ + protected $_fileList = array( + 'config/conf.php' => null, + 'config/prefs.php' => null + ); + + /** + * Inter-Horde application dependencies. + * + * @var array + */ + protected $_appList = array( + 'agora' => array( + 'error' => 'Agora provides the ability for users to comment on images.', + 'version' => '1.0' + ) + ); + + /** + * Any application specific tests that need to be done. + * + * @return string HTML output. + */ + public function appTests() + { + } + +} diff --git a/ansel/test.php b/ansel/test.php deleted file mode 100644 index 64704da40..000000000 --- a/ansel/test.php +++ /dev/null @@ -1,125 +0,0 @@ - - */ - -/* Include Horde's core.php file. */ -require_once dirname(__FILE__) . '/lib/base.load.php'; -include_once HORDE_BASE . '/lib/core.php'; - -/* We should have loaded the String class, from the Horde_Util - * package, in core.php. If Horde_String:: isn't defined, then we're not - * finding some critical libraries. */ -if (!class_exists('Horde_String')) { - echo '

The Horde_Util package was not found. If PHP\'s error_reporting setting is high enough and display_errors is on, there should be error messages printed above that may help you in debugging the problem. If you are simply missing these files, then you need to get the framework module from Horde CVS, and install the packages in it with the install-packages.php script.

'; - exit; -} - -/* Initialize the Horde_Test:: class. */ -if (!is_readable(HORDE_BASE . '/lib/Test.php')) { - echo 'ERROR: You must install Horde before running this script.'; - exit; -} -require_once HORDE_BASE . '/lib/Test.php'; -$horde_test = new Horde_Test; - -/* Ansel version. */ -$module = 'Ansel'; -require_once dirname(__FILE__) . '/lib/Application.php'; -$app = new Ansel_Application(); -$module_version = $app->version; - -/* Ansel configuration files. */ -$file_list = array( - 'config/conf.php' => 'The file ./config/conf.php appears to be missing. You probably just forgot to generate it using the Horde config system - see docs/INSTALL for details. While you do that, take a look at the settings and make sure they are appropriate for your site.', - 'config/prefs.php' => 'The file ./config/prefs.php appears to be missing. You probably just forgot to copy ./config/prefs.php.dist over. While you do that, take a look at the settings and make sure they are appropriate for your site.' -); - -require TEST_TEMPLATES . 'header.inc'; -require TEST_TEMPLATES . 'version.inc'; - -/* Display versions of other Horde applications. */ -$app_list = array( - 'horde' => array( - 'error' => 'Ansel requires at least Horde 4.0', - 'version' => '4.0' - ), - 'agora' => array( - 'error' => 'Agora provides the ability for users to comment on images.', - 'version' => '1.0') -); -$app_output = $horde_test->requiredAppCheck($app_list); -?> -

Other Horde Applications

- - - array( - 'descrip' => 'GD Support', - 'error' => 'You need either GD2 support in PHP, or an external driver like ImageMagick. Either recompile PHP with GD2 support, or make sure that the path to ImageMagick\'s convert utility is set in horde/config/conf.php.' - ), - 'imagick' => array( - 'descrip' => 'Imagick Library', - 'required' => false, - 'error' => 'Ansel can make use of the Imagick Library, if it is installed on your system. It is highly recommended to use either ImageMagick\'s convert utility or the Imagick php library for faster results.' - ), - 'zip' => array( - 'descrip' => 'Zip Support', - 'required' => false, - 'error' => 'Ansel can make use of PHP\'s Zip extension for more efficiently processing uploaded ZIP files.' - ), - 'opencv' => array( - 'descrip' => 'OpenCV Library', - 'required' => false, - 'error' => 'Ansel can make use of the OpenCV PHP extension for automatically detecting human faces in images. You need either this library or the one immediately below to detect human faces.' - ), - 'facedetect' => array( - 'descrip' => 'Facedetect Face Detection Library', - 'required' => false, - 'error' => 'Ansel can make use of the Facedetect PHP extension for automatically detecting human faces in images. You need either OpenCV (above) or Facedetect to detect human faces.' - ), - 'libpuzzle' => array( - 'descrip' => 'Puzzle Library', - 'required' => false, - 'error' => 'Ansel can make use of the libpuzzle PHP extension for finding similar images based on image content.' - ) -); - -/* PEAR */ -$pear_list = array('MDB2' => array( - 'path' => 'MDB2.php', - 'required' => true, - 'error' => 'You do not have the MDB2 package installed on your system. In addition to this package, you will need the appropriate MDB2_Driver package for your database backend.'), -); - -/* Display PHP Version information. */ -$php_info = $horde_test->getPhpVersionInformation(); -require TEST_TEMPLATES . 'php_version.inc'; - -?> -

PHP Module Capabilities

- - -

Ansel Configuration Files

- - -

PEAR Modules

- - - + * @package Chora + */ +class Chora_Test extends Horde_Test +{ + /** + * The module list + * + * @var array + */ + protected $_moduleList = array(); + + /** + * PHP settings list. + * + * @var array + */ + protected $_settingsList = array(); + + /** + * PEAR modules list. + * + * @var array + */ + protected $_pearList = array(); + + /** + * Required configuration files. + * + * @var array + */ + protected $_fileList = array( + 'config/conf.php' => null, + 'config/mime_drivers.php' => null, + 'config/prefs.php' => null, + 'config/sourceroots.php' => null + ); + + /** + * Inter-Horde application dependencies. + * + * @var array + */ + protected $_appList = array(); + + /** + * Any application specific tests that need to be done. + * + * @return string HTML output. + */ + public function appTests() + { + } + +} diff --git a/chora/test.php b/chora/test.php deleted file mode 100644 index e71a2fc29..000000000 --- a/chora/test.php +++ /dev/null @@ -1,89 +0,0 @@ - - */ - -/* Include Horde's core.php file. */ -require_once dirname(__FILE__) . '/lib/base.load.php'; -include_once HORDE_BASE . '/lib/core.php'; - -/* We should have loaded the Horde_String class, from the Horde_Util - package, in core.php. If Horde_String:: isn't defined, then we're not - finding some critical libraries. */ -if (!class_exists('Horde_String')) { - echo '

The Horde_Util package was not found. If PHP\'s error_reporting setting is high enough and display_errors is on, there should be error messages printed above that may help you in debugging the problem. If you are simply missing these files, then you need to get the framework module from Horde CVS, and install the packages in it with the install-packages.php script.

'; - exit; -} - -/* Initialize the Horde_Test:: class. */ -if (!is_readable(HORDE_BASE . '/lib/Test.php')) { - echo 'ERROR: You must install Horde before running this script.'; - exit; -} -require_once HORDE_BASE . '/lib/Test.php'; -$horde_test = new Horde_Test; - -/* Chora version. */ -$module = 'Chora'; -require_once dirname(__FILE__) . '/lib/Application.php'; -$app = new Chora_Application(); -$module_version = $app->version; - -/* Chora configuration files. */ -$file_list = array( - 'config/conf.php' => 'The file ./config/conf.php appears to be missing. You probably just forgot to generate it using the Horde config system - see docs/INSTALL for details. While you do that, take a look at the settings and make sure they are appropriate for your site.', - 'config/mime_drivers.php' => 'The file ./config/mime_drivers.php appears to be missing. You probably just forgot to copy ./config/mime_drivers.php.dist over. While you do that, take a look at the settings and make sure they are appropriate for your site.', - 'config/prefs.php' => 'The file ./config/prefs.php appears to be missing. You probably just forgot to copy ./config/prefs.php.dist over. While you do that, take a look at the settings and make sure they are appropriate for your site.', - 'config/sourceroots.php' => 'The file ./config/sourceroots.php appears to be missing. You probably just forgot to copy ./config/sourceroots.php.dist over. While you do that, take a look at the settings and make sure they are appropriate for your site.' -); - -require TEST_TEMPLATES . 'header.inc'; -require TEST_TEMPLATES . 'version.inc'; - -/* PHP module capabilities. */ -$module_list = array(); - -/* Display versions of other Horde applications. */ -$app_list = array( - 'horde' => array( - 'error' => 'Chora requires Horde 4.0 or greater to operate.', - 'version' => '4.0' - ), -); - -?> -

Other Horde Applications

- -getPhpVersionInformation(); -require TEST_TEMPLATES . 'php_version.inc'; - -/* PEAR */ -$pear_list = array(); - -/* Get the status output now. */ -$module_output = $horde_test->phpModuleCheck($module_list); - -?> - -

Chora Configuration Files

- - -

PEAR Modules

- - - + * @package Gollem + */ +class Gollem_Test extends Horde_Test +{ + /** + * The module list + * + * @var array + */ + protected $_moduleList = array( + 'ftp' => array( + 'descrip' => 'FTP Support', + 'error' => 'You need FTP support compiled into PHP if you plan to use the FTP VFS driver (see config/backends.php).' + ), + 'ssh2' => array( + 'descrip' => 'SSH2 Support', + 'error' => 'You need the SSH2 PECL module if you plan to use the SSH2 VFS driver (see config/backends.php).' + ) + ); + + /** + * PHP settings list. + * + * @var array + */ + protected $_settingsList = array(); + + /** + * PEAR modules list. + * + * @var array + */ + protected $_pearList = array( + 'HTTP_WebDAV_Server' => array( + 'error' => 'You do not have the HTTP_WebDAV_Server package installed on your system. This module is required to use browse the VFS using WebDAV. See the INSTALL file for instructions on how to install the package.' + ) + ); + + /** + * Required configuration files. + * + * @var array + */ + protected $_fileList = array( + 'config/backends.php' => null, + 'config/conf.php' => null, + 'config/credentials.php' => null, + 'config/mime_drivers.php' => null, + 'config/prefs.php' => null + ); + + /** + * Inter-Horde application dependencies. + * + * @var array + */ + protected $_appList = array(); + + /** + * Any application specific tests that need to be done. + * + * @return string HTML output. + */ + public function appTests() + { + } + +} diff --git a/gollem/test.php b/gollem/test.php deleted file mode 100644 index 371496b88..000000000 --- a/gollem/test.php +++ /dev/null @@ -1,121 +0,0 @@ - - */ - -/* Include Horde's core.php file. */ -require_once dirname(__FILE__) . '/lib/Application.php'; - -/* We should have loaded the String class, from the Horde_Util - package, in core.php. If Horde_String:: isn't defined, then we're not - finding some critical libraries. */ -if (!class_exists('String')) { - echo '

The Horde_Util package was not found. If PHP\'s error_reporting setting is high enough and display_errors is on, there should be error messages printed above that may help you in debugging the problem. If you are simply missing these files, then you need to get the framework module from Horde CVS, and install the packages in it with the install-packages.php script.

'; - exit; -} - -/* Initialize the Horde_Test:: class. */ -if (!is_readable(HORDE_BASE . '/lib/Test.php')) { - echo 'ERROR: You must install Horde before running this script.'; - exit; -} - -require_once HORDE_BASE . '/lib/Test.php'; -$horde_test = new Horde_Test(); - -/* Gollem version. */ -$module = 'Gollem'; -$app = new Gollem_Application(); -$module_version = $app->version; - -/* Gollem configuration files. */ -$file_list = array( - 'config/backends.php' => 'The file ./config/backends.php appears to be missing. You probably just forgot to copy ./config/backends.php.dist over. While you do that, take a look at the settings and make sure they are appropriate for your site.', - 'config/credentials.php' => 'The file ./config/credentials.php appears to be missing. You probably just forgot to copy ./config/credentials.php.dist over. While you do that, take a look at the settings and make sure they are appropriate for your site.', - 'config/conf.php' => 'The file ./config/conf.php appears to be missing. You probably just forgot to generate it using the Horde config system - see docs/INSTALL for details. While you do that, take a look at the settings and make sure they are appropriate for your site.', - 'config/mime_drivers.php' => 'The file ./config/mime_drivers.php appears to be missing. You probably just forgot to copy ./config/mime_drivers.php.dist over. While you do that, take a look at the settings and make sure they are appropriate for your site.', - 'config/prefs.php' => 'The file ./config/prefs.php appears to be missing. You probably just forgot to copy ./config/prefs.php.dist over. While you do that, take a look at the settings and make sure they are appropriate for your site.' -); - -require TEST_TEMPLATES . 'header.inc'; -require TEST_TEMPLATES . 'version.inc'; - -/* PHP module capabilities. */ -$module_list = array( - 'ftp' => array( - 'descrip' => 'FTP Support', - 'error' => 'You need FTP support compiled into PHP if you plan to use the FTP VFS driver (see config/backends.php).' - ), - 'ssh2' => array( - 'descrip' => 'SSH2 Support', - 'error' => 'You need the SSH2 PECL module if you plan to use the SSH2 VFS driver (see config/backends.php).' - ), -); - -/* Display versions of other Horde applications. */ -$app_list = array( - 'horde' => array( - 'error' => 'Gollem requires Horde 4.0 or greater to operate.', - 'version' => '4.0' - ), -); - -?> -

Other Horde Applications

- -getPhpVersionInformation(); -require TEST_TEMPLATES . 'php_version.inc'; - -/* PEAR */ -$pear_list = array( - 'HTTP_WebDAV_Server' => array( - 'path' => 'HTTP/WebDAV/Server.php', - 'error' => 'You do not have the HTTP_WebDAV_Server package installed on your system. This module is required to use browse the VFS using WebDAV. See the INSTALL file for instructions on how to install the package.' ), -); - -/* Get the status output now. */ -$module_output = $horde_test->phpModuleCheck($module_list); - -/* Check for VFS Quota support. */ -$quota_check = class_exists('VFS'); -if ($quota_check === false) { - $quota_output = 'Could not load VFS library to check for VFS Quota support.'; -} else { - $quota_output = 'VFS library supports quota.'; -} - -?> -

PHP Module Capabilities

- - -

Gollem Configuration Files

- - -

Gollem VFS Support

- - -

PEAR Modules

- - - + * @package Ingo + */ +class Ingo_Test extends Horde_Test +{ + /** + * The module list + * + * @var array + */ + protected $_moduleList = array( + 'ftp' => array( + 'descrip' => 'FTP Support', + 'error' => 'If you will be using the VFS FTP driver for procmail scripts, PHP must have FTP support. Compile PHP --with-ftp before continuing.' + ), + 'ssh2' => array( + 'descrip' => 'SSH2 Support', + 'error' => 'You need the SSH2 PECL module if you plan to use the SSH2 VFS driver to store procmail scripts on the mail server.' + ), + ); + + /** + * PHP settings list. + * + * @var array + */ + protected $_settingsList = array(); + + /** + * PEAR modules list. + * + * @var array + */ + protected $_pearList = array( + 'Net_Socket' => array( + 'error' => 'If you will be using Sieve scripts, make sure you are using a version of PEAR which includes the Net_Socket class, or that you have installed the Net_Socket package seperately.' + ), + 'Net_Sieve' => array( + 'error' => 'If you will be using Sieve scripts, make sure you are using a version of PEAR which includes the Net_Sieve class, or that you have installed the Net_Sieve package seperately.' + ) + ); + + /** + * Required configuration files. + * + * @var array + */ + protected $_fileList = array( + 'config/conf.php' => null, + 'config/prefs.php' => null + ); + + /** + * Inter-Horde application dependencies. + * + * @var array + */ + protected $_appList = array( + 'imp' => array( + 'error' => 'IMP can be used to interface ingo with a mailserver.', + 'version' => '5.0' + ) + ); + + /** + * Any application specific tests that need to be done. + * + * @return string HTML output. + */ + public function appTests() + { + } + +} diff --git a/ingo/test.php b/ingo/test.php deleted file mode 100644 index 24e1ad017..000000000 --- a/ingo/test.php +++ /dev/null @@ -1,102 +0,0 @@ - - * @author Chuck Hagenbuch - */ - -/* Include Horde's core.php file. */ -require_once dirname(__FILE__) . '/lib/base.load.php'; -include_once HORDE_BASE . '/lib/core.php'; - -/* We should have loaded the Horde_String class, from the Horde_Util - * package, in core.php. If Horde_String:: isn't defined, then we're not - * finding some critical libraries. */ -if (!class_exists('Horde_String')) { - echo '

The Horde_Util package was not found. If PHP\'s error_reporting setting is high enough and display_errors is on, there should be error messages printed above that may help you in debugging the problem. If you are simply missing these files, then you need to get the framework module from Horde CVS, and install the packages in it with the install-packages.php script.

'; - exit; -} - -/* Initialize the Horde_Test:: class. */ -if (!is_readable(HORDE_BASE . '/lib/Test.php')) { - echo 'ERROR: You must install Horde before running this script.'; - exit; -} -require_once HORDE_BASE . '/lib/Test.php'; -$horde_test = new Horde_Test; - -/* Ingo version. */ -$module = 'Ingo'; -require_once dirname(__FILE__) . '/lib/Application.php'; -$api = new Ingo_Application(); -$module_version = $app->version; - -require TEST_TEMPLATES . 'header.inc'; -require TEST_TEMPLATES . 'version.inc'; - -/* Display versions of other Horde applications. */ -$app_list = array( - 'imp' => array( - 'error' => 'IMP can be used to interface ingo with a mailserver.', - 'version' => '5.0' - ) -); -$app_output = $horde_test->requiredAppCheck($app_list); - -?> -

Other Horde Applications

- - array( - 'descrip' => 'FTP Support', - 'error' => 'If you will be using the VFS FTP driver for procmail scripts, PHP must have FTP support. Compile PHP --with-ftp before continuing.' - ), - 'ssh2' => array( - 'descrip' => 'SSH2 Support', - 'error' => 'You need the SSH2 PECL module if you plan to use the SSH2 VFS driver to store procmail scripts on the mail server.' - ), -); - -/* Display PHP Version information. */ -$php_info = $horde_test->getPhpVersionInformation(); -require TEST_TEMPLATES . 'php_version.inc'; - -/* PEAR */ -$pear_list = array( - 'Net_Socket' => array( - 'path' => 'Net/Socket.php', - 'error' => 'If you will be using Sieve scripts, make sure you are using a version of PEAR which includes the Net_Socket class, or that you have installed the Net_Socket package seperately.' - ), - 'Net_Sieve' => array( - 'path' => 'Net/Sieve.php', - 'error' => 'If you will be using Sieve scripts, make sure you are using a version of PEAR which includes the Net_Sieve class, or that you have installed the Net_Sieve package seperately.' - ) -); - -/* Get the status output now. */ -$module_output = $horde_test->phpModuleCheck($module_list); - -?> -

PHP Module Capabilities

- - -

PEAR Modules

- - - + * @package Jeta + */ +class Jeta_Test extends Horde_Test +{ + /** + * The module list + * + * @var array + */ + protected $_moduleList = array(); + + /** + * PHP settings list. + * + * @var array + */ + protected $_settingsList = array(); + + /** + * PEAR modules list. + * + * @var array + */ + protected $_pearList = array(); + + /** + * Required configuration files. + * + * @var array + */ + protected $_fileList = array( + 'config/conf.php' => null, + 'config/prefs.php' => null + ); + + /** + * Inter-Horde application dependencies. + * + * @var array + */ + protected $_appList = array(); + + /** + * Any application specific tests that need to be done. + * + * @return string HTML output. + */ + public function appTests() + { + } + +} diff --git a/jeta/test.php b/jeta/test.php deleted file mode 100644 index fd3e25d30..000000000 --- a/jeta/test.php +++ /dev/null @@ -1,71 +0,0 @@ - - */ - -/* Include Horde's core.php file. */ -require_once dirname(__FILE__) . '/lib/base.load.php'; -include_once HORDE_BASE . '/lib/core.php'; - -/* We should have loaded the Horde_String class, from the Horde_Util - package, in core.php. If Horde_String:: isn't defined, then we're not - finding some critical libraries. */ -if (!class_exists('Horde_String')) { - echo '

The Horde_Util package was not found. If PHP\'s error_reporting setting is high enough and display_errors is on, there should be error messages printed above that may help you in debugging the problem. If you are simply missing these files, then you need to get the framework module from Horde CVS, and install the packages in it with the install-packages.php script.

'; - exit; -} - -/* Initialize the Horde_Test:: class. */ -if (!is_readable(HORDE_BASE . '/lib/Test.php')) { - echo 'ERROR: You must install Horde before running this script.'; - exit; -} -require_once HORDE_BASE . '/lib/Test.php'; -$horde_test = new Horde_Test(); - -/* Jeta version. */ -$module = 'Jeta'; -require_once dirname(__FILE__) . '/lib/Api.php'; -$app = new Jeta_Application(); -$module_version = $app->version; - -/* Jeta configuration files. */ -$file_list = array( - 'config/conf.php' => 'The file ./config/conf.php appears to be missing. You probably just forgot to generate it using the Horde config system - see docs/INSTALL for details. While you do that, take a look at the settings and make sure they are appropriate for your site.', -); - -require TEST_TEMPLATES . 'header.inc'; -require TEST_TEMPLATES . 'version.inc'; - -?> -

Other Horde Applications

- -getPhpVersionInformation(); -require TEST_TEMPLATES . 'php_version.inc'; - -/* PEAR */ -$pear_list = array(); - -?> -

Jeta Configuration Files

- - -

PEAR Modules

- - - + * @package Kronolith + */ +class Kronolith_Test extends Horde_Test +{ + /** + * The module list + * + * @var array + */ + protected $_moduleList = array( + 'mysqli' => array( + 'descrip' => 'mysqli', + 'error' => 'The tagging capabilites require either the PDO or mysqli extension.'), + 'pdo' => array( + 'descrip' => 'PDO', + 'error' => 'The tagging capabilites require either the PDO or mysqli extension.') + ); + + /** + * PHP settings list. + * + * @var array + */ + protected $_settingsList = array(); + + /** + * PEAR modules list. + * + * @var array + */ + protected $_pearList = array( + 'Date' => array( + 'path' => 'Date/Calc.php', + 'error' => 'Kronolith requires the Date_Calc class to calculate dates.', + 'required' => true, + ), + 'Date_Holidays' => array( + 'error' => 'Date_Holidays can be used to calculate and display national and/or religious holidays.', + 'required' => false, + ), + 'XML_Serializer' => array( + 'path' => 'XML/Unserializer.php', + 'error' => 'The XML_Serializer might be needed by the Date_Holidays package for the translation of holidays', + 'required' => false, + ) + ); + + /** + * Required configuration files. + * + * @var array + */ + protected $_fileList = array( + 'config/conf.php' => null, + 'config/prefs.php' => null + ); + + /** + * Inter-Horde application dependencies. + * + * @var array + */ + protected $_appList = array(); + + /** + * Any application specific tests that need to be done. + * + * @return string HTML output. + */ + public function appTests() + { + } + +} diff --git a/kronolith/test.php b/kronolith/test.php deleted file mode 100644 index d981814c3..000000000 --- a/kronolith/test.php +++ /dev/null @@ -1,77 +0,0 @@ -

The Horde_Util package was not found. If PHP\'s error_reporting setting is high enough and display_errors is on, there should be error messages printed above that may help you in debugging the problem. If you are simply missing these files, then you need to get the framework module from Horde CVS, and install the packages in it with the install-packages.php script.

'; - exit; -} - -/* Initialize the Horde_Test:: class. */ -if (!is_readable(HORDE_BASE . '/lib/Test.php')) { - echo 'ERROR: You must install Horde before running this script.'; - exit; -} -require_once HORDE_BASE . '/lib/Test.php'; -$horde_test = new Horde_Test; - -$module = 'Kronolith'; -require_once dirname(__FILE__) . '/lib/Application.php'; -$app = new Kronolith_Application(); - -$module_version = $app->version; - -require TEST_TEMPLATES . 'header.inc'; -require TEST_TEMPLATES . 'version.inc'; - -/* Display PHP Version information. */ -$php_info = $horde_test->getPhpVersionInformation(); -require TEST_TEMPLATES . 'php_version.inc'; - -/* PHP module capabilities. */ -$module_list = array( - 'pdo' => array( - 'descrip' => 'PDO', - 'error' => 'The tagging capabilites require either the PDO or mysqli extension.'), - 'mysqli' => array( - 'descrip' => 'mysqli', - 'error' => 'The tagging capabilites require either the PDO or mysqli extension.') -); -$module_output = $horde_test->phpModuleCheck($module_list); - -/* PEAR */ -$pear_list = array( - 'Date' => array( - 'path' => 'Date/Calc.php', - 'error' => 'Kronolith requires the Date_Calc class to calculate dates.', - 'required' => true, - ), - 'Date_Holidays' => array( - 'path' => 'Date/Holidays.php', - 'error' => 'Date_Holidays can be used to calculate and display national and/or religious holidays.', - 'required' => false, - ), - 'XML_Serializer' => array( - 'path' => 'XML/Unserializer.php', - 'error' => 'The XML_Serializer might be needed by the Date_Holidays package for the translation of holidays', - 'required' => false, - ), -); - -?> -

PHP Module Capabilities

- - -

PEAR Modules

- - - + * @package Turba + */ +class Turba_Test extends Horde_Test +{ + /** + * The module list + * + * @var array + */ + protected $_moduleList = array( + 'mysql' => 'MySQL Support', + 'pgsql' => 'PostgreSQL Support', + 'mssql' => 'Microsoft SQL Support', + 'oci8' => 'Oracle Support', + 'odbc' => 'Unified ODBC Support', + 'ldap' => 'LDAP Support' + ); + + /** + * PHP settings list. + * + * @var array + */ + protected $_settingsList = array(); + + /** + * PEAR modules list. + * + * @var array + */ + protected $_pearList = array( + 'Net_LDAP' => array( + 'error' => 'Net_LDAP is required when doing schema checks with LDAP address books.', + ) + ); + + /** + * Required configuration files. + * + * @var array + */ + protected $_fileList = array( + 'config/attributes.php' => null, + 'config/conf.php' => null, + 'config/mime_drivers.php' => null, + 'config/prefs.php' => null, + 'config/sources.php' => null + ); + + /** + * Inter-Horde application dependencies. + * + * @var array + */ + protected $_appList = array(); + + /** + * Any application specific tests that need to be done. + * + * @return string HTML output. + */ + public function appTests() + { + $ret = '

LDAP Support Test

'; + + $params = array( + 'server' => Horde_Util::getPost('server'), + 'port' => Horde_Util::getPost('port', 389), + 'basedn' => Horde_Util::getPost('basedn'), + 'user' => Horde_Util::getPost('user'), + 'passwd' => Horde_Util::getPost('passwd'), + 'filter' => Horde_Util::getPost('filter'), + 'proto' => Horde_Util::getPost('proto') + ); + + if (!empty($params['server']) && + !empty($params['basedn']) && + !empty($params['filter'])) { + $ret .= $this->_doConnectionTest(); + } + + $self_url = Horde::selfUrl()->add('app', 'turba'); + + return $ret . Horde_Util::bufferOutput('require', TURBA_TEMPLATES . '/test/ldapserver.inc'); + } + + /** + * Perform LDAP server support test. + * + * @param array $params Connection parameters. + * + * @return string HTML output. + */ + protected function _doConnectionTest($params) + { + $ret .= 'server="' . htmlspecialchars($params['server']) . '" ' . + 'basedn="' . htmlspecialchars($params['basedn']) . '" ' . + 'filter="' . htmlspecialchars($params['filter']) . '"
'; + + if (!empty($params['user'])) { + $ret .= 'bind as user="' . htmlspecialchars($params['user']) . '"
'; + } else { + $ret .= 'bind anonymously
'; + } + + $ldap = ldap_connect($params['server'], $params['port']); + if ($ldap) { + if (!empty($params['proto']) && ($params['proto'] == '3')) { + ldap_set_option($ldap, LDAP_OPT_PROTOCOL_VERSION, 3); + } + + if (!empty($params['user']) && !ldap_bind($ldap, $params['user'], $params['passwd'])) { + $ret .= '

unable to bind as ' . htmlspecialchars($params['user']) . ' to LDAP server

'; + ldap_close($ldap); + $ldap = ''; + } elseif (empty($params['user']) && !ldap_bind($ldap)) { + $ret .= "

unable to bind anonymously to LDAP server

\n"; + ldap_close($ldap); + $ldap = ''; + } + + if ($ldap) { + $result = ldap_search($ldap, $params['basedn'], $params['filter']); + if ($result) { + $ret .= '

search returned ' . ldap_count_entries($ldap, $result) . " entries

\n"; + $info = ldap_get_entries($ldap, $result); + for ($i = 0; $i < $info['count']; ++$i) { + $ret .= '

dn is: ' . $info[$i]['dn'] . '
' . + 'first cn entry is: ' . $info[$i]['cn'][0] . '
' . + 'first mail entry is: ' . $info[$i]['mail'][0] . '

'; + + if ($i >= 10) { + $ret .= '

(only first 10 entries displayed)

'; + break; + } + } + } else { + $ret .= '

unable to search LDAP server

'; + } + } + } else { + $ret .= '

unable to connect to LDAP server

'; + } + + return $ret; + } + +} diff --git a/turba/templates/test/ldapserver.inc b/turba/templates/test/ldapserver.inc new file mode 100644 index 000000000..f9d66d41b --- /dev/null +++ b/turba/templates/test/ldapserver.inc @@ -0,0 +1,75 @@ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+ + + + (defaults to "389")
+ + + + (e.g. "dc=example,dc=com")
+ + + + (leave blank for anonymous)
+ + + +
+ + + + (e.g. "cn=Babs Jensen")
+ + + + (LDAP protocol version)
+ + +
+
diff --git a/turba/test.php b/turba/test.php deleted file mode 100644 index 941a29600..000000000 --- a/turba/test.php +++ /dev/null @@ -1,153 +0,0 @@ - - */ - -/* Include Horde's core.php file. */ -require_once dirname(__FILE__) . '/lib/base.load.php'; -include_once HORDE_BASE . '/lib/core.php'; - -/* We should have loaded the String class, from the Horde_Util - * package, in core.php. If Horde_String:: isn't defined, then we're not - * finding some critical libraries. */ -if (!class_exists('Horde_String')) { - echo '

The Horde_Util package was not found. If PHP\'s error_reporting setting is high enough and display_errors is on, there should be error messages printed above that may help you in debugging the problem. If you are simply missing these files, then you need to get the framework module from Horde CVS, and install the packages in it with the install-packages.php script.

'; - exit; -} - -/* Initialize the Horde_Test:: class. */ -if (!is_readable(HORDE_BASE . '/lib/Test.php')) { - echo 'ERROR: You must install Horde before running this script.'; - exit; -} -require_once HORDE_BASE . '/lib/Test.php'; -$horde_test = new Horde_Test(); - -/* Turba version. */ -$module = 'Turba'; -require_once dirname(__FILE__) . '/lib/Application.php'; -$app = new Turba_Application(); -$module_version = $app->version; - -require TEST_TEMPLATES . 'header.inc'; -require TEST_TEMPLATES . 'version.inc'; - -/* Display PHP Version information. */ -$php_info = $horde_test->getPhpVersionInformation(); -require TEST_TEMPLATES . 'php_version.inc'; - -/* PHP modules. */ -$module_list = array( - 'mysql' => 'MySQL Support', - 'pgsql' => 'PostgreSQL Support', - 'mssql' => 'Microsoft SQL Support', - 'oci8' => 'Oracle Support', - 'odbc' => 'Unified ODBC Support', - 'ldap' => 'LDAP Support' -); - -/* PEAR packages. */ -$pear_list = array( - 'Net_LDAP' => array( - 'path' => 'Net/LDAP.php', - 'error' => 'Net_LDAP is required when doing schema checks with LDAP address books.', - ), -); - -/* Get the status output now. */ -$module_output = $horde_test->phpModuleCheck($module_list); -$pear_output = $horde_test->PEARModuleCheck($pear_list); - -?> - -

PHP Module Capabilities

- - -

PEAR

- - -

PHP LDAP Support Test

-'; - if ($user) { - echo 'bind as user="', htmlspecialchars($user), '"
'; - } else { - echo 'bind anonymously
'; - } - $ldap = ldap_connect($server, $port); - if ($ldap) { - if (!empty($proto) && ($proto == '3')) { - ldap_set_option($ldap, LDAP_OPT_PROTOCOL_VERSION, 3); - } - if (!empty($user) && !ldap_bind($ldap, $user, $passwd)) { - echo '

unable to bind as ' . htmlspecialchars($user) . ' to LDAP server

'; - ldap_close($ldap); - $ldap = ''; - } elseif (empty($user) && !ldap_bind($ldap)) { - echo "

unable to bind anonymously to LDAP server

\n"; - ldap_close($ldap); - $ldap = ''; - } - if ($ldap) { - $result = ldap_search($ldap, $basedn, $filter); - if ($result) { - echo '

search returned ' . ldap_count_entries($ldap, $result) . " entries

\n"; - $info = ldap_get_entries($ldap, $result); - for ($i = 0; $i < $info['count']; $i++) { - echo '

dn is: ' . $info[$i]['dn'] . '
'; - echo 'first cn entry is: ' . $info[$i]['cn'][0] . '
'; - echo 'first mail entry is: ' . $info[$i]['mail'][0] . '

'; - if ($i >= 10) { - echo '

(only first 10 entries displayed)

'; - break; - } - } - } else { - echo '

unable to search LDAP server

'; - } - } - } else { - echo '

unable to connect to LDAP server

'; - } -} else { - ?> -
- - - - - - - - - -
(defaults to "389")
(e.g. "dc=example,dc=com")
(leave blank for anonymous)
(e.g. "cn=Babs Jensen")
(LDAP protocol version)
-
- - - + * @package Vilma + */ +class Vilma_Test extends Horde_Test +{ + /** + * The module list + * + * @var array + */ + protected $_moduleList = array(); + + /** + * PHP settings list. + * + * @var array + */ + protected $_settingsList = array(); + + /** + * PEAR modules list. + * + * @var array + */ + protected $_pearList = array(); + + /** + * Required configuration files. + * + * @var array + */ + protected $_fileList = array( + 'config/conf.php' => null, + 'config/prefs.php' => null + ); + + /** + * Inter-Horde application dependencies. + * + * @var array + */ + protected $_appList = array(); + + /** + * Any application specific tests that need to be done. + * + * @return string HTML output. + */ + public function appTests() + { + } + +} diff --git a/vilma/test.php b/vilma/test.php deleted file mode 100644 index a10a05d8c..000000000 --- a/vilma/test.php +++ /dev/null @@ -1,48 +0,0 @@ - - * @package Vilma - */ - -require_once './lib/version.php'; -@define('CONFIG_DIR', dirname(__FILE__) . '/config/'); - -$setup_ok = true; - -$config_files = array('conf.php', 'prefs.php'); - -?> - - - - -Vilma: System Capabilities Test - - - - -

Vilma Version

- - -

Vilma Configuration Files

- - - diff --git a/wicked/lib/Test.php b/wicked/lib/Test.php new file mode 100644 index 000000000..47d237f2b --- /dev/null +++ b/wicked/lib/Test.php @@ -0,0 +1,100 @@ + + * @package Wicked + */ +class Wicked_Test extends Horde_Test +{ + /** + * The module list + * + * @var array + */ + protected $_moduleList = array(); + + /** + * PHP settings list. + * + * @var array + */ + protected $_settingsList = array(); + + /** + * PEAR modules list. + * + * @var array + */ + protected $_pearList = array( + 'Text_Wiki' => array( + 'error' => 'The Text_Wiki module is required to parse and render the wiki markup in Wicked.', + 'required' => true, + 'function' => '_checkPearTextWikiVersion' + ), + 'Text_Wiki_BBCode' => array( + 'error' => 'The Text_Wiki_BBCode module is required if you plan on using BBCode formatting.', + 'required' => false, + ), + 'Text_Wiki_Cowiki' => array( + 'error' => 'The Text_Wiki_Cowiki module is required if you plan on using Cowiki formatting.', + 'required' => false, + ), + 'Text_Wiki_Creole' => array( + 'error' => 'The Text_Wiki_Creole module is required if you plan on using Creole formatting.', + 'required' => false, + ), + 'Text_Wiki_Mediawiki' => array( + 'error' => 'The Text_Wiki_Mediawiki module is required if you plan on using Mediawiki formatting.', + 'required' => false, + ), + 'Text_Wiki_Tiki' => array( + 'error' => 'The Text_Wiki_Tiki module is required if you plan on using Tiki formatting.', + 'required' => false, + ), + ); + + /** + * Required configuration files. + * + * @var array + */ + protected $_fileList = array( + 'config/conf.php' => null, + 'config/prefs.php' => null + ); + + /** + * Inter-Horde application dependencies. + * + * @var array + */ + protected $_appList = array(); + + /** + * Additional check for PEAR Text_Wiki module for its version. + * + * @return string Returns error string on error. + */ + protected function _checkPearTextWikiVersion() + { + if (!is_callable(array('Text_Wiki', 'setRenderConf'))) { + return 'Your version of Text_Wiki is not recent enough.'; + } + } + + /** + * Any application specific tests that need to be done. + * + * @return string HTML output. + */ + public function appTests() + { + } + +} diff --git a/wicked/test.php b/wicked/test.php deleted file mode 100644 index 3dff6d6df..000000000 --- a/wicked/test.php +++ /dev/null @@ -1,92 +0,0 @@ - - */ - -/* Include Horde's core.php file. */ -include_once '../lib/core.php'; - -/* We should have loaded the String class, from the Horde_Util package, in - * core.php. If Horde_String:: isn't defined, then we're not finding some critical - * libraries. */ -if (!class_exists('Horde_String')) { - echo '

The Horde_Util package was not found. If PHP\'s error_reporting setting is high enough and display_errors is on, there should be error messages printed above that may help you in debugging the problem. If you are simply missing these files, then you need to get the framework module from Horde CVS, and install the packages in it with the install-packages.php script.

'; - exit; -} - -/* Initialize the Horde_Test:: class. */ -if (!is_readable('../lib/Test.php')) { - echo 'ERROR: You must install Horde before running this script.'; - exit; -} -require_once '../lib/Test.php'; -$horde_test = new Horde_Test; - -/* Wicked version. */ -$module = 'Wicked'; -require_once './lib/version.php'; -$module_version = WICKED_VERSION; - -require TEST_TEMPLATES . 'header.inc'; -require TEST_TEMPLATES . 'version.inc'; - -/* Display PHP Version information. */ -$php_info = $horde_test->getPhpVersionInformation(); -require TEST_TEMPLATES . 'php_version.inc'; - -/* PEAR */ -$pear_list = array( - 'Text_Wiki' => array( - 'path' => 'Text/Wiki.php', - 'error' => 'The Text_Wiki module is required to parse and render the wiki markup in Wicked.', - 'required' => true, - 'function' => '_check_pear_text_wiki_version' - ), - 'Text_Wiki_BBCode' => array( - 'path' => 'Text/Wiki/BBCode.php', - 'error' => 'The Text_Wiki_BBCode module is required if you plan on using BBCode formatting.', - 'required' => false, - ), - 'Text_Wiki_Cowiki' => array( - 'path' => 'Text/Wiki/Cowiki.php', - 'error' => 'The Text_Wiki_Cowiki module is required if you plan on using Cowiki formatting.', - 'required' => false, - ), - 'Text_Wiki_Creole' => array( - 'path' => 'Text/Wiki/Creole.php', - 'error' => 'The Text_Wiki_Creole module is required if you plan on using Creole formatting.', - 'required' => false, - ), - 'Text_Wiki_Mediawiki' => array( - 'path' => 'Text/Wiki/Mediawiki.php', - 'error' => 'The Text_Wiki_Mediawiki module is required if you plan on using Mediawiki formatting.', - 'required' => false, - ), - 'Text_Wiki_Tiki' => array( - 'path' => 'Text/Wiki/Tiki.php', - 'error' => 'The Text_Wiki_Tiki module is required if you plan on using Tiki formatting.', - 'required' => false, - ), -); - -/* Additional check for PEAR Text_Wiki module for its version. */ -function _check_pear_text_wiki_version() -{ - if (!is_callable(array('Text_Wiki', 'setRenderConf'))) { - return 'Your version of Text_Wiki is not recent enough.'; - } -} - -?> -

PEAR Modules

- - -