+ rebuildCache('config', 'config');
+}
+
+// Filter for loading configuration
+function FILTER_LOAD_CONFIGURATION ($no = '0') {
+ // Is installation phase?
+ if (isInstaller()) {
+ // Then don't load any configuration
+ return;
+ } // END - if
+
+ // Is the value null, it comes from the 'init' filter chain
+ if (is_null($no)) {
+ $no = '0';
+ } // END - if
+
+ // Check for cache extension, cache-array and if the requested configuration is in cache
+ if ((isset($GLOBALS['cache_array']['config'][$no])) && (is_array($GLOBALS['cache_array']['config'][$no]))) {
+ // Load config from cache
+ mergeConfig($GLOBALS['cache_array']['config'][$no]);
+
+ // Count cache hits
+ incrementStatsEntry('cache_hits');
+ } elseif ((!isExtensionActive('cache')) || (!isset($GLOBALS['cache_array']['config'][$no]))) {
+ // Load config from DB
+ $result_config = sqlQueryEscaped('SELECT * FROM `{?_MYSQL_PREFIX?}_config` WHERE `config`=%s LIMIT 1',
+ array(bigintval($no)), __FUNCTION__, __LINE__);
+
+ // Is the config there?
+ if (sqlNumRows($result_config) == 1) {
+ // Get config from database
+ mergeConfig(sqlFetchArray($result_config));
+ } // END - if
+
+ // Free result
+ sqlFreeResult($result_config);
+
+ // Remember this config in the array
+ $GLOBALS['cache_array']['config'][$no] = getConfigArray();
+ }
+}
+
+// "Getter" for "checked" configuration entries
+function getCheckedConfig ($configEntries) {
+ // Add entries
+ $content = getConfigEntries($configEntries, ' checked="checked"');
+
+ // Return it
+ return $content;
+}
+
+// "Getter" for "selected" configuration entries
+function getSelectedConfig ($configEntries) {
+ // Add entries
+ $content = getConfigEntries($configEntries, ' selected="selected"');
+
+ // Return it
+ return $content;
+}
+
+// "Getter" for configuration entries
+function getConfigEntries ($configEntries, $value) {
+ // Init content
+ $content = array();
+
+ // "Walk" through all entries
+ foreach ($configEntries as $entry) {
+ $content[$entry . '_' . strtolower(getConfig($entry))] = $value;
+ } // END - foreach
+
+ // Return it
+ return $content;