mirror of
https://we.phorge.it/source/phorge.git
synced 2025-03-09 10:54:48 +01:00
Don't fatal with inaccessible database
Test Plan: Disable `mysql_connect()`. Reviewers: epriestley Reviewed By: epriestley CC: aran Differential Revision: https://secure.phabricator.com/D2137
This commit is contained in:
parent
58d0ee2de0
commit
7507981f22
1 changed files with 8 additions and 6 deletions
|
@ -563,14 +563,16 @@ class AphrontDefaultApplicationConfiguration
|
||||||
|
|
||||||
if ($file) {
|
if ($file) {
|
||||||
if (isset($callsigns[$lib])) {
|
if (isset($callsigns[$lib])) {
|
||||||
$attrs = array(
|
$attrs = array('title' => $file);
|
||||||
'href' => $user->loadEditorLink(
|
try {
|
||||||
|
$attrs['href'] = $user->loadEditorLink(
|
||||||
'/src/'.$relative,
|
'/src/'.$relative,
|
||||||
$part['line'],
|
$part['line'],
|
||||||
$callsigns[$lib]),
|
$callsigns[$lib]);
|
||||||
'title' => $file,
|
} catch (Exception $ex) {
|
||||||
);
|
// The database can be inaccessible.
|
||||||
if (!$attrs['href']) {
|
}
|
||||||
|
if (empty($attrs['href'])) {
|
||||||
$attrs['href'] = sprintf($path, $callsigns[$lib]).
|
$attrs['href'] = sprintf($path, $callsigns[$lib]).
|
||||||
str_replace(DIRECTORY_SEPARATOR, '/', $relative).
|
str_replace(DIRECTORY_SEPARATOR, '/', $relative).
|
||||||
'$'.$part['line'];
|
'$'.$part['line'];
|
||||||
|
|
Loading…
Add table
Reference in a new issue