diff options
author | friendica <info@friendica.com> | 2013-03-26 19:37:33 -0700 |
---|---|---|
committer | friendica <info@friendica.com> | 2013-03-26 19:37:33 -0700 |
commit | abd58bce6899aff274be2e24db08cca46c4b135b (patch) | |
tree | 40ac189ca599658223d25cea5712786e54b9474b /include/zot.php | |
parent | 63c6427dc42318d0ae6d000ec52fa80c7582d1d4 (diff) | |
download | volse-hubzilla-abd58bce6899aff274be2e24db08cca46c4b135b.tar.gz volse-hubzilla-abd58bce6899aff274be2e24db08cca46c4b135b.tar.bz2 volse-hubzilla-abd58bce6899aff274be2e24db08cca46c4b135b.zip |
set hidden flags on new directory entries, not just existing ones
Diffstat (limited to 'include/zot.php')
-rw-r--r-- | include/zot.php | 24 |
1 files changed, 21 insertions, 3 deletions
diff --git a/include/zot.php b/include/zot.php index 78978bbf9..5fab76932 100644 --- a/include/zot.php +++ b/include/zot.php @@ -523,9 +523,26 @@ function import_xchan($arr) { } else { $import_photos = true; + + $dirmode = get_config('system','directory_mode'); + + if((($arr['site']['directory_mode'] === 'standalone') || ($dirmode & DIRECTORY_MODE_STANDALONE)) +&& ($arr['site']['url'] != z_root())) + $arr['searchable'] = false; + + $hidden = (1 - intval($arr['searchable'])); + + if($hidden) + $new_flags = XCHAN_FLAGS_HIDDEN; + else + $new_flags = 0; + + + + $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_name, xchan_network, xchan_photo_date, xchan_name_date) - values ( '%s', '%s', '%s', '%s' , '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s') ", + xchan_photo_l, xchan_addr, xchan_url, xchan_connurl, xchan_name, xchan_network, xchan_photo_date, xchan_name_date, xchan_flags) + values ( '%s', '%s', '%s', '%s' , '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', %d) ", dbesc($xchan_hash), dbesc($arr['guid']), dbesc($arr['guid_sig']), @@ -538,7 +555,8 @@ function import_xchan($arr) { dbesc($arr['name']), dbesc('zot'), dbesc($arr['photo_updated']), - dbesc($arr['name_updated']) + dbesc($arr['name_updated']), + intval($new_flags) ); update_modtime($xchan_hash); $changed = true; |