diff options
author | Jochen Topf <jochen@topf.org> | 2013-01-09 19:18:55 +0100 |
---|---|---|
committer | Jochen Topf <jochen@topf.org> | 2013-01-09 19:18:55 +0100 |
commit | 64a047f622a5ed15dea94b5e52dd8c948fce9e95 (patch) | |
tree | 1dfeecec0fa0477c1a246ef6567dffc56592d325 /sources/wiki/post.sql | |
parent | 9cadfd89c12c9223e7c572646680d0bcce57310c (diff) | |
download | taginfo-64a047f622a5ed15dea94b5e52dd8c948fce9e95.tar taginfo-64a047f622a5ed15dea94b5e52dd8c948fce9e95.tar.gz |
Better support for wiki images.
Key and tag wiki pages can contain images. Until now we only got the titles of
those images. Now we also get the URL to the image, URL to thumbnails, width,
height, and mime type. This information is now exposed in the API and it is
used to show the images in the Overview tab of the key and tag pages.
While we are changing the update process anyway, I changed the program that
gets the list of all pages to also output the time those pages changed last.
This information is currently not used, but it could be used to cache those
pages locally making the update much faster and adding less strain to the
wiki server.
Diffstat (limited to 'sources/wiki/post.sql')
-rw-r--r-- | sources/wiki/post.sql | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sources/wiki/post.sql b/sources/wiki/post.sql index 773a04d..99eb26f 100644 --- a/sources/wiki/post.sql +++ b/sources/wiki/post.sql @@ -13,6 +13,8 @@ UPDATE wikipages SET status='e' WHERE type='page' AND has_templ='true' AND parse CREATE INDEX wikipages_key_value_idx ON wikipages(key, value); +CREATE INDEX wiki_images_image ON wiki_images(image); + INSERT INTO wikipages_keys (key, langs, lang_count) SELECT key, group_concat(lang || ' ' || status), count(*) FROM wikipages WHERE value IS NULL GROUP BY key; INSERT INTO wikipages_tags (key, value, langs, lang_count) SELECT key, value, group_concat(lang || ' ' || status), count(*) FROM wikipages WHERE value IS NOT NULL GROUP BY key, value; |