Reverting r111 change to bound parameters for Item.erase() (minus the exception fix) -- bound parameters/multiple statements/no can do
Item deleting should work properly now
This commit is contained in:
parent
338bb54fdc
commit
c561ca129e
1 changed files with 5 additions and 5 deletions
|
@ -662,12 +662,12 @@ Scholar.Item.prototype.erase = function(){
|
||||||
Scholar.Collections.get(parentCollectionIDs[i]).removeItem(this.getID());
|
Scholar.Collections.get(parentCollectionIDs[i]).removeItem(this.getID());
|
||||||
}
|
}
|
||||||
|
|
||||||
sql = "DELETE FROM itemCreators WHERE itemID=?1;\n";
|
sql = 'DELETE FROM itemCreators WHERE itemID=' + this.getID() + ";\n";
|
||||||
sql += "DELETE FROM itemKeywords WHERE itemID=?1;\n";
|
sql += 'DELETE FROM itemKeywords WHERE itemID=' + this.getID() + ";\n";
|
||||||
sql += "DELETE FROM itemData WHERE itemID=?1;\n";
|
sql += 'DELETE FROM itemData WHERE itemID=' + this.getID() + ";\n";
|
||||||
sql += "DELETE FROM items WHERE itemID=?1;";
|
sql += 'DELETE FROM items WHERE itemID=' + this.getID() + ";\n";
|
||||||
|
|
||||||
Scholar.DB.query(sql, [{'int':this.getID()}]);
|
Scholar.DB.query(sql);
|
||||||
Scholar.Creators.purge();
|
Scholar.Creators.purge();
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
|
Loading…
Reference in a new issue