+ asort($GLOBALS['inc_pool'][$pool]);
+ } // END - if
+}
+
+// Load the whole include pool
+function loadIncludePool ($pool) {
+ //* DEBUG: */ debugOutput(__FUNCTION__.':pool='.$pool.' - START');
+ foreach (getIncludePool($pool) as $inc) {
+ //* DEBUG: */ debugOutput(__FUNCTION__.':inc='.$inc);
+ loadIncludeOnce($inc);
+ } // END - foreach
+ //* DEBUG: */ debugOutput(__FUNCTION__.':pool='.$pool.' - END');
+
+ // Remove it
+ initIncludePool($pool);
+}
+
+// Loads an include file and logs any missing files for debug purposes
+function loadInclude ($inc) {
+ // Do we have cache?
+ if (!isset($GLOBALS['inc_loaded'][$inc])) {
+ // Add the path. This is why we need a trailing slash in config.php
+ $GLOBALS['inc_loaded'][$inc] = getPath() . $inc;
+
+ // Is the include file there?
+ if (!isIncludeReadable($inc)) {
+ // Not there so log it
+ debug_report_bug(__FUNCTION__, __LINE__, sprintf("Include file %s not found.", $inc));
+ } // END - if