$this->element('link', array('rel' => 'EditURI',
'type' => 'application/rsd+xml',
'href' => $rsd));
+
+ if ($this->page != 1) {
+ $this->element('link', array('rel' => 'canonical',
+ 'href' => common_local_url('public')));
+ }
}
/**
$this->raw(common_markup_to_html($m));
$this->elementEnd('div');
}
+
+ function extraHead()
+ {
+ if ($this->page != 1) {
+ $this->element('link', array('rel' => 'canonical',
+ 'href' => $this->group->homeUrl()));
+ }
+ }
}
$this->element('link', array('rel' => 'EditURI',
'type' => 'application/rsd+xml',
'href' => $rsd));
+
+ if ($this->page != 1) {
+ $this->element('link', array('rel' => 'canonical',
+ 'href' => $this->profile->profileurl));
+ }
}
function showEmptyListMessage()
}
}
- $nickname = strtolower($actor->poco->preferredUsername);
-
- if (!empty($nickname)) {
- if (!$this->_checkNickname($nickname)) {
- // TRANS: Exception thrown trying to post a notice while having a blocked nickname. %s is the blocked nickname.
- $msg = sprintf(_m("Notices from nickname \"%s\" disallowed."),
- $nickname);
- throw new ClientException($msg);
+ if (!empty($actor->poco)) {
+ $nickname = strtolower($actor->poco->preferredUsername);
+
+ if (!empty($nickname)) {
+ if (!$this->_checkNickname($nickname)) {
+ // TRANS: Exception thrown trying to post a notice while having a blocked nickname. %s is the blocked nickname.
+ $msg = sprintf(_m("Notices from nickname \"%s\" disallowed."),
+ $nickname);
+ throw new ClientException($msg);
+ }
}
}
--- /dev/null
+#!/usr/bin/env php
+<?php
+/*
+ * StatusNet - a distributed open-source microblogging tool
+ * Copyright (C) 2010, StatusNet, Inc.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+define('INSTALLDIR', realpath(dirname(__FILE__) . '/../../..'));
+
+$helptext = <<<END_OF_HELP
+gcfeeds.php [options]
+Clean up feeds that no longer have subscribers.
+
+END_OF_HELP;
+
+require_once INSTALLDIR.'/scripts/commandline.inc';
+
+$feedsub = new FeedSub();
+
+while ($feedsub->fetch()) {
+ print $feedsub->uri . "(" . $feedsub->sub_state . ")";
+ $result = $feedsub->garbageCollect();
+ if ($result) {
+ print " INACTIVE\n";
+ } else {
+ print " ACTIVE\n";
+ }
+}
*/
function onOstatus_profileSubscriberCount($oprofile, &$count)
{
+ if (empty($oprofile) || !($oprofile instanceof Ostatus_profile)) {
+ return true;
+ }
+
if ($oprofile->profile_id) {
$mirror = new SubMirror();
$mirror->subscribed = $oprofile->profile_id;
}
}
}
+
return true;
}
{
$profile = Profile::staticGet('id', $this->subscriber);
if (!$profile) {
- common_log(LOG_ERROR, "SubMirror plugin skipping auto-repeat of notice $notice->id for missing user $profile->id");
+ common_log(LOG_ERR, "SubMirror plugin skipping auto-repeat of notice $notice->id for missing user $profile->id");
return false;
}
$versions[] = array(
'name' => 'TwitterBridge',
'version' => self::VERSION,
- 'author' => 'Zach Copley, Julien C',
+ 'author' => 'Zach Copley, Julien C, Jean Baptiste Favre',
'homepage' => 'http://status.net/wiki/Plugin:TwitterBridge',
// TRANS: Plugin description.
'rawdescription' => _m('The Twitter "bridge" plugin allows integration ' .
// If it's not a Twitter-style reply, or if the user WANTS to send replies,
// or if it's in reply to a twitter notice
- if (!preg_match('/^@[a-zA-Z0-9_]{1,15}\b/u', $notice->content) ||
- (($flink->noticesync & FOREIGN_NOTICE_SEND_REPLY) == FOREIGN_NOTICE_SEND_REPLY) ||
- is_twitter_notice($notice->reply_to)) {
+ if ( (($flink->noticesync & FOREIGN_NOTICE_SEND_REPLY) == FOREIGN_NOTICE_SEND_REPLY) ||
+ (is_twitter_notice($notice->reply_to) || is_twitter_notice($notice->repeat_of)) ||
+ (empty($notice->reply_to) && !preg_match('/^@[a-zA-Z0-9_]{1,15}\b/u', $notice->content)) ){
return true;
}
}