From: Robin Millette Date: Fri, 17 Apr 2009 16:47:18 +0000 (+0000) Subject: Merge branch '0.7.x' of git@gitorious.org:laconica/dev into 0.7.x X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=2eb1eb86838b47af7305dbd21a181e63bcd58418;hp=21873b806d6c5cf3e55ea10e49959c944f708688;p=quix0rs-gnu-social.git Merge branch '0.7.x' of git@gitorious.org:laconica/dev into 0.7.x --- diff --git a/actions/grouprss.php b/actions/grouprss.php index a9a2eef877..0b7280a11c 100644 --- a/actions/grouprss.php +++ b/actions/grouprss.php @@ -34,7 +34,7 @@ if (!defined('LACONICA')) { require_once INSTALLDIR.'/lib/rssaction.php'; -define('MEMBERS_PER_SECTION', 81); +define('MEMBERS_PER_SECTION', 27); /** * Group RSS feed diff --git a/actions/showgroup.php b/actions/showgroup.php index 025f8383a2..a7df397273 100644 --- a/actions/showgroup.php +++ b/actions/showgroup.php @@ -35,7 +35,7 @@ if (!defined('LACONICA')) { require_once INSTALLDIR.'/lib/noticelist.php'; require_once INSTALLDIR.'/lib/feedlist.php'; -define('MEMBERS_PER_SECTION', 81); +define('MEMBERS_PER_SECTION', 27); /** * Group main page @@ -361,7 +361,7 @@ class ShowgroupAction extends Action $this->element('p', null, _('(None)')); } - if ($cnt == MEMBERS_PER_SECTION) { + if ($cnt > MEMBERS_PER_SECTION) { $this->element('a', array('href' => common_local_url('groupmembers', array('nickname' => $this->group->nickname))), _('All members')); diff --git a/js/util.js b/js/util.js index 81139744ff..38d2a9a424 100644 --- a/js/util.js +++ b/js/util.js @@ -166,28 +166,36 @@ $(document).ready(function(){ $("#notice_action-submit").addClass("disabled"); return true; }, - success: function(xml) { if ($("#error", xml).length > 0 || $("#command_result", xml).length > 0) { + success: function(xml) { if ($("#error", xml).length > 0) { var result = document._importNode($("p", xml).get(0), true); result = result.textContent || result.innerHTML; alert(result); } else { - $("#notices_primary .notices").prepend(document._importNode($("li", xml).get(0), true)); + if ($("#command_result", xml).length > 0) { + var result = document._importNode($("p", xml).get(0), true); + result = result.textContent || result.innerHTML; + alert(result); + } + else { + $("#notices_primary .notices").prepend(document._importNode($("li", xml).get(0), true)); + counter(); + $("#notices_primary .notice:first").css({display:"none"}); + $("#notices_primary .notice:first").fadeIn(2500); + NoticeHover(); + NoticeReply(); + } $("#notice_data-text").val(""); - counter(); - $("#notices_primary .notice:first").css({display:"none"}); - $("#notices_primary .notice:first").fadeIn(2500); - NoticeHover(); - NoticeReply(); } $("#form_notice").removeClass("processing"); $("#notice_action-submit").removeAttr("disabled"); $("#notice_action-submit").removeClass("disabled"); } }; - $("#form_notice").ajaxForm(PostNotice); - $("#form_notice").each(addAjaxHidden); - + if (document.body.id != 'inbox' && document.body.id != 'outbox') { + $("#form_notice").ajaxForm(PostNotice); + $("#form_notice").each(addAjaxHidden); + } NoticeHover(); NoticeReply(); }); diff --git a/lib/twitterapi.php b/lib/twitterapi.php index b8357c6889..6a90b4e288 100644 --- a/lib/twitterapi.php +++ b/lib/twitterapi.php @@ -418,7 +418,7 @@ class TwitterapiAction extends Action function date_twitter($dt) { $t = strtotime($dt); - return date("D M d G:i:s O Y", $t); + return date("D M d H:i:s O Y", $t); } // XXX: Candidate for a general utility method somewhere? diff --git a/scripts/jabberqueuehandler.php b/scripts/jabberqueuehandler.php index 924fc45453..8b6e974c0a 100755 --- a/scripts/jabberqueuehandler.php +++ b/scripts/jabberqueuehandler.php @@ -54,6 +54,13 @@ class JabberQueueHandler extends XmppQueueHandler } } +// Abort immediately if xmpp is not enabled, otherwise the daemon chews up +// lots of CPU trying to connect to unconfigured servers +if (common_config('xmpp','enabled')==false) { + print "Aborting daemon - xmpp is disabled\n"; + exit(); +} + ini_set("max_execution_time", "0"); ini_set("max_input_time", "0"); set_time_limit(0); @@ -63,4 +70,4 @@ $resource = ($argc > 1) ? $argv[1] : (common_config('xmpp','resource') . '-queue $handler = new JabberQueueHandler($resource); -$handler->runOnce(); \ No newline at end of file +$handler->runOnce(); diff --git a/scripts/publicqueuehandler.php b/scripts/publicqueuehandler.php index 5075c12df5..b0fa22d438 100755 --- a/scripts/publicqueuehandler.php +++ b/scripts/publicqueuehandler.php @@ -52,6 +52,13 @@ class PublicQueueHandler extends XmppQueueHandler } } +// Abort immediately if xmpp is not enabled, otherwise the daemon chews up +// lots of CPU trying to connect to unconfigured servers +if (common_config('xmpp','enabled')==false) { + print "Aborting daemon - xmpp is disabled\n"; + exit(); +} + ini_set("max_execution_time", "0"); ini_set("max_input_time", "0"); set_time_limit(0); diff --git a/scripts/xmppconfirmhandler.php b/scripts/xmppconfirmhandler.php index 2b8b085ce8..7f39235fed 100755 --- a/scripts/xmppconfirmhandler.php +++ b/scripts/xmppconfirmhandler.php @@ -140,6 +140,13 @@ class XmppConfirmHandler extends XmppQueueHandler } } +// Abort immediately if xmpp is not enabled, otherwise the daemon chews up +// lots of CPU trying to connect to unconfigured servers +if (common_config('xmpp','enabled')==false) { + print "Aborting daemon - xmpp is disabled\n"; + exit(); +} + ini_set("max_execution_time", "0"); ini_set("max_input_time", "0"); set_time_limit(0); diff --git a/scripts/xmppdaemon.php b/scripts/xmppdaemon.php index ef3f8c63d8..0ce2f2a280 100755 --- a/scripts/xmppdaemon.php +++ b/scripts/xmppdaemon.php @@ -321,6 +321,13 @@ class XMPPDaemon extends Daemon } } +// Abort immediately if xmpp is not enabled, otherwise the daemon chews up +// lots of CPU trying to connect to unconfigured servers +if (common_config('xmpp','enabled')==false) { + print "Aborting daemon - xmpp is disabled\n"; + exit(); +} + ini_set("max_execution_time", "0"); ini_set("max_input_time", "0"); set_time_limit(0);