PHPCI/Plugin/Xmpp.php : Use implode() method instead of foreach() to build recipients for command

This commit is contained in:
Alexandre Russo 2014-05-21 21:57:40 +02:00
parent a262af8ee2
commit 05ba6df964

View file

@ -189,15 +189,11 @@ class XMPP implements \PHPCI\Plugin
* Send XMPP notification for all recipients
*/
$cmd = $sendxmpp . "%s -f .sendxmpprc -m %s %s";
$recipients = '';
foreach($this->recipients as $recipient) {
if(!empty($recipients))
$recipients .= ' ';
$recipients .= $recipient;
}
$recipients = implode(' ', $this->recipients);
$success = $this->phpci->executeCommand(
$cmd, $tls, $message_file, $recipients);
print $this->phpci->getLastOutput();
/*