Commit Graph

11417 Commits

Author SHA1 Message Date
Evan Prodromou 027c73a4a1 Merge branch 'activityatompub' into 0.9.x 2010-12-13 14:35:42 -05:00
Evan Prodromou 1033e1e519 add the other three feeds to AtomPub service document 2010-12-13 14:35:29 -05:00
Evan Prodromou c6d6f25b52 Atom pub feed for group memberships
Feed for group memberships, in activity streams format.

Shows a feed; has proper pagination; accepts activitystreams "join"
activities to start a new membership.
2010-12-13 13:56:54 -05:00
Evan Prodromou 4be9c0a0e9 fix URL for memberships feed 2010-12-13 13:50:57 -05:00
Evan Prodromou a93f0fea61 membership stream method and return membership from join() in Group_member class 2010-12-13 13:50:39 -05:00
Evan Prodromou 156bd011af fix navigation links for favorite feed 2010-12-13 13:08:38 -05:00
Evan Prodromou c5fee7573e fix navigation links for subscriptions feed 2010-12-13 13:07:25 -05:00
Evan Prodromou 5bbd77b761 group_member includes self link, edit link 2010-12-13 12:40:44 -05:00
Evan Prodromou 1a58fdd695 add atompub show membership action 2010-12-13 12:40:22 -05:00
Evan Prodromou 4b7a0d366c add atompub membership actions to router 2010-12-13 12:40:01 -05:00
Zach Copley bb55784e90 Move getConnectedApps() from Profile to User, where it belongs 2010-12-12 17:37:42 -08:00
Evan Prodromou 30f0defcf1 atompub favorite feed 2010-12-12 13:16:34 -05:00
Evan Prodromou 7c37aa802b a stream function for Fave class 2010-12-12 12:22:04 -05:00
Evan Prodromou 1817aedb5c fix subtitle in subscriptions feed 2010-12-12 12:13:54 -05:00
Evan Prodromou d9a614c57e use new Subscription stream methods for AtomPub 2010-12-11 11:24:07 -05:00
Evan Prodromou 8dea5144a9 Merge branch '0.9.x' into activityatompub 2010-12-11 11:03:02 -05:00
Evan Prodromou af4ee1d490 Merge branch '0.9.x' of gitorious.org:statusnet/mainline into 0.9.x 2010-12-11 11:01:05 -05:00
Evan Prodromou d0ea138888 cache stream of subscriptions 2010-12-11 11:00:04 -05:00
Evan Prodromou 7285bbc93b Subscription stream functions
Made two new functions, Subscription::bySubscriber() and
Subscription::bySubscribed(), to get streams of Subscription objects.

Converted Profile::getSubscribers() and Profile::getSubscriptions() to
use these functions.
2010-12-11 10:24:46 -05:00
Evan Prodromou 37c447be46 Show a single favorite for AtomPub 2010-12-10 18:50:50 -05:00
Brion Vibber 3f9b8b293d Workaround for locally-handled sessions breaking on PHP 5.3 with APC enabled.
Big thanks to the folks at http://pecl.php.net/bugs/bug.php?id=16745 for the secret juju!
Classes were being torn down before session save handlers got called at the end of the request, which exploded with complaints about being unable to find various classes.
Registering a shutdown function lets us explicitly close out the session before everything gets torn down.
2010-12-10 14:12:02 -08:00
Brion Vibber ab7a06542c Workaround for locally-handled sessions breaking on PHP 5.3 with APC enabled.
Big thanks to the folks at http://pecl.php.net/bugs/bug.php?id=16745 for the secret juju!
Classes were being torn down before session save handlers got called at the end of the request, which exploded with complaints about being unable to find various classes.
Registering a shutdown function lets us explicitly close out the session before everything gets torn down.
2010-12-10 22:08:36 +00:00
Evan Prodromou 167f760ab8 Merge branch '0.9.x' into activityatompub
Conflicts:
	lib/router.php
2010-12-10 17:04:55 -05:00
Brion Vibber 65f2d12bbf extlibs updates: PEAR::Mail to 1.2.0, PEAR::Net_SMTP to 1.4.2 (need to go together as a pair)
PEAR::Mail updated to 1.2.0 from 1.1.4, fixes deprecation warnings on PHP 5.3, as well as:
1.2.0:
• QA release - stable.
• Updated minimum dependencies (Net_SMTP, PEAR, PHP)
• Doc Bug #15620 Licence change to BSD
• Bug #13659 Mail parse error in special condition
• Bug #16200 - Security hole allow to read/write Arbitrary File
_hasUnclosedQuotes() doesn't properly handle a double slash before an end quote (slusarz@curecanti.org, Bug #9137).
• Make sure Net_SMTP is defined when calling getSMTPObject() directly (slusarz@curecanti.org, Bug #13772).
• Add addServiceExtensionParameter() to the SMTP driver (slusarz@curecanti.org, Bug #13764).
• Add a method to obtain the Net_SMTP object from the SMTP driver (slusarz@curecanti.org, Bug #13766).

PEAR::Net_SMTP updated to 1.4.2 from 1.3.1, needed to support updated PEAR::Mail:
1.4.2:
• Fixing header string quoting in data(). (Bug #17199)
1.4.1:
• The auth() method now includes an optional $tls parameter that determines whether or not TLS should be attempted (if supported by the PHP runtime and the remote SMTP server). This parameter defaults to true. (Bug #16349)
• Header data can be specified separately from message body data by passing it as the optional second parameter to ``data()``. This is especially useful when an open file resource is being used to supply message data because it allows header fields (like *Subject:*) to be built dynamically at runtime. (Request #17012)
1.4.0:
• The data() method now accepts either a string or a file resource containing the message data. (Request #16962)
1.3.4:
• All Net_Socket write failures are now recognized. (Bug #16831)
1.3.3:
• Added getGreeting(), for retrieving the server's greeting string. (Request #16066) [needed for PEAR::Mail]
• We no longer attempt a TLS connection if we're already using a secure socket. (Bug #16254)
• You can now specify a debug output handler via setDebug(). (Request #16420)
1.3.2:
• TLS connection only gets started if no AUTH methods are sent. (Bug #14944)
2010-12-10 11:07:51 -08:00
Brion Vibber baae319aef extlibs updates: PEAR::Mail to 1.2.0, PEAR::Net_SMTP to 1.4.2 (need to go together as a pair)
PEAR::Mail updated to 1.2.0 from 1.1.4, fixes deprecation warnings on PHP 5.3, as well as:
1.2.0:
• QA release - stable.
• Updated minimum dependencies (Net_SMTP, PEAR, PHP)
• Doc Bug #15620 Licence change to BSD
• Bug #13659 Mail parse error in special condition
• Bug #16200 - Security hole allow to read/write Arbitrary File
_hasUnclosedQuotes() doesn't properly handle a double slash before an end quote (slusarz@curecanti.org, Bug #9137).
• Make sure Net_SMTP is defined when calling getSMTPObject() directly (slusarz@curecanti.org, Bug #13772).
• Add addServiceExtensionParameter() to the SMTP driver (slusarz@curecanti.org, Bug #13764).
• Add a method to obtain the Net_SMTP object from the SMTP driver (slusarz@curecanti.org, Bug #13766).

PEAR::Net_SMTP updated to 1.4.2 from 1.3.1, needed to support updated PEAR::Mail:
1.4.2:
• Fixing header string quoting in data(). (Bug #17199)
1.4.1:
• The auth() method now includes an optional $tls parameter that determines whether or not TLS should be attempted (if supported by the PHP runtime and the remote SMTP server). This parameter defaults to true. (Bug #16349)
• Header data can be specified separately from message body data by passing it as the optional second parameter to ``data()``. This is especially useful when an open file resource is being used to supply message data because it allows header fields (like *Subject:*) to be built dynamically at runtime. (Request #17012)
1.4.0:
• The data() method now accepts either a string or a file resource containing the message data. (Request #16962)
1.3.4:
• All Net_Socket write failures are now recognized. (Bug #16831)
1.3.3:
• Added getGreeting(), for retrieving the server's greeting string. (Request #16066) [needed for PEAR::Mail]
• We no longer attempt a TLS connection if we're already using a secure socket. (Bug #16254)
• You can now specify a debug output handler via setDebug(). (Request #16420)
1.3.2:
• TLS connection only gets started if no AUTH methods are sent. (Bug #14944)
2010-12-10 10:47:22 -08:00
Brion Vibber d55f606cf8 Tweaking nickname format regexes: added one that explicitly allows numbers, to be used in router setup. 2010-12-09 16:43:35 -08:00
Evan Prodromou 5d56dba904 add a new subscription using POST to APP 2010-12-09 16:25:47 -05:00
Evan Prodromou c619a257fe Add subscription feed for AtomPub 2010-12-09 16:05:07 -05:00
Evan Prodromou 34b8eb207d make HEAD work for AtomPubShowSubscription 2010-12-09 14:25:57 -05:00
Brion Vibber f947fe5d0c Disable InProcessCache plugin for CLI scripts, which are more likely to be long-running, greatly increasing the chance of data corruption. 2010-12-09 10:24:06 -08:00
Evan Prodromou 11a0bde459 AtomPub for single subscription 2010-12-09 13:11:02 -05:00
Evan Prodromou 2f2c47eca9 Merge branch '0.9.x' into activityatompub 2010-12-09 11:27:55 -05:00
Evan Prodromou 99f3964394 Merge remote branch 'gitorious/0.9.x' into 0.9.x 2010-12-09 10:48:12 -05:00
Evan Prodromou f5f6a742cb Additional in-process cache plugin InProcessCache
Some of our caching systems, like the disk cache or memcached, have
significant overhead (network connections or disk I/O).

This plugin adds an additional layer of in-process cache, so we don't
need to reconnect to external cache systems when we've already
received a data item from the cache. There are some concurrency issues
here, but typically they won't be important at the level of a single
web hit.
2010-12-09 10:45:36 -05:00
Brion Vibber e25d4683c8 Merge branch 'master' into 0.9.x 2010-12-08 18:13:20 -08:00
Brion Vibber 516161213f Tweak to PiwikAnalytics plugin to help browsers to pre-load piwik.js, may shave a little off load time.
Piwik's current default recommended JS for loading creates a <script> tag via document.write(). In addition to being generally evil, this means the browser doesn't know it's going to need piwik.js until that chunk of script gets executed... which can't happen until all scripts referenced *before* it have been loaded and executed.

The only reason for that bit of script though seems to be to pick 'http' or 'https' depending on the current page's scheme. This can be done more simply by using a protocol-relative link (eg "//piwik.status.net/piwik.js"), which the browser will resolve as appropriate. Since it's now sitting in the <script> tag, the browser's lookahead code will now see it and be able to start loading it while earlier things are parsing/executing.
May be better still to move to an asynchronous load after DOM-ready, but I'm not sure if that'll screw with the analytics code (eg, not being able to start things on the DOM-ready events since they're past).
2010-12-08 17:39:04 -08:00
Brion Vibber d8d9edfc99 Merge branch 'master' into 0.9.x 2010-12-08 15:01:25 -08:00
Brion Vibber 26bd15ec0a Mapstraction plugin: use minified sources for OpenLayers
The default full build of OpenLayers.js is 943kb as of 2.10; this gzips down to a couple hundred kb
but is still rather nasty, plus loading it off a remote host could slow things down.

Using a local copy let us cut down the size significantly by discarding unused features, and further
minification with yui-compressor shaves a bit more off. Cuts down to about 1/5 the size of the
original.

Also threw in a bundled & minified copy of the Mapstraction classes plus our usermap.js,
which covers the common case of using the default OpenLayers provider. This cuts out three
additional script loads, two of which weren't getting launched until after the mxn.js main
file got loaded.
2010-12-08 14:54:02 -08:00
Brion Vibber fb315c6f61 Create a bundled & minified JS file for Mapstraction's common case (using OpenLayers); this'll avoid waiting on additional script loads for mxn.core.js and mxn.openlayers.core.js, and removes the need to load usermap.js separately as well. 2010-12-08 14:52:26 -08:00
Brion Vibber 34569017ce Add stripped and minified local copy of OpenLayers 2.10, about 1/5 the size of the full version.
Included Makefile will recreate the OpenLayers.js using the statusnet.cfg strip configuration file
and yui-compressor to do some extra minification at the end. Requires fetching the OpenLayers
source download and dropping it in:

http://openlayers.org/download/OpenLayers-2.10.tar.gz
2010-12-08 14:28:55 -08:00
Evan Prodromou 94ff04e190 Don't cache user-specific information for Notice atom entries 2010-12-08 13:59:12 -05:00
Evan Prodromou b8b5b87c4c Don't cache user-specific information for Notice atom entries 2010-12-08 07:25:55 -05:00
Evan Prodromou db519d3ffb whitespace problems in lib/router 2010-12-07 16:23:12 -05:00
Evan Prodromou 57859a4bc8 generate links for apinamespace.org/atom and /twitter in userxrd 2010-12-07 15:53:34 -05:00
Evan Prodromou eab8d752e8 allow <Property> elements in <Link> in XRD 2010-12-07 15:53:08 -05:00
Evan Prodromou d5466ac87e fix whitespace in lib/xrdaction.php 2010-12-07 15:26:43 -05:00
Brion Vibber 001512df96 Merge branch 'master' of gitorious.org:statusnet/mainline 2010-12-07 12:13:50 -08:00
Brion Vibber db4d69f099 Quick hack to discard twitter broadcast queue items on failure *IF* config option 'twitter' 'ignore_errors' is on:
$config['twitter']['ignore_errors'] = true;

A longer-term solution is to patch up the indirect retry handling to count retries better, or delay for later retry sensibly.
2010-12-07 12:11:37 -08:00
Brion Vibber 4b4b763255 For good measure, don't return autocomplete results when not logged in. 2010-12-06 17:20:14 -08:00
Brion Vibber 6662141328 reindent 2010-12-06 17:16:47 -08:00