mirror of
https://github.com/e107inc/e107.git
synced 2025-08-17 03:54:09 +02:00
Multi-site work in progress.
This commit is contained in:
@@ -984,9 +984,14 @@ class xmlClass
|
||||
* @param boolean $debug [optional]
|
||||
* @return array with keys 'success' and 'failed' - DB table entry status.
|
||||
*/
|
||||
public function e107Import($file, $mode='replace', $noLogs = false, $debug=FALSE)
|
||||
public function e107Import($file, $mode='replace', $noLogs = false, $debug=FALSE, $sql = null)
|
||||
{
|
||||
|
||||
if($sql == null)
|
||||
{
|
||||
$sql = e107::getDB();
|
||||
}
|
||||
|
||||
$xmlArray = $this->loadXMLfile($file, 'advanced');
|
||||
|
||||
if($debug)
|
||||
@@ -1047,11 +1052,11 @@ class xmlClass
|
||||
|
||||
$insert_array[$fieldkey] = $fieldval;
|
||||
}
|
||||
if(($mode == "replace") && e107::getDB()->db_Replace($table, $insert_array)!==FALSE)
|
||||
if(($mode == "replace") && $sql->replace($table, $insert_array)!==FALSE)
|
||||
{
|
||||
$ret['success'][] = $table;
|
||||
}
|
||||
elseif(($mode == "add") && e107::getDB()->db_Insert($table, $insert_array)!==FALSE)
|
||||
elseif(($mode == "add") && $sql->insert($table, $insert_array)!==FALSE)
|
||||
{
|
||||
$ret['success'][] = $table;
|
||||
}
|
||||
|
Reference in New Issue
Block a user