PyukiWiki CVS Commit
pyuki****@lists*****
2012年 3月 13日 (火) 19:46:34 JST
Index: PyukiWiki-Devel/lib/trackback.inc.pl diff -u PyukiWiki-Devel/lib/trackback.inc.pl:1.5 PyukiWiki-Devel/lib/trackback.inc.pl:1.6 --- PyukiWiki-Devel/lib/trackback.inc.pl:1.5 Tue Mar 13 19:12:56 2012 +++ PyukiWiki-Devel/lib/trackback.inc.pl Tue Mar 13 19:46:34 2012 @@ -1,6 +1,6 @@ ###################################################################### # trackback.inc.pl - This is PyukiWiki, yet another Wiki clone. -# $Id: trackback.inc.pl,v 1.5 2012/03/13 10:12:56 papu Exp $ +# $Id: trackback.inc.pl,v 1.6 2012/03/13 10:46:34 papu Exp $ # # "PyukiWiki" version 0.2.0-p3-dev1 $$ # Author: Nanami http://nanakochi.daiba.cx/ @@ -65,11 +65,7 @@ $flg=0; } - if($::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) { - return('init'=>0); - } + return('init'=>0) if(&chkpage($::form{mypage}) eq 1); if($flg eq 1 && $::navi{"trackback_url"} eq '') { &dbopen($trackback::directory,\%::trackbackbase); @@ -116,6 +112,21 @@ return ""; } +sub chkpage { + my ($page)=@_; + if($page=~/$::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($page) eq 0) { + return 1; + } + my $flg=0; + foreach(@logs::allowcmd) { + $flg=1 if($_ eq $::form{cmd}); + } + return 0 if($flg eq 1); + return 1; +} + 1; __DATA__ sub plugin_trackback_setup {