<?php
namespace wcf\page;
use wcf\data\edit\history\entry\EditHistoryEntry;
+use wcf\data\edit\history\entry\EditHistoryEntryList;
use wcf\data\object\type\ObjectTypeCache;
-use wcf\page\AbstractPage;
use wcf\system\exception\IllegalLinkException;
use wcf\system\WCF;
use wcf\util\Diff;
* @category Community Framework
*/
class EditHistoryPage extends AbstractPage {
+ /**
+ * DatabaseObjectList object
+ * @var \wcf\data\DatabaseObjectList
+ */
+ public $objectList = null;
+
/**
* left / old version id
* @var integer
public $object = null;
/**
- * @see \wcf\page\IPage::readParameters()
- */
+ * @see \wcf\page\IPage::readParameters()
+ */
public function readParameters() {
parent::readParameters();
$this->object = $processor->getObjectByID($this->objectID);
$processor->checkPermissions($this->object);
$this->activeMenuItem = $processor->getActivePageMenuItem();
+ $this->object->addBreadcrumbs();
if (!$this->new) {
$this->new = $this->object;
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()));
'newID' => $this->newID,
'new' => $this->new,
'object' => $this->object,
- 'diff' => $this->diff
+ 'diff' => $this->diff,
+ 'objects' => $this->objectList
));
}
}