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:
authorvipsoft <vipsoft@59fd770c-687e-43c8-a1e3-f5a4ff64c105>2010-03-03 20:21:29 +0300
committervipsoft <vipsoft@59fd770c-687e-43c8-a1e3-f5a4ff64c105>2010-03-03 20:21:29 +0300
commit9a284521e29c3a35812c2b50540fad0f44a9bfc1 (patch)
tree565380dc1a93ab54451c72cd8ca3209b593ebeb7 /libs/HTML/QuickForm
parent3e0b062380cf2fced3edb8676f055db01d1291ae (diff)
workaround/fixes #1191 - php 5.2.0 syntax issue
Diffstat (limited to 'libs/HTML/QuickForm')
-rw-r--r--libs/HTML/QuickForm/Renderer/Object.php24
-rw-r--r--libs/HTML/QuickForm/Renderer/ObjectFlexy.php5
2 files changed, 24 insertions, 5 deletions
diff --git a/libs/HTML/QuickForm/Renderer/Object.php b/libs/HTML/QuickForm/Renderer/Object.php
index eb84fd78e6..c36494b867 100644
--- a/libs/HTML/QuickForm/Renderer/Object.php
+++ b/libs/HTML/QuickForm/Renderer/Object.php
@@ -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;
}
}
diff --git a/libs/HTML/QuickForm/Renderer/ObjectFlexy.php b/libs/HTML/QuickForm/Renderer/ObjectFlexy.php
index 6a232ca04e..e992e895fe 100644
--- a/libs/HTML/QuickForm/Renderer/ObjectFlexy.php
+++ b/libs/HTML/QuickForm/Renderer/ObjectFlexy.php
@@ -116,7 +116,10 @@ class HTML_QuickForm_Renderer_ObjectFlexy extends HTML_QuickForm_Renderer_Object
if($name = $header->getName()) {
$this->_obj->header->$name = $header->toHtml();
} else {
- $this->_obj->header[$this->_sectionCount] = $header->toHtml();
+ // $this->_obj->header[$this->_sectionCount] = $header->toHtml();
+ $tmp = $this->_obj->header;
+ $tmp[$this->_sectionCount] = $header->toHtml();
+ $this->_obj->header = $tmp;
}
$this->_currentSection = $this->_sectionCount++;
} // end func renderHeader