diff options
author | friendica <info@friendica.com> | 2012-04-27 17:17:58 -0700 |
---|---|---|
committer | friendica <info@friendica.com> | 2012-04-27 17:17:58 -0700 |
commit | 26c53580d128d3ebbbc3d6172525b80690a63255 (patch) | |
tree | 10069eae269f2530f8964d356907d83c2141fc9d /include | |
parent | 0ab6b60a52fc27d8a37917b3b3e25de37c8fd372 (diff) | |
download | volse-hubzilla-26c53580d128d3ebbbc3d6172525b80690a63255.tar.gz volse-hubzilla-26c53580d128d3ebbbc3d6172525b80690a63255.tar.bz2 volse-hubzilla-26c53580d128d3ebbbc3d6172525b80690a63255.zip |
implement contact archival
Diffstat (limited to 'include')
-rw-r--r-- | include/acl_selectors.php | 4 | ||||
-rw-r--r-- | include/notifier.php | 7 | ||||
-rw-r--r-- | include/text.php | 4 |
3 files changed, 8 insertions, 7 deletions
diff --git a/include/acl_selectors.php b/include/acl_selectors.php index a5f5aff53..461ad0c36 100644 --- a/include/acl_selectors.php +++ b/include/acl_selectors.php @@ -122,7 +122,7 @@ function contact_selector($selname, $selclass, $preselected = false, $options) { $o .= "<select name=\"{$selname}[]\" id=\"$selclass\" class=\"$selclass\" multiple=\"multiple\" size=\"" . $x['size'] . "$\" $tabindex >\r\n"; $r = q("SELECT `id`, `name`, `url`, `network` FROM `contact` - WHERE `uid` = %d AND `self` = 0 AND `blocked` = 0 AND `pending` = 0 AND `notify` != '' + WHERE `uid` = %d AND `self` = 0 AND `blocked` = 0 AND `pending` = 0 AND `archive` = 0 AND `notify` != '' $sql_extra ORDER BY `name` ASC ", intval(local_user()) @@ -188,7 +188,7 @@ function contact_select($selname, $selclass, $preselected = false, $size = 4, $p $o .= "<select name=\"{$selname}[]\" id=\"$selclass\" class=\"$selclass\" multiple=\"multiple\" size=\"$size\" $tabindex >\r\n"; $r = q("SELECT `id`, `name`, `url`, `network` FROM `contact` - WHERE `uid` = %d AND `self` = 0 AND `blocked` = 0 AND `pending` = 0 AND `notify` != '' + WHERE `uid` = %d AND `self` = 0 AND `blocked` = 0 AND `pending` = 0 AND `archive` = 0 AND `notify` != '' $sql_extra ORDER BY `name` ASC ", intval(local_user()) diff --git a/include/notifier.php b/include/notifier.php index ca7c7b92e..922e869f6 100644 --- a/include/notifier.php +++ b/include/notifier.php @@ -304,7 +304,7 @@ function notifier_run($argv, $argc){ $conversant_str = dbesc(implode(', ',$conversants)); } - $r = q("SELECT * FROM `contact` WHERE `id` IN ( $conversant_str ) AND `blocked` = 0 AND `pending` = 0"); + $r = q("SELECT * FROM `contact` WHERE `id` IN ( $conversant_str ) AND `blocked` = 0 AND `pending` = 0 AND `archive` = 0"); if(count($r)) $contacts = $r; @@ -520,7 +520,8 @@ function notifier_run($argv, $argc){ `user`.* FROM `contact` LEFT JOIN `user` ON `contact`.`uid` = `user`.`uid` - WHERE `contact`.`blocked` = 0 AND `contact`.`pending` = 0 + WHERE `contact`.`blocked` = 0 AND `contact`.`archive` = 0 + AND `contact`.`pending` = 0 AND `contact`.`network` = '%s' AND `user`.`nickname` = '%s' $sql_extra AND `user`.`account_expired` = 0 LIMIT 1", @@ -769,7 +770,7 @@ function notifier_run($argv, $argc){ ); $r2 = q("SELECT `id`, `name`,`network` FROM `contact` - WHERE `network` in ( '%s', '%s') AND `uid` = %d AND `blocked` = 0 AND `pending` = 0 + WHERE `network` in ( '%s', '%s') AND `uid` = %d AND `blocked` = 0 AND `pending` = 0 AND `archive` = 0 AND `rel` != %d order by rand() ", dbesc(NETWORK_DFRN), dbesc(NETWORK_MAIL2), diff --git a/include/text.php b/include/text.php index 8c8db66a9..af32b2476 100644 --- a/include/text.php +++ b/include/text.php @@ -558,7 +558,7 @@ function contact_block() { if((! is_array($a->profile)) || ($a->profile['hide-friends'])) return $o; - $r = q("SELECT COUNT(*) AS `total` FROM `contact` WHERE `uid` = %d AND `self` = 0 AND `blocked` = 0 and `pending` = 0 AND `hidden` = 0", + $r = q("SELECT COUNT(*) AS `total` FROM `contact` WHERE `uid` = %d AND `self` = 0 AND `blocked` = 0 and `pending` = 0 AND `hidden` = 0 AND `archive` = 0", intval($a->profile['uid']) ); if(count($r)) { @@ -569,7 +569,7 @@ function contact_block() { $micropro = Null; } else { - $r = q("SELECT * FROM `contact` WHERE `uid` = %d AND `self` = 0 AND `blocked` = 0 and `pending` = 0 AND `hidden` = 0 ORDER BY RAND() LIMIT %d", + $r = q("SELECT * FROM `contact` WHERE `uid` = %d AND `self` = 0 AND `blocked` = 0 and `pending` = 0 AND `hidden` = 0 AND `archive` = 0 ORDER BY RAND() LIMIT %d", intval($a->profile['uid']), intval($shown) ); |