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