Révision | e90ad60c89f0839e08a3441610fe7fbfb79163fa (tree) |
---|---|
l'heure | 2017-09-11 21:39:47 |
Auteur | umorigu <umorigu@gmai...> |
Commiter | umorigu |
BugTrack/2239 Show page canonical URL after commenting
@@ -96,8 +96,9 @@ function plugin_comment_convert() | ||
96 | 96 | |
97 | 97 | if (PKWK_READONLY) return ''; // Show nothing |
98 | 98 | |
99 | - if (! isset($numbers[$vars['page']])) $numbers[$vars['page']] = 0; | |
100 | - $comment_no = $numbers[$vars['page']]++; | |
99 | + $page = $vars['page']; | |
100 | + if (! isset($numbers[$page])) $numbers[$page] = 0; | |
101 | + $comment_no = $numbers[$page]++; | |
101 | 102 | |
102 | 103 | $options = func_num_args() ? func_get_args() : array(); |
103 | 104 | if (in_array('noname', $options)) { |
@@ -114,8 +115,8 @@ function plugin_comment_convert() | ||
114 | 115 | $above = in_array('above', $options) ? '1' : |
115 | 116 | (in_array('below', $options) ? '0' : PLUGIN_COMMENT_DIRECTION_DEFAULT); |
116 | 117 | |
117 | - $script = get_base_uri(); | |
118 | - $s_page = htmlsc($vars['page']); | |
118 | + $script = get_page_uri($page); | |
119 | + $s_page = htmlsc($page); | |
119 | 120 | $string = <<<EOD |
120 | 121 | <br /> |
121 | 122 | <form action="$script" method="post"> |