PyukiWiki CVS Commit
pyuki****@lists*****
2012年 4月 26日 (木) 21:50:22 JST
Index: PyukiWiki-Devel/plugin/location.inc.pl diff -u PyukiWiki-Devel/plugin/location.inc.pl:1.448 PyukiWiki-Devel/plugin/location.inc.pl:1.449 --- PyukiWiki-Devel/plugin/location.inc.pl:1.448 Thu Apr 12 06:31:02 2012 +++ PyukiWiki-Devel/plugin/location.inc.pl Thu Apr 26 21:50:22 2012 @@ -1,6 +1,6 @@ ###################################################################### # location.inc.pl - This is PyukiWiki, yet another Wiki clone. -# $Id: location.inc.pl,v 1.448 2012/04/11 21:31:02 papu Exp $ +# $Id: location.inc.pl,v 1.449 2012/04/26 12:50:22 papu Exp $ # # "PyukiWiki" ver 0.2.1-alpha1-dev2 $$ # Author: Nanami http://nanakochi.daiba.cx/ @@ -16,6 +16,7 @@ # modify it under the same terms as Perl itself. # Return:LF Code=EUC-JP 1TAB=4Spaces ###################################################################### +# v0.2.1 2012/04/25 0のとき、Locationヘッダで移動するようにした。 # v0.1.9 2011/02/23 新規作成 # # *Usage @@ -38,6 +39,14 @@ my $tmp=&make_cookedurl($url); $url="$::basehref$tmp"; } + if($::location::move_time eq 0) { + print &http_header( + "Status: 302", + "Location: $url", + $::HTTP_HEADER + ); + exit; + } $::IN_HEAD.=<<EOM; <meta http-equiv="Refresh" content="$::location::move_time;url=$url" /> EOM Index: PyukiWiki-Devel/plugin/metarobots.inc.pl diff -u PyukiWiki-Devel/plugin/metarobots.inc.pl:1.423 PyukiWiki-Devel/plugin/metarobots.inc.pl:1.424 --- PyukiWiki-Devel/plugin/metarobots.inc.pl:1.423 Thu Apr 12 06:31:02 2012 +++ PyukiWiki-Devel/plugin/metarobots.inc.pl Thu Apr 26 21:50:22 2012 @@ -1,6 +1,6 @@ ###################################################################### # metarobots.inc.pl - This is PyukiWiki, yet another Wiki clone. -# $Id: metarobots.inc.pl,v 1.423 2012/04/11 21:31:02 papu Exp $ +# $Id: metarobots.inc.pl,v 1.424 2012/04/26 12:50:22 papu Exp $ # # "PyukiWiki" ver 0.2.1-alpha1-dev2 $$ # Author: Nanami http://nanakochi.daiba.cx/ @@ -32,32 +32,41 @@ my $keyword; my $noarchiveflg=0; my $disableflg=0; - foreach my $word (split(/,/,"$::meta_keyword,@{[&htmlspecialchars($arg)]}")) { - if($word eq "noarchive") { - $noarchiveflg=1; - next; - } - if($word eq "disable" || $word eq "noindex") { - $disableflg=1; - next; - } - my $flg=0; - if($arg ne "") { - foreach my $tmp (@meta_keyword) { - if($tmp eq $word) { - $flg=1; - last; + + if($cmd=~/edit|admin|diff|attach|backup/ + || $::form{mypage} eq '' && $cmd!~/list|sitemap|recent/ + || $::form{mypage}=~/$::resource{help}|$::resource{rulepage}|$::RecentChanges|$::MenuBar|$::SideBar|$::TitleHeader|$::Header|$::Footer|$::BodyHeader|$::BodyFooter|$::SkinFooter|$::SandBox|$::InterWikiName|$::InterWikiSandBox|$::non_list/ + || $::meta_keyword eq "" || lc $::meta_keyword eq "disable" + || &is_readable($::form{mypage}) eq 0) { + $disableflg=1; + } + if(!$disableflg) { + foreach my $word (split(/,/,"$::meta_keyword,@{[&htmlspecialchars($arg)]}")) { + if($word eq "noarchive") { + $noarchiveflg=1; + next; + } + if($word eq "disable" || $word eq "noindex") { + $disableflg=1; + next; + } + my $flg=0; + if($arg ne "") { + foreach my $tmp (@meta_keyword) { + if($tmp eq $word) { + $flg=1; + last; + } } + push(@meta_keyword, $word) + if($flg eq 0); } - push(@meta_keyword, $word) - if($flg eq 0); } + foreach(@meta_keyword) { + $keyword.="$_,"; + } + $keyword=~s/\,$//g; } - foreach(@meta_keyword) { - $keyword.="$_,"; - } - $keyword=~s/\,$//g; - if($disableflg eq 1) { $::IN_META_ROBOTS=<<EOM; <meta name="robots" content="NOINDEX,NOFOLLOW,NOARCHIVE" />