Only sign the URLs if they match the apiBase. This still needs more work, since you...
authorAndy Allan <gravitystorm@gmail.com>
Tue, 12 Oct 2010 11:47:07 +0000 (11:47 +0000)
committerAndy Allan <gravitystorm@gmail.com>
Tue, 12 Oct 2010 11:47:07 +0000 (11:47 +0000)
TODO.txt
net/systemeD/potlatch2/utils/Importer.as

index 763dcd4..f51da1b 100644 (file)
--- a/TODO.txt
+++ b/TODO.txt
@@ -75,7 +75,6 @@ Potlatch 2: main outstanding issues
 * Have a remove button for removing loaded traces
 * Have a check button for simplifying traces
 * Refactor the importer.as so that downloading the files can be done via the connection, not just directly
-* if(true) in importer.as#56 might actually be breaking other things. Fix it, or do the above
 
 Requested enhancements
 ----------------------
index 80b654c..1f1d75d 100644 (file)
@@ -34,10 +34,11 @@ package net.systemeD.potlatch2.utils {
 
                        var sp:uint=0;
                        for each (var fn:String in filenames) {
-                               Globals.vars.root.addDebug("requesting file "+fn); 
+                               Globals.vars.root.addDebug("requesting file "+fn);
+                var conn:Connection = Connection.getConnectionInstance();
 
-                if ( true ) {
-                  fn = Connection.getConnectionInstance().signOAuthGet(fn);
+                if ( fn.indexOf(conn.apiBase) == 0 ) {
+                  fn = conn.signOAuthGet(fn);
                 }
                                var request:DebugURLRequest = new DebugURLRequest(fn);
                                var loader:ExtendedURLLoader = new ExtendedURLLoader();