version 1.6, 2006/06/19 09:43:02
|
version 1.7, 2007/07/12 19:54:40
|
Line 244 function newcondition(content,type) {
|
Line 244 function newcondition(content,type) {
|
} |
} |
|
|
// ---------------------------------------------- Creates a new resource object |
// ---------------------------------------------- Creates a new resource object |
function newresource(rid,cid,text,url,ext,type) { |
function newresource(rid,cid,text,url,ext,type,oldidx) { |
stored=0; |
stored=0; |
var newidx=addobj(rid,'b&'+rid+'&'+cid+':0:0:0',url); |
var newidx=addobj(rid,'b&'+rid+'&'+cid+':0:0:0',url,oldidx); |
|
|
objcont[newidx]= |
objcont[newidx]= |
text+':'+url+':'+ext+':'+type+':res'; |
text+':'+url+':'+ext+':'+type+':res'; |
return newidx; |
return newidx; |
Line 468 function insertport (obj1,d,inout,linkob
|
Line 469 function insertport (obj1,d,inout,linkob
|
|
|
// ---------------------------- Make a new object and add it to the row content |
// ---------------------------- Make a new object and add it to the row content |
// returns object number of generated object |
// returns object number of generated object |
function addobj(kjid,objs,url) { |
function addobj(kjid,objs,url,oldindex) { |
stored=0; |
stored=0; |
expense++; |
expense++; |
if ((rowcont[kjid]!='') && (typeof(rowcont[kjid])!="undefined")) { |
if ((rowcont[kjid]!='') && (typeof(rowcont[kjid])!="undefined")) { |
Line 476 function addobj(kjid,objs,url) {
|
Line 477 function addobj(kjid,objs,url) {
|
} |
} |
var newindex=obj.length; |
var newindex=obj.length; |
if ((url!='') && (typeof(url)!="undefined")) { |
if ((url!='') && (typeof(url)!="undefined")) { |
// see if we have a zombie with that url |
// see if we have a zombie with that url and possibly oldindex |
for (oidx=0;oidx<objcont.length;oidx++) { |
for (oidx=0;oidx<objcont.length;oidx++) { |
if (typeof(objcont[oidx])!="undefined") { |
if (typeof(objcont[oidx])!="undefined") { |
data6=objcont[oidx].split(':'); |
data6=objcont[oidx].split(':'); |
if (data6[4]=='zombie') { |
if (data6[4]=='zombie') { |
if (data6[1]==url) { |
if (data6[1]==url) { |
newindex=oidx; |
if (typeof(oldindex) == "undefined") { |
|
newindex=oidx; |
|
} else { |
|
if (oidx == oldindex) { |
|
newindex=oidx; |
|
} |
|
} |
} |
} |
} |
} |
} |
} |