From dc1b5278a45acaa35a08e55e0fb4ca79d833d614 Mon Sep 17 00:00:00 2001 From: dvserg Date: Sun, 2 Jan 2011 10:41:43 +0300 Subject: Bug #1131 Fix --- config/squidGuard/squidguard.inc | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/config/squidGuard/squidguard.inc b/config/squidGuard/squidguard.inc index 1c681497..12e52e35 100644 --- a/config/squidGuard/squidguard.inc +++ b/config/squidGuard/squidguard.inc @@ -1326,9 +1326,18 @@ function squidguard_logrep( $filename, $lncount, $reverse ) $cn = explode(" ", $cn, 4); # split strings - $st = str_split ($cn[3], 25); +# $st = str_split ($cn[3], 25); +# $cn[3] = ""; +# foreach( $st as $s ) $cn[3] .= $s . ""; + $p = 0; + $pstep = 15; + $str = $cn[3]; $cn[3] = ""; - foreach( $st as $s ) $cn[3] .= $s . ""; + for ( $p = 0; $p < strlen($str); $p += $pstep ) { + $s = substr( $str, $p, $pstep ); + if ( !$s ) break; + $cn[3] .= $s . ""; + } $res .= "{$cn[0]} {$cn[1]}{$cn[3]}"; } -- cgit v1.2.3