This is an automated email from the ASF dual-hosted git repository.
rubys pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/whimsy.git
The following commit(s) were added to refs/heads/master by this push:
new 98fe817 show posted minutes too
98fe817 is described below
commit 98fe817cb57c4d6e5c3c8c9ffe35a941e029f94f
Author: Sam Ruby <[email protected]>
AuthorDate: Sun May 27 15:28:25 2018 -0400
show posted minutes too
---
lib/whimsy/asf/agenda/minutes.rb | 2 +-
www/board/agenda/routes.rb | 9 +++++++--
www/board/agenda/views/pages/report.js.rb | 5 +----
3 files changed, 9 insertions(+), 7 deletions(-)
diff --git a/lib/whimsy/asf/agenda/minutes.rb b/lib/whimsy/asf/agenda/minutes.rb
index 2020fbb..3defa68 100644
--- a/lib/whimsy/asf/agenda/minutes.rb
+++ b/lib/whimsy/asf/agenda/minutes.rb
@@ -19,7 +19,7 @@ class ASF::Board::Agenda
attrs['text'] = attrs['text'].strip
attrs['approved'] = attrs['approved'].strip.gsub(/\s+/, ' ')
- file = attrs['text'][/board_minutes[_\d]+\.txt/]
+ file = attrs['text'][/board_minutes[_\d]+\.txt/].untaint
if file and File.exist?(File.join(FOUNDATION_BOARD, file))
attrs['mtime'] = File.mtime(File.join(FOUNDATION_BOARD, file)).to_i
end
diff --git a/www/board/agenda/routes.rb b/www/board/agenda/routes.rb
index 0b8f7a2..c5828e9 100755
--- a/www/board/agenda/routes.rb
+++ b/www/board/agenda/routes.rb
@@ -294,8 +294,13 @@ end
# draft minutes
get '/text/minutes/:file' do |file|
file = "board_minutes_#{file.gsub('-','_')}.txt".untaint
- pass unless dir('board_minutes_*.txt').include? file
- path = File.join(FOUNDATION_BOARD, file)
+ if dir('board_minutes_*.txt').include? file
+ path = File.join(FOUNDATION_BOARD, file)
+ elsif not Dir[File.join(ASF::SVN['minutes'], file[/\d+/], file)].empty?
+ path = File.join(ASF::SVN['minutes'], file[/\d+/], file)
+ else
+ pass
+ end
_text do
last_modified File.mtime(path)
diff --git a/www/board/agenda/views/pages/report.js.rb
b/www/board/agenda/views/pages/report.js.rb
index e6b1269..a41ddaa 100644
--- a/www/board/agenda/views/pages/report.js.rb
+++ b/www/board/agenda/views/pages/report.js.rb
@@ -74,10 +74,7 @@ class Report < Vue
# if draft is available, fetch minutes for display
date = @@item.text[/board_minutes_(\d+_\d+_\d+)\.txt/, 1]
- if
- date and not defined? @@item.minutes and defined? XMLHttpRequest and
- Server.drafts.include? "board_minutes_#{date}.txt"
- then
+ if date and not defined? @@item.minutes and defined? XMLHttpRequest
Vue.set @@item, 'minutes', ''
retrieve "minutes/#{date}?#{@@item.mtime}", :text do |minutes|
@@item.minutes = minutes
--
To stop receiving notification emails like this one, please contact
[email protected].