Permalink
Browse files

save last modified dates with pages

  • Loading branch information...
1 parent cec564d commit d995bf5579e4d6b534337e9e0e28eae14934b2f8 @splitbrain committed Jan 31, 2012
Showing with 6 additions and 4 deletions.
  1. +1 −1 db/latest.version
  2. +1 −0 db/update0005.sql
  3. +1 −1 plugin.info.txt
  4. +3 −2 syntax/entry.php
View
@@ -1 +1 @@
-4
+5
View
@@ -0,0 +1 @@
+ALTER TABLE pages ADD lastmod;
View
@@ -1,7 +1,7 @@
base data
author Andreas Gohr
email andi@splitbrain.org
-date 2011-12-13
+date 2012-01-31
name Structured Data Plugin
desc Add and query structured data in your wiki
url http://www.dokuwiki.org/plugin:data
View
@@ -182,8 +182,9 @@ function _saveData($data,$id,$title){
$id,$title,$class);
// Update title if insert failed (record already saved before)
- $sqlite->query("UPDATE pages SET title = ?, class = ? WHERE page = ?",
- $title,$class,$id);
+ $revision = filemtime(wikiFN($id));
+ $sqlite->query("UPDATE pages SET title = ?, class = ?, lastmod = ? WHERE page = ?",
+ $title,$class,$revision,$id);
// fetch page id
$res = $sqlite->query("SELECT pid FROM pages WHERE page = ?",$id);

0 comments on commit d995bf5

Please sign in to comment.