// Send data through the filter function if found
if ((isset($filterFunctions[$key])) && (isset($extraValues[$key . '_list']))) {
- // Filter function set!
- //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'columnName=' . $columnName . ',sqlValues[' . $key . '][' . gettype($sqlValues[$key]) . ']=' . $sqlValues[$key] . ' - BEFORE!');
+ // Debug mode enabled?
+ if (isDebugModeEnabled()) {
+ // Then log it
+ //* NOISY-DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'columnName=' . $columnName . ',sqlValues[' . $key . '][' . gettype($sqlValues[$key]) . ']=' . $sqlValues[$key] . ' - BEFORE!');
+ } // END - if
+
+ // Filter function set, so run it
$sqlValues[$key] = call_user_func_array($filterFunctions[$key], merge_array(array($columnName), $extraValues[$key . '_list']));
- //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'columnName=' . $columnName . ',sqlValues[' . $key . '][' . gettype($sqlValues[$key]) . ']=' . $sqlValues[$key] . ' - AFTER!');
+
+ // Debug mode enabled?
+ if (isDebugModeEnabled()) {
+ // Then log it
+ //* NOISY-DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'columnName=' . $columnName . ',sqlValues[' . $key . '][' . gettype($sqlValues[$key]) . ']=' . $sqlValues[$key] . ' - AFTER!');
+ } // END - if
} elseif ((isset($filterFunctions[$key])) && (!empty($filterFunctions[$key])) && (!empty($sqlValues[$key]))) {
+ // Debug mode enabled?
+ if (isDebugModeEnabled()) {
+ // Then log it
+ //* NOISY-DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'columnName=' . $columnName . ',sqlValues[' . $key . '][' . gettype($sqlValues[$key]) . ']=' . $sqlValues[$key] . ' - BEFORE!');
+ } // END - if
+
// Run through an extra filter
- //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'columnName=' . $columnName . ',sqlValues[' . $key . '][' . gettype($sqlValues[$key]) . ']=' . $sqlValues[$key] . ' - BEFORE!');
$sqlValues[$key] = handleExtraValues($filterFunctions[$key], $sqlValues[$key], NULL);
- //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'columnName=' . $columnName . ',sqlValues[' . $key . '][' . gettype($sqlValues[$key]) . ']=' . $sqlValues[$key] . ' - AFTER!');
+
+ // Debug mode enabled?
+ if (isDebugModeEnabled()) {
+ // Then log it
+ //* NOISY-DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'columnName=' . $columnName . ',sqlValues[' . $key . '][' . gettype($sqlValues[$key]) . ']=' . $sqlValues[$key] . ' - AFTER!');
+ } // END - if
+
}
// Is the value not a number?
// Filter function + extra value set
$entries[$id] = handleExtraValues($filterFunctions[$key], $entries[$id], $extraValues[$key]);
} elseif (isset($filterFunctions[$search])) {
- // Filter function set
- //* BUG: */ die($id.'/'.$key.'='.$entries[$id].'/'.$filterFunctions[$search]);
- //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'search=' . $search . ',filterFunctions=' . $filterFunctions[$search] . ',key=' . $key . ',id=' . $id . ',entries[' . gettype($entries[$id]) . ']=' . $entries[$id] . ' - BEFORE!');
+ // Debug mode enabled?
+ if (isDebugModeEnabled()) {
+ // Then log it
+ //* NOISY-DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'search=' . $search . ',filterFunctions=' . $filterFunctions[$search] . ',key=' . $key . ',id=' . $id . ',entries[' . gettype($entries[$id]) . ']=' . $entries[$id] . ' - BEFORE!');
+ } // END - if
+
+ // Handle extra values
$entries[$id] = handleExtraValues($filterFunctions[$search], $entries[$id], NULL);
- //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'search=' . $search . ',filterFunctions=' . $filterFunctions[$search] . ',key=' . $key . ',id=' . $id . ',entries[' . gettype($entries[$id]) . ']=' . $entries[$id] . ' - AFTER!');
+
+ // Debug mode enabled?
+ if (isDebugModeEnabled()) {
+ // Then log it
+ //* NOISY-DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'search=' . $search . ',filterFunctions=' . $filterFunctions[$search] . ',key=' . $key . ',id=' . $id . ',entries[' . gettype($entries[$id]) . ']=' . $entries[$id] . ' - AFTER!');
+ } // END - if
+
+ // Make sure entries[id] is not bool, then something went wrong
assert(!is_bool($entries[$id]));
}