summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--js/util.js29
-rw-r--r--lib/galleryaction.php4
-rw-r--r--lib/subpeopletagcloudsection.php1
-rw-r--r--lib/subscriberspeopleselftagcloudsection.php10
-rw-r--r--lib/subscriberspeopletagcloudsection.php5
-rw-r--r--lib/subscriptionspeopleselftagcloudsection.php9
-rw-r--r--lib/subscriptionspeopletagcloudsection.php4
-rw-r--r--plugins/LinkbackPlugin.php8
-rw-r--r--theme/base/css/display.css11
9 files changed, 55 insertions, 26 deletions
diff --git a/js/util.js b/js/util.js
index 16422df57..f15c4f2bb 100644
--- a/js/util.js
+++ b/js/util.js
@@ -166,23 +166,14 @@ $(document).ready(function(){
$("#notice_action-submit").addClass("disabled");
return true;
},
- timeout: 7000,
error: function (xhr, textStatus, errorThrown) { $("#form_notice").removeClass("processing");
$("#notice_action-submit").removeAttr("disabled");
$("#notice_action-submit").removeClass("disabled");
-
- if (textStatus == "timeout") {
- alert ("Sorry! We had trouble sending your notice. The servers are overloaded. Please try again, and contact the site administrator if this problem persists");
+ if ($(".error", xhr.responseXML).length > 0) {
+ $('#form_notice').append(document._importNode($(".error", xhr.responseXML).get(0), true));
}
else {
- switch(xhr.status) {
- default: case 404:
- alert("Sorry! We had trouble sending your notice. Please report the problem to the site administrator if this happens again.");
- break;
- case 502: case 503: case 504:
- alert("Sorry! We had trouble sending your notice. The servers are overloaded. Please try again, and contact the site administrator if this problem persists.");
- break;
- }
+ alert("Sorry! We had trouble sending your notice ("+xhr.status+" "+xhr.statusText+"). Please report the problem to the site administrator if this happens again.");
}
},
success: function(xml) { if ($("#error", xml).length > 0) {
@@ -197,11 +188,15 @@ $(document).ready(function(){
alert(result);
}
else {
- $("#notices_primary .notices").prepend(document._importNode($("li", xml).get(0), true));
- $("#notices_primary .notice:first").css({display:"none"});
- $("#notices_primary .notice:first").fadeIn(2500);
- NoticeHover();
- NoticeReply();
+ li = $("li", xml).get(0);
+ id = li.id;
+ if ($("#"+li.id).length == 0) {
+ $("#notices_primary .notices").prepend(document._importNode(li, true));
+ $("#notices_primary .notice:first").css({display:"none"});
+ $("#notices_primary .notice:first").fadeIn(2500);
+ NoticeHover();
+ NoticeReply();
+ }
}
$("#notice_data-text").val("");
counter();
diff --git a/lib/galleryaction.php b/lib/galleryaction.php
index 0484918ce..8fa11a756 100644
--- a/lib/galleryaction.php
+++ b/lib/galleryaction.php
@@ -134,9 +134,11 @@ class GalleryAction extends Action
$this->elementStart('li', array('id'=>'filter_tags_item'));
$this->elementStart('form', array('name' => 'bytag',
'id' => 'bytag',
+ 'action' => common_path('?action=' . $this->trimmed('action')),
'method' => 'post'));
$this->dropdown('tag', _('Tag'), $content,
_('Choose a tag to narrow list'), false, $tag);
+ $this->hidden('nickname', $this->user->nickname);
$this->submit('submit', _('Go'));
$this->elementEnd('form');
$this->elementEnd('li');
@@ -169,4 +171,4 @@ class GalleryAction extends Action
{
return array();
}
-} \ No newline at end of file
+}
diff --git a/lib/subpeopletagcloudsection.php b/lib/subpeopletagcloudsection.php
index d98f28afa..9f6948dc9 100644
--- a/lib/subpeopletagcloudsection.php
+++ b/lib/subpeopletagcloudsection.php
@@ -74,3 +74,4 @@ class SubPeopleTagCloudSection extends TagCloudSection
$this->out->elementEnd('li');
}
}
+
diff --git a/lib/subscriberspeopleselftagcloudsection.php b/lib/subscriberspeopleselftagcloudsection.php
index b5a39c6de..115241a53 100644
--- a/lib/subscriberspeopleselftagcloudsection.php
+++ b/lib/subscriberspeopleselftagcloudsection.php
@@ -49,6 +49,14 @@ class SubscribersPeopleSelfTagCloudSection extends SubPeopleTagCloudSection
}
function query() {
- return 'select tag, count(tag) as weight from subscription left join profile_tag on tagger = subscriber where subscribed=%d and subscribed != subscriber and tagger = tagged group by tag order by weight desc';
+// return 'select tag, count(tag) as weight from subscription left join profile_tag on tagger = subscriber where subscribed=%d and subscribed != subscriber and tagger = tagged group by tag order by weight desc';
+
+
+ return 'select tag, count(tag) as weight from subscription left join profile_tag on tagger = subscriber where subscribed=%d and subscribed != subscriber and tagger = tagged and tag is not null group by tag order by weight desc';
+
+// return 'select tag, count(tag) as weight from subscription left join profile_tag on tagger = subscribed where subscriber=%d and subscribed != subscriber and tagger = tagged and tag is not null group by tag order by weight desc';
+
+
}
}
+
diff --git a/lib/subscriberspeopletagcloudsection.php b/lib/subscriberspeopletagcloudsection.php
index 23011efdd..4dafbc1c7 100644
--- a/lib/subscriberspeopletagcloudsection.php
+++ b/lib/subscriberspeopletagcloudsection.php
@@ -53,8 +53,9 @@ class SubscribersPeopleTagCloudSection extends SubPeopleTagCloudSection
return common_local_url('subscribers', array('nickname' => $nickname, 'tag' => $tag));
}
-
function query() {
- return 'select tag, count(tag) as weight from subscription left join profile_tag on subscriber=tagged and subscribed=tagger where subscribed=%d and subscriber != subscribed group by tag order by weight desc';
+// return 'select tag, count(tag) as weight from subscription left join profile_tag on subscriber=tagged and subscribed=tagger where subscribed=%d and subscriber != subscribed group by tag order by weight desc';
+ return 'select tag, count(tag) as weight from subscription left join profile_tag on subscriber=tagged and subscribed=tagger where subscribed=%d and subscriber != subscribed and tag is not null group by tag order by weight desc';
}
}
+
diff --git a/lib/subscriptionspeopleselftagcloudsection.php b/lib/subscriptionspeopleselftagcloudsection.php
index 8ac65adb0..3896294d2 100644
--- a/lib/subscriptionspeopleselftagcloudsection.php
+++ b/lib/subscriptionspeopleselftagcloudsection.php
@@ -49,6 +49,13 @@ class SubscriptionsPeopleSelfTagCloudSection extends SubPeopleTagCloudSection
}
function query() {
- return 'select tag, count(tag) as weight from subscription left join profile_tag on tagger = subscriber where subscribed=%d and subscriber != subscribed and tagger = tagged group by tag order by weight desc';
+// return 'select tag, count(tag) as weight from subscription left join profile_tag on tagger = subscriber where subscribed=%d and subscriber != subscribed and tagger = tagged group by tag order by weight desc';
+
+
+
+ return 'select tag, count(tag) as weight from subscription left join profile_tag on tagger = subscribed where subscriber=%d and subscribed != subscriber and tagger = tagged and tag is not null group by tag order by weight desc';
+
+// return 'select tag, count(tag) as weight from subscription left join profile_tag on tagger = subscriber where subscribed=%d and subscribed != subscriber and tagger = tagged and tag is not null group by tag order by weight desc';
}
}
+
diff --git a/lib/subscriptionspeopletagcloudsection.php b/lib/subscriptionspeopletagcloudsection.php
index c3f7d1763..f9c8672e3 100644
--- a/lib/subscriptionspeopletagcloudsection.php
+++ b/lib/subscriptionspeopletagcloudsection.php
@@ -54,6 +54,8 @@ class SubscriptionsPeopleTagCloudSection extends SubPeopleTagCloudSection
}
function query() {
- return 'select tag, count(tag) as weight from subscription left join profile_tag on subscriber=tagger and subscribed=tagged where subscriber=%d and subscriber != subscribed group by tag order by weight desc';
+// return 'select tag, count(tag) as weight from subscription left join profile_tag on subscriber=tagger and subscribed=tagged where subscriber=%d and subscriber != subscribed group by tag order by weight desc';
+ return 'select tag, count(tag) as weight from subscription left join profile_tag on subscriber=tagger and subscribed=tagged where subscriber=%d and subscriber != subscribed and tag is not null group by tag order by weight desc';
}
}
+
diff --git a/plugins/LinkbackPlugin.php b/plugins/LinkbackPlugin.php
index 881ead99e..93a0294c4 100644
--- a/plugins/LinkbackPlugin.php
+++ b/plugins/LinkbackPlugin.php
@@ -121,6 +121,12 @@ class LinkbackPlugin extends Plugin
{
$args = array($this->notice->uri, $url);
+ if (!extension_loaded('xmlrpc')) {
+ if (!dl('xmlrpc.so')) {
+ common_log(LOG_ERR, "Can't pingback; xmlrpc extension not available.");
+ }
+ }
+
$request = xmlrpc_encode_request('pingback.ping', $args);
$context = stream_context_create(array('http' => array('method' => "POST",
'header' =>
@@ -141,7 +147,7 @@ class LinkbackPlugin extends Plugin
}
// Largely cadged from trackback_cls.php by
- // Ran Aroussi <ran@blogish.org>, GPL2
+ // Ran Aroussi <ran@blogish.org>, GPL2 or any later version
// http://phptrackback.sourceforge.net/
function getTrackback($text, $url)
diff --git a/theme/base/css/display.css b/theme/base/css/display.css
index 2fb1c007f..0bc2e68b6 100644
--- a/theme/base/css/display.css
+++ b/theme/base/css/display.css
@@ -86,7 +86,7 @@ border:0;
.error,
.success {
-padding:4px 7px;
+padding:4px 1.55%;
border-radius:4px;
-moz-border-radius:4px;
-webkit-border-radius:4px;
@@ -426,6 +426,7 @@ line-height:1;
#form_notice fieldset {
border:0;
padding:0;
+position:relative;
}
#form_notice legend {
display:none;
@@ -480,7 +481,13 @@ margin-bottom:7px;
margin-left:18px;
float:left;
}
-
+#form_notice .error {
+float:left;
+clear:both;
+width:96.9%;
+margin-bottom:0;
+line-height:1.618;
+}
/* entity_profile */
.entity_profile {