mirror of
https://github.com/e107inc/e107.git
synced 2025-08-13 18:14:26 +02:00
Allow for importing of table data from e107 v1.x "Content Management" plugin into "Pages/Menus" tables.
This commit is contained in:
@@ -41,14 +41,14 @@ class page_import
|
||||
'page_metakeys' => '',
|
||||
'page_metadscr' => '',
|
||||
'page_text' => '',
|
||||
'page_author' => 1,
|
||||
'page_author' => USERID,
|
||||
'page_datestamp' => '',
|
||||
'page_rating_flag' => '0',
|
||||
'page_comment_flag' => '0',
|
||||
'page_password' => '',
|
||||
'page_class' => '0',
|
||||
'page_ip_restrict' => '',
|
||||
'menu_name' => '',
|
||||
'menu_name' => '',
|
||||
'page_template' => 'default'
|
||||
|
||||
);
|
||||
@@ -61,15 +61,14 @@ class page_import
|
||||
// Constructor
|
||||
function __construct()
|
||||
{
|
||||
global $sql;
|
||||
$this->pageDB = new db; // Have our own database object to write to the table
|
||||
$this->pageDB = e107::getDb('page'); // Have our own database object to write to the table
|
||||
}
|
||||
|
||||
|
||||
// Empty the DB - not necessary
|
||||
function emptyTargetDB($inc_admin = FALSE)
|
||||
{
|
||||
// $this->pageDB->db_Delete('page');
|
||||
$this->pageDB->truncate('page');
|
||||
}
|
||||
|
||||
|
||||
@@ -95,7 +94,7 @@ class page_import
|
||||
*/
|
||||
function saveData($row)
|
||||
{
|
||||
if(!$result = $this->pageDB->db_Insert('page',$row))
|
||||
if(!$result = $this->pageDB->insert('page',$row))
|
||||
{
|
||||
return 4;
|
||||
}
|
||||
@@ -109,6 +108,7 @@ class page_import
|
||||
|
||||
function getErrorText($errnum) // these errors are presumptuous and misleading. especially '4' .
|
||||
{
|
||||
return $this->pageDB->getLastErrorText();
|
||||
$errorTexts = array(
|
||||
0 => 'No error',
|
||||
1 => 'Can\'t change main admin data',
|
||||
|
Reference in New Issue
Block a user