diff --git a/lib/enko/dokuwiki/objectrepresentation/DokuWikiChangeset.php b/lib/enko/dokuwiki/objectrepresentation/DokuWikiChangeset.php index 97b10bc..67451a4 100755 --- a/lib/enko/dokuwiki/objectrepresentation/DokuWikiChangeset.php +++ b/lib/enko/dokuwiki/objectrepresentation/DokuWikiChangeset.php @@ -18,6 +18,7 @@ class DokuWikiChangeset { private $sum; private $extra; private $content; + private $page; /** * @return mixed @@ -75,6 +76,10 @@ class DokuWikiChangeset { return $this->type; } + public function getPage() { + return $this->page; + } + /** * @return mixed */ @@ -83,7 +88,7 @@ class DokuWikiChangeset { return $this->user; } - function __construct($date,$extra, $id, $ip, $sum, $type, $user) + function __construct($date,$extra, $id, $ip, $sum, $type, $user, DokuWikiPage $page) { $this->date = new \DateTime(); $this->date->setTimestamp($date); @@ -94,6 +99,7 @@ class DokuWikiChangeset { $this->type = $type; $this->user = $user; $this->content = rawWiki($id,$this->date->format('U')); + $this->page = $page; } diff --git a/lib/enko/dokuwiki/objectrepresentation/DokuWikiPage.php b/lib/enko/dokuwiki/objectrepresentation/DokuWikiPage.php index fdffa68..c78dad3 100755 --- a/lib/enko/dokuwiki/objectrepresentation/DokuWikiPage.php +++ b/lib/enko/dokuwiki/objectrepresentation/DokuWikiPage.php @@ -35,10 +35,14 @@ class DokuWikiPage extends DokuWikiNode $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']); + $changelog = new DokuWikiChangeset($entry['date'], $entry['extra'], $entry['id'], $entry['ip'], $entry['sum'], $entry['type'], $entry['user'],$this); $this->ChangeLog->append($changelog); } } } + + public function getTitle() { + return strlen($this->getMetaData('title')) > 0 ? $this->getMetaData('title') : $this->getName(); + } } \ No newline at end of file