/** * An undo * * @return void * @author Drew McLellan */ public function revert_most_recent() { $undo_rev = $this->regionLatestRev(); $Items = new PerchContent_Items(); $prev_rev = $Items->get_previous_revision_number($this->id(), $undo_rev); if ($prev_rev) { $this->publish($prev_rev); $Items->delete_revision($this->id(), $undo_rev); $Perch = Perch::fetch(); $Perch->event('region.undo', $this); return true; } return false; }