<?php
-// $Id: spam.php,v 1.149 2007/05/05 06:36:50 henoheno Exp $
+// $Id: spam.php,v 1.150 2007/05/05 07:09:33 henoheno Exp $
// Copyright (C) 2006-2007 PukiWiki Developers Team
// License: GPL v2 or (at your option) any later version
//
return implode(', ', $tmp);
}
-// Very roughly shrink the lines of var_export()
+// Very roughly, shrink the lines of var_export()
// NOTE: If the same data exists, it must be corrupted.
function var_export_shrink($expression, $return = FALSE)
{
function summarize_detail_newtral($progress = array())
{
- if (empty($progress['hosts'])) return '';
+ if (! isset($progress['hosts']) || ! is_array($progress['hosts'])) return '';
- return var_export_shrink($progress['hosts'], TRUE);
+ // Sort by domain
+ $tmp = array();
+ foreach($progress['hosts'] as $value) {
+ $tmp[strrev($value)] = $value;
+ }
+ ksort($tmp);
+
+ return implode(', ', $tmp);
}
<?php
-// $Id: spam_pickup.php,v 1.46 2007/05/04 13:43:59 henoheno Exp $
+// $Id: spam_pickup.php,v 1.47 2007/05/05 07:09:33 henoheno Exp $
// Concept-work of spam-uri metrics
// Copyright (C) 2006-2007 PukiWiki Developers Team
// License: GPL v2 or (at your option) any later version
$tmp = summarize_detail_newtral($progress);
if (! $asap && $tmp != '') {
- echo 'DETAIL_NEUTRAL_HOST: ' .
- str_replace(' ', ' ', nl2br("\n" . htmlspecialchars($tmp). "\n"));
+ echo 'DETAIL_NEUTRAL_HOST: ' . htmlspecialchars($tmp);
}
if ($prog) {