/** * @return int */ public function getFirstDiffLine() { if ($this->aenderung_first_line_cache > -1) { return $this->aenderung_first_line_cache; } $text_vorher = $this->antrag->text; $paragraphs = $this->antrag->getParagraphs(false, false); $text_neu = array(); $diff = $this->getDiffParagraphs(); foreach ($paragraphs as $i => $para) { if (isset($diff[$i]) && $diff[$i] != "") { $text_neu[] = $diff[$i]; } else { $text_neu[] = $para->str_bbcode; } } $diff = DiffUtils::getTextDiffMitZeilennummern(trim($text_vorher), trim(implode("\n\n", $text_neu)), $this->antrag->veranstaltung->getEinstellungen()->zeilenlaenge); $this->aenderung_first_line_cache = DiffUtils::getFistDiffLine($diff, $this->antrag->getFirstLineNo()); $this->save(); return $this->aenderung_first_line_cache; }