OSDN Git Service

BugTrack/2260 Use get_base_uri() instead of $script
[pukiwiki/pukiwiki.git] / lib / func.php
index 2e33ce8..69a6ef2 100644 (file)
@@ -301,7 +301,7 @@ function get_search_words($words = array(), $do_escape = FALSE)
 // 'Search' main function
 function do_search($word, $type = 'AND', $non_format = FALSE, $base = '')
 {
-       global $script, $whatsnew, $non_list, $search_non_list;
+       global $whatsnew, $non_list, $search_non_list;
        global $_msg_andresult, $_msg_orresult, $_msg_notfoundresult;
        global $search_auth, $show_passage;
 
@@ -366,7 +366,7 @@ function do_search($word, $type = 'AND', $non_format = FALSE, $base = '')
                $r_page  = rawurlencode($page);
                $s_page  = htmlsc($page);
                $passage = $show_passage ? ' ' . get_passage(get_filetime($page)) : '';
-               $retval .= ' <li><a href="' . $script . '?cmd=read&amp;page=' .
+               $retval .= ' <li><a href="' . get_base_uri() . '?cmd=read&amp;page=' .
                        $r_page . '&amp;word=' . $r_word . '">' . $s_page .
                        '</a>' . $passage . '</li>' . "\n";
        }
@@ -433,10 +433,12 @@ function strip_bracket($str)
 // Create list of pages
 function page_list($pages, $cmd = 'read', $withfilename = FALSE)
 {
-       global $script, $list_index;
+       global $list_index;
        global $_msg_symbol, $_msg_other;
        global $pagereading_enable;
 
+       $script = get_base_uri();
+
        // ソートキーを決定する。 ' ' < '[a-zA-Z]' < 'zz'という前提。
        $symbol = ' ';
        $other = 'zz';