// Init the filter system (just some ideas)
$GLOBALS['filters']['chains'] = array(
- // Filters for pre-init phase
+ // Filters for pre-init phase
'preinit' => array(),
- // Filters for post-init phase
+ // Filters for post-init phase
'postinit' => array(),
- // Filters for shutdown phase
+ // Filters for shutdown phase
'shutdown' => array()
);
} // END - if
} // END - while
} // END - if
-
+
// Free result
SQL_FREERESULT($result);
} // END - if
foreach ($filterArray as $filterFunction => $cnt) {
// Construct and add the query
ADD_SQL(sprintf("UPDATE `{!_MYSQL_PREFIX!}_filters` SET `filter_counter`=%s WHERE `filter_name`='%s' AND `filter_function`='%s' LIMIT 1",
- bigintval($cnt),
- $filterName,
- $filterFunction
+ bigintval($cnt),
+ $filterName,
+ $filterFunction
));
} // END - foreach
} // END - foreach
// Load last module and last online time
$result = SQL_QUERY_ESC("SELECT last_module, last_online FROM `{!_MYSQL_PREFIX!}_user_data` WHERE userid=%s LIMIT 1",
- array(getUserId()), __FUNCTION__, __LINE__);
+ array(getUserId()), __FUNCTION__, __LINE__);
// Entry found?
if (SQL_NUMROWS($result) == 1) {
// "what" not set?
if (empty($GLOBALS['what'])) {
// Fix it to default
- $GLOBALS['what'] = "welcome";
- if (getConfig('index_home') != '') $GLOBALS['what'] = getConfig('index_home');
+ $GLOBALS['what'] = "welcome";
+ if (getConfig('index_home') != '') $GLOBALS['what'] = getConfig('index_home');
} // END - if
// Update last module / online time
SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_user_data` SET `last_module`='%s', last_online=UNIX_TIMESTAMP(), REMOTE_ADDR='%s' WHERE userid=%s LIMIT 1",
- array($GLOBALS['what'], detectRemoteAddr(), getUserId()), __FUNCTION__, __LINE__);
+ array($GLOBALS['what'], detectRemoteAddr(), getUserId()), __FUNCTION__, __LINE__);
} else {
// Destroy session, we cannot update!
destroyUserSession();