diff options
author | David A. Madore <david+git@madore.org> | 2014-10-12 17:59:13 +0200 |
---|---|---|
committer | David A. Madore <david+git@madore.org> | 2014-10-12 17:59:54 +0200 |
commit | 4e7ceb1dde219d03e577c7c038e19f977c9abc29 (patch) | |
tree | a45dfa00055bff48662fef644e4d955f873fc121 /org/madore/damlengine/TodoCutHere.java | |
parent | fc921ecbda441f37ff33a1e4b76581434fc3c954 (diff) | |
download | damlengine-4e7ceb1dde219d03e577c7c038e19f977c9abc29.tar.gz damlengine-4e7ceb1dde219d03e577c7c038e19f977c9abc29.tar.bz2 damlengine-4e7ceb1dde219d03e577c7c038e19f977c9abc29.zip |
Separate the "has_cut" property from "do_single_page".
Note: the following SQL should be used to upgrade the database:
ALTER TABLE entries ADD COLUMN has_cut boolean NOT NULL DEFAULT FALSE ;
UPDATE entries SET has_cut = (array_length(xpath('.//d:cut-here', content, ARRAY[ARRAY['d', 'http://www.madore.org/~david/NS/daml/']]), 1) NOTNULL) ;
-- Check that the following returns nothing:
SELECT edate , id FROM entries WHERE has_cut != ( do_single_page NOTNULL ) ;
Diffstat (limited to 'org/madore/damlengine/TodoCutHere.java')
-rw-r--r-- | org/madore/damlengine/TodoCutHere.java | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/org/madore/damlengine/TodoCutHere.java b/org/madore/damlengine/TodoCutHere.java index 898c784..f611adf 100644 --- a/org/madore/damlengine/TodoCutHere.java +++ b/org/madore/damlengine/TodoCutHere.java @@ -23,8 +23,6 @@ public final class TodoCutHere extends TodoDefaultElement { public void handleNodeOnly() { if ( ctx.ent == null ) throw new IllegalStateException("entry context not defined in cut-here element"); - if ( ctx.ent.doSinglePage == null ) - throw new IllegalStateException("cut-here element found in non single-page entry"); String lang = LangHelper.getLangRec(node); String explicitLang = LangHelper.getLangNorec(node); final WeblogLink lk |