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