You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@whimsical.apache.org by Sam Ruby <ru...@apache.org> on 2015/12/04 20:20:19 UTC

[whimsy.git] [41/50] Commit da03ad5: Remove prior iteration

Commit da03ad52ae9e5541c56565690b82fb52e3e54cfe:
    Remove prior iteration
    git-svn-id: https://svn.apache.org/repos/infra/infrastructure/trunk/projects/whimsy@820574 90ea9780-b833-de11-8433-001ec94261de


Branch: refs/heads/master
Author: Sam Ruby <ru...@apache.org>
Committer: Sam Ruby <ru...@apache.org>
Pusher: rubys <ru...@apache.org>

------------------------------------------------------------
www/infra/mlreq.cgi                                          |  ------------
www/secretary/workbench/file.cgi                             | +++++ ---
------------------------------------------------------------
98 changes: 5 additions, 93 deletions.
------------------------------------------------------------


diff --git a/www/infra/mlreq.cgi b/www/infra/mlreq.cgi
deleted file mode 100755
index d2fb7c4..0000000
--- a/www/infra/mlreq.cgi
+++ /dev/null
@@ -1,90 +0,0 @@
-#!/usr/bin/ruby1.9.1
-require 'wunderbar'
-require 'shellwords'
-
-_html do
-  _head_ do
-    _title 'ASF Mailing List Request'
-    _script src: '/jquery-min.js'
-    _style %{
-      textarea, .mod, label {display: block}
-      input[type=submit] {display: block; margin-top: 1em}
-      legend {background: #141; color: #DFD; padding: 0.4em}
-      .name2 {width: 9em}
-      .name {width: 6em}
-    }
-  end
-
-  _body? do
-    _form method: 'post' do
-      _fieldset do
-        _legend 'ASF Mailing List Request'
-
-        _h3_ 'List name'
-        _input.name2 name: 'subdomain', required: true, pattern: '^\w+(-\w+)?$'
-        _ '@'
-        _input.name name: 'localpart', required: true, pattern: '^\w+$'
-        _ '.'
-        _input.name2 name: 'domain', value: 'apache.org', readonly: true
-
-        _h3_ 'Replies'
-        _label do
-          _input type: 'checkbox', name: 'replyto', value: 'true'
-          _ 'Set Reply-To list header?'
-        end
-
-        _h3_ 'Moderation'
-        _label do
-          _input type: "radio", name: "muopts", value: "mu", required: true
-          _ 'allow subscribers to post, moderate all others'
-        end
-        _label do
-          _input type: "radio", name: "muopts", value: "Mu"
-          _ 'allow subscribers to post, reject all others'
-        end
-        _label do
-          _input type: "radio", name: "muopts", value: "mU"
-          _ 'moderate all posts'
-        end
-        
-        _h3_ 'Moderators'
-        _textarea name: 'mods'
-
-        _input type: 'submit', value: 'Submit Request'
-      end
-    end
-
-    if _.post?
-      mods = params.select {|name,value| name =~ /^mod\d+$/ and value != ['']}.
-        values.flatten.join(',')
-      mods = @mods.gsub(/\s+/,',') if @mods
-
-      vars = {
-        subdomain: @subdomain,
-        localpart: @localpart,
-        domain: @domain,
-        moderators: mods,
-        muopts: @muopts,
-        replytolist: @replyto || "false",
-        notifyee: "#{$USER}@apache.org"
-      }
-
-      _h2 'What would be submitted'
-      _pre vars.map {|name,value| "#{name}=#{Shellwords.shellescape value}"}.
-        join("\n")
-    end
-    
-    _script_ %{
-      $('textarea').replaceWith('<input type="email" required="required" class="mod" name="mod0"/>')
-      var fkeyup = function() {
-        var input = $('<input type="email" class="mod" val=""/>');
-        input.attr('name', 'mod' + $('.mod').length);
-        input.bind('keyup paste', fkeyup);
-        lastmod.after(input).unbind();
-        lastmod = input;
-      }
-      var lastmod = $('.mod:last');
-      $('.mod').bind('keyup paste', fkeyup);
-    }
-  end
-end
diff --git a/www/secretary/workbench/file.cgi b/www/secretary/workbench/file.cgi
index 0219698..f7f36bb 100755
--- a/www/secretary/workbench/file.cgi
+++ b/www/secretary/workbench/file.cgi
@@ -5,6 +5,8 @@ require './local_paths'
 require 'fileutils'
 require 'ostruct'
 require 'escape'
+require 'action_view'
+include ActionView::Helpers::DateHelper
 
 ENV['LANG'] = 'en_US.UTF-8'
 
@@ -280,7 +282,7 @@ def email(target, message)
       mail = Mail.new do
         # apply headers
         headers.scan(/(\w+):[ \t]*(.*)/).each do |name, value|
-          send name, value unless value.empty?
+          send name, value.untaint unless value.empty?
         end
 
         body message
@@ -843,7 +845,7 @@ _html do
 
               name = entry['action'] || entry['doctype']
               name = entry['dest'] if name == 'other'
-              _td name, title: title
+              _td name.downcase, title: title
             end
           end
         end
@@ -969,7 +971,7 @@ _html do
     if ajax
       _script src: 'jquery-1.7.2.min.js'
 
-      if @action = 'Update'
+      if @action == 'Update'
         _script src: 'jquery.timeago.js'
         _script "$('time').timeago()"
       end