# HG changeset patch # User Matti Hamalainen # Date 1416491119 -7200 # Node ID 9fa68b35b90ab7637dae9a4e52577f30bfa5dc6e # Parent 81807c56153e9fc3905409b2acbabe910c2bd10a Only COMPO_NORMAL compo type sets new compo_id. Handle cases that do not. diff -r 81807c56153e -r 9fa68b35b90a admin.js --- a/admin.js Thu Nov 20 15:44:37 2014 +0200 +++ b/admin.js Thu Nov 20 15:45:19 2014 +0200 @@ -448,8 +448,15 @@ function updateEntry(cid, id) { var args = jsMakePostArgs({"name":1, "author":1, "filename":1, "info":1, "notes":1, "compo_id":4, "evalue":2, "preview_type":4}, "en", id, true); + var has_id = "compo_id" in lastPostArgs; var compo_id = lastPostArgs["compo_id"]; + if (!("compo_id" in lastPostArgs)) + { + args += "&compo_id=" + cid; + compo_id = cid; + } + var msuccess = function(txt) { if (cid != compo_id)