aboutsummaryrefslogtreecommitdiffstats
path: root/include/Contact.php
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2015-01-31 00:50:20 -0800
committerfriendica <info@friendica.com>2015-01-31 00:50:20 -0800
commite6a5f7800390e5091743d6a97c6fd8f54c5d1530 (patch)
tree20c49c7d11b411b91530ef43374a208274ebbb57 /include/Contact.php
parent4a243b63f7019a1e56ecf03b138cd7fc396236c2 (diff)
parent3e5226adc70838c784a0b208de25fffde37a6679 (diff)
downloadvolse-hubzilla-e6a5f7800390e5091743d6a97c6fd8f54c5d1530.tar.gz
volse-hubzilla-e6a5f7800390e5091743d6a97c6fd8f54c5d1530.tar.bz2
volse-hubzilla-e6a5f7800390e5091743d6a97c6fd8f54c5d1530.zip
Merge branch 'master' into tres
Conflicts: include/zot.php
Diffstat (limited to 'include/Contact.php')
-rw-r--r--include/Contact.php5
1 files changed, 3 insertions, 2 deletions
diff --git a/include/Contact.php b/include/Contact.php
index 5d211ee66..7e7649b94 100644
--- a/include/Contact.php
+++ b/include/Contact.php
@@ -566,12 +566,13 @@ function contact_remove($channel_id, $abook_id) {
function random_profile() {
$randfunc = db_getfunc('rand');
-
+
$checkrandom = get_config('randprofile','check'); // False by default
$retryrandom = intval(get_config('randprofile','retry'));
- if($retryrandom === false) $retryrandom = 5;
+ if($retryrandom == 0) $retryrandom = 5;
for($i = 0; $i < $retryrandom; $i++) {
+
$r = q("select xchan_url from xchan left join hubloc on hubloc_hash = xchan_hash where hubloc_connected > %s - interval %s order by $randfunc limit 1",
db_utcnow(), db_quoteinterval('30 day')
);