Improved handling of blank nickname/comment fields (i.e. this is what I meant the...
authorAndy Allan <gravitystorm@gmail.com>
Tue, 30 Nov 2010 12:02:30 +0000 (12:02 +0000)
committerAndy Allan <gravitystorm@gmail.com>
Tue, 30 Nov 2010 12:02:30 +0000 (12:02 +0000)
net/systemeD/potlatch2/BugLayer.as

index 69dafc8007d32c8b1e81bbe14ca214bdadf7b813..09e7e20e1b145f8bcf4c03d899bf5a4f3a7c2a18 100644 (file)
@@ -25,8 +25,10 @@ package net.systemeD.potlatch2 {
             super(n,map,s);
         }
 
             super(n,map,s);
         }
 
-        public function closeBug(m:Marker, nickname:String = "NoName", comment:String = "No Comment", status:String = null):void {
+        public function closeBug(m:Marker, nickname:String, comment:String, status:String = null):void {
             var id:String = m.getTag('bug_id');
             var id:String = m.getTag('bug_id');
+            nickname ||= 'NoName';
+            comment ||= 'No Comment';
             status ||= BUG_STATUS_FIXED;
             var urlReq:URLRequest = new URLRequest(baseUrl+"changeBugStatus?id="+id+"&status="+status+"&comment="+encodeURIComponent(comment)+"&nickname="+encodeURIComponent(nickname)+"&key="+apiKey);
             urlReq.method = "POST";
             status ||= BUG_STATUS_FIXED;
             var urlReq:URLRequest = new URLRequest(baseUrl+"changeBugStatus?id="+id+"&status="+status+"&comment="+encodeURIComponent(comment)+"&nickname="+encodeURIComponent(nickname)+"&key="+apiKey);
             urlReq.method = "POST";