fix new/search mod on network page, fix the parent queries on network and channel pages - which you probably didn't even notice were all stuffed up because the endless scroll made things right.
This commit is contained in:
parent
ff0a73bf40
commit
da388f4bc5
@ -583,6 +583,7 @@ function conversation(&$a, $items, $mode, $update, $page_mode = 'traditional') {
|
|||||||
//$tmp_item = replace_macros($tpl,array(
|
//$tmp_item = replace_macros($tpl,array(
|
||||||
$tmp_item = array(
|
$tmp_item = array(
|
||||||
'template' => $tpl,
|
'template' => $tpl,
|
||||||
|
'toplevel' => 'toplevel_item',
|
||||||
'tags' => $tags,
|
'tags' => $tags,
|
||||||
'id' => (($preview) ? 'P0' : $item['item_id']),
|
'id' => (($preview) ? 'P0' : $item['item_id']),
|
||||||
'linktitle' => sprintf( t('View %s\'s profile @ %s'), $profile_name, $profile_url),
|
'linktitle' => sprintf( t('View %s\'s profile @ %s'), $profile_name, $profile_url),
|
||||||
@ -632,8 +633,8 @@ function conversation(&$a, $items, $mode, $update, $page_mode = 'traditional') {
|
|||||||
$arr = array('item' => $item, 'output' => $tmp_item);
|
$arr = array('item' => $item, 'output' => $tmp_item);
|
||||||
call_hooks('display_item', $arr);
|
call_hooks('display_item', $arr);
|
||||||
|
|
||||||
$threads[$threadsid]['id'] = $item['item_id'];
|
// $threads[$threadsid]['id'] = $item['item_id'];
|
||||||
$threads[$threadsid]['items'] = array($arr['output']);
|
$threads[] = $arr['output'];
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -705,6 +706,7 @@ function conversation(&$a, $items, $mode, $update, $page_mode = 'traditional') {
|
|||||||
if($page_mode === 'preview')
|
if($page_mode === 'preview')
|
||||||
logger('preview: ' . print_r($threads,true));
|
logger('preview: ' . print_r($threads,true));
|
||||||
|
|
||||||
|
// logger('page_template: ' . $page_template);
|
||||||
|
|
||||||
// logger('nouveau: ' . print_r($threads,true));
|
// logger('nouveau: ' . print_r($threads,true));
|
||||||
|
|
||||||
@ -720,8 +722,8 @@ function conversation(&$a, $items, $mode, $update, $page_mode = 'traditional') {
|
|||||||
'$dropping' => ($page_dropping?t('Delete Selected Items'):False),
|
'$dropping' => ($page_dropping?t('Delete Selected Items'):False),
|
||||||
));
|
));
|
||||||
|
|
||||||
if($page_mode === 'preview')
|
// if($page_mode === 'preview')
|
||||||
logger('preview: ' . $o);
|
// logger('preview: ' . $o);
|
||||||
|
|
||||||
return $o;
|
return $o;
|
||||||
|
|
||||||
|
@ -145,7 +145,7 @@ function channel_content(&$a, $update = 0, $load = false) {
|
|||||||
|
|
||||||
if(($update) && (! $load)) {
|
if(($update) && (! $load)) {
|
||||||
|
|
||||||
$r = q("SELECT distinct(parent) AS `item_id` from item
|
$r = q("SELECT distinct parent AS `item_id` from item
|
||||||
left join abook on item.author_xchan = abook.abook_xchan
|
left join abook on item.author_xchan = abook.abook_xchan
|
||||||
WHERE uid = %d AND item_restrict = 0
|
WHERE uid = %d AND item_restrict = 0
|
||||||
AND (item_flags & %d) AND ( item_flags & %d )
|
AND (item_flags & %d) AND ( item_flags & %d )
|
||||||
@ -178,7 +178,7 @@ function channel_content(&$a, $update = 0, $load = false) {
|
|||||||
$pager_sql = sprintf(" LIMIT %d, %d ",intval($a->pager['start']), intval($a->pager['itemspage']));
|
$pager_sql = sprintf(" LIMIT %d, %d ",intval($a->pager['start']), intval($a->pager['itemspage']));
|
||||||
|
|
||||||
if($load) {
|
if($load) {
|
||||||
$r = q("SELECT id AS item_id FROM item
|
$r = q("SELECT distinct id AS item_id FROM item
|
||||||
left join abook on item.author_xchan = abook.abook_xchan
|
left join abook on item.author_xchan = abook.abook_xchan
|
||||||
WHERE uid = %d AND item_restrict = 0
|
WHERE uid = %d AND item_restrict = 0
|
||||||
AND (item_flags & %d) and (item_flags & %d)
|
AND (item_flags & %d) and (item_flags & %d)
|
||||||
|
@ -622,7 +622,7 @@ function network_content(&$a, $update = 0, $load = false) {
|
|||||||
|
|
||||||
// Fetch a page full of parent items for this page
|
// Fetch a page full of parent items for this page
|
||||||
|
|
||||||
$r = q("SELECT item.id AS item_id FROM item
|
$r = q("SELECT distinct item.id AS item_id FROM item
|
||||||
left join abook on item.author_xchan = abook.abook_xchan
|
left join abook on item.author_xchan = abook.abook_xchan
|
||||||
WHERE item.uid = %d AND item.item_restrict = 0
|
WHERE item.uid = %d AND item.item_restrict = 0
|
||||||
AND item.parent = item.id
|
AND item.parent = item.id
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
<div id="thread-wrapper-$item.id" class="thread-wrapper $item.toplevel">
|
||||||
<a name="$item.id" ></a>
|
<a name="$item.id" ></a>
|
||||||
<div class="wall-item-outside-wrapper $item.indent$item.previewing" id="wall-item-outside-wrapper-$item.id" >
|
<div class="wall-item-outside-wrapper $item.indent$item.previewing" id="wall-item-outside-wrapper-$item.id" >
|
||||||
<div class="wall-item-content-wrapper $item.indent" id="wall-item-content-wrapper-$item.id" >
|
<div class="wall-item-content-wrapper $item.indent" id="wall-item-content-wrapper-$item.id" >
|
||||||
@ -58,5 +59,5 @@
|
|||||||
<div class="wall-item-outside-wrapper-end $item.indent" ></div>
|
<div class="wall-item-outside-wrapper-end $item.indent" ></div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user