diff options
author | friendica <info@friendica.com> | 2014-11-24 15:36:11 -0800 |
---|---|---|
committer | friendica <info@friendica.com> | 2014-11-24 15:36:11 -0800 |
commit | ddc8557b69d46d2268794af456ab2315b4e032a7 (patch) | |
tree | e2047868ce7291dab6b4ae86abc02bd173d34bc9 | |
parent | 756abd66783344f5dcbb0a146d9281e027181837 (diff) | |
download | volse-hubzilla-ddc8557b69d46d2268794af456ab2315b4e032a7.tar.gz volse-hubzilla-ddc8557b69d46d2268794af456ab2315b4e032a7.tar.bz2 volse-hubzilla-ddc8557b69d46d2268794af456ab2315b4e032a7.zip |
hide online presence maps to DNT
-rw-r--r-- | include/config.php | 6 | ||||
-rw-r--r-- | mod/post.php | 3 |
2 files changed, 6 insertions, 3 deletions
diff --git a/include/config.php b/include/config.php index 9eaa6b2e6..87b91e51a 100644 --- a/include/config.php +++ b/include/config.php @@ -212,7 +212,7 @@ function load_pconfig($uid) { if(! array_key_exists($uid, $a->config)) $a->config[$uid] = array(); - $r = q("SELECT * FROM `pconfig` WHERE `uid` = %d", + $r = q("SELECT * FROM pconfig WHERE uid = %d", intval($uid) ); @@ -390,7 +390,7 @@ function load_xconfig($xchan) { if(! array_key_exists($xchan, $a->config)) $a->config[$xchan] = array(); - $r = q("SELECT * FROM `xconfig` WHERE `xchan` = '%s'", + $r = q("SELECT * FROM xconfig WHERE xchan = '%s'", dbesc($xchan) ); @@ -517,7 +517,7 @@ function del_xconfig($xchan, $family, $key) { if(x($a->config[$xchan][$family], $key)) unset($a->config[$xchan][$family][$key]); - $ret = q("DELETE FROM `xconfig` WHERE `xchan` = '%s' AND `cat` = '%s' AND `k` = '%s'", + $ret = q("DELETE FROM xconfig WHERE xchan = '%s' AND cat = '%s' AND k = '%s'", dbesc($xchan), dbesc($family), dbesc($key) diff --git a/mod/post.php b/mod/post.php index 47e460f1e..9e818a7e2 100644 --- a/mod/post.php +++ b/mod/post.php @@ -798,6 +798,7 @@ function post_post(&$a) { $ret['service_class'] = $u[0]['account_service_class']; // Set "do not track" flag if this site or this channel's profile is restricted + // in some way if(intval(get_config('system','block_public'))) $ret['DNT'] = true; @@ -805,6 +806,8 @@ function post_post(&$a) { $ret['DNT'] = true; if(get_pconfig($c[0]['channel_id'],'system','do_not_track')) $ret['DNT'] = true; + if(get_pconfig($c[0]['channel_id'],'system','hide_online_status')) + $ret['DNT'] = true; json_return_and_die($ret); |