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:
parent
412fc34557
commit
612a93229f
1 changed files with 11 additions and 0 deletions
|
@ -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) {
|
||||
|
|
Loading…
Reference in a new issue