summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorBrion Vibber <brion@pobox.com>2010-04-30 13:15:53 -0700
committerBrion Vibber <brion@pobox.com>2010-04-30 13:16:13 -0700
commitcae1329f3bca1f5f1fbfdb1d96b38cbb790fbe00 (patch)
tree21ae74d08b6496c7d7fafbe95a9b147a9ac56cc0 /plugins
parent5c05cd2b1a93d360bde7cb7dfc9ba39e5a5a7624 (diff)
parentf8883367184e4fd31dc819d5e1257d0eee11eb10 (diff)
Merge branch '0.9.x' into 1.0.x
Conflicts: lib/util.php
Diffstat (limited to 'plugins')
-rw-r--r--plugins/Autocomplete/AutocompletePlugin.php12
-rw-r--r--plugins/Blacklist/BlacklistPlugin.php4
-rw-r--r--plugins/Blacklist/Homepage_blacklist.php4
-rw-r--r--plugins/Blacklist/Nickname_blacklist.php4
-rw-r--r--plugins/Blacklist/blacklistadminpanel.php29
-rw-r--r--plugins/ClientSideShorten/ClientSideShortenPlugin.php79
-rw-r--r--plugins/ClientSideShorten/README6
-rw-r--r--plugins/ClientSideShorten/shorten.js66
-rw-r--r--plugins/ClientSideShorten/shorten.php68
-rw-r--r--plugins/OStatus/actions/ostatussub.php14
-rw-r--r--plugins/OStatus/classes/Ostatus_profile.php28
-rw-r--r--plugins/OStatus/scripts/resub-feed.php74
-rw-r--r--plugins/OStatus/scripts/update-profile.php147
-rw-r--r--plugins/OpenID/openid.php16
-rw-r--r--plugins/RSSCloud/RSSCloudPlugin.php2
15 files changed, 517 insertions, 36 deletions
diff --git a/plugins/Autocomplete/AutocompletePlugin.php b/plugins/Autocomplete/AutocompletePlugin.php
index d586631a4..b2b18bf27 100644
--- a/plugins/Autocomplete/AutocompletePlugin.php
+++ b/plugins/Autocomplete/AutocompletePlugin.php
@@ -31,8 +31,6 @@ if (!defined('STATUSNET') && !defined('LACONICA')) {
exit(1);
}
-require_once(INSTALLDIR.'/plugins/Autocomplete/autocomplete.php');
-
class AutocompletePlugin extends Plugin
{
function __construct()
@@ -40,6 +38,16 @@ class AutocompletePlugin extends Plugin
parent::__construct();
}
+ function onAutoload($cls)
+ {
+ switch ($cls)
+ {
+ case 'AutocompleteAction':
+ require_once(INSTALLDIR.'/plugins/Autocomplete/autocomplete.php');
+ return false;
+ }
+ }
+
function onEndShowScripts($action){
if (common_logged_in()) {
$action->script('plugins/Autocomplete/jquery-autocomplete/jquery.autocomplete.pack.js');
diff --git a/plugins/Blacklist/BlacklistPlugin.php b/plugins/Blacklist/BlacklistPlugin.php
index adc4d9d7e..63bffe2c6 100644
--- a/plugins/Blacklist/BlacklistPlugin.php
+++ b/plugins/Blacklist/BlacklistPlugin.php
@@ -262,7 +262,7 @@ class BlacklistPlugin extends Plugin
$patterns = $this->_getUrlPatterns();
foreach ($patterns as $pattern) {
- if (preg_match("/$pattern/", $url)) {
+ if ($pattern != '' && preg_match("/$pattern/", $url)) {
return false;
}
}
@@ -285,7 +285,7 @@ class BlacklistPlugin extends Plugin
$patterns = $this->_getNicknamePatterns();
foreach ($patterns as $pattern) {
- if (preg_match("/$pattern/", $nickname)) {
+ if ($pattern != '' && preg_match("/$pattern/", $nickname)) {
return false;
}
}
diff --git a/plugins/Blacklist/Homepage_blacklist.php b/plugins/Blacklist/Homepage_blacklist.php
index 32080667e..ec89ee4bd 100644
--- a/plugins/Blacklist/Homepage_blacklist.php
+++ b/plugins/Blacklist/Homepage_blacklist.php
@@ -94,7 +94,7 @@ class Homepage_blacklist extends Memcached_DataObject
function keys()
{
- return array('pattern' => 'K');
+ return array_keys($this->keyTypes());
}
/**
@@ -108,7 +108,7 @@ class Homepage_blacklist extends Memcached_DataObject
function keyTypes()
{
- return $this->keys();
+ return array('pattern' => 'K');
}
/**
diff --git a/plugins/Blacklist/Nickname_blacklist.php b/plugins/Blacklist/Nickname_blacklist.php
index 981063144..e8545292d 100644
--- a/plugins/Blacklist/Nickname_blacklist.php
+++ b/plugins/Blacklist/Nickname_blacklist.php
@@ -88,7 +88,7 @@ class Nickname_blacklist extends Memcached_DataObject
function keys()
{
- return array('pattern' => 'K');
+ return array_keys($this->keyTypes());
}
/**
@@ -99,7 +99,7 @@ class Nickname_blacklist extends Memcached_DataObject
function keyTypes()
{
- return $this->keys();
+ return array('pattern' => 'K');
}
/**
diff --git a/plugins/Blacklist/blacklistadminpanel.php b/plugins/Blacklist/blacklistadminpanel.php
index b996aba8d..4289dec1b 100644
--- a/plugins/Blacklist/blacklistadminpanel.php
+++ b/plugins/Blacklist/blacklistadminpanel.php
@@ -88,28 +88,27 @@ class BlacklistadminpanelAction extends AdminPanelAction
function saveSettings()
{
- $nickPatterns = array();
-
- $rawNickPatterns = explode("\n", $this->trimmed('blacklist-nicknames'));
-
- foreach ($rawNickPatterns as $raw) {
- $nickPatterns[] = trim($raw);
- }
-
+ $nickPatterns = $this->splitPatterns($this->trimmed('blacklist-nicknames'));
Nickname_blacklist::saveNew($nickPatterns);
- $rawUrlPatterns = explode("\n", $this->trimmed('blacklist-urls'));
- $urlPatterns = array();
-
- foreach ($rawUrlPatterns as $raw) {
- $urlPatterns[] = trim($raw);
- }
-
+ $urlPatterns = $this->splitPatterns($this->trimmed('blacklist-urls'));
Homepage_blacklist::saveNew($urlPatterns);
return;
}
+ protected function splitPatterns($text)
+ {
+ $patterns = array();
+ foreach (explode("\n", $text) as $raw) {
+ $trimmed = trim($raw);
+ if ($trimmed != '') {
+ $patterns[] = $trimmed;
+ }
+ }
+ return $patterns;
+ }
+
/**
* Validate the values
*
diff --git a/plugins/ClientSideShorten/ClientSideShortenPlugin.php b/plugins/ClientSideShorten/ClientSideShortenPlugin.php
new file mode 100644
index 000000000..ba1f7d3a7
--- /dev/null
+++ b/plugins/ClientSideShorten/ClientSideShortenPlugin.php
@@ -0,0 +1,79 @@
+<?php
+/**
+ * StatusNet, the distributed open-source microblogging tool
+ *
+ * Plugin to enable client side url shortening in the status box
+ *
+ * PHP version 5
+ *
+ * LICENCE: 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/>.
+ *
+ * @category Plugin
+ * @package StatusNet
+ * @author Craig Andrews <candrews@integralblue.com>
+ * @copyright 2009 Craig Andrews http://candrews.integralblue.com
+ * @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
+ * @link http://status.net/
+ */
+
+if (!defined('STATUSNET') && !defined('LACONICA')) {
+ exit(1);
+}
+
+require_once(INSTALLDIR.'/plugins/ClientSideShorten/shorten.php');
+
+class ClientSideShortenPlugin extends Plugin
+{
+ function __construct()
+ {
+ parent::__construct();
+ }
+
+ function onAutoload($cls)
+ {
+ switch ($cls)
+ {
+ case 'ShortenAction':
+ require_once(INSTALLDIR.'/plugins/ClientSideShorten/shorten.php');
+ return false;
+ }
+ }
+
+ function onEndShowScripts($action){
+ $action->inlineScript('var Notice_maxContent = ' . Notice::maxContent());
+ if (common_logged_in()) {
+ $action->script('plugins/ClientSideShorten/shorten.js');
+ }
+ }
+
+ function onRouterInitialized($m)
+ {
+ if (common_logged_in()) {
+ $m->connect('plugins/ClientSideShorten/shorten', array('action'=>'shorten'));
+ }
+ }
+
+ function onPluginVersion(&$versions)
+ {
+ $versions[] = array('name' => 'Shorten',
+ 'version' => STATUSNET_VERSION,
+ 'author' => 'Craig Andrews',
+ 'homepage' => 'http://status.net/wiki/Plugin:ClientSideShorten',
+ 'rawdescription' =>
+ _m('ClientSideShorten causes the web interface\'s notice form to automatically shorten urls as they entered, and before the notice is submitted.'));
+ return true;
+ }
+
+}
+
diff --git a/plugins/ClientSideShorten/README b/plugins/ClientSideShorten/README
new file mode 100644
index 000000000..e6524c9c7
--- /dev/null
+++ b/plugins/ClientSideShorten/README
@@ -0,0 +1,6 @@
+ClientSideShorten causes the web interface's notice form to automatically shorten urls as they entered, and before the notice is submitted.
+
+Installation
+============
+Add "addPlugin('ClientSideShorten');" to the bottom of your config.php
+That's it!
diff --git a/plugins/ClientSideShorten/shorten.js b/plugins/ClientSideShorten/shorten.js
new file mode 100644
index 000000000..856c7f05f
--- /dev/null
+++ b/plugins/ClientSideShorten/shorten.js
@@ -0,0 +1,66 @@
+//wrap everything in a self-executing anonymous function to avoid conflicts
+(function(){
+
+ // smart(x) from Paul Irish
+ // http://paulirish.com/2009/throttled-smartresize-jquery-event-handler/
+
+ (function($,sr){
+
+ // debouncing function from John Hann
+ // http://unscriptable.com/index.php/2009/03/20/debouncing-javascript-methods/
+ var debounce = function (func, threshold, execAsap) {
+ var timeout;
+
+ return function debounced () {
+ var obj = this, args = arguments;
+ function delayed () {
+ if (!execAsap)
+ func.apply(obj, args);
+ timeout = null;
+ };
+
+ if (timeout)
+ clearTimeout(timeout);
+ else if (execAsap)
+ func.apply(obj, args);
+
+ timeout = setTimeout(delayed, threshold || 100);
+ };
+ }
+ jQuery.fn[sr] = function(fn){ return fn ? this.bind('keypress', debounce(fn, 1000)) : this.trigger(sr); };
+
+ })(jQuery,'smartkeypress');
+
+ function shorten()
+ {
+ $noticeDataText = $('#'+SN.C.S.NoticeDataText);
+ if(Notice_maxContent > 0 && $noticeDataText.val().length > Notice_maxContent){
+ var original = $noticeDataText.val();
+ shortenAjax = $.ajax({
+ url: $('address .url')[0].href+'/plugins/ClientSideShorten/shorten',
+ data: { text: $noticeDataText.val() },
+ dataType: 'text',
+ success: function(data) {
+ if(original == $noticeDataText.val()) {
+ $noticeDataText.val(data).keyup();
+ }
+ }
+ });
+ }
+ }
+
+ $(document).ready(function(){
+ $noticeDataText = $('#'+SN.C.S.NoticeDataText);
+ $noticeDataText.smartkeypress(function(e){
+ //if(typeof(shortenAjax) !== 'undefined') shortenAjax.abort();
+ if(e.charCode == '32') {
+ shorten();
+ }
+ });
+ $noticeDataText.bind('paste', function() {
+ //if(typeof(shortenAjax) !== 'undefined') shortenAjax.abort();
+ setTimeout(shorten,1);
+ });
+ });
+
+})();
diff --git a/plugins/ClientSideShorten/shorten.php b/plugins/ClientSideShorten/shorten.php
new file mode 100644
index 000000000..07c19e2e7
--- /dev/null
+++ b/plugins/ClientSideShorten/shorten.php
@@ -0,0 +1,68 @@
+<?php
+/**
+ * StatusNet, the distributed open-source microblogging tool
+ *
+ * List users for autocompletion
+ *
+ * PHP version 5
+ *
+ * LICENCE: 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/>.
+ *
+ * @category Plugin
+ * @package StatusNet
+ * @author Craig Andrews <candrews@integralblue.com>
+ * @copyright 2008-2009 StatusNet, Inc.
+ * @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
+ * @link http://status.net/
+ */
+
+if (!defined('STATUSNET') && !defined('LACONICA')) {
+ exit(1);
+}
+
+/**
+ * Shorten all URLs in a string
+ *
+ * @category Plugin
+ * @package StatusNet
+ * @author Craig Andrews <candrews@integralblue.com>
+ * @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
+ * @link http://status.net/
+ */
+
+class ShortenAction extends Action
+{
+ private $text;
+
+ function prepare($args)
+ {
+ parent::prepare($args);
+ $this->groups=array();
+ $this->users=array();
+ $this->text = $this->arg('text');
+ if(is_null($this->text)){
+ throw new ClientException(_m('\'text\' argument must be specified.'));
+ }
+ return true;
+ }
+
+ function handle($args)
+ {
+ parent::handle($args);
+ header('Content-Type: text/plain');
+ $shortened_text = common_shorten_links($this->text);
+ print $shortened_text;
+ }
+}
+
diff --git a/plugins/OStatus/actions/ostatussub.php b/plugins/OStatus/actions/ostatussub.php
index 994af6e95..28714514f 100644
--- a/plugins/OStatus/actions/ostatussub.php
+++ b/plugins/OStatus/actions/ostatussub.php
@@ -446,4 +446,18 @@ class OStatusSubAction extends Action
{
return common_local_url('ostatussub');
}
+
+ /**
+ * Disable the send-notice form at the top of the page.
+ * This is really just a hack for the broken CSS in the Cloudy theme,
+ * I think; copying from other non-notice-navigation pages that do this
+ * as well. There will be plenty of others also broken.
+ *
+ * @fixme fix the cloudy theme
+ * @fixme do this in a more general way
+ */
+ function showNoticeForm() {
+ // nop
+ }
+
}
diff --git a/plugins/OStatus/classes/Ostatus_profile.php b/plugins/OStatus/classes/Ostatus_profile.php
index e3b3daa2c..5d3f37cd0 100644
--- a/plugins/OStatus/classes/Ostatus_profile.php
+++ b/plugins/OStatus/classes/Ostatus_profile.php
@@ -1001,7 +1001,7 @@ class Ostatus_profile extends Memcached_DataObject
return;
}
if (!common_valid_http_url($url)) {
- throw new ServerException(_m("Invalid avatar URL %s"), $url);
+ throw new ServerException(sprintf(_m("Invalid avatar URL %s"), $url));
}
if ($this->isGroup()) {
@@ -1303,15 +1303,23 @@ class Ostatus_profile extends Memcached_DataObject
$ok = $oprofile->insert();
- if ($ok) {
- $avatar = self::getActivityObjectAvatar($object, $hints);
- if ($avatar) {
+ if (!$ok) {
+ throw new ServerException("Can't save OStatus profile");
+ }
+
+ $avatar = self::getActivityObjectAvatar($object, $hints);
+
+ if ($avatar) {
+ try {
$oprofile->updateAvatar($avatar);
+ } catch (Exception $ex) {
+ // Profile is saved, but Avatar is messed up. We're
+ // just going to continue.
+ common_log(LOG_WARNING, "Exception saving OStatus profile avatar: ". $ex->getMessage());
}
- return $oprofile;
- } else {
- throw new ServerException("Can't save OStatus profile");
}
+
+ return $oprofile;
}
/**
@@ -1330,7 +1338,11 @@ class Ostatus_profile extends Memcached_DataObject
}
$avatar = self::getActivityObjectAvatar($object, $hints);
if ($avatar) {
- $this->updateAvatar($avatar);
+ try {
+ $this->updateAvatar($avatar);
+ } catch (Exception $ex) {
+ common_log(LOG_WARNING, "Exception saving OStatus profile avatar: " . $ex->getMessage());
+ }
}
}
diff --git a/plugins/OStatus/scripts/resub-feed.php b/plugins/OStatus/scripts/resub-feed.php
new file mode 100644
index 000000000..121d12109
--- /dev/null
+++ b/plugins/OStatus/scripts/resub-feed.php
@@ -0,0 +1,74 @@
+#!/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
+resub-feed.php [options] http://example.com/atom-feed-url
+Reinitialize the PuSH subscription for the given feed. This may help get
+things restarted if we and the hub have gotten our states out of sync.
+
+
+END_OF_HELP;
+
+require_once INSTALLDIR.'/scripts/commandline.inc';
+
+if (empty($args[0]) || !Validate::uri($args[0])) {
+ print "$helptext";
+ exit(1);
+}
+
+$feedurl = $args[0];
+
+
+$sub = FeedSub::staticGet('topic', $feedurl);
+if (!$sub) {
+ print "Feed $feedurl is not subscribed.\n";
+ exit(1);
+}
+
+print "Old state:\n";
+showSub($sub);
+
+print "\n";
+print "Pinging hub $sub->huburi with new subscription for $sub->uri\n";
+$ok = $sub->subscribe();
+
+if ($ok) {
+ print "ok\n";
+} else {
+ print "Could not confirm.\n";
+}
+
+$sub2 = FeedSub::staticGet('topic', $feedurl);
+
+print "\n";
+print "New state:\n";
+showSub($sub2);
+
+function showSub($sub)
+{
+ print " Subscription state: $sub->sub_state\n";
+ print " Verify token: $sub->verify_token\n";
+ print " Signature secret: $sub->secret\n";
+ print " Sub start date: $sub->sub_start\n";
+ print " Record created: $sub->created\n";
+ print " Record modified: $sub->modified\n";
+}
diff --git a/plugins/OStatus/scripts/update-profile.php b/plugins/OStatus/scripts/update-profile.php
new file mode 100644
index 000000000..d06de4f90
--- /dev/null
+++ b/plugins/OStatus/scripts/update-profile.php
@@ -0,0 +1,147 @@
+#!/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
+update-profile.php [options] http://example.com/profile/url
+
+Rerun profile and feed info discovery for the given OStatus remote profile,
+and reinitialize its PuSH subscription for the given feed. This may help get
+things restarted if the hub or feed URLs have changed for the profile.
+
+
+END_OF_HELP;
+
+require_once INSTALLDIR.'/scripts/commandline.inc';
+
+if (empty($args[0]) || !Validate::uri($args[0])) {
+ print "$helptext";
+ exit(1);
+}
+
+$uri = $args[0];
+
+
+$oprofile = Ostatus_profile::staticGet('uri', $uri);
+
+if (!$oprofile) {
+ print "No OStatus remote profile known for URI $uri\n";
+ exit(1);
+}
+
+print "Old profile state for $oprofile->uri\n";
+showProfile($oprofile);
+
+print "\n";
+print "Re-running feed discovery for profile URL $oprofile->uri\n";
+// @fixme will bork where the URI isn't the profile URL for now
+$discover = new FeedDiscovery();
+$feedurl = $discover->discoverFromURL($oprofile->uri);
+$huburi = $discover->getAtomLink('hub');
+$salmonuri = $discover->getAtomLink(Salmon::NS_REPLIES);
+
+print " Feed URL: $feedurl\n";
+print " Hub URL: $huburi\n";
+print " Salmon URL: $salmonuri\n";
+
+if ($feedurl != $oprofile->feeduri || $salmonuri != $oprofile->salmonuri) {
+ print "\n";
+ print "Updating...\n";
+ // @fixme update keys :P
+ #$orig = clone($oprofile);
+ #$oprofile->feeduri = $feedurl;
+ #$oprofile->salmonuri = $salmonuri;
+ #$ok = $oprofile->update($orig);
+ $ok = $oprofile->query('UPDATE ostatus_profile SET ' .
+ 'feeduri=\'' . $oprofile->escape($feedurl) . '\',' .
+ 'salmonuri=\'' . $oprofile->escape($salmonuri) . '\' ' .
+ 'WHERE uri=\'' . $oprofile->escape($uri) . '\'');
+
+ if (!$ok) {
+ print "Failed to update profile record...\n";
+ exit(1);
+ }
+
+ $oprofile->decache();
+} else {
+ print "\n";
+ print "Ok, ostatus_profile record unchanged.\n\n";
+}
+
+$sub = FeedSub::ensureFeed($feedurl);
+
+if ($huburi != $sub->huburi) {
+ print "\n";
+ print "Updating hub record for feed; was $sub->huburi\n";
+ $orig = clone($sub);
+ $sub->huburi = $huburi;
+ $ok = $sub->update($orig);
+
+ if (!$ok) {
+ print "Failed to update sub record...\n";
+ exit(1);
+ }
+} else {
+ print "\n";
+ print "Feed record ok, not changing.\n\n";
+}
+
+print "\n";
+print "Pinging hub $sub->huburi with new subscription for $sub->uri\n";
+$ok = $sub->subscribe();
+
+if ($ok) {
+ print "ok\n";
+} else {
+ print "Could not confirm.\n";
+}
+
+$o2 = Ostatus_profile::staticGet('uri', $uri);
+
+print "\n";
+print "New profile state:\n";
+showProfile($o2);
+
+print "\n";
+print "New feed state:\n";
+$sub2 = FeedSub::ensureFeed($feedurl);
+showSub($sub2);
+
+function showProfile($oprofile)
+{
+ print " Feed URL: $oprofile->feeduri\n";
+ print " Salmon URL: $oprofile->salmonuri\n";
+ print " Avatar URL: $oprofile->avatar\n";
+ print " Profile ID: $oprofile->profile_id\n";
+ print " Group ID: $oprofile->group_id\n";
+ print " Record created: $oprofile->created\n";
+ print " Record modified: $oprofile->modified\n";
+}
+
+function showSub($sub)
+{
+ print " Subscription state: $sub->sub_state\n";
+ print " Verify token: $sub->verify_token\n";
+ print " Signature secret: $sub->secret\n";
+ print " Sub start date: $sub->sub_start\n";
+ print " Record created: $sub->created\n";
+ print " Record modified: $sub->modified\n";
+}
diff --git a/plugins/OpenID/openid.php b/plugins/OpenID/openid.php
index 152438917..4ec336e1c 100644
--- a/plugins/OpenID/openid.php
+++ b/plugins/OpenID/openid.php
@@ -299,11 +299,21 @@ class AutosubmitAction extends Action
function title()
{
- return _m('OpenID Auto-Submit');
+ return _m('OpenID Login Submission');
}
function showContent()
{
+ $this->raw('<p style="margin: 20px 80px">');
+ // @fixme this would be better using standard CSS class, but the present theme's a bit scary.
+ $this->element('img', array('src' => Theme::path('images/icons/icon_processing.gif', 'base'),
+ // for some reason the base CSS sets <img>s as block display?!
+ 'style' => 'display: inline'));
+ $this->text(_m('Requesting authorization from your login provider...'));
+ $this->raw('</p>');
+ $this->raw('<p style="margin-top: 60px; font-style: italic">');
+ $this->text(_m('If you are not redirected to your login provider in a few seconds, try pushing the button below.'));
+ $this->raw('</p>');
$this->raw($this->form_html);
}
@@ -311,8 +321,6 @@ class AutosubmitAction extends Action
{
parent::showScripts();
$this->element('script', null,
- '$(document).ready(function() { ' .
- ' $(\'#'. $this->form_id .'\').submit(); '.
- '});');
+ 'document.getElementById(\'' . $this->form_id . '\').submit();');
}
}
diff --git a/plugins/RSSCloud/RSSCloudPlugin.php b/plugins/RSSCloud/RSSCloudPlugin.php
index 001106ace..661c32141 100644
--- a/plugins/RSSCloud/RSSCloudPlugin.php
+++ b/plugins/RSSCloud/RSSCloudPlugin.php
@@ -100,7 +100,7 @@ class RSSCloudPlugin extends Plugin
*
* Hook for RouterInitialized event.
*
- * @param Mapper &$m URL parser and mapper
+ * @param Mapper $m URL parser and mapper
*
* @return boolean hook return
*/