Changeset 61210 in spip-zone
- Timestamp:
- May 11, 2012, 10:53:19 PM (9 years ago)
- Location:
- _plugins_/couteau_suisse
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
_plugins_/couteau_suisse/fonds/test_spam_bd.html
r54758 r61210 2 2 #SET{tab, #ARRAY} 3 3 <BOUCLE_m(FORUMS){statut?=#ENV*{statut}}{plat}{par date}{inverse}> 4 #SET{test, # TEXTE*|concat{" ",#TITRE*," ",#AUTEUR*," ",#EMAIL_AUTEUR*}|spam_filtre_de_test|=={ko}}4 #SET{test, #ARRAY{0,#TEXTE*,1,#TITRE*,2,#AUTEUR*,3,#EMAIL_AUTEUR*}|spam_filtre_de_test_array|=={ko}} 5 5 [(#GET{test}|non)#SET{test, #IP|spam_filtre_de_test_ip|=={ko}}] 6 6 [(#GET{test}|oui)#SET{tab, #GET{tab}|push{#ID_FORUM}}] -
_plugins_/couteau_suisse/outils/spam.php
r47574 r61210 12 12 array('<a href=', '</a>', '[url=', '[/url]', '[link=', '[/link]',), 13 13 // des regexpr ou ips (sans delimiteurs) 14 array(), array(), array() 14 array(), array(), array(), array() 15 15 ); 16 16 // repere les mots entiers entre parentheses, les regexpr entre slashes et les caracteres unicodes … … 21 21 elseif(preg_match(',^\/(&#)?(.*?)(;?)\/$,', $v, $reg)) 22 22 $t[($reg[2] && $reg[3])?2:1][]=$reg[2]; 23 elseif(preg_match(',^(\/.*\/)([a-z]+)$,i', $v, $reg)) 24 $t[4][] = $reg[1].preg_replace(',[^imsxeAESUXu],','',$reg[2]); 23 25 else $t[0][] = $v; 24 26 } -
_plugins_/couteau_suisse/outils/spam_action_rapide.php
r59861 r61210 3 3 // module inclu dans la description de l'outil en page de configuration 4 4 5 //include_spip('inc/actions'); 6 include_spip('inc/actions_compat'); 5 include_spip('inc/actions'); 7 6 8 7 function spam_filtre_de_test($texte) { … … 11 10 $test = false; 12 11 return cs_test_spam($spam, $texte, $test)?'ko':'ok'; 12 } 13 14 function spam_filtre_de_test_array($textes) { 15 $spam = cs_lire_data_outil('spam'); 16 $test = false; 17 foreach($textes as $texte) cs_test_spam($spam, $texte, $test); 18 return $test?'ko':'ok'; 13 19 } 14 20 -
_plugins_/couteau_suisse/outils/spam_options.php
r39078 r61210 43 43 44 44 function cs_test_spam(&$spam, &$texte, &$test) { 45 foreach($spam[0] as $m) $test |= strpos($texte, $m)!==false; 46 if(!$test && $spam[1]) $test = preg_match($spam[1], $texte); 47 if(!$test && $spam[2]) { 45 foreach($spam[0] as $m) 46 if($test |= strpos($texte, $m)!==false) return true; 47 if($spam[1]) 48 if($test = preg_match($spam[1], $texte)) return true; 49 if($spam[2]) { 48 50 include_spip('inc/charsets'); 49 $test = preg_match($spam[2], charset2unicode($texte));51 if($test = preg_match($spam[2], charset2unicode($texte))) return true; 50 52 } 53 if($spam[4]) foreach($spam[4] as $m) 54 if($test = preg_match($m, $texte)) return true; 51 55 return $test; 52 56 } -
_plugins_/couteau_suisse/paquet.xml
r60201 r61210 2 2 prefix="couteau_suisse" 3 3 categorie="maintenance" 4 version="1.8.6 2"4 version="1.8.63" 5 5 etat="stable" 6 6 compatibilite="[1.9.2;3.0.99]" -
_plugins_/couteau_suisse/plugin.xml
r60201 r61210 3 3 <slogan>... ou plus de fonctionnalités pour SPIP !</slogan> 4 4 <icon>img/couteau-50.gif</icon> 5 <version>1.8.6 2</version>5 <version>1.8.63</version> 6 6 <version_base>1.1</version_base> 7 7 <auteur>Patrice Vanneufville
Note: See TracChangeset
for help on using the changeset viewer.