~azzar1/unity/add-show-desktop-key

« back to all changes in this revision

Viewing changes to www/media/common/util.js

  • Committer: drtomc
  • Date: 2008-02-13 00:37:47 UTC
  • Revision ID: svn-v3-trunk0:2b9c9e99-6f39-0410-b283-7f802c844ae2:trunk:441
make_query_string - change the interface so that it no longer returns null.

Show diffs side-by-side

added added

removed removed

Lines of Context:
278
278
            query_string += "&" + encodeURIComponent(arg_key) + "=" +
279
279
                encodeURIComponent(arg_val);
280
280
    }
281
 
    if (query_string == "")
282
 
        query_string = null;
283
 
    else
 
281
    if (query_string != "")
284
282
        /* Drop the first "&" */
285
283
        query_string = query_string.substr(1);
286
284
 
321
319
    else if (("args" in obj) && obj.args != null)
322
320
        query_string = make_query_string(obj.args);
323
321
 
324
 
    if (query_string != null)
 
322
    if (query_string != "")
325
323
        url += "?" + query_string;
326
324
 
327
325
    return url;
571
569
            xhr.setRequestHeader("Content-Type", content_type);
572
570
            message = make_query_string(args);
573
571
        }
 
572
        xhr.setRequestHeader("Content-Length", message.length);
574
573
        xhr.send(message);
575
574
    }
576
575
    return xhr;