mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-19 03:50:54 +01:00
Use bracket-free, human-readable query URIs everywhere
Summary: See <http://fab.wmflabs.org/T88>. While this issue is on MW's side, these links are kind of ugly and have more readable alternate forms now. Update them to use proper modern forms. Test Plan: See inlines. Reviewers: btrahan Reviewed By: btrahan Subscribers: epriestley Differential Revision: https://secure.phabricator.com/D9042
This commit is contained in:
parent
997c8591b2
commit
b64415c9b1
7 changed files with 15 additions and 37 deletions
|
@ -3159,7 +3159,11 @@ phutil_register_library_map(array(
|
|||
'DiffusionPathValidateController' => 'DiffusionController',
|
||||
'DiffusionPushEventViewController' => 'DiffusionPushLogController',
|
||||
'DiffusionPushLogController' => 'DiffusionController',
|
||||
'DiffusionPushLogListController' => 'DiffusionPushLogController',
|
||||
'DiffusionPushLogListController' =>
|
||||
array(
|
||||
0 => 'DiffusionPushLogController',
|
||||
1 => 'PhabricatorApplicationSearchResultsControllerInterface',
|
||||
),
|
||||
'DiffusionQuery' => 'PhabricatorQuery',
|
||||
'DiffusionRawDiffQuery' => 'DiffusionQuery',
|
||||
'DiffusionRepositoryController' => 'DiffusionController',
|
||||
|
|
|
@ -34,10 +34,9 @@ final class DifferentialActionMenuEventListener
|
|||
}
|
||||
|
||||
$person = $event->getValue('object');
|
||||
$href = '/differential/?authorPHIDs[]='.$person->getPHID();
|
||||
$href = '/differential/?authors='.$person->getUsername();
|
||||
|
||||
return id(new PhabricatorActionView())
|
||||
->setRenderAsForm(true)
|
||||
->setIcon('differential-dark')
|
||||
->setIconSheet(PHUIIconView::SPRITE_APPS)
|
||||
->setName(pht('View Revisions'))
|
||||
|
|
|
@ -148,8 +148,8 @@ final class PhabricatorHomeMainController
|
|||
'Nothing appears to be critically broken right now.');
|
||||
}
|
||||
|
||||
$href = sprintf(
|
||||
'/maniphest/?statuses[]=%s&priorities[]=%s#R',
|
||||
$href = urisprintf(
|
||||
'/maniphest/?statuses=%s&priorities=%s#R',
|
||||
implode(',', ManiphestTaskStatus::getOpenStatusConstants()),
|
||||
$unbreak_now);
|
||||
$title = pht('Unbreak Now!');
|
||||
|
@ -196,8 +196,8 @@ final class PhabricatorHomeMainController
|
|||
}
|
||||
|
||||
$title = pht('Needs Triage');
|
||||
$href = sprintf(
|
||||
'/maniphest/?statuses[]=%s&priorities[]=%s&userProjects[]=%s#R',
|
||||
$href = urisprintf(
|
||||
'/maniphest/?statuses=%s&priorities=%s&userProjects=%s#R',
|
||||
implode(',', ManiphestTaskStatus::getOpenStatusConstants()),
|
||||
$needs_triage,
|
||||
$user->getPHID());
|
||||
|
|
|
@ -442,7 +442,7 @@ final class ManiphestReportController extends ManiphestController {
|
|||
}
|
||||
}
|
||||
|
||||
$base_link = '/maniphest/?allProjects[]=';
|
||||
$base_link = '/maniphest/?allProjects=';
|
||||
$leftover_name = phutil_tag('em', array(), pht('(No Project)'));
|
||||
$col_header = pht('Project');
|
||||
$header = pht('Open Tasks by Project and Priority (%s)', $date);
|
||||
|
|
|
@ -44,29 +44,4 @@ final class ManiphestActionMenuEventListener extends PhabricatorEventListener {
|
|||
->setHref($view_uri);
|
||||
}
|
||||
|
||||
private function renderProjectItems(PhutilEvent $event) {
|
||||
if (!$this->canUseApplication($event->getUser())) {
|
||||
return null;
|
||||
}
|
||||
|
||||
$project = $event->getValue('object');
|
||||
|
||||
$phid = $project->getPHID();
|
||||
$view_uri = '/maniphest/?statuses[]=0&allProjects[]='.$phid.'#R';
|
||||
$create_uri = '/maniphest/task/create/?projects='.$phid;
|
||||
|
||||
return array(
|
||||
id(new PhabricatorActionView())
|
||||
->setIcon('maniphest-dark')
|
||||
->setIconSheet(PHUIIconView::SPRITE_APPS)
|
||||
->setName(pht('View Tasks'))
|
||||
->setHref($view_uri),
|
||||
id(new PhabricatorActionView())
|
||||
->setName(pht("Add Task"))
|
||||
->setIcon('create')
|
||||
->setHref($create_uri),
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -50,7 +50,7 @@ final class ManiphestTaskSearchEngine
|
|||
|
||||
$saved->setParameter(
|
||||
'allProjectPHIDs',
|
||||
$request->getArr('allProjects'));
|
||||
$this->readPHIDsFromRequest($request, 'allProjects'));
|
||||
|
||||
$saved->setParameter(
|
||||
'withNoProject',
|
||||
|
@ -58,11 +58,11 @@ final class ManiphestTaskSearchEngine
|
|||
|
||||
$saved->setParameter(
|
||||
'anyProjectPHIDs',
|
||||
$request->getArr('anyProjects'));
|
||||
$this->readPHIDsFromRequest($request, 'anyProjects'));
|
||||
|
||||
$saved->setParameter(
|
||||
'excludeProjectPHIDs',
|
||||
$request->getArr('excludeProjects'));
|
||||
$this->readPHIDsFromRequest($request, 'excludeProjects'));
|
||||
|
||||
$saved->setParameter(
|
||||
'userProjectPHIDs',
|
||||
|
|
|
@ -148,7 +148,7 @@ final class PhabricatorProjectProfileController
|
|||
|
||||
$phid = $project->getPHID();
|
||||
$view_uri = urisprintf(
|
||||
'/maniphest/?statuses=%s&allProjects[]=%s#R',
|
||||
'/maniphest/?statuses=%s&allProjects=%s#R',
|
||||
implode(',', ManiphestTaskStatus::getOpenStatusConstants()),
|
||||
$phid);
|
||||
$create_uri = '/maniphest/task/create/?projects='.$phid;
|
||||
|
|
Loading…
Reference in a new issue