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

Fix lightbox downloads for embeded images and a warning

Summary:
I refactored this recently and accidentally dropped the download URI.

Also fix a warning with, e.g., files named `README`.

Test Plan: Clicked a thumb, clicked "Download", got a file.

Reviewers: chad, btrahan, dctrwatson

Reviewed By: chad

CC: aran

Differential Revision: https://secure.phabricator.com/D7341
This commit is contained in:
epriestley 2013-10-17 11:21:01 -07:00
parent 95c2b03fc8
commit 32dca4b553
2 changed files with 2 additions and 1 deletions

View file

@ -47,7 +47,7 @@ final class DifferentialChangesetDetailView extends AphrontView {
public function getFileIcon($filename) {
$path_info = pathinfo($filename);
$extension = $path_info['extension'];
$extension = idx($path_info, 'extension');
switch ($extension) {
case 'psd':
case 'ai':

View file

@ -103,6 +103,7 @@ final class PhabricatorRemarkupRuleEmbedFile
'meta' => array(
'phid' => $file->getPHID(),
'uri' => $file->getBestURI(),
'dUri' => $file->getDownloadURI(),
'viewable' => true,
),
),