Skip to content

Commit 4acb7f6

Browse files
author
Chad Little
committed
Drop domain key on PhameBlog
Summary: Right now you can't create two blogs without a domain name, since it has a unique key on the column. Removing the key. Test Plan: Create two blogs with no domain name, works as expected. Create two blogs with `cat.dog` as domain name, get duplicate domain error. Reviewers: epriestley Reviewed By: epriestley Subscribers: Korvin Maniphest Tasks: T9360 Differential Revision: https://secure.phabricator.com/D14915
1 parent 14ae3c0 commit 4acb7f6

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/applications/phame/editor/PhameBlogEditor.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,14 @@ protected function getCustomTransactionNewValue(
4747
switch ($xaction->getTransactionType()) {
4848
case PhameBlogTransaction::TYPE_NAME:
4949
case PhameBlogTransaction::TYPE_DESCRIPTION:
50-
case PhameBlogTransaction::TYPE_DOMAIN:
5150
case PhameBlogTransaction::TYPE_STATUS:
5251
return $xaction->getNewValue();
52+
case PhameBlogTransaction::TYPE_DOMAIN:
53+
$domain = $xaction->getNewValue();
54+
if (!strlen($xaction->getNewValue())) {
55+
return null;
56+
}
57+
return $domain;
5358
}
5459
}
5560

0 commit comments

Comments
 (0)