mirror of
https://github.com/friendica/friendica
synced 2025-04-26 23:10:11 +00:00
added spaces + some curly braces + some usage of dbm::is_result()
Signed-off-by: Roland Häder <roland@mxchange.org>
This commit is contained in:
parent
cf9fa51f2f
commit
5debcbb5a6
5 changed files with 15 additions and 11 deletions
|
@ -23,10 +23,11 @@ function share_init(App $a) {
|
|||
} else {
|
||||
$o = share_header($r[0]['author-name'], $r[0]['author-link'], $r[0]['author-avatar'], $r[0]['guid'], $r[0]['created'], $r[0]['plink']);
|
||||
|
||||
if ($r[0]['title'])
|
||||
if ($r[0]['title']) {
|
||||
$o .= '[b]'.$r[0]['title'].'[/b]'."\n";
|
||||
}
|
||||
$o .= $r[0]['body'];
|
||||
$o.= "[/share]";
|
||||
$o .= "[/share]";
|
||||
}
|
||||
|
||||
echo $o;
|
||||
|
@ -34,17 +35,17 @@ function share_init(App $a) {
|
|||
}
|
||||
|
||||
function share_header($author, $profile, $avatar, $guid, $posted, $link) {
|
||||
$header = "[share author='".str_replace(["'", "[", "]"], ["'", "[", "]"], $author).
|
||||
"' profile='".str_replace(["'", "[", "]"], ["'", "[", "]"], $profile).
|
||||
"' avatar='".str_replace(["'", "[", "]"], ["'", "[", "]"], $avatar);
|
||||
$header = "[share author='" . str_replace(["'", "[", "]"], ["'", "[", "]"], $author).
|
||||
"' profile='" . str_replace(["'", "[", "]"], ["'", "[", "]"], $profile).
|
||||
"' avatar='" . str_replace(["'", "[", "]"], ["'", "[", "]"], $avatar);
|
||||
|
||||
if ($guid) {
|
||||
$header .= "' guid='".str_replace(["'", "[", "]"], ["'", "[", "]"], $guid);
|
||||
$header .= "' guid='" . str_replace(["'", "[", "]"], ["'", "[", "]"], $guid);
|
||||
}
|
||||
if ($posted) {
|
||||
$header .= "' posted='".str_replace(["'", "[", "]"], ["'", "[", "]"], $posted);
|
||||
$header .= "' posted='" . str_replace(["'", "[", "]"], ["'", "[", "]"], $posted);
|
||||
}
|
||||
$header .= "' link='".str_replace(["'", "[", "]"], ["'", "[", "]"], $link)."']";
|
||||
$header .= "' link='" . str_replace(["'", "[", "]"], ["'", "[", "]"], $link)."']";
|
||||
|
||||
return $header;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue