cleanup inspect - don't use jindent

This commit is contained in:
Mike Macgirvin 2024-06-22 14:39:41 +10:00
parent fd139224d0
commit c7467c4ba6
3 changed files with 4 additions and 3 deletions

View file

@ -1192,6 +1192,7 @@ class Activity
$activity['to'] = [ACTIVITY_PUBLIC_INBOX];
return $activity;
}
$activity['replies'] = z_root() . '/replies/' . basename($item['mid']);
if (isset($item['obj']) && $item['obj']) {
if (is_string($item['obj'])) {

View file

@ -62,8 +62,8 @@ class Inspect extends Controller
$output .= '(encode_activity)' . EOL . '<pre>' . escape_tags(json_encode(Activity::encode_activity($item, true),
JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES)) . '</pre>' . EOL . EOL;
$output .= '(cached activity)' . EOL . '<pre>' . jindent(escape_tags(ObjCache::Get($item['mid']) ?? '')) . '</pre>' . EOL . EOL;
$output .= '(cached activity)' . EOL . '<pre>' . jindent(json_encode(json_decode(ObjCache::Get($item['mid']) ?? '', true),JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES)) . '</pre>' . EOL . EOL;
if (str_contains($item['tgt_type'], 'Collection') && !empty($item['target']['id'])) {
$str = Activity::fetch($item['target']['id'], App::$channel);

View file

@ -99,7 +99,7 @@ class Replies extends Controller
$sql_noAdd = " and verb not in ('Add', 'Remove') ";
$items = q(
"SELECT item.*, item.id AS item_id FROM item WHERE item.thr_parent = '%s' $item_normal $sql_noAdd and item_private = %d and item_deleted = 0 and uid = %d",
"SELECT item.*, item.id AS item_id FROM item WHERE item.thr_parent = '%s' and item.mid != item.parent_mid $item_normal $sql_noAdd and item_private = %d and item_deleted = 0 and uid = %d",
dbesc($i[0]['mid']),
intval($i[0]['item_private']),
intval($i[0]['uid'])