forked from extern/egroupware
fix failed package install without phpgwapi installed
This commit is contained in:
parent
49f640a016
commit
cb3248a4e6
@ -51,7 +51,7 @@ class setup_cmd_header extends setup_cmd
|
||||
admin_cmd::__construct($sub_command);
|
||||
|
||||
// header is 3 levels lower then this command in setup/inc
|
||||
$this->header_path = dirname(dirname(dirname(__FILE__))).'/header.inc.php';
|
||||
$this->header_path = dirname(dirname(__DIR__)).'/header.inc.php';
|
||||
|
||||
// if header is a symlink --> work on it's target
|
||||
if (is_link($this->header_path))
|
||||
@ -59,7 +59,7 @@ class setup_cmd_header extends setup_cmd
|
||||
$this->header_path = readlink($this->header_path);
|
||||
if ($this->header_path[0] != '/' && $this->header_path[1] != ':')
|
||||
{
|
||||
$this->header_path = dirname(dirname(dirname(__FILE__))).'/'.$this->header_path;
|
||||
$this->header_path = dirname(dirname(__DIR__)).'/'.$this->header_path;
|
||||
}
|
||||
}
|
||||
$this->setup_header = new setup_header();
|
||||
@ -83,7 +83,7 @@ class setup_cmd_header extends setup_cmd
|
||||
{
|
||||
if ($this->sub_command != 'create')
|
||||
{
|
||||
throw new Api\Exception\WrongUserinput(lang('eGroupWare configuration file (header.inc.php) does NOT exist.')."\n".lang('Use --create-header to create the configuration file (--usage gives more options).'),1);
|
||||
throw new Api\Exception\WrongUserinput(lang('EGroupware configuration file (header.inc.php) does NOT exist.')."\n".lang('Use --create-header to create the configuration file (--usage gives more options).'),1);
|
||||
}
|
||||
$this->defaults(false);
|
||||
}
|
||||
@ -92,7 +92,7 @@ class setup_cmd_header extends setup_cmd
|
||||
if ($this->sub_command == 'create')
|
||||
{
|
||||
throw new Api\Exception\WrongUserinput(
|
||||
lang('eGroupWare configuration file header.inc.php already exists, you need to use --edit-header or delete it first!'),20);
|
||||
lang('EGroupware configuration file header.inc.php already exists, you need to use --edit-header or delete it first!'),20);
|
||||
}
|
||||
if ($this->arguments)
|
||||
{
|
||||
|
@ -65,7 +65,7 @@ class setup_header
|
||||
*/
|
||||
function defaults($domain='default')
|
||||
{
|
||||
$egw_root = realpath(dirname(__FILE__).'/../..');
|
||||
$egw_root = realpath(__DIR__.'/../..');
|
||||
$GLOBALS['egw_info']['server']['server_root'] = $GLOBALS['egw_info']['server']['include_root'] = $egw_root;
|
||||
define('EGW_SERVER_ROOT',$egw_root); // this is usally already defined by setup and cant be changed
|
||||
define('EGW_INCLUDE_ROOT',$egw_root);
|
||||
@ -113,9 +113,9 @@ class setup_header
|
||||
{
|
||||
$errors = null;
|
||||
|
||||
if (!is_dir($path) || !is_readable($path) || !is_dir($path.'/phpgwapi'))
|
||||
if (!is_dir($path) || !is_readable($path) || !is_dir($path.'/api'))
|
||||
{
|
||||
$errors[] = lang("%1 '%2' does NOT exist, is not readable by the webserver or contains no eGroupWare installation!",lang('Server root'),$path);
|
||||
$errors[] = lang("%1 '%2' does NOT exist, is not readable by the webserver or contains no EGroupware installation!",lang('Server root'),$path);
|
||||
}
|
||||
if(!$GLOBALS['egw_info']['server']['header_admin_password'])
|
||||
{
|
||||
@ -127,7 +127,7 @@ class setup_header
|
||||
}
|
||||
if (!is_array($GLOBALS['egw_domain']) || !count($GLOBALS['egw_domain']))
|
||||
{
|
||||
$errors[] = lang('You need to add at least one eGroupWare domain / database instance.');
|
||||
$errors[] = lang('You need to add at least one EGroupware domain / database instance.');
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -66,15 +66,15 @@ function lang($key,$vars=null)
|
||||
return $GLOBALS['egw_setup']->translation->translate("$key", $vars);
|
||||
}
|
||||
|
||||
if(file_exists(EGW_SERVER_ROOT.'/phpgwapi/setup/setup.inc.php'))
|
||||
if(file_exists(EGW_SERVER_ROOT.'/api/setup/setup.inc.php'))
|
||||
{
|
||||
include(EGW_SERVER_ROOT.'/phpgwapi/setup/setup.inc.php'); /* To set the current core version */
|
||||
include(EGW_SERVER_ROOT.'/api/setup/setup.inc.php'); /* To set the current core version */
|
||||
/* This will change to just use setup_info */
|
||||
$GLOBALS['egw_info']['server']['versions']['current_header'] = $setup_info['phpgwapi']['versions']['current_header'];
|
||||
$GLOBALS['egw_info']['server']['versions']['current_header'] = $setup_info['api']['versions']['current_header'];
|
||||
}
|
||||
else
|
||||
{
|
||||
$GLOBALS['egw_info']['server']['versions']['phpgwapi'] = 'Undetected';
|
||||
$GLOBALS['egw_info']['server']['versions']['api'] = 'Undetected';
|
||||
}
|
||||
|
||||
$GLOBALS['egw_info']['server']['app_images'] = 'templates/default/images';
|
||||
|
@ -6,7 +6,7 @@
|
||||
* @link http://www.egroupware.org
|
||||
* @package setup
|
||||
* @author Ralf Becker <RalfBecker-AT-outdoor-training.de>
|
||||
* @copyright (c) 2006-14 by Ralf Becker <RalfBecker-AT-outdoor-training.de>
|
||||
* @copyright (c) 2006-16 by Ralf Becker <RalfBecker-AT-outdoor-training.de>
|
||||
* @license http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License
|
||||
* @version $Id$
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user