mirror of
https://codeberg.org/streams/streams.git
synced 2024-09-20 00:55:19 +00:00
allow checkins with no post body if they have location info
This commit is contained in:
parent
2b63670eda
commit
990f04bdcc
4 changed files with 13 additions and 18 deletions
|
@ -3,10 +3,7 @@
|
|||
namespace Code\Lib;
|
||||
|
||||
use App;
|
||||
use Code\Lib\Libzot;
|
||||
use Code\Lib\Webfinger;
|
||||
use Code\Lib\Zotfinger;
|
||||
use Code\Lib\Channel;
|
||||
|
||||
use Code\Extend\Hook;
|
||||
use Code\Render\Theme;
|
||||
|
||||
|
@ -89,12 +86,12 @@ class Libzotdir
|
|||
$o = replace_macros(Theme::get_template('dir_sort_links.tpl'), [
|
||||
'$header' => t('Directory Options'),
|
||||
'$forumsurl' => $forumsurl,
|
||||
'$safemode' => array('safemode', t('Safe Mode'), $safe_mode, '', array(t('No'), t('Yes')), ' onchange=\'window.location.href="' . $forumsurl . '&safe="+(this.checked ? 1 : 0)\''),
|
||||
'$pubforums' => array('pubforums', t('Groups Only'), (($pubforums == 1) ? true : false), '', array(t('No'), t('Yes')), ' onchange=\'window.location.href="' . $forumsurl . '&type="+(this.checked ? 1 : 0)\''),
|
||||
'$safemode' => ['safemode', t('Safe Mode'), $safe_mode, '', [t('No'), t('Yes')], ' onchange=\'window.location.href="' . $forumsurl . '&safe="+(this.checked ? 1 : 0)\''],
|
||||
'$pubforums' => ['pubforums', t('Groups Only'), (($pubforums == 1) ? true : false), '', [t('No'), t('Yes')], ' onchange=\'window.location.href="' . $forumsurl . '&type="+(this.checked ? 1 : 0)\''],
|
||||
// '$collections' => array('collections', t('Collections Only'),(($pubforums == 2) ? true : false),'',array(t('No'), t('Yes')),' onchange=\'window.location.href="' . $forumsurl . '&type="+(this.checked ? 2 : 0)\''),
|
||||
'$hide_local' => $hide_local,
|
||||
'$globaldir' => array('globaldir', t('This Website Only'), 1 - intval($globaldir), '', array(t('No'), t('Yes')), ' onchange=\'window.location.href="' . $forumsurl . '&global="+(this.checked ? 0 : 1)\''),
|
||||
'$activedir' => array('activedir', t('Recently Updated'), intval($activedir), '', array(t('No'), t('Yes')), ' onchange=\'window.location.href="' . $forumsurl . '&active="+(this.checked ? 1 : 0)\''),
|
||||
'$globaldir' => ['globaldir', t('This Website Only'), 1 - intval($globaldir), '', [t('No'), t('Yes')], ' onchange=\'window.location.href="' . $forumsurl . '&global="+(this.checked ? 0 : 1)\''],
|
||||
'$activedir' => ['activedir', t('Recently Updated'), intval($activedir), '', [t('No'), t('Yes')], ' onchange=\'window.location.href="' . $forumsurl . '&active="+(this.checked ? 1 : 0)\''],
|
||||
'$covers' => (Config::Get('system','remote_cover_photos')) ? [ 'covers', t('Show cover photos'), intval($covers), t('May slow page loading'), [ t('No'), t('Yes')], ' onchange=\'window.location.href="' . $forumsurl . '&covers="+(this.checked ? 1 : 0)\''] : '',
|
||||
]);
|
||||
|
||||
|
|
|
@ -882,9 +882,8 @@ class Item extends Controller
|
|||
$body = ((isset($_REQUEST['body'])) ? trim($_REQUEST['body']) : EMPTY_STR);
|
||||
$body .= ((isset($_REQUEST['attachment'])) ? trim($_REQUEST['attachment']) : EMPTY_STR);
|
||||
$postopts = '';
|
||||
|
||||
$allow_empty = ((array_key_exists('allow_empty', $_REQUEST)) ? intval($_REQUEST['allow_empty']) : 0);
|
||||
|
||||
$haslocation = $lat || $lon;
|
||||
$allow_empty = (($checkin && $haslocation) || $_REQUEST['allow_empty']);
|
||||
$private = ((isset($private) && $private) ? $private : intval($acl->is_private() || ($public_policy)));
|
||||
|
||||
// If this is a comment, set the permissions from the parent.
|
||||
|
|
|
@ -131,7 +131,6 @@
|
|||
<button type="button" id="profile-poll-wrapper" class="btn btn-outline-secondary btn-sm" title="{{$poll}}" onclick="initPoll();">
|
||||
<i id="profile-poll" class="fa fa-bar-chart jot-icons"></i>
|
||||
</button>
|
||||
|
||||
</div>
|
||||
<div class="btn-group mr-2 d-none d-lg-flex">
|
||||
{{if $setloc}}
|
||||
|
@ -144,6 +143,11 @@
|
|||
<i id="profile-nolocation" class="fa fa-circle-o jot-icons"></i>
|
||||
</button>
|
||||
{{/if}}
|
||||
{{if $feature_checkin}}
|
||||
<button id="profile-checkin-wrapper" class="btn btn-outline-secondary btn-sm" title="{{$checkin}}" onclick="jotCheckin(); return false;">
|
||||
<i id="profile-checkin" class="fa fa-map-marker jot-icons"></i>
|
||||
</button>
|
||||
{{/if}}
|
||||
{{else}}
|
||||
<div class="btn-group d-none d-lg-flex">
|
||||
{{/if}}
|
||||
|
@ -169,11 +173,6 @@
|
|||
<i id="profile-encrypt" class="fa fa-key jot-icons"></i>
|
||||
</button>
|
||||
{{/if}}
|
||||
{{if $feature_checkin}}
|
||||
<button id="profile-checkin-wrapper" class="btn btn-outline-secondary btn-sm" title="{{$checkin}}" onclick="jotCheckin(); return false;">
|
||||
<i id="profile-checkin" class="fa fa-map-marker jot-icons"></i>
|
||||
</button>
|
||||
{{/if}}
|
||||
|
||||
</div>
|
||||
{{if $writefiles || $weblink || $setloc || $clearloc || $feature_expire || $feature_encrypt }}
|
||||
|
|
Loading…
Reference in a new issue