mirror of
https://git.sekbaer.de/Friendica/friendica.git
synced 2025-06-12 01:54:26 +02:00
Export all federation contacts through poco
This commit is contained in:
parent
39d2720e7b
commit
e3e9de2e74
3 changed files with 12 additions and 5 deletions
12
mod/poco.php
12
mod/poco.php
|
@ -61,9 +61,12 @@ function poco_init(&$a) {
|
|||
$update_limit = date("Y-m-d H:i:s",strtotime($_GET['updatedSince']));
|
||||
|
||||
if ($global) {
|
||||
$r = q("SELECT count(*) AS `total` FROM `gcontact` WHERE `updated` >= '%s' AND ((`last_contact` >= `last_failure`) OR (`updated` >= `last_failure`)) AND `network` IN ('%s')",
|
||||
//$r = q("SELECT count(*) AS `total` FROM `gcontact` WHERE `updated` >= '%s' AND ((`last_contact` >= `last_failure`) OR (`updated` >= `last_failure`)) AND `network` IN ('%s')",
|
||||
$r = q("SELECT count(*) AS `total` FROM `gcontact` WHERE `updated` >= '%s' AND `updated` >= `last_failure` AND `network` IN ('%s', '%s', '%s')",
|
||||
dbesc($update_limit),
|
||||
dbesc(NETWORK_DFRN)
|
||||
dbesc(NETWORK_DFRN),
|
||||
dbesc(NETWORK_DIASPORA),
|
||||
dbesc(NETWORK_OSTATUS)
|
||||
);
|
||||
} elseif($system_mode) {
|
||||
$r = q("SELECT count(*) AS `total` FROM `contact` WHERE `self` = 1 AND `network` IN ('%s', '%s', '%s', '%s', '')
|
||||
|
@ -96,9 +99,12 @@ function poco_init(&$a) {
|
|||
|
||||
|
||||
if ($global) {
|
||||
$r = q("SELECT * FROM `gcontact` WHERE `updated` > '%s' AND `network` IN ('%s') AND ((`last_contact` >= `last_failure`) OR (`updated` > `last_failure`)) LIMIT %d, %d",
|
||||
//$r = q("SELECT * FROM `gcontact` WHERE `updated` > '%s' AND `network` IN ('%s') AND ((`last_contact` >= `last_failure`) OR (`updated` > `last_failure`)) LIMIT %d, %d",
|
||||
$r = q("SELECT * FROM `gcontact` WHERE `updated` > '%s' AND `network` IN ('%s', '%1', '%1') and `updated` > `last_failure` LIMIT %d, %d",
|
||||
dbesc($update_limit),
|
||||
dbesc(NETWORK_DFRN),
|
||||
dbesc(NETWORK_DIASPORA),
|
||||
dbesc(NETWORK_OSTATUS),
|
||||
intval($startIndex),
|
||||
intval($itemsPerPage)
|
||||
);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue