From 4306b184c4471825f916d895b047ed03fdf58985 Mon Sep 17 00:00:00 2001 From: ArthurHoaro Date: Mon, 16 Jan 2017 12:31:08 +0100 Subject: History mechanism Use case: rest API service * saved by default in data/history * same format as datastore.php * traced events: * save/edit/delete link * change settings or plugins settings * rename tag --- application/NetscapeBookmarkUtils.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'application/NetscapeBookmarkUtils.php') 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 * @param array $files Server $_FILES parameters * @param LinkDB $linkDb Loaded LinkDB instance * @param ConfigManager $conf instance + * @param History $history History instance * * @return string Summary of the bookmark import status */ - public static function import($post, $files, $linkDb, $conf) + public static function import($post, $files, $linkDb, $conf, $history) { $filename = $files['filetoupload']['name']; $filesize = $files['filetoupload']['size']; @@ -182,6 +183,7 @@ class NetscapeBookmarkUtils $linkDb[$existingLink['id']] = $newLink; $importCount++; $overwriteCount++; + $history->updateLink($newLink); continue; } @@ -193,6 +195,7 @@ class NetscapeBookmarkUtils $newLink['shorturl'] = link_small_hash($newLink['created'], $newLink['id']); $linkDb[$newLink['id']] = $newLink; $importCount++; + $history->addLink($newLink); } $linkDb->save($conf->get('resource.page_cache')); -- cgit v1.2.3