From e6dd69e49cb37bab27cb7de6389d61c5e947d342 Mon Sep 17 00:00:00 2001 From: Andy Allan Date: Tue, 12 Oct 2010 11:47:07 +0000 Subject: [PATCH] Only sign the URLs if they match the apiBase. This still needs more work, since you can paste such urls into the VB dialog before the connection is sorted out --- TODO.txt | 1 - net/systemeD/potlatch2/utils/Importer.as | 7 ++++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/TODO.txt b/TODO.txt index 763dcd49..f51da1b2 100644 --- 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 ---------------------- diff --git a/net/systemeD/potlatch2/utils/Importer.as b/net/systemeD/potlatch2/utils/Importer.as index 80b654cb..1f1d75d6 100644 --- a/net/systemeD/potlatch2/utils/Importer.as +++ b/net/systemeD/potlatch2/utils/Importer.as @@ -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(); -- 2.37.0