diff options
Diffstat (limited to 'application/NetscapeBookmarkUtils.php')
-rw-r--r-- | application/NetscapeBookmarkUtils.php | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/application/NetscapeBookmarkUtils.php b/application/NetscapeBookmarkUtils.php index ab346f81..bbfde138 100644 --- a/application/NetscapeBookmarkUtils.php +++ b/application/NetscapeBookmarkUtils.php | |||
@@ -95,10 +95,11 @@ class NetscapeBookmarkUtils | |||
95 | * @param array $files Server $_FILES parameters | 95 | * @param array $files Server $_FILES parameters |
96 | * @param LinkDB $linkDb Loaded LinkDB instance | 96 | * @param LinkDB $linkDb Loaded LinkDB instance |
97 | * @param ConfigManager $conf instance | 97 | * @param ConfigManager $conf instance |
98 | * @param History $history History instance | ||
98 | * | 99 | * |
99 | * @return string Summary of the bookmark import status | 100 | * @return string Summary of the bookmark import status |
100 | */ | 101 | */ |
101 | public static function import($post, $files, $linkDb, $conf) | 102 | public static function import($post, $files, $linkDb, $conf, $history) |
102 | { | 103 | { |
103 | $filename = $files['filetoupload']['name']; | 104 | $filename = $files['filetoupload']['name']; |
104 | $filesize = $files['filetoupload']['size']; | 105 | $filesize = $files['filetoupload']['size']; |
@@ -182,6 +183,7 @@ class NetscapeBookmarkUtils | |||
182 | $linkDb[$existingLink['id']] = $newLink; | 183 | $linkDb[$existingLink['id']] = $newLink; |
183 | $importCount++; | 184 | $importCount++; |
184 | $overwriteCount++; | 185 | $overwriteCount++; |
186 | $history->updateLink($newLink); | ||
185 | continue; | 187 | continue; |
186 | } | 188 | } |
187 | 189 | ||
@@ -193,6 +195,7 @@ class NetscapeBookmarkUtils | |||
193 | $newLink['shorturl'] = link_small_hash($newLink['created'], $newLink['id']); | 195 | $newLink['shorturl'] = link_small_hash($newLink['created'], $newLink['id']); |
194 | $linkDb[$newLink['id']] = $newLink; | 196 | $linkDb[$newLink['id']] = $newLink; |
195 | $importCount++; | 197 | $importCount++; |
198 | $history->addLink($newLink); | ||
196 | } | 199 | } |
197 | 200 | ||
198 | $linkDb->save($conf->get('resource.page_cache')); | 201 | $linkDb->save($conf->get('resource.page_cache')); |