• R/O
  • HTTP
  • SSH
  • HTTPS

pukiwiki: Commit


Commit MetaInfo

Revision574cf886af1fc4d5ffeaa86f13e3fb7a0ccc5ed5 (tree)
Time2017-02-18 02:00:06
Authorumorigu <umorigu@gmai...>
Commiterumorigu

Log Message

BugTrack/2401 Stop showing bug list if a root page is not readable

Change Summary

Incremental Difference

--- a/plugin/bugtrack.inc.php
+++ b/plugin/bugtrack.inc.php
@@ -2,7 +2,7 @@
22 // PukiWiki - Yet another WikiWikiWeb clone.
33 // bugtrack.inc.php
44 // Copyright
5-// 2002-2016 PukiWiki Development Team
5+// 2002-2017 PukiWiki Development Team
66 // 2002 Y.MASUI GPL2 http://masui.net/pukiwiki/ masui@masui.net
77 //
88 // BugTrack plugin
@@ -284,7 +284,7 @@ function plugin_bugtrack_get_page_list($page, $needs_filetime) {
284284 */
285285 function plugin_bugtrack_list_convert()
286286 {
287- global $script, $vars, $_plugin_bugtrack;
287+ global $script, $vars, $_plugin_bugtrack, $_title_cannotread;
288288 $cache_format_version = 1;
289289 $cache_expire_time = 60 * 60 * 24;
290290 $cache_refresh_time_prev;
@@ -298,6 +298,10 @@ function plugin_bugtrack_list_convert()
298298 $_page = get_fullname(strip_bracket($_page), $page);
299299 if (is_pagename($_page)) $page = $_page;
300300 }
301+ if (!is_page_readable($page)) {
302+ $body = str_replace('$1', htmlsc($page), $_title_cannotread);
303+ return $body;
304+ }
301305 $data = array();
302306 $page_list = plugin_bugtrack_get_page_list($page, true);
303307 usort($page_list, '_plugin_bugtrack_list_paganame_compare');
Show on old repository browser