diff --git a/lib/enko/dokuwiki/objectrepresentation/DokuWikiPage.php b/lib/enko/dokuwiki/objectrepresentation/DokuWikiPage.php index f4691a4..fdffa68 100755 --- a/lib/enko/dokuwiki/objectrepresentation/DokuWikiPage.php +++ b/lib/enko/dokuwiki/objectrepresentation/DokuWikiPage.php @@ -11,6 +11,8 @@ namespace enko\dokuwiki\objectrepresentation; class DokuWikiPage extends DokuWikiNode { + public $ChangeLog; + /** * @param $filename * @param null $parent @@ -26,6 +28,17 @@ class DokuWikiPage extends DokuWikiNode foreach ($metadata as $key => $value) { $this->setMetaData($key, $value); } + // extract changelog + $this->ChangeLog = new \ArrayObject(); + $file = metaFN($this->getFullID(), '.changes'); + if (file_exists($file)) { + $changelog_entries = explode("\n", file_get_contents($file)); + foreach ($changelog_entries as $raw_entry) { + $entry = parseChangelogLine($raw_entry); + $changelog = new DokuWikiChangeset($entry['date'], $entry['extra'], $entry['id'], $entry['ip'], $entry['sum'], $entry['type'], $entry['user']); + $this->ChangeLog->append($changelog); + } + } } } \ No newline at end of file