+ asort($GLOBALS['inc_pool'][$pool]);
+ } // END - if
+}
+
+// Load the whole include pool
+function loadIncludePool ($pool) {
+ //* DEBUG: */ print __FUNCTION__.':pool='.$pool.' - START<br />';
+ foreach (getIncludePool($pool) as $inc) {
+ //* DEBUG: */ print __FUNCTION__.':inc='.$inc.'<br />';
+ loadIncludeOnce($inc);
+ } // END - foreach
+ //* DEBUG: */ print __FUNCTION__.':pool='.$pool.' - END<br />';
+
+ // 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] = getConfig('PATH') . $inc;
+
+ // Is the include file there?
+ if (!isIncludeReadable($inc)) {
+ // Not there so log it
+ debug_report_bug(sprintf("Include file %s not found.", $inc));
+ } // END - if