mirror of
https://codeberg.org/streams/streams.git
synced 2024-09-20 20:35:12 +00:00
Merge branch 'dev' of /home/macgirvin/osada into dev
This commit is contained in:
commit
449fa7564e
2 changed files with 21 additions and 3 deletions
|
@ -111,6 +111,7 @@ class Item extends Controller {
|
|||
if(! $item_id)
|
||||
http_status_exit(404, 'Not found');
|
||||
|
||||
|
||||
$portable_id = EMPTY_STR;
|
||||
|
||||
$sigdata = HTTPSig::verify(EMPTY_STR);
|
||||
|
@ -126,6 +127,8 @@ class Item extends Controller {
|
|||
dbesc(z_root() . '/item/' . $item_id)
|
||||
);
|
||||
if(! $r) {
|
||||
|
||||
|
||||
$r = q("select * from item where mid = '%s' $item_normal limit 1",
|
||||
dbesc(z_root() . '/item/' . $item_id)
|
||||
);
|
||||
|
@ -135,8 +138,9 @@ class Item extends Controller {
|
|||
http_status_exit(404, 'Not found');
|
||||
}
|
||||
|
||||
$items = q("select * from item where parent_mid = '%s' and uid = %d $item_normal $sql_extra ",
|
||||
dbesc(z_root() . '/item/' . $item_id),
|
||||
|
||||
$items = q("select parent as item_id from item where mid = '%s' and uid = %d $item_normal $sql_extra ",
|
||||
dbesc($r[0]['parent_mid']),
|
||||
intval($r[0]['uid'])
|
||||
);
|
||||
if(! $items) {
|
||||
|
@ -145,6 +149,17 @@ class Item extends Controller {
|
|||
|
||||
$r = $items;
|
||||
|
||||
$parents_str = ids_to_querystr($r,'item_id');
|
||||
|
||||
$items = q("SELECT item.*, item.id AS item_id FROM item WHERE item.parent IN ( %s ) $item_normal $sql_extra ",
|
||||
dbesc($parents_str)
|
||||
);
|
||||
|
||||
if(! $items) {
|
||||
http_status_exit(404, 'Not found');
|
||||
}
|
||||
|
||||
$r = $items;
|
||||
xchan_query($r,true);
|
||||
$items = fetch_post_tags($r,true);
|
||||
|
||||
|
@ -165,6 +180,9 @@ class Item extends Controller {
|
|||
$nitems[] = $i;
|
||||
}
|
||||
|
||||
if(! $nitems)
|
||||
http_status_exit(404, 'Not found');
|
||||
|
||||
$chan = channelx_by_n($nitems[0]['uid']);
|
||||
|
||||
if(! $chan)
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
<a name="item_{{$item.id}}" ></a>
|
||||
<div class="wall-item-outside-wrapper{{if $item.is_comment}} comment{{/if}}{{if $item.previewing}} preview{{/if}}" id="wall-item-outside-wrapper-{{$item.id}}" >
|
||||
<div class="clearfix wall-item-content-wrapper{{if $item.is_comment}} comment{{/if}}" id="wall-item-content-wrapper-{{$item.id}}">
|
||||
{{for $x=3 to $item.thread_level}}<i class="fa fa-caret-right threadlevel"></i>{{/for}}
|
||||
{{if $item.photo}}
|
||||
<div class="wall-photo-item" id="wall-photo-item-{{$item.id}}">
|
||||
{{$item.photo}}
|
||||
|
@ -193,7 +194,6 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{if $item.responses || $item.attachments}}
|
||||
<div class="wall-item-tools-left btn-group" id="wall-item-tools-left-{{$item.id}}">
|
||||
{{if $item.star && $item.star.isstarred}}
|
||||
|
|
Loading…
Reference in a new issue