Commit Graph

11439 Commits

Author SHA1 Message Date
Brion Vibber
35507cd039 Fix ticket #2392: sending invitation email fails when site name contains double quotes
Gotta escape quotes!
2011-01-06 17:43:00 -08:00
Brion Vibber
36711f305a Ticket #1968: fix favoriting, reply when using InfiniteScroll 2011-01-06 16:53:39 -08:00
Brion Vibber
f97380fdb5 Fix regression in last year's update of InfiniteScroll -- having debug off caused breakage due to bad code interpreting every variable as a selector, and jQuery then failing when passed 'false'.
Note that the current version of the infinitescroll jquery plugin fixes this, but I'm not updating to it because the code's been altered from the upstream version, apparently to stop it from actually working as infinite scroll. WTF? :)
2011-01-06 16:36:57 -08:00
Brion Vibber
7ec456198a Ticket #2732: add some regression tests for groups to OStatus remote-tests.php
Note that these tests won't pass on master branch yet as the join/leave don't work, and there's a bug in Activity parsing which prevents interop between new feeds and old remote subscribers (both fixed in this branch).
2011-01-06 15:13:38 -08:00
Brion Vibber
f2a43769e7 Fix for atom/activity streams parsing: feed's <activity:subject> was being taken at a higher priority than entry's <atom:author>, which broke OStatus group posting since we retired <activity:actor>.
Added test case to ActivityParseTests.
2011-01-06 15:13:38 -08:00
Brion Vibber
edf8101b29 allow group join/leave commands in api posting, at least for the moment (no other way to do remote subscribe without a preexisting local id number via api) 2011-01-06 13:46:39 -08:00
Brion Vibber
281076d5f6 Fix for PHP notice spew in group creation via API: set default 'mainpage' in User_group::register() rather than forcing all callers to do it manually. 2011-01-06 13:22:44 -08:00
Brion Vibber
4b29d0ebb6 Merge branch 'testing-sig' of gitorious.org:~brion/statusnet/brion-fixes into testing 2011-01-05 16:04:32 -08:00
Brion Vibber
1d15145993 Salmon signature checks on incoming slaps now check both old and new signature formats. 2011-01-06 00:01:42 +00:00
Brion Vibber
437ac120b0 Outgoing Salmon slaps now use the corrected signature format; if the first hit is rejected with an HTTP error, we try again with the old format.
(This is not 100% ideal; possibly should try to distinguish between server errors and rejections, etc.)
2011-01-05 23:54:16 +00:00
Brion Vibber
f5650806cc Switch autoloader from '__autoload' magic function name to registering our function with spl_autoload_register(); fixes compat problem with PHPUnit 3.5+ which seems to break the old __autoload 2011-01-05 23:27:17 +00:00
Brion Vibber
946a4ac17b Add test cases for internal change in Salmon signing; fix for the new code.
Updated sig passes Tuomas's verifier, which is a good sign
2011-01-05 23:26:39 +00:00
Brion Vibber
e25c34a2b6 Salmon slap / magicsig test script
Given a notice in the local system, we package it up as an Atom entry and MagicSig it up.
We run the magicenv verification on it locally to make sure our own functions can decode it.
Optionally with --verify we can send to Tuomas Koski's verification test service (not sure if this is working 100%)
If given --slap= with a target Salmon endpoint, we'll sent it on and see if it liked it. (Note that StatusNet will reject if there's not a relevant mention, but will report acceptance for dupes so you can use a message that's already been delivered as a test.)
2011-01-05 14:27:53 -08:00
Brion Vibber
51d1535f15 Added doc comments on Salmon magicsig-related stuff to help in figuring out what's going on 2011-01-05 14:05:59 -08:00
Evan Prodromou
60d8fcd0e7 Revert "Revert "0.9.7alpha1""
This reverts commit fd20554651.

Conflicts:

	lib/common.php
2011-01-05 10:52:44 -08:00
Brion Vibber
021fa25e8d Merge branch '0.9.x' into testing 2011-01-05 09:41:29 -08:00
Brion Vibber
19a3b28898 Remove json2 author's "don't hotlink my script pls" alert line from our local copy of json2.js :D
Added json2.min.js to the makefile so it can be updated easily when json2.js changes.
2011-01-05 09:39:36 -08:00
Evan Prodromou
3dcf8f1ef6 change bookmark-info from a <p> to a <div> 2011-01-04 13:10:32 -08:00
Brion Vibber
af1cbc6fe3 Fix ticket #2181: Can't save #000000 (black) in color fields on design page
It seems to have actually been saving correctly, but the update of the colors on the form success page wasn't working properly.
When a design object is pulled out of the database, the numeric fields are read in as strings, so black comes back as "0".
But, when we populate the new object and then stick it live, we've populated it with actual integers; with memcache on these might live for a while in the cache...

The fallback code in Design::toWebColor() did a check ($color == null) which would be false for the string "0", but counts as true for the *integer* 0.
Thus, the display code would initially interpret the correctly-saved black color as "use default".

Changing the check to === against null and "" empty string avoids the false positive on integers, and lets us see our nice black text immediately after save.
2011-01-04 13:09:44 -08:00
Brion Vibber
6e894c010f Merge branch 'master' of gitorious.org:statusnet/mainline into 0.9.x 2011-01-04 12:14:08 -08:00
Brion Vibber
fb9ecddbf1 Ticket #2649: fix for undefined $base_url in lighttpd code path
The $base_url var is never defined, and the code has actually always been wrong since it was added.
Just removing it seems to work fine :)
2011-01-04 12:07:52 -08:00
Brion Vibber
523d27501b Typo fix: http://status.net/open-source/issues/2976 2011-01-04 11:03:42 -08:00
Evan Prodromou
a7e5c58a82 Merge branch 'revertversion' into 0.9.x 2011-01-03 10:51:42 -08:00
Evan Prodromou
fd20554651 Revert "0.9.7alpha1"
This reverts commit 3d62c1cf51.
2011-01-03 10:51:29 -08:00
Evan Prodromou
98a0d7f538 Configuration options for using an HTTP proxy
We can make a lot of HTTP requests from the server side. This change
adds some configuration options for using an HTTP proxy, which can
cache hits from multiple sites (good for status.net-like services, for example).
2011-01-03 10:38:32 -08:00
Brion Vibber
ae59046b1e Bookmark plugin: tweak post-upload success message to distinguish between "already done" (UnQueueManager) and "started, should finish eventually" (other queue manager) 2010-12-31 12:42:26 -08:00
Brion Vibber
3368c33be7 Bookmark plugin: fix for delicious import with queues enabled
We were passing DOM nodes directly into the queues for the final bookmark import stage; unfortunately these don't actually survive serialization.
Moved the extraction of properties from the HTML up to the first-stage handler, so now we don't have to worry about moving DOM nodes from one handler to the next. Instead passing an associative array of properties, which is fed into the Bookmark::saveNew by the per-bookmark handler.
2010-12-31 12:33:51 -08:00
Brion Vibber
fedfde9bbb Bookmark plugin: fixes for bad DOM element nesting in delicious import data
delicious bookmark exports use the godawful HTML bookmark file format that ancient versions of Netscape used (and has thus been the common import/export format for bookmarks since the dark ages of the web :)
This arranges bookmark entries as an HTML definition list, using a lot of implied close tags (leaving off the </dt> and </dd>).
DOMDocument->loadHTML() uses libxml2's HTML mode, which generally does ok with muddling through things but apparently is really, really bad about handling those implied close tags.

Sequences of adjacent <dt> elements (eg bookmark without a description, followed by another bookmark "<dt><dt>"), end up interpreted as nested ("<dt><dt></dt></dt>") instead of as siblings ("<dt></dt><dt></dt>").
The first round of code tried to resolve the nesting inline, but ended up a bit funky in places.
I've replaced this with a standalone run through the data to re-order the elements, based on our knowing that <dt> and <dd> cannot directly contain one another; once that's done, our main logic loop can be a bit cleaner. I'm not 100% sure it's doing nested sublists correctly, but these don't seem to show up in delicious export (and even if they do, with the way we flatten the input it shouldn't make a difference).

Also fixed a clearer edge case where some bookmarks didn't get imported when missing descriptions.
2010-12-31 12:09:54 -08:00
Brion Vibber
5687531848 Bookmark plugin: graceful error out for failure to import a delicious bookmark due to it being already bookmarked 2010-12-31 12:09:15 -08:00
Brion Vibber
80e2f4f529 Fix up edge case in nickname processing: overlong display forms should be rejected before normalization (storage of display forms will also have fields with limited length) 2010-12-30 17:11:16 -08:00
Evan Prodromou
5dfc9e1b18 Generated an extra class on bookmark notice <li>s 2010-12-30 16:57:28 -08:00
Evan Prodromou
66f6b2a342 Events to hook for NoticeListElement <li> generation 2010-12-30 16:57:05 -08:00
Evan Prodromou
5d7f5212f0 switch bookmark CSS classes to use dash instead of underscore 2010-12-30 16:54:01 -08:00
Evan Prodromou
7793d3b7ad Merge branch 'testing' of gitorious.org:statusnet/mainline into testing 2010-12-30 16:21:45 -08:00
Evan Prodromou
682e11bb8b don't show some bookmark elements if empty 2010-12-30 16:21:22 -08:00
Brion Vibber
b71a09a1a9 Tweak the post-form return on bookmarklet if we're not in a popup that we can close 2010-12-30 16:14:41 -08:00
Brion Vibber
b00a3cd4e4 Make sure the UUIDs are unique too :) 2010-12-30 13:37:05 -08:00
Brion Vibber
63c95484bd Update ActivityCreationTests for our switch away from the obsolete <activity:actor> 2010-12-30 13:21:59 -08:00
Evan Prodromou
6fc7e5b05b Use UUIDs for Bookmark unique ID
I was trying to generate URIs for Bookmarks based on (profile, crc32(url), created).

I failed at that. CRC32s are unsigned ints, and our schema code didn't like that.

On top of that, my code to encode and restore created timestamps was problematic.

So, I switched back to using a meaningless unique ID for Bookmarks.

One way to do this would be to use an auto-incrementing integer ID. However, we've been
kind of crabbed out a few times for exposing auto-incrementing integer IDs as URIs, so
I thought maybe using a random UUID would be a better way to do it.

So, this patch sets random UUIDs for URIs of bookmarks.
2010-12-30 13:21:14 -08:00
Evan Prodromou
3b5c3d2c84 UUID-generation tools 2010-12-30 12:15:34 -08:00
Evan Prodromou
c91b080a8e version 0.9.8dev 2010-12-29 16:18:43 -08:00
Evan Prodromou
3d62c1cf51 0.9.7alpha1 2010-12-29 16:15:57 -08:00
Evan Prodromou
d8219c07be update version to 0.9.7 2010-12-29 16:14:00 -08:00
Evan Prodromou
80191b56df Show <activity:subject> in Atom group notice feed
Version 0.9.6 and below of StatusNet assume anything in <author> is a
Person. So, we include an <activity:subject> element, which will be
checked first by those versions of the code, only for group feeds.

At some point we'll take this out, but it's useful for now.
2010-12-29 15:33:57 -08:00
Evan Prodromou
d3b10959f4 Merge branch '0.9.x' into noactor 2010-12-29 15:29:29 -08:00
Evan Prodromou
26afe79ed9 Merge branch '0.9.x' of gitorious.org:statusnet/mainline into 0.9.x 2010-12-29 14:53:38 -08:00
Evan Prodromou
2d576aea30 don't distribute when restoring archived delicious bookmarks 2010-12-29 14:52:43 -08:00
Evan Prodromou
3fea4aba7f phpcs showbookmark.php 2010-12-29 14:24:30 -08:00
Evan Prodromou
f3999ab92d phpcs noticebyurl.php 2010-12-29 14:22:41 -08:00
Evan Prodromou
f5256eb028 phpcs importdelicious.php 2010-12-29 14:21:25 -08:00