Changeset 90352 in spip-zone
- Timestamp:
- Jun 19, 2015, 10:37:38 AM (6 years ago)
- Location:
- _core_/plugins/statistiques
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
_core_/plugins/statistiques/genie/visites.php
r80104 r90352 239 239 240 240 /** 241 * Nettoyer les IPs des flooders 24H apres leur dernier passage 242 */ 243 function visites_nettoyer_flood(){ 244 if (is_dir($dir=_DIR_TMP.'flood/')){ 245 include_spip('inc/invalideur'); 246 if (!defined('_IP_FLOOD_TTL')) define('_IP_FLOOD_TTL',24*3600); // 24H par defaut 247 $options = array( 248 'mtime' => $_SERVER['REQUEST_TIME'] - _IP_FLOOD_TTL, 249 ); 250 purger_repertoire($dir,$options); 251 } 252 } 253 254 255 /** 241 256 * Cron de calcul de statistiques des visites 242 257 * … … 257 272 return (0 - $t); 258 273 274 // nettoyer les IP des floodeurs quand on a fini de compter les stats 275 visites_nettoyer_flood(); 276 259 277 return 1; 260 278 } -
_core_/plugins/statistiques/paquet.xml
r87720 r90352 2 2 prefix="stats" 3 3 categorie="statistique" 4 version="0.6. 2"4 version="0.6.3" 5 5 etat="stable" 6 6 compatibilite="[3.0.0;3.1.*]" -
_core_/plugins/statistiques/public/stats.php
r88959 r90352 93 93 ecrire_fichier($fichier, serialize($content)); 94 94 } 95 else { 96 $flood = sous_repertoire(_DIR_TMP, 'flood') . $GLOBALS['ip']; 97 @touch($flood); 98 } 95 99 } 96 100
Note: See TracChangeset
for help on using the changeset viewer.