Re: [Semanticscuttle-devel] getBookmarks() tag problems / user session problems
Brought to you by:
cweiske
From: Christian W. <cw...@cw...> - 2011-05-22 08:41:27
|
Hello Mark, > I knew this was going to be an issue because I remember it was working > for you earlier, but not for me. I changed it and it worked for me, > but stopped working for you. Looked at it again and made some final > tweaks. It ended up being a two part issue - partly a timezone issue, > and partly a strtodate() issue. When "today" is called, it doesn't > specify time. So I changed it to "now". Additionally, the 24 hours > ago plus 1 hour (which is to equal 25 hours ago) was incorrect. > Needed a -1 on the hour as well. Anyway, I think we're good now. > Give it a look tomorrow. 1. The tests run now for me, too - but I'm not happy with the change you introduced, and that is changing from "gmdate" to "date". Using gmdate returns the UTC time, which is awesome because we can move to another server in a different location on the world and still have the same outputs. Also, with UTC dates, we can localize the dates for the current time zone of the user without problems. I saw that you changed gmdate to date in src/SemanticScuttle/Service/Bookmark.php, which is something that should not be necessary. The rest of the code still has gmdate anyway. 2. In www/ajaxGetNewPrivateKey.php, please use the new header as you see it from i.e. www/api/posts_add.php, and please use AGPL v3 or later as license if you're ok with that. The AGPL (Affero GPL) plugs a hole in the GPL license that occurs when you're distributing code for web apps. The GPL requires you to contribute the changes back to the public when you distribute the software to the customer. With web apps, this mostly does never happen since the software keeps to be installed on the server only. With AGPL, people need to contribute their changes to the code back when they make the software available, that is if they publicize the web app installation - which is better suited for us. 3. There is no docblock for getNewPrivateKey in www/jsScuttle.php 4. www/rss.php still has $isTempLogin, which we don't want (see the mail I explained about crashes and so). loginPrivateKey in src/SemanticScuttle/Service/User.php writes into the session instead of using the revamped setCurrentUserId(). 5. I'd like to see tests that verify the private rss links are available in the header everywhere they should occur. You should do that in tests/www/$relevantfile.php, loading the page with SimpleXML and doing an xpath query on it to find the rss feed. Examples for that are in Api/OpenSearchTest.php and www/bookmarksTest.php. Your query should be like 6. The title of the feed on the main page is "$page: (private) $username" instead of "Recent bookmarks (+private)". IIRC the feed there should show all bookmarks + the user's private/shared ones. -- Regards/Mit freundlichen Grüßen Christian Weiske -=≡ Geeking around in the name of science since 1982 ≡=- |