mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-01-13 09:28:29 +01:00
This should allow for another app to load its own contacts class as a replacement
for the api version. If the app wants to include the api shared class, it should do so manually.
This commit is contained in:
parent
fcde09f5ab
commit
75c9dc23f0
@ -1,8 +1,32 @@
|
|||||||
<?php
|
<?php
|
||||||
if (!$phpgw_info['server']['contact_repository'])
|
if(!$GLOBALS['phpgw_info']['server']['contact_repository'])
|
||||||
{
|
{
|
||||||
$phpgw_info['server']['contact_repository'] = 'sql';
|
$GLOBALS['phpgw_info']['server']['contact_repository'] = 'sql';
|
||||||
}
|
}
|
||||||
include(PHPGW_API_INC . '/class.contacts_'.$phpgw_info['server']['contact_repository'] . '.inc.php');
|
if(!$GLOBALS['phpgw_info']['server']['contact_application'] ||
|
||||||
include(PHPGW_API_INC . '/class.contacts_shared.inc.php');
|
$GLOBALS['phpgw_info']['server']['contact_application'] == 'addressbook')
|
||||||
|
{
|
||||||
|
$contactapp = 'phpgwapi';
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$contactapp = $GLOBALS['phpgw_info']['server']['contact_application'];
|
||||||
|
}
|
||||||
|
|
||||||
|
$repository = PHPGW_SERVER_ROOT . '/' . $contactapp
|
||||||
|
. '/inc/class.contacts_' . $GLOBALS['phpgw_info']['server']['contact_repository'] . '.inc.php';
|
||||||
|
$shared = PHPGW_SERVER_ROOT . '/' . $contactapp . '/inc/class.contacts_shared.inc.php';
|
||||||
|
|
||||||
|
if(@file_exists($repository))
|
||||||
|
{
|
||||||
|
include($repository);
|
||||||
|
}
|
||||||
|
if(@file_exists($shared))
|
||||||
|
{
|
||||||
|
include($shared);
|
||||||
|
}
|
||||||
|
|
||||||
|
unset($contactapp);
|
||||||
|
unset($repository);
|
||||||
|
unset($shared);
|
||||||
?>
|
?>
|
||||||
|
Loading…
Reference in New Issue
Block a user