PHPCI/Plugin/Xmpp.php : Fix command to send to system
This commit is contained in:
parent
70ac59e65b
commit
bb500d49b4
|
@ -189,17 +189,24 @@ class XMPP implements \PHPCI\Plugin
|
|||
/*
|
||||
* Send XMPP notification for all recipients
|
||||
*/
|
||||
$success = array()
|
||||
$cmd = $sendxmpp . "%s -f .sendxmpprc -m %s %s";
|
||||
$recipients = '';
|
||||
foreach($this->recipients as $recipient) {
|
||||
if($cmd = $this->phpci->executeCommand('echo %s | ' . $sendxmpp .
|
||||
' %s %s', $this->getMessage(), $tls, $recipients)) {
|
||||
$success[] = $cmd;
|
||||
}
|
||||
|
||||
print $this->phpci->getLastOutput();
|
||||
if(!empty($recipients))
|
||||
$recipients .= ' ';
|
||||
$recipients .= $recipient;
|
||||
}
|
||||
|
||||
return (count($success) === count($this->recipients));
|
||||
$success = $this->phpci->executeCommand(
|
||||
$cmd, $tls, $message_file, $recipients);
|
||||
print $this->phpci->getLastOutput();
|
||||
|
||||
/*
|
||||
* Remove temp message file
|
||||
*/
|
||||
$this->phpci->executeCommand("rm -rf ".$message_file);
|
||||
|
||||
return $success;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue