From 66dca8f87734b5b64b2b597ab61193c21d958bfb Mon Sep 17 00:00:00 2001 From: Robert Sesek Date: Sat, 31 Dec 2005 09:29:07 +0000 Subject: [PATCH] - Making check_isso_fields() multi-module compliant - Warnings-- --- kernel.php | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/kernel.php b/kernel.php index f23f30d..7c1a0bd 100644 --- a/kernel.php +++ b/kernel.php @@ -394,15 +394,25 @@ class Shared_Object_Framework function check_isso_fields($called = false) { $missing = array(); - foreach ($this->fields AS $name => $field) + + $modules = $this->show_modules(true); + foreach ($modules AS $module) { - if ($field[0] == REQ_YES AND $field[2] == false) + if (empty($this->modules["$module"]->fields)) { - $missing[] = $name; + continue; } - else if ($called == true AND $field[2] == false) + + foreach ($this->modules["$module"]->fields AS $name => $field) { - $missing[] = $name . ($field[0] == REQ_YES ? ' (REQUIRED)' : ''); + if ($field[0] == REQ_YES AND $field[2] == false) + { + $missing[] = $name; + } + else if ($called == true AND $field[2] == false) + { + $missing[] = $name . ($field[0] == REQ_YES ? ' (REQUIRED)' : ''); + } } } @@ -467,6 +477,7 @@ class Shared_Object_Framework if (!method_exists($GLOBALS['isso:null-framework'], 'load')) { $GLOBALS['isso:null-framework'] =& $this; + $this->modules['shared_object_framework'] =& $this; } if ($this->is_loaded($framework)) @@ -522,6 +533,7 @@ class Shared_Object_Framework */ function show_modules($return = false) { + $modules = array(); foreach ($this->modules AS $object) { $modules[] = get_class($object); -- 2.22.5