X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=application%2FHistory.php;h=bd5c1bf7318b63cec18905f99075b5c3a89c3a40;hb=85c09fe3799db606a3d117c370bc63965e4a8554;hp=a58466528050e2efb4aee4dbccb59f3629e42041;hpb=905f8675a728841b03b300d2c7dc909a1c4f7f03;p=github%2Fshaarli%2FShaarli.git diff --git a/application/History.php b/application/History.php index a5846652..bd5c1bf7 100644 --- a/application/History.php +++ b/application/History.php @@ -3,6 +3,8 @@ namespace Shaarli; use DateTime; use Exception; +use Shaarli\Bookmark\Bookmark; +use Shaarli\Helper\FileUtils; /** * Class History @@ -20,7 +22,7 @@ use Exception; * - UPDATED: link updated * - DELETED: link deleted * - SETTINGS: the settings have been updated through the UI. - * - IMPORT: bulk links import + * - IMPORT: bulk bookmarks import * * Note: new events are put at the beginning of the file and history array. */ @@ -96,31 +98,31 @@ class History /** * Add Event: new link. * - * @param array $link Link data. + * @param Bookmark $link Link data. */ public function addLink($link) { - $this->addEvent(self::CREATED, $link['id']); + $this->addEvent(self::CREATED, $link->getId()); } /** * Add Event: update existing link. * - * @param array $link Link data. + * @param Bookmark $link Link data. */ public function updateLink($link) { - $this->addEvent(self::UPDATED, $link['id']); + $this->addEvent(self::UPDATED, $link->getId()); } /** * Add Event: delete existing link. * - * @param array $link Link data. + * @param Bookmark $link Link data. */ public function deleteLink($link) { - $this->addEvent(self::DELETED, $link['id']); + $this->addEvent(self::DELETED, $link->getId()); } /** @@ -134,7 +136,7 @@ class History /** * Add Event: bulk import. * - * Note: we don't store links add/update one by one since it can have a huge impact on performances. + * Note: we don't store bookmarks add/update one by one since it can have a huge impact on performances. */ public function importLinks() {