From 03583da19dd4a0f0ec02ef3ead3f0e06475a3b32 Mon Sep 17 00:00:00 2001 From: Robert Sesek Date: Mon, 2 Jan 2006 20:19:44 +0000 Subject: [PATCH] Making check_isso_fields() have multi-module support --- kernel.php | 23 ++++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-) diff --git a/kernel.php b/kernel.php index 57f427b..6fa391b 100644 --- a/kernel.php +++ b/kernel.php @@ -389,13 +389,26 @@ class Shared_Object_Framework * * @access public * + * @param string Module to check for; null is kernel, string is a module name, false is all * @param bool Is this a non-error environment that should display all fields? */ - function check_isso_fields($called = false) + function check_isso_fields($module = null, $called = false) { $missing = array(); - $modules = $this->show_modules(true); + if ($module === false) + { + $modules = $this->show_modules(true); + } + else if ($module === null) + { + $modules = array('shared_object_framework'); + } + else + { + $modules = array($module); + } + foreach ($modules AS $module) { if (empty($this->modules["$module"]->fields)) @@ -407,11 +420,11 @@ class Shared_Object_Framework { if ($field[0] == REQ_YES AND $field[2] == false) { - $missing[] = $name; + $missing[] = $module . ':: ' . $name; } else if ($called == true AND $field[2] == false) { - $missing[] = $name . ($field[0] == REQ_YES ? ' (REQUIRED)' : ''); + $missing[] = $module . ':: ' . $name . ($field[0] == REQ_YES ? ' (REQUIRED)' : ''); } } } @@ -471,7 +484,7 @@ class Shared_Object_Framework */ function &load($framework, $asobject, $globalize = false) { - $this->check_isso_fields(); + $this->check_isso_fields(null); // set the object interlock if (!method_exists($GLOBALS['isso:null-framework'], 'load')) -- 2.43.5