diff options
author | ArthurHoaro <arthur@hoa.ro> | 2017-05-06 17:12:06 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-05-06 17:12:06 +0200 |
commit | f9ff7f1b69f19b42569ffa67280807ba56f5d48a (patch) | |
tree | 22126f1de7aac6c03a0b2c609380057740b840ac /application/NetscapeBookmarkUtils.php | |
parent | a271c5f34f99bab38a167d491b69e5942cd6da94 (diff) | |
parent | d16ca2e22f3d7325fc9593fccd8523eebe226567 (diff) | |
download | Shaarli-f9ff7f1b69f19b42569ffa67280807ba56f5d48a.tar.gz Shaarli-f9ff7f1b69f19b42569ffa67280807ba56f5d48a.tar.zst Shaarli-f9ff7f1b69f19b42569ffa67280807ba56f5d48a.zip |
Merge pull request #764 from ArthurHoaro/feature/history
History mechanism
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')); |