trying to achieve correct display update on page content update – I have a feeling that this still doesn`t work reliably
Signed-off-by: Stephan Richter <s.richter@srsoftware.de>
This commit is contained in:
@@ -268,8 +268,10 @@ public class SqliteDb extends BaseDb implements WikiDb {
|
||||
@Override
|
||||
public WikiPage save(WikiPage page) {
|
||||
try {
|
||||
if (page.isDirty(CONTENT) || page.isDirty(ID) || page.isDirty(TITLE)) insertInto(TABLE_PAGES,ID,VERSION,TITLE,CONTENT)
|
||||
.values(page.id(),page.version(),page.title(),page.content()).execute(db).close();
|
||||
if (page.isDirty(CONTENT) || page.isDirty(ID) || page.isDirty(TITLE)) {
|
||||
insertInto(TABLE_PAGES,ID,VERSION,TITLE,CONTENT).values(page.id(),page.version(),page.title(),page.content()).execute(db).close();
|
||||
page.versions().add(page.version());
|
||||
}
|
||||
if (page.isDirty(MEMBERS)){
|
||||
Query.delete().from(TABLE_PAGES_USERS).where(PAGE_ID, equal(page.id())).where(USER_ID,Condition.notIn(page.members().keySet().toArray())).execute(db);
|
||||
var query = replaceInto(TABLE_PAGES_USERS,PAGE_ID,USER_ID,PERMISSIONS);
|
||||
|
||||
Reference in New Issue
Block a user