This commit is contained in:
friendica 2014-03-18 16:50:46 -07:00
parent c8fb979ed8
commit 8c177fbc4b
4 changed files with 37 additions and 27 deletions

View File

@ -3931,6 +3931,7 @@ function items_fetch($arr,$channel = null,$observer_hash = null,$client_mode = C
if(isset($arr['start']) && isset($arr['records'])) if(isset($arr['start']) && isset($arr['records']))
$pager_sql = sprintf(" LIMIT %d, %d ",intval($arr['start']), intval($arr['records'])); $pager_sql = sprintf(" LIMIT %d, %d ",intval($arr['start']), intval($arr['records']));
if(array_key_exists('cmin',$arr) || array_key_exists('cmax',$arr)) {
if(($arr['cmin'] != 0) || ($arr['cmax'] != 99)) { if(($arr['cmin'] != 0) || ($arr['cmax'] != 99)) {
// Not everybody who shows up in the network stream will be in your address book. // Not everybody who shows up in the network stream will be in your address book.
@ -3948,6 +3949,7 @@ function items_fetch($arr,$channel = null,$observer_hash = null,$client_mode = C
if($cmax == 99) if($cmax == 99)
$sql_nets .= " OR abook.abook_closeness IS NULL ) "; $sql_nets .= " OR abook.abook_closeness IS NULL ) ";
} }
}
$simple_update = (($client_mode & CLIENT_MODE_UPDATE) ? " and ( item.item_flags & " . intval(ITEM_UNSEEN) . " ) " : ''); $simple_update = (($client_mode & CLIENT_MODE_UPDATE) ? " and ( item.item_flags & " . intval(ITEM_UNSEEN) . " ) " : '');
if($client_mode & CLIENT_MODE_LOAD) if($client_mode & CLIENT_MODE_LOAD)

View File

@ -590,9 +590,10 @@ function RedCollectionData($file,&$auth) {
if(! $r) { if(! $r) {
// path wasn't found. Try without permissions to see if it was the result of permissions. // path wasn't found. Try without permissions to see if it was the result of permissions.
$errors = true; $errors = true;
$r = q("select id, hash, filename, flags from attach where folder = '%s' and filename = '%s' and (flags & %d) limit 1", $r = q("select id, hash, filename, flags from attach where folder = '%s' and filename = '%s' and uid = %d and (flags & %d) limit 1",
dbesc($folder), dbesc($folder),
basename($path_arr[$x]), basename($path_arr[$x]),
intval($channel_id),
intval(ATTACH_FLAG_DIR) intval(ATTACH_FLAG_DIR)
); );
if($r) { if($r) {

View File

@ -872,21 +872,28 @@ function import_xchan($arr,$ud_flags = UPDATE_FLAGS_UPDATED) {
} }
// get rid of any hubs we have for this channel which weren't reported. // get rid of any hubs we have for this channel which weren't reported.
// This was needed at one time to resolve complicated cross-site inconsistencies, but can cause sync conflict.
// currently disabled.
// if($xisting) {
// foreach($xisting as $x) {
// if(! array_key_exists('updated',$x)) {
// logger('import_xchan: removing unreferenced hub location ' . $x['hubloc_url']);
// $r = q("delete from hubloc where hubloc_id = %d limit 1",
// intval($x['hubloc_id'])
// );
// $what .= 'removed_hub';
// $changed = true;
// }
// }
// }
if($xisting) {
foreach($xisting as $x) {
if(! array_key_exists('updated',$x)) {
logger('import_xchan: removing unreferenced hub location ' . $x['hubloc_url']);
$r = q("delete from hubloc where hubloc_id = %d limit 1",
intval($x['hubloc_id'])
);
$what .= 'removed_hub';
$changed = true;
}
}
}
} }
// Are we a directory server of some kind? // Are we a directory server of some kind?
if($dirmode != DIRECTORY_MODE_NORMAL) { if($dirmode != DIRECTORY_MODE_NORMAL) {

View File

@ -1 +1 @@
2014-03-17.619 2014-03-18.620