Page MenuHomePhabricator

D12301.id29531.diff
No OneTemporary

D12301.id29531.diff

diff --git a/src/applications/config/check/PhabricatorExtraConfigSetupCheck.php b/src/applications/config/check/PhabricatorExtraConfigSetupCheck.php
--- a/src/applications/config/check/PhabricatorExtraConfigSetupCheck.php
+++ b/src/applications/config/check/PhabricatorExtraConfigSetupCheck.php
@@ -167,6 +167,10 @@
$reply_handler_reason = pht(
'Reply handlers can no longer be overridden with configuration.');
+ $monospace_reason = pht(
+ 'Phabricator no longer supports global customization of monospaced '.
+ 'fonts.');
+
$ancient_config += array(
'phid.external-loaders' =>
pht(
@@ -245,6 +249,9 @@
'metamta.precedence-bulk' => pht(
'Phabricator now always sends transaction mail with '.
'"Precedence: bulk" to improve deliverability.'),
+
+ 'style.monospace' => $monospace_reason,
+ 'style.monospace.windows' => $monospace_reason,
);
return $ancient_config;
diff --git a/src/applications/config/option/PhabricatorSyntaxHighlightingConfigOptions.php b/src/applications/config/option/PhabricatorSyntaxHighlightingConfigOptions.php
--- a/src/applications/config/option/PhabricatorSyntaxHighlightingConfigOptions.php
+++ b/src/applications/config/option/PhabricatorSyntaxHighlightingConfigOptions.php
@@ -137,28 +137,6 @@
pht(
"Treat all '*.x.bak' file as '.x'. NOTE: We map to capturing group ".
"1 by specifying the mapping as '1'")),
- $this->newOption(
- 'style.monospace',
- 'string',
- null)
- ->setLocked(true)
- ->setSummary(
- pht('Default monospace font.'))
- ->setDescription(
- pht(
- "Set the default monospaced font style for users who haven't set ".
- "a custom style.")),
- $this->newOption(
- 'style.monospace.windows',
- 'string',
- null)
- ->setLocked(true)
- ->setSummary(
- pht('Default monospace font for clients on Windows.'))
- ->setDescription(
- pht(
- "Set the default monospaced font style for users who haven't set ".
- "a custom style and are using Windows.")),
);
}
diff --git a/src/applications/settings/panel/PhabricatorDisplayPreferencesSettingsPanel.php b/src/applications/settings/panel/PhabricatorDisplayPreferencesSettingsPanel.php
--- a/src/applications/settings/panel/PhabricatorDisplayPreferencesSettingsPanel.php
+++ b/src/applications/settings/panel/PhabricatorDisplayPreferencesSettingsPanel.php
@@ -90,8 +90,6 @@
),
pht('User Guide: Configuring an External Editor'));
- $font_default = PhabricatorEnv::getEnvConfig('style.monospace');
-
$pref_monospaced_textareas_value = $preferences
->getPreference($pref_monospaced_textareas);
if (!$pref_monospaced_textareas_value) {
@@ -139,12 +137,8 @@
id(new AphrontFormTextControl())
->setLabel(pht('Monospaced Font'))
->setName($pref_monospaced)
- // Check plz
- ->setCaption(hsprintf(
- '%s<br />(%s: %s)',
- pht('Overrides default fonts in tools like Differential.'),
- pht('Default'),
- $font_default))
+ ->setCaption(
+ pht('Overrides default fonts in tools like Differential.'))
->setValue($preferences->getPreference($pref_monospaced)))
->appendChild(
id(new AphrontFormMarkupControl())
diff --git a/src/view/page/PhabricatorStandardPageView.php b/src/view/page/PhabricatorStandardPageView.php
--- a/src/view/page/PhabricatorStandardPageView.php
+++ b/src/view/page/PhabricatorStandardPageView.php
@@ -280,17 +280,14 @@
protected function getHead() {
- $monospaced = PhabricatorEnv::getEnvConfig('style.monospace');
- $monospaced_win = PhabricatorEnv::getEnvConfig('style.monospace.windows');
+ $monospaced = null;
$request = $this->getRequest();
if ($request) {
$user = $request->getUser();
if ($user) {
- $pref = $user->loadPreferences()->getPreference(
+ $monospaced = $user->loadPreferences()->getPreference(
PhabricatorUserPreferences::PREFERENCE_MONOSPACED);
- $monospaced = nonempty($pref, $monospaced);
- $monospaced_win = nonempty($pref, $monospaced_win);
}
}
@@ -306,21 +303,10 @@
'</style>', $monospaced);
}
- $font_css_win = null;
- if (!empty($monospaced_win)) {
- $font_css_win = hsprintf(
- '<style type="text/css">'.
- '.platform-windows .PhabricatorMonospaced, '.
- '.platform-windows .phabricator-remarkup '.
- '.remarkup-code-block .remarkup-code { font: %s !important; }'.
- '</style>', $monospaced_win);
- }
-
return hsprintf(
- '%s%s%s%s',
+ '%s%s%s',
parent::getHead(),
$font_css,
- $font_css_win,
$response->renderSingleResource('javelin-magical-init', 'phabricator'));
}

File Metadata

Mime Type
text/plain
Expires
Sun, Mar 16, 1:11 AM (3 w, 4 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7598666
Default Alt Text
D12301.id29531.diff (4 KB)

Event Timeline