mirror of
https://github.com/documize/community.git
synced 2025-07-22 22:59:43 +02:00
implemented move content to another document
This commit is contained in:
parent
07ee2248d4
commit
b5a595e305
9 changed files with 105 additions and 19 deletions
|
@ -496,3 +496,17 @@ func (p *Persister) DeletePageRevisions(pageID string) (rows int64, err error) {
|
|||
|
||||
return
|
||||
}
|
||||
|
||||
// GetNextPageSequence returns the next sequence numbner to use for a page in given document.
|
||||
func (p *Persister) GetNextPageSequence(documentID string) (maxSeq float64, err error) {
|
||||
row := Db.QueryRow("SELECT max(sequence) FROM page WHERE orgid=? AND documentid=? AND pagetype='section'", p.Context.OrgID, documentID)
|
||||
|
||||
err = row.Scan(&maxSeq)
|
||||
if err != nil {
|
||||
maxSeq = 2048
|
||||
}
|
||||
|
||||
maxSeq = maxSeq * 2
|
||||
|
||||
return
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue