1
0
Fork 0
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:
Bob Trahan 2013-03-06 13:40:50 -08:00
parent e7d34971e0
commit a7cbcb3495

View file

@ -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))