X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=include%2Fuimport.php;h=4cc5b6c04b3f14d17b87c6c9d254968f4bdd54fc;hb=9521f39ebea7603098e4f96f5edb6c85a40fc646;hp=0d9ffc35fca2f001fcf6df23db1f03a1e8fd8da5;hpb=b580c238445100e95b2b43343a82d0e5f7a14630;p=friendica.git diff --git a/include/uimport.php b/include/uimport.php index 0d9ffc35fc..4cc5b6c04b 100644 --- a/include/uimport.php +++ b/include/uimport.php @@ -11,14 +11,11 @@ define("IMPORT_DEBUG", False); function last_insert_id() { global $db; + if (IMPORT_DEBUG) return 1; - if ($db->mysqli) { - $thedb = $db->getdb(); - return $thedb->insert_id; - } else { - return mysql_insert_id(); - } + + return $db->insert_id(); } function last_error() { @@ -78,7 +75,7 @@ function import_cleanup($newuid) { q("DELETE FROM `pconfig` WHERE uid = %d", $newuid); } -function import_account(&$a, $file) { +function import_account(App $a, $file) { logger("Start user import from " . $file['tmp_name']); /* STEPS @@ -186,8 +183,8 @@ function import_account(&$a, $file) { } } if ($contact['uid'] == $olduid && $contact['self'] == '0') { - // set contacts 'avatar-date' to "0000-00-00 00:00:00" to let poller to update urls - $contact["avatar-date"] = "0000-00-00 00:00:00" ; + // set contacts 'avatar-date' to NULL_DATE to let poller to update urls + $contact["avatar-date"] = NULL_DATE; switch ($contact['network']) {