mirror of
https://github.com/friendica/friendica
synced 2024-11-19 15:03:40 +00:00
Develop one-liner in Item\Compose
This commit is contained in:
parent
361958ad04
commit
cb38fe4e72
1 changed files with 6 additions and 2 deletions
|
@ -47,8 +47,12 @@ class Compose extends BaseModule
|
|||
$posttype = $a->argv[1] ?? Item::PT_ARTICLE;
|
||||
if (!in_array($posttype, [Item::PT_ARTICLE, Item::PT_PERSONAL_NOTE])) {
|
||||
switch ($posttype) {
|
||||
case 'note': $posttype = Item::PT_PERSONAL_NOTE; break;
|
||||
default: $posttype = Item::PT_ARTICLE; break;
|
||||
case 'note':
|
||||
$posttype = Item::PT_PERSONAL_NOTE;
|
||||
break;
|
||||
default:
|
||||
$posttype = Item::PT_ARTICLE;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue