Skip to content

Commit 1b0fb84

Browse files
author
byends
committed
兼容低版本
1 parent 4819a23 commit 1b0fb84

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

Console.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -100,10 +100,9 @@ public function currentFile()
100100
*/
101101
public function testMailForm()
102102
{
103-
$security = Typecho_Widget::widget('Widget_Security');
104-
105103
/** 构建表单 */
106-
$form = new Typecho_Widget_Helper_Form($security->getIndex('/action/' . CommentToMail_Plugin::$action),
104+
$options = Typecho_Widget::widget('Widget_Options');
105+
$form = new Typecho_Widget_Helper_Form(Typecho_Common::url('/action/' . CommentToMail_Plugin::$action, $options->index),
107106
Typecho_Widget_Helper_Form::POST_METHOD);
108107

109108
/** 收件人名称 */

page/console.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
?>
3535
<div class="typecho-edit-theme">
3636
<div class="col-mb-12 col-tb-8 col-9 content">
37-
<form method="post" name="theme" id="theme" action="<?php $security->index('/action/' . CommentToMail_Plugin::$action); ?>">
37+
<form method="post" name="theme" id="theme" action="<?php $options->index('/action/' . CommentToMail_Plugin::$action); ?>">
3838
<label for="content" class="sr-only"><?php _e('编辑源码'); ?></label>
3939
<textarea name="content" id="content" class="w-100 mono" <?php if(!$files->currentIsWriteable()): ?>readonly<?php endif; ?>><?php echo $files->currentContent(); ?></textarea>
4040
<p class="submit">

0 commit comments

Comments
 (0)