mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-10 00:42:41 +01:00
re-use files if you forget to name a mock
Summary: good title Test Plan: made a mock with no title and the files i had attached showed up again correctly. named the mock and it worked! Reviewers: epriestley, chad Reviewed By: chad CC: aran, Korvin Maniphest Tasks: T2642 Differential Revision: https://secure.phabricator.com/D5261
This commit is contained in:
parent
e7d34971e0
commit
a7cbcb3495
1 changed files with 2 additions and 1 deletions
|
@ -53,6 +53,7 @@ final class PholioMockEditController extends PholioController {
|
|||
$v_view = $mock->getViewPolicy();
|
||||
$v_cc = PhabricatorSubscribersQuery::loadSubscribersForPHID(
|
||||
$mock->getPHID());
|
||||
$files = array();
|
||||
|
||||
if ($request->isFormPost()) {
|
||||
$xactions = array();
|
||||
|
@ -81,7 +82,6 @@ final class PholioMockEditController extends PholioController {
|
|||
if ($is_new) {
|
||||
// TODO: Make this transactional and allow edits?
|
||||
|
||||
$files = array();
|
||||
|
||||
$file_phids = $request->getArr('file_phids');
|
||||
if ($file_phids) {
|
||||
|
@ -193,6 +193,7 @@ final class PholioMockEditController extends PholioController {
|
|||
->setUser($user))
|
||||
->appendChild(
|
||||
id(new AphrontFormDragAndDropUploadControl($request))
|
||||
->setValue($files)
|
||||
->setName('file_phids')
|
||||
->setLabel(pht('Images'))
|
||||
->setError($e_images))
|
||||
|
|
Loading…
Reference in a new issue