Differential D20843 Diff 49695 src/applications/differential/render/DifferentialChangesetHTMLRenderer.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/differential/render/DifferentialChangesetHTMLRenderer.php
Show First 20 Lines • Show All 264 Lines • ▼ Show 20 Lines | if ($show_encoding) { | ||||
'This file was converted from %s for display.', | 'This file was converted from %s for display.', | ||||
phutil_tag('strong', array(), $encoding)); | phutil_tag('strong', array(), $encoding)); | ||||
} else { | } else { | ||||
$messages[] = pht('This file uses an unknown character encoding.'); | $messages[] = pht('This file uses an unknown character encoding.'); | ||||
} | } | ||||
} | } | ||||
} | } | ||||
$blocks = $this->getDocumentEngineBlocks(); | |||||
if ($blocks) { | |||||
foreach ($blocks->getMessages() as $message) { | |||||
$messages[] = $message; | |||||
} | |||||
} else { | |||||
if ($this->getHighlightingDisabled()) { | if ($this->getHighlightingDisabled()) { | ||||
$byte_limit = DifferentialChangesetParser::HIGHLIGHT_BYTE_LIMIT; | |||||
$byte_limit = phutil_format_bytes($byte_limit); | |||||
$messages[] = pht( | $messages[] = pht( | ||||
'This file is larger than %s, so syntax highlighting is '. | 'This file is larger than %s, so syntax highlighting is '. | ||||
'disabled by default.', | 'disabled by default.', | ||||
phutil_format_bytes(DifferentialChangesetParser::HIGHLIGHT_BYTE_LIMIT)); | $byte_limit); | ||||
} | |||||
} | } | ||||
return $this->formatHeaderMessages($messages); | return $this->formatHeaderMessages($messages); | ||||
} | } | ||||
private function formatHeaderMessages(array $messages) { | private function formatHeaderMessages(array $messages) { | ||||
if (!$messages) { | if (!$messages) { | ||||
return null; | return null; | ||||
▲ Show 20 Lines • Show All 326 Lines • Show Last 20 Lines |