From fa65c436f4ed3f2893e80a28b09ebbe5d4db3cf3 Mon Sep 17 00:00:00 2001 From: Michael Vogel Date: Thu, 12 Aug 2021 18:04:01 +0200 Subject: [PATCH] Apply suggestions from code review Co-authored-by: Hypolite Petovan --- src/Content/Item.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Content/Item.php b/src/Content/Item.php index daff88dcda..e3a61bfec8 100644 --- a/src/Content/Item.php +++ b/src/Content/Item.php @@ -65,7 +65,7 @@ class Item $folders = []; $first = true; - $uid = ($item['uid'] != 0) ? $item['uid'] : $uid; + $uid = $item['uid'] ?: $uid; foreach (Post\Category::getArrayByURIId($item['uri-id'], $uid, Post\Category::CATEGORY) as $savedFolderName) { if (!empty($item['author-link'])) { @@ -76,7 +76,7 @@ class Item $categories[] = [ 'name' => $savedFolderName, 'url' => $url, - 'removeurl' => ((local_user() == $uid) ? 'filerm/' . $item['id'] . '?cat=' . rawurlencode($savedFolderName) : ""), + 'removeurl' => local_user() == $uid ? 'filerm/' . $item['id'] . '?cat=' . rawurlencode($savedFolderName) : '', 'first' => $first, 'last' => false ]; @@ -92,7 +92,7 @@ class Item $folders[] = [ 'name' => $savedFolderName, 'url' => "#", - 'removeurl' => ((local_user() == $uid) ? 'filerm/' . $item['id'] . '?term=' . rawurlencode($savedFolderName) : ""), + 'removeurl' => local_user() == $uid ? 'filerm/' . $item['id'] . '?term=' . rawurlencode($savedFolderName) : '', 'first' => $first, 'last' => false ];