• 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

Revisión20becf2679bd9ddf27d525a801d8a0a08d5b420f (tree)
Tiempo2017-09-10 10:30:13
Autorumorigu <umorigu@gmai...>
Commiterumorigu

Log Message

BugTrack/2265 Enable edit_auth for bugtrack and tracker plugin

Cambiar Resumen

Diferencia incremental

--- a/plugin/bugtrack.inc.php
+++ b/plugin/bugtrack.inc.php
@@ -202,6 +202,7 @@ function plugin_bugtrack_write($base, $pagename, $summary, $name, $priority, $st
202202 }
203203 $page = $base . '/' . sprintf(PLUGIN_BUGTRACK_NUMBER_FORMAT, $id);
204204
205+ check_editable($page, true, true);
205206 if ($pagename == '') {
206207 page_write($page, $postdata);
207208 } else {
@@ -209,6 +210,7 @@ function plugin_bugtrack_write($base, $pagename, $summary, $name, $priority, $st
209210 if (is_page($pagename) || ! is_pagename($pagename)) {
210211 $pagename = $page; // Set default
211212 } else {
213+ check_editable($pagename, true, true);
212214 page_write($page, 'move to [[' . $pagename . ']]');
213215 }
214216 page_write($pagename, $postdata);
--- a/plugin/tracker.inc.php
+++ b/plugin/tracker.inc.php
@@ -160,6 +160,7 @@ function plugin_tracker_action()
160160
161161 $fields = plugin_tracker_get_fields($page,$refer,$config);
162162
163+ check_editable($page, true, true);
163164 // Creating an empty page, before attaching files
164165 touch(get_filename($page));
165166
@@ -625,7 +626,7 @@ class Tracker_field_past extends Tracker_field
625626 // 一覧表示
626627 function plugin_tracker_list_convert()
627628 {
628- global $vars;
629+ global $vars, $_title_cannotread;
629630
630631 $config = 'default';
631632 $page = $refer = $vars['page'];
@@ -650,11 +651,15 @@ function plugin_tracker_list_convert()
650651 list($config,$list) = array_pad(explode('/',$config,2),2,$list);
651652 }
652653 }
654+ if (!is_page_readable($page)) {
655+ $body = str_replace('$1', htmlsc($page), $_title_cannotread);
656+ return $body;
657+ }
653658 return plugin_tracker_getlist($page,$refer,$config,$list,$order,$limit);
654659 }
655660 function plugin_tracker_list_action()
656661 {
657- global $vars,$_tracker_messages;
662+ global $vars, $_tracker_messages, $_title_cannotread;
658663
659664 $page = $refer = $vars['refer'];
660665 $s_page = make_pagelink($page);
@@ -662,6 +667,13 @@ function plugin_tracker_list_action()
662667 $list = array_key_exists('list',$vars) ? $vars['list'] : 'list';
663668 $order = array_key_exists('order',$vars) ? $vars['order'] : '_real:SORT_DESC';
664669
670+ if (!is_page_readable($page)) {
671+ $body = str_replace('$1', htmlsc($page), $_title_cannotread);
672+ return array(
673+ 'msg' => $body,
674+ 'body' => $body
675+ );
676+ }
665677 return array(
666678 'msg' => $_tracker_messages['msg_list'],
667679 'body'=> str_replace('$1',$s_page,$_tracker_messages['msg_back']).
@@ -879,7 +891,6 @@ class Tracker_list
879891 }
880892 function replace_title($arr)
881893 {
882- $script = get_base_uri();
883894 $field = $sort = $arr[1];
884895 if ($sort == '_name' or $sort == '_page')
885896 {
@@ -917,6 +928,7 @@ class Tracker_list
917928 $_order[] = "$key:$value";
918929 $r_order = rawurlencode(join(';',$_order));
919930
931+ $script = get_base_uri(PKWK_URI_ABSOLUTE);
920932 return "[[$title$arrow>$script?plugin=tracker_list&refer=$r_page&config=$r_config&list=$r_list&order=$r_order]]";
921933 }
922934 function toString($limit=NULL)