Fix a bug happening when importing links with override option

The shorturl would be set to null, generating a lot of warnings and breaking permalinks
This commit is contained in:
ArthurHoaro 2017-05-07 18:02:49 +02:00
parent a4af59f471
commit 28794b69cb

View file

@ -180,6 +180,7 @@ public static function import($post, $files, $linkDb, $conf, $history)
$newLink['id'] = $existingLink['id']; $newLink['id'] = $existingLink['id'];
$newLink['created'] = $existingLink['created']; $newLink['created'] = $existingLink['created'];
$newLink['updated'] = new DateTime(); $newLink['updated'] = new DateTime();
$newLink['shorturl'] = $existingLink['shorturl'];
$linkDb[$existingLink['id']] = $newLink; $linkDb[$existingLink['id']] = $newLink;
$importCount++; $importCount++;
$overwriteCount++; $overwriteCount++;