James Moger
2011-12-24 f35a9879742c0837625083c3c183b3ee698f6e20
src/com/gitblit/GitBlit.java
@@ -25,6 +25,7 @@
import java.text.MessageFormat;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;
@@ -1478,6 +1479,30 @@
      }
      return scripts;
   }
   public List<String> getInheritedPreReceiveScripts(RepositoryModel repository) {
      Set<String> globals = new HashSet<String>();
      for (String script : getStrings(Keys.groovy.preReceiveScripts)) {
         if (script.endsWith(".groovy")) {
            globals.add(script.substring(0, script.lastIndexOf('.')));
         } else {
            globals.add(script);
         }
      }
      return new ArrayList<String>(globals);
   }
   public List<String> getInheritedPostReceiveScripts(RepositoryModel repository) {
      Set<String> globals = new HashSet<String>();
      for (String script : getStrings(Keys.groovy.postReceiveScripts)) {
         if (script.endsWith(".groovy")) {
            globals.add(script.substring(0, script.lastIndexOf('.')));
         } else {
            globals.add(script);
         }
      }
      return new ArrayList<String>(globals);
   }
   /**
    * Notify the administrators by email.
@@ -1505,7 +1530,7 @@
    * @param message
    * @param toAddresses
    */
   public void sendMail(String subject, String message, ArrayList<String> toAddresses) {
   public void sendMail(String subject, String message, Collection<String> toAddresses) {
      this.sendMail(subject, message, toAddresses.toArray(new String[0]));
   }