Differential D18693 Diff 44881 src/applications/differential/customfield/DifferentialHarbormasterField.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/differential/customfield/DifferentialHarbormasterField.php
Show All 39 Lines | if (!$messages) { | ||||
// No Harbormaster messages, so look for legacy messages and make them | // No Harbormaster messages, so look for legacy messages and make them | ||||
// look like modern messages. | // look like modern messages. | ||||
$legacy_messages = $diff->getProperty($this->getLegacyProperty()); | $legacy_messages = $diff->getProperty($this->getLegacyProperty()); | ||||
if ($legacy_messages) { | if ($legacy_messages) { | ||||
// Show the top 100 legacy lint messages. Previously, we showed some | // Show the top 100 legacy lint messages. Previously, we showed some | ||||
// by default and let the user toggle the rest. With modern messages, | // by default and let the user toggle the rest. With modern messages, | ||||
// we can send the user to the Harbormaster detail page. Just show | // we can send the user to the Harbormaster detail page. Just show | ||||
// "a lot" of messages in legacy cases to try to strike a balance | // "a lot" of messages in legacy cases to try to strike a balance | ||||
// between implementation simplicitly and compatibility. | // between implementation simplicity and compatibility. | ||||
$legacy_messages = array_slice($legacy_messages, 0, 100); | $legacy_messages = array_slice($legacy_messages, 0, 100); | ||||
foreach ($legacy_messages as $message) { | foreach ($legacy_messages as $message) { | ||||
try { | try { | ||||
$modern = $this->newModernMessage($message); | $modern = $this->newModernMessage($message); | ||||
$messages[] = $modern; | $messages[] = $modern; | ||||
} catch (Exception $ex) { | } catch (Exception $ex) { | ||||
// Ignore any poorly formatted messages. | // Ignore any poorly formatted messages. | ||||
▲ Show 20 Lines • Show All 42 Lines • Show Last 20 Lines |