Don't reset message if missing Room Title in New Conpherence Room
Summary: Fixes T9000, sets a variable. Test Plan: Try to make a new room without a title, but with a message. Reviewers: epriestley Reviewed By: epriestley Subscribers: epriestley, Korvin Maniphest Tasks: T9000 Differential Revision: https://secure.phabricator.com/D13754
This commit is contained in:
@@ -7,6 +7,7 @@ final class ConpherenceNewRoomController extends ConpherenceController {
|
|||||||
|
|
||||||
$title = pht('New Room');
|
$title = pht('New Room');
|
||||||
$e_title = true;
|
$e_title = true;
|
||||||
|
$v_message = null;
|
||||||
$validation_exception = null;
|
$validation_exception = null;
|
||||||
|
|
||||||
$conpherence = ConpherenceThread::initializeNewRoom($user);
|
$conpherence = ConpherenceThread::initializeNewRoom($user);
|
||||||
@@ -35,12 +36,12 @@ final class ConpherenceNewRoomController extends ConpherenceController {
|
|||||||
->setTransactionType(PhabricatorTransactions::TYPE_JOIN_POLICY)
|
->setTransactionType(PhabricatorTransactions::TYPE_JOIN_POLICY)
|
||||||
->setNewValue($request->getStr('joinPolicy'));
|
->setNewValue($request->getStr('joinPolicy'));
|
||||||
|
|
||||||
$message = $request->getStr('message');
|
$v_message = $request->getStr('message');
|
||||||
if ($message) {
|
if (strlen($v_message)) {
|
||||||
$message_xactions = $editor->generateTransactionsFromText(
|
$message_xactions = $editor->generateTransactionsFromText(
|
||||||
$user,
|
$user,
|
||||||
$conpherence,
|
$conpherence,
|
||||||
$message);
|
$v_message);
|
||||||
$xactions = array_merge($xactions, $message_xactions);
|
$xactions = array_merge($xactions, $message_xactions);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -121,7 +122,8 @@ final class ConpherenceNewRoomController extends ConpherenceController {
|
|||||||
id(new PhabricatorRemarkupControl())
|
id(new PhabricatorRemarkupControl())
|
||||||
->setUser($user)
|
->setUser($user)
|
||||||
->setName('message')
|
->setName('message')
|
||||||
->setLabel(pht('First Message')));
|
->setLabel(pht('First Message'))
|
||||||
|
->setValue($v_message));
|
||||||
|
|
||||||
$dialog->appendChild($form);
|
$dialog->appendChild($form);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user