Yesterday I realized, that our internal office installation of Scuttle (SF project page) suffered a minor bug: it kept on sorting all bookmarks by date, but in ascending order, i.e. the oldest bookmark was displayed first.
After doing some research, I quickly found out that this seems to be a “bug” (well the devs say it isn’t but one can argue…) of MySQL, caused by an optimization of a
SELECT DISTINCT queries.
So I patched services/bookmarkservice.php and removed the DISTINCT keyword in the SQL-query of getBookmarks() (line 249, version 0.7.2). Up to now, I did not experience any duplicate lines caused by this. I think, I’m going to report this minor issue upstream.
Update: hmm, ups, when searching, you will most certainly get duplicate results… I’ll check in the evening.
Update 2: Ok, so I wrote a litte more extensive patch, by wrapping the original
SELECT DISTINCT statement as a subselect and ordering the result as such. This now really works.
The patch for 0.7.2 can be downloaded here. You have to apply it to
Update 3: Ok, I somehow managed to delete the patch file. I am sorry. I will look if I can find it in any of the old backups, but I am not too convinced about this.