From: Tim Düsterhus Date: Wed, 25 Jun 2014 17:57:44 +0000 (+0200) Subject: Add breadcrumbs to EditHistoryPage X-Git-Tag: 2.1.0_Alpha_1~590^2~14 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=5e40b0b201d4661f8cfb2640834fff6f9615aa96;p=GitHub%2FWoltLab%2FWCF.git Add breadcrumbs to EditHistoryPage --- diff --git a/wcfsetup/install/files/lib/page/EditHistoryPage.class.php b/wcfsetup/install/files/lib/page/EditHistoryPage.class.php index ee623a32ba..ae2e5f9043 100644 --- a/wcfsetup/install/files/lib/page/EditHistoryPage.class.php +++ b/wcfsetup/install/files/lib/page/EditHistoryPage.class.php @@ -1,8 +1,8 @@ object = $processor->getObjectByID($this->objectID); $processor->checkPermissions($this->object); $this->activeMenuItem = $processor->getActivePageMenuItem(); + $this->object->addBreadcrumbs(); if (!$this->new) { $this->new = $this->object; @@ -126,6 +133,12 @@ class EditHistoryPage extends AbstractPage { public function readData() { parent::readData(); + $this->objectList = new EditHistoryEntryList(); + $this->objectList->sqlOrderBy = "time DESC"; + $this->objectList->getConditionBuilder()->add('objectTypeID = ?', array($this->objectTypeID)); + $this->objectList->getConditionBuilder()->add('objectID = ?', array($this->objectID)); + $this->objectList->readObjects(); + // valid IDs were given, calculate diff if ($this->old) { $a = explode("\n", StringUtil::unifyNewlines($this->old->getMessage())); @@ -146,7 +159,8 @@ class EditHistoryPage extends AbstractPage { 'newID' => $this->newID, 'new' => $this->new, 'object' => $this->object, - 'diff' => $this->diff + 'diff' => $this->diff, + 'objects' => $this->objectList )); } } diff --git a/wcfsetup/install/files/lib/system/edit/IHistorySavingObject.class.php b/wcfsetup/install/files/lib/system/edit/IHistorySavingObject.class.php index b676b98472..7ce69c2849 100644 --- a/wcfsetup/install/files/lib/system/edit/IHistorySavingObject.class.php +++ b/wcfsetup/install/files/lib/system/edit/IHistorySavingObject.class.php @@ -35,4 +35,9 @@ interface IHistorySavingObject extends IDatabaseObjectProcessor, IUserContent { * @return string */ public function getMessage(); + + /** + * Adds the object's breadcrumbs. + */ + public function addBreadcrumbs(); }