1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-20 20:40:56 +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']; $profile_uri = $data['profileURI'];
if (!DarkConsoleXHProfPluginAPI::isProfilerAvailable()) { if (!DarkConsoleXHProfPluginAPI::isProfilerAvailable()) {
$href = PhabricatorEnv::getDoclink('article/Installation_Guide.html'); $href = PhabricatorEnv::getDoclink('Installation Guide');
$install_guide = phutil_tag( $install_guide = phutil_tag(
'a', 'a',
array( array(

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -107,7 +107,7 @@ Phabricator handles text encodings.
EOT EOT
, ,
PhabricatorEnv::getDoclink( 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); ->setValue($v_hosting);
$doc_href = PhabricatorEnv::getDoclink( $doc_href = PhabricatorEnv::getDoclink(
'article/Diffusion_User_Guide_Repository_Hosting.html'); 'Diffusion User Guide: Repository Hosting');
$form = id(new AphrontFormView()) $form = id(new AphrontFormView())
->setUser($user) ->setUser($user)

View file

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

View file

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

View file

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

View file

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

View file

@ -324,7 +324,7 @@ final class PhabricatorHomeMainController
require_celerity_resource('phabricator-jump-nav'); 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( $doc_link = phutil_tag(
'a', 'a',
array( array(

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -86,7 +86,7 @@ EXAMPLE;
'a', 'a',
array( array(
'href' => PhabricatorEnv::getDoclink( 'href' => PhabricatorEnv::getDoclink(
'article/User_Guide_Configuring_an_External_Editor.html'), 'User Guide: Configuring an External Editor'),
), ),
pht('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() { public function getHelpURI() {
return PhabricatorEnv::getDoclink('article/Slowvote_User_Guide.html'); return PhabricatorEnv::getDoclink('Slowvote User Guide');
} }
public function getFlavorText() { public function getFlavorText() {

View file

@ -336,8 +336,12 @@ final class PhabricatorEnv {
* *
* @task read * @task read
*/ */
public static function getDoclink($resource) { public static function getDoclink($resource, $type = 'article') {
return 'http://www.phabricator.com/docs/phabricator/'.$resource; $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( $actions['help'] = array(
'tip' => pht('Help'), 'tip' => pht('Help'),
'align' => 'right', 'align' => 'right',
'href' => PhabricatorEnv::getDoclink( 'href' => PhabricatorEnv::getDoclink('Remarkup Reference'),
'article/Remarkup_Reference.html'),
); );
$actions[] = array( $actions[] = array(