Commit Graph

3192 Commits

Author SHA1 Message Date
Evan Prodromou
13b1acdd08 only search elements for links 2010-03-19 15:28:25 -05: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
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
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
1de7badd78 Merge branch 'master' of git@gitorious.org:statusnet/mainline into testing 2010-03-18 10:55:20 -07:00
Evan Prodromou
0a1b10114b new exception class for when a user has no profile 2010-03-18 08:32:17 -05:00
Brion Vibber
22f827134c Workaround for HTTP authentication in the API when running PHP as CGI/FastCGI. Example rewrite lines added as comments in htaccess.sample, API tweaked to accept alternate environment var form. 2010-03-17 11:04:41 -07:00
Brion Vibber
f62b8a80cf Pull back for now on switch of PEAR error mode to exceptions; seems to trigger out exceptions at various times we don't want them.
For instance this was throwing an exception for DB_DataObject::staticGet when there's no match... definitely not what we want when all our code expects to get a nice null.
Example of this causing trouble: http://gitorious.org/statusnet/mainline/merge_requests/131

Revert "Don't attempt to retrieve the current user from the DB while processing a DB error"

This reverts commit 68347691b0.

Revert "Use PHP exceptions for PEAR error handling."

This reverts commit d8212977ce.
2010-03-16 16:32:25 -07:00
Zach Copley
b994d529f4 Throw an exception if we receive a document instead of a feed's root element 2010-03-15 19:06:06 -07:00
Brion Vibber
441e52718e Background deletion of user accounts. Notices are deleted in chunks, then the user itself when they're all gone.
While deletion is in progress, the account is locked with the 'deleted' role, which disables all actions with rights control.

Todo:
* Pretty up the notice on the profile page about the pending delete. Show status?
* Possibly more thorough account disabling, such as disallowing all use for login and access.
* Improve error recovery; worst case is that an account gets left locked in 'deleted' state but the queue jobs have gotten dropped out. This would leave the username in use and any undeleted notices in place.
2010-03-15 16:08:00 -07:00
Zach Copley
40cde2f710 Initial Twitpic-like media upload endpoint /api/statusnet/media/upload 2010-03-15 22:16:33 +00:00
Brion Vibber
c9232d8f26 Ticket #2242: fix reading of inline XHTML content in Atom feeds for OStatus input.
Lookup of the <div> needed to check for the XHTML namespace.
2010-03-15 20:21:55 +00:00
James Walker
c4f89b06f1 give preference to rel="photo" (per latest ActivityStreams spec), but still support rel="avatar" for compat 2010-03-14 12:57:24 -04:00
James Walker
a9dabbe77e * wrong param order to in_array
* in getContent() if "type" isn't set, assume text (per atom spec)
2010-03-13 10:37:08 -05:00
Brion Vibber
9e9ab23e1f Fixes for updating indices, charset/collation and engine type on plugin-created tables.
Under MySQL, new tables will be created as InnoDB with UTF-8 (utf8/utf8_bin) same as core tables.
Existing plugin tables will have table engine and default charset/collation updated, and string columns will have charset updated, at checkschema time.

Switched from 'DESCRIBE' to INFORMATION_SCHEMA for pulling column information in order to get charset. A second hit to INFORMATION_SCHEMA is also needed to get table properties.

Indices were only being created at table creation time, which ain't so hot. Now also adding/dropping indices when they change.

Fixed up some schema defs in OStatus plugin that were a bit flaky, causing extra alter tables to be run.

TODO: Generalize this infrastructure a bit more up to base schema & pg schema classes.
2010-03-12 13:16:32 -08:00
Brion Vibber
f72eb17304 Merge commit 'origin/testing' into 0.9.x 2010-03-12 09:41:49 -08:00
Brion Vibber
f3066c80d3 Merge commit 'origin/0.9.x' into 0.9.x 2010-03-12 09:41:45 -08:00
Zach Copley
3dc84dd02d Output enclosing geo elements and GeoRSS xmlns in XML timelines 2010-03-12 05:39:36 +00:00
Zach Copley
13556e7ba9 Add Atom self link to tag timeline 2010-03-12 04:08:31 +00:00
Brion Vibber
b1d90a835f Don't switch people from the Memcache to Memcached plugin without their knowledge when using back-compatibility $config['memcached']['enabled']. Performance characteristics for Memcached version on large-scale sites not tested yet.
New installations should be using addPlugin explicitly.
2010-03-11 18:10:41 -08:00
Brion Vibber
fe7b063b85 Remove stray whitespace at file start that snuck into last update 2010-03-11 18:07:00 -08:00
Craig Andrews
2179aae758 fubared a715271f84 - this is the fix 2010-03-11 21:02:41 -05:00
Zach Copley
e1537d8387 More generalized method for calculating Atom rel="self" links 2010-03-12 01:40:52 +00:00
Craig Andrews
a715271f84 reuse Subscription::cancel instead of reimplementing it.
I didn't know this method existed before... pretty neat.
2010-03-11 20:40:25 -05:00
Craig Andrews
d6e0640251 move image type checking to constructor, so checking will be done in all cases
check if the relevant image handling function exists when deciding if the image type is supported
2010-03-11 20:12:32 -05:00
Zach Copley
78f0d6bbd2 Scrub all atom output with common_xml_safe_str() 2010-03-12 01:12:30 +00:00
Zach Copley
b12c344930 Generator tag should have 'uri' attr not 'url' 2010-03-11 23:44:50 +00:00
Zach Copley
7e1a1506f5 Output self link in rss2 feeds, if available 2010-03-11 23:28:41 +00:00
Zach Copley
023f258b63 - Output georss xmlns in rss element
- Only output geopoint in rss if one is set
2010-03-11 23:05:56 +00:00
Sarven Capadisli
ded26ae8f5 Fixes the indenting bug for geo anchor. Also mention in trac ticket 2235 2010-03-11 16:40:16 -05:00
Brion Vibber
c6f09306b1 Merge branch 'testing' of git@gitorious.org:statusnet/mainline into 0.9.x 2010-03-10 17:04:51 -08:00
Brion Vibber
5cd020bf29 Workaround intermittent bugs with HEAD requests by disabling keepalive in HTTPClient.
I think this is a bug in Youtube's web server (sending chunked encoding of an empty body with a HEAD response, leaving the connection out of sync when it doesn't attempt to read a body) but the HTTP_Request2 library may need to be adjusted to watch out for that.
2010-03-10 15:13:16 -08:00
Brion Vibber
6d73fc1d54 Merge branch 'testing' of git@gitorious.org:statusnet/mainline into 0.9.x 2010-03-10 11:57:38 -08:00
Brion Vibber
54ff17010b Merge branch 'master' of git@gitorious.org:statusnet/mainline into testing 2010-03-10 11:56:51 -08:00
Brion Vibber
532e486a93 Detect when queuedaemon/xmppdaemon parent processes die and kill the child processes.
Keeps stray daemon subprocesses from floating around when we kill the parents via a signal!

Accomplished by opening a bidirectional pipe in the parent process; the children close out the writer end and keep the reader in their open sockets list. When the parent dies, the children see that the socket's been closed out and can perform an orderly shutdown.
2010-03-10 11:54:00 -08:00
Zach Copley
55e8473a7a A blank username should never be allowed. 2010-03-10 09:57:00 -08:00
Brion Vibber
ddb656fcd2 Merge branch 'testing' into 0.9.x
Conflicts:
	actions/apistatusnetconfig.php
2010-03-10 09:55:14 -08:00
Brion Vibber
58fcb5ac6f Merge branch 'master' into testing 2010-03-10 09:53:55 -08:00
Brion Vibber
8ee8b89dd8 Ticket #2221: fix for missing whitespace between messages in en-gb.
The final whitespace should be dropped from the source messages after we've stabilized; trailing space is pretty unreliable to keep through translation tools and should be avoided. Use separator strings outside the messages!
2010-03-10 09:36:00 -08:00
Brenda Wallace
49f1b1e8b2 removed a stay bit of debug 2010-03-10 22:03:36 +13:00
Brenda Wallace
75e2be3b71 map the mysql-ish column types to ones postgres likes 2010-03-10 22:02:56 +13:00
Brenda Wallace
7398353c44 primary keys and unique indexes working in postgres 2010-03-10 21:54:30 +13:00
Brenda Wallace
c4ee2b20be throw an error that looks like mysql errors.. :-S 2010-03-10 21:25:44 +13:00
Zach Copley
7f2253759c A blank username should never be allowed. 2010-03-10 03:39:05 +00:00
Brion Vibber
6ea7e1c06e Merge branch 'testing' into 0.9.x 2010-03-09 14:20:50 -08:00
Brion Vibber
971f1f64f1 Added scripts/command.php, can be used to run commands such as subscription on behalf of users.
This includes whatever support for extended command parsing plugins may have added.

Example:
  ./scripts/command.php -nbrionv sub update@status.net
2010-03-09 13:41:05 -08:00
Brion Vibber
8bf1b54abd Merge branch 'testing' of git@gitorious.org:statusnet/mainline into 0.9.x 2010-03-09 13:07:52 -08:00
Brion Vibber
32532c7c42 Merge branch 'commands' into testing 2010-03-09 13:05:51 -08:00
Brion Vibber
80a17387bf Command input processing now has centralized places for looking up notice, user/profile, and group arguments.
OStatus plugin overrides these to allow using webfinger (user@example.com), profile URL (http://example.com/user) and bare profile URL (example.com/user) as arguments.
2010-03-09 13:03:32 -08:00
Brion Vibber
6c4ade4251 Merge branch 'testing' into 0.9.x 2010-03-09 11:27:53 -08:00