diff options
-rw-r--r-- | Zotlabs/Module/Events.php | 13 | ||||
-rw-r--r-- | Zotlabs/Module/Profiles.php | 2 | ||||
-rw-r--r-- | include/bb2diaspora.php | 2 | ||||
-rw-r--r-- | include/import.php | 2 | ||||
-rw-r--r-- | include/message.php | 2 | ||||
-rwxr-xr-x | view/tpl/event_form.tpl | 2 | ||||
-rwxr-xr-x | view/tpl/event_head.tpl | 11 |
7 files changed, 13 insertions, 21 deletions
diff --git a/Zotlabs/Module/Events.php b/Zotlabs/Module/Events.php index a5cc868be..26455cf8e 100644 --- a/Zotlabs/Module/Events.php +++ b/Zotlabs/Module/Events.php @@ -440,8 +440,6 @@ class Events extends \Zotlabs\Web\Controller { $permissions = ((x($orig_event)) ? $orig_event : $perm_defaults); - //print_r(acl2json($permissions['allow_gid'])); killme(); - $tpl = get_markup_template('event_form.tpl'); $form = replace_macros($tpl,array( @@ -469,9 +467,6 @@ class Events extends \Zotlabs\Web\Controller { '$l_text' => (($event_id) ? t('Edit Location') : t('Location')), '$l_orig' => $l_orig, '$t_orig' => $t_orig, - '$sh_text' => t('Share this event'), - '$sh_checked' => $sh_checked, - '$share' => array('distr', t('Share this event'), $sh_checked, '', array(t('No'),t('Yes'))), '$preview' => t('Preview'), '$perms_label' => t('Permission settings'), // populating the acl dialog was a permission description from view_stream because Cal.php, which @@ -483,6 +478,8 @@ class Events extends \Zotlabs\Web\Controller { '$deny_cid' => acl2json($permissions['deny_cid']), '$deny_gid' => acl2json($permissions['deny_gid']), + '$lockstate' => (($acl->is_private()) ? 'lock' : 'unlock'), + '$submit' => t('Submit'), '$advanced' => t('Advanced Options') @@ -611,6 +608,12 @@ class Events extends \Zotlabs\Web\Controller { $end = null; } else { $end = (($rr['adjust']) ? datetime_convert('UTC',date_default_timezone_get(),$rr['dtend'], 'c') : datetime_convert('UTC','UTC',$rr['dtend'],'c')); + + // give a fake end to birthdays so they get crammed into a + // single day on the calendar + + if($rr['etype'] === 'birthday') + $end = null; } diff --git a/Zotlabs/Module/Profiles.php b/Zotlabs/Module/Profiles.php index 127304f92..19a642a83 100644 --- a/Zotlabs/Module/Profiles.php +++ b/Zotlabs/Module/Profiles.php @@ -31,7 +31,7 @@ class Profiles extends \Zotlabs\Web\Controller { // move every contact using this profile as their default to the user default - $r = q("UPDATE abook SET abook_profile = (SELECT profile_guid AS FROM profile WHERE is_default = 1 AND uid = %d LIMIT 1) WHERE abook_profile = '%s' AND abook_channel = %d ", + $r = q("UPDATE abook SET abook_profile = (SELECT profile_guid FROM profile WHERE is_default = 1 AND uid = %d LIMIT 1) WHERE abook_profile = '%s' AND abook_channel = %d ", intval(local_channel()), dbesc($profile_guid), intval(local_channel()) diff --git a/include/bb2diaspora.php b/include/bb2diaspora.php index 14d5b4eef..514b2b339 100644 --- a/include/bb2diaspora.php +++ b/include/bb2diaspora.php @@ -321,7 +321,7 @@ function bb2diaspora_itemwallwall(&$item,$uplink = false) { } -function bb2diaspora_itembody($item, $force_update = false, $have_channel = false, $uplink) { +function bb2diaspora_itembody($item, $force_update = false, $have_channel = false, $uplink = false) { if(! get_iconfig($item,'diaspora','fields')) { diff --git a/include/import.php b/include/import.php index d5f6e5c8a..49cdb2574 100644 --- a/include/import.php +++ b/include/import.php @@ -860,7 +860,7 @@ function import_conv($channel,$convs) { if($channel && $convs) { foreach($convs as $conv) { if($conv['deleted']) { - q("delete from conv where guid = '%s' and uid = %d limit 1", + q("delete from conv where guid = '%s' and uid = %d", dbesc($conv['guid']), intval($channel['channel_id']) ); diff --git a/include/message.php b/include/message.php index 25986092d..f5821490d 100644 --- a/include/message.php +++ b/include/message.php @@ -436,7 +436,7 @@ function private_messages_drop($channel_id, $messageitem_id, $drop_conversation intval($channel_id) ); if($z) { - q("delete from conv where guid = '%s' and uid = %d limit 1", + q("delete from conv where guid = '%s' and uid = %d", dbesc($x[0]['conv_guid']), intval($channel_id) ); diff --git a/view/tpl/event_form.tpl b/view/tpl/event_form.tpl index 0f37d8287..2c1fc762c 100755 --- a/view/tpl/event_form.tpl +++ b/view/tpl/event_form.tpl @@ -111,7 +111,7 @@ <div class="btn-group pull-right"> <button id="event-edit-preview-btn" class="btn btn-default" type="button" title="{{$preview}}" onclick="doEventPreview();"><i class="fa fa-eye" ></i></button> {{if ! $eid}} - <button id="dbtn-acl" class="btn btn-default" type="button" data-toggle="modal" data-target="#aclModal" title="{{$perms_label}}"><i id="jot-perms-icon" class="fa"></i></button> + <button id="dbtn-acl" class="btn btn-default" type="button" data-toggle="modal" data-target="#aclModal" title="{{$perms_label}}"><i id="jot-perms-icon" class="fa fa-{{$lockstate}}"></i></button> {{/if}} <button id="event-submit" class="btn btn-primary" type="submit" name="submit">{{$submit}}</button> </div> diff --git a/view/tpl/event_head.tpl b/view/tpl/event_head.tpl index 646c68564..1d1b6f15b 100755 --- a/view/tpl/event_head.tpl +++ b/view/tpl/event_head.tpl @@ -153,17 +153,6 @@ } }); - // ACL - $('#id_distr').change(function() { - - if ($('#id_distr').is(':checked')) { - $('#dbtn-acl').show(); - } - else { - $('#dbtn-acl').hide(); - } - }).trigger('change'); - }); </script> |