1
0
mirror of https://github.com/e107inc/e107.git synced 2025-07-31 03:40:37 +02:00

SMF Forum import

This commit is contained in:
Cameron
2017-03-31 11:41:39 -07:00
parent d110d8d4e9
commit c8a1f1fe6a
4 changed files with 60 additions and 26 deletions

View File

@@ -20,26 +20,27 @@ Root classes for import and saving of data. Application-specific classes build o
class base_import_class
{
var $ourDB = NULL;
var $DBPrefix = '';
var $currentTask = '';
var $copyUserInfo = TRUE;
var $ourDB = null;
var $DBPrefix = '';
var $currentTask = '';
var $copyUserInfo = true;
protected $arrayData = array();
/**
* Connect to the external DB if not already connected
*/
function db_Connect($server, $user, $password, $database, $prefix)
function database($database, $prefix)
{
if ($this->ourDB == NULL)
{
$this->ourDB = e107::getDb('ourDB');
$result = $this->ourDB->db_Connect($server, $user, $password, $database);
$this->DBPrefix = $prefix;
$result = $this->ourDB->database($database,$prefix,true);
$this->DBPrefix = "`".$database."`.".$prefix;
if ($result)
{
return $result;
}
}
return TRUE;