function cleantalk_get_fields_any in Anti Spam by CleanTalk 8
Same name and namespace in other branches
- 7 cleantalk.module \cleantalk_get_fields_any()
- 7.2 cleantalk.module \cleantalk_get_fields_any()
gets data for checking recursively
1 call to cleantalk_get_fields_any()
File
- ./
cleantalk.module, line 1019 - Main CleanTalk integration module functions.
Code
function cleantalk_get_fields_any(&$email, &$message, &$nickname, &$subject, $arr) {
foreach ($arr as $key => $value) {
if (!is_array($value) && !is_object($value)) {
if ($email === '' && @preg_match("/^\\S+@\\S+\\.\\S+\$/", $value)) {
$email = $value;
}
else {
if ($nickname === '' && cleantalk_get_data_from_submit($value, 'name')) {
$nickname = $value;
}
else {
if ($subject === '' && cleantalk_get_data_from_submit($value, 'subject')) {
$subject = $value;
}
else {
@($message .= "{$value}\n");
}
}
}
}
else {
if (!is_object($value)) {
cleantalk_get_fields_any($email, $message, $nickname, $subject, $value);
}
}
}
}