Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'libs/HTML/QuickForm/Renderer/Object.php')
-rw-r--r--libs/HTML/QuickForm/Renderer/Object.php26
1 files changed, 21 insertions, 5 deletions
diff --git a/libs/HTML/QuickForm/Renderer/Object.php b/libs/HTML/QuickForm/Renderer/Object.php
index eb84fd78e6..9613931835 100644
--- a/libs/HTML/QuickForm/Renderer/Object.php
+++ b/libs/HTML/QuickForm/Renderer/Object.php
@@ -24,7 +24,7 @@
/**
* An abstract base class for QuickForm renderers
*/
-require_once 'HTML/QuickForm/Renderer.php';
+require_once dirname(__FILE__) . '/../Renderer.php';
/**
* A concrete renderer for HTML_QuickForm, makes an object from form contents
@@ -138,7 +138,10 @@ class HTML_QuickForm_Renderer_Object extends HTML_QuickForm_Renderer
{
$hobj = new StdClass;
$hobj->header = $header->toHtml();
- $this->_obj->sections[$this->_sectionCount] = $hobj;
+ // $this->_obj->sections[$this->_sectionCount] = $hobj;
+ $tmp = $this->_obj->sections;
+ $tmp[$this->_sectionCount] = $hobj;
+ $this->_obj->sections = $tmp;
$this->_currentSection = $this->_sectionCount++;
}
@@ -231,11 +234,24 @@ class HTML_QuickForm_Renderer_Object extends HTML_QuickForm_Renderer
{
$name = $elObj->name;
if(is_object($this->_currentGroup) && $elObj->type != 'group') {
- $this->_currentGroup->elements[] = $elObj;
+ // $this->_currentGroup->elements[] = $elObj;
+ $tmp = $this->_currentGroup->elements;
+ $tmp[] = $elObj;
+ $this->_currentGroup->elements = $tmp;
} elseif (isset($this->_currentSection)) {
- $this->_obj->sections[$this->_currentSection]->elements[] = $elObj;
+ // $this->_obj->sections[$this->_currentSection]->elements[] = $elObj;
+ $tmpSections = $this->_obj->sections;
+ $tmpCurrentSection = $tmpSections[$this->_currentSection];
+ $tmpElements = $tmpCurrentSection->elements;
+ $tmpElements[] = $elObj;
+ $tmpCurrentSection->elements = $tmpElements;
+ $tmpSections[$this->_currentSection] = $tmpCurrentSection;
+ $this->_obj->sections = $tmpSections;
} else {
- $this->_obj->elements[] = $elObj;
+ // $this->_obj->elements[] = $elObj;
+ $tmp = $this->_obj->elements;
+ $tmp[] = $elObj;
+ $this->_obj->elements = $tmp;
}
}