Pholio Mock: fix altered breadcrumb and header on image validation error
Summary:
For years, when editing a Pholio Mock and causing an image title
validation error, then the breadcrumb and the page header were altered.
The cause was a variable, $title, re-used by mistake in this corner case.
After this change, the "Edit Mock: The mock name" is not overwritten by mistake.
Closes T16492
Test Plan:
Edit an already-existing Pholio Mock.
http://phorge.localhost/pholio/edit/1/
In the field "Name", set "The mock name".
Then change the image title (field "Title") setting a very long title,
more than 128 characters, like this:
THE IMAGE VERY LONG TITLE BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLABLA BLA BLA BLA BLA BLA BLA BLA!
Save. You will see the usual error, but now you finally see the normal breadcrumb, like this:
{nav Pholio > M1 > Edit Mock: The mock name}
So, you don't see anymore this nonsense breadcrumb:
{nav Pholio > M1 > THE IMAGE VERY LONG TITLE BLA BLA BLA BLA BLA B...}
Plus, you finally see this page header:
Edit Mock: The mock name
So, you don't see anymore this nonsense page header:
Edit Mock: THE IMAGE VERY LONG TITLE BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLABLA BLA BLA BLA BLA BLA BLA BLA!
Such wow!
Reviewers: O1 Blessed Committers, aklapper
Reviewed By: O1 Blessed Committers, aklapper
Subscribers: aklapper, tobiaswiese, Matthew, Cigaryno
Maniphest Tasks: T16492
Differential Revision: https://we.phorge.it/D26734