リビジョン | a9672b4d98cc6919c3ed2f65137824d3642eb0e0 (tree) |
---|---|
日時 | 2021-12-05 14:53:32 |
作者 | umorigu <umorigu@gmai...> |
コミッター | umorigu |
calendar_viewer
@@ -1,7 +1,7 @@ | ||
1 | 1 | <?php |
2 | 2 | // PukiWiki - Yet another WikiWikiWeb clone |
3 | 3 | // calendar_viewer.inc.php |
4 | -// Copyright 2002-2020 PukiWiki Development Team | |
4 | +// Copyright 2002-2021 PukiWiki Development Team | |
5 | 5 | // License: GPL v2 or (at your option) any later version |
6 | 6 | // |
7 | 7 | // Calendar viewer plugin - List pages that calendar/calnedar2 plugin created |
@@ -55,7 +55,7 @@ define('PLUGIN_CALENDAR_VIEWER_USAGE', | ||
55 | 55 | |
56 | 56 | function plugin_calendar_viewer_convert() |
57 | 57 | { |
58 | - global $vars, $get, $post, $script, $weeklabels; | |
58 | + global $vars, $get, $post, $weeklabels; | |
59 | 59 | global $_msg_calendar_viewer_right, $_msg_calendar_viewer_left; |
60 | 60 | global $_msg_calendar_viewer_restrict, $_err_calendar_viewer_param2; |
61 | 61 |
@@ -164,9 +164,6 @@ function plugin_calendar_viewer_convert() | ||
164 | 164 | } else { |
165 | 165 | $body = str_replace('$1', $page, $_msg_calendar_viewer_restrict); |
166 | 166 | } |
167 | - | |
168 | - $r_page = pagename_urlencode($page); | |
169 | - | |
170 | 167 | if (PLUGIN_CALENDAR_VIEWER_DATE_FORMAT !== FALSE) { |
171 | 168 | $time = strtotime(basename($page)); // $date_sep must be assumed '-' or ''! |
172 | 169 | if ($time === FALSE || $time === -1) { |
@@ -184,15 +181,13 @@ function plugin_calendar_viewer_convert() | ||
184 | 181 | } |
185 | 182 | |
186 | 183 | if (PKWK_READONLY) { |
187 | - $link = $script . '?' . $r_page; | |
184 | + $link = get_page_uri($page); | |
188 | 185 | } else { |
189 | - $link = $script . '?cmd=edit&page=' . $r_page; | |
186 | + $link = get_base_uri() . '?cmd=edit&page=' . pagename_urlencode($page); | |
190 | 187 | } |
191 | - $link = '<a href="' . $link . '">' . $s_page . '</a>'; | |
192 | - | |
193 | - $head = '<h1>' . $link . '</h1>' . "\n"; | |
188 | + $link_html = '<a href="' . $link . '">' . $s_page . '</a>'; | |
189 | + $head = '<h1>' . $link_html . '</h1>' . "\n"; | |
194 | 190 | $return_body .= $head . $body; |
195 | - | |
196 | 191 | ++$tmp; |
197 | 192 | } |
198 | 193 |
@@ -253,7 +248,7 @@ function plugin_calendar_viewer_convert() | ||
253 | 248 | if ($left_YM != '' || $right_YM != '') { |
254 | 249 | $s_date_sep = htmlsc($date_sep); |
255 | 250 | $left_link = $right_link = ''; |
256 | - $link = $script . '?plugin=calendar_viewer&mode=' . $mode . | |
251 | + $link = get_base_uri() . '?plugin=calendar_viewer&mode=' . $mode . | |
257 | 252 | '&file=' . rawurlencode($simple_pagename) . |
258 | 253 | '&date_sep=' . $s_date_sep . '&'; |
259 | 254 | if ($left_YM != '') |
@@ -277,7 +272,7 @@ function plugin_calendar_viewer_convert() | ||
277 | 272 | |
278 | 273 | function plugin_calendar_viewer_action() |
279 | 274 | { |
280 | - global $vars, $get, $post, $script; | |
275 | + global $vars, $get, $post; | |
281 | 276 | |
282 | 277 | $date_sep = '-'; |
283 | 278 |