PyukiWiki CVS Commit
pyuki****@lists*****
2012年 1月 30日 (月) 23:50:57 JST
Index: PyukiWiki-Devel-UTF8/lib/Nana/Logs.pm diff -u PyukiWiki-Devel-UTF8/lib/Nana/Logs.pm:1.104 PyukiWiki-Devel-UTF8/lib/Nana/Logs.pm:1.105 --- PyukiWiki-Devel-UTF8/lib/Nana/Logs.pm:1.104 Mon Jan 30 23:38:53 2012 +++ PyukiWiki-Devel-UTF8/lib/Nana/Logs.pm Mon Jan 30 23:50:57 2012 @@ -1,6 +1,6 @@ ###################################################################### # Logs.pm - This is PyukiWiki, yet another Wiki clone. -# $Id: Logs.pm,v 1.104 2012/01/30 14:38:53 papu Exp $ +# $Id: Logs.pm,v 1.105 2012/01/30 14:50:57 papu Exp $ # # "Nana::Logs" version 0.2 $$ # Author: Nanami @@ -27,6 +27,7 @@ #use Nana::YukiWikiDB; #use Nana::YukiWikiDB_GZIP; use Nana::Cache; +use Nana::GZIP; my @SearchEnginesSearchIDOrder; my @RobotsSearchIDOrder; @@ -247,7 +248,8 @@ ); my $timestamp=0; my $cachefile="logs_$target"; - my $buf=$cache->read($cachefile,1); + my $buf=Nana::GZIP::gzipuncompress($cache->read($cachefile,1)); + foreach(split(/\n/,$buf)) { my($k,$n,$v)=split(/\f/,$_); $timestamp=$v if($k eq "timestamp"); @@ -491,7 +493,7 @@ foreach(keys %searchengine) { $buf.="searchengines\f$_\f$searchengine{$_}\n"; } foreach(keys %keywords) { $buf.="keywords\f$_\f$keywords{$_}\n"; } - $cache->write($cachefile,$buf); + $cache->write($cachefile,Nana::GZIP::gzipcompress($buf)); } return( count => $counts, Index: PyukiWiki-Devel-UTF8/lib/Nana/YukiWikiDB_GZIP.pm diff -u PyukiWiki-Devel-UTF8/lib/Nana/YukiWikiDB_GZIP.pm:1.153 PyukiWiki-Devel-UTF8/lib/Nana/YukiWikiDB_GZIP.pm:1.154 --- PyukiWiki-Devel-UTF8/lib/Nana/YukiWikiDB_GZIP.pm:1.153 Mon Jan 30 21:20:30 2012 +++ PyukiWiki-Devel-UTF8/lib/Nana/YukiWikiDB_GZIP.pm Mon Jan 30 23:50:57 2012 @@ -1,6 +1,6 @@ ###################################################################### # YukiWikiDB_GZIP.pm - This is PyukiWiki, yet another Wiki clone. -# $Id: YukiWikiDB_GZIP.pm,v 1.153 2012/01/30 12:20:30 papu Exp $ +# $Id: YukiWikiDB_GZIP.pm,v 1.154 2012/01/30 14:50:57 papu Exp $ # # "Nana::YukiWikiDB_GZIP" version 0.6 $$ # Author: Nanami @@ -56,9 +56,9 @@ my ($self, $key, $value) = @_; my ($mode, $filename) = &make_filename($self, $key); my ($mode, $filename_gz) = &make_filename_gz($self, $key); - my $compressdata=Nana::GZIP::gzipcompress($value); Nana::File::lock_delete($filename); - return Nana::File::lock_store($filename_gz, $compressdata); + return Nana::File::lock_store($filename_gz, + Nana::GZIP::gzipcompress($value)); } # Fetch # comment