]> git.mxchange.org Git - friendica.git/blobdiff - include/uimport.php
merged 2 if() into one as requested by CR
[friendica.git] / include / uimport.php
index b774d78c6d6e5578060e541833d75e8e09add95d..4cc5b6c04b3f14d17b87c6c9d254968f4bdd54fc 100644 (file)
@@ -11,14 +11,11 @@ define("IMPORT_DEBUG", False);
 \r
 function last_insert_id() {\r
        global $db;\r
+\r
        if (IMPORT_DEBUG)\r
                return 1;\r
-       if ($db->mysqli) {\r
-               $thedb = $db->getdb();\r
-               return $thedb->insert_id;\r
-       } else {\r
-               return mysql_insert_id();\r
-       }\r
+\r
+       return $db->insert_id();\r
 }\r
 \r
 function last_error() {\r
@@ -186,8 +183,8 @@ function import_account(App $a, $file) {
                        }\r
                }\r
                if ($contact['uid'] == $olduid && $contact['self'] == '0') {\r
-                       // set contacts 'avatar-date' to "0000-00-00 00:00:00" to let poller to update urls\r
-                       $contact["avatar-date"] = "0000-00-00 00:00:00" ;\r
+                       // set contacts 'avatar-date' to NULL_DATE to let poller to update urls\r
+                       $contact["avatar-date"] = NULL_DATE;\r
 \r
 \r
                        switch ($contact['network']) {\r