Revision | 3503f85f41c5a5bcecccb63b0876150fa02d2c87 (tree) |
---|---|
Time | 2003-02-14 16:28:34 |
Author | panda <panda> |
Commiter | panda |
add 'plugin_freeze_conevrt()'.
@@ -2,28 +2,33 @@ | ||
2 | 2 | ///////////////////////////////////////////////// |
3 | 3 | // PukiWiki - Yet another WikiWikiWeb clone. |
4 | 4 | // |
5 | -// $Id: freeze.inc.php,v 1.1 2003-01-27 05:38:46 panda Exp $ | |
5 | +// $Id: freeze.inc.php,v 1.2 2003-02-14 07:28:34 panda Exp $ | |
6 | 6 | // |
7 | 7 | // 凍結 |
8 | +function plugin_freeze_convert() | |
9 | +{ | |
10 | + return ''; | |
11 | +} | |
12 | + | |
8 | 13 | function plugin_freeze_action() |
9 | 14 | { |
10 | 15 | global $script,$post,$vars,$function_freeze,$adminpass; |
11 | - global $_title_isfreezed,$_title_freezed,$_title_freeze,$_msg_invalidpass,$_msg_freezing,$_btn_freeze; | |
16 | + global $_title_isfreezed,$_title_freezed,$_title_freeze; | |
17 | + global $_msg_invalidpass,$_msg_freezing,$_btn_freeze; | |
12 | 18 | |
13 | 19 | $msg = $body = ''; |
14 | 20 | |
15 | - if (!$function_freeze or !is_page($vars['page'])) | |
21 | + if (!$function_freeze or !is_page($vars['page'])) { | |
16 | 22 | return array('msg'=>$msg,'body'=>$body); |
23 | + } | |
17 | 24 | |
18 | 25 | $pass = array_key_exists('pass',$post) ? $post['pass'] : NULL; |
19 | 26 | |
20 | - if (is_freeze($vars['page'])) | |
21 | - { | |
27 | + if (is_freeze($vars['page'])) { | |
22 | 28 | $msg = $_title_isfreezed; |
23 | 29 | $body = str_replace('$1',htmlspecialchars(strip_bracket($vars['page'])),$_title_isfreezed); |
24 | 30 | } |
25 | - else if (md5($pass) == $adminpass) | |
26 | - { | |
31 | + else if (md5($pass) == $adminpass) { | |
27 | 32 | $postdata = get_source($post['page']); |
28 | 33 | array_unshift($postdata,"#freeze\n"); |
29 | 34 | $postdata = join('',$postdata); |
@@ -37,14 +42,14 @@ function plugin_freeze_action() | ||
37 | 42 | $msg = $_title_freezed; |
38 | 43 | $body = ''; |
39 | 44 | } |
40 | - else | |
41 | - { | |
45 | + else { | |
42 | 46 | $msg = $_title_freeze; |
43 | 47 | |
44 | 48 | $body = "<br />\n"; |
45 | 49 | |
46 | - if ($pass !== NULL) | |
50 | + if ($pass !== NULL) { | |
47 | 51 | $body .= "<strong>$_msg_invalidpass</strong><br />\n"; |
52 | + } | |
48 | 53 | |
49 | 54 | $body.= "$_msg_freezing<br />\n"; |
50 | 55 |