Changeset 1444 for trunk/expressoMail1_2/js/connector.js
- Timestamp:
- 09/23/09 12:05:58 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/expressoMail1_2/js/connector.js
r1443 r1444 121 121 { 122 122 case 'number': 123 str_data += 'i:' + i + ';' + _thisObject.serialize(data[i]);123 str_data += 'i:' + i + ';' + f(data[i]); 124 124 break; 125 125 126 126 case 'string': 127 str_data += 's:' + i.length + ':"' + i + '";' + _thisObject.serialize(data[i]);127 str_data += 's:' + i.length + ':"' + i + '";' + f(data[i]); 128 128 break; 129 129 … … 165 165 } 166 166 167 var sdata = f(data); 168 return sdata; 169 } 170 cConnector.prototype.matchBracket = function(strG, iniPosG) 167 return f(data); 168 } 169 170 171 //Unserialize Data Method 172 cConnector.prototype.unserialize = function(str) 171 173 { 174 172 175 _thisObject = this; 173 var f= function (str, iniPos)176 var matchB = function (str, iniPos) 174 177 { 175 178 var nOpen, nClose = iniPos; 176 177 do 179 do 178 180 { 179 181 nOpen = str.indexOf('{', nClose+1); … … 184 186 return nClose; 185 187 } 186 187 188 if (nOpen < nClose ) 188 189 { 189 nClose = _thisObject.matchBracket(str, nOpen); 190 } 191 190 nClose = matchB(str, nOpen); 191 } 192 192 } while (nOpen < nClose); 193 193 194 194 return nClose; 195 195 } 196 197 return f(strG, iniPosG);198 }199 200 201 //Unserialize Data Method202 cConnector.prototype.unserialize = function(str)203 {204 205 _thisObject = this;206 196 207 197 var f = function (str) … … 221 211 /* Process Index */ 222 212 var indexStr = arrayContent.substr(pos, arrayContent.indexOf(';')+1); 223 var index = _thisObject.unserialize(indexStr);213 var index = f(indexStr); 224 214 pos = arrayContent.indexOf(';', pos)+1; 225 215 … … 229 219 { 230 220 case 'a': 231 var pos_ = _thisObject.matchBracket(arrayContent, arrayContent.indexOf('{', pos))+1;221 var pos_ = matchB(arrayContent, arrayContent.indexOf('{', pos))+1; 232 222 part = arrayContent.substring(pos, pos_); 233 223 pos = pos_; 234 data[index] = _thisObject.unserialize(part);224 data[index] = f(part); 235 225 break; 236 226 … … 245 235 part = arrayContent.substring(pos, arrayContent.indexOf(';', pos)+1); 246 236 pos = arrayContent.indexOf(';', pos)+1; 247 data[index] = _thisObject.unserialize(part);237 data[index] = f(part); 248 238 break; 249 239 }
Note: See TracChangeset
for help on using the changeset viewer.