Compare commits

...

3 commits

Author SHA1 Message Date
Tim Schumacher
174d217f11 Sort the changelog. 2014-06-15 16:40:08 +02:00
Tim Schumacher
56ce743994 Suply a getter for the node parent. 2014-06-15 16:39:47 +02:00
Tim Schumacher
040a3fbd8a fix typo 2014-06-14 10:24:20 +02:00
2 changed files with 16 additions and 1 deletions

View file

@ -83,6 +83,13 @@ abstract class DokuWikiNode
return $this->name;
}
/**
* @return DokuWikiNameSpace
*/
public function getParent() {
return $this->parent;
}
/**
* @param $filename
* @param null $parent

View file

@ -38,10 +38,18 @@ class DokuWikiPage extends DokuWikiNode
$entry = parseChangelogLine($raw_entry);
if ((!is_null($this->maxChangeSetAge)) && ($this->maxChangeSetAge->format('U') > $entry['date']))
continue;
$changelog = new DokuWikiChangeset($entry['date'], $entry['extra'], $entry['id'], $entry['ip'], $entry['sum'], $entry['type'], $entry['user'],$page);
$changelog = new DokuWikiChangeset($entry['date'], $entry['extra'], $entry['id'], $entry['ip'], $entry['sum'], $entry['type'], $entry['user'],$this);
$this->ChangeLog->append($changelog);
}
}
if ($this->ChangeLog->count() > 0) {
$this->ChangeLog->uasort(function(DokuWikiChangeset $a, DokuWikiChangeset $b){
if ($a->getDate() == $b->getDate()) {
return 0;
}
return ($a->getDate() > $b->getDate()) ? -1 : 1;
});
}
}
}