/** * @see \wcf\page\IPage::readData() */ public function readData() { parent::readData(); $this->objectList = new EditHistoryEntryList(); $this->objectList->sqlOrderBy = "time DESC, entryID DESC"; $this->objectList->getConditionBuilder()->add('objectTypeID = ?', array($this->objectType->objectTypeID)); $this->objectList->getConditionBuilder()->add('objectID = ?', array($this->objectID)); $this->objectList->readObjects(); // valid IDs were given, calculate diff if ($this->old && $this->new) { $a = explode("\n", StringUtil::unifyNewlines($this->old->getMessage())); $b = explode("\n", StringUtil::unifyNewlines($this->new->getMessage())); $this->diff = new Diff($a, $b); } // set default values if (!isset($_REQUEST['oldID']) && !isset($_REQUEST['newID'])) { foreach ($this->objectList as $object) { $this->oldID = $object->entryID; break; } $this->newID = 'current'; } }