* @return true if the string is a valid email, false else
*/
function Check($_string) {
+ if(function_exists('isvalid_email_redirection'))
+ return isvalid_email_redirection($_string);
return preg_match("/^[\w\-.]+(\+[\w\-.]+)?@[\w\-.]+\.[a-zA-Z]{2,44}$/", $_string);
}
function sql_store($_uid, $_rid, $_data) {
if($this->global)
- mysql_query("INSERT INTO actions SET uid='$_uid',rid='0',pid='{$_data[0]}',data='{$_data[1]}'");
+ mysql_query("INSERT INTO matches SET uid='$_uid',rid='0',pid='{$_data[0]}',data='{$_data[1]}'");
else
- mysql_query("INSERT INTO actions SET uid='$_uid',rid='$_rid',pid='{$_data[0]}',data='{$_data[1]}'");
+ mysql_query("INSERT INTO matches SET uid='$_uid',rid='$_rid',pid='{$_data[0]}',data='{$_data[1]}'");
}
/** true if the plugin is used as global rule
function to_form($_data) {
$res = "<table width=\"100%\" cellspacing=\"0\" cellpadding=\"1\">\n"
- . "<tr><th width=\"25%\">BogoFilter</th>\n";
+ . "<tr><th width=\"25%\">"._i18n('1_bogo')."</th>\n";
$res .= "<td><input type='hidden' name='global[1][0]' value='1' />\n"
. " <input type='radio' name='global[1][1]' value='0' "
$left_joins .= $plug->sql_get();
$sql = mysql_query("SELECT * FROM matches WHERE matches.uid='$_uid' AND matches.rid='$_rid' ".$left_joins);
-
- while($t = mysql_fetch_assoc($sql))
- $this->matches[] = $philter->config['match_plugins'][$t['pid']]->sql_to_data($t);
+
+ if($_rid)
+ while($t = mysql_fetch_assoc($sql))
+ $this->matches[] = $philter->config['match_plugins'][$t['pid']]->sql_to_data($t);
+ else
+ while($t = mysql_fetch_assoc($sql))
+ $this->matches[] = $philter->config['global_plugins'][$t['pid']]->sql_to_data($t);
}
function move_to($_new_rank, $_uid, $_rid) {