Don't lose the upload tab. Props mdawaffe. fixes #5390

git-svn-id: https://develop.svn.wordpress.org/trunk@6344 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren 2007-11-26 22:26:51 +00:00
parent 930a39d235
commit b88b2b507d

View File

@ -5,17 +5,15 @@ addLoadEvent( function() {
tab: '', tab: '',
postID: 0, postID: 0,
toQueryParams: function(qryStrOrig) { toQueryParams: function( s ) {
var params = new Object(); var r = {}; if ( !s ) { return r; }
var qryStr = qryStrOrig; var q = s.split('?'); if ( q[1] ) { s = q[1]; }
var i = 0; var pp = s.split('&');
do { for ( var i in pp ) {
params[qryStr.split("=")[0].replace(/&/, "")] = ( qryStr.split("=")[1] ) ? qryStr.split("=")[1].split(/&|$/)[0] : ''; var p = pp[i].split('=');
qryStr = ( qryStr.split("=")[1] ) ? qryStr.split(qryStr.split("=")[1].split(/&|$/)[0])[1] : ''; r[p[0]] = p[1];
i++;
} }
while(i < (qryStrOrig.split("=").length - 1)); return r;
return params;
}, },
toQueryString: function(params) { toQueryString: function(params) {