native wiki stuff

This commit is contained in:
zotlabs
2017-01-17 17:41:19 -08:00
parent 335d9af8dc
commit b6595a44d1
4 changed files with 39 additions and 17 deletions

View File

@@ -429,7 +429,9 @@ class Item extends \Zotlabs\Web\Controller {
$body = trim($_REQUEST['body']);
$body .= trim($_REQUEST['attachment']);
$postopts = '';
$allow_empty = ((array_key_exists('allow_empty',$_REQUEST)) ? intval($_REQUEST['allow_empty']) : 0);
$private = intval($acl->is_private() || ($public_policy));
// If this is a comment, set the permissions from the parent.
@@ -442,7 +444,7 @@ class Item extends \Zotlabs\Web\Controller {
$owner_hash = $parent_item['owner_xchan'];
}
if(! strlen($body)) {
if((! $allow_empty) && (! strlen($body))) {
if($preview)
killme();
info( t('Empty post discarded.') . EOL );