1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-29 18:22:41 +01:00

Fix empty titles on pages without application names

Summary: Fixes T3195. Currently, we show `[] Phabricator` on the homepage with unicode glyphs off.

Test Plan:
Viewed home page and application pages with glyphs on and off. Saw:

|              | Unicode | No Unicode     |
|              | ------- | ----------     |
| Home         | Empty   | Empty          |
| ----         |         |                |
| Differential | Gear    | Differential   |
| ----         |         |                |

Reviewers: btrahan, chad

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T3195

Differential Revision: https://secure.phabricator.com/D5932
This commit is contained in:
epriestley 2013-05-15 08:38:56 -07:00
parent 571d191a90
commit a94eee694b

View file

@ -85,6 +85,7 @@ final class PhabricatorStandardPageView extends PhabricatorBarePageView {
public function getTitle() { public function getTitle() {
$use_glyph = true; $use_glyph = true;
$request = $this->getRequest(); $request = $this->getRequest();
if ($request) { if ($request) {
$user = $request->getUser(); $user = $request->getUser();
@ -94,9 +95,23 @@ final class PhabricatorStandardPageView extends PhabricatorBarePageView {
} }
} }
return ($use_glyph ? $title = parent::getTitle();
$this->getGlyph() : '['.$this->getApplicationName().']').
' '.parent::getTitle(); $prefix = null;
if ($use_glyph) {
$prefix = $this->getGlyph();
} else {
$application_name = $this->getApplicationName();
if (strlen($application_name)) {
$prefix = '['.$application_name.']';
}
}
if (strlen($prefix)) {
$title = $prefix.' '.$title;
}
return $title;
} }