forked from extern/egroupware
* PHP7/ImportExport: fix different evaluation order of PHP 5 and 7 gives eg. error "Function name must be string" in wizard
This commit is contained in:
parent
512bc77cfd
commit
2c238b7071
@ -3391,7 +3391,7 @@ class Mail
|
|||||||
//highest precedence
|
//highest precedence
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
$_folderName = $this->icServer->$types[$_type]['profileKey'];
|
$_folderName = $this->icServer->{$types[$_type]['profileKey']};
|
||||||
}
|
}
|
||||||
catch (\Exception $e)
|
catch (\Exception $e)
|
||||||
{
|
{
|
||||||
|
@ -103,7 +103,7 @@ class calendar_export_csv implements importexport_iface_export_plugin {
|
|||||||
if(method_exists($ui, $states['view']))
|
if(method_exists($ui, $states['view']))
|
||||||
{
|
{
|
||||||
ob_start();
|
ob_start();
|
||||||
$ui->$states['view']();
|
$ui->{$states['view']}();
|
||||||
ob_end_clean();
|
ob_end_clean();
|
||||||
}
|
}
|
||||||
$query += array(
|
$query += array(
|
||||||
|
@ -95,7 +95,7 @@ class calendar_export_ical extends calendar_export_csv {
|
|||||||
if(method_exists($ui, $states['view']))
|
if(method_exists($ui, $states['view']))
|
||||||
{
|
{
|
||||||
ob_start();
|
ob_start();
|
||||||
$ui->$states['view']();
|
$ui->{$states['view']}();
|
||||||
ob_end_clean();
|
ob_end_clean();
|
||||||
}
|
}
|
||||||
$query += array(
|
$query += array(
|
||||||
|
@ -58,7 +58,7 @@ class importexport_definitions_ui
|
|||||||
error_reporting(E_ALL & ~E_NOTICE & ~E_WARNING);
|
error_reporting(E_ALL & ~E_NOTICE & ~E_WARNING);
|
||||||
Api\Translation::add_app(self::_appname);
|
Api\Translation::add_app(self::_appname);
|
||||||
$GLOBALS['egw_info']['flags']['currentapp'] = self::_appname;
|
$GLOBALS['egw_info']['flags']['currentapp'] = self::_appname;
|
||||||
|
|
||||||
$this->etpl = new Etemplate();
|
$this->etpl = new Etemplate();
|
||||||
$this->clock = Api\Html::image(self::_appname,'clock');
|
$this->clock = Api\Html::image(self::_appname,'clock');
|
||||||
$this->steps = array(
|
$this->steps = array(
|
||||||
@ -544,11 +544,11 @@ class importexport_definitions_ui
|
|||||||
}
|
}
|
||||||
if(!key_exists($content['step'],$this->steps))
|
if(!key_exists($content['step'],$this->steps))
|
||||||
{
|
{
|
||||||
$next_step = $this->plugin->$content['step']($content,$sel_options,$readonlys,$preserv);
|
$next_step = $this->plugin->{$content['step']}($content,$sel_options,$readonlys,$preserv);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$next_step = $this->$content['step']($content,$sel_options,$readonlys,$preserv);
|
$next_step = $this->{$content['step']}($content,$sel_options,$readonlys,$preserv);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -578,15 +578,15 @@ class importexport_definitions_ui
|
|||||||
{
|
{
|
||||||
if(!key_exists($content['step'],$this->steps))
|
if(!key_exists($content['step'],$this->steps))
|
||||||
{
|
{
|
||||||
$next_step = $this->plugin->$content['step']($content);
|
$next_step = $this->plugin->{$content['step']}($content);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$next_step = $this->$content['step']($content);
|
$next_step = $this->{$content['step']}($content);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} while($this->wizard_content_template == self::SKIP);
|
} while($this->wizard_content_template == self::SKIP);
|
||||||
|
|
||||||
if(!$this->can_edit($content))
|
if(!$this->can_edit($content))
|
||||||
{
|
{
|
||||||
$readonlys[$this->wizard_content_template] = true;
|
$readonlys[$this->wizard_content_template] = true;
|
||||||
@ -868,7 +868,7 @@ class importexport_definitions_ui
|
|||||||
$content['no_all_users'] = true;
|
$content['no_all_users'] = true;
|
||||||
}
|
}
|
||||||
unset ($preserv['button']);
|
unset ($preserv['button']);
|
||||||
|
|
||||||
$readonlys['button[next]'] = true;
|
$readonlys['button[next]'] = true;
|
||||||
return 'importexport.wizard_chooseallowedusers';
|
return 'importexport.wizard_chooseallowedusers';
|
||||||
}
|
}
|
||||||
|
@ -107,15 +107,15 @@ class resources_import_csv extends importexport_basic_import_csv {
|
|||||||
if(!$record->accessory_of) $record->accessory_of = -1;
|
if(!$record->accessory_of) $record->accessory_of = -1;
|
||||||
//error_log(__METHOD__.__LINE__.array2string($_definition->plugin_options['conditions']));
|
//error_log(__METHOD__.__LINE__.array2string($_definition->plugin_options['conditions']));
|
||||||
if ($this->definition->plugin_options['conditions']) {
|
if ($this->definition->plugin_options['conditions']) {
|
||||||
|
|
||||||
foreach ( $this->definition->plugin_options['conditions'] as $condition ) {
|
foreach ( $this->definition->plugin_options['conditions'] as $condition ) {
|
||||||
$results = array();
|
$results = array();
|
||||||
switch ( $condition['type'] ) {
|
switch ( $condition['type'] ) {
|
||||||
// exists
|
// exists
|
||||||
case 'exists' :
|
case 'exists' :
|
||||||
if($record->$condition['string']) {
|
if($record->{$condition['string']}) {
|
||||||
$results = $this->bo->so->search(
|
$results = $this->bo->so->search(
|
||||||
array( $condition['string'] => $record->$condition['string']),
|
array( $condition['string'] => $record->{$condition['string']}),
|
||||||
False
|
False
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@ -170,7 +170,7 @@ class resources_import_csv extends importexport_basic_import_csv {
|
|||||||
|
|
||||||
// Merge to deal with fields not in import record
|
// Merge to deal with fields not in import record
|
||||||
$_data = array_merge($old, $_data);
|
$_data = array_merge($old, $_data);
|
||||||
|
|
||||||
// Fall through
|
// Fall through
|
||||||
case 'insert' :
|
case 'insert' :
|
||||||
if($_action == 'insert') {
|
if($_action == 'insert') {
|
||||||
@ -193,7 +193,7 @@ class resources_import_csv extends importexport_basic_import_csv {
|
|||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
throw new Api\Exception('Unsupported action');
|
throw new Api\Exception('Unsupported action');
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user