Author: ralfbecker
New Revision: 55604
URL: http://svn.stylite.de/viewvc/egroupware?rev=55604&view=rev
Log:
move all tables to new api and update api to 16.1
Added:
trunk/egroupware/api/setup/tables_current.inc.php
- copied, changed from r55603, trunk/phpgwapi/setup/tables_current.inc.php
trunk/egroupware/doc/mail/
- copied from r55599, trunk/emailadmin/doc/
Removed:
trunk/admin/inc/hook_deleteaccount.inc.php
trunk/admin/inc/hook_topmenu_info.inc.php
trunk/emailadmin/doc/
trunk/emailadmin/inc/
trunk/emailadmin/js/
trunk/emailadmin/lang/
trunk/emailadmin/setup/
trunk/emailadmin/templates/
trunk/emailadmin/test.php
trunk/phpgwapi/inc/class.egw_index.inc.php
Modified:
trunk/calendar/sitemgr/class.module_calendar_month.inc.php
trunk/egroupware/api/setup/setup.inc.php
trunk/egroupware/api/src/Config.php
trunk/egroupware/api/src/Contacts/Sql.php
trunk/egroupware/api/src/Contacts/Storage.php
trunk/egroupware/api/src/Db.php
trunk/egroupware/api/src/Db/Backup.php
trunk/egroupware/api/src/Hooks.php
trunk/egroupware/api/src/Storage/Base.php
trunk/egroupware/doc/fix_api.php
trunk/egroupware/doc/rpm-build/post_install.php
trunk/infolog/inc/class.infolog_so.inc.php
trunk/mail/setup/setup.inc.php
trunk/phpgwapi/inc/class.egw.inc.php
trunk/phpgwapi/setup/setup.inc.php
trunk/phpgwapi/setup/tables_current.inc.php
trunk/phpgwapi/setup/tables_update.inc.php
trunk/setup/applications.php
trunk/setup/config.php
trunk/setup/inc/class.setup.inc.php
trunk/setup/inc/class.setup_detection.inc.php
trunk/setup/inc/class.setup_process.inc.php
trunk/setup/index.php
trunk/tracker/setup/setup.inc.php
— trunk/calendar/sitemgr/class.module_calendar_month.inc.php (original)
+++ trunk/calendar/sitemgr/class.module_calendar_month.inc.php Sat Apr 2 21:55:08 2016
@@ -154,11 +154,8 @@
$site_urls[] = ($_SERVER[‘HTTPS’] ? ‘https://’ : ‘http://’) . $_SERVER[‘SERVER_ADDR’] . $sitemgr_path;
$site_urls[] = $site_url = ($_SERVER[‘HTTPS’] ? ‘https://’ : ‘http://’) . $_SERVER[‘SERVER_NAME’] . $sitemgr_path;
-
$GLOBALS['egw']->db->select('egw_sitemgr_sites','anonymous_user,anonymous_passwd,site_id',
-
array('site_url' => $site_urls),__LINE__,__FILE__,false,'','sitemgr');
-
-
$GLOBALS['egw']->db->next_record();
-
$anon_user = $this->accounts->name2id($GLOBALS['egw']->db->f('anonymous_user'),'account_lid','u');
-
$anon_user = $this->accounts->name2id($GLOBALS['egw']->db->select('egw_sitemgr_sites','anonymous_user,anonymous_passwd,site_id',
-
array('site_url' => $site_urls),__LINE__,__FILE__,false,'','sitemgr')->fetchColumn(),'account_lid','u');
}
$anon_groups = $this->accounts->memberships($anon_user,true);
— trunk/egroupware/api/setup/setup.inc.php (original)
+++ trunk/egroupware/api/setup/setup.inc.php Sat Apr 2 21:55:08 2016
@@ -12,7 +12,7 @@
/* Basic information about this app */
$setup_info[‘api’][‘name’] = ‘api’;
$setup_info[‘api’][‘title’] = ‘EGroupware API’;
-$setup_info[‘api’][‘version’] = ‘14.3.907’;
+$setup_info[‘api’][‘version’] = ‘16.1’;
$setup_info[‘api’][‘versions’][‘current_header’] = ‘1.29’;
$setup_info[‘api’][‘enable’] = 3;
$setup_info[‘api’][‘app_order’] = 1;
@@ -22,7 +22,7 @@
‘email’ => ‘egroupware-developers@lists.sourceforge.net’,
);
-/* The tables this app creates
+// The tables this app creates
$setup_info[‘api’][‘tables’][] = ‘egw_config’;
$setup_info[‘api’][‘tables’][] = ‘egw_applications’;
$setup_info[‘api’][‘tables’][] = ‘egw_acl’;
@@ -31,7 +31,6 @@
$setup_info[‘api’][‘tables’][] = ‘egw_access_log’;
$setup_info[‘api’][‘tables’][] = ‘egw_languages’;
$setup_info[‘api’][‘tables’][] = ‘egw_lang’;
-$setup_info[‘api’][‘tables’][] = ‘egw_nextid’;
$setup_info[‘api’][‘tables’][] = ‘egw_categories’;
$setup_info[‘api’][‘tables’][] = ‘egw_history_log’;
$setup_info[‘api’][‘tables’][] = ‘egw_async’;
@@ -45,7 +44,13 @@
$setup_info[‘api’][‘tables’][] = ‘egw_sqlfs_props’;
$setup_info[‘api’][‘tables’][] = ‘egw_customfields’;
$setup_info[‘api’][‘tables’][] = ‘egw_sharing’;
-*/
+$setup_info[‘api’][‘tables’][] = ‘egw_mailaccounts’;
+$setup_info[‘api’][‘tables’][] = ‘egw_ea_accounts’;
+$setup_info[‘api’][‘tables’][] = ‘egw_ea_credentials’;
+$setup_info[‘api’][‘tables’][] = ‘egw_ea_identities’;
+$setup_info[‘api’][‘tables’][] = ‘egw_ea_valid’;
+$setup_info[‘api’][‘tables’][] = ‘egw_ea_notifications’;
+
// hooks used by vfs_home_hooks to manage user- and group-directories for the new stream based VFS
$setup_info[‘api’][‘hooks’][‘addaccount’] = array(‘EGroupware\Api\Vfs\Hooks::addAccount’, ‘EGroupware\Api\Mail\Hooks::addaccount’);
$setup_info[‘api’][‘hooks’][‘deleteaccount’] = array(‘EGroupware\Api\Vfs\Hooks::deleteAccount’, ‘EGroupware\Api\Mail\Hooks::deleteaccount’);
@@ -59,52 +64,52 @@
$setup_info[‘api’][‘check_install’] = array(
’’ => array(
‘func’ => ‘pear_check’,
-
'from' => 'Api/Mail',
),
);
— trunk/phpgwapi/setup/tables_current.inc.php (original)
+++ trunk/egroupware/api/setup/tables_current.inc.php Sat Apr 2 21:55:08 2016
@@ -332,41 +332,6 @@
‘ix’ => array(array(‘fs_dir’,‘fs_active’,‘fs_name(16)’)),
‘uc’ => array()
),
- ‘egw_index_keywords’ => array(
-
'fd' => array(
-
'si_id' => array('type' => 'auto','nullable' => False),
-
'si_keyword' => array('type' => 'varchar','precision' => '64','nullable' => False),
-
'si_ignore' => array('type' => 'bool')
-
),
-
'pk' => array('si_id'),
-
'fk' => array(),
-
'ix' => array(),
-
'uc' => array('si_keyword')
- ),
- ‘egw_index’ => array(
-
'fd' => array(
-
'si_app' => array('type' => 'varchar','precision' => '25','nullable' => False),
-
'si_app_id' => array('type' => 'varchar','precision' => '50','nullable' => False),
-
'si_id' => array('type' => 'int','precision' => '4','nullable' => False),
-
'si_owner' => array('type' => 'int','meta' => 'account','precision' => '4','nullable' => False)
-
),
-
'pk' => array('si_app','si_app_id','si_id'),
-
'fk' => array(),
-
'ix' => array('si_id'),
-
'uc' => array()
- ),
- ‘egw_cat2entry’ => array(
-
'fd' => array(
-
'ce_app' => array('type' => 'varchar','precision' => '25','nullable' => False),
-
'ce_app_id' => array('type' => 'varchar','precision' => '50','nullable' => False),
-
'cat_id' => array('type' => 'int','meta' => 'category','precision' => '4','nullable' => False),
-
'ce_owner' => array('type' => 'int','meta' => 'account','precision' => '4','nullable' => False)
-
),
-
'pk' => array('ce_app','ce_app_id','cat_id'),
-
'fk' => array(),
-
'ix' => array('cat_id'),
-
'uc' => array()
- ),
‘egw_locks’ => array(
‘fd’ => array(
‘lock_token’ => array(‘type’ => ‘ascii’,‘precision’ => ‘64’,‘nullable’ => False),
@@ -439,5 +404,108 @@
‘fk’ => array(),
‘ix’ => array(),
‘uc’ => array(‘share_token’)
- )
- ),
- ‘egw_mailaccounts’ => array(
-
'fd' => array(
-
'mail_id' => array('type' => 'auto','nullable' => False,'comment' => 'the id'),
-
'account_id' => array('type' => 'int','meta' => 'account','precision' => '4','nullable' => False,'comment' => 'account id of the owner, can be user AND group'),
-
'mail_type' => array('type' => 'int','precision' => '1','nullable' => False,'comment' => '0=active, 1=alias, 2=forward, 3=forwardOnly, 4=quota'),
-
'mail_value' => array('type' => 'ascii','precision' => '128','nullable' => False,'comment' => 'the value (that should be) corresponding to the mail_type')
-
),
-
'pk' => array('mail_id'),
-
'fk' => array(),
-
'ix' => array('mail_value',array('account_id','mail_type')),
-
'uc' => array()
- ),
- ‘egw_ea_accounts’ => array(
-
'fd' => array(
-
'acc_id' => array('type' => 'auto','nullable' => False),
-
'acc_name' => array('type' => 'varchar','precision' => '80','comment' => 'description'),
-
'ident_id' => array('type' => 'int','precision' => '4','nullable' => False,'comment' => 'standard identity'),
-
'acc_imap_host' => array('type' => 'ascii','precision' => '128','nullable' => False,'comment' => 'imap hostname'),
-
'acc_imap_ssl' => array('type' => 'int','precision' => '1','nullable' => False,'default' => '0','comment' => '0=none, 1=starttls, 2=tls, 3=ssl, &8=validate certificate'),
-
'acc_imap_port' => array('type' => 'int','precision' => '4','nullable' => False,'default' => '143','comment' => 'imap port'),
-
'acc_sieve_enabled' => array('type' => 'bool','default' => '0','comment' => 'sieve enabled'),
-
'acc_sieve_host' => array('type' => 'ascii','precision' => '128','comment' => 'sieve host, default imap_host'),
-
'acc_sieve_port' => array('type' => 'int','precision' => '4','default' => '4190'),
-
'acc_folder_sent' => array('type' => 'varchar','precision' => '128','comment' => 'sent folder'),
-
'acc_folder_trash' => array('type' => 'varchar','precision' => '128','comment' => 'trash folder'),
-
'acc_folder_draft' => array('type' => 'varchar','precision' => '128','comment' => 'draft folder'),
-
'acc_folder_template' => array('type' => 'varchar','precision' => '128','comment' => 'template folder'),
-
'acc_smtp_host' => array('type' => 'varchar','precision' => '128','comment' => 'smtp hostname'),
-
'acc_smtp_ssl' => array('type' => 'int','precision' => '1','nullable' => False,'default' => '0','comment' => '0=none, 1=starttls, 2=tls, 3=ssl, &8=validate certificate'),
-
'acc_smtp_port' => array('type' => 'int','precision' => '4','nullable' => False,'default' => '25','comment' => 'smtp port'),
-
'acc_smtp_type' => array('type' => 'ascii','precision' => '32','default' => 'emailadmin_smtp','comment' => 'smtp class to use'),
-
'acc_imap_type' => array('type' => 'ascii','precision' => '32','default' => 'emailadmin_imap','comment' => 'imap class to use'),
-
'acc_imap_logintype' => array('type' => 'ascii','precision' => '20','comment' => 'standard, vmailmgr, admin, uidNumber'),
-
'acc_domain' => array('type' => 'varchar','precision' => '100','comment' => 'domain name'),
-
'acc_further_identities' => array('type' => 'bool','nullable' => False,'default' => '1','comment' => '0=no, 1=yes'),
-
'acc_user_editable' => array('type' => 'bool','nullable' => False,'default' => '1','comment' => '0=no, 1=yes'),
-
'acc_sieve_ssl' => array('type' => 'int','precision' => '1','default' => '1','comment' => '0=none, 1=starttls, 2=tls, 3=ssl, &8=validate certificate'),
-
'acc_modified' => array('type' => 'timestamp','nullable' => False,'default' => 'current_timestamp'),
-
'acc_modifier' => array('type' => 'int','meta' => 'user','precision' => '4'),
-
'acc_smtp_auth_session' => array('type' => 'bool','comment' => '0=no, 1=yes, use username/pw from current user'),
-
'acc_folder_junk' => array('type' => 'varchar','precision' => '128','comment' => 'junk folder'),
-
'acc_imap_default_quota' => array('type' => 'int','precision' => '4','comment' => 'default quota, if no user specific one set'),
-
'acc_imap_timeout' => array('type' => 'int','precision' => '2','comment' => 'timeout for imap connection'),
-
'acc_user_forward' => array('type' => 'bool','default' => '0','comment' => 'allow user to define forwards')
-
),
-
'pk' => array('acc_id'),
-
'fk' => array(),
-
'ix' => array(),
-
'uc' => array()
- ),
- ‘egw_ea_credentials’ => array(
-
'fd' => array(
-
'cred_id' => array('type' => 'auto','nullable' => False),
-
'acc_id' => array('type' => 'int','precision' => '4','nullable' => False,'comment' => 'into egw_ea_accounts'),
-
'cred_type' => array('type' => 'int','precision' => '1','nullable' => False,'comment' => '&1=imap, &2=smtp, &4=admin'),
-
'account_id' => array('type' => 'int','meta' => 'user','precision' => '4','nullable' => False,'comment' => 'account_id or 0=all'),
-
'cred_username' => array('type' => 'varchar','precision' => '80','nullable' => False,'comment' => 'username'),
-
'cred_password' => array('type' => 'varchar','precision' => '80','comment' => 'password encrypted'),
-
'cred_pw_enc' => array('type' => 'int','precision' => '1','default' => '0','comment' => '0=not, 1=user pw, 2=system')
-
),
-
'pk' => array('cred_id'),
-
'fk' => array(),
-
'ix' => array(),
-
'uc' => array(array('acc_id','account_id','cred_type'))
- ),
- ‘egw_ea_identities’ => array(
-
'fd' => array(
-
'ident_id' => array('type' => 'auto','nullable' => False),
-
'acc_id' => array('type' => 'int','precision' => '4','nullable' => False,'comment' => 'for which account'),
-
'ident_realname' => array('type' => 'varchar','precision' => '128','nullable' => False,'comment' => 'real name'),
-
'ident_email' => array('type' => 'varchar','precision' => '128','comment' => 'email address'),
-
'ident_org' => array('type' => 'varchar','precision' => '128','comment' => 'organisation'),
-
'ident_signature' => array('type' => 'text','comment' => 'signature text'),
-
'account_id' => array('type' => 'int','meta' => 'account','precision' => '4','nullable' => False,'default' => '0','comment' => '0=all users of give mail account'),
-
'ident_name' => array('type' => 'varchar','precision' => '128','comment' => 'name of identity to display')
-
),
-
'pk' => array('ident_id'),
-
'fk' => array(),
-
'ix' => array(),
-
'uc' => array()
- ),
- ‘egw_ea_valid’ => array(
-
'fd' => array(
-
'acc_id' => array('type' => 'int','precision' => '4','nullable' => False),
-
'account_id' => array('type' => 'int','meta' => 'account','precision' => '4','nullable' => False)
-
),
-
'pk' => array(),
-
'fk' => array(),
-
'ix' => array(array('account_id','acc_id')),
-
'uc' => array(array('acc_id','account_id'))
- ),
- ‘egw_ea_notifications’ => array(
-
'fd' => array(
-
'notif_id' => array('type' => 'auto','nullable' => False),
-
'acc_id' => array('type' => 'int','precision' => '4','nullable' => False,'comment' => 'mail account'),
-
'account_id' => array('type' => 'int','meta' => 'user','precision' => '4','nullable' => False,'comment' => 'user account'),
-
'notif_folder' => array('type' => 'varchar','precision' => '255','nullable' => False,'comment' => 'folder name')
-
),
-
'pk' => array('notif_id'),
-
'fk' => array(),
-
'ix' => array(array('account_id','acc_id')),
-
'uc' => array()
- ),
);
— trunk/egroupware/api/src/Config.php (original)
+++ trunk/egroupware/api/src/Config.php Sat Apr 2 21:55:08 2016
@@ -86,7 +86,6 @@
{
if (is_array($this->config_data))
{
-
self::$db->lock(array(config::TABLE));
foreach($this->config_data as $name => $value)
{
self::save_value($name, $value, $this->appname, false);
@@ -99,7 +98,6 @@
//self::$db->delete(config::TABLE,array(‘config_app’=>$this->appname,‘config_name’=>$name),LINE,FILE);
}
}
— trunk/egroupware/api/src/Contacts/Sql.php (original)
+++ trunk/egroupware/api/src/Contacts/Sql.php Sat Apr 2 21:55:08 2016
@@ -15,9 +15,6 @@
use EGroupware\Api;
-// explicitly reference classes still in phpgwapi
-use common; // common::generate_uid
/**
- Contacts - SQL storage
*/
@@ -72,10 +69,10 @@
*/
function __construct(Api\Db $db=null)
{
-
parent::__construct('api', 'egw_addressbook', self::EXTRA_TABLE,
'contact_', '_name', '_value', '_id', $db);
@@ -599,7 +596,7 @@
$update = array();
if (!isset($data[‘list_uid’]))
{
@@ -766,7 +763,7 @@
// enforce a minium uid strength
if (is_array($contact) && (!isset($contact[‘uid’])
>> strlen($contact[‘uid’]) < $minimum_uid_length)) {
-
$update['uid'] = Api\CalDAV::generate_uid('addressbook',$this->data['id']);
//echo "<p>set uid={$this->data['uid']}, etag={$this->data['etag']}</p>";
}
// set carddav_name, if not given by caller
— trunk/egroupware/api/src/Contacts/Storage.php (original)
+++ trunk/egroupware/api/src/Contacts/Storage.php Sat Apr 2 21:55:08 2016
@@ -263,8 +263,8 @@
}
if ($this->contact_repository == ‘sql’ || $this->contact_repository == ‘sql-ldap’)
{
-
$tda2list = $this->db->get_table_definitions('phpgwapi','egw_addressbook2list');
-
$tdlists = $this->db->get_table_definitions('phpgwapi','egw_addressbook_lists');
-
$tda2list = $this->db->get_table_definitions('api','egw_addressbook2list');
-
$tdlists = $this->db->get_table_definitions('api','egw_addressbook_lists');
$this->distributionlist_tabledef = array('fd' => array(
$this->distri_id => $tda2list['fd'][$this->distri_id],
$this->distri_owner => $tdlists['fd'][$this->distri_owner],
@@ -872,7 +872,7 @@
*/
function get_fields($type=‘all’,$contact_id=null,$owner=null)
{
— trunk/egroupware/api/src/Db.php (original)
+++ trunk/egroupware/api/src/Db.php Sat Apr 2 21:55:08 2016
@@ -992,11 +992,10 @@
echo “
db::index_names() not yet implemented for db-type ‘$this->Type’
\n”;
return $indices;
}
@@ -1541,7 +1540,7 @@
* Application name used by the API
*
*/
- const API_APPNAME = ‘phpgwapi’;
- const API_APPNAME = ‘api’;
/**
- Default app, if no app specified in select, insert, delete, …
-
@@ -1559,6 +1558,9 @@
*/
function set_app($app)
{
-
// ease the transition to api
-
if ($app == 'phpgwapi') $app = 'api';
-
if ($this === $GLOBALS['egw']->db && $app != self::API_APPNAME)
{
// prevent that anyone switches the global db object to an other app
@@ -1581,6 +1583,9 @@
*/
function get_table_definitions($app=False,$table=False)
{
-
// ease the transition to api
-
if ($app === 'phpgwapi') $app = 'api';
-
static $all_app_data = array();
if ($app === true && $table)
{
@@ -1710,8 +1715,7 @@
}
// fall through !!!
default:
-
$this->select($table,'count(*)',$where,$line,$file);
-
if ($this->next_record() && $this->f(0))
-
if ($this->select($table,'count(*)',$where,$line,$file)->fetchColumn())
{
return !!$this->update($table,$data,$where,$line,$file,$app,$use_prepared_statement,$table_def);
}
— trunk/egroupware/api/src/Db/Backup.php (original)
+++ trunk/egroupware/api/src/Db/Backup.php Sat Apr 2 21:55:08 2016
@@ -118,41 +118,23 @@
{
if ($GLOBALS[‘egw_setup’]->config_table && $GLOBALS[‘egw_setup’]->table_exist(array($GLOBALS[‘egw_setup’]->config_table)))
{
-
$this->db->query("SELECT config_value FROM {$GLOBALS['egw_setup']->config_table} WHERE config_app='phpgwapi' AND config_name='backup_dir'",__LINE__,__FILE__);
-
$this->db->next_record();
-
if (!($this->backup_dir = $this->db->f(0)))
-
{
-
$this->db->query("SELECT config_value FROM {$GLOBALS['egw_setup']->config_table} WHERE config_app='phpgwapi' AND config_name='files_dir'",__LINE__,__FILE__);
-
$this->db->next_record();
-
$this->backup_dir = $this->db->f(0).'/db_backup';
-
}
-
$this->db->query("SELECT config_value FROM {$GLOBALS['egw_setup']->config_table} WHERE config_app='phpgwapi' AND config_name='files_dir'",__LINE__,__FILE__);
-
$this->db->next_record();
-
if (!($this->files_dir = $this->db->f(0)))
-
if (!($this->files_dir = $this->db->query("SELECT config_value FROM {$GLOBALS['egw_setup']->config_table} WHERE config_app='phpgwapi' AND config_name='files_dir'",__LINE__,__FILE__)->fetchColumn()))
{
error_log(__METHOD__."->"."No files Directory set/found");
}
-
$this->db->query("SELECT config_value FROM {$GLOBALS['egw_setup']->config_table} WHERE config_app='phpgwapi' AND config_name='system_charset'",__LINE__,__FILE__);
-
$this->db->next_record();
-
$this->charset = $this->db->f(0);
-
if (!$this->charset)
-
{
-
$this->db->query("SELECT content FROM {$GLOBALS['egw_setup']->lang_table} WHERE message_id='charset' AND app_name='common' AND lang!='en'",__LINE__,__FILE__);
-
$this->db->next_record();
-
$this->charset = $this->db->f(0);
-
}
-
$this->db->select($GLOBALS['egw_setup']->applications_table,'app_version',array('app_name'=>'phpgwapi'),__LINE__,__FILE__);
-
$this->api_version = $this->db->next_record() ? $this->db->f(0) : false;
-
/* Backup settings */
-
$this->db->query("SELECT config_value FROM {$GLOBALS['egw_setup']->config_table} WHERE config_app='phpgwapi' AND config_name='backup_mincount'",__LINE__,__FILE__);
-
$this->db->next_record();
-
$this->backup_mincount = $this->db->f(0);
-
if (!($this->backup_dir = $this->db->query("SELECT config_value FROM {$GLOBALS['egw_setup']->config_table} WHERE config_app='phpgwapi' AND config_name='backup_dir'",__LINE__,__FILE__)->fetchColumn()))
-
{
-
$this->backup_dir = $this->files_dir.'/db_backup';
-
}
-
$this->charset = $this->db->query("SELECT config_value FROM {$GLOBALS['egw_setup']->config_table} WHERE config_app='phpgwapi' AND config_name='system_charset'",__LINE__,__FILE__)->fetchColumn();
-
$this->api_version = $this->db->select($GLOBALS['egw_setup']->applications_table,'app_version',array('app_name'=>array('api','phpgwapi')),
-
__LINE__,__FILE__,0,'ORDER BY app_name ASC')->fetchColumn();
-
// Backup settings
-
$this->backup_mincount = $this->db->query("SELECT config_value FROM {$GLOBALS['egw_setup']->config_table} WHERE config_app='phpgwapi' AND config_name='backup_mincount'",__LINE__,__FILE__)->fetchColumn();
// backup files too
-
$this->db->query("SELECT config_value FROM {$GLOBALS['egw_setup']->config_table} WHERE config_app='phpgwapi' AND config_name='backup_files'",__LINE__,__FILE__);
-
$this->db->next_record();
-
$this->backup_files = (bool)$this->db->f(0);
-
}
-
if (!$this->charset) $this->charset = 'iso-8859-1';
-
$this->backup_files = (bool)$this->db->query("SELECT config_value FROM {$GLOBALS['egw_setup']->config_table} WHERE config_app='phpgwapi' AND config_name='backup_files'",__LINE__,__FILE__)->fetchColumn();
-
}
-
if (!$this->charset) $this->charset = 'utf-8';
}
else // called from eGW
{
@@ -163,9 +145,9 @@
$this->files_dir = $GLOBALS[‘egw_info’][‘server’][‘files_dir’];
$this->backup_mincount = $GLOBALS[‘egw_info’][‘server’][‘backup_mincount’];
$this->backup_files = $GLOBALS[‘egw_info’][‘server’][‘backup_files’];
-
$this->charset = Api\Translation::charset();
-
-
$this->api_version = $GLOBALS['egw_info']['apps'][isset($GLOBALS['egw_info']['apps']['api'])?'api':'phpgwapi']['version'];
}
// Set a default value if not set.
if (!isset($this->backup_mincount))
— trunk/egroupware/api/src/Hooks.php (original)
+++ trunk/egroupware/api/src/Hooks.php Sat Apr 2 21:55:08 2016
@@ -204,7 +204,7 @@
*
* @param boolan $force_rescan =false true: do not use instance cache
*/
- protected static function read($force_rescan=false)
- public static function read($force_rescan=false)
{
//$starttime = microtime(true);
if ($force_rescan) Cache::unsetInstance(CLASS, ‘locations’);
— trunk/egroupware/api/src/Storage/Base.php (original)
+++ trunk/egroupware/api/src/Storage/Base.php Sat Apr 2 21:55:08 2016
@@ -181,6 +181,9 @@
*/
function __construct($app=’’,$table=’’,Api\Db $db=null,$column_prefix=’’,$no_clone=false,$timestamp_type=null)
{
-
// ease the transition to api
-
if ($app == 'phpgwapi') $app = 'api';
-
if ($no_clone)
{
$this->db = is_object($db) ? $db : $GLOBALS['egw']->db;
— trunk/egroupware/doc/fix_api.php (original)
+++ trunk/egroupware/doc/fix_api.php Sat Apr 2 21:55:08 2016
@@ -103,7 +103,7 @@
‘etemplate_widget_taglist’ => ‘Api\Etemplate\Widget\Taglist’,
‘etemplate_widget_file’ => ‘Api\Etemplate\Widget\File’,
‘etemplate_widget_vfs’ => ‘Api\Etemplate\Widget\Vfs’,
- ‘etemplate_requst’ => ‘Api\Etemplate\Request’,
- ‘etemplate_request’ => ‘Api\Etemplate\Request’,
‘nextmatch_widget::category_action’ => ‘Api\Etemplate\Widget\Nextmatch::category_action’,
// so_sql and friends
’so_sql’ => ‘Api\Storage\Base’,
— trunk/egroupware/doc/rpm-build/post_install.php (original)
+++ trunk/egroupware/doc/rpm-build/post_install.php Sat Apr 2 21:55:08 2016
@@ -655,17 +655,17 @@
$domain = array_shift($domains);
// set “use auth with session credentials”,tls,“not user editable”,“further identities”
$config[‘smtpserver’] = “$mailserver,465,yes,tls,no,yes”;
-
$config['smtp'] = ',Smtp\\Univention';
$config['mailserver'] = "$mailserver,993,$domain,email,tls";
if (_ucr_get('mail/dovecot') == 'yes')
{
-
$config['imap'] = /*'cyrus,'._ucr_secret('cyrus')*/','.',Imap\\Dovecot';
// default with sieve port to 4190, as config is only available on host mailserver app is installed
if (!($sieve_port = _ucr_get('mail/dovecot/sieve/port'))) $sieve_port = 4190;
}
else
{
-
$config['imap'] = /*'cyrus,'._ucr_secret('cyrus')*/','.',Imap\\Cyrus';
// default with sieve port to 4190, as config is only available on host mailserver app is installed
if (!($sieve_port = _ucr_get('mail/cyrus/sieve/port'))) $sieve_port = 4190;
}
— trunk/infolog/inc/class.infolog_so.inc.php (original)
+++ trunk/infolog/inc/class.infolog_so.inc.php Sat Apr 2 21:55:08 2016
@@ -429,7 +429,6 @@
$this->db->delete($this->info_table,array(‘info_id’=>$info_id),LINE,FILE);
$this->db->delete($this->extra_table,array(‘info_id’=>$info_id),LINE,FILE);
egw_link::unlink(0,‘infolog’,$info_id);
@@ -439,13 +438,12 @@
if ($delete_children)
{
$db2 = clone($this->db); // we need an extra result-set
-
foreach($db2->select($this->info_table,'info_id',array(
'info_id_parent' => $info_id,
'info_owner' => $this->user,
-
),__LINE__,__FILE__) as $row)
-
{
-
$this->delete($row['info_id'], $delete_children);
}
}
// set parent_id to $new_parent or 0 for all not deleted children
@@ -624,10 +622,6 @@
}
// echo “
soinfolog.write this->data= “; _debug_array($this->data);
//error_log(”### soinfolog::write(”.print_r($to_write,true).") where=".print_r($where,true)." returning id=".$this->data[‘info_id’]);
-
// update the index
-
//egw_index::save('infolog',$this->data['info_id'],$this->data['info_owner'],$this->data,$this->data['info_cat'],
-
// array('info_uid','info_type','info_status','info_confirm','info_access'));
return $this->data['info_id'];
}
@@ -806,23 +800,6 @@
if ($query[‘query’]) $query[‘search’] = $query[‘query’]; // allow both names
if ($query[‘search’]) // we search in _from, _subject, _des and _extra_value for $query
{
-
/* new code join the index
-
if (ctype_digit($query['search'])) // search by ticket-number (numbers get never indexed!)
-
{
-
$sql_query = 'AND info_id='.(int)$query['search'];
-
}
-
else
-
{
-
$join = egw_index::sql_join_ids_by_keyword($query['search'],'infolog','info_id');
-
}
-
*/
-
/* new code with info_id IN (subquery) --> way to slow
-
$sql_query .= 'AND info_id IN ('.
-
egw_index::sql_ids_by_keyword(explode(' ',$query['search']),egw_index::MATCH_CONTAINS,'infolog').
-
// add search string itself, if it is numeric, to allow to search for a info_id/ticket number
-
ctype_digit($query['search'] ? ' UNION (SELECT '.$this->db->quote($query['search']).')' : '').')';
-
*/
-
/* old code searching the table direct */
$columns = array('info_from','info_addr','info_location','info_subject','info_extra_value');
// at the moment MaxDB 7.5 cant cast nor search text columns, it's suppost to change in 7.6
if ($this->db->capabilities['like_on_text']) $columns[] = 'info_des';
@@ -953,19 +930,17 @@
{
$users = array();
-
foreach($this->db->select($this->info_table,'DISTINCT info_owner',array(
str_replace(' AND ','',$this->statusFilter('open')),
'(ABS(info_startdate-'.time().')<'.(4*24*60*60).' OR '. // start_day within 4 days
'ABS(info_enddate-'.time().')<'.(4*24*60*60).')', // end_day within 4 days
-
),__LINE__,__FILE__);
-
while ($this->db->next_record())
-
{
-
$users[] = $this->db->f(0);
-
}
-
$this->db->select($this->info_table,'DISTINCT info_responsible',$this->statusFilter('open',false),__LINE__,__FILE__);
-
while ($this->db->next_record())
-
{
-
foreach(explode(',',$this->db->f(0)) as $responsible)
-
),__LINE__,__FILE__) as $row)
-
{
-
$users[] = $row['info_responsible'];
-
}
-
foreach($this->db->select($this->info_table,'DISTINCT info_responsible',$this->statusFilter('open',false),__LINE__,__FILE__) as $row)
-
{
-
foreach(explode(',', $row['info_responsible']) as $responsible)
{
if ($GLOBALS['egw']->accounts->get_type($responsible) == 'g')
{
— trunk/mail/setup/setup.inc.php (original)
+++ trunk/mail/setup/setup.inc.php Sat Apr 2 21:55:08 2016
@@ -44,12 +44,8 @@
‘versions’ => Array(‘14.1’)
);
$setup_info[‘mail’][‘depends’][] = array(
- ‘appname’ => ‘etemplate’,
- ‘versions’ => Array(‘14.1’)
-);
-$setup_info[‘mail’][‘depends’][] = array(
- ‘appname’ => ‘emailadmin’,
- ‘versions’ => Array(‘14.1’)
- ‘appname’ => ‘api’,
- ‘versions’ => Array(‘16.1’)
);
// installation checks for mail
$setup_info[‘mail’][‘check_install’] = array(
— trunk/phpgwapi/inc/class.egw.inc.php (original)
+++ trunk/phpgwapi/inc/class.egw.inc.php Sat Apr 2 21:55:08 2016
@@ -82,12 +82,13 @@
function setup($domain_names,$createsessionobject=True)
{
// create the DB-object
-
// as SiteMgr, Wiki, KnowledgeBase and probably more still use eg next_record(), we stick with Db\Deprecated for now
-
$this->db = new Api\Db\Deprecated($GLOBALS['egw_info']['server']);
if ($this->debug)
{
$this->db->Debug = 1;
}
— trunk/phpgwapi/setup/setup.inc.php (original)
+++ trunk/phpgwapi/setup/setup.inc.php Sat Apr 2 21:55:08 2016
@@ -11,8 +11,8 @@
/* Basic information about this app */
$setup_info[‘phpgwapi’][‘name’] = ‘phpgwapi’;
-$setup_info[‘phpgwapi’][‘title’] = ‘EGroupware old API’;
-$setup_info[‘phpgwapi’][‘version’] = ‘14.3.908’;
+$setup_info[‘phpgwapi’][‘title’] = ‘old EGroupware API’;
+$setup_info[‘phpgwapi’][‘version’] = ‘14.3.909’;
$setup_info[‘phpgwapi’][‘versions’][‘current_header’] = ‘1.29’;
$setup_info[‘phpgwapi’][‘enable’] = 3;
$setup_info[‘phpgwapi’][‘app_order’] = 1;
@@ -22,28 +22,8 @@
‘email’ => ‘egroupware-developers@lists.sourceforge.net’,
);
-/* The tables this app creates */
-$setup_info[‘phpgwapi’][‘tables’][] = ‘egw_config’;
-$setup_info[‘phpgwapi’][‘tables’][] = ‘egw_applications’;
-$setup_info[‘phpgwapi’][‘tables’][] = ‘egw_acl’;
-$setup_info[‘phpgwapi’][‘tables’][] = ‘egw_accounts’;
-$setup_info[‘phpgwapi’][‘tables’][] = ‘egw_preferences’;
-$setup_info[‘phpgwapi’][‘tables’][] = ‘egw_access_log’;
-$setup_info[‘phpgwapi’][‘tables’][] = ‘egw_languages’;
-$setup_info[‘phpgwapi’][‘tables’][] = ‘egw_lang’;
-$setup_info[‘phpgwapi’][‘tables’][] = ‘egw_categories’;
-$setup_info[‘phpgwapi’][‘tables’][] = ‘egw_history_log’;
-$setup_info[‘phpgwapi’][‘tables’][] = ‘egw_async’;
-$setup_info[‘phpgwapi’][‘tables’][] = ‘egw_links’;
-$setup_info[‘phpgwapi’][‘tables’][] = ‘egw_addressbook’;
-$setup_info[‘phpgwapi’][‘tables’][] = ‘egw_addressbook_extra’;
-$setup_info[‘phpgwapi’][‘tables’][] = ‘egw_addressbook_lists’;
-$setup_info[‘phpgwapi’][‘tables’][] = ‘egw_addressbook2list’;
-$setup_info[‘phpgwapi’][‘tables’][] = ‘egw_sqlfs’;
-$setup_info[‘phpgwapi’][‘tables’][] = ‘egw_index_keywords’;
-$setup_info[‘phpgwapi’][‘tables’][] = ‘egw_index’;
-$setup_info[‘phpgwapi’][‘tables’][] = ‘egw_cat2entry’;
-$setup_info[‘phpgwapi’][‘tables’][] = ‘egw_locks’;
-$setup_info[‘phpgwapi’][‘tables’][] = ‘egw_sqlfs_props’;
-$setup_info[‘phpgwapi’][‘tables’][] = ‘egw_customfields’;
-$setup_info[‘phpgwapi’][‘tables’][] = ‘egw_sharing’;
+// old Api depends on new one
+$setup_info[‘phpgwapi’][‘depends’][‘api’] = array(
- ‘appname’ => ‘api’,
- ‘versions’ => Array(‘16.1’)
+);
— trunk/phpgwapi/setup/tables_current.inc.php (original)
+++ trunk/phpgwapi/setup/tables_current.inc.php Sat Apr 2 21:55:08 2016
@@ -11,433 +11,4 @@
-$phpgw_baseline = array(
- ‘egw_config’ => array(
-
'fd' => array(
-
'config_app' => array('type' => 'ascii','precision' => '16','nullable' => False),
-
'config_name' => array('type' => 'ascii','precision' => '32','nullable' => False),
-
'config_value' => array('type' => 'text')
-
),
-
'pk' => array('config_app','config_name'),
-
'fk' => array(),
-
'ix' => array(),
-
'uc' => array()
- ),
- ‘egw_applications’ => array(
-
'fd' => array(
-
'app_id' => array('type' => 'auto','precision' => '4','nullable' => False),
-
'app_name' => array('type' => 'ascii','precision' => '16','nullable' => False),
-
'app_enabled' => array('type' => 'int','precision' => '4','nullable' => False),
-
'app_order' => array('type' => 'int','precision' => '4','nullable' => False),
-
'app_tables' => array('type' => 'ascii','precision' => '8192','nullable' => False),
-
'app_version' => array('type' => 'ascii','precision' => '20','nullable' => False,'default' => '0.0'),
-
'app_icon' => array('type' => 'ascii','precision' => '32'),
-
'app_icon_app' => array('type' => 'ascii','precision' => '16'),
-
'app_index' => array('type' => 'ascii','precision' => '64')
-
),
-
'pk' => array('app_id'),
-
'fk' => array(),
-
'ix' => array(array('app_enabled','app_order')),
-
'uc' => array('app_name')
- ),
- ‘egw_acl’ => array(
-
'fd' => array(
-
'acl_appname' => array('type' => 'ascii','precision' => '16','nullable' => False),
-
'acl_location' => array('type' => 'ascii','meta' => 'account','precision' => '16','nullable' => False),
-
'acl_account' => array('type' => 'int','meta' => 'account','precision' => '4','nullable' => False),
-
'acl_rights' => array('type' => 'int','precision' => '4'),
-
'acl_id' => array('type' => 'auto','nullable' => False)
-
),
-
'pk' => array('acl_id'),
-
'fk' => array(),
-
'ix' => array('acl_account',array('acl_location','acl_account'),array('acl_appname','acl_account')),
-
'uc' => array(array('acl_appname','acl_location','acl_account'))
- ),
- ‘egw_accounts’ => array(
-
'fd' => array(
-
'account_id' => array('type' => 'auto','meta' => 'account-abs','nullable' => False),
-
'account_lid' => array('type' => 'varchar','precision' => '64','nullable' => False),
-
'account_pwd' => array('type' => 'varchar','precision' => '128','nullable' => False),
-
'account_lastlogin' => array('type' => 'int','precision' => '4'),
-
'account_lastloginfrom' => array('type' => 'ascii','precision' => '48','comment' => 'ip'),
-
'account_lastpwd_change' => array('type' => 'int','precision' => '4'),
-
'account_status' => array('type' => 'char','precision' => '1','nullable' => False,'default' => 'A'),
-
'account_expires' => array('type' => 'int','precision' => '4'),
-
'account_type' => array('type' => 'char','precision' => '1'),
-
'account_primary_group' => array('type' => 'int','meta' => 'group','precision' => '4','nullable' => False,'default' => '0'),
-
'account_description' => array('type' => 'varchar','precision' => '255','comment' => 'group description')
-
),
-
'pk' => array('account_id'),
-
'fk' => array(),
-
'ix' => array(),
-
'uc' => array('account_lid')
- ),
- ‘egw_preferences’ => array(
-
'fd' => array(
-
'preference_owner' => array('type' => 'int','meta' => 'account-prefs','precision' => '4','nullable' => False),
-
'preference_app' => array('type' => 'ascii','precision' => '16','nullable' => False),
-
'preference_value' => array('type' => 'text','nullable' => False),
-
'preference_id' => array('type' => 'auto','nullable' => False)
-
),
-
'pk' => array('preference_id'),
-
'fk' => array(),
-
'ix' => array(),
-
'uc' => array(array('preference_owner','preference_app'))
- ),
- ‘egw_access_log’ => array(
-
'fd' => array(
-
'sessionid' => array('type' => 'auto','nullable' => False,'comment' => 'primary key'),
-
'loginid' => array('type' => 'varchar','precision' => '64','nullable' => False,'comment' => 'username used to login'),
-
'ip' => array('type' => 'ascii','precision' => '48','nullable' => False,'comment' => 'ip of user'),
-
'li' => array('type' => 'int','meta' => 'timestamp','precision' => '8','nullable' => False,'comment' => 'TS if login'),
-
'lo' => array('type' => 'int','meta' => 'timestamp','precision' => '8','comment' => 'TD of logout'),
-
'account_id' => array('type' => 'int','meta' => 'user','precision' => '4','nullable' => False,'default' => '0','comment' => 'numerical account id'),
-
'session_dla' => array('type' => 'int','meta' => 'timestamp','precision' => '8','comment' => 'TS of last user action'),
-
'session_action' => array('type' => 'ascii','precision' => '64','comment' => 'menuaction or path of last user action'),
-
'session_php' => array('type' => 'ascii','precision' => '64','nullable' => False,'comment' => 'php session-id or error-message'),
-
'notification_heartbeat' => array('type' => 'int','meta' => 'timestamp','precision' => '8','comment' => 'TS of last notification request'),
-
'user_agent' => array('type' => 'ascii','precision' => '255','comment' => 'User-agent of browser/device')
-
),
-
'pk' => array('sessionid'),
-
'fk' => array(),
-
'ix' => array('li','lo','session_dla','session_php','notification_heartbeat',array('account_id','ip','li'),array('account_id','loginid','li')),
-
'uc' => array()
- ),
- ‘egw_languages’ => array(
-
'fd' => array(
-
'lang_id' => array('type' => 'ascii','precision' => '5','nullable' => False),
-
'lang_name' => array('type' => 'varchar','precision' => '50','nullable' => False)
-
),
-
'pk' => array('lang_id'),
-
'fk' => array(),
-
'ix' => array(),
-
'uc' => array()
- )