1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-29 10:12:41 +01:00

Dashboard Tabs: fix action "Move Right"

Summary:
It seems that if you use the "Move Right" action, you can get
an unrelated error message about "Move Left":

    This is already the first tab. It can not move any farther to the left.

This happened because there was an incomplete condition.

Closes T15493

Test Plan:
- visit /dashboard/panel/ and create at least two panels (please, owned by you)
- visit a Dashboard, and add a Tabs Panel
- take the first Tab: "Move Right"

After this change, "Move Right" now always works.

Reviewers: O1 Blessed Committers, avivey

Reviewed By: O1 Blessed Committers, avivey

Subscribers: speck, tobiaswiese, Matthew, Cigaryno

Maniphest Tasks: T15493

Differential Revision: https://we.phorge.it/D25307
This commit is contained in:
Valerio Bozzolan 2023-07-06 13:31:20 +02:00
parent cae1246359
commit 92861cc1f0

View file

@ -327,7 +327,7 @@ final class PhabricatorDashboardPanelTabsController
'This is already the last tab. It can not move any farther to '. 'This is already the last tab. It can not move any farther to '.
'the right.')) 'the right.'))
->addCancelButton($cancel_uri); ->addCancelButton($cancel_uri);
} else if ((string)head_key($old_config) === $target) { } else if (!$is_next && (string)head_key($old_config) === $target) {
return $this->newDialog() return $this->newDialog()
->setTitle(pht('Impossible!')) ->setTitle(pht('Impossible!'))
->appendParagraph( ->appendParagraph(