aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2013-09-22 20:38:24 -0700
committerfriendica <info@friendica.com>2013-09-22 20:38:24 -0700
commitcdfb5f9dc740734fbd95363a026ab44ae1dd9d94 (patch)
tree0b3953bb3f1d860ac728f762cd6f378b67830ba7 /include
parentdf8035344fed17950cd129cf42bb1aab210dc334 (diff)
downloadvolse-hubzilla-cdfb5f9dc740734fbd95363a026ab44ae1dd9d94.tar.gz
volse-hubzilla-cdfb5f9dc740734fbd95363a026ab44ae1dd9d94.tar.bz2
volse-hubzilla-cdfb5f9dc740734fbd95363a026ab44ae1dd9d94.zip
adult channel setting
Diffstat (limited to 'include')
-rw-r--r--include/zot.php7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/zot.php b/include/zot.php
index efcc4abaa..ba55880ee 100644
--- a/include/zot.php
+++ b/include/zot.php
@@ -469,6 +469,11 @@ function import_xchan($arr) {
else
$new_flags = $r[0]['xchan_flags'];
+ $adult = (($r[0]['xchan_flags'] & XCHAN_FLAGS_SELFCENSORED) ? true : false);
+ $adult_changed = ((intval($adult) != intval($arr['adult_content'])) ? true : false);
+ if($adult_changed)
+ $new_flags = $new_flags ^ XCHAN_FLAGS_SELFCENSORED;
+
if(($r[0]['xchan_name_date'] != $arr['name_updated'])
|| ($r[0]['xchan_connurl'] != $arr['connections_url'])
@@ -511,6 +516,8 @@ function import_xchan($arr) {
$new_flags = XCHAN_FLAGS_HIDDEN;
else
$new_flags = 0;
+ if($arr['adult_content'])
+ $new_flags |= XCHAN_FLAGS_SELFCENSORED;
$x = q("insert into xchan ( xchan_hash, xchan_guid, xchan_guid_sig, xchan_pubkey, xchan_photo_mimetype,
xchan_photo_l, xchan_addr, xchan_url, xchan_connurl, xchan_follow, xchan_connpage, xchan_name, xchan_network, xchan_photo_date, xchan_name_date, xchan_flags)