Skip to content

Commit 81c160e

Browse files
committed
Native support mixed types in a output statement
1 parent 0194621 commit 81c160e

1 file changed

Lines changed: 26 additions & 5 deletions

File tree

manager/includes/document.parser.class.inc.php

Lines changed: 26 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ public function __construct()
203203

204204
$this->q = self::_getCleanQueryString();
205205
}
206-
206+
207207
final public function __clone()
208208
{
209209
}
@@ -5442,8 +5442,8 @@ public function invokeEvent($evtName, $extParams = array())
54425442
$this->pluginsCode .= '</fieldset><br />';
54435443
$this->pluginsTime["{$evtName} / {$pluginName}"] += $eventtime;
54445444
}
5445-
if ($e->_output != '') {
5446-
$results[] = $e->_output;
5445+
if ($e->getOutput() != '') {
5446+
$results[] = $e->getOutput();
54475447
}
54485448
if ($e->_propagate != true) {
54495449
break;
@@ -6704,7 +6704,11 @@ class SystemEvent
67046704
{
67056705
public $name = '';
67066706
public $_propagate = true;
6707-
public $_output = '';
6707+
/**
6708+
* @deprecated use setOutput(), getOutput()
6709+
* @var string
6710+
*/
6711+
public $_output;
67086712
public $activated = false;
67096713
public $activePlugin = '';
67106714
public $params = array();
@@ -6743,12 +6747,29 @@ public function alert($msg)
67436747
* Output
67446748
*
67456749
* @param string $msg
6750+
* @deprecated see addOutput
67466751
*/
67476752
public function output($msg)
67486753
{
67496754
$this->_output .= $msg;
67506755
}
67516756

6757+
/**
6758+
* @param mixed $data
6759+
*/
6760+
public function setOutput($data)
6761+
{
6762+
$this->_output = $data;
6763+
}
6764+
6765+
/**
6766+
* @return mixed
6767+
*/
6768+
public function getOutput()
6769+
{
6770+
return $this->_output;
6771+
}
6772+
67526773
/**
67536774
* Stop event propogation
67546775
*/
@@ -6761,7 +6782,7 @@ public function _resetEventObject()
67616782
{
67626783
unset ($this->returnedValues);
67636784
$this->name = "";
6764-
$this->_output = "";
6785+
$this->setOutput(null);
67656786
$this->_propagate = true;
67666787
$this->activated = false;
67676788
}

0 commit comments

Comments
 (0)