凍結されたページへのattach.inc.phpによるファイルの添付は不可でいいけど、paint.inc.phpでの画像ファイルの添付は可能であってほしい。
paint.inc.phpで画像を添付するページは、改竄を防ぐためにも凍結しておきたいが、凍結するとpaint.inc.phpで画像ファイルが添付できない。
diff -u -r1.23 attach.inc.php --- plugin/attach.inc.php 7 Mar 2003 07:07:13 -0000 1.23 +++ plugin/attach.inc.php 30 Apr 2003 09:00:54 -0000 @@ -181,7 +181,7 @@ } //-------- 実体 //ファイルアップロード -function attach_upload() +function attach_upload($force = FALSE) { global $vars,$adminpass,$HTTP_POST_FILES; global $_attach_messages; @@ -190,7 +190,7 @@ { return array('msg'=>$_attach_messages['err_exceed']); } - if (is_freeze($vars['refer']) || !is_editable($vars['refer'])) + if (!$force and !is_editable($vars['refer'])) { return array('msg'=>$_attach_messages['err_noparm']); }
diff -u -r1.6 paint.inc.php --- plugin/paint.inc.php 13 Apr 2003 06:28:52 -0000 1.6 +++ plugin/paint.inc.php 30 Apr 2003 09:00:54 -0000 @@ -94,7 +94,12 @@ $HTTP_POST_FILES['attach_file']['name'] = $attachname; - $retval = do_plugin_action('attach'); + if (!exist_plugin('attach') or !function_exists('attach_upload')) + { + return array('msg'=>'attach.inc.php not found or not correct version.'); + } + + $retval = attach_upload(TRUE); $retval = paint_insert_ref($HTTP_POST_FILES['attach_file']['name']); } else