]> git.mxchange.org Git - friendica.git/blobdiff - src/Protocol/DFRN.php
Bugfix for check that the DFRN entry already exists
[friendica.git] / src / Protocol / DFRN.php
index 6ec83151f75c9d878547a9ab1dfb64e72da243bc..ca881484611302634828fb397b3fce0625e260ff 100644 (file)
@@ -10,6 +10,7 @@ namespace Friendica\Protocol;
 
 use Friendica\App;
 use Friendica\Content\OEmbed;
+use Friendica\Content\Text\BBCode;
 use Friendica\Core\Addon;
 use Friendica\Core\Config;
 use Friendica\Core\L10n;
@@ -29,8 +30,6 @@ use Friendica\Util\Crypto;
 use Friendica\Util\DateTimeFormat;
 use Friendica\Util\Network;
 use Friendica\Util\XML;
-use Friendica\Content\Text\BBCode;
-
 use dba;
 use DOMDocument;
 use DOMXPath;
@@ -929,7 +928,7 @@ class DFRN
                }
 
                // Remove the abstract element. It is only locally important.
-               $body = remove_abstract($body);
+               $body = BBCode::stripAbstract($body);
 
                if ($type == 'html') {
                        $htmlbody = $body;
@@ -2412,10 +2411,8 @@ class DFRN
                );
 
                // Is there an existing item?
-               if (DBM::is_result($current) && self::isEditedTimestampNewer($current[0], $item)
-                       && (DateTimeFormat::utc($item["edited"]) < $current[0]["edited"])
-               ) {
-                       logger("Item ".$item["uri"]." already existed.", LOGGER_DEBUG);
+               if (DBM::is_result($current) && !self::isEditedTimestampNewer($current[0], $item)) {
+                       logger("Item ".$item["uri"]." already existed in this version.", LOGGER_DEBUG);
                        return;
                }