mirror of
https://git.friendi.ca/friendica/friendica.git
synced 2025-06-17 04:05:16 +02:00
added spaces + some curly braces + some usage of dbm::is_result()
Signed-off-by: Roland Haeder <roland@mxchange.org>
This commit is contained in:
parent
cdff732044
commit
299c0122f6
8 changed files with 112 additions and 102 deletions
|
@ -55,7 +55,7 @@ function feed_import($xml,$importer,&$contact, &$hub, $simulate = false) {
|
|||
if ($xpath->query('/atom:feed')->length > 0) {
|
||||
$alternate = $xpath->query("atom:link[@rel='alternate']")->item(0)->attributes;
|
||||
if (is_object($alternate)) {
|
||||
foreach($alternate AS $attributes) {
|
||||
foreach ($alternate AS $attributes) {
|
||||
if ($attributes->name == "href") {
|
||||
$author["author-link"] = $attributes->textContent;
|
||||
}
|
||||
|
@ -68,7 +68,7 @@ function feed_import($xml,$importer,&$contact, &$hub, $simulate = false) {
|
|||
if ($author["author-link"] == "") {
|
||||
$self = $xpath->query("atom:link[@rel='self']")->item(0)->attributes;
|
||||
if (is_object($self)) {
|
||||
foreach($self AS $attributes) {
|
||||
foreach ($self AS $attributes) {
|
||||
if ($attributes->name == "href") {
|
||||
$author["author-link"] = $attributes->textContent;
|
||||
}
|
||||
|
@ -163,7 +163,7 @@ function feed_import($xml,$importer,&$contact, &$hub, $simulate = false) {
|
|||
|
||||
$header["contact-id"] = $contact["id"];
|
||||
|
||||
if(!strlen($contact["notify"])) {
|
||||
if (!strlen($contact["notify"])) {
|
||||
// one way feed - no remote comment ability
|
||||
$header["last-child"] = 0;
|
||||
}
|
||||
|
@ -188,7 +188,7 @@ function feed_import($xml,$importer,&$contact, &$hub, $simulate = false) {
|
|||
$alternate = $xpath->query("atom:link", $entry)->item(0)->attributes;
|
||||
}
|
||||
if (is_object($alternate)) {
|
||||
foreach($alternate AS $attributes) {
|
||||
foreach ($alternate AS $attributes) {
|
||||
if ($attributes->name == "href") {
|
||||
$item["plink"] = $attributes->textContent;
|
||||
}
|
||||
|
@ -271,6 +271,7 @@ function feed_import($xml,$importer,&$contact, &$hub, $simulate = false) {
|
|||
if ($creator != "") {
|
||||
$item["author-name"] = $creator;
|
||||
}
|
||||
|
||||
/// @TODO ?
|
||||
// <category>Ausland</category>
|
||||
// <media:thumbnail width="152" height="76" url="http://www.taz.de/picture/667875/192/14388767.jpg"/>
|
||||
|
@ -284,7 +285,7 @@ function feed_import($xml,$importer,&$contact, &$hub, $simulate = false) {
|
|||
$type = "";
|
||||
$title = "";
|
||||
|
||||
foreach($enclosure->attributes AS $attributes) {
|
||||
foreach ($enclosure->attributes AS $attributes) {
|
||||
if ($attributes->name == "url") {
|
||||
$href = $attributes->textContent;
|
||||
} elseif ($attributes->name == "length") {
|
||||
|
@ -293,8 +294,9 @@ function feed_import($xml,$importer,&$contact, &$hub, $simulate = false) {
|
|||
$type = $attributes->textContent;
|
||||
}
|
||||
}
|
||||
if(strlen($item["attach"]))
|
||||
if (strlen($item["attach"])) {
|
||||
$item["attach"] .= ',';
|
||||
}
|
||||
|
||||
$attachments[] = array("link" => $href, "type" => $type, "length" => $length);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue