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
  Add this suggestion to a batch that can be applied as a single commit.
  This suggestion is invalid because no changes were made to the code.
  Suggestions cannot be applied while the pull request is closed.
  Suggestions cannot be applied while viewing a subset of changes.
  Only one suggestion per line can be applied in a batch.
  Add this suggestion to a batch that can be applied as a single commit.
  Applying suggestions on deleted lines is not supported.
  You must change the existing code in this line in order to create a valid suggestion.
  Outdated suggestions cannot be applied.
  This suggestion has been applied or marked resolved.
  Suggestions cannot be applied from pending reviews.
  Suggestions cannot be applied on multi-line comments.
  Suggestions cannot be applied while the pull request is queued to merge.
  Suggestion cannot be applied right now. Please check back later.
  
    
  
    
Hi.
This is the fix I have had announced here and it does the following:
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.phpto 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=createdbut 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/upgradedata/schema(I did not test the postgresql version!). However I was not sure on how to perform the upgrade. I foundwww/upgrade.phpwhich 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.