mirror of
https://github.com/friendica/friendica
synced 2024-11-10 12:22:53 +00:00
Standards
fix indentation level, replace x() with !empty()
This commit is contained in:
parent
7cb9138201
commit
003eee5912
1 changed files with 12 additions and 12 deletions
|
@ -3497,7 +3497,7 @@ class Item extends BaseObject
|
||||||
}
|
}
|
||||||
|
|
||||||
// Replace friendica image url size with theme preference.
|
// 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'];
|
$ps = $a->theme_info['item_image_size'];
|
||||||
$s = preg_replace('|(<img[^>]+src="[^"]+/photo/[0-9a-f]+)-[0-9]|', "$1-" . $ps, $s);
|
$s = preg_replace('|(<img[^>]+src="[^"]+/photo/[0-9a-f]+)-[0-9]|', "$1-" . $ps, $s);
|
||||||
}
|
}
|
||||||
|
@ -3527,12 +3527,12 @@ class Item extends BaseObject
|
||||||
'orig_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["href"] = $a->removeBaseURL($item['plink']);
|
||||||
$ret["title"] = L10n::t('link to source');
|
$ret["title"] = L10n::t('link to source');
|
||||||
}
|
}
|
||||||
|
|
||||||
} elseif (x($item, 'plink') && ($item['private'] != 1)) {
|
} elseif (!empty($item['plink']) && ($item['private'] != 1)) {
|
||||||
$ret = [
|
$ret = [
|
||||||
'href' => $item['plink'],
|
'href' => $item['plink'],
|
||||||
'orig' => $item['plink'],
|
'orig' => $item['plink'],
|
||||||
|
|
Loading…
Reference in a new issue