reverse file activity logic
This commit is contained in:
parent
e64de798b5
commit
7c8b9397ae
@ -985,7 +985,7 @@ function pipe_streams($in, $out) {
|
|||||||
* @param string $verb
|
* @param string $verb
|
||||||
* @param boolean $no_activity
|
* @param boolean $no_activity
|
||||||
*/
|
*/
|
||||||
function file_activity($channel_id, $object, $allow_cid, $allow_gid, $deny_cid, $deny_gid, $verb, $no_activity) {
|
function file_activity($channel_id, $object, $allow_cid, $allow_gid, $deny_cid, $deny_gid, $verb, $notify) {
|
||||||
|
|
||||||
require_once('include/items.php');
|
require_once('include/items.php');
|
||||||
|
|
||||||
@ -1107,7 +1107,7 @@ function file_activity($channel_id, $object, $allow_cid, $allow_gid, $deny_cid,
|
|||||||
//notice( t('File activity updated') . EOL);
|
//notice( t('File activity updated') . EOL);
|
||||||
}
|
}
|
||||||
|
|
||||||
if($no_activity) {
|
if(! $notify) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -21,7 +21,7 @@ function filestorage_post(&$a) {
|
|||||||
|
|
||||||
$recurse = ((x($_POST, 'recurse')) ? intval($_POST['recurse']) : 0);
|
$recurse = ((x($_POST, 'recurse')) ? intval($_POST['recurse']) : 0);
|
||||||
$resource = ((x($_POST, 'filehash')) ? notags($_POST['filehash']) : '');
|
$resource = ((x($_POST, 'filehash')) ? notags($_POST['filehash']) : '');
|
||||||
$no_activity = ((x($_POST, 'no_activity')) ? intval($_POST['no_activity']) : 0);
|
$notify = ((x($_POST, 'notify')) ? intval($_POST['notify']) : 0);
|
||||||
|
|
||||||
if(! $resource) {
|
if(! $resource) {
|
||||||
notice(t('Item not found.') . EOL);
|
notice(t('Item not found.') . EOL);
|
||||||
@ -41,7 +41,7 @@ function filestorage_post(&$a) {
|
|||||||
|
|
||||||
attach_change_permissions($channel_id, $resource, $str_contact_allow, $str_group_allow, $str_contact_deny, $str_group_deny, $recurse);
|
attach_change_permissions($channel_id, $resource, $str_contact_allow, $str_group_allow, $str_contact_deny, $str_group_deny, $recurse);
|
||||||
|
|
||||||
file_activity($channel_id, $object, $str_contact_allow, $str_group_allow, $str_contact_deny, $str_group_deny, 'post', $no_activity);
|
file_activity($channel_id, $object, $str_contact_allow, $str_group_allow, $str_contact_deny, $str_group_deny, 'post', $notify);
|
||||||
|
|
||||||
goaway($cloudPath);
|
goaway($cloudPath);
|
||||||
}
|
}
|
||||||
@ -148,7 +148,7 @@ function filestorage_content(&$a) {
|
|||||||
'$aclselect' => $aclselect_e,
|
'$aclselect' => $aclselect_e,
|
||||||
'$lockstate' => $lockstate,
|
'$lockstate' => $lockstate,
|
||||||
'$permset' => t('Set/edit permissions'),
|
'$permset' => t('Set/edit permissions'),
|
||||||
'$recurse' => t('Include all files and sub folders'),
|
'$recurse' => array('recurse', t('Include all files and sub folders'), 0, '', array(t('No'), t('Yes'))),
|
||||||
'$backlink' => t('Return to file list'),
|
'$backlink' => t('Return to file list'),
|
||||||
'$isadir' => $is_a_dir,
|
'$isadir' => $is_a_dir,
|
||||||
'$cpdesc' => t('Copy/paste this code to attach file to a post'),
|
'$cpdesc' => t('Copy/paste this code to attach file to a post'),
|
||||||
@ -156,7 +156,7 @@ function filestorage_content(&$a) {
|
|||||||
'$submit' => t('Submit'),
|
'$submit' => t('Submit'),
|
||||||
'$attach_btn_title' => t('Attach this file to a new post'),
|
'$attach_btn_title' => t('Attach this file to a new post'),
|
||||||
'$link_btn_title' => t('Show URL to this file'),
|
'$link_btn_title' => t('Show URL to this file'),
|
||||||
'$activity_btn_title' => t('Do not show in shared with me folder of your connections')
|
'$notify' => array('notify', t('Notify your contacts about this file'), 0, '', array(t('No'), t('Yes')))
|
||||||
));
|
));
|
||||||
|
|
||||||
echo $o;
|
echo $o;
|
||||||
|
@ -553,7 +553,7 @@ function photos_content(&$a) {
|
|||||||
'$nickname' => $a->data['channel']['channel_address'],
|
'$nickname' => $a->data['channel']['channel_address'],
|
||||||
'$newalbum_label' => t('Enter a new album name'),
|
'$newalbum_label' => t('Enter a new album name'),
|
||||||
'$newalbum_placeholder' => t('or select an existing one (doubleclick)'),
|
'$newalbum_placeholder' => t('or select an existing one (doubleclick)'),
|
||||||
'$visible' => array('visible', t('Create a status post for this upload'),0,''),
|
'$visible' => array('visible', t('Create a status post for this upload'), 0, '', array(t('No'), t('Yes'))),
|
||||||
'$albums' => $albums['albums'],
|
'$albums' => $albums['albums'],
|
||||||
'$selname' => $selname,
|
'$selname' => $selname,
|
||||||
'$permissions' => t('Permissions'),
|
'$permissions' => t('Permissions'),
|
||||||
|
@ -19,7 +19,8 @@ code {
|
|||||||
display:none;
|
display:none;
|
||||||
}
|
}
|
||||||
|
|
||||||
#jot-title-wrap input {
|
#jot-title-wrap input,
|
||||||
|
#jot-pagetitle-wrap input {
|
||||||
padding: 8px;
|
padding: 8px;
|
||||||
margin-bottom: 5px;
|
margin-bottom: 5px;
|
||||||
}
|
}
|
||||||
|
@ -3,7 +3,8 @@
|
|||||||
<input type="hidden" name="filehash" value="{{$file.hash}}" />
|
<input type="hidden" name="filehash" value="{{$file.hash}}" />
|
||||||
<input type="hidden" name="uid" value="{{$uid}}" />
|
<input type="hidden" name="uid" value="{{$uid}}" />
|
||||||
<input type="hidden" name="fileid" value="{{$file.id}}" />
|
<input type="hidden" name="fileid" value="{{$file.id}}" />
|
||||||
|
{{if !$isadir}}{{include file="field_checkbox.tpl" field=$notify}}{{/if}}
|
||||||
|
{{if $isadir}}{{include file="field_checkbox.tpl" field=$recurse}}{{/if}}
|
||||||
<div id="attach-edit-tools-share" class="btn-group form-group">
|
<div id="attach-edit-tools-share" class="btn-group form-group">
|
||||||
{{if !$isadir}}
|
{{if !$isadir}}
|
||||||
<a href="/rpost?body=[attachment]{{$file.hash}},{{$file.revision}}[/attachment]" id="attach-btn" class="btn btn-default btn-xs" title="{{$attach_btn_title}}">
|
<a href="/rpost?body=[attachment]{{$file.hash}},{{$file.revision}}[/attachment]" id="attach-btn" class="btn btn-default btn-xs" title="{{$attach_btn_title}}">
|
||||||
@ -14,31 +15,14 @@
|
|||||||
<i class="icon-share jot-icons"></i>
|
<i class="icon-share jot-icons"></i>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<div id="attach-edit-tools-perms" class="form-group pull-right btn-group">
|
<div id="attach-edit-perms" class="btn-group pull-right">
|
||||||
{{if $isadir}}
|
<button id="dbtn-acl" class="btn btn-default btn-xs" data-toggle="modal" data-target="#aclModal" title="{{$permset}}" onclick="return false;">
|
||||||
<div id="attach-edit-perms-recurse" class="btn-group" data-toggle="buttons">
|
<i id="jot-perms-icon" class="icon-{{$lockstate}} jot-icons"></i>
|
||||||
<label class="btn btn-default btn-xs" title="{{$recurse}}">
|
</button>
|
||||||
<input type="checkbox" autocomplete="off" name="recurse" value="1"><i class="icon-level-down jot-icons"></i>
|
<button id="dbtn-submit" class="btn btn-primary btn-xs" type="submit" name="submit">
|
||||||
</label>
|
{{$submit}}
|
||||||
</div>
|
</button>
|
||||||
{{/if}}
|
|
||||||
{{if !$isadir}}
|
|
||||||
<div id="attach-edit-activity" class="btn-group" data-toggle="buttons">
|
|
||||||
<label class="btn btn-default btn-xs" title="{{$activity_btn_title}}">
|
|
||||||
<input type="checkbox" autocomplete="off" name="no_activity" value="1"><i class="icon-ban-circle jot-icons"></i>
|
|
||||||
</label>
|
|
||||||
</div>
|
|
||||||
{{/if}}
|
|
||||||
<div id="attach-edit-perms" class="btn-group">
|
|
||||||
<button id="dbtn-acl" class="btn btn-default btn-xs" data-toggle="modal" data-target="#aclModal" title="{{$permset}}" onclick="return false;">
|
|
||||||
<i id="jot-perms-icon" class="icon-{{$lockstate}} jot-icons"></i>
|
|
||||||
</button>
|
|
||||||
<button id="dbtn-submit" class="btn btn-primary btn-xs" type="submit" name="submit">
|
|
||||||
{{$submit}}
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{{$aclselect}}
|
{{$aclselect}}
|
||||||
|
|
||||||
<div id="link-code" class="form-group">
|
<div id="link-code" class="form-group">
|
||||||
|
Reference in New Issue
Block a user