1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-20 04:20:55 +01:00

Modernize documentation links

Summary:
  - Point them at the new Diviner.
  - Make them a little less cumbersome to write.

Test Plan: Found almost all of these links in the UI and clicked them.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Differential Revision: https://secure.phabricator.com/D8553
This commit is contained in:
epriestley 2014-03-17 15:01:31 -07:00
parent 039b8e43b9
commit 38cc38eaf6
26 changed files with 32 additions and 34 deletions

View file

@ -43,7 +43,7 @@ final class DarkConsoleXHProfPlugin extends DarkConsolePlugin {
$profile_uri = $data['profileURI'];
if (!DarkConsoleXHProfPluginAPI::isProfilerAvailable()) {
$href = PhabricatorEnv::getDoclink('article/Installation_Guide.html');
$href = PhabricatorEnv::getDoclink('Installation Guide');
$install_guide = phutil_tag(
'a',
array(

View file

@ -15,7 +15,7 @@ final class PhabricatorApplicationAudit extends PhabricatorApplication {
}
public function getHelpURI() {
return PhabricatorEnv::getDoclink('article/Audit_User_Guide.html');
return PhabricatorEnv::getDoclink('Audit User Guide');
}
public function getEventListeners() {

View file

@ -15,8 +15,7 @@ final class PhabricatorApplicationConduit extends PhabricatorApplication {
}
public function getHelpURI() {
return PhabricatorEnv::getDoclink(
'article/Conduit_Technical_Documentation.html');
return PhabricatorEnv::getDoclink('Conduit Technical Documentation');
}
public function getShortDescription() {

View file

@ -13,7 +13,7 @@ final class PhabricatorSetupCheckDaemons extends PhabricatorSetupCheck {
if (!$task_daemon) {
$doc_href = PhabricatorEnv::getDocLink(
'article/Managing_Daemons_with_phd.html');
'Managing Daemons with phd');
$summary = pht(
'You must start the Phabricator daemons to send email, rebuild '.

View file

@ -12,8 +12,7 @@ final class PhabricatorSecurityConfigOptions
}
public function getOptions() {
$support_href = PhabricatorEnv::getDoclink(
'article/feedback.html');
$support_href = PhabricatorEnv::getDoclink('Give Feedback! Get Support!');
return array(
$this->newOption('security.alternate-file-domain', 'string', null)

View file

@ -15,7 +15,7 @@ final class PhabricatorApplicationDifferential extends PhabricatorApplication {
}
public function getHelpURI() {
return PhabricatorEnv::getDoclink('article/Differential_User_Guide.html');
return PhabricatorEnv::getDoclink('Differential User Guide');
}
public function getFactObjectsForAnalysis() {

View file

@ -41,8 +41,7 @@ final class DifferentialDiffCreateController extends DifferentialController {
}
$form = new AphrontFormView();
$arcanist_href = PhabricatorEnv::getDoclink(
'article/Arcanist_User_Guide.html');
$arcanist_href = PhabricatorEnv::getDoclink('Arcanist User Guide');
$arcanist_link = phutil_tag(
'a',
array(

View file

@ -15,7 +15,7 @@ final class PhabricatorApplicationDiffusion extends PhabricatorApplication {
}
public function getHelpURI() {
return PhabricatorEnv::getDoclink('article/Diffusion_User_Guide.html');
return PhabricatorEnv::getDoclink('Diffusion User Guide');
}
public function getFactObjectsForAnalysis() {

View file

@ -107,7 +107,7 @@ Phabricator handles text encodings.
EOT
,
PhabricatorEnv::getDoclink(
'article/User_Guide_UTF-8_and_Character_Encoding.html'));
'User Guide: UTF-8 and Character Encoding'));
}
}

View file

@ -91,7 +91,7 @@ final class DiffusionRepositoryEditHostingController
->setValue($v_hosting);
$doc_href = PhabricatorEnv::getDoclink(
'article/Diffusion_User_Guide_Repository_Hosting.html');
'Diffusion User Guide: Repository Hosting');
$form = id(new AphrontFormView())
->setUser($user)

View file

@ -769,8 +769,8 @@ final class DiffusionRepositoryEditMainController
}
}
$doc_href = PhabricatorEnv::getDocLink(
'article/Managing_Daemons_with_phd.html');
$doc_href = PhabricatorEnv::getDocLink('Managing Daemons with phd');
$daemon_instructions = pht(
'Use %s to start daemons. See %s.',
phutil_tag('tt', array(), 'bin/phd start'),

View file

@ -27,7 +27,7 @@ final class DiffusionRepositoryNewController
}
$doc_href = PhabricatorEnv::getDoclink(
'article/Diffusion_User_Guide_Repository_Hosting.html');
'Diffusion User Guide: Repository Hosting');
$doc_link = phutil_tag(
'a',

View file

@ -94,7 +94,7 @@ final class PhabricatorFileUploadController extends PhabricatorFileController {
}
$doc_href = PhabricatorEnv::getDocLink(
'article/Configuring_File_Upload_Limits.html');
'Configuring File Upload Limits');
$doc_link = phutil_tag(
'a',
array(

View file

@ -19,7 +19,7 @@ final class PhabricatorApplicationHerald extends PhabricatorApplication {
}
public function getHelpURI() {
return PhabricatorEnv::getDoclink('article/Herald_User_Guide.html');
return PhabricatorEnv::getDoclink('Herald User Guide');
}
public function getFlavorText() {

View file

@ -324,7 +324,7 @@ final class PhabricatorHomeMainController
require_celerity_resource('phabricator-jump-nav');
$doc_href = PhabricatorEnv::getDocLink('article/Jump_Nav_User_Guide.html');
$doc_href = PhabricatorEnv::getDocLink('Jump Nav User Guide');
$doc_link = phutil_tag(
'a',
array(

View file

@ -47,7 +47,7 @@ extends PhabricatorOAuthClientAuthorizationBaseController {
$updated = phabricator_datetime($authorization->getDateModified(),
$current_user);
$scope_doc_href = PhabricatorEnv::getDoclink(
'article/Using_the_Phabricator_OAuth_Server.html#scopes');
'Using the Phabricator OAuth Server');
$row = array(
phutil_tag(
'a',

View file

@ -19,7 +19,7 @@ final class PhabricatorApplicationOwners extends PhabricatorApplication {
}
public function getHelpURI() {
return PhabricatorEnv::getDoclink('article/Owners_Tool_User_Guide.html');
return PhabricatorEnv::getDoclink('Owners Tool User Guide');
}
public function getFlavorText() {

View file

@ -19,7 +19,7 @@ final class PhabricatorApplicationPhame extends PhabricatorApplication {
}
public function getHelpURI() {
return PhabricatorEnv::getDoclink('article/Phame_User_Guide.html');
return PhabricatorEnv::getDoclink('Phame User Guide');
}
public function getApplicationGroup() {

View file

@ -96,8 +96,7 @@ final class PholioInlineCommentEditView extends AphrontView {
$formatting = phutil_tag(
'a',
array(
'href' => PhabricatorEnv::getDoclink(
'article/Remarkup_Reference.html'),
'href' => PhabricatorEnv::getDoclink('Remarkup Reference'),
'tabindex' => '-1',
'target' => '_blank',
),

View file

@ -84,8 +84,7 @@ final class PholioInlineCommentSaveView extends AphrontView {
$formatting = phutil_tag(
'a',
array(
'href' => PhabricatorEnv::getDoclink(
'article/Remarkup_Reference.html'),
'href' => PhabricatorEnv::getDoclink('Remarkup Reference'),
'tabindex' => '-1',
'target' => '_blank',
),

View file

@ -15,7 +15,7 @@ final class PhabricatorApplicationPhriction extends PhabricatorApplication {
}
public function getHelpURI() {
return PhabricatorEnv::getDoclink('article/Phriction_User_Guide.html');
return PhabricatorEnv::getDoclink('Phriction User Guide');
}
public function getTitleGlyph() {

View file

@ -4,7 +4,7 @@ final class PhabricatorJumpNavHandler {
public static function getJumpResponse(PhabricatorUser $viewer, $jump) {
$jump = trim($jump);
$help_href = PhabricatorEnv::getDocLink('article/Jump_Nav_User_Guide.html');
$help_href = PhabricatorEnv::getDocLink('Jump Nav User Guide');
$patterns = array(
'/^help/i' => 'uri:'.$help_href,

View file

@ -86,7 +86,7 @@ EXAMPLE;
'a',
array(
'href' => PhabricatorEnv::getDoclink(
'article/User_Guide_Configuring_an_External_Editor.html'),
'User Guide: Configuring an External Editor'),
),
pht('User Guide: Configuring an External Editor'));

View file

@ -19,7 +19,7 @@ final class PhabricatorApplicationSlowvote extends PhabricatorApplication {
}
public function getHelpURI() {
return PhabricatorEnv::getDoclink('article/Slowvote_User_Guide.html');
return PhabricatorEnv::getDoclink('Slowvote User Guide');
}
public function getFlavorText() {

View file

@ -336,8 +336,12 @@ final class PhabricatorEnv {
*
* @task read
*/
public static function getDoclink($resource) {
return 'http://www.phabricator.com/docs/phabricator/'.$resource;
public static function getDoclink($resource, $type = 'article') {
$uri = new PhutilURI('https://secure.phabricator.com/diviner/find/');
$uri->setQueryParam('name', $resource);
$uri->setQueryParam('type', $type);
$uri->setQueryParam('jump', true);
return (string)$uri;
}

View file

@ -87,8 +87,7 @@ final class PhabricatorRemarkupControl extends AphrontFormTextAreaControl {
$actions['help'] = array(
'tip' => pht('Help'),
'align' => 'right',
'href' => PhabricatorEnv::getDoclink(
'article/Remarkup_Reference.html'),
'href' => PhabricatorEnv::getDoclink('Remarkup Reference'),
);
$actions[] = array(