diff options
author | François D <franek@users.noreply.github.com> | 2017-08-23 23:06:40 +0200 |
---|---|---|
committer | François D <franek@users.noreply.github.com> | 2017-08-25 21:19:47 +0200 |
commit | a991c46eedec0efb24d0a9974b1c7fcabf8cfa66 (patch) | |
tree | fa33236c5ef67e023833c889eb52d5bed99d35bd /src/Wallabag/CoreBundle/Controller/EntryController.php | |
parent | 2490f61dca635026a3eb9b5e9b6978b1981b1172 (diff) | |
download | wallabag-a991c46eedec0efb24d0a9974b1c7fcabf8cfa66.tar.gz wallabag-a991c46eedec0efb24d0a9974b1c7fcabf8cfa66.tar.zst wallabag-a991c46eedec0efb24d0a9974b1c7fcabf8cfa66.zip |
Set a starred_at field when an entry is starred.
This date is used to sort starred entries.
Can not use Entry::timestamps method otherwise starred_at will be updated each time entry is updated.
Add an updateStar method into Entry class
A migration script has been added in order to set starred_at field.
Diffstat (limited to 'src/Wallabag/CoreBundle/Controller/EntryController.php')
-rw-r--r-- | src/Wallabag/CoreBundle/Controller/EntryController.php | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/Wallabag/CoreBundle/Controller/EntryController.php b/src/Wallabag/CoreBundle/Controller/EntryController.php index 3dcfbebe..b0b74c38 100644 --- a/src/Wallabag/CoreBundle/Controller/EntryController.php +++ b/src/Wallabag/CoreBundle/Controller/EntryController.php | |||
@@ -333,6 +333,7 @@ class EntryController extends Controller | |||
333 | $this->checkUserAction($entry); | 333 | $this->checkUserAction($entry); |
334 | 334 | ||
335 | $entry->toggleStar(); | 335 | $entry->toggleStar(); |
336 | $entry->updateStar($entry->isStarred()); | ||
336 | $this->getDoctrine()->getManager()->flush(); | 337 | $this->getDoctrine()->getManager()->flush(); |
337 | 338 | ||
338 | $message = 'flashes.entry.notice.entry_unstarred'; | 339 | $message = 'flashes.entry.notice.entry_unstarred'; |