Remove unused "extends"-code

This commit is contained in:
Matthias Jentsch 2015-08-04 15:14:10 +02:00
parent 7095ad5bc7
commit 28e1b3119c
2 changed files with 3 additions and 11 deletions

View File

@ -173,18 +173,13 @@ class IniEditor
* Create the section if it does not exist and set the properties
*
* @param string $section The section name
* @param array $extend The section that should be extended by this section
*/
public function setSection($section, $extend = null)
public function setSection($section)
{
if (false !== strpos($section, '[') || false !== strpos($section, ']')) {
throw new ConfigurationError('Brackets not allowed in section: %s', $section);
}
if (isset($extend)) {
$decl = '[' . $section . ' : ' . $extend . ']';
} else {
$decl = '[' . $section . ']';
}
$decl = '[' . $section . ']';
$line = $this->getSectionLine($section);
if ($line !== -1) {
$this->deleteLine($line);

View File

@ -151,10 +151,7 @@ class IniWriter extends Zend_Config_Writer_FileAbstract
if ($value instanceof Zend_Config) {
// The value is a nested Zend_Config, handle it recursively
if ($section === null) {
// Update the section declaration
$extends = $newconfig->getExtends();
$extend = array_key_exists($key, $extends) ? $extends[$key] : null;
$editor->setSection($key, $extend);
$editor->setSection($key);
}
if ($oldvalue === null) {
$oldvalue = new Zend_Config(array());