diff --git a/htdocs/core/modules/import/import_csv.modules.php b/htdocs/core/modules/import/import_csv.modules.php
index 9f5a31109a8..594ab96d955 100644
--- a/htdocs/core/modules/import/import_csv.modules.php
+++ b/htdocs/core/modules/import/import_csv.modules.php
@@ -726,7 +726,7 @@ class ImportCsv extends ModeleImports
}
// Define $listfields and $listvalues to build SQL request
- if ($conf->socialnetworks->enabled && strpos($fieldname, "socialnetworks") !== false) {
+ if (isModEnabled("socialnetworks") && strpos($fieldname, "socialnetworks") !== false) {
if (!in_array("socialnetworks", $listfields)) {
$listfields[] = "socialnetworks";
}
@@ -840,7 +840,7 @@ class ImportCsv extends ModeleImports
foreach ($updatekeys as $key) {
$col = $objimport->array_import_updatekeys[0][$key];
$key = preg_replace('/^.*\./i', '', $key);
- if ($conf->socialnetworks->enabled && strpos($key, "socialnetworks") !== false) {
+ if (isModEnabled("socialnetworks") && strpos($key, "socialnetworks") !== false) {
$tmp = explode("_", $key);
$key = $tmp[0];
$socialnetwork = $tmp[1];
diff --git a/htdocs/imports/import.php b/htdocs/imports/import.php
index 3db5ef13ef5..60c51734aef 100644
--- a/htdocs/imports/import.php
+++ b/htdocs/imports/import.php
@@ -1910,8 +1910,8 @@ if ($step == 5 && $datatoimport) {
print '
';
print '