]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Merge branch 'cometplugin' into 0.7.x
authorEvan Prodromou <evan@controlyourself.ca>
Mon, 27 Apr 2009 19:28:36 +0000 (15:28 -0400)
committerEvan Prodromou <evan@controlyourself.ca>
Mon, 27 Apr 2009 19:28:36 +0000 (15:28 -0400)
js/util.js
lib/galleryaction.php
lib/subpeopletagcloudsection.php
lib/subscriberspeopleselftagcloudsection.php
lib/subscriberspeopletagcloudsection.php
lib/subscriptionspeopleselftagcloudsection.php
lib/subscriptionspeopletagcloudsection.php
plugins/LinkbackPlugin.php
theme/base/css/display.css

index 16422df57937311092926ef27a119f171b9eac14..f15c4f2bbf1e92f94e9f67af17ba247fb277906f 100644 (file)
@@ -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();
index 0484918ce22d59e35d0a4af3e56f47a1d6778ad2..8fa11a7562752f217edb65bb206f797b5732c40a 100644 (file)
@@ -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
+}
index d98f28afa7ad44ed033de53cb274cfa02b70b1fb..9f6948dc92711ddee0286fcc2284bf47921d2a92 100644 (file)
@@ -74,3 +74,4 @@ class SubPeopleTagCloudSection extends TagCloudSection
         $this->out->elementEnd('li');
     }
 }
+
index b5a39c6de63793947437d2c3faec18ada39a6b5f..115241a53fce73efde1f8553ceacaf18fc0f4894 100644 (file)
@@ -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';
+
+
     }
 }
+
index 23011efdd3d3c550d4b39857b9ed9de0677b2892..4dafbc1c7df0554dc5c80f5fbbde0939f8df649a 100644 (file)
@@ -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';
     }
 }
+
index 8ac65adb0524005a73e7fec3b2a52c1d296bc9b9..3896294d28f008655bb9de8e80a13ac5ab56f293 100644 (file)
@@ -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';
     }
 }
+
index c3f7d1763ed84e96c3dc5b086e6847b3dc001727..f9c8672e36832c147e2e7b8c09f784134aa236dc 100644 (file)
@@ -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';
     }
 }
+
index 881ead99ec29d091d5a13729b9fa1d3eb8f87076..93a0294c4ca9cbd23cd720c4909089b667494136 100644 (file)
@@ -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)
index 2fb1c007fc46abe5217859f458aa3dc5070226e3..0bc2e68b65afcf7f8af00ae8b853c7586f93736f 100644 (file)
@@ -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 {