diff --git a/src/applications/conpherence/controller/ConpherenceUpdateController.php b/src/applications/conpherence/controller/ConpherenceUpdateController.php index ad3bf86fa1..b9b7131be3 100644 --- a/src/applications/conpherence/controller/ConpherenceUpdateController.php +++ b/src/applications/conpherence/controller/ConpherenceUpdateController.php @@ -64,6 +64,7 @@ final class ConpherenceUpdateController extends $top = $request->getInt('image_y'); $left = $request->getInt('image_x'); $file_id = $request->getInt('file_id'); + $title = $request->getStr('title'); if ($file_id) { $orig_file = id(new PhabricatorFileQuery()) ->setViewer($user) @@ -101,6 +102,8 @@ final class ConpherenceUpdateController extends pht('This server only supports these image formats: %s.', implode(', ', $supported_formats)); } + // use the existing title in this image upload case + $title = $conpherence->getTitle(); } else if ($top !== null || $left !== null) { $file = $conpherence->getImage(ConpherenceImageData::SIZE_ORIG); $xformer = new PhabricatorImageTransformer(); @@ -119,7 +122,6 @@ final class ConpherenceUpdateController extends ) ->setNewValue($image_phid); } - $title = $request->getStr('title'); if ($title != $conpherence->getTitle()) { $xactions[] = id(new ConpherenceTransaction()) ->setTransactionType(ConpherenceTransactionType::TYPE_TITLE) diff --git a/src/applications/conpherence/storage/ConpherenceTransaction.php b/src/applications/conpherence/storage/ConpherenceTransaction.php index 22a4aa666e..64afcf9157 100644 --- a/src/applications/conpherence/storage/ConpherenceTransaction.php +++ b/src/applications/conpherence/storage/ConpherenceTransaction.php @@ -46,12 +46,17 @@ final class ConpherenceTransaction extends PhabricatorApplicationTransaction { switch ($this->getTransactionType()) { case ConpherenceTransactionType::TYPE_TITLE: - if ($old) { + if ($old && $new) { $title = pht( '%s renamed this conpherence from "%s" to "%s".', $this->renderHandleLink($author_phid), phutil_escape_html($old), phutil_escape_html($new)); + } else if ($old) { + $title = pht( + '%s deleted the conpherence name "%s".', + $this->renderHandleLink($author_phid), + phutil_escape_html($old)); } else { $title = pht( '%s named this conpherence "%s".',