1
0
Fork 0
mirror of https://github.com/documize/community.git synced 2025-07-24 07:39:43 +02:00

Specify default categories for new documents

Closes #339

All new documents will be assigned default categories.

Documents created from templates that already have categories take precedence.
This commit is contained in:
HarveyKandola 2019-11-15 14:51:52 +00:00
parent 5c1ad25dc9
commit f117e91bcb
18 changed files with 1284 additions and 1134 deletions

View file

@ -743,9 +743,9 @@ func (r *restoreHandler) dmzCategory() (err error) {
for i := range ct {
_, err = r.Context.Transaction.Exec(r.Runtime.Db.Rebind(`
INSERT INTO dmz_category (c_refid, c_orgid, c_spaceid, c_name, c_created, c_revised)
VALUES (?, ?, ?, ?, ?, ?)`),
ct[i].RefID, r.remapOrg(ct[i].OrgID), ct[i].SpaceID, ct[i].Name, ct[i].Created, ct[i].Revised)
INSERT INTO dmz_category (c_refid, c_orgid, c_spaceid, c_name, c_default, c_created, c_revised)
VALUES (?, ?, ?, ?, ?, ?, ?`),
ct[i].RefID, r.remapOrg(ct[i].OrgID), ct[i].SpaceID, ct[i].Name, ct[i].IsDefault, ct[i].Created, ct[i].Revised)
if err != nil {
r.Context.Transaction.Rollback()