From 4b7a91bb818132d4b13d56fbbc36973658eb0384 Mon Sep 17 00:00:00 2001 From: Evan Prodromou Date: Mon, 9 Jul 2012 09:43:05 -0400 Subject: [PATCH 1/2] Squashed commit of the following: commit cd43ac412c90722e3b83ec750d9232a2ac2f12c9 Merge: dad72cc adaf175 Author: Evan Prodromou Date: Mon Jul 9 09:41:05 2012 -0400 Merge commit 'refs/merge-requests/196' of git://gitorious.org/statusnet/mainline into merge-requests/196 commit adaf17552d3ab35d451c00cdb32d87a107e0e56a Author: Jeremy Pope Date: Thu Jul 5 12:33:06 2012 -0500 fix for XMPP high CPU usage - issue no 3232 commit e573e8ee6690af94259ff8793a84652a139d0662 Author: Jeremy Pope Date: Thu Jul 5 12:30:34 2012 -0500 fix for queuedaemon and imdaemon not being stopped by stopdaemons.sh --- plugins/Xmpp/XmppPlugin.php | 4 ++-- scripts/stopdaemons.sh | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/plugins/Xmpp/XmppPlugin.php b/plugins/Xmpp/XmppPlugin.php index 50950d8570..0f82ed041c 100644 --- a/plugins/Xmpp/XmppPlugin.php +++ b/plugins/Xmpp/XmppPlugin.php @@ -380,12 +380,12 @@ class XmppPlugin extends ImPlugin if ($pl['type'] != 'chat') { $this->log(LOG_WARNING, "Ignoring message of type ".$pl['type']." from $from: " . $pl['xml']->toString()); - return; + return true; } if (mb_strlen($pl['body']) == 0) { $this->log(LOG_WARNING, "Ignoring message with empty body from $from: " . $pl['xml']->toString()); - return; + return true; } $this->handleIncoming($from, $pl['body']); diff --git a/scripts/stopdaemons.sh b/scripts/stopdaemons.sh index bc1230e645..45a7d5cc8b 100755 --- a/scripts/stopdaemons.sh +++ b/scripts/stopdaemons.sh @@ -23,8 +23,8 @@ SDIR=`dirname $0` DIR=`php $SDIR/getpiddir.php` -for f in ombhandler smshandler pinghandler \ - twitterhandler facebookhandler \ +for f in ombhandler smshandler pinghandler queuedaemon \ + twitterhandler facebookhandler imdaemon \ twitterstatusfetcher synctwitterfriends pluginhandler rsscloudhandler; do FILES="$DIR/$f.*.pid" From 9034148e0d1fdab17b210ebaf3f0d92693429637 Mon Sep 17 00:00:00 2001 From: Evan Prodromou Date: Mon, 9 Jul 2012 09:45:53 -0400 Subject: [PATCH 2/2] Squashed commit of the following: commit f4503f30226fee59160600b5c9b81afc6b610a9d Merge: 75f3b4e f10e48c Author: Evan Prodromou Date: Mon Jul 9 09:45:10 2012 -0400 Merge commit 'refs/merge-requests/194' of git://gitorious.org/statusnet/mainline into merge-requests/194 commit f10e48c361d91ab02efc5577254e1dad3b1dcebe Author: Mikael Nordfeldth Date: Thu Jul 5 14:28:30 2012 +0200 multiGet returns a correct Notice object for the fetchAll in NoticeList --- plugins/QnA/actions/qnashowquestion.php | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/plugins/QnA/actions/qnashowquestion.php b/plugins/QnA/actions/qnashowquestion.php index edea032b38..ca2cb74ba1 100644 --- a/plugins/QnA/actions/qnashowquestion.php +++ b/plugins/QnA/actions/qnashowquestion.php @@ -115,13 +115,7 @@ class QnashowquestionAction extends ShownoticeAction } if (count($answerIds) > 0) { - $notice = new Notice(); - $notice->query( - sprintf( - 'SELECT notice.* FROM notice WHERE notice.id IN (%s)', - implode(',', $answerIds) - ) - ); + $notice = Notice::multiGet('id', $answerIds); $nli = new NoticeList($notice, $this); $nli->show();