PHPCI/Plugin/Xmpp.php : Use implode() method instead of foreach() to build recipients for command
This commit is contained in:
parent
a262af8ee2
commit
05ba6df964
|
@ -189,15 +189,11 @@ class XMPP implements \PHPCI\Plugin
|
||||||
* Send XMPP notification for all recipients
|
* Send XMPP notification for all recipients
|
||||||
*/
|
*/
|
||||||
$cmd = $sendxmpp . "%s -f .sendxmpprc -m %s %s";
|
$cmd = $sendxmpp . "%s -f .sendxmpprc -m %s %s";
|
||||||
$recipients = '';
|
$recipients = implode(' ', $this->recipients);
|
||||||
foreach($this->recipients as $recipient) {
|
|
||||||
if(!empty($recipients))
|
|
||||||
$recipients .= ' ';
|
|
||||||
$recipients .= $recipient;
|
|
||||||
}
|
|
||||||
|
|
||||||
$success = $this->phpci->executeCommand(
|
$success = $this->phpci->executeCommand(
|
||||||
$cmd, $tls, $message_file, $recipients);
|
$cmd, $tls, $message_file, $recipients);
|
||||||
|
|
||||||
print $this->phpci->getLastOutput();
|
print $this->phpci->getLastOutput();
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
Loading…
Reference in a new issue