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

Improve move/copy/merge sections between documents

Processx all child sections during copy/move/merge operation.

Ensure links work as expected within newly copied/moved content.

Index copied/moved content for searching.

fixes #138
fixes #248
This commit is contained in:
sauls8t 2019-06-06 16:17:36 +01:00
parent ec8d5c78e2
commit a90c5834fa
7 changed files with 133 additions and 47 deletions

View file

@ -98,13 +98,13 @@ func (s Store) GetPageLinks(ctx domain.RequestContext, documentID, pageID string
WHERE c_orgid=? AND c_sourcedocid=? AND c_sourcesectionid=?`),
ctx.OrgID, documentID, pageID)
if err != nil && err != sql.ErrNoRows {
err = errors.Wrap(err, "get page links")
return
}
if len(links) == 0 {
if err == sql.ErrNoRows || len(links) == 0 {
err = nil
links = []link.Link{}
}
if err != nil {
err = errors.Wrap(err, "get page links")
}
return
}