From 3042aafae8499f33e7b7ca0c3be4bca95543d4f8 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Fri, 28 Jun 2013 21:47:58 +0000 Subject: [PATCH] Added option parameter 'forceInit' --- inc/classes/main/class_BaseFrameworkSystem.php | 5 +++-- inc/classes/main/stacker/class_BaseStacker.php | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/inc/classes/main/class_BaseFrameworkSystem.php b/inc/classes/main/class_BaseFrameworkSystem.php index b48b030c..0fb474dc 100644 --- a/inc/classes/main/class_BaseFrameworkSystem.php +++ b/inc/classes/main/class_BaseFrameworkSystem.php @@ -2225,11 +2225,12 @@ class BaseFrameworkSystem extends stdClass implements FrameworkInterface { * @param $keyGroup Main group for the key * @param $subGroup Sub group for the key * @param $key Key to use + * @param $forceInit Optionally force initialization * @return void */ - protected final function initGenericArray ($keyGroup, $subGroup, $key) { + protected final function initGenericArray ($keyGroup, $subGroup, $key, $forceInit = FALSE) { // Is it already set? - if ($this->isGenericArrayKeySet($keyGroup, $subGroup, $key)) { + if (($forceInit === FALSE) && ($this->isGenericArrayKeySet($keyGroup, $subGroup, $key))) { // Already initialized trigger_error(__METHOD__ . ':keyGroup=' . $keyGroup . ',subGroup=' . $subGroup . ',key=' . $key . ' already initialized.'); } // END - if diff --git a/inc/classes/main/stacker/class_BaseStacker.php b/inc/classes/main/stacker/class_BaseStacker.php index d5917bb5..aaa1adca 100644 --- a/inc/classes/main/stacker/class_BaseStacker.php +++ b/inc/classes/main/stacker/class_BaseStacker.php @@ -55,7 +55,7 @@ class BaseStacker extends BaseFrameworkSystem { } // END - if // Initialize the given stack - $this->initGenericArray('stacks', $stackerName, 'entries'); + $this->initGenericArray('stacks', $stackerName, 'entries', $forceReInit); } /** -- 2.30.2