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;
|
$posttype = $a->argv[1] ?? Item::PT_ARTICLE;
|
||||||
if (!in_array($posttype, [Item::PT_ARTICLE, Item::PT_PERSONAL_NOTE])) {
|
if (!in_array($posttype, [Item::PT_ARTICLE, Item::PT_PERSONAL_NOTE])) {
|
||||||
switch ($posttype) {
|
switch ($posttype) {
|
||||||
case 'note': $posttype = Item::PT_PERSONAL_NOTE; break;
|
case 'note':
|
||||||
default: $posttype = Item::PT_ARTICLE; break;
|
$posttype = Item::PT_PERSONAL_NOTE;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
$posttype = Item::PT_ARTICLE;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue