From 003eee5912511f80c22e6fb1e2a3999a43a76cea Mon Sep 17 00:00:00 2001 From: Adam Magness Date: Wed, 7 Nov 2018 14:16:59 -0500 Subject: [PATCH] Standards fix indentation level, replace x() with !empty() --- src/Model/Item.php | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/src/Model/Item.php b/src/Model/Item.php index 4f88c2ed9d..1eb96609f2 100644 --- a/src/Model/Item.php +++ b/src/Model/Item.php @@ -3497,7 +3497,7 @@ class Item extends BaseObject } // Replace friendica image url size with theme preference. - if (x($a->theme_info, 'item_image_size')) { + if (!empty($a->theme_info['item_image_size'])) { $ps = $a->theme_info['item_image_size']; $s = preg_replace('|(]+src="[^"]+/photo/[0-9a-f]+)-[0-9]|', "$1-" . $ps, $s); } @@ -3521,23 +3521,23 @@ class Item extends BaseObject if ($a->user['nickname'] != "") { $ret = [ - 'href' => "display/" . $item['guid'], - 'orig' => "display/" . $item['guid'], - 'title' => L10n::t('View on separate page'), - 'orig_title' => L10n::t('view on separate page'), - ]; + 'href' => "display/" . $item['guid'], + 'orig' => "display/" . $item['guid'], + 'title' => L10n::t('View on separate page'), + 'orig_title' => L10n::t('view on separate page'), + ]; - if (x($item, 'plink')) { + if (!empty($item['plink'])) { $ret["href"] = $a->removeBaseURL($item['plink']); $ret["title"] = L10n::t('link to source'); } - } elseif (x($item, 'plink') && ($item['private'] != 1)) { + } elseif (!empty($item['plink']) && ($item['private'] != 1)) { $ret = [ - 'href' => $item['plink'], - 'orig' => $item['plink'], - 'title' => L10n::t('link to source'), - ]; + 'href' => $item['plink'], + 'orig' => $item['plink'], + 'title' => L10n::t('link to source'), + ]; } else { $ret = []; } -- 2.39.5