aboutsummaryrefslogtreecommitdiffstats
path: root/mod
diff options
context:
space:
mode:
Diffstat (limited to 'mod')
-rw-r--r--mod/dirsearch.php10
-rw-r--r--mod/manage.php5
-rw-r--r--mod/removeme.php21
3 files changed, 22 insertions, 14 deletions
diff --git a/mod/dirsearch.php b/mod/dirsearch.php
index dcacef651..3e385a6d1 100644
--- a/mod/dirsearch.php
+++ b/mod/dirsearch.php
@@ -121,9 +121,10 @@ function dirsearch_content(&$a) {
else {
$qlimit = " LIMIT " . intval($startrec) . " , " . intval($perpage);
if($return_total) {
- $r = q("SELECT COUNT(xchan_hash) AS `total` FROM xchan left join xprof on xchan_hash = xprof_hash where $logic $sql_extra and not ( xchan_flags & %d) and not ( xchan_flags & %d ) $safesql ",
+ $r = q("SELECT COUNT(xchan_hash) AS `total` FROM xchan left join xprof on xchan_hash = xprof_hash where $logic $sql_extra and not ( xchan_flags & %d) and not ( xchan_flags & %d ) and not ( xchan_flags & %d ) $safesql ",
intval(XCHAN_FLAGS_HIDDEN),
- intval(XCHAN_FLAGS_ORPHAN)
+ intval(XCHAN_FLAGS_ORPHAN),
+ intval(XCHAN_FLAGS_DELETED)
);
if($r) {
$ret['total_items'] = $r[0]['total'];
@@ -161,9 +162,10 @@ function dirsearch_content(&$a) {
}
else {
- $r = q("SELECT xchan.*, xprof.* from xchan left join xprof on xchan_hash = xprof_hash where ( $logic $sql_extra ) and not ( xchan_flags & %d ) and not ( xchan_flags & %d ) $safesql $order $qlimit ",
+ $r = q("SELECT xchan.*, xprof.* from xchan left join xprof on xchan_hash = xprof_hash where ( $logic $sql_extra ) and not ( xchan_flags & %d ) and not ( xchan_flags & %d ) and not ( xchan_flags & %d ) $safesql $order $qlimit ",
intval(XCHAN_FLAGS_HIDDEN),
- intval(XCHAN_FLAGS_ORPHAN)
+ intval(XCHAN_FLAGS_ORPHAN),
+ intval(XCHAN_FLAGS_DELETED)
);
}
diff --git a/mod/manage.php b/mod/manage.php
index 27e45aa47..a2f65b271 100644
--- a/mod/manage.php
+++ b/mod/manage.php
@@ -36,8 +36,9 @@ function manage_content(&$a) {
$channels = null;
if(local_user()) {
- $r = q("select channel.*, xchan.* from channel left join xchan on channel.channel_hash = xchan.xchan_hash where channel.channel_account_id = %d order by channel_name ",
- intval(get_account_id())
+ $r = q("select channel.*, xchan.* from channel left join xchan on channel.channel_hash = xchan.xchan_hash where channel.channel_account_id = %d and not ( channel_pageflags & %d ) order by channel_name ",
+ intval(get_account_id()),
+ intval(PAGE_REMOVED)
);
$selected_channel = null;
diff --git a/mod/removeme.php b/mod/removeme.php
index ee88bd76a..7af4719bd 100644
--- a/mod/removeme.php
+++ b/mod/removeme.php
@@ -17,13 +17,17 @@ function removeme_post(&$a) {
if($_POST['verify'] !== $_SESSION['remove_account_verify'])
return;
- $encrypted = hash('whirlpool',trim($_POST['qxz_password']));
- if((strlen($a->user['password'])) && ($encrypted === $a->user['password'])) {
- require_once('include/Contact.php');
- user_remove($a->user['uid']);
- // NOTREACHED
- }
+ $account = $a->get_account();
+
+ if(! account_verify_password($account['account_email'],$_POST['qxz_password']))
+ return;
+
+ require_once('include/Contact.php');
+
+ $global_remove = intval($_POST['global']);
+
+ channel_remove(local_user(),1 - $global_remove);
}
@@ -42,9 +46,10 @@ function removeme_content(&$a) {
$o .= replace_macros($tpl, array(
'$basedir' => $a->get_baseurl(),
'$hash' => $hash,
- '$title' => t('Remove My Account'),
- '$desc' => t('This will completely remove your account. Once this has been done it is not recoverable.'),
+ '$title' => t('Remove This Channel'),
+ '$desc' => t('This will completely remove this channel from the network. Once this has been done it is not recoverable.'),
'$passwd' => t('Please enter your password for verification:'),
+ '$global' => array('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')),
'$submit' => t('Remove My Account')
));