+// Filter to load include files
+function FILTER_loadIncludeLUDES () {
+ // Default is $data as inclusion list
+ $data = GET_INC_POOL();
+
+ // Is it an array?
+ if ((!isset($data)) || (!is_array($data))) {
+ // Then abort here
+ debug_report_bug(sprintf("INC_POOL is no array! Type: %s", gettype($data)));
+ } elseif (isset($data['inc_pool'])) {
+ // Use this as new inclusion pool!
+ SET_INC_POOL($data['inc_pool']);
+ }
+
+ // Check for added include files
+ if (COUNT_INC_POOL() > 0) {
+ // Loads every include file
+ foreach (GET_INC_POOL() as $FQFN) {
+ loadIncludeOnce($FQFN);
+ } // END - foreach
+
+ // Reset array
+ INIT_INC_POOL();
+ } // END - if
+
+ // Continue with processing
+ return $data;
+}
+
+// Filter for running SQL commands
+function FILTER_RUN_SQLS ($data) {
+ // Debug message
+ //* DEBUG: */ DEBUG_LOG(__FUNCTION__, __LINE__, " - Entered!");
+
+ // Is the array there?
+ if ((IS_SQLS_VALID()) && ((!isset($data['dry_run'])) || ($data['dry_run'] == false))) {
+ // Run SQL commands
+ //* DEBUG: */ DEBUG_LOG(__FUNCTION__, __LINE__, " - Found ".COUNT_SQLS()." queries to run.");
+ foreach (GET_SQLS() as $sql) {
+ // Trim spaces away
+ $sql = trim($sql);
+
+ // Is there still a query left?
+ if (!empty($sql)) {
+ // Do we have an "ALTER TABLE" command?
+ if (substr(strtolower($sql), 0, 11) == "alter table") {
+ // Analyse the alteration command
+ //* DEBUG: */ DEBUG_LOG(__FUNCTION__, __LINE__, "Alterting table: {$sql}");
+ SQL_ALTER_TABLE($sql, __FUNCTION__, __LINE__);
+ } else {
+ // Run regular SQL command
+ //* DEBUG: */ DEBUG_LOG(__FUNCTION__, __LINE__, "Running regular query: {$sql}");
+ SQL_QUERY($sql, __FUNCTION__, __LINE__, false);
+ }
+ } // END - if
+ } // END - foreach
+ } // END - if
+
+ // Debug message
+ //* DEBUG: */ DEBUG_LOG(__FUNCTION__, __LINE__, " - Left!");
+}
+
+// Filter for updating/validating login data
+function FILTER_UPDATE_LOGIN_DATA () {
+ // Add missing array
+ if ((!isset($GLOBALS['last'])) || (!is_array($GLOBALS['last']))) $GLOBALS['last'] = array();
+
+ // Recheck if logged in
+ if (!IS_MEMBER()) return false;