Fixed install problems with missing php dom extension,

which is required (but not declared) by importexport:
- added requirement to importexport/setup/setup.inc.php
- gracefully fail if dom is not available
- add dom extension to rpm requirements
--> this has been reported many times on the list as "missing wiki
pages", which is caused by suppressed fatal error in importexports
default-records, stoping other apps default records to run
This commit is contained in:
Ralf Becker 2008-10-14 08:42:09 +00:00
parent 60b85adcbc
commit 3358a39461
3 changed files with 55 additions and 47 deletions

View File

@ -9,7 +9,7 @@
%define source5 egroupware_suse.tar.bz2
%define distribution SUSE Linux %{?suse_version}
%define php php5
%define extra_requires apache2-mod_php5 mysql php5-mysql
%define extra_requires apache2-mod_php5 mysql php5-mysql php5-dom
%define cron cron
%endif
%if 0%{?fedora_version}
@ -19,7 +19,7 @@
%define source5 egroupware_fedora.tar.bz2
%define distribution Fedora Core %{?fedora_version}
%define php php
%define extra_requires httpd mysql-server php-mysql
%define extra_requires httpd mysql-server php-mysql php-xml
%define cron crontabs
%endif
%if 0%{?mandriva_version}
@ -29,7 +29,7 @@
%define source5 egroupware_fedora.tar.bz2
%define distribution Mandriva %{?mandriva_version}
%define php php
%define extra_requires httpd mysql-server php-mysql
%define extra_requires httpd mysql-server php-mysql php-dom
%define cron crontabs
%endif
%if 0%{?rhel_version}
@ -39,7 +39,7 @@
%define source5 egroupware_fedora.tar.bz2
%define distribution Red Head %{?rhel_version}
%define php php
%define extra_requires httpd mysql-server php-mysql
%define extra_requires httpd mysql-server php-mysql php-xml
%define cron crontabs
%endif
%if 0%{?centos_version}
@ -49,7 +49,7 @@
%define source5 egroupware_fedora.tar.bz2
%define distribution CentOS %{?centos_version}
%define php php
%define extra_requires httpd mysql-server php-mysql
%define extra_requires httpd mysql-server php-mysql php-xml
%define cron crontabs
%endif

View File

@ -9,6 +9,11 @@
* @version $Id$
*/
if (!extension_loaded('dom'))
{
echo "<p>Required PHP DOM extension missing, installation of ImportExport definitions aborted.</p>\n";
return; // otherwise we mess up the whole eGroupware install process
}
require_once(EGW_INCLUDE_ROOT. '/importexport/inc/class.bodefinitions.inc.php');
// This sets up $GLOBALS['egw']->accounts and $GLOBALS['egw']->db
@ -30,6 +35,6 @@ while (false !== ($appdir = $egwdir->read())) {
$file = $defdir. '/'. $entry;
list( $filename, $extension) = explode('.',$entry);
if ( $extension != 'xml' ) continue;
bodefinitions::import( $file );
bodefinitions::import( $file );
}
}

View File

@ -1,47 +1,50 @@
<?php
/**
* importexport
*
* @license http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License
* @package importexport
* @author Cornelius Weiss <nelius@cwtech.de>
* @version $Id$
*/
/**
* importexport
*
* @license http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License
* @package importexport
* @author Cornelius Weiss <nelius@cwtech.de>
* @version $Id$
*/
$setup_info['importexport']['name'] = 'importexport';
$setup_info['importexport']['version'] = '1.4';
$setup_info['importexport']['app_order'] = 2;
$setup_info['importexport']['enable'] = 2;
$setup_info['importexport']['tables'] = array('egw_importexport_definitions');
$setup_info['importexport']['author'] =
$setup_info['importexport']['maintainer'] = array(
'name' => 'Cornelius Weiss',
'email' => 'nelius@cwtech.de'
);
$setup_info['importexport']['license'] = 'GPL';
$setup_info['importexport']['description'] =
'';
$setup_info['importexport']['note'] =
'';
/* The hooks this app includes, needed for hooks registration */
//$setup_info['importexport']['hooks']['preferences'] = 'importexport'.'.admin_prefs_sidebox_hooks.all_hooks';
//$setup_info['importexport']['hooks']['settings'] = 'importexport'.'.admin_prefs_sidebox_hooks.settings';
$setup_info['importexport']['hooks']['admin'] = 'importexport'.'.importexport_admin_prefs_sidebox_hooks.all_hooks';
$setup_info['importexport']['hooks']['sidebox_menu'] = 'importexport'.'.importexport_admin_prefs_sidebox_hooks.all_hooks';
//$setup_info['importexport']['hooks']['search_link'] = 'importexport'.'.bomyterra.search_link';
/* Dependencies for this app to work */
$setup_info['importexport']['depends'][] = array(
'appname' => 'phpgwapi',
'versions' => Array('1.3','1.4','1.5','1.6','1.7')
);
$setup_info['importexport']['depends'][] = array(
'appname' => 'etemplate',
'versions' => Array('1.3','1.4','1.5','1.6','1.7')
);
$setup_info['importexport']['name'] = 'importexport';
$setup_info['importexport']['version'] = '1.4';
$setup_info['importexport']['app_order'] = 2;
$setup_info['importexport']['enable'] = 2;
$setup_info['importexport']['tables'] = array('egw_importexport_definitions');
$setup_info['importexport']['author'] = 'Cornelius Weiss';
$setup_info['importexport']['maintainer'] = array(
'name' => 'eGroupware core team',
'email' => 'egroupware-developers@lists.sf.net'
);
$setup_info['importexport']['license'] = 'GPL';
$setup_info['importexport']['description'] =
'';
$setup_info['importexport']['note'] =
'';
/* The hooks this app includes, needed for hooks registration */
//$setup_info['importexport']['hooks']['preferences'] = 'importexport'.'.admin_prefs_sidebox_hooks.all_hooks';
//$setup_info['importexport']['hooks']['settings'] = 'importexport'.'.admin_prefs_sidebox_hooks.settings';
$setup_info['importexport']['hooks']['admin'] = 'importexport'.'.importexport_admin_prefs_sidebox_hooks.all_hooks';
$setup_info['importexport']['hooks']['sidebox_menu'] = 'importexport'.'.importexport_admin_prefs_sidebox_hooks.all_hooks';
//$setup_info['importexport']['hooks']['search_link'] = 'importexport'.'.bomyterra.search_link';
/* Dependencies for this app to work */
$setup_info['importexport']['depends'][] = array(
'appname' => 'phpgwapi',
'versions' => Array('1.3','1.4','1.5','1.6','1.7')
);
$setup_info['importexport']['depends'][] = array(
'appname' => 'etemplate',
'versions' => Array('1.3','1.4','1.5','1.6','1.7')
);
// installation checks for importexport
$setup_info['importexport']['check_install'] = array(
'dom' => array(
'func' => 'extension_check',
),
);