1. Jean-Christian Denis
  2. dotclear

Commits

Jean-Christian Denis  committed f4ac115

Fix #1186 : Allow wildcard for IP address on comments filters

  • Participants
  • Parent commits 4a5d594
  • Branches default

Comments (0)

Files changed (1)

File inc/core/class.dc.blog.php

View file
 		}
 		
 		if (isset($params['comment_ip'])) {
-			$strReq .= "AND comment_ip = '".$this->con->escape($params['comment_ip'])."' ";
+			$comment_ip = $this->con->escape(str_replace('*','%',$params['comment_ip']));
+			$strReq .= "AND comment_ip LIKE '".$comment_ip."' ";
 		}
 		
 		if (isset($params['q_author'])) {