mirror of
https://codeberg.org/streams/streams.git
synced 2024-09-19 23:55:19 +00:00
bring friends back
This commit is contained in:
parent
020ab09657
commit
8c7e076dae
5 changed files with 22 additions and 15 deletions
2
boot.php
2
boot.php
|
@ -47,7 +47,7 @@ define ( 'RED_PLATFORM', 'Red Matrix' );
|
|||
define ( 'RED_VERSION', trim(file_get_contents('version.inc')) . 'R');
|
||||
define ( 'ZOT_REVISION', 1 );
|
||||
|
||||
define ( 'DB_UPDATE_VERSION', 1102 );
|
||||
define ( 'DB_UPDATE_VERSION', 1103 );
|
||||
|
||||
define ( 'EOL', '<br />' . "\r\n" );
|
||||
define ( 'ATOM_TIME', 'Y-m-d\TH:i:s\Z' );
|
||||
|
|
|
@ -364,20 +364,20 @@ function zot_refresh($them,$channel = null, $force = false) {
|
|||
intval(ABOOK_FLAG_SELF)
|
||||
);
|
||||
|
||||
if(($connected_set === 0 || $connected_set === 1) && ($connected_set !== $current_abook_unconnected)) {
|
||||
// if(($connected_set === 0 || $connected_set === 1) && ($connected_set !== $current_abook_unconnected)) {
|
||||
|
||||
// if they are in your address book but you aren't in theirs, and/or this does not
|
||||
// match your current connected state setting, toggle it.
|
||||
|
||||
$y1 = q("update abook set abook_flags = (abook_flags ^ %d)
|
||||
where abook_xchan = '%s' and abook_channel = %d
|
||||
and not (abook_flags & %d) limit 1",
|
||||
intval(ABOOK_FLAG_UNCONNECTED),
|
||||
dbesc($x['hash']),
|
||||
intval($channel['channel_id']),
|
||||
intval(ABOOK_FLAG_SELF)
|
||||
);
|
||||
}
|
||||
// $y1 = q("update abook set abook_flags = (abook_flags ^ %d)
|
||||
// where abook_xchan = '%s' and abook_channel = %d
|
||||
// and not (abook_flags & %d) limit 1",
|
||||
// intval(ABOOK_FLAG_UNCONNECTED),
|
||||
// dbesc($x['hash']),
|
||||
// intval($channel['channel_id']),
|
||||
// intval(ABOOK_FLAG_SELF)
|
||||
// );
|
||||
// }
|
||||
|
||||
if(! $y)
|
||||
logger('abook update failed');
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
|
||||
define( 'UPDATE_VERSION' , 1102 );
|
||||
define( 'UPDATE_VERSION' , 1103 );
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -1151,3 +1151,11 @@ function update_r1101() {
|
|||
return UPDATE_SUCCESS;
|
||||
}
|
||||
|
||||
function update_r1102() {
|
||||
$r = q("update abook set abook_flags = (abook_flags - %d)
|
||||
where ( abook_flags & %d)",
|
||||
intval(ABOOK_FLAG_UNCONNECTED),
|
||||
intval(ABOOK_FLAG_UNCONNECTED),
|
||||
);
|
||||
return UPDATE_SUCCESS;
|
||||
}
|
|
@ -182,9 +182,8 @@ function zfinger_init(&$a) {
|
|||
|
||||
$permissions = get_all_perms($e['channel_id'],$ztarget_hash,false);
|
||||
|
||||
$permissions['connected'] = false;
|
||||
|
||||
if($ztarget_hash) {
|
||||
$permissions['connected'] = false;
|
||||
$b = q("select * from abook where abook_xchan = '%s' and abook_channel = %d limit 1",
|
||||
dbesc($ztarget_hash),
|
||||
intval($e['channel_id'])
|
||||
|
|
|
@ -1 +1 @@
|
|||
2014-03-05.607
|
||||
2014-03-06.608
|
||||
|
|
Loading…
Reference in a new issue