Commit Graph

9433 Commits

Author SHA1 Message Date
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
Brion Vibber
d2e6664132 Validate OStatus avatar URL before fetching. 2010-03-19 10:16:12 -07:00
Brion Vibber
9e3e1d3d56 Validate OStatus avatar URL before fetching. 2010-03-19 10:15:00 -07:00
Zach Copley
fb50a2d83c Merge branch 'testing' of gitorious.org:statusnet/mainline into testing
* 'testing' of gitorious.org:statusnet/mainline:
  Parse RSS items as activities
  Remove hkit and do our own hcard parsing
  Work around weird bug with HTML normalization via PHP DOM module; if source had xmlns and xml:lang I ended up with double output, breaking the subsequent parsing. Will have to track this down later and report upstream if not already resolved.
2010-03-19 10:08:47 -07:00
Evan Prodromou
05e3768e6a Parse RSS items as activities
First steps to parsing RSS items as activities. RSS feeds don't seem
to have enough data to make good remote profiles, but this may work
with some "hints".
2010-03-19 09:48:39 -05:00
Evan Prodromou
ac609e8040 Merge branch 'testing' of git@gitorious.org:statusnet/mainline into testing
Conflicts:
	plugins/OStatus/extlib/hkit/hkit.class.php
	plugins/OStatus/lib/discoveryhints.php
2010-03-18 20:57:38 -05:00
Evan Prodromou
17c50f338c Remove hkit and do our own hcard parsing
Parsing hcards for the data we need wasn't hard enough to justify using
hkit. It was dependent on a number of external systems (something to
run tidy), and only could handle XHTML.

We now parse HTML with the PHP dom libraries used elsewhere, and
scrape out our own hcards. Seems to work nicer and faster and most of
all works with Google Buzz profile URLs.
2010-03-18 20:52:00 -05:00
Brion Vibber
4a6c9e4451 Work around weird bug with HTML normalization via PHP DOM module; if source had xmlns and xml:lang I ended up with double output, breaking the subsequent parsing. Will have to track this down later and report upstream if not already resolved. 2010-03-18 17:57:58 -07:00
Zach Copley
1f160bb7bc Merge branch 'testing' of gitorious.org:statusnet/mainline into testing
* 'testing' of gitorious.org:statusnet/mainline:
  Handle "forgot to upload an avatar on avatarsettings" a little more gracefully.
2010-03-18 17:20:09 -07:00
Brion Vibber
01a1e882af Handle "forgot to upload an avatar on avatarsettings" a little more gracefully. 2010-03-18 17:18:01 -07:00
Zach Copley
a6c9445f0d Merge branch 'testing' of gitorious.org:statusnet/mainline into testing
* 'testing' of gitorious.org:statusnet/mainline:
  OStatus discover fixes:
  Remove xpm support (no one really uses it, and IMAGETYPE_XPM is undefined, causing warnings)
  Fix notice warning about unused var -- was renamed during refactoring.
2010-03-18 17:11:06 -07:00
Brion Vibber
1301877dfe OStatus discover fixes:
* Subscription::start was sometimes passing users instead of profiles to hooks, which broke OStatus subscription notifications; now normalizing to profiles for processing.
* H-card parsing would trigger a lot of PHP warnings and notices in hKit. Now suppressing warnings and notices for the duration of the call to keep them out of output when display_errors is on.
* H-card parsing would trigger a PHP fatal error if the source page was not well-formed XML and Tidy was not present on the system. Switched normalization to use the PHP DOM module which is always present, as we have no need for Tidy's extra features here.
* Trying to fetch avatars from Google profiles failed and triggered a PHP warning due to the relative URL not being resolved during h-card parsing. Now passing profile page URL into hKit by sneaking a <base> tag in while we normalize the HTML source.
* Profile pages without a "Link" header could trigger PHP notices due to a bad NULL -> array(NULL) conversion in LinkHeader::getLink(). Now checking that there was a return value before converting single return value into array.
2010-03-18 17:08:19 -07:00
Zach Copley
051bee988c Minor syntax err in TwitterBridge README example 2010-03-18 17:00:37 -07:00
Craig Andrews
26ba430ae8 Remove xpm support (no one really uses it, and IMAGETYPE_XPM is undefined, causing warnings)
Remove erroneous call to unlink in the constructor
2010-03-18 15:39:06 -07:00
Brion Vibber
b149b88953 Merge branch 'testing' of git@gitorious.org:statusnet/mainline into testing 2010-03-18 15:39:04 -07:00
Zach Copley
109aac3c49 Merge branch 'testing' of gitorious.org:statusnet/mainline into testing
* 'testing' of gitorious.org:statusnet/mainline:
  Fix for xmpp/sms notification options appearing to be disabled on new subscriptions.
2010-03-18 15:28:21 -07:00
Zach Copley
e10d023d03 API - handle any exceptions thrown during notice save. The API was
occasionally spitting out HTML, which is hard for clients to deal
with.
2010-03-18 15:26:13 -07:00
Brion Vibber
c8e3d08a8f Fix notice warning about unused var -- was renamed during refactoring. 2010-03-18 15:11:25 -07:00
Brion Vibber
69b25ba1be Merge branch 'testing' of git@gitorious.org:statusnet/mainline into testing 2010-03-18 14:33:45 -07:00
Brion Vibber
cac9d23498 Fix for xmpp/sms notification options appearing to be disabled on new subscriptions.
Base problem is that our caching-on-insert interferes with relying on column default values; the cached object is missing those fields, so they appear to be empty (null) when the object is retrieved from cache.
Now explicitly setting them when inserting subscriptions, and cleaned up some code that had alternate code paths.

May also have made auto-subscription work for remote OStatus subscribers, but can't test until magic sigs are working again.
2010-03-18 14:26:32 -07:00
Zach Copley
c09db79b95 Remove deprecated call-by-reference. Was causing a warning on Dreamhost. 2010-03-18 13:46:11 -07:00
Evan Prodromou
dbd44e51a2 Merge branch 'testing' of git@gitorious.org:statusnet/mainline into testing 2010-03-18 15:21:43 -05:00
Evan Prodromou
2ccd5187cc change profile URL ensure method for OStatus 2010-03-18 15:21:26 -05:00
Brion Vibber
f1b3d84b7d Fix some remote subscription regressions from f21f78364a
Ostatus_profile::ensureProfile() has been renamed to Ostatus_profile::ensureProfileURL()
2010-03-18 13:13:57 -07:00
Brion Vibber
bbfb766885 Add readme notes about PHP <5.2.6 bug on 64-bit and PHP 5.3 issues. 2010-03-18 11:12:27 -07:00
Brion Vibber
0fe82bd0c9 Runtime check for known bad PHP versions with 64-bit stream_select() bug in xmppdaemon.php. 2010-03-18 11:08:27 -07:00
Brion Vibber
1de7badd78 Merge branch 'master' of git@gitorious.org:statusnet/mainline into testing 2010-03-18 10:55:20 -07:00
Brion Vibber
515cdf28a8 Ensure that DB connection is active at start of User::updateKeys() and Foreign_user::updateKeys(); calls to $this->_quote() require a live connection object and don't lazy-initialize themselves.
May fix WSOD when changing incoming email address.
2010-03-18 09:24:55 -07:00
Evan Prodromou
425ddcaa26 add exception on inconsistent db to User::getProfile() 2010-03-18 08:35:10 -05:00