summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--classes/Remote_profile.php10
-rw-r--r--lib/oauthstore.php1
-rw-r--r--lib/omb.php9
-rw-r--r--plugins/Realtime/realtimeupdate.css8
-rw-r--r--plugins/Realtime/realtimeupdate.js2
5 files changed, 28 insertions, 2 deletions
diff --git a/classes/Remote_profile.php b/classes/Remote_profile.php
index 9f7bfeadc..0a1676a6a 100644
--- a/classes/Remote_profile.php
+++ b/classes/Remote_profile.php
@@ -43,4 +43,14 @@ class Remote_profile extends Memcached_DataObject
/* the code above is auto generated do not remove the tag below */
###END_AUTOCODE
+
+ function hasRight($right)
+ {
+ $profile = Profile::staticGet($this->id);
+ if ($profile) {
+ return $profile->hasright($right);
+ } else {
+ throw new Exception("Missing profile");
+ }
+ }
}
diff --git a/lib/oauthstore.php b/lib/oauthstore.php
index b04bcbb8b..e34bf8a5e 100644
--- a/lib/oauthstore.php
+++ b/lib/oauthstore.php
@@ -463,6 +463,7 @@ class StatusNetOAuthDataStore extends OAuthDataStore
$subscriber = $this->_getAnyProfile($subscriber_uri);
if (!$subscriber->hasRight(Right::SUBSCRIBE)) {
+ common_log(LOG_INFO, __METHOD__ . ": remote subscriber banned ($subscriber_uri subbing to $subscribed_user_uri)");
return _('You have been banned from subscribing.');
}
diff --git a/lib/omb.php b/lib/omb.php
index 49496b774..e2a6d9f3f 100644
--- a/lib/omb.php
+++ b/lib/omb.php
@@ -67,7 +67,14 @@ function omb_hmac_sha1()
function omb_broadcast_notice($notice)
{
- $omb_notice = notice_to_omb_notice($notice);
+ try {
+ $omb_notice = notice_to_omb_notice($notice);
+ } catch (Exception $e) {
+ // @fixme we should clean up or highlight the problem item
+ common_log(LOG_ERR, 'Invalid OMB outgoing notice for notice ' . $notice->id);
+ common_log(LOG_ERR, 'Error status '.$e);
+ return true;
+ }
/* Get remote users subscribed to this profile. */
$rp = new Remote_profile();
diff --git a/plugins/Realtime/realtimeupdate.css b/plugins/Realtime/realtimeupdate.css
index a5728b83d..56f869354 100644
--- a/plugins/Realtime/realtimeupdate.css
+++ b/plugins/Realtime/realtimeupdate.css
@@ -27,6 +27,14 @@ left:auto;
right:0;
}
+.realtime-popup .entity_profile {
+width:70%;
+}
+.realtime-popup .entity_actions {
+margin-left:1%;
+}
+
+
#notices_primary {
position:relative;
}
diff --git a/plugins/Realtime/realtimeupdate.js b/plugins/Realtime/realtimeupdate.js
index b3c41456e..4ed95ff26 100644
--- a/plugins/Realtime/realtimeupdate.js
+++ b/plugins/Realtime/realtimeupdate.js
@@ -268,7 +268,7 @@ RealtimeUpdate = {
PP.bind('click', function() {
window.open(url,
'',
- 'toolbar=no,resizable=yes,scrollbars=yes,status=yes,width=500,height=550');
+ 'toolbar=no,resizable=yes,scrollbars=yes,status=no,menubar=no,personalbar=no,location=no,width=500,height=550');
return false;
});