aboutsummaryrefslogtreecommitdiffstats
path: root/include/zot.php
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2013-01-22 00:20:25 -0800
committerfriendica <info@friendica.com>2013-01-22 00:20:25 -0800
commitbda4ca4c0d9f247675f4c241ecb0d402bb380d8f (patch)
tree20c00db16790b04f61d33934489b38848e7accd2 /include/zot.php
parentfb76675a28b37b7281546373671d0dabbd69ef46 (diff)
downloadvolse-hubzilla-bda4ca4c0d9f247675f4c241ecb0d402bb380d8f.tar.gz
volse-hubzilla-bda4ca4c0d9f247675f4c241ecb0d402bb380d8f.tar.bz2
volse-hubzilla-bda4ca4c0d9f247675f4c241ecb0d402bb380d8f.zip
hidden directory entries
Diffstat (limited to 'include/zot.php')
-rw-r--r--include/zot.php14
1 files changed, 11 insertions, 3 deletions
diff --git a/include/zot.php b/include/zot.php
index 38bac5e93..2623d68c4 100644
--- a/include/zot.php
+++ b/include/zot.php
@@ -531,14 +531,22 @@ function import_xchan($arr) {
dbesc($xchan_hash)
);
+
if($r) {
if($r[0]['xchan_photo_date'] != $arr['photo_updated'])
- $update_photos = true;
- if(($r[0]['xchan_name_date'] != $arr['name_updated']) || ($r[0]['xchan_connurl'] != $arr['connections_url'])) {
- $r = q("update xchan set xchan_name = '%s', xchan_name_date = '%s', xchan_connurl = '%s' where xchan_hash = '%s' limit 1",
+ $import_photos = true;
+
+ if(($r[0]['xchan_flags'] & XCHAN_FLAGS_HIDDEN) != $arr['searchable'])
+ $new_flags = $r[0]['xchan_flags'] ^ XCHAN_FLAGS_HIDDEN;
+ else
+ $new_flags = $r[0]['xchan_flags'];
+
+ if(($r[0]['xchan_name_date'] != $arr['name_updated']) || ($r[0]['xchan_connurl'] != $arr['connections_url']) || ($r[0]['xchan_flags'] != $new_flags)) {
+ $r = q("update xchan set xchan_name = '%s', xchan_name_date = '%s', xchan_connurl = '%s', xchan_flags = %d where xchan_hash = '%s' limit 1",
dbesc($arr['name']),
dbesc($arr['name_updated']),
dbesc($arr['connections_url']),
+ intval($new_flags),
dbesc($xchan_hash)
);
}