1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-13 10:04:35 +02:00

Closes #2309 - AdminUI Batch Export option added.

This commit is contained in:
Cameron
2017-01-27 18:02:57 -08:00
parent 2b6ba2920f
commit ff38b2ad07
9 changed files with 122 additions and 27 deletions

View File

@@ -1711,6 +1711,10 @@ class e_model extends e_object
return e107::getParser()->parseTemplate($template, $parsesc, $this, $eVars);
}
/**
* Export a Model configuration
* @return string
*/
public function toXML()
{
$ret = "<?xml version=\"1.0\" encoding=\"utf-8\" ?>\n";
@@ -3706,4 +3710,32 @@ class e_admin_tree_model extends e_front_tree_model
}
return $ret;
}
/**
* Export Selected Data
* @param $ids
* @return null
*/
public function export($ids)
{
$ids = e107::getParser()->filter($ids,'int');
if(empty($ids))
{
return false;
}
$idstr = implode(', ', $ids);
$table = array($this->getModelTable());
$filename = "e107Export_" .$this->getModelTable()."_". date("YmdHi").".xml";
$query = $this->getFieldIdName().' IN ('.$idstr.') '; // ORDER BY '.$this->getParam('db_order') ;
e107::getXML()->e107Export(null,$table,null,array('file'=>$filename,'query'=>$query));
return null;
}
}