]> git.openstreetmap.org Git - potlatch2.git/blobdiff - net/systemeD/potlatch2/save/SaveManager.as
Make the mygpx dialog set up the tokens first
[potlatch2.git] / net / systemeD / potlatch2 / save / SaveManager.as
index 6a3843bb473ac76a6780ec37eb42e3f33749730d..1a72797ac61cd69272f753f5a01b5db4b6a1b96f 100644 (file)
@@ -18,6 +18,17 @@ package net.systemeD.potlatch2.save {
             instance.save(instance.saveData);
         }
 
+        public static function getAccessSorted():void {
+            // hacky hack of pond-like clarity
+            instance.save(instance.doNothing);
+        }
+
+        private function doNothing():void {
+            //hack hacky hack hack. Please look the other way...
+            Connection.getConnectionInstance().setAppID(consumer);
+            Connection.getConnectionInstance().setAuthToken(accessToken);
+        }
+
         private function save(callback:Function):void {
             if ( consumer == null )
                 consumer = getConsumer();
@@ -29,7 +40,7 @@ package net.systemeD.potlatch2.save {
             else
                 callback();
         }
-    
+
         private function getAccessToken():OAuthToken {
             var key:String = Connection.getParam("oauth_token", null);
             var secret:String = Connection.getParam("oauth_token_secret", null);