1
0
mirror of https://github.com/e107inc/e107.git synced 2025-03-19 20:09:47 +01:00

Merge pull request #2550 from yesszus/patch-5

Update e107_plugins/import
This commit is contained in:
Cameron 2017-04-02 08:43:12 -07:00 committed by GitHub
commit aeaf07b9b4
7 changed files with 98 additions and 81 deletions

View File

@ -94,19 +94,19 @@ class import_main_ui extends e_admin_ui
// Definitions of available areas to import
protected $importTables = array(
'users' => array('message' => LAN_CONVERT_25, 'classfile' => 'import_user_class.php', 'classname' => 'user_import'),
'userclass' => array('message' => "Userclasses", 'nolist'=>true, 'classfile' => 'import_user_class.php', 'classname' => 'userclass_import'),
'userclass' => array('message' => LAN_CONVERT_73, 'nolist'=>true, 'classfile' => 'import_user_class.php', 'classname' => 'userclass_import'),
'news' => array('message' => LAN_CONVERT_28, 'classfile' => 'import_news_class.php', 'classname' => 'news_import'),
'newscategory' => array('message' => "News Categories", 'nolist'=>true, 'classfile' => 'import_news_class.php', 'classname' => 'newscategory_import'),
'newscategory' => array('message' => LAN_CONVERT_74, 'nolist'=>true, 'classfile' => 'import_news_class.php', 'classname' => 'newscategory_import'),
'page' => array('message' => "Pages", 'classfile' => 'import_page_class.php', 'classname' => 'page_import'),
'pagechapter' => array('message' => "Page Chapters", 'nolist'=>true, 'classfile' => 'import_page_class.php', 'classname' => 'pagechapter_import'),
'links' => array('message' => "Links", 'classfile' => 'import_links_class.php', 'classname' => 'links_import'),
'media' => array('message' => "Media", 'classfile' => 'import_media_class.php', 'classname' => 'media_import'),
'forum' => array('message' => "Forum", 'classfile' => 'import_forum_class.php', 'classname' => 'forum_import'),
'forumthread' => array('message' => "Forum Topics/Threads", 'classfile' => 'import_forum_class.php', 'classname' => 'forumthread_import', 'nolist'=>true),
'forumpost' => array('message' => "Forum Posts", 'classfile' => 'import_forum_class.php', 'classname' => 'forumpost_import', 'nolist'=>true),
'forumtrack' => array('message' => "Forum Track", 'classfile' => 'import_forum_class.php', 'classname' => 'forumtrack_import', 'nolist'=>true),
'page' => array('message' => LAN_CONVERT_65, 'classfile' => 'import_page_class.php', 'classname' => 'page_import'),
'pagechapter' => array('message' => LAN_CONVERT_66, 'nolist'=>true, 'classfile' => 'import_page_class.php', 'classname' => 'pagechapter_import'),
'links' => array('message' => LAN_CONVERT_67, 'classfile' => 'import_links_class.php', 'classname' => 'links_import'),
'media' => array('message' => LAN_CONVERT_68, 'classfile' => 'import_media_class.php', 'classname' => 'media_import'),
'forum' => array('message' => LAN_CONVERT_69, 'classfile' => 'import_forum_class.php', 'classname' => 'forum_import'),
'forumthread' => array('message' => LAN_CONVERT_70, 'classfile' => 'import_forum_class.php', 'classname' => 'forumthread_import', 'nolist'=>true),
'forumpost' => array('message' => LAN_CONVERT_71, 'classfile' => 'import_forum_class.php', 'classname' => 'forumpost_import', 'nolist'=>true),
'forumtrack' => array('message' => LAN_CONVERT_72, 'classfile' => 'import_forum_class.php', 'classname' => 'forumtrack_import', 'nolist'=>true),
// 'comments' => array('message'=> LAN_COMMENTS),
// 'polls' => array('message' => LAN_CONVERT_27)
@ -310,7 +310,7 @@ class import_main_ui extends e_admin_ui
$text .= "
<td class='center middle'>";
$text .= $frm->admin_button('type', $k, 'other',"Select");
$text .= $frm->admin_button('type', $k, 'other',LAN_CONVERT_64);
// $text .= $frm->admin_button('import_type', $k, 'other',"Select");
$text .= "
@ -1686,4 +1686,4 @@ function headerjs()
?>
?>

View File

@ -93,13 +93,13 @@ class forum_import
function getErrorText($errnum) // these errors are presumptuous and misleading. especially '4' .
{
$errorTexts = array(
0 => 'No error',
1 => 'Can\'t change main admin data',
2 => 'invalid field passed',
3 => 'Mandatory field not set',
4 => 'Entry already exists',
5 => 'Invalid characters in user or login name',
6 => 'Error saving extended user fields'
0 => LAN_CONVERT_57,
1 => LAN_CONVERT_58,
2 => LAN_CONVERT_59,
3 => LAN_CONVERT_60,
4 => LAN_CONVERT_61,
5 => LAN_CONVERT_62,
6 => LAN_CONVERT_63
);
if (isset($errorTexts[$errnum])) return $errorTexts[$errnum];
@ -197,13 +197,13 @@ class forumthread_import
function getErrorText($errnum) // these errors are presumptuous and misleading. especially '4' .
{
$errorTexts = array(
0 => 'No error',
1 => 'Can\'t change main admin data',
2 => 'invalid field passed',
3 => 'Mandatory field not set',
4 => 'Entry already exists',
5 => 'Invalid characters in user or login name',
6 => 'Error saving extended user fields'
0 => LAN_CONVERT_57,
1 => LAN_CONVERT_58,
2 => LAN_CONVERT_59,
3 => LAN_CONVERT_60,
4 => LAN_CONVERT_61,
5 => LAN_CONVERT_62,
6 => LAN_CONVERT_63
);
if (isset($errorTexts[$errnum])) return $errorTexts[$errnum];
@ -307,13 +307,13 @@ class forumpost_import
function getErrorText($errnum) // these errors are presumptuous and misleading. especially '4' .
{
$errorTexts = array(
0 => 'No error',
1 => 'Can\'t change main admin data',
2 => 'invalid field passed',
3 => 'Mandatory field not set',
4 => 'Entry already exists',
5 => 'Invalid characters in user or login name',
6 => 'Error saving extended user fields'
0 => LAN_CONVERT_57,
1 => LAN_CONVERT_58,
2 => LAN_CONVERT_59,
3 => LAN_CONVERT_60,
4 => LAN_CONVERT_61,
5 => LAN_CONVERT_62,
6 => LAN_CONVERT_63
);
if (isset($errorTexts[$errnum])) return $errorTexts[$errnum];
@ -402,13 +402,13 @@ class forumtrack_import
function getErrorText($errnum) // these errors are presumptuous and misleading. especially '4' .
{
$errorTexts = array(
0 => 'No error',
1 => 'Can\'t change main admin data',
2 => 'invalid field passed',
3 => 'Mandatory field not set',
4 => 'Entry already exists',
5 => 'Invalid characters in user or login name',
6 => 'Error saving extended user fields'
0 => LAN_CONVERT_57,
1 => LAN_CONVERT_58,
2 => LAN_CONVERT_59,
3 => LAN_CONVERT_60,
4 => LAN_CONVERT_61,
5 => LAN_CONVERT_62,
6 => LAN_CONVERT_63
);
if (isset($errorTexts[$errnum])) return $errorTexts[$errnum];
@ -423,4 +423,4 @@ class forumtrack_import
?>
?>

View File

@ -107,13 +107,13 @@ class links_import
function getErrorText($errnum) // these errors are presumptuous and misleading. especially '4' .
{
$errorTexts = array(
0 => 'No error',
1 => 'Can\'t change main admin data',
2 => 'invalid field passed',
3 => 'Mandatory field not set',
4 => 'Entry already exists',
5 => 'Invalid characters in user or login name',
6 => 'Error saving extended user fields'
0 => LAN_CONVERT_57,
1 => LAN_CONVERT_58,
2 => LAN_CONVERT_59,
3 => LAN_CONVERT_60,
4 => LAN_CONVERT_61,
5 => LAN_CONVERT_62,
6 => LAN_CONVERT_63
);
if (isset($errorTexts[$errnum])) return $errorTexts[$errnum];
@ -127,4 +127,4 @@ class links_import
}
?>
?>

View File

@ -116,13 +116,13 @@ class news_import
function getErrorText($errnum) // these errors are presumptuous and misleading. especially '4' .
{
$errorTexts = array(
0 => 'No error',
1 => 'Can\'t change main admin data',
2 => 'invalid field passed',
3 => 'Mandatory field not set',
4 => 'Entry already exists',
5 => 'Invalid characters in user or login name',
6 => 'Error saving extended user fields'
0 => LAN_CONVERT_57,
1 => LAN_CONVERT_58,
2 => LAN_CONVERT_59,
3 => LAN_CONVERT_60,
4 => LAN_CONVERT_61,
5 => LAN_CONVERT_62,
6 => LAN_CONVERT_63
);
if (isset($errorTexts[$errnum])) return $errorTexts[$errnum];
@ -220,4 +220,4 @@ class newscategory_import
}
?>
?>

View File

@ -226,13 +226,13 @@ class pagechapter_import
function getErrorText($errnum) // these errors are presumptuous and misleading. especially '4' .
{
$errorTexts = array(
0 => 'No error',
1 => 'Can\'t change main admin data',
2 => 'invalid field passed',
3 => 'Mandatory field not set',
4 => 'Entry already exists',
5 => 'Invalid characters in user or login name',
6 => 'Error saving extended user fields'
0 => LAN_CONVERT_57,
1 => LAN_CONVERT_58,
2 => LAN_CONVERT_59,
3 => LAN_CONVERT_60,
4 => LAN_CONVERT_61,
5 => LAN_CONVERT_62,
6 => LAN_CONVERT_63
);
if (isset($errorTexts[$errnum])) return $errorTexts[$errnum];
@ -246,4 +246,4 @@ class pagechapter_import
}
?>
?>

View File

@ -238,13 +238,13 @@ class user_import
function getErrorText($errnum) // these errors are presumptuous and misleading. especially '4' .
{
$errorTexts = array(
0 => 'No error',
1 => 'Can\'t change main admin data',
2 => 'invalid field passed',
3 => 'Mandatory field not set',
4 => 'User already exists',
5 => 'Invalid characters in user or login name',
6 => 'Error saving extended user fields'
0 => LAN_CONVERT_57,
1 => LAN_CONVERT_58,
2 => LAN_CONVERT_59,
3 => LAN_CONVERT_60,
4 => LAN_CONVERT_61,
5 => LAN_CONVERT_62,
6 => LAN_CONVERT_63
);
if (isset($errorTexts[$errnum])) return $errorTexts[$errnum];
@ -339,13 +339,13 @@ class userclass_import
function getErrorText($errnum) // these errors are presumptuous and misleading. especially '4' .
{
$errorTexts = array(
0 => 'No error',
1 => 'Can\'t change main admin data',
2 => 'invalid field passed',
3 => 'Mandatory field not set',
4 => 'Entry already exists',
5 => 'Invalid characters in user or login name',
6 => 'Error saving extended user fields'
0 => LAN_CONVERT_57,
1 => LAN_CONVERT_58,
2 => LAN_CONVERT_59,
3 => LAN_CONVERT_60,
4 => LAN_CONVERT_61,
5 => LAN_CONVERT_62,
6 => LAN_CONVERT_63
);
if (isset($errorTexts[$errnum])) return $errorTexts[$errnum];
@ -360,4 +360,4 @@ class userclass_import
?>
?>

View File

@ -75,7 +75,6 @@ define("LAN_CONVERT_45","Cannot read import code file");
define("LAN_CONVERT_46","Error: --ERRNUM-- while writing to --DB-- database, line ");
define("LAN_CONVERT_47","Batch --BLOCK-- import completed. --LINES-- read, --USERS-- added, --ERRORS-- errors");
define("LAN_CONVERT_48","Forum posts");
define("LAN_CONVERT_49","Drupal");
define("LAN_CONVERT_50","Basic import");
define("LAN_CONVERT_51","The version of targeted Drupal.");
@ -84,3 +83,21 @@ define("LAN_CONVERT_53","The base URL of Drupal website (e.g., http://mydrupalsi
define("LAN_CONVERT_54","Drupal Base URL");
define("LAN_CONVERT_55","The base URL path (i.e., directory) of the Drupal installation (e.g., /drupal/).");
define("LAN_CONVERT_56","Drupal Base Path");
define("LAN_CONVERT_57", "No error");
define("LAN_CONVERT_58", "Can\'t change main admin data");
define("LAN_CONVERT_59", "invalid field passed");
define("LAN_CONVERT_60", "Mandatory field not set");
define("LAN_CONVERT_61", "User already exists");
define("LAN_CONVERT_62", "Invalid characters in user or login name");
define("LAN_CONVERT_63", "Error saving extended user fields");
define("LAN_CONVERT_64", "Select");
define("LAN_CONVERT_65", "Pages");
define("LAN_CONVERT_66", "Page Chapters");
define("LAN_CONVERT_67", "Links");
define("LAN_CONVERT_68", "Media");
define("LAN_CONVERT_69", "Forum");
define("LAN_CONVERT_70", "Forum Topics/Threads");
define("LAN_CONVERT_71", "Forum Posts");
define("LAN_CONVERT_72", "Forum Track");
define("LAN_CONVERT_73", "Userclasses");
define("LAN_CONVERT_74", "News Categories");