• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

Commit MetaInfo

Revision8e51d1f11315c953388d8c27e58ead9c167b5c42 (tree)
Time2017-09-03 11:51:11
Authorumorigu <umorigu@gmai...>
Commiterumorigu

Log Message

BugTrack/2260 Use get_script_uri() instead of $script

Change Summary

Incremental Difference

--- a/lib/auth.php
+++ b/lib/auth.php
@@ -157,7 +157,7 @@ function pkwk_ldap_escape_dn($value) {
157157 // Check edit-permission
158158 function check_editable($page, $auth_enabled = TRUE, $exit_on_fail = TRUE)
159159 {
160- global $script, $_title_cannotedit, $_msg_unfreeze;
160+ global $_title_cannotedit, $_msg_unfreeze;
161161
162162 if (edit_auth($page, $auth_enabled, $exit_on_fail) && is_editable($page)) {
163163 // Editable
@@ -171,7 +171,7 @@ function check_editable($page, $auth_enabled = TRUE, $exit_on_fail = TRUE)
171171 $body = $title = str_replace('$1',
172172 htmlsc(strip_bracket($page)), $_title_cannotedit);
173173 if (is_freeze($page))
174- $body .= '(<a href="' . $script . '?cmd=unfreeze&amp;page=' .
174+ $body .= '(<a href="' . get_script_uri() . '?cmd=unfreeze&amp;page=' .
175175 rawurlencode($page) . '">' . $_msg_unfreeze . '</a>)';
176176 $page = str_replace('$1', make_search($page), $_title_cannotedit);
177177 catbody($title, $page, $body);
--- a/lib/func.php
+++ b/lib/func.php
@@ -301,7 +301,7 @@ function get_search_words($words = array(), $do_escape = FALSE)
301301 // 'Search' main function
302302 function do_search($word, $type = 'AND', $non_format = FALSE, $base = '')
303303 {
304- global $script, $whatsnew, $non_list, $search_non_list;
304+ global $whatsnew, $non_list, $search_non_list;
305305 global $_msg_andresult, $_msg_orresult, $_msg_notfoundresult;
306306 global $search_auth, $show_passage;
307307
@@ -366,7 +366,7 @@ function do_search($word, $type = 'AND', $non_format = FALSE, $base = '')
366366 $r_page = rawurlencode($page);
367367 $s_page = htmlsc($page);
368368 $passage = $show_passage ? ' ' . get_passage(get_filetime($page)) : '';
369- $retval .= ' <li><a href="' . $script . '?cmd=read&amp;page=' .
369+ $retval .= ' <li><a href="' . get_script_uri() . '?cmd=read&amp;page=' .
370370 $r_page . '&amp;word=' . $r_word . '">' . $s_page .
371371 '</a>' . $passage . '</li>' . "\n";
372372 }
@@ -433,10 +433,12 @@ function strip_bracket($str)
433433 // Create list of pages
434434 function page_list($pages, $cmd = 'read', $withfilename = FALSE)
435435 {
436- global $script, $list_index;
436+ global $list_index;
437437 global $_msg_symbol, $_msg_other;
438438 global $pagereading_enable;
439439
440+ $script = get_script_uri();
441+
440442 // ソートキーを決定する。 ' ' < '[a-zA-Z]' < 'zz'という前提。
441443 $symbol = ' ';
442444 $other = 'zz';
--- a/lib/html.php
+++ b/lib/html.php
@@ -11,7 +11,7 @@
1111 // Show page-content
1212 function catbody($title, $page, $body)
1313 {
14- global $script, $vars, $arg, $defaultpage, $whatsnew, $help_page, $hr;
14+ global $vars, $arg, $defaultpage, $whatsnew, $help_page, $hr;
1515 global $attach_link, $related_link, $cantedit, $function_freeze;
1616 global $search_word_color, $_msg_word, $foot_explain, $note_hr, $head_tags;
1717 global $javascript, $nofollow;
@@ -24,6 +24,7 @@ function catbody($title, $page, $body)
2424 global $modifier; // Site administrator's web page
2525 global $modifierlink; // Site administrator's name
2626
27+ $script = get_script_uri();
2728 $enable_login = false;
2829 $enable_logout = false;
2930 if (AUTH_TYPE_FORM === $auth_type || AUTH_TYPE_EXTERNAL === $auth_type ||
@@ -232,13 +233,14 @@ EOS;
232233 // Show 'edit' form
233234 function edit_form($page, $postdata, $digest = FALSE, $b_template = TRUE)
234235 {
235- global $script, $vars, $rows, $cols, $hr, $function_freeze;
236+ global $vars, $rows, $cols, $hr, $function_freeze;
236237 global $_btn_preview, $_btn_repreview, $_btn_update, $_btn_cancel, $_msg_help;
237238 global $whatsnew, $_btn_template, $_btn_load, $load_template_func;
238239 global $notimeupdate;
239240 global $_title_list, $_label_template_pages;
240241 global $rule_page;
241242
243+ $script = get_script_uri();
242244 // Newly generate $digest or not
243245 if ($digest === FALSE) $digest = md5(join('', get_source($page)));
244246
@@ -379,8 +381,9 @@ EOD;
379381 // Related pages
380382 function make_related($page, $tag = '')
381383 {
382- global $script, $vars, $rule_related_str, $related_str;
384+ global $vars, $rule_related_str, $related_str;
383385
386+ $script = get_script_uri();
384387 prepare_links_related($page);
385388 $links = links_get_related($page);
386389
@@ -466,12 +469,9 @@ function strip_autolink($str)
466469 // Make a backlink. searching-link of the page name, by the page name, for the page name
467470 function make_search($page)
468471 {
469- global $script;
470-
471472 $s_page = htmlsc($page);
472473 $r_page = rawurlencode($page);
473-
474- return '<a href="' . $script . '?plugin=related&amp;page=' . $r_page .
474+ return '<a href="' . get_script_uri() . '?plugin=related&amp;page=' . $r_page .
475475 '">' . $s_page . '</a> ';
476476 }
477477
--- a/lib/make_link.php
+++ b/lib/make_link.php
@@ -541,8 +541,6 @@ EOD;
541541
542542 function set($arr, $page)
543543 {
544- global $script;
545-
546544 list(, $alias, , $name, $this->param) = $this->splice($arr);
547545
548546 $matches = array();
@@ -551,7 +549,7 @@ EOD;
551549
552550 $url = get_interwiki_url($name, $this->param);
553551 $this->url = ($url === FALSE) ?
554- $script . '?' . pagename_urlencode('[[' . $name . ':' . $this->param . ']]') :
552+ get_script_uri() . '?' . pagename_urlencode('[[' . $name . ':' . $this->param . ']]') :
555553 htmlsc($url);
556554
557555 return parent::setParam(
@@ -754,8 +752,9 @@ class Link_autolink_a extends Link_autolink
754752 // Make hyperlink for the page
755753 function make_pagelink($page, $alias = '', $anchor = '', $refer = '', $isautolink = FALSE)
756754 {
757- global $script, $vars, $link_compact, $related, $_symbol_noexists;
755+ global $vars, $link_compact, $related, $_symbol_noexists;
758756
757+ $script = get_script_uri();
759758 $s_page = htmlsc(strip_bracket($page));
760759 $s_alias = ($alias == '') ? $s_page : $alias;
761760
--- a/plugin/amazon.inc.php
+++ b/plugin/amazon.inc.php
@@ -112,8 +112,9 @@ EOD;
112112
113113 function plugin_amazon_convert()
114114 {
115- global $script, $vars, $asin, $asin_all;
115+ global $vars, $asin, $asin_all;
116116
117+ $script = get_script_uri();
117118 if (func_num_args() > 3) {
118119 if (PKWK_READONLY) return ''; // Show nothing
119120
@@ -187,7 +188,7 @@ EOD;
187188
188189 function plugin_amazon_action()
189190 {
190- global $vars, $script, $edit_auth, $edit_auth_users;
191+ global $vars, $edit_auth, $edit_auth_users;
191192 global $amazon_body, $asin, $asin_all;
192193
193194 if (PKWK_READONLY) die_message('PKWK_READONLY prohibits editing');
--- a/plugin/article.inc.php
+++ b/plugin/article.inc.php
@@ -1,7 +1,8 @@
11 <?php
2-// $Id: article.inc.php,v 1.28 2011/01/25 15:01:01 henoheno Exp $
3-// Copyright (C)
4-// 2002-2005 PukiWiki Developers Team
2+// PukiWiki - Yet another WikiWikiWeb clone
3+// article.inc.php
4+// Copyright
5+// 2002-2017 PukiWiki Development Team
56 // 2002 Originally written by OKAWARA,Satoshi <kawara@dml.co.jp>
67 // http://www.dml.co.jp/~kawara/pukiwiki/pukiwiki.php
78 //
@@ -45,11 +46,12 @@ $_plugin_article_mailto = array (
4546
4647 function plugin_article_action()
4748 {
48- global $script, $post, $vars, $cols, $rows, $now;
49+ global $post, $vars, $cols, $rows, $now;
4950 global $_title_collided, $_msg_collided, $_title_updated;
5051 global $_plugin_article_mailto, $_no_subject, $_no_name;
5152 global $_msg_article_mail_sender, $_msg_article_mail_page;
5253
54+ $script = get_script_uri();
5355 if (PKWK_READONLY) die_message('PKWK_READONLY prohibits editing');
5456
5557 if ($post['msg'] == '')
@@ -121,7 +123,7 @@ EOD;
121123 $mailbody .= "\n\n" . '---' . "\n";
122124 $mailbody .= $_msg_article_mail_sender . $post['name'] . ' (' . $now . ')' . "\n";
123125 $mailbody .= $_msg_article_mail_page . $post['refer'] . "\n";
124- $mailbody .= ' URL: ' . $script . '?' . pagename_urlencode($post['refer']) . "\n";
126+ $mailbody .= ' URL: ' . get_script_uri(PKWK_URI_ABSOLUTE) . '?' . pagename_urlencode($post['refer']) . "\n";
125127 $mailbody = mb_convert_encoding($mailbody, 'JIS');
126128
127129 $mailaddheader = 'From: ' . PLUGIN_ARTICLE_MAIL_FROM;
@@ -142,10 +144,11 @@ EOD;
142144
143145 function plugin_article_convert()
144146 {
145- global $script, $vars, $digest;
147+ global $vars, $digest;
146148 global $_btn_article, $_btn_name, $_btn_subject;
147149 static $numbers = array();
148150
151+ $script = get_script_uri();
149152 if (PKWK_READONLY) return ''; // Show nothing
150153
151154 if (! isset($numbers[$vars['page']])) $numbers[$vars['page']] = 0;
@@ -177,4 +180,3 @@ EOD;
177180
178181 return $string;
179182 }
180-
--- a/plugin/attach.inc.php
+++ b/plugin/attach.inc.php
@@ -380,8 +380,9 @@ function attach_mime_content_type($filename, $displayname)
380380 // アップロードフォームの出力
381381 function attach_form($page)
382382 {
383- global $script, $vars, $_attach_messages;
383+ global $vars, $_attach_messages;
384384
385+ $script = get_script_uri();
385386 $r_page = rawurlencode($page);
386387 $s_page = htmlsc($page);
387388 $navi = <<<EOD
@@ -496,8 +497,9 @@ class AttachFile
496497
497498 function toString($showicon, $showinfo)
498499 {
499- global $script, $_attach_messages;
500+ global $_attach_messages;
500501
502+ $script = get_script_uri();
501503 $this->getstatus();
502504 $param = '&amp;file=' . rawurlencode($this->file) . '&amp;refer=' . rawurlencode($this->page) .
503505 ($this->age ? '&amp;age=' . $this->age : '');
@@ -519,8 +521,9 @@ class AttachFile
519521 // 情報表示
520522 function info($err)
521523 {
522- global $script, $_attach_messages;
524+ global $_attach_messages;
523525
526+ $script = get_script_uri();
524527 $r_page = rawurlencode($this->page);
525528 $s_page = htmlsc($this->page);
526529 $s_file = htmlsc($this->file);
--- a/plugin/calendar.inc.php
+++ b/plugin/calendar.inc.php
@@ -1,7 +1,8 @@
11 <?php
2-// $Id: calendar.inc.php,v 1.22 2011/01/25 15:01:01 henoheno Exp $
3-// Copyright (C)
4-// 2002-2003,2005 PukiWiki Developers Team
2+// PukiWiki - Yet another WikiWikiWeb clone
3+// calendar.inc.php
4+// Copyright
5+// 2002-2017 PukiWiki Development Team
56 // 2001-2002 Originally written by yu-ji
67 // License: GPL v2 or (at your option) any later version
78 //
@@ -9,8 +10,9 @@
910
1011 function plugin_calendar_convert()
1112 {
12- global $script, $weeklabels, $vars, $command;
13+ global $weeklabels, $vars, $command;
1314
15+ $script = get_script_uri();
1416 $args = func_get_args();
1517 $date_str = get_date('Ym');
1618 $page = '';
@@ -68,7 +70,7 @@ function plugin_calendar_convert()
6870
6971 $m_name = $year . '.' . $m_num . ' (' . $cmd . ')';
7072
71- $prefix_url = rawurlencode(is_pagename($pre) ? $pre : '[[' . $pre . ']]');
73+ $prefix_url = pagename_urlencode($pre);
7274 $pre = strip_bracket($pre);
7375
7476 $ret = <<<EOD
@@ -149,4 +151,3 @@ EOD;
149151
150152 return $ret;
151153 }
152-?>
--- a/plugin/calendar2.inc.php
+++ b/plugin/calendar2.inc.php
@@ -1,5 +1,9 @@
11 <?php
2-// $Id: calendar2.inc.php,v 1.24 2011/01/25 15:01:01 henoheno Exp $
2+// PukiWiki - Yet another WikiWikiWeb clone
3+// calendar2.inc.php
4+// Copyright
5+// 2002-2017 PukiWiki Development Team
6+// License: GPL v2 or (at your option) any later version
37 //
48 // Calendar2 plugin
59 //
@@ -9,9 +13,10 @@
913
1014 function plugin_calendar2_convert()
1115 {
12- global $script, $vars, $post, $get, $weeklabels, $WikiName, $BracketName;
16+ global $vars, $post, $get, $weeklabels, $WikiName, $BracketName;
1317 global $_calendar2_plugin_edit, $_calendar2_plugin_empty;
1418
19+ $script = get_script_uri();
1520 $date_str = get_date('Ym');
1621 $base = strip_bracket($vars['page']);
1722
@@ -197,4 +202,3 @@ function plugin_calendar2_action()
197202
198203 return $ret;
199204 }
200-
--- a/plugin/comment.inc.php
+++ b/plugin/comment.inc.php
@@ -20,7 +20,7 @@ define('PLUGIN_COMMENT_FORMAT_STRING', "\x08MSG\x08 -- \x08NAME\x08 \x08NOW\x08"
2020
2121 function plugin_comment_action()
2222 {
23- global $script, $vars, $now, $_title_updated, $_no_name;
23+ global $vars, $now, $_title_updated, $_no_name;
2424 global $_msg_comment_collided, $_title_comment_collided;
2525 global $_comment_plugin_fail_msg;
2626
--- a/plugin/diff.inc.php
+++ b/plugin/diff.inc.php
@@ -1,8 +1,8 @@
11 <?php
22 // PukiWiki - Yet another WikiWikiWeb clone.
3-// $Id: diff.inc.php,v 1.20 2011/01/25 15:01:01 henoheno Exp $
4-// Copyright (C)
5-// 2002-2005 PukiWiki Developers Team
3+// diff.inc.php
4+// Copyright
5+// 2002-2017 PukiWiki Development Team
66 // 2002 Originally written by yu-ji
77 // License: GPL v2 or (at your option) any later version
88 //
@@ -25,10 +25,11 @@ function plugin_diff_action()
2525
2626 function plugin_diff_view($page)
2727 {
28- global $script, $hr;
28+ global $hr;
2929 global $_msg_notfound, $_msg_goto, $_msg_deleted, $_msg_addline, $_msg_delline, $_title_diff;
3030 global $_title_diff_delete;
3131
32+ $script = get_script_uri();
3233 $r_page = pagename_urlencode($page);
3334 $s_page = htmlsc($page);
3435
@@ -72,10 +73,11 @@ EOD;
7273
7374 function plugin_diff_delete($page)
7475 {
75- global $script, $vars;
76+ global $vars;
7677 global $_title_diff_delete, $_msg_diff_deleted;
7778 global $_msg_diff_adminpass, $_btn_delete, $_msg_invalidpass;
7879
80+ $script = get_script_uri();
7981 $filename = DIFF_DIR . encode($page) . '.txt';
8082 $body = '';
8183 if (! is_pagename($page)) $body = 'Invalid page name';
@@ -110,4 +112,3 @@ EOD;
110112
111113 return array('msg'=>$_title_diff_delete, 'body'=>$body);
112114 }
113-
--- a/plugin/dump.inc.php
+++ b/plugin/dump.inc.php
@@ -216,8 +216,9 @@ function download_tarfile($tempnam, $arc_kind)
216216 // 入力フォームを表示
217217 function plugin_dump_disp_form()
218218 {
219- global $script, $defaultpage;
219+ global $defaultpage;
220220
221+ $script = get_script_uri();
221222 $act_down = PLUGIN_DUMP_DUMP;
222223 $act_up = PLUGIN_DUMP_RESTORE;
223224 $maxsize = PLUGIN_DUMP_MAX_FILESIZE;
--- a/plugin/freeze.inc.php
+++ b/plugin/freeze.inc.php
@@ -1,7 +1,7 @@
11 <?php
22 // PukiWiki - Yet another WikiWikiWeb clone.
3-// $Id: freeze.inc.php,v 1.12 2011/01/25 15:01:01 henoheno Exp $
4-// Copyright: 2003-2004, 2007 PukiWiki Developers Team
3+// freeze.inc.php
4+// Copyright 2003-2017 PukiWiki Development Team
55 // License: GPL v2 or (at your option) any later version
66 //
77 // Freeze(Lock) plugin
@@ -11,10 +11,11 @@ function plugin_freeze_convert() { return ''; }
1111
1212 function plugin_freeze_action()
1313 {
14- global $script, $vars, $function_freeze;
14+ global $vars, $function_freeze;
1515 global $_title_isfreezed, $_title_freezed, $_title_freeze;
1616 global $_msg_invalidpass, $_msg_freezing, $_btn_freeze;
1717
18+ $script = get_script_uri();
1819 $page = isset($vars['page']) ? $vars['page'] : '';
1920 if (! $function_freeze || ! is_page($page))
2021 return array('msg' => '', 'body' => '');
@@ -59,4 +60,3 @@ EOD;
5960
6061 return array('msg'=>$msg, 'body'=>$body);
6162 }
62-?>
--- a/plugin/include.inc.php
+++ b/plugin/include.inc.php
@@ -1,6 +1,8 @@
11 <?php
22 // PukiWiki - Yet another WikiWikiWeb clone.
3-// $Id: include.inc.php,v 1.23 2011/01/25 15:01:01 henoheno Exp $
3+// include.inc.php
4+// Copyright 2002-2017 PukiWiki Development Team
5+// License: GPL v2 or (at your option) any later version
46 //
57 // Include-once plugin
68
@@ -52,10 +54,11 @@ define('PLUGIN_INCLUDE_USAGE', '#include(): Usage: (a-page-name-you-want-to-incl
5254
5355 function plugin_include_convert()
5456 {
55- global $script, $vars, $get, $post, $menubar, $_msg_include_restrict;
57+ global $vars, $get, $post, $menubar, $_msg_include_restrict;
5658 static $included = array();
5759 static $count = 1;
5860
61+ $script = get_script_uri();
5962 if (func_num_args() == 0) return PLUGIN_INCLUDE_USAGE . '<br />' . "\n";;
6063
6164 // $menubar will already be shown via menu plugin
--- a/plugin/includesubmenu.inc.php
+++ b/plugin/includesubmenu.inc.php
@@ -1,14 +1,16 @@
11 <?php
2-// $Id: includesubmenu.inc.php,v 1.7 2011/01/25 15:01:01 henoheno Exp $
3-// Copyright (C) 2002-2004, 2007 PukiWiki Developers Team
2+// PukiWiki - Yet another WikiWikiWeb clone.
3+// includesubmenu.inc
4+// Copyright 2002-2017 PukiWiki Development Team
45 // License: GPL v2 or (at your option) any later version
56 //
67 // Including submenu
78
89 function plugin_includesubmenu_convert()
910 {
10- global $script,$vars;
11+ global $vars;
1112
13+ $script = get_script_uri();
1214 $ShowPageName = FALSE;
1315
1416 if (func_num_args()) {
@@ -58,4 +60,3 @@ function plugin_includesubmenu_convert()
5860 }
5961 return $body;
6062 }
61-?>
--- a/plugin/insert.inc.php
+++ b/plugin/insert.inc.php
@@ -1,5 +1,8 @@
11 <?php
2-// $Id: insert.inc.php,v 1.16 2011/01/25 15:01:01 henoheno Exp $
2+// PukiWiki - Yet another WikiWikiWeb clone.
3+// insert.inc.php
4+// Copyright 2002-2017 PukiWiki Development Team
5+// License: GPL v2 or (at your option) any later version
36 //
47 // Text inserting box plugin
58
@@ -9,9 +12,10 @@ define('INSERT_INS', 1); // Order of insertion (1:before the textarea, 0:after
912
1013 function plugin_insert_action()
1114 {
12- global $script, $vars, $cols, $rows;
15+ global $vars, $cols, $rows;
1316 global $_title_collided, $_msg_collided, $_title_updated;
1417
18+ $script = get_script_uri();
1519 if (PKWK_READONLY) die_message('PKWK_READONLY prohibits editing');
1620 if (! isset($vars['msg']) || $vars['msg'] == '') return;
1721
@@ -68,10 +72,11 @@ EOD;
6872
6973 function plugin_insert_convert()
7074 {
71- global $script, $vars, $digest;
75+ global $vars, $digest;
7276 global $_btn_insert;
7377 static $numbers = array();
7478
79+ $script = get_script_uri();
7580 if (PKWK_READONLY) return ''; // Show nothing
7681
7782 if (! isset($numbers[$vars['page']])) $numbers[$vars['page']] = 0;
@@ -97,4 +102,3 @@ EOD;
97102
98103 return $string;
99104 }
100-?>
--- a/plugin/links.inc.php
+++ b/plugin/links.inc.php
@@ -1,8 +1,7 @@
11 <?php
22 // PukiWiki - Yet another WikiWikiWeb clone
33 // links.inc.php
4-// Copyright
5-// 2003-2005, 2007 PukiWiki Development Team
4+// Copyright 2003-2017 PukiWiki Development Team
65 // License: GPL v2 or (at your option) any later version
76 //
87 // Update link cache plugin
@@ -35,9 +34,10 @@ function plugin_links_init()
3534
3635 function plugin_links_action()
3736 {
38- global $script, $post, $vars, $foot_explain;
37+ global $post, $vars, $foot_explain;
3938 global $_links_messages;
4039
40+ $script = get_script_uri();
4141 if (PKWK_READONLY) die_message('PKWK_READONLY prohibits this');
4242
4343 $msg = $body = '';
--- a/plugin/ls2.inc.php
+++ b/plugin/ls2.inc.php
@@ -51,7 +51,7 @@ function plugin_ls2_action()
5151
5252 function plugin_ls2_convert()
5353 {
54- global $script, $vars, $_ls2_msg_title;
54+ global $vars, $_ls2_msg_title;
5555
5656 $params = array(
5757 'link' => FALSE,
@@ -85,7 +85,7 @@ function plugin_ls2_convert()
8585 if (isset($params['title'])) $tmp[] = 'title=1';
8686 if (isset($params['include'])) $tmp[] = 'include=1';
8787
88- return '<p><a href="' . $script . '?' . join('&amp;', $tmp) . '">' .
88+ return '<p><a href="' . get_script_uri() . '?' . join('&amp;', $tmp) . '">' .
8989 $title . '</a></p>' . "\n";
9090 }
9191
@@ -119,7 +119,6 @@ function plugin_ls2_show_lists($prefix, & $params)
119119
120120 function plugin_ls2_get_headings($page, & $params, $level, $include = FALSE)
121121 {
122- global $script;
123122 static $_ls2_anchor = 0;
124123
125124 // ページが未表示のとき
@@ -128,7 +127,7 @@ function plugin_ls2_get_headings($page, & $params, $level, $include = FALSE)
128127
129128 $s_page = htmlsc($page);
130129 $title = $s_page . ' ' . get_pg_passage($page, FALSE);
131- $href = $script . '?' . pagename_urlencode($page);
130+ $href = get_script_uri() . '?' . pagename_urlencode($page);
132131
133132 plugin_ls2_list_push($params, $level);
134133 $ret = $include ? '<li>include ' : '<li>';
--- a/plugin/map.inc.php
+++ b/plugin/map.inc.php
@@ -1,7 +1,7 @@
11 <?php
22 // PukiWiki - Yet another WikiWikiWeb clone.
33 // map.inc.php
4-// Copyright 2002-2016 PukiWiki Development Team
4+// Copyright 2002-2017 PukiWiki Development Team
55 // License: GPL v2 or (at your option) any later version
66 //
77 // Site map plugin
@@ -110,7 +110,7 @@ class MapNode
110110 }
111111 function __construct($page, $reverse = FALSE)
112112 {
113- global $script, $non_list;
113+ global $non_list;
114114
115115 static $id = 0;
116116
@@ -124,7 +124,7 @@ class MapNode
124124
125125 $this->rels = $reverse ? $this->ref() : $this->rel();
126126 $mark = $reverse ? '' : '<sup>+</sup>';
127- $this->mark = '<a id="rel_' . $this->id . '" href="' . $script .
127+ $this->mark = '<a id="rel_' . $this->id . '" href="' . get_script_uri() .
128128 '?plugin=map&amp;refer=' . rawurlencode($this->page) . '">' .
129129 $mark . '</a>';
130130 }
--- a/plugin/memo.inc.php
+++ b/plugin/memo.inc.php
@@ -1,5 +1,8 @@
11 <?php
2-// $Id: memo.inc.php,v 1.17 2011/01/25 15:01:01 henoheno Exp $
2+// PukiWiki - Yet another WikiWikiWeb clone.
3+// memo.inc.php
4+// Copyright 2002-2017 PukiWiki Development Team
5+// License: GPL v2 or (at your option) any later version
36 //
47 // Memo box plugin
58
@@ -8,9 +11,10 @@ define('MEMO_ROWS', 5); // Rows of textarea
811
912 function plugin_memo_action()
1013 {
11- global $script, $vars, $cols, $rows;
14+ global $vars, $cols, $rows;
1215 global $_title_collided, $_msg_collided, $_title_updated;
1316
17+ $script = get_script_uri();
1418 if (PKWK_READONLY) die_message('PKWK_READONLY prohibits editing');
1519 if (! isset($vars['msg']) || $vars['msg'] == '') return;
1620
@@ -68,7 +72,7 @@ EOD;
6872
6973 function plugin_memo_convert()
7074 {
71- global $script, $vars, $digest;
75+ global $vars, $digest;
7276 global $_btn_memo_update;
7377 static $numbers = array();
7478
@@ -85,7 +89,7 @@ function plugin_memo_convert()
8589 $_script = '';
8690 $_submit = '';
8791 } else {
88- $_script = & $script;
92+ $_script = get_script_uri();
8993 $_submit = '<input type="submit" name="memo" value="' . $_btn_memo_update . '" />';
9094 }
9195
@@ -108,4 +112,3 @@ EOD;
108112
109113 return $string;
110114 }
111-?>
--- a/plugin/newpage.inc.php
+++ b/plugin/newpage.inc.php
@@ -8,9 +8,10 @@
88
99 function plugin_newpage_convert()
1010 {
11- global $script, $vars, $_btn_edit, $_msg_newpage, $BracketName;
11+ global $vars, $_btn_edit, $_msg_newpage, $BracketName;
1212 static $id = 0;
1313
14+ $script = get_script_uri();
1415 if (PKWK_READONLY) return ''; // Show nothing
1516
1617 $newpage = '';
--- a/plugin/paint.inc.php
+++ b/plugin/paint.inc.php
@@ -1,8 +1,7 @@
11 <?php
22 // PukiWiki - Yet another WikiWikiWeb clone
33 // paint.inc.php
4-// Copyright
5-// 2002-2016 PukiWiki Development Team
4+// Copyright 2002-2017 PukiWiki Development Team
65 // License: GPL v2 or (at your option) any later version
76 //
87 // Paint plugin
@@ -40,8 +39,9 @@ define('PAINT_FORMAT_NOMSG',"\x08NAME\x08 \x08NOW\x08");
4039
4140 function plugin_paint_action()
4241 {
43- global $script, $vars, $_paint_messages;
42+ global $vars, $_paint_messages;
4443
44+ $script = get_script_uri();
4545 if (PKWK_READONLY) die_message('PKWK_READONLY prohibits editing');
4646
4747 //戻り値を初期化
@@ -151,10 +151,11 @@ EOD;
151151
152152 function plugin_paint_convert()
153153 {
154- global $script,$vars,$digest;
154+ global $vars,$digest;
155155 global $_paint_messages;
156156 static $numbers = array();
157157
158+ $script = get_script_uri();
158159 if (PKWK_READONLY) return ''; // Show nothing
159160
160161 if (!array_key_exists($vars['page'],$numbers))
@@ -207,7 +208,7 @@ EOD;
207208 }
208209 function paint_insert_ref($filename)
209210 {
210- global $script,$vars,$now,$do_backup;
211+ global $vars,$now,$do_backup;
211212 global $_paint_messages,$_no_name;
212213
213214 $ret['msg'] = $_paint_messages['msg_title'];
--- a/plugin/random.inc.php
+++ b/plugin/random.inc.php
@@ -1,9 +1,10 @@
11 <?php
2-/////////////////////////////////////////////////
3-// PukiWiki - Yet another WikiWikiWeb clone.
4-//
5-// $Id: random.inc.php,v 1.9 2011/01/25 15:01:01 henoheno Exp $
2+// PukiWiki - Yet another WikiWikiWeb clone
3+// random.inc.php
4+// Copyright 2002-2017 PukiWiki Development Team
5+// License: GPL v2 or (at your option) any later version
66 //
7+// Show random page plugin
78
89 /*
910 *プラグイン random
@@ -20,8 +21,9 @@
2021
2122 function plugin_random_convert()
2223 {
23- global $script, $vars;
24+ global $vars;
2425
26+ $script = $get_script_uri();
2527 $title = '[Random Link]'; // default
2628 if (func_num_args()) {
2729 $args = func_get_args();
@@ -51,4 +53,3 @@ function plugin_random_action()
5153
5254 return array('body'=>'','msg'=>'');
5355 }
54-
--- a/plugin/ref.inc.php
+++ b/plugin/ref.inc.php
@@ -107,9 +107,10 @@ EOD;
107107
108108 function plugin_ref_body($args)
109109 {
110- global $script, $vars;
110+ global $vars;
111111 global $WikiName, $BracketName; // compat
112112
113+ $script = get_script_uri();
113114 // 戻り値
114115 $params = array(
115116 'left' => FALSE, // 左寄せ
--- a/plugin/rename.inc.php
+++ b/plugin/rename.inc.php
@@ -92,8 +92,9 @@ function plugin_rename_err($err, $page = '')
9292 //第一段階:ページ名または正規表現の入力
9393 function plugin_rename_phase1($err = '', $page = '')
9494 {
95- global $script, $_rename_messages;
95+ global $_rename_messages;
9696
97+ $script = get_script_uri();
9798 $msg = plugin_rename_err($err, $page);
9899 $refer = plugin_rename_getvar('refer');
99100 $method = plugin_rename_getvar('method');
@@ -134,8 +135,9 @@ EOD;
134135 //第二段階:新しい名前の入力
135136 function plugin_rename_phase2($err = '')
136137 {
137- global $script, $_rename_messages;
138+ global $_rename_messages;
138139
140+ $script = get_script_uri();
139141 $msg = plugin_rename_err($err);
140142 $page = plugin_rename_getvar('page');
141143 $refer = plugin_rename_getvar('refer');
@@ -213,8 +215,9 @@ function plugin_rename_regex($arr_from, $arr_to)
213215
214216 function plugin_rename_phase3($pages)
215217 {
216- global $script, $_rename_messages;
218+ global $_rename_messages;
217219
220+ $script = get_script_uri();
218221 $msg = $input = '';
219222 $files = plugin_rename_get_files($pages);
220223
--- a/plugin/search.inc.php
+++ b/plugin/search.inc.php
@@ -1,6 +1,8 @@
11 <?php
22 // PukiWiki - Yet another WikiWikiWeb clone.
3-// $Id: search.inc.php,v 1.14 2011/01/25 15:01:01 henoheno Exp $
3+// search.inc.php
4+// Copyright 2003-2017 PukiWiki Development Team
5+// License: GPL v2 or (at your option) any later version
46 //
57 // Search plugin
68
@@ -62,9 +64,10 @@ function plugin_search_action()
6264
6365 function plugin_search_search_form($s_word = '', $type = '', $bases = array())
6466 {
65- global $script, $_btn_and, $_btn_or, $_btn_search;
67+ global $_btn_and, $_btn_or, $_btn_search;
6668 global $_search_pages, $_search_all;
6769
70+ $script = get_script_uri();
6871 $and_check = $or_check = '';
6972 if ($type == 'OR') {
7073 $or_check = ' checked="checked"';
@@ -113,4 +116,3 @@ $base_option
113116 </form>
114117 EOD;
115118 }
116-?>
--- a/plugin/template.inc.php
+++ b/plugin/template.inc.php
@@ -12,12 +12,13 @@ define('MAX_LEN', 60);
1212
1313 function plugin_template_action()
1414 {
15- global $script, $vars;
15+ global $vars;
1616 global $_title_edit;
1717 global $_msg_template_start, $_msg_template_end, $_msg_template_page, $_msg_template_refer;
1818 global $_btn_template_create, $_title_template;
1919 global $_err_template_already, $_err_template_invalid, $_msg_template_force;
2020
21+ $script = get_script_uri();
2122 if (PKWK_READONLY) die_message('PKWK_READONLY prohibits editing');
2223 if (! isset($vars['refer']) || ! is_page($vars['refer']))
2324 return FALSE;
--- a/plugin/tracker.inc.php
+++ b/plugin/tracker.inc.php
@@ -17,8 +17,9 @@ define('TRACKER_LIST_SHOW_ERROR_PAGE',TRUE);
1717
1818 function plugin_tracker_convert()
1919 {
20- global $script,$vars;
20+ global $vars;
2121
22+ $script = get_script_uri();
2223 if (PKWK_READONLY) return ''; // Show nothing
2324
2425 $base = $refer = $vars['page'];
@@ -656,7 +657,7 @@ function plugin_tracker_list_convert()
656657 }
657658 function plugin_tracker_list_action()
658659 {
659- global $script,$vars,$_tracker_messages;
660+ global $vars,$_tracker_messages;
660661
661662 $page = $refer = $vars['refer'];
662663 $s_page = make_pagelink($page);
@@ -881,8 +882,7 @@ class Tracker_list
881882 }
882883 function replace_title($arr)
883884 {
884- global $script;
885-
885+ $script = get_script_uri();
886886 $field = $sort = $arr[1];
887887 if ($sort == '_name' or $sort == '_page')
888888 {
--- a/plugin/unfreeze.inc.php
+++ b/plugin/unfreeze.inc.php
@@ -1,7 +1,7 @@
11 <?php
22 // PukiWiki - Yet another WikiWikiWeb clone.
33 // $Id: unfreeze.inc.php,v 1.14 2011/01/25 15:01:01 henoheno Exp $
4-// Copyright (C) 2003-2004, 2007 PukiWiki Developers Team
4+// Copyright 2003-2017 PukiWiki Development Team
55 // License: GPL v2 or (at your option) any later version
66 //
77 // Unfreeze(Unlock) plugin
@@ -11,10 +11,11 @@ define('PLUGIN_UNFREEZE_EDIT', TRUE);
1111
1212 function plugin_unfreeze_action()
1313 {
14- global $script, $vars, $function_freeze;
14+ global $vars, $function_freeze;
1515 global $_title_isunfreezed, $_title_unfreezed, $_title_unfreeze;
1616 global $_msg_invalidpass, $_msg_unfreezing, $_btn_unfreeze;
1717
18+ $script = get_script_uri();
1819 $page = isset($vars['page']) ? $vars['page'] : '';
1920 if (! $function_freeze || ! is_page($page))
2021 return array('msg' => '', 'body' => '');
@@ -70,4 +71,3 @@ EOD;
7071
7172 return array('msg'=>$msg, 'body'=>$body);
7273 }
73-?>
--- a/plugin/update_entities.inc.php
+++ b/plugin/update_entities.inc.php
@@ -1,8 +1,7 @@
11 <?php
22 // PukiWiki - Yet another WikiWikiWeb clone
33 // update_entities.inc.php
4-// Copyright
5-// 2003-2007 PukiWiki Development Team
4+// Copyright 2017 PukiWiki Development Team
65 // License: GPL v2 or (at your option) any later version
76 //
87 // Update entities plugin - Update XHTML entities from DTD
@@ -39,9 +38,10 @@ PHPの持つテーブルおよびW3CのDTDをスキャンして、キャッシ
3938
4039 function plugin_update_entities_action()
4140 {
42- global $script, $vars;
41+ global $vars;
4342 global $_entities_messages;
4443
44+ $script = get_script_uri();
4545 if (PKWK_READONLY) die_message('PKWK_READONLY prohibits this');
4646
4747 $msg = $body = '';
--- a/plugin/vote.inc.php
+++ b/plugin/vote.inc.php
@@ -1,17 +1,18 @@
11 <?php
22 // PukiWiki - Yet another WikiWikiWeb clone.
3-// $Id: vote.inc.php,v 1.27 2011/01/25 15:01:01 henoheno Exp $
4-// Copyright (C) 2002-2005, 2007 PukiWiki Developers Team
3+// vote.inc.php
4+// Copyright 2002-2017 PukiWiki Development Team
55 // License: GPL v2 or (at your option) any later version
66 //
77 // Vote box plugin
88
99 function plugin_vote_action()
1010 {
11- global $vars, $script, $cols,$rows;
11+ global $vars, $cols,$rows;
1212 global $_title_collided, $_msg_collided, $_title_updated;
1313 global $_vote_plugin_votes;
1414
15+ $script = get_script_uri();
1516 if (PKWK_READONLY) die_message('PKWK_READONLY prohibits editing');
1617
1718 $postdata_old = get_source($vars['refer']);
@@ -76,7 +77,7 @@ EOD;
7677
7778 function plugin_vote_convert()
7879 {
79- global $script, $vars, $digest;
80+ global $vars, $digest;
8081 global $_vote_plugin_choice, $_vote_plugin_votes;
8182 static $number = array();
8283
@@ -92,7 +93,7 @@ function plugin_vote_convert()
9293 $_script = '';
9394 $_submit = 'hidden';
9495 } else {
95- $_script = $script;
96+ $_script = get_script_uri();
9697 $_submit = 'submit';
9798 }
9899
@@ -149,4 +150,3 @@ EOD;
149150
150151 return $body;
151152 }
152-?>