mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-06-25 20:31:31 +02:00
fixed not working importexport: preferences can NOT store arrays, they need to be serialized before
This commit is contained in:
parent
4769db9539
commit
3ccf4a3587
@ -16,22 +16,22 @@
|
|||||||
*/
|
*/
|
||||||
class importexport_export_ui {
|
class importexport_export_ui {
|
||||||
const _appname = 'importexport';
|
const _appname = 'importexport';
|
||||||
|
|
||||||
public $public_functions = array(
|
public $public_functions = array(
|
||||||
'export_dialog' => true,
|
'export_dialog' => true,
|
||||||
'download' => true,
|
'download' => true,
|
||||||
);
|
);
|
||||||
|
|
||||||
private $js;
|
private $js;
|
||||||
private $user;
|
private $user;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* holds all export plugins from all apps
|
* holds all export plugins from all apps
|
||||||
*
|
*
|
||||||
* @var array
|
* @var array
|
||||||
*/
|
*/
|
||||||
private $export_plugins;
|
private $export_plugins;
|
||||||
|
|
||||||
public function __construct() {
|
public function __construct() {
|
||||||
$this->js = $GLOBALS['egw']->js = is_object($GLOBALS['egw']->js) ? $GLOBALS['egw']->js : CreateObject('phpgwapi.javascript');
|
$this->js = $GLOBALS['egw']->js = is_object($GLOBALS['egw']->js) ? $GLOBALS['egw']->js : CreateObject('phpgwapi.javascript');
|
||||||
$this->js->validate_file('.','export_dialog','importexport');
|
$this->js->validate_file('.','export_dialog','importexport');
|
||||||
@ -39,21 +39,21 @@ class importexport_export_ui {
|
|||||||
$this->user = $GLOBALS['egw_info']['user']['user_id'];
|
$this->user = $GLOBALS['egw_info']['user']['user_id'];
|
||||||
$this->export_plugins = importexport_helper_functions::get_plugins('all','export');
|
$this->export_plugins = importexport_helper_functions::get_plugins('all','export');
|
||||||
$GLOBALS['egw_info']['flags']['include_xajax'] = true;
|
$GLOBALS['egw_info']['flags']['include_xajax'] = true;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function export_dialog($_content=array()) {
|
public function export_dialog($_content=array()) {
|
||||||
$tabs = 'general_tab|selection_tab|options_tab';
|
$tabs = 'general_tab|selection_tab|options_tab';
|
||||||
$sel_options = array();
|
$sel_options = array();
|
||||||
$readonlys = array();
|
$readonlys = array();
|
||||||
$preserv = array();
|
$preserv = array();
|
||||||
|
|
||||||
$et = new etemplate(self::_appname. '.export_dialog');
|
$et = new etemplate(self::_appname. '.export_dialog');
|
||||||
$_appname = $_content['appname'] ? $_content['appname'] : $_GET['appname'];
|
$_appname = $_content['appname'] ? $_content['appname'] : $_GET['appname'];
|
||||||
$_definition = $_content['definition'] ? $_content['definition'] : $_GET['definition'];
|
$_definition = $_content['definition'] ? $_content['definition'] : $_GET['definition'];
|
||||||
$_plugin = $_content['plugin'] ? $_content['plugin'] : $_GET['plugin'];
|
$_plugin = $_content['plugin'] ? $_content['plugin'] : $_GET['plugin'];
|
||||||
$_selection = $_content['selection'] ? $_content['selection'] : $_GET['selection'];
|
$_selection = $_content['selection'] ? $_content['selection'] : $_GET['selection'];
|
||||||
|
|
||||||
//error_log(__FILE__.__FUNCTION__. '::$_GET[\'appname\']='. $_appname. ',$_GET[\'definition\']='. $_definition. ',$_GET[\'plugin\']='.$_plugin. ',$_GET[\'selection\']='.$_selection);
|
//error_log(__FILE__.__FUNCTION__. '::$_GET[\'appname\']='. $_appname. ',$_GET[\'definition\']='. $_definition. ',$_GET[\'plugin\']='.$_plugin. ',$_GET[\'selection\']='.$_selection);
|
||||||
// if appname is given and valid, list available definitions (if no definition is given)
|
// if appname is given and valid, list available definitions (if no definition is given)
|
||||||
$readonlys['appname'] = (!empty($_appname) && $GLOBALS['egw']->acl->check('run',1,$_appname));
|
$readonlys['appname'] = (!empty($_appname) && $GLOBALS['egw']->acl->check('run',1,$_appname));
|
||||||
@ -82,10 +82,10 @@ class importexport_export_ui {
|
|||||||
if(isset($_definition) && array_key_exists($_definition,$sel_options['definition'])) {
|
if(isset($_definition) && array_key_exists($_definition,$sel_options['definition'])) {
|
||||||
$content['definition'] = $_definition;
|
$content['definition'] = $_definition;
|
||||||
}
|
}
|
||||||
|
|
||||||
// fill plugins
|
// fill plugins
|
||||||
$sel_options['plugin'] = $this->export_plugins[$_appname]['export'];
|
$sel_options['plugin'] = $this->export_plugins[$_appname]['export'];
|
||||||
|
|
||||||
// show definitions or plugins in ui?
|
// show definitions or plugins in ui?
|
||||||
if($content['definition'] == 'expert') {
|
if($content['definition'] == 'expert') {
|
||||||
if(isset($_plugin) && array_key_exists($_plugin,$sel_options['plugin'])) {
|
if(isset($_plugin) && array_key_exists($_plugin,$sel_options['plugin'])) {
|
||||||
@ -105,7 +105,7 @@ class importexport_export_ui {
|
|||||||
|
|
||||||
$this->js->set_onload("set_style_by_class('tr','select_plugin','display','none');");
|
$this->js->set_onload("set_style_by_class('tr','select_plugin','display','none');");
|
||||||
$this->js->set_onload("set_style_by_class('tr','save_definition','display','none');");
|
$this->js->set_onload("set_style_by_class('tr','save_definition','display','none');");
|
||||||
|
|
||||||
$definition = new importexport_definition($content['definition']);
|
$definition = new importexport_definition($content['definition']);
|
||||||
if($definition) {
|
if($definition) {
|
||||||
$content += (array)$definition->plugin_options;
|
$content += (array)$definition->plugin_options;
|
||||||
@ -113,13 +113,13 @@ class importexport_export_ui {
|
|||||||
$content['description'] = $definition->description;
|
$content['description'] = $definition->description;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// handle selector
|
// handle selector
|
||||||
if($selected_plugin) {
|
if($selected_plugin) {
|
||||||
$plugin_object = new $selected_plugin;
|
$plugin_object = new $selected_plugin;
|
||||||
|
|
||||||
$content['description'] = $plugin_object->get_description();
|
$content['description'] = $plugin_object->get_description();
|
||||||
|
|
||||||
// fill options tab
|
// fill options tab
|
||||||
if(method_exists($plugin_object, 'get_selectors_html')) {
|
if(method_exists($plugin_object, 'get_selectors_html')) {
|
||||||
$content['plugin_options_html'] = $plugin_object->get_options_html();
|
$content['plugin_options_html'] = $plugin_object->get_options_html();
|
||||||
@ -139,7 +139,7 @@ class importexport_export_ui {
|
|||||||
$readonlys[$tabs]['options_tab'] = true;
|
$readonlys[$tabs]['options_tab'] = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// fill selection tab
|
// fill selection tab
|
||||||
if($definition && $definition->plugin_options['selection']) {
|
if($definition && $definition->plugin_options['selection']) {
|
||||||
$_selection = $definition->plugin_options['selection'];
|
$_selection = $definition->plugin_options['selection'];
|
||||||
@ -173,18 +173,22 @@ class importexport_export_ui {
|
|||||||
disable_button('exec[export]');
|
disable_button('exec[export]');
|
||||||
");
|
");
|
||||||
}
|
}
|
||||||
$content = array_merge($content,(array)$GLOBALS['egw_info']['user']['preferences']['importexport'][$definition->definition_id]);
|
if (($prefs = $GLOBALS['egw_info']['user']['preferences']['importexport'][$definition->definition_id]) &&
|
||||||
|
($prefs = unserialize($prefs)))
|
||||||
|
{
|
||||||
|
$content = array_merge($content,$prefs);
|
||||||
|
}
|
||||||
unset ($plugin_object);
|
unset ($plugin_object);
|
||||||
(array)$apps = importexport_helper_functions::get_apps('export');
|
(array)$apps = importexport_helper_functions::get_apps('export');
|
||||||
$sel_options['appname'] = array('' => lang('Select one')) + array_combine($apps,$apps);
|
$sel_options['appname'] = array('' => lang('Select one')) + array_combine($apps,$apps);
|
||||||
$this->js->set_onload("set_style_by_class('tr','select_plugin','display','none');");
|
$this->js->set_onload("set_style_by_class('tr','select_plugin','display','none');");
|
||||||
if(!$_application && !$selected_plugin) {
|
if(!$_application && !$selected_plugin) {
|
||||||
$content['plugin_selectors_html'] = $content['plugin_options_html'] =
|
$content['plugin_selectors_html'] = $content['plugin_options_html'] =
|
||||||
lang('You need to select an app and format first!');
|
lang('You need to select an app and format first!');
|
||||||
$this->js->set_onload("document.getElementById('importexport.export_dialog.options_tab-tab').style.visibility='hidden';");
|
$this->js->set_onload("document.getElementById('importexport.export_dialog.options_tab-tab').style.visibility='hidden';");
|
||||||
$this->js->set_onload("document.getElementById('importexport.export_dialog.selection_tab-tab').style.visibility='hidden';");
|
$this->js->set_onload("document.getElementById('importexport.export_dialog.selection_tab-tab').style.visibility='hidden';");
|
||||||
}
|
}
|
||||||
|
|
||||||
// disable preview box
|
// disable preview box
|
||||||
$this->js->set_onload("set_style_by_class('tr','preview-box','display','none');");
|
$this->js->set_onload("set_style_by_class('tr','preview-box','display','none');");
|
||||||
|
|
||||||
@ -193,7 +197,7 @@ class importexport_export_ui {
|
|||||||
{
|
{
|
||||||
//error_log(__LINE__.__FILE__.'$_content: '.print_r($_content,true));
|
//error_log(__LINE__.__FILE__.'$_content: '.print_r($_content,true));
|
||||||
$response = new xajaxResponse();
|
$response = new xajaxResponse();
|
||||||
|
|
||||||
if ($_content['definition'] == 'expert') {
|
if ($_content['definition'] == 'expert') {
|
||||||
$definition = new importexport_definition();
|
$definition = new importexport_definition();
|
||||||
$definition->definition_id = $_content['definition_id'] ? $_content['definition_id'] : '';
|
$definition->definition_id = $_content['definition_id'] ? $_content['definition_id'] : '';
|
||||||
@ -207,7 +211,7 @@ class importexport_export_ui {
|
|||||||
else {
|
else {
|
||||||
$definition = new importexport_definition($_content['definition']);
|
$definition = new importexport_definition($_content['definition']);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!is_array($definition->plugin_options)) {
|
if(!is_array($definition->plugin_options)) {
|
||||||
$definition->plugin_options = array(
|
$definition->plugin_options = array(
|
||||||
'mapping' => array()
|
'mapping' => array()
|
||||||
@ -217,7 +221,7 @@ class importexport_export_ui {
|
|||||||
$definition->plugin_options,
|
$definition->plugin_options,
|
||||||
$_content
|
$_content
|
||||||
);
|
);
|
||||||
|
|
||||||
if(!$definition->plugin_options['selection']) {
|
if(!$definition->plugin_options['selection']) {
|
||||||
$response->addScript('alert("' . lang('No records selected') . '");');
|
$response->addScript('alert("' . lang('No records selected') . '");');
|
||||||
return $response->getXML();
|
return $response->getXML();
|
||||||
@ -233,7 +237,7 @@ class importexport_export_ui {
|
|||||||
|
|
||||||
// Keep settings
|
// Keep settings
|
||||||
$keep = array_diff_key($_content, array_flip(array('appname', 'definition', 'plugin', 'preview', 'export', $tabs)));
|
$keep = array_diff_key($_content, array_flip(array('appname', 'definition', 'plugin', 'preview', 'export', $tabs)));
|
||||||
$GLOBALS['egw']->preferences->add('importexport',$definition->definition_id,$keep);
|
$GLOBALS['egw']->preferences->add('importexport',$definition->definition_id,serialize($keep));
|
||||||
// save prefs, but do NOT invalid the cache (unnecessary)
|
// save prefs, but do NOT invalid the cache (unnecessary)
|
||||||
$GLOBALS['egw']->preferences->save_repository(false,'user',false);
|
$GLOBALS['egw']->preferences->save_repository(false,'user',false);
|
||||||
|
|
||||||
@ -254,7 +258,7 @@ class importexport_export_ui {
|
|||||||
'[\020]','[\021]','[\022]','[\023]','[\024]','[\025]','[\026]','[\027]',
|
'[\020]','[\021]','[\022]','[\023]','[\024]','[\025]','[\026]','[\027]',
|
||||||
'[\030]','[\031]','[\032]','[\033]','[\034]','[\035]','[\036]','[\037]');
|
'[\030]','[\031]','[\032]','[\033]','[\034]','[\035]','[\036]','[\037]');
|
||||||
$replace = $preview = '';
|
$replace = $preview = '';
|
||||||
|
|
||||||
while(!feof($file) && $item_count < 10) {
|
while(!feof($file) && $item_count < 10) {
|
||||||
$preview .= preg_replace($search,$replace,fgets($file,1024));
|
$preview .= preg_replace($search,$replace,fgets($file,1024));
|
||||||
$item_count++;
|
$item_count++;
|
||||||
@ -262,18 +266,18 @@ class importexport_export_ui {
|
|||||||
|
|
||||||
fclose($file);
|
fclose($file);
|
||||||
unlink($tmpfname);
|
unlink($tmpfname);
|
||||||
|
|
||||||
// NOTE: $definition->plugin_options['charset'] may not be set,
|
// NOTE: $definition->plugin_options['charset'] may not be set,
|
||||||
// but it's the best guess atm.
|
// but it's the best guess atm.
|
||||||
$preview = $GLOBALS['egw']->translation->convert( $preview,
|
$preview = $GLOBALS['egw']->translation->convert( $preview,
|
||||||
$definition->plugin_options['charset'],
|
$definition->plugin_options['charset'],
|
||||||
$GLOBALS['egw']->translation->charset()
|
$GLOBALS['egw']->translation->charset()
|
||||||
);
|
);
|
||||||
|
|
||||||
$response->addAssign('exec[preview-box]','innerHTML',nl2br($preview));
|
$response->addAssign('exec[preview-box]','innerHTML',nl2br($preview));
|
||||||
$response->jquery('.preview-box','show');
|
$response->jquery('.preview-box','show');
|
||||||
$response->jquery('.preview-box-buttons','show');
|
$response->jquery('.preview-box-buttons','show');
|
||||||
|
|
||||||
$response->addScript("xajax_eT_wrapper();");
|
$response->addScript("xajax_eT_wrapper();");
|
||||||
return $response->getXML();
|
return $response->getXML();
|
||||||
}
|
}
|
||||||
@ -286,7 +290,7 @@ class importexport_export_ui {
|
|||||||
//error_log(print_r($content,true));
|
//error_log(print_r($content,true));
|
||||||
return $et->exec(self::_appname. '.importexport_export_ui.export_dialog',$content,$sel_options,$readonlys,$preserv,2);
|
return $et->exec(self::_appname. '.importexport_export_ui.export_dialog',$content,$sel_options,$readonlys,$preserv,2);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function ajax_get_definitions($_appname, xajaxResponse &$response = null) {
|
public function ajax_get_definitions($_appname, xajaxResponse &$response = null) {
|
||||||
if(is_null($response)) {
|
if(is_null($response)) {
|
||||||
$response = new xajaxResponse();
|
$response = new xajaxResponse();
|
||||||
@ -297,7 +301,7 @@ class importexport_export_ui {
|
|||||||
$response->addScript("set_style_by_class('tr','select_definition','display','none');");
|
$response->addScript("set_style_by_class('tr','select_definition','display','none');");
|
||||||
return $no_return ? '' : $response->getXML();
|
return $no_return ? '' : $response->getXML();
|
||||||
}
|
}
|
||||||
|
|
||||||
$definitions = new importexport_definitions_bo(array(
|
$definitions = new importexport_definitions_bo(array(
|
||||||
'type' => 'export',
|
'type' => 'export',
|
||||||
'application' => $_appname
|
'application' => $_appname
|
||||||
@ -313,7 +317,7 @@ class importexport_export_ui {
|
|||||||
}
|
}
|
||||||
unset($definitions);
|
unset($definitions);
|
||||||
$response->addScript("selectbox_add_option('exec[definition]','" . lang('Expert options') . "', 'expert',".($selected_plugin == $title ? 'true' : 'false').");");
|
$response->addScript("selectbox_add_option('exec[definition]','" . lang('Expert options') . "', 'expert',".($selected_plugin == $title ? 'true' : 'false').");");
|
||||||
|
|
||||||
if($selected_plugin == 'expert') {
|
if($selected_plugin == 'expert') {
|
||||||
$this->ajax_get_plugins($_appname, $response);
|
$this->ajax_get_plugins($_appname, $response);
|
||||||
} else {
|
} else {
|
||||||
@ -323,7 +327,7 @@ class importexport_export_ui {
|
|||||||
$response->addScript("set_style_by_class('tr','select_definition','display','table-row');");
|
$response->addScript("set_style_by_class('tr','select_definition','display','table-row');");
|
||||||
return $no_return ? '' : $response->getXML();
|
return $no_return ? '' : $response->getXML();
|
||||||
}
|
}
|
||||||
|
|
||||||
public function ajax_get_plugins($_appname, xajaxResponse &$response = null) {
|
public function ajax_get_plugins($_appname, xajaxResponse &$response = null) {
|
||||||
if(!is_null($response)) {
|
if(!is_null($response)) {
|
||||||
$no_return = true;
|
$no_return = true;
|
||||||
@ -334,7 +338,7 @@ class importexport_export_ui {
|
|||||||
$response->addScript("set_style_by_class('tr','select_plugin','display','none');");
|
$response->addScript("set_style_by_class('tr','select_plugin','display','none');");
|
||||||
return $no_return ? '' : $response->getXML();
|
return $no_return ? '' : $response->getXML();
|
||||||
}
|
}
|
||||||
|
|
||||||
(array)$plugins = importexport_helper_functions::get_plugins($_appname,'export');
|
(array)$plugins = importexport_helper_functions::get_plugins($_appname,'export');
|
||||||
$sel_options['plugin'] = '';
|
$sel_options['plugin'] = '';
|
||||||
$response->addScript("clear_options('exec[plugin]');");
|
$response->addScript("clear_options('exec[plugin]');");
|
||||||
@ -342,14 +346,14 @@ class importexport_export_ui {
|
|||||||
if (!$selected_plugin) $selected_plugin = $plugin;
|
if (!$selected_plugin) $selected_plugin = $plugin;
|
||||||
$response->addScript("selectbox_add_option('exec[plugin]','$plugin_name', '$plugin',".($selected_plugin == $plugin ? 'true' : 'false').");");
|
$response->addScript("selectbox_add_option('exec[plugin]','$plugin_name', '$plugin',".($selected_plugin == $plugin ? 'true' : 'false').");");
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->ajax_get_plugin_description($selected_plugin,$response);
|
$this->ajax_get_plugin_description($selected_plugin,$response);
|
||||||
$this->ajax_get_plugin_options($selected_plugin, $response, $_definition);
|
$this->ajax_get_plugin_options($selected_plugin, $response, $_definition);
|
||||||
$this->ajax_get_plugin_selectors($selected_plugin, $response, $_definition);
|
$this->ajax_get_plugin_selectors($selected_plugin, $response, $_definition);
|
||||||
$response->addScript("set_style_by_class('tr','select_plugin','display','table-row');");
|
$response->addScript("set_style_by_class('tr','select_plugin','display','table-row');");
|
||||||
return $no_return ? '' : $response->getXML();
|
return $no_return ? '' : $response->getXML();
|
||||||
}
|
}
|
||||||
|
|
||||||
public function ajax_get_definition_description($_definition, xajaxResponse &$response=null) {
|
public function ajax_get_definition_description($_definition, xajaxResponse &$response=null) {
|
||||||
$no_return = !is_null($response);
|
$no_return = !is_null($response);
|
||||||
if(is_null($response)) {
|
if(is_null($response)) {
|
||||||
@ -365,7 +369,7 @@ class importexport_export_ui {
|
|||||||
|
|
||||||
return $no_return ? '' : $response->getXML();
|
return $no_return ? '' : $response->getXML();
|
||||||
}
|
}
|
||||||
|
|
||||||
public function ajax_get_plugin_description($_plugin,&$_response=false) {
|
public function ajax_get_plugin_description($_plugin,&$_response=false) {
|
||||||
$no_return = !is_null($_response);
|
$no_return = !is_null($_response);
|
||||||
if(is_null($_response)) {
|
if(is_null($_response)) {
|
||||||
@ -384,17 +388,17 @@ class importexport_export_ui {
|
|||||||
$this->ajax_get_plugin_options($_plugin, $_response);
|
$this->ajax_get_plugin_options($_plugin, $_response);
|
||||||
}
|
}
|
||||||
unset ($plugin_object);
|
unset ($plugin_object);
|
||||||
|
|
||||||
return $no_return ? '' : $response->getXML();
|
return $no_return ? '' : $response->getXML();
|
||||||
}
|
}
|
||||||
|
|
||||||
public function ajax_get_plugin_options($_plugin,&$response=false, $definition = '') {
|
public function ajax_get_plugin_options($_plugin,&$response=false, $definition = '') {
|
||||||
$no_return = !is_null($response);
|
$no_return = !is_null($response);
|
||||||
if(is_null($response)) {
|
if(is_null($response)) {
|
||||||
$response = new xajaxResponse();
|
$response = new xajaxResponse();
|
||||||
}
|
}
|
||||||
if (!$_plugin) return $no_return ? '' : $response->getXML();
|
if (!$_plugin) return $no_return ? '' : $response->getXML();
|
||||||
|
|
||||||
$plugin_object = new $_plugin;
|
$plugin_object = new $_plugin;
|
||||||
if (is_a($plugin_object, 'importexport_iface_export_plugin')) {
|
if (is_a($plugin_object, 'importexport_iface_export_plugin')) {
|
||||||
$options = $plugin_object->get_options_etpl();
|
$options = $plugin_object->get_options_etpl();
|
||||||
@ -414,10 +418,10 @@ class importexport_export_ui {
|
|||||||
}
|
}
|
||||||
|
|
||||||
unset ($plugin_object);
|
unset ($plugin_object);
|
||||||
|
|
||||||
return $no_return ? '' : $response->getXML();
|
return $no_return ? '' : $response->getXML();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* downloads file to client and deletes it.
|
* downloads file to client and deletes it.
|
||||||
*
|
*
|
||||||
@ -428,7 +432,7 @@ class importexport_export_ui {
|
|||||||
$tmpfname = $_tmpfname ? $_tmpfname : $_GET['_filename'];
|
$tmpfname = $_tmpfname ? $_tmpfname : $_GET['_filename'];
|
||||||
$tmpfname = $GLOBALS['egw_info']['server']['temp_dir'] .'/'. $tmpfname;
|
$tmpfname = $GLOBALS['egw_info']['server']['temp_dir'] .'/'. $tmpfname;
|
||||||
if (!is_readable($tmpfname)) die();
|
if (!is_readable($tmpfname)) die();
|
||||||
|
|
||||||
$appname = $_GET['_appname'];
|
$appname = $_GET['_appname'];
|
||||||
$nicefname = 'egw_export_'.$appname.'-'.date('Y-m-d');
|
$nicefname = 'egw_export_'.$appname.'-'.date('Y-m-d');
|
||||||
|
|
||||||
@ -442,14 +446,14 @@ class importexport_export_ui {
|
|||||||
|
|
||||||
unlink($tmpfname);
|
unlink($tmpfname);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function ajax_get_plugin_selectors($_plugin,&$response=false, $definition = '') {
|
public function ajax_get_plugin_selectors($_plugin,&$response=false, $definition = '') {
|
||||||
$no_return = !is_null($response);
|
$no_return = !is_null($response);
|
||||||
if(is_null($response)) {
|
if(is_null($response)) {
|
||||||
$response = new xajaxResponse();
|
$response = new xajaxResponse();
|
||||||
}
|
}
|
||||||
if (!$_plugin) return $no_return ? '' : $response->getXML();
|
if (!$_plugin) return $no_return ? '' : $response->getXML();
|
||||||
|
|
||||||
$plugin_object = new $_plugin;
|
$plugin_object = new $_plugin;
|
||||||
if (is_a($plugin_object, 'importexport_iface_export_plugin')) {
|
if (is_a($plugin_object, 'importexport_iface_export_plugin')) {
|
||||||
$options = $plugin_object->get_selectors_etpl();
|
$options = $plugin_object->get_selectors_etpl();
|
||||||
@ -471,11 +475,11 @@ class importexport_export_ui {
|
|||||||
}
|
}
|
||||||
|
|
||||||
unset ($plugin_object);
|
unset ($plugin_object);
|
||||||
|
|
||||||
return $no_return ? '' : $response->getXML();
|
return $no_return ? '' : $response->getXML();
|
||||||
}
|
}
|
||||||
|
|
||||||
public function ajax_get_template($_name) {
|
public function ajax_get_template($_name) {
|
||||||
|
|
||||||
}
|
}
|
||||||
} // end class uiexport
|
} // end class uiexport
|
||||||
|
Loading…
x
Reference in New Issue
Block a user