We are no longer offering accounts on this server. Consider https://gitlab.freedesktop.org/ as a place to host projects.

Commit 173778ea authored by Brion Vibber's avatar Brion Vibber

Merge branch '0.9.x' of gitorious.org:statusnet/mainline into 1.0.x

Conflicts:
	lib/xmppmanager.php (resolved: code has moved to XmppPlugin.php)
parents ddc7811a e05415f6
......@@ -3,7 +3,7 @@ README
------
StatusNet 0.9.2 ("King of Birds")
21 Apr 2010
3 May 2010
This is the README file for StatusNet, the Open Source microblogging
platform. It includes installation instructions, descriptions of
......@@ -85,18 +85,27 @@ public sites upgrade to the new version immediately.
Notable changes this version:
- Installer no longer fails with a PHP fatal error when trying to set up the
subscription to update@status.net
- Fixed email notifications for @-replies that come in via OStatus
- OStatus related Fixes to the cloudy theme
- Pass geo locations over Twitter bridge (will only be used if enabled on the Twitter side)
- scripts/showplugins.php - script to dump the list of activated plugins and their settings
- scripts/fixup_blocks.php - script to finds any stray subscriptions in violation of blocks, and removes them
- Allow blocking someone who's not currently subscribed to you (prevents seeing @-replies from them, or them subbing to you in future)
- Default 2-second timeout on Geonames web service lookups
- OStatus related Fixes to the cloudy theme
- Pass geo locations over Twitter bridge (will only be used if enabled on the
Twitter side)
- scripts/showplugins.php - script to dump the list of activated plugins and
their settings
- scripts/fixup_blocks.php - script to finds any stray subscriptions in
violation of blocks, and removes them
- Allow blocking someone who's not currently subscribed to you (prevents
seeing @-replies from them, or them subbing to you in future)
- Default 2-second timeout on Geonames web service lookups
- Improved localization for plugins
- New anti-spam measures: added nofollow rels to group members list, subscribers list
- Shared cache key option for Geonames plugin (lets multi-instance sites share their cached geoname lookups)
- New anti-spam measures: added nofollow rels to group members list,
subscribers list
- Shared cache key option for Geonames plugin (lets multi-instance sites
share their cached geoname lookups)
- Stability fixes to the TwitterStatusFetcher
- If user allows location sharing but turned off browser location use profile location
- If user allows location sharing but turned off browser location use profile
location
- Improved group listing via the API
- Improved FOAF output
- Several other bugfixes
......
......@@ -185,17 +185,23 @@ class ApiTimelineFavoritesAction extends ApiBareAuthAction
{
$notices = array();
common_debug("since id = " . $this->since_id . " max id = " . $this->max_id);
if (!empty($this->auth_user) && $this->auth_user->id == $this->user->id) {
$notice = $this->user->favoriteNotices(
true,
($this->page-1) * $this->count,
$this->count,
true
$this->since_id,
$this->max_id
);
} else {
$notice = $this->user->favoriteNotices(
false,
($this->page-1) * $this->count,
$this->count,
false
$this->since_id,
$this->max_id
);
}
......
......@@ -89,7 +89,7 @@ class FavoritesrssAction extends Rss10Action
function getNotices($limit=0)
{
$user = $this->user;
$notice = $user->favoriteNotices(0, $limit);
$notice = $user->favoriteNotices(false, 0, $limit);
$notices = array();
while ($notice->fetch()) {
$notices[] = clone($notice);
......
......@@ -121,11 +121,11 @@ class ShowfavoritesAction extends OwnerDesignAction
// Show imported/gateway notices as well as local if
// the user is looking at his own favorites
$this->notice = $this->user->favoriteNotices(($this->page-1)*NOTICES_PER_PAGE,
NOTICES_PER_PAGE + 1, true);
$this->notice = $this->user->favoriteNotices(true, ($this->page-1)*NOTICES_PER_PAGE,
NOTICES_PER_PAGE + 1);
} else {
$this->notice = $this->user->favoriteNotices(($this->page-1)*NOTICES_PER_PAGE,
NOTICES_PER_PAGE + 1, false);
$this->notice = $this->user->favoriteNotices(false, ($this->page-1)*NOTICES_PER_PAGE,
NOTICES_PER_PAGE + 1);
}
if (empty($this->notice)) {
......
......@@ -75,13 +75,13 @@ class Fave extends Memcached_DataObject
return Memcached_DataObject::pkeyGet('Fave', $kv);
}
function stream($user_id, $offset=0, $limit=NOTICES_PER_PAGE, $own=false)
function stream($user_id, $offset=0, $limit=NOTICES_PER_PAGE, $own=false, $since_id=0, $max_id=0)
{
$ids = Notice::stream(array('Fave', '_streamDirect'),
array($user_id, $own),
($own) ? 'fave:ids_by_user_own:'.$user_id :
'fave:ids_by_user:'.$user_id,
$offset, $limit);
$offset, $limit, $since_id, $max_id);
return $ids;
}
......
......@@ -459,9 +459,9 @@ class User extends Memcached_DataObject
return $profile->getNotices($offset, $limit, $since_id, $before_id);
}
function favoriteNotices($offset=0, $limit=NOTICES_PER_PAGE, $own=false)
function favoriteNotices($own=false, $offset=0, $limit=NOTICES_PER_PAGE, $since_id=0, $max_id=0)
{
$ids = Fave::stream($this->id, $offset, $limit, $own);
$ids = Fave::stream($this->id, $offset, $limit, $own, $since_id, $max_id);
return Notice::getStreamByIds($ids);
}
......
......@@ -45,7 +45,7 @@ $config['site']['path'] = 'statusnet';
// lighttpd, nginx), you can enable X-Sendfile support for better
// performance. Presently, only attachment serving when the site is
// in private mode will use X-Sendfile.
// $config['site']['X-Sendfile'] = false;
// $config['site']['use_x_sendfile'] = false;
// You may also need to enable X-Sendfile support for your web server and
// allow it to access files outside of the web root. For Apache with
// mod_xsendfile, you can add these to your .htaccess or server config:
......
......@@ -188,7 +188,8 @@ $default =
'cache' =>
array('base' => null),
'ping' =>
array('notify' => array()),
array('notify' => array(),
'timeout' => 2),
'inboxes' =>
array('enabled' => true), # ignored after 0.9.x
'newuser' =>
......
......@@ -265,6 +265,10 @@ class MailHandler
if (preg_match('/^\s*Begin\s+forward/', $line)) {
break;
}
// skip everything after a blank line if we already have content
if ($output !== '' && $line === '') {
break;
}
$output .= ' ' . $line;
}
......
......@@ -45,7 +45,15 @@ function ping_broadcast_notice($notice) {
$tags));
$request = HTTPClient::start();
$httpResponse = $request->post($notify_url, array('Content-Type: text/xml'), $req);
$request->setConfig('connect_timeout', common_config('ping', 'timeout'));
$request->setConfig('timeout', common_config('ping', 'timeout'));
try {
$httpResponse = $request->post($notify_url, array('Content-Type: text/xml'), $req);
} catch (Exception $e) {
common_log(LOG_ERR,
"Exception pinging $notify_url: " . $e->getMessage());
continue;
}
if (!$httpResponse || mb_strlen($httpResponse->getBody()) == 0) {
common_log(LOG_WARNING,
......
This diff is collapsed.
......@@ -16,11 +16,11 @@ msgstr ""
"Project-Id-Version: StatusNet\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2010-04-29 23:21+0000\n"
"PO-Revision-Date: 2010-05-03 19:17:36+0000\n"
"PO-Revision-Date: 2010-05-05 22:19:15+0000\n"
"Language-Team: German\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Generator: MediaWiki 1.17alpha (r65870); Translate extension (2010-05-01)\n"
"X-Generator: MediaWiki 1.17alpha (r65963); Translate extension (2010-05-01)\n"
"X-Translation-Project: translatewiki.net at http://translatewiki.net\n"
"X-Language-Code: de\n"
"X-Message-Group: out-statusnet\n"
......@@ -4255,7 +4255,7 @@ msgstr "Verwalten Snapshot-Konfiguration"
#: actions/snapshotadminpanel.php:127
msgid "Invalid snapshot run value."
msgstr ""
msgstr "Der Wert zum Ausführen von Snapshots ist ungültig."
#: actions/snapshotadminpanel.php:133
msgid "Snapshot frequency must be a number."
......@@ -4655,17 +4655,17 @@ msgstr ""
#: actions/userauthorization.php:303
#, php-format
msgid "Listener URI ‘%s’ not found here."
msgstr ""
msgstr "Eine Listener-URI „%s“ wurde hier nicht gefunden."
#: actions/userauthorization.php:308
#, php-format
msgid "Listenee URI ‘%s’ is too long."
msgstr ""
msgstr "Die URI „%s“ für den Stream ist zu lang."
#: actions/userauthorization.php:314
#, php-format
msgid "Listenee URI ‘%s’ is a local user."
msgstr ""
msgstr "Die URI „%s“ für den Stream ist ein lokaler Benutzer."
#: actions/userauthorization.php:329
#, php-format
......
......@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2010-05-03 19:17+0000\n"
"POT-Creation-Date: 2010-05-05 22:18+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
......
......@@ -38,7 +38,7 @@ class DirectionDetectorPlugin extends Plugin {
* @param object $notice notice is going to be saved
*/
public function onStartNoticeSave(&$notice){
if(self::isRTL($notice->content))
if(!preg_match('/<span class="rtl">/', $notice->rendered) && self::isRTL($notice->content))
$notice->rendered = '<span class="rtl">'.$notice->rendered.'</span>';
return true;
}
......@@ -48,7 +48,7 @@ class DirectionDetectorPlugin extends Plugin {
*
* @param
*/
public function onEndShowStatusNetStyles(&$xml){
public function onEndShowStatusNetStyles($xml){
$xml->element('style', array('type' => 'text/css'), 'span.rtl {display:block;direction:rtl;text-align:right;float:right;width:490px;} .notice .author {float:left}');
}
/**
......@@ -102,7 +102,7 @@ class DirectionDetectorPlugin extends Plugin {
*
* Returns false if the input string isn't a valid UTF-8 octet sequence.
*/
private static function utf8ToUnicode(&$str){
private static function utf8ToUnicode($str){
$mState = 0; // cached expected number of octets after the current octet
// until the beginning of the next UTF8 character sequence
$mUcs4 = 0; // cached Unicode character
......
......@@ -104,7 +104,7 @@ class FeedDiscovery
$response = $client->get($url);
} catch (HTTP_Request2_Exception $e) {
common_log(LOG_ERR, __METHOD__ . " Failure for $url - " . $e->getMessage());
throw new FeedSubBadURLException($e);
throw new FeedSubBadURLException($e->getMessage());
}
if ($htmlOk) {
......
......@@ -369,13 +369,13 @@ class XmppPlugin extends ImPlugin
$from = $this->normalize($pl['from']);
if ($pl['type'] != 'chat') {
common_log(LOG_WARNING, "Ignoring message of type ".$pl['type']." from $from.");
return true;
$this->log(LOG_WARNING, "Ignoring message of type ".$pl['type']." from $from: " . $pl['xml']->toString());
return;
}
if (mb_strlen($pl['body']) == 0) {
common_log(LOG_WARNING, "Ignoring message with empty body from $from.");
return true;
$this->log(LOG_WARNING, "Ignoring message with empty body from $from: " . $pl['xml']->toString());
return;
}
$this->handle_incoming($from, $pl['body']);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment