set hidden flags on new directory entries, not just existing ones
This commit is contained in:
parent
63c6427dc4
commit
abd58bce68
@ -523,9 +523,26 @@ function import_xchan($arr) {
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$import_photos = true;
|
$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,
|
$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)
|
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') ",
|
values ( '%s', '%s', '%s', '%s' , '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', %d) ",
|
||||||
dbesc($xchan_hash),
|
dbesc($xchan_hash),
|
||||||
dbesc($arr['guid']),
|
dbesc($arr['guid']),
|
||||||
dbesc($arr['guid_sig']),
|
dbesc($arr['guid_sig']),
|
||||||
@ -538,7 +555,8 @@ function import_xchan($arr) {
|
|||||||
dbesc($arr['name']),
|
dbesc($arr['name']),
|
||||||
dbesc('zot'),
|
dbesc('zot'),
|
||||||
dbesc($arr['photo_updated']),
|
dbesc($arr['photo_updated']),
|
||||||
dbesc($arr['name_updated'])
|
dbesc($arr['name_updated']),
|
||||||
|
intval($new_flags)
|
||||||
);
|
);
|
||||||
update_modtime($xchan_hash);
|
update_modtime($xchan_hash);
|
||||||
$changed = true;
|
$changed = true;
|
||||||
|
@ -288,7 +288,7 @@ if($a->module_loaded) {
|
|||||||
// If $aside_default is not False after the theme _aside() function, run the
|
// If $aside_default is not False after the theme _aside() function, run the
|
||||||
// module's _aside() function too
|
// module's _aside() function too
|
||||||
//
|
//
|
||||||
// This gives themes more control over how the left sidebar looks
|
// This gives themes more control over how the sidebar looks
|
||||||
|
|
||||||
$aside_default = true;
|
$aside_default = true;
|
||||||
call_hooks($a->module . '_mod_aside',$placeholder);
|
call_hooks($a->module . '_mod_aside',$placeholder);
|
||||||
|
@ -10,9 +10,9 @@ require_once('include/zot.php');
|
|||||||
|
|
||||||
function post_init(&$a) {
|
function post_init(&$a) {
|
||||||
|
|
||||||
// All other access to this endpoint is via the post method.
|
// Most access to this endpoint is via the post method.
|
||||||
// Here we will pick out the magic auth params which arrive
|
// Here we will pick out the magic auth params which arrive
|
||||||
// as a get request.
|
// as a get request, and the only communications to arrive this way.
|
||||||
|
|
||||||
if(argc() > 1) {
|
if(argc() > 1) {
|
||||||
|
|
||||||
@ -150,6 +150,11 @@ function post_post(&$a) {
|
|||||||
|
|
||||||
logger('mod_zot: data: ' . print_r($data,true), LOGGER_DATA);
|
logger('mod_zot: data: ' . print_r($data,true), LOGGER_DATA);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Many message packets will arrive encrypted. The existence of an 'iv' element
|
||||||
|
* tells us we need to unencapsulate the AES-256-CBC content using the site private key
|
||||||
|
*/
|
||||||
|
|
||||||
if(array_key_exists('iv',$data)) {
|
if(array_key_exists('iv',$data)) {
|
||||||
$data = aes_unencapsulate($data,get_config('system','prvkey'));
|
$data = aes_unencapsulate($data,get_config('system','prvkey'));
|
||||||
logger('mod_zot: decrypt1: ' . $data, LOGGER_DATA);
|
logger('mod_zot: decrypt1: ' . $data, LOGGER_DATA);
|
||||||
|
Reference in New Issue
Block a user