public function undoPatch(LogootPatch $patch) { $this->clock = utils::getNextClock(); wfDebugLog('p2p', $this->clock . ' - function logootPlusEngine::undoPatch '); $opList = array(); foreach ($patch as $op) { $opList[] = LogootPlusOperation::inv($op); } $undoPatch = new LogootPatch($this->sessionid . $this->clock, $opList); $undoPatch->setRefPatch($patch->getId()); return $undoPatch; }