aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Zotlabs/Module/Removeaccount.php4
-rw-r--r--Zotlabs/Module/Removeme.php4
-rw-r--r--include/channel.php12
-rw-r--r--view/tpl/removeaccount.tpl2
-rwxr-xr-xview/tpl/removeme.tpl2
5 files changed, 18 insertions, 6 deletions
diff --git a/Zotlabs/Module/Removeaccount.php b/Zotlabs/Module/Removeaccount.php
index 9d2bbd0de..cd18b79c0 100644
--- a/Zotlabs/Module/Removeaccount.php
+++ b/Zotlabs/Module/Removeaccount.php
@@ -37,7 +37,7 @@ class Removeaccount extends \Zotlabs\Web\Controller {
}
}
- $global_remove = intval($_POST['global']);
+ $global_remove = 0; //intval($_POST['global']);
account_remove($account_id, 1 - $global_remove);
}
@@ -57,7 +57,7 @@ class Removeaccount extends \Zotlabs\Web\Controller {
'$title' => t('Remove This Account'),
'$desc' => array(t('WARNING: '), t('This account and all its channels will be completely removed from the network. '), t('This action is permanent and can not be undone!')),
'$passwd' => t('Please enter your password for verification:'),
- '$global' => array('global', t('Remove this account, all its channels and all its channel clones from the network'), false, t('By default only the instances of the channels located on this hub will be removed from the network')),
+ // '$global' => array('global', t('Remove this account, all its channels and all its channel clones from the network'), false, t('By default only the instances of the channels located on this hub will be removed from the network')),
'$submit' => t('Remove Account')
));
diff --git a/Zotlabs/Module/Removeme.php b/Zotlabs/Module/Removeme.php
index 451e280c3..876d61ca6 100644
--- a/Zotlabs/Module/Removeme.php
+++ b/Zotlabs/Module/Removeme.php
@@ -37,7 +37,7 @@ class Removeme extends \Zotlabs\Web\Controller {
}
}
- $global_remove = intval($_POST['global']);
+ $global_remove = 0; //intval($_POST['global']);
channel_remove(local_channel(),1 - $global_remove,true);
@@ -60,7 +60,7 @@ class Removeme extends \Zotlabs\Web\Controller {
'$title' => t('Remove This Channel'),
'$desc' => [ t('WARNING: '), t('This channel will be completely removed from the network. '), t('This action is permanent and can not be undone!') ],
'$passwd' => t('Please enter your password for verification:'),
- '$global' => [ 'global', t('Remove this channel and all its clones from the network'), false, t('By default only the instance of the channel located on this hub will be removed from the network'), [ t('No'),t('Yes') ] ],
+ // '$global' => [ 'global', t('Remove this channel and all its clones from the network'), false, t('By default only the instance of the channel located on this hub will be removed from the network'), [ t('No'),t('Yes') ] ],
'$submit' => t('Remove Channel')
));
diff --git a/include/channel.php b/include/channel.php
index 9424c8550..a51404652 100644
--- a/include/channel.php
+++ b/include/channel.php
@@ -2715,6 +2715,9 @@ function account_remove($account_id, $local = true, $unset_session = true) {
logger('account_remove: ' . $account_id);
+ // Global removal (all clones) not currently supported
+ $local = true;
+
if(! intval($account_id)) {
logger('No account.');
return false;
@@ -2775,6 +2778,11 @@ function channel_remove($channel_id, $local = true, $unset_session = false) {
if(! $channel_id)
return;
+ // global removal (all clones) not currently supported
+ // hence this operation _may_ leave orphan data on remote servers
+
+ $local = true;
+
logger('Removing channel: ' . $channel_id);
logger('local only: ' . intval($local));
@@ -2793,6 +2801,7 @@ function channel_remove($channel_id, $local = true, $unset_session = false) {
*/
call_hooks('channel_remove', $r[0]);
+/*
if(! $local) {
if(intval($r[0]['channel_removed'])) {
@@ -2825,7 +2834,7 @@ function channel_remove($channel_id, $local = true, $unset_session = false) {
Master::Summon(array('Notifier','purge_all',$channel_id));
}
-
+*/
$r = q("select iid from iconfig left join item on item.id = iconfig.iid
where item.uid = %d",
@@ -2929,7 +2938,6 @@ function channel_remove($channel_id, $local = true, $unset_session = false) {
//remove from file system
-
$f = 'store/' . $channel['channel_address'];
if(is_dir($f)) {
@rrmdir($f);
diff --git a/view/tpl/removeaccount.tpl b/view/tpl/removeaccount.tpl
index ce6c8ac22..6cd554082 100644
--- a/view/tpl/removeaccount.tpl
+++ b/view/tpl/removeaccount.tpl
@@ -12,7 +12,9 @@
<label id="remove-account-pass-label" for="remove-account-pass">{{$passwd}}</label>
<input class="form-control" type="password" id="remove-account-pass" autocomplete="off" name="qxz_password" value=" " />
</div>
+ {{if $global}}
{{include file="field_checkbox.tpl" field=$global}}
+ {{/if}}
<button type="submit" name="submit" class="btn btn-danger">{{$submit}}</button>
</form>
</div>
diff --git a/view/tpl/removeme.tpl b/view/tpl/removeme.tpl
index 40b9546d2..814701fff 100755
--- a/view/tpl/removeme.tpl
+++ b/view/tpl/removeme.tpl
@@ -12,7 +12,9 @@
<label id="remove-account-pass-label" for="remove-account-pass">{{$passwd}}</label>
<input class="form-control" type="password" id="remove-account-pass" autocomplete="off" name="qxz_password" value=" " />
</div>
+ {{if $global}}
{{include file="field_checkbox.tpl" field=$global}}
+ {{/if}}
<button type="submit" name="submit" class="btn btn-danger">{{$submit}}</button>
</form>
</div>