mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-30 18:49:08 +01:00
202 lines
5.9 KiB
PHP
202 lines
5.9 KiB
PHP
<?php
|
|
/**************************************************************************\
|
|
* eGroupWare - Setup *
|
|
* http://www.egroupware.org *
|
|
* -------------------------------------------- *
|
|
* This program is free software; you can redistribute it and/or modify it *
|
|
* under the terms of the GNU General Public License as published by the *
|
|
* Free Software Foundation; either version 2 of the License, or (at your *
|
|
* option) any later version. *
|
|
\**************************************************************************/
|
|
|
|
/* $Id$ */
|
|
|
|
//$oProc->m_odb->Halt_On_Error = 'yes';
|
|
|
|
foreach(array(
|
|
'aa' => 'Afar',
|
|
'ab' => 'Abkhazian',
|
|
'af' => 'Afrikaans',
|
|
'am' => 'Amharic',
|
|
'ar' => 'Arabic',
|
|
'as' => 'Assamese',
|
|
'ay' => 'Aymara',
|
|
'az' => 'Azerbaijani',
|
|
'ba' => 'Bashkir',
|
|
'be' => 'Byelorussian',
|
|
'bg' => 'Bulgarian',
|
|
'bh' => 'Bihari',
|
|
'bi' => 'Bislama',
|
|
'bn' => 'Bengali / Bangla',
|
|
'bo' => 'Tibetan',
|
|
'br' => 'Breton',
|
|
'ca' => 'Catalan',
|
|
'co' => 'Corsican',
|
|
'cs' => 'Czech',
|
|
'cy' => 'Welsh',
|
|
'da' => 'Danish',
|
|
'de' => 'German',
|
|
'dz' => 'Bhutani',
|
|
'el' => 'Greek',
|
|
'en' => 'English / US',
|
|
'eo' => 'Esperanto',
|
|
'es-es' => 'Español',
|
|
'et' => 'Estonian',
|
|
'eu' => 'Basque',
|
|
'fa' => 'Persian',
|
|
'fi' => 'Finnish',
|
|
'fj' => 'Fiji',
|
|
'fo' => 'Faeroese',
|
|
'fr' => 'French',
|
|
'fy' => 'Frisian',
|
|
'ga' => 'Irish',
|
|
'gd' => 'Gaelic / Scots Gaelic',
|
|
'gl' => 'Galician',
|
|
'gn' => 'Guarani',
|
|
'gu' => 'Gujarati',
|
|
'ha' => 'Hausa',
|
|
'hi' => 'Hindi',
|
|
'hr' => 'Croatian',
|
|
'hu' => 'Hungarian',
|
|
'hy' => 'Armenian',
|
|
'ia' => 'Interlingua',
|
|
'ie' => 'Interlingue',
|
|
'ik' => 'Inupiak',
|
|
'in' => 'Indonesian',
|
|
'is' => 'Icelandic',
|
|
'it' => 'Italian',
|
|
'iw' => 'Hebrew',
|
|
'ja' => 'Japanese',
|
|
'ji' => 'Yiddish',
|
|
'jw' => 'Javanese',
|
|
'ka' => 'Georgian',
|
|
'kk' => 'Kazakh',
|
|
'kl' => 'Greenlandic',
|
|
'km' => 'Cambodian',
|
|
'kn' => 'Kannada',
|
|
'ko' => 'Korean',
|
|
'ks' => 'Kashmiri',
|
|
'ku' => 'Kurdish',
|
|
'ky' => 'Kirghiz',
|
|
'la' => 'Latin',
|
|
'ln' => 'Lingala',
|
|
'lo' => 'Laothian',
|
|
'lt' => 'Lithuanian',
|
|
'lv' => 'Latvian / Lettish',
|
|
'mg' => 'Malagasy',
|
|
'mi' => 'Maori',
|
|
'mk' => 'Macedonian',
|
|
'ml' => 'Malayalam',
|
|
'mn' => 'Mongolian',
|
|
'mo' => 'Moldavian',
|
|
'mr' => 'Marathi',
|
|
'ms' => 'Malay',
|
|
'mt' => 'Maltese',
|
|
'my' => 'Burmese',
|
|
'na' => 'Nauru',
|
|
'ne' => 'Nepali',
|
|
'nl' => 'Dutch',
|
|
'no' => 'Norwegian',
|
|
'oc' => 'Occitan',
|
|
'om' => 'Oromo / Afan',
|
|
'or' => 'Oriya',
|
|
'pa' => 'Punjabi',
|
|
'pl' => 'Polish',
|
|
'ps' => 'Pashto / Pushto',
|
|
'pt' => 'Portuguese',
|
|
'pt-br' => 'Brazil',
|
|
'qu' => 'Quechua',
|
|
'rm' => 'Rhaeto-Romance',
|
|
'rn' => 'Kirundi',
|
|
'ro' => 'Romanian',
|
|
'ru' => 'Russian',
|
|
'rw' => 'Kinyarwanda',
|
|
'sa' => 'Sanskrit',
|
|
'sd' => 'Sindhi',
|
|
'sg' => 'Sangro',
|
|
'sh' => 'Serbo-Croatian',
|
|
'si' => 'Singhalese',
|
|
'sk' => 'Slovak',
|
|
'sl' => 'Slovenian',
|
|
'sm' => 'Samoan',
|
|
'sn' => 'Shona',
|
|
'so' => 'Somali',
|
|
'sq' => 'Albanian',
|
|
'sr' => 'Serbian',
|
|
'ss' => 'Siswati',
|
|
'st' => 'Sesotho',
|
|
'su' => 'Sudanese',
|
|
'sv' => 'Swedish',
|
|
'sw' => 'Swahili',
|
|
'ta' => 'Tamil',
|
|
'te' => 'Tegulu',
|
|
'tg' => 'Tajik',
|
|
'th' => 'Thai',
|
|
'ti' => 'Tigrinya',
|
|
'tk' => 'Turkmen',
|
|
'tl' => 'Tagalog',
|
|
'tn' => 'Setswana',
|
|
'to' => 'Tonga',
|
|
'tr' => 'Turkish',
|
|
'ts' => 'Tsonga',
|
|
'tt' => 'Tatar',
|
|
'tw' => 'Twi',
|
|
'uk' => 'Ukrainian',
|
|
'ur' => 'Urdu',
|
|
'uz' => 'Uzbek',
|
|
'vi' => 'Vietnamese',
|
|
'vo' => 'Volapuk',
|
|
'wo' => 'Wolof',
|
|
'xh' => 'Xhosa',
|
|
'yo' => 'Yoruba',
|
|
'zh' => 'Chinese(simplified)',
|
|
'zh-tw' => 'Chinese(Taiwan)',
|
|
'zu' => 'Zulu',
|
|
) as $id => $name)
|
|
{
|
|
$oProc->insert($GLOBALS['egw_setup']->languages_table,array('lang_name' => $name),array('lang_id' => $id),__LINE__,__FILE__);
|
|
}
|
|
|
|
foreach(array(
|
|
'sessions_checkip' => 'True',
|
|
'image_type' => '1',
|
|
'asyncservice' => 'fallback',
|
|
) as $name => $value)
|
|
{
|
|
$oProc->insert($GLOBALS['egw_setup']->config_table,array(
|
|
'config_value' => $value,
|
|
),array(
|
|
'config_app' => 'phpgwapi',
|
|
'config_name' => $name,
|
|
),__LINE__,__FILE__);
|
|
}
|
|
|
|
$oProc->query("INSERT INTO egw_interserv(server_name,server_host,server_url,trust_level,trust_rel,server_mode) VALUES ('eGW demo',NULL,'http://www.egroupware.org/egroupware/xmlrpc.php',99,0,'xmlrpc')");
|
|
|
|
// insert the VFS basedir /home
|
|
$oProc->query ("INSERT INTO egw_vfs (vfs_owner_id, vfs_createdby_id, vfs_modifiedby_id, vfs_created, vfs_modified, vfs_size, vfs_mime_type, vfs_deleteable, vfs_comment, vfs_app, vfs_directory, vfs_name, vfs_link_directory, vfs_link_name) VALUES (0,0,0,'1970-01-01',NULL,NULL,'Directory','Y',NULL,NULL,'/','', NULL, NULL)");
|
|
$oProc->query ("INSERT INTO egw_vfs (vfs_owner_id, vfs_createdby_id, vfs_modifiedby_id, vfs_created, vfs_modified, vfs_size, vfs_mime_type, vfs_deleteable, vfs_comment, vfs_app, vfs_directory, vfs_name, vfs_link_directory, vfs_link_name) VALUES (0,0,0,'1970-01-01',NULL,NULL,'Directory','Y',NULL,NULL,'/','home', NULL, NULL)");
|
|
|
|
// Create Addressbook for Default group, by setting a group ACL from the group to itself for all rights: add, read, edit and delete
|
|
$defaultgroup = $GLOBALS['egw_setup']->add_account('Default','Default','Group',False,False);
|
|
$GLOBALS['egw_setup']->add_acl('addressbook',$defaultgroup,$defaultgroup,1|2|4|8);
|
|
|
|
/*************************************************************************\
|
|
* Default Records for VFS v2 *
|
|
\*************************************************************************/
|
|
if ($GLOBALS['DEBUG'])
|
|
{
|
|
echo "<br>\n<b>initiating to create the default records for VFS SQL2...";
|
|
}
|
|
|
|
include EGW_INCLUDE_ROOT.'/phpgwapi/setup/default_records_mime.inc.php';
|
|
|
|
$oProc->query("INSERT INTO phpgw_vfs2_files (mime_id,owner_id,createdby_id,size,directory,name)
|
|
SELECT mime_id,0,0,4096,'/','' FROM phpgw_vfs2_mimetypes WHERE mime='Directory'");
|
|
|
|
if ($GLOBALS['DEBUG'])
|
|
{
|
|
echo " DONE!</b>";
|
|
}
|
|
/*************************************************************************/
|