mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-01-13 17:38:19 +01:00
fixed not working --config (after last changes) and added output of (basic) current config
This commit is contained in:
parent
ecae41f156
commit
478c9ab8e2
@ -99,7 +99,7 @@
|
|||||||
|
|
||||||
function setup_translation_sql()
|
function setup_translation_sql()
|
||||||
{
|
{
|
||||||
if (!is_object($this->sql))
|
if (!is_object($this->sql) || is_object($GLOBALS['egw_setup']->db) && !is_object($this->sql->db))
|
||||||
{
|
{
|
||||||
include_once(EGW_API_INC.'/class.translation.inc.php');
|
include_once(EGW_API_INC.'/class.translation.inc.php');
|
||||||
$this->sql =& new translation;
|
$this->sql =& new translation;
|
||||||
|
@ -118,6 +118,7 @@ completed setup de Abgeschlossen
|
|||||||
config password setup de Konfigurationspasswort
|
config password setup de Konfigurationspasswort
|
||||||
config username setup de Konfigurationsbenutzername
|
config username setup de Konfigurationsbenutzername
|
||||||
configuration setup de Konfiguration
|
configuration setup de Konfiguration
|
||||||
|
configuration changed. setup de Konfiguration geändert.
|
||||||
configuration completed setup de Konfiguration abgeschlossen
|
configuration completed setup de Konfiguration abgeschlossen
|
||||||
configuration errors: setup de Fehler in der Konfiguration;
|
configuration errors: setup de Fehler in der Konfiguration;
|
||||||
configuration password setup de Konfigurationspasswort
|
configuration password setup de Konfigurationspasswort
|
||||||
@ -145,6 +146,7 @@ created setup de erzeugt
|
|||||||
created header.inc.php! setup de header.inc.php erzeugt!
|
created header.inc.php! setup de header.inc.php erzeugt!
|
||||||
creates an admin user: domain(default),[config user(admin)],password,username,password,[first name],[last name],[email] setup de anlegen eines Administrator Benutzers: Domain(default),[Konfigurationsbenutzer(admin)],Passwort,Benutzername,Passwort,[Vorname],[Nachname],[Email Adresse]
|
creates an admin user: domain(default),[config user(admin)],password,username,password,[first name],[last name],[email] setup de anlegen eines Administrator Benutzers: Domain(default),[Konfigurationsbenutzer(admin)],Passwort,Benutzername,Passwort,[Vorname],[Nachname],[Email Adresse]
|
||||||
creating tables setup de Erstelle Tabellen
|
creating tables setup de Erstelle Tabellen
|
||||||
|
current configuration: setup de Aktuelle Konfiguration:
|
||||||
current system-charset setup de Aktueller Systemzeichensatz
|
current system-charset setup de Aktueller Systemzeichensatz
|
||||||
current system-charset is %1. setup de Aktueller Systemzeichensatz ist %1.
|
current system-charset is %1. setup de Aktueller Systemzeichensatz ist %1.
|
||||||
current version setup de Gegenwärtige Version
|
current version setup de Gegenwärtige Version
|
||||||
@ -542,7 +544,7 @@ unfortunally some php/apache packages have problems with it (apache dies and you
|
|||||||
uninstall setup de deinstaliert
|
uninstall setup de deinstaliert
|
||||||
uninstall all applications setup de Alle Anwendungen deinstallieren
|
uninstall all applications setup de Alle Anwendungen deinstallieren
|
||||||
uninstalled setup de nicht installiert
|
uninstalled setup de nicht installiert
|
||||||
unknow option '%1' !!! setup de Unbekannte Option '%1' !!!
|
unknown option '%1' !!! setup de Unbekannte Option '%1' !!!
|
||||||
update finished. setup de Aktualisierung beendet.
|
update finished. setup de Aktualisierung beendet.
|
||||||
upgrade setup de Aktualisieren
|
upgrade setup de Aktualisieren
|
||||||
upgrade all setup de Alle Aktualiseren
|
upgrade all setup de Alle Aktualiseren
|
||||||
|
@ -118,6 +118,7 @@ completed setup en Completed
|
|||||||
config password setup en Config Password
|
config password setup en Config Password
|
||||||
config username setup en Config Username
|
config username setup en Config Username
|
||||||
configuration setup en Configuration
|
configuration setup en Configuration
|
||||||
|
configuration changed. setup en Configuration changed.
|
||||||
configuration completed setup en Configuration completed
|
configuration completed setup en Configuration completed
|
||||||
configuration errors: setup en Configuration errors:
|
configuration errors: setup en Configuration errors:
|
||||||
configuration password setup en Configuration Password
|
configuration password setup en Configuration Password
|
||||||
@ -145,6 +146,7 @@ created setup en created
|
|||||||
created header.inc.php! setup en Created header.inc.php!
|
created header.inc.php! setup en Created header.inc.php!
|
||||||
creates an admin user: domain(default),[config user(admin)],password,username,password,[first name],[last name],[email] setup en creates an admin user: domain(default),[config user(admin)],password,username,password,[first name],[last name],[email]
|
creates an admin user: domain(default),[config user(admin)],password,username,password,[first name],[last name],[email] setup en creates an admin user: domain(default),[config user(admin)],password,username,password,[first name],[last name],[email]
|
||||||
creating tables setup en Creating Tables
|
creating tables setup en Creating Tables
|
||||||
|
current configuration: setup en Current configuration:
|
||||||
current system-charset setup en Current system-charset
|
current system-charset setup en Current system-charset
|
||||||
current system-charset is %1. setup en Current system-charset is %1.
|
current system-charset is %1. setup en Current system-charset is %1.
|
||||||
current version setup en Current Version
|
current version setup en Current Version
|
||||||
@ -540,7 +542,7 @@ unfortunally some php/apache packages have problems with it (apache dies and you
|
|||||||
uninstall setup en uninstall
|
uninstall setup en uninstall
|
||||||
uninstall all applications setup en Uninstall all applications
|
uninstall all applications setup en Uninstall all applications
|
||||||
uninstalled setup en uninstalled
|
uninstalled setup en uninstalled
|
||||||
unknow option '%1' !!! setup en Unknow option '%1' !!!
|
unknown option '%1' !!! setup en Unknown option '%1' !!!
|
||||||
update finished. setup en Update finished.
|
update finished. setup en Update finished.
|
||||||
upgrade setup en Upgrade
|
upgrade setup en Upgrade
|
||||||
upgrade all setup en Upgrade All
|
upgrade all setup en Upgrade All
|
||||||
|
@ -98,7 +98,7 @@ switch($action)
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
fail(90,lang("Unknows option '%1' !!!",$action));
|
fail(90,lang("Unknown option '%1' !!!",$action));
|
||||||
}
|
}
|
||||||
exit(0);
|
exit(0);
|
||||||
|
|
||||||
@ -133,7 +133,7 @@ function do_config($args)
|
|||||||
);
|
);
|
||||||
while (($arg = array_shift($args)))
|
while (($arg = array_shift($args)))
|
||||||
{
|
{
|
||||||
if (!isset($config[$arg])) fail(90,lang("Unknow option '%1' !!!",$arg));
|
if (!isset($config[$arg])) fail(90,lang("Unknown option '%1' !!!",$arg));
|
||||||
|
|
||||||
foreach(explode(',',array_shift($args)) as $n => $value)
|
foreach(explode(',',array_shift($args)) as $n => $value)
|
||||||
{
|
{
|
||||||
@ -157,6 +157,19 @@ function do_config($args)
|
|||||||
'config_name' => $name,
|
'config_name' => $name,
|
||||||
),__LINE__,__FILE__);
|
),__LINE__,__FILE__);
|
||||||
}
|
}
|
||||||
|
if (count($values))
|
||||||
|
{
|
||||||
|
echo lang('Configuration changed.')."\n";
|
||||||
|
}
|
||||||
|
echo lang('Current configuration:')."\n";
|
||||||
|
$GLOBALS['egw_setup']->db->select($GLOBALS['egw_setup']->config_table,'config_name,config_value',array(
|
||||||
|
'config_app' => 'phpgwapi',
|
||||||
|
"config_name LIKE '%\\_dir' OR (config_name LIKE 'mail%' AND config_name != 'mail_footer') OR config_name LIKE 'smtp%' OR config_name IN ('webserver_url','system_charset')",
|
||||||
|
),__LINE__,__FILE__);
|
||||||
|
while (($row = $GLOBALS['egw_setup']->db->row(true)))
|
||||||
|
{
|
||||||
|
echo $row['config_name'].': '.$row['config_value']."\n";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -283,7 +296,7 @@ function do_lang($arg)
|
|||||||
{
|
{
|
||||||
global $setup_info;
|
global $setup_info;
|
||||||
|
|
||||||
list($domain,,,$no_backup) = $options = explode(',',$arg);
|
list($domain) = $options = explode(',',$arg);
|
||||||
|
|
||||||
$domains = $GLOBALS['egw_domain'];
|
$domains = $GLOBALS['egw_domain'];
|
||||||
if ($domain && $domain != 'all')
|
if ($domain && $domain != 'all')
|
||||||
@ -295,7 +308,7 @@ function do_lang($arg)
|
|||||||
$options[0] = $domain;
|
$options[0] = $domain;
|
||||||
$arg = implode(',',$options);
|
$arg = implode(',',$options);
|
||||||
|
|
||||||
$langs = _check_auth_config($arg,15);
|
$langs = _check_auth_config($arg,15,false); // false = leave eGW's charset, dont set ours!!!
|
||||||
|
|
||||||
$GLOBALS['egw_setup']->translation->setup_translation_sql();
|
$GLOBALS['egw_setup']->translation->setup_translation_sql();
|
||||||
|
|
||||||
@ -335,9 +348,10 @@ function do_lang($arg)
|
|||||||
*
|
*
|
||||||
* @param string $arg [domain(default)],[user(admin)],password
|
* @param string $arg [domain(default)],[user(admin)],password
|
||||||
* @param int $stop see do_check()
|
* @param int $stop see do_check()
|
||||||
|
* @param boolean $set_lang=true set our charset, overwriting the charset of the eGW installation, default true
|
||||||
* @return array with unprocessed arguments from $arg
|
* @return array with unprocessed arguments from $arg
|
||||||
*/
|
*/
|
||||||
function _check_auth_config($arg,$stop=15)
|
function _check_auth_config($arg,$stop,$set_lang=true)
|
||||||
{
|
{
|
||||||
$options = explode(',',$arg);
|
$options = explode(',',$arg);
|
||||||
if (!($domain = array_shift($options))) $domain = 'default';
|
if (!($domain = array_shift($options))) $domain = 'default';
|
||||||
@ -352,6 +366,9 @@ function _check_auth_config($arg,$stop=15)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
do_check($domain,$stop); // check if eGW is installed
|
do_check($domain,$stop); // check if eGW is installed
|
||||||
|
|
||||||
|
// reset charset for the output to the charset used by the OS
|
||||||
|
if ($set_lang) $GLOBALS['egw_setup']->system_charset = $GLOBALS['charset'];
|
||||||
|
|
||||||
//echo "check_auth('$user','$password','{$GLOBALS['egw_domain'][$domain]['config_user']}','{$GLOBALS['egw_domain'][$domain]['config_passwd']}')\n";
|
//echo "check_auth('$user','$password','{$GLOBALS['egw_domain'][$domain]['config_user']}','{$GLOBALS['egw_domain'][$domain]['config_passwd']}')\n";
|
||||||
if (!$GLOBALS['egw_setup']->check_auth($user,$password,$GLOBALS['egw_domain'][$domain]['config_user'],
|
if (!$GLOBALS['egw_setup']->check_auth($user,$password,$GLOBALS['egw_domain'][$domain]['config_user'],
|
||||||
@ -422,7 +439,7 @@ function do_check($domain='',$stop=0)
|
|||||||
{
|
{
|
||||||
global $setup_info;
|
global $setup_info;
|
||||||
static $header_checks=true; // output the header checks only once
|
static $header_checks=true; // output the header checks only once
|
||||||
|
|
||||||
if ($stop && !is_array($stop)) $stop = array($stop);
|
if ($stop && !is_array($stop)) $stop = array($stop);
|
||||||
|
|
||||||
$versions =& $GLOBALS['egw_info']['server']['versions'];
|
$versions =& $GLOBALS['egw_info']['server']['versions'];
|
||||||
@ -518,7 +535,7 @@ function do_check($domain='',$stop=0)
|
|||||||
echo lang("database is version %1 and up to date.",$setup_info['phpgwapi']['currentver'])."\n";
|
echo lang("database is version %1 and up to date.",$setup_info['phpgwapi']['currentver'])."\n";
|
||||||
|
|
||||||
$GLOBALS['egw_setup']->detection->check_config();
|
$GLOBALS['egw_setup']->detection->check_config();
|
||||||
if ($GLOBALS['egw_info']['setup']['config_errors'] && $stop != 15)
|
if ($GLOBALS['egw_info']['setup']['config_errors'] && !in_array(15,$stop))
|
||||||
{
|
{
|
||||||
fail(15,lang('You need to configure eGroupWare:')."\n- ".@implode("\n- ",$GLOBALS['egw_info']['setup']['config_errors']));
|
fail(15,lang('You need to configure eGroupWare:')."\n- ".@implode("\n- ",$GLOBALS['egw_info']['setup']['config_errors']));
|
||||||
}
|
}
|
||||||
@ -639,7 +656,7 @@ function do_header($create,&$arguments)
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!isset($options[$arg])) fail(90,lang("Unknow option '%1' !!!",$arg));
|
if (!isset($options[$arg])) fail(90,lang("Unknown option '%1' !!!",$arg));
|
||||||
|
|
||||||
$option = $options[$arg];
|
$option = $options[$arg];
|
||||||
$values = !is_array($option) ? array($values) : explode(',',$values);
|
$values = !is_array($option) ? array($values) : explode(',',$values);
|
||||||
@ -734,7 +751,7 @@ function _set_value(&$arr,$index,$name,$value)
|
|||||||
*/
|
*/
|
||||||
function get_lang(&$charset)
|
function get_lang(&$charset)
|
||||||
{
|
{
|
||||||
list($lang,$nation,$charset) = split("[_.]",strtolower($_SERVER['LANG']));
|
@list($lang,$nation,$charset) = split("[_.]",strtolower($_SERVER['LANG']));
|
||||||
|
|
||||||
foreach(file('lang/languages') as $line)
|
foreach(file('lang/languages') as $line)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user