Browse Source

Avoiding some PHP warnings

pull/927/head
Michael Vogel 7 years ago
parent
commit
9f4ef7c105
2 changed files with 9 additions and 8 deletions
  1. +4
    -3
      include/html2plain.php
  2. +5
    -5
      object/Item.php

+ 4
- 3
include/html2plain.php View File

@ -221,9 +221,10 @@ function html2plain($html, $wraplength = 75, $compact = false)
if (!$compact AND ($message != "")) {
$counter = 1;
foreach ($urls as $id=>$url)
if (strpos($message, $url) === false)
$message .= "\n".$url." ";
//$message .= "\n[".($counter++)."] ".$url;
if ($url != "")
if (strpos($message, $url) === false)
$message .= "\n".$url." ";
//$message .= "\n[".($counter++)."] ".$url;
}
$message = str_replace("\n«", "«\n", $message);


+ 5
- 5
object/Item.php View File

@ -269,22 +269,22 @@ class Item extends BaseObject {
}
// Disable features that aren't available in several networks
if ($item["item_network"] != "dfrn") {
if (($item["item_network"] != "dfrn") AND isset($buttons["dislike"])) {
unset($buttons["dislike"]);
$tagger = '';
}
if ($item["item_network"] == "feed")
if (($item["item_network"] == "feed") AND isset($buttons["like"]))
unset($buttons["like"]);
if ($item["item_network"] == "mail")
if (($item["item_network"] == "mail") AND isset($buttons["like"]))
unset($buttons["like"]);
if (($item["item_network"] == "dspr") AND ($indent == 'comment'))
if (($item["item_network"] == "dspr") AND ($indent == 'comment') AND isset($buttons["like"]))
unset($buttons["like"]);
// Facebook can like comments - but it isn't programmed in the connector yet.
if (($item["item_network"] == "face") AND ($indent == 'comment'))
if (($item["item_network"] == "face") AND ($indent == 'comment') AND isset($buttons["like"]))
unset($buttons["like"]);


Loading…
Cancel
Save