$removed = '0';
// Prepare SQL queries
- $insertSQL = 'INSERT INTO `{?_MYSQL_PREFIX?}_filters` (`filter_name`, `filter_function`, `filter_active`) VALUES';
+ $insertSQL = 'INSERT INTO `{?_MYSQL_PREFIX?}_filters` (`filter_name`,`filter_function`,`filter_active`) VALUES';
$removeSQL = 'DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_filters` WHERE';
// Write all filters to database
// Filter for solving task given task
function FILTER_SOLVE_TASK ($data) {
// Don't solve anything if no admin!
- if (!isAdmin()) return $data;
+ if (!isAdmin()) {
+ return $data;
+ } // END - if
// Is this a direct task id or array element task_id is found?
if (is_int($data)) {
} // END - if
// Recheck if logged in
- if (!isMember()) {
+ if ((!isMember()) || ((isAdmin()) && (!isDebugModeEnabled()))) {
return false;
} // END - if
$callback = '';
$extraFunction = '';
$extraFunction2 = '';
- $value = null;
+ $value = NULL;
// Extract command and call-back
$cmdArray = explode(',', $cmd);
// Is the extension ext-sql_patches installed and at least 0.3.6?
if ((isExtensionInstalledAndNewer('sql_patches', '0.3.6')) && (isExtensionInstalledAndNewer('other', '0.2.5'))) {
// Generate random number
- setConfigEntry('RAND_NUMBER', generateRandomCode(10, mt_rand(10000, 32766), getMemberId(), ''));
+ setConfigEntry('RAND_NUMBER', generateRandomCode(10, mt_rand(10000, 99999), getMemberId(), ''));
} else {
// Generate *WEAK* code
setConfigEntry('RAND_NUMBER', mt_rand(1000000, 9999999));
// Update module counter
function FILTER_COUNT_MODULE () {
+ //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'getModule()=' . getModule() . ' - ENTERED!');
// Do count all other modules but not accesses on CSS file css.php!
SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_mod_reg` SET `clicks`=`clicks`+1 WHERE `module`='%s' LIMIT 1",
array(getModule()), __FUNCTION__, __LINE__);
+ //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'getModule()=' . getModule() . ',SQL_AFFECTEDROWS()=' . SQL_AFFECTEDROWS() . ' - EXIT!');
}
// Handles fatal errors
// Load config here
loadIncludeOnce('inc/load_config.php');
- // Set unset variable
- if (empty($check)) $check = '';
-
- // Default is none
+ // Default content is none
$content = '';
// Installation phase or regular mode?
// Message to regular users (non-admin)
$CORR = '{--FATAL_REPORT_ERRORS--}';
- // PHP warnings fixed
- if ($check == 'done') {
- if (isAdmin()) $CORR = '{--FATAL_CORRECT_ERRORS--}';
+ // Maybe the admin wants to take a look?
+ if (isAdmin()) {
+ $CORR = '{--FATAL_CORRECT_ERRORS--}';
} // END - if
// Remember all in array
} // END - if
}
+// Filter to handle configuration
+function FILTER_HANDLE_HOME_IN_INDEX_SETTING ($data) {
+ // Is ext-sql_patches up-to-date?
+ if ((isExtensionInstalledAndNewer('sql_patches', '0.8.3')) && (isDisplayHomeInIndexEnabled())) {
+ // Is 'search' as same as 'index_home'?
+ if ($data['search'] == getIndexHome()) {
+ // Then set 'content' to link to index.php
+ $data['content'] = $data['prefix'] . '<strong><a class="you_are_here" href="{%url=index.php' . $data['link_add'] . '%}">' . getTitleFromMenu($data['access_level'], $data['search'], $data['type'], $data['add']) . '</a></strong>';
+ } // END - if
+ } // END - if
+
+ // Return data
+ return $data;
+}
+
// [EOF]
?>