Skip to content
This repository was archived by the owner on Dec 16, 2019. It is now read-only.

Fix: Detect deletion of bookmark via api/posts_update.php #8

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

pascalfree
Copy link
Contributor

Hi.

This is the fix I have had announced here and it does the following:

  1. Whenever a Bookmark is deleted, store the datetime of deletion in the database
  2. In api/posts_update.php, use the date of the most recently modified bookmark (still existing) or the last deletion date, whichever happened more recently.

Additionally I changed the default behaviour of the api/posts_update.php to return the last modification time instead of creation time, because delicious fixed this as well. I left the option to get the created time using ?datemode=created but I think that could be removed entirely.

The fix needs an upgrade of the database. I wrote the SQL queries in the files in data/upgrade data/schema (I did not test the postgresql version!). However I was not sure on how to perform the upgrade. I found www/upgrade.php which was used for previous upgrades, but I though I'd ask you first how you would prefer to perform this upgrade.
EDIT: I found the update instructions in doc/UPGRADE.txt. So I assume I should add a note there?

Additionally, I think it may be a good idea to have an api function, that returns the version of semantic scuttle (or maybe even return it in api/posts_update.php). This can then be used by clients to determine, if e.g. deletions are detectable and take action to account for that.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant