fix: make-global keeps the backup sentence on a failure on page 2+ (ruling P14)
failedOn() replaced the hint for a failure after earlier pages were replaced, so the "Sicherung X liegt im Papierkorb" sentence of the failed page's backup was lost. The hint now leads with it when a backup exists. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01At3V6SjwbMe6eMzVGW3Hs7
This commit is contained in:
@@ -531,11 +531,14 @@ final class LibraryMakeGlobalAbility implements Ability
|
||||
$rest === [] ? 'keine weiteren' : implode(', ', $rest)
|
||||
);
|
||||
|
||||
return $e->withDetails(
|
||||
$details,
|
||||
'Den Stand mit lit/library-find-similar neu prüfen und nur die übrigen Seiten mit neuem tree_rev ersetzen.',
|
||||
$e->rolledBack ? $state : null
|
||||
);
|
||||
// Ruling P14: a backup of page N (revisions off) stays named – its sentence leads the hint.
|
||||
$hint = 'Den Stand mit lit/library-find-similar neu prüfen und nur die übrigen Seiten mit neuem tree_rev '
|
||||
. 'ersetzen.';
|
||||
if (isset($e->details['backup_id']) && $e->hint !== null) {
|
||||
$hint = $e->hint . ' ' . $hint;
|
||||
}
|
||||
|
||||
return $e->withDetails($details, $hint, $e->rolledBack ? $state : null);
|
||||
}
|
||||
|
||||
/** Pages visitors see (or will see): changes there get VisibleEdits' restore point (P8a statuses). */
|
||||
|
||||
Reference in New Issue
Block a user