1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-23 14:00:56 +01:00

Fix some pagination/redirect issues for repositories

Summary:
Ref T10923. Paging wasn't being applied correctly when creating //new// repositories after API changes.

Also, the first redirect after creation wasn't sending users to the right place.

Test Plan:
  - Created a new repostiory, got redirected properly.
  - Verified that new repostiory flow has the correct fields (name, callsign, etc) and Conduit API has the correct fields (everything).

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10923

Differential Revision: https://secure.phabricator.com/D15865
This commit is contained in:
epriestley 2016-05-06 12:36:48 -07:00
parent 412fc34557
commit 612a93229f

View file

@ -497,6 +497,10 @@ abstract class PhabricatorEditEngine
}
public function getEffectiveObjectViewURI($object) {
if ($this->getIsCreate()) {
return $this->getObjectViewURI($object);
}
$page = $this->getSelectedPage();
if ($page) {
$view_uri = $page->getViewURI();
@ -839,6 +843,13 @@ abstract class PhabricatorEditEngine
}
$page_key = $request->getURIData('pageKey');
if (!strlen($page_key)) {
$pages = $this->getPages($object);
if ($pages) {
$page_key = head_key($pages);
}
}
if (strlen($page_key)) {
$page = $this->selectPage($object, $page_key);
if (!$page) {