Changeset 2629
- Timestamp:
- 12/01/06 17:05:18 (2 years ago)
- Location:
- branches/1.1-beta
- Files:
-
- 3 modified
-
lib/config.php (modified) (1 diff)
-
plugins/EAS/index.php (modified) (2 diffs)
-
plugins/EAS/index.xml (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/1.1-beta/lib/config.php
r2606 r2629 31 31 32 32 function requireComponent($name) { 33 if (!ereg('^[[:alnum:]]+[[:alnum:].]+$', $name)) 34 return; 33 //if (!ereg('^[[:alnum:]]+[[:alnum:].]+$', $name)) return; 35 34 include_once (ROOT . "/components/$name.php"); 36 35 } -
branches/1.1-beta/plugins/EAS/index.php
r2140 r2629 6 6 requireComponent('Eolin.PHP.XMLRPC'); 7 7 8 global $hostURL, $blogURL ;8 global $hostURL, $blogURL, $database; 9 9 10 10 $blogstr = $hostURL . $blogURL; … … 15 15 { 16 16 // call fail 17 // Do Local spam check with "Thief-cat algorithm" 18 $count = 0; 19 $tableName = $database['prefix'] . 'Trackbacks'; 20 21 if ($type == 2) // Trackback Case 22 { 23 $sql = 'SELECT COUNT(id) as cc FROM ' . $database['prefix'] . 'trackbacks WHERE'; 24 $sql .= ' url = \'' . mysql_tt_escape_string($url) . '\''; 25 $sql .= ' AND isFiltered > 0'; 26 27 if ($result = mysql_query($sql)) { 28 $row = mysql_fetch_row($result); 29 $count += @$row[0]; 30 } 31 32 } else { // Comment Case 33 $tableName = $database['prefix'] . 'Comments'; 34 35 $sql = 'SELECT COUNT(id) as cc FROM ' . $database['prefix'] . 'trackbacks WHERE'; 36 $sql .= ' comment = \'' . mysql_tt_escape_string($content) . '\''; 37 $sql .= ' AND homepage = \'' . mysql_tt_escape_string($url) . '\''; 38 $sql .= ' AND name = \'' . mysql_tt_escape_string($name) . '\''; 39 $sql .= ' AND isFiltered > 0'; 40 41 if ($result = mysql_query($sql)) { 42 $row = mysql_fetch_row($result); 43 $count += @$row[0]; 44 } 45 } 46 47 // Check IP 48 $sql = 'SELECT COUNT(id) as cc FROM ' . $tableName . ' WHERE'; 49 $sql .= ' ip = \'' . mysql_tt_escape_string($_SERVER['REMOTE_ADDR']) . '\''; 50 $sql .= ' AND isFiltered > 0'; 51 52 if ($result = mysql_query($sql)) { 53 $row = mysql_fetch_row($result); 54 $count += @$row[0]; 55 } 56 57 if ($count >= 10) { 58 return false; 59 } 60 17 61 return true; 18 62 } -
branches/1.1-beta/plugins/EAS/index.xml
r2283 r2629 1 1 <?xml version="1.0" encoding="utf-8"?> 2 <plugin version="1. 0">2 <plugin version="1.1"> 3 3 <title xml:lang="ko">EAS-Eolin Antispam Service</title> 4 4 <title xml:lang="en">EAS-Eolin Antispam Service</title> 5 5 <link>http://antispam.eolin.com</link> 6 <version>0.9 1beta</version>6 <version>0.95 beta</version> 7 7 <description xml:lang="ko">EOLIN에서 제공하는 스팸 코멘트/트랙백 차단 서비스를 사용합니다.</description> 8 8 <description xml:lang="en">Deny spam comments and trackback supplyed by EOLIN.</description> … … 12 12 <safety changeData="no" exposeData="no" accessLocal="no" accessRemote="yes" accessRaw="no" /> 13 13 <requirements> 14 <tattertools>1. 0.6</tattertools>14 <tattertools>1.1</tattertools> 15 15 </requirements> 16 16 <binding>
