Merge pull request #80 from git-marijus/master

fix /channel not updating after posting comment
This commit is contained in:
redmatrix 2015-10-14 18:19:32 +11:00
commit d616099de6
2 changed files with 3 additions and 3 deletions

View File

@ -405,7 +405,6 @@ function attach_store($channel, $observer_hash, $options = '', $arr = null) {
require_once('include/photos.php'); require_once('include/photos.php');
call_hooks('photo_upload_begin',$arr); call_hooks('photo_upload_begin',$arr);
$ret = array('success' => false); $ret = array('success' => false);
@ -416,6 +415,7 @@ function attach_store($channel, $observer_hash, $options = '', $arr = null) {
$newalbum = (($arr) ? $arr['newalbum'] : ''); $newalbum = (($arr) ? $arr['newalbum'] : '');
$hash = (($arr && $arr['hash']) ? $arr['hash'] : null); $hash = (($arr && $arr['hash']) ? $arr['hash'] : null);
$upload_path = (($arr && $arr['directory']) ? $arr['directory'] : ''); $upload_path = (($arr && $arr['directory']) ? $arr['directory'] : '');
$visible = (($arr && $arr['visible']) ? $arr['visible'] : '');
$observer = array(); $observer = array();
@ -792,7 +792,7 @@ function attach_store($channel, $observer_hash, $options = '', $arr = null) {
if($is_photo) { if($is_photo) {
$args = array( 'source' => $source, 'visible' => 0, 'resource_id' => $hash, 'album' => basename($pathname), 'os_path' => $os_basepath . $os_relpath, 'filename' => $filename, 'getimagesize' => $gis, 'directory' => $direct); $args = array( 'source' => $source, 'visible' => $visible, 'resource_id' => $hash, 'album' => basename($pathname), 'os_path' => $os_basepath . $os_relpath, 'filename' => $filename, 'getimagesize' => $gis, 'directory' => $direct);
if($arr['contact_allow']) if($arr['contact_allow'])
$args['contact_allow'] = $arr['contact_allow']; $args['contact_allow'] = $arr['contact_allow'];
if($arr['group_allow']) if($arr['group_allow'])

View File

@ -173,7 +173,7 @@ function channel_content(&$a, $update = 0, $load = false) {
$r = q("SELECT distinct parent AS `item_id`, created from item $r = q("SELECT distinct parent AS `item_id`, created from item
left join abook on ( item.owner_xchan = abook.abook_xchan $abook_uids ) left join abook on ( item.owner_xchan = abook.abook_xchan $abook_uids )
WHERE uid = %d $item_normal WHERE uid = %d $item_normal
AND item_wall = 1 AND item_unseen = 1 AND item_wall = 1 $simple_update
AND (abook.abook_blocked = 0 or abook.abook_flags is null) AND (abook.abook_blocked = 0 or abook.abook_flags is null)
$sql_extra $sql_extra
ORDER BY created DESC", ORDER BY created DESC",