// Something has been added?
if ($inserted > 0) {
- // Finish SQL command
- $insertSQL = substr($insertSQL, 0, -1);
-
- // And run it
- addSql($insertSQL);
+ // Finish SQL command and add it
+ addSql(substr($insertSQL, 0, -1));
} // END - if
// Something has been removed?
if ($removed > 0) {
- // Finish SQL command
- $removeSQL = substr($removeSQL, 0, -2) . 'LIMIT '.$removed;
-
- // And run it
- addSql($removeSQL);
+ // Finish SQL command and add it
+ addSql(substr($removeSQL, 0, -2) . 'LIMIT ' . $removed);
} // END - if
// Shall we update usage counters (ONLY FOR DEBUGGING!)
SQL_FREERESULT($result);
}
-// Filter for checking admin ACL
-function FILTER_CHECK_ADMIN_ACL () {
- // Extension not installed so it's always allowed to access everywhere!
- $ret = true;
-
- // Ok, Cookie-Update done
- if ((isExtensionInstalledAndNewer('admins', '0.3.0')) && (isExtensionActive('admins'))) {
- // Check if action GET variable was set
- $action = getAction();
- if (isWhatSet()) {
- // Get action value by what-value
- $action = getModeAction('admin', getWhat());
- } // END - if
-
- // Check for access control line of current menu entry
- $ret = adminsCheckAdminAcl($action, getWhat());
- } // END - if
-
- // Return result
- return $ret;
-}
-
// Filter for initializing randomizer
function FILTER_INIT_RANDOMIZER () {
// Simply init the randomizer with seed and _ADD value
if (isConfigEntrySet($matches[1][$key])) {
// Set it for caching
$GLOBALS['compile_config'][$matches[1][$key]] = getConfig($matches[1][$key]);
- } else {
+ } elseif (isConfigEntrySet('default_' . strtoupper($matches[1][$key]))) {
+ // Use default value
+ $GLOBALS['compile_config'][$matches[1][$key]] = getConfig('DEFAULT_' . strtoupper($matches[1][$key]));
+ } elseif (isMessageIdValid('DEFAULT_' . strtoupper($matches[1][$key]))) {
// No config, try the language system
$GLOBALS['compile_config'][$matches[1][$key]] = getMessage('DEFAULT_' . strtoupper($matches[1][$key]));
+ } else {
+ // Unhandled!
+ $GLOBALS['compile_config'][$matches[1][$key]] = '!' . $matches[1][$key] . '!';
}
} // END - if