../
plugin/article.inc.php †
PukiWiki 1.4.6 以降に同梱されている、r1.25 基準に書いてあります
- 編集を制限しているページへの投稿受付を禁止したい場合
- 55行目あたり
function plugin_article_action()
{
global $script, $post, $vars, $cols, $rows, $now;
global $_title_collided, $_msg_collided, $_title_updated;
global $_plugin_article_mailto, $_no_subject, $_no_name;
global $_msg_article_mail_sender, $_msg_article_mail_page;
if (PKWK_READONLY) die_message('PKWK_READONLY prohibits editing');
if ($post['msg'] == '')
return array('msg'=>'','body'=>'');
+ check_editable($post['refer'], true, true);
+
$name = ($post['name'] == '') ? $_no_name : $post['name'];
$name = ($name == '') ? '' : str_replace('$name', $name, PLUGIN_ARTICLE_NAME_FORMAT);
- メッセージが空の時、閲覧制限をチェックしてから本文を表示する*1
- 55行目あたり
function plugin_article_action()
{
global $script, $post, $vars, $cols, $rows, $now;
global $_title_collided, $_msg_collided, $_title_updated;
global $_plugin_article_mailto, $_no_subject, $_no_name;
global $_msg_article_mail_sender, $_msg_article_mail_page;
if (PKWK_READONLY) die_message('PKWK_READONLY prohibits editing');
- if ($post['msg'] == '')
- return array('msg'=>'','body'=>'');
+ if ($post['msg'] == '') {
+ check_readable($post['refer'], true, true);
+ return array('msg'=>'','body'=>'');
+ }
$name = ($post['name'] == '') ? $_no_name : $post['name'];
$name = ($name == '') ? '' : str_replace('$name', $name, PLUGIN_ARTICLE_NAME_FORMAT);
- 投稿の書き込み、メールの自動送信が終わった後に、そのページの閲覧が制限されているかのチェックをする
- 130行目あたり
mail($mailaddress, $mailsubject, $mailbody, $mailaddheader);
}
+ check_readable($post['refer'], true, true);
+
$title = $_title_updated;
}
$retvars['msg'] = $title;
$retvars['body'] = $body;
|