Commit Graph

9211 Commits

Author SHA1 Message Date
Brion Vibber
5f32cf32cd Don't spew XML parse warnings to output when checking a remote XRD page 2010-03-23 14:18:45 -07:00
Brion Vibber
7dc24b4ca7 FOAF was missing OStatus remote subscriptions, now fixed. 2010-03-23 13:10:23 -07:00
Brion Vibber
7277b59734 Merge branch 'master' of git@gitorious.org:statusnet/mainline into testing 2010-03-23 12:13:32 -07:00
Brion Vibber
44caa3a93f Consistently send Profiles into Fave::addNew() 2010-03-23 11:08:30 -07:00
Brion Vibber
80b16c8499 Don't add PHPSESSID parameter onto notice and conversation URIs if we save a notice during a session override.
This was being triggered by welcomebot messages created at account creation time, then propagated through replies.
2010-03-23 09:56:05 -07:00
Evan Prodromou
fcdbf421ab reformat OpenIDPlugin for PHPCS 2010-03-23 11:36:02 -04:00
Zach Copley
5b0b6097e0 Fix reference. Look at the first ActivityObject in the list. 2010-03-22 21:48:21 -07:00
Zach Copley
b8e97ac709 Some initial media parsing
- Activity now returns a list of activity objects
- Processing of photo objects
2010-03-22 18:55:17 -07:00
Zach Copley
073e3a1572 Merge branch 'testing' of gitorious.org:statusnet/mainline into testing
* 'testing' of gitorious.org:statusnet/mainline:
  OStatus remote sending test cases. Doesn't actually run within PHPUnit right now, must be run from command line -- specify base URLs to two StatusNet sites that will be able to communicate with each other.
  Math_BigInteger doesn't correctly handle serialization/deserialization for a value of 0, which can end up spewing notices to output and otherwise intefering with Salmon signature setup and verification when using memcached.
  Log backtraces for non-ClientException exceptions caught at the top-level handler.
  Confirm there's actually user and domain portions of acct string before assigning things from output of explode(); avoids notice message when invalid input passed to main/xrd
  Fixing HTTP Header LRDD parsing (sites in subdirectories need this)
  Replace the "give up and dump object" attachment view fallback with a client-side redirect to the target URL, which will at least be useful.
  ignore unrecognized object types
  Pull <atom:author> info as well as <activity:actor> when we have an old-style ActivityStreams feed. This fixes subscription setup for Cliqset feeds, which currently have a bogus activity:actor/atom:id but a good atom:author/atom:uri
  Accept 'tag' and other non-http id URIs in Ostatus_profile::getActivityObjectProfileURI().
2010-03-22 18:54:46 -07:00
Brion Vibber
3678e7b89b OStatus remote sending test cases. Doesn't actually run within PHPUnit right now, must be run from command line -- specify base URLs to two StatusNet sites that will be able to communicate with each other.
Current test run includes:
* register accounts (via web form)
* local post
* @-mention using path (@domain/path/to/user)

Subscriptions, webfinger mentions, various paths to subscription and unsubscription, etc to come.
2010-03-22 17:01:50 -07:00
Brion Vibber
27bfd1211d Math_BigInteger doesn't correctly handle serialization/deserialization for a value of 0, which can end up spewing notices to output and otherwise intefering with Salmon signature setup and verification when using memcached.
Worked around this with a subclass that fixes the wakeup, used for the stored 0 value in the subclassed Crypt_RSA.
2010-03-22 12:17:45 -07:00
Brion Vibber
4168b9cec1 Log backtraces for non-ClientException exceptions caught at the top-level handler. 2010-03-22 11:33:56 -07:00
Brion Vibber
3bb639699c Confirm there's actually user and domain portions of acct string before assigning things from output of explode(); avoids notice message when invalid input passed to main/xrd 2010-03-22 11:27:39 -07:00
Brion Vibber
5697e4edb0 Replace the "give up and dump object" attachment view fallback with a client-side redirect to the target URL, which will at least be useful. 2010-03-22 10:51:01 -07:00
James Walker
a20880ee1e Fixing HTTP Header LRDD parsing (sites in subdirectories need this) 2010-03-22 13:45:13 -04:00
Brion Vibber
7aee7670c7 Replace the "give up and dump object" attachment view fallback with a client-side redirect to the target URL, which will at least be useful. 2010-03-22 10:35:54 -07:00
Evan Prodromou
edee1fc09e ignore unrecognized object types 2010-03-22 08:17:14 -04:00
Zach Copley
a0a9acb9a2 Fix broken assertion 2010-03-21 18:47:43 -07:00
Brion Vibber
fcb614d0eb Pull <atom:author> info as well as <activity:actor> when we have an old-style ActivityStreams feed. This fixes subscription setup for Cliqset feeds, which currently have a bogus activity:actor/atom:id but a good atom:author/atom:uri 2010-03-21 16:25:12 -07:00
Brion Vibber
b228da628d Accept 'tag' and other non-http id URIs in Ostatus_profile::getActivityObjectProfileURI().
(If there's not a valid ID we fall back to the link, which we do still validate as http/s.)
2010-03-21 15:46:28 -07:00
Brion Vibber
5d3bce49b8 OStatus profile setup cleanup
* drop OStatusPlugin::localProfileFromUrl(), we can just look up on user.uri
* clean up a few edge cases that returned null through Ostatus_profile::ensure* code paths, now throws clear exception when we can't find a feed from the given profile url
* add some doc comments on the ensure* methods
2010-03-21 15:18:37 -07:00
Evan Prodromou
0f1f7ab79b only use Posterous author data if it matches the profile URL 2010-03-21 07:37:58 -05:00
Evan Prodromou
c2afdfbbf5 use Posterous element if available for RssChannel discovery 2010-03-20 17:18:55 -05:00
Evan Prodromou
97bd7e22da correct creation of avatar links for RSS and Posterous elements 2010-03-20 17:18:24 -05:00
Evan Prodromou
11a86d046e move atom category to its own file, too 2010-03-20 16:55:36 -05:00
Evan Prodromou
e497ddc81f test posterous author use 2010-03-20 16:53:47 -05:00
Evan Prodromou
323ff31fbd special-case Posterous author element for activity actor 2010-03-20 16:53:30 -05:00
Evan Prodromou
99454be38c Move activity classes to their own files
Moved the various classes used by the Activity class to their own
files. There were >10 classes in the same file, with around 1500 lines
in the file. Just too big.

This change makes autoloading work for these classes, so also removed
the hard require in lib/common.php.
2010-03-20 16:06:22 -05:00
Evan Prodromou
fb2b45c68a use feedEl for discovery 2010-03-20 09:46:22 -05:00
Evan Prodromou
515acb8513 fall back to summary or title if content not available 2010-03-20 09:30:57 -05:00
Evan Prodromou
2fc0f0433e allow html content in summary and clean it out of title 2010-03-20 09:30:28 -05:00
Evan Prodromou
25cb917523 Allow PuSH posts without author information
Superfeedr (sp.?) posts entries without author information. We can
assume that this is intended to be by the original author.
Re-structured the checks for entries that come in by PuSH so they can
either have no author or an empty author, but not a different author.
2010-03-20 08:25:56 -05:00
Evan Prodromou
f558508784 handle RSS as well as Atom in Ostatus push hits 2010-03-20 07:23:13 -05:00
Evan Prodromou
65c8dc313c rename $rss to $channel to prevent misunderstanding
RSS feeds have the format
<rss><channel><item/><item/><item/></channel></rss>. The element named
$rss was actually the <channel> element, so I renamed the variable so
I wouldn't hurt my head.
2010-03-20 07:19:54 -05:00
Evan Prodromou
c0f6572001 Merge branch 'testing' of git@gitorious.org:statusnet/mainline into testing 2010-03-20 06:44:55 -05:00
Evan Prodromou
51283a1b34 try to make a nickname from the user profile url before using the URI 2010-03-20 06:44:38 -05:00
Brion Vibber
db0cf50f65 Avoid notices for accessing undefined array indices in hcard processing 2010-03-19 15:54:54 -07:00
Brion Vibber
c84c4c6839 OStatus: be a little laxer about attempts to start/stop PuSH subscriptions that were left in an inconsistent state.
Instead of aborting, we'll try to reconfirm the sub/unsub, which once confirmed will replace whatever the previous state was on the server side.
2010-03-19 15:47:43 -07:00
Brion Vibber
79ec565104 Merge branch 'master' of git@gitorious.org:statusnet/mainline into testing 2010-03-19 15:29:00 -07:00
Evan Prodromou
db9e57f761 ensure from an RSS channel 2010-03-19 15:50:06 -05:00
Evan Prodromou
022c13418d make deriving a subject from an RSS channel work 2010-03-19 15:49:38 -05:00
Evan Prodromou
1292230e38 move ActivityObject constructors from Activity to ActivityObject 2010-03-19 15:41:48 -05:00
Evan Prodromou
13b1acdd08 only search elements for links 2010-03-19 15:28:25 -05:00
Evan Prodromou
5092f98c0d return empty hints if no hcard in the html 2010-03-19 15:28:06 -05:00
Evan Prodromou
1e03968d91 define a 'root' attribute for the channel or feed 2010-03-19 15:23:30 -05:00
Brion Vibber
8a221228eb Fix typo in public tag cloud query setup which caused the cutoff to get skipped. 2010-03-19 12:51:27 -07:00
Brion Vibber
5c314c2288 Drop result ID from data objects on clone(). This keeps the original object working if it was in the middle of a query loop, even if the cloned object falls out of scope and triggers its destructor.
This bug was hitting a number of places where we had the pattern:

$db->find();
while($dbo->fetch()) {
  $x = clone($dbo);
  // do anything with $x other than storing it in an array
}

The cloned object's destructor would trigger on the second run through the loop, freeing the database result set -- not really what we wanted.
(Loops that stored the clones into an array were fine, since the clones stay in scope in the array longer than the original does.)

Detaching the database result from the clone lets us work with its data without interfering with the rest of the query.
In the unlikely even that somebody is making clones in the middle of a query, then trying to continue the query with the clone instead of the original object, well they're gonna be broken now.
2010-03-19 11:18:27 -07:00
Brion Vibber
b97400bd6f clarify output on fixup-shadow.php 2010-03-19 11:17:56 -07:00
Zach Copley
f0c54243ba Merge branch 'testing' of gitorious.org:statusnet/mainline into testing
* 'testing' of gitorious.org:statusnet/mainline:
  Validate OStatus avatar URL before fetching.
2010-03-19 10:38:54 -07:00
Zach Copley
348412f9c9 Allow admins to set a min site textlimit of 0 (unlimited) 2010-03-19 10:30:04 -07:00