diff options
author | git-marijus <mario@mariovavti.com> | 2017-06-09 12:57:05 +0200 |
---|---|---|
committer | git-marijus <mario@mariovavti.com> | 2017-06-09 12:57:05 +0200 |
commit | 8f2457855c89d0bac57694348608d9dad396dd36 (patch) | |
tree | 158c18f72c2ecfba3c71d0132e930a851685024d /include | |
parent | 7e4c880e1ee993537de80f923445191bc53f3698 (diff) | |
parent | f730e476f0d6db20eea29cd97e995f91a793d61c (diff) | |
download | volse-hubzilla-8f2457855c89d0bac57694348608d9dad396dd36.tar.gz volse-hubzilla-8f2457855c89d0bac57694348608d9dad396dd36.tar.bz2 volse-hubzilla-8f2457855c89d0bac57694348608d9dad396dd36.zip |
Merge branch 'dev' of https://github.com/redmatrix/hubzilla into dev
Diffstat (limited to 'include')
-rw-r--r-- | include/connections.php | 5 | ||||
-rw-r--r-- | include/feedutils.php | 4 | ||||
-rw-r--r-- | include/import.php | 7 |
3 files changed, 13 insertions, 3 deletions
diff --git a/include/connections.php b/include/connections.php index 167f7e2c4..85b961b65 100644 --- a/include/connections.php +++ b/include/connections.php @@ -341,6 +341,11 @@ function contact_remove($channel_id, $abook_id) { logger('removing contact ' . $abook_id . ' for channel ' . $channel_id,LOGGER_DEBUG); + + $x = [ 'channel_id' => $channel_id, 'abook_id' => $abook_id ]; + call_hooks('connection_remove',$x); + + $archive = get_pconfig($channel_id, 'system','archive_removed_contacts'); if($archive) { q("update abook set abook_archived = 1 where abook_id = %d and abook_channel = %d", diff --git a/include/feedutils.php b/include/feedutils.php index 708532013..f1cee4194 100644 --- a/include/feedutils.php +++ b/include/feedutils.php @@ -1185,6 +1185,10 @@ function feed_meta($xml) { } } + if(! $author['author_photo']) + $author['author_photo'] = $feed->get_image_url(); + + if(substr($author['author_link'],-1,1) == '/') $author['author_link'] = substr($author['author_link'],0,-1); diff --git a/include/import.php b/include/import.php index 3b5ddd1f1..faab29bc0 100644 --- a/include/import.php +++ b/include/import.php @@ -1093,11 +1093,12 @@ function sync_files($channel, $files) { $ext = ''; } - $r = q("select filename from attach where ( filename = '%s' OR filename like '%s' ) and folder = '%s' and hash != '%s' ", + $r = q("select filename from attach where ( filename = '%s' OR filename like '%s' ) and folder = '%s' and hash != '%s' and uid = %d ", dbesc($basename . $ext), dbesc($basename . '(%)' . $ext), dbesc($att['folder']), - dbesc($att['hash']) + dbesc($att['hash']), + intval($channel['channel_id']) ); if($r) { @@ -1263,7 +1264,7 @@ function sync_files($channel, $files) { $r = dbq("update photo set " . $str . " where id = " . intval($exists[0]['id']) ); } else { - create_attach_from_array('photo',$p); + create_table_from_array('photo',$p); } } } |