fix PHP Fatal, if phpgwapi is not installed

This commit is contained in:
Ralf Becker 2016-05-26 11:40:23 +02:00
parent 2b2845fff7
commit a4fb7696d7
2 changed files with 8 additions and 7 deletions

View File

@ -481,7 +481,7 @@ abstract class importexport_basic_import_csv implements importexport_iface_impor
if(!is_null($n_given)) $n_given = trim($n_given);
if (!is_object($contacts))
{
$contacts =& CreateObject('phpgwapi.contacts');
$contacts = new Api\Contacts();
}
if (!is_null($org_name)) // org_name given?
{

View File

@ -36,6 +36,7 @@ class importexport_schedule_ui
public function index($content = array())
{
$async = new Api\Asyncservice();
if(is_array($content['scheduled']))
{
foreach($content['scheduled'] as $row)
@ -43,11 +44,11 @@ class importexport_schedule_ui
if($row['delete'])
{
$key = urldecode(key($row['delete']));
ExecMethod('phpgwapi.asyncservice.cancel_timer', $key);
$async->cancel_timer($key);
}
}
}
$async_list = ExecMethod('phpgwapi.asyncservice.read', 'importexport%');
$async_list = $async->read('importexport%');
$data = array();
if(is_array($async_list))
{