X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FModel%2FConversation.php;h=06d3ba536d0567544af65558a85dc74d14eb47f3;hb=1b339547f304430b40e3178d9e2a9379ac11cbd1;hp=3332d93e0fac79c4bd55cf2ed3cc92e05367299f;hpb=14fde5dc9b1915392601fb94efc6224c01f2b216;p=friendica.git diff --git a/src/Model/Conversation.php b/src/Model/Conversation.php index 3332d93e0f..06d3ba536d 100644 --- a/src/Model/Conversation.php +++ b/src/Model/Conversation.php @@ -10,8 +10,6 @@ use Friendica\Core\Protocol; use Friendica\Database\DBA; use Friendica\Util\DateTimeFormat; -require_once "include/dba.php"; - class Conversation { /* @@ -37,6 +35,7 @@ class Conversation * * @param array $arr Item array with conversation data * @return array Item array with removed conversation data + * @throws \Exception */ public static function insert(array $arr) { @@ -78,18 +77,18 @@ class Conversation } // Update structure data all the time but the source only when its from a better protocol. if (empty($conversation['source']) || (!empty($old_conv['source']) && - ($old_conv['protocol'] < defaults($conversation, 'protocol', PARCEL_UNKNOWN)))) { + ($old_conv['protocol'] < defaults($conversation, 'protocol', self::PARCEL_UNKNOWN)))) { unset($conversation['protocol']); unset($conversation['source']); } if (!DBA::update('conversation', $conversation, ['item-uri' => $conversation['item-uri']], $old_conv)) { Logger::log('Conversation: update for ' . $conversation['item-uri'] . ' from ' . $old_conv['protocol'] . ' to ' . $conversation['protocol'] . ' failed', - LOGGER_DEBUG); + Logger::DEBUG); } } else { if (!DBA::insert('conversation', $conversation, true)) { Logger::log('Conversation: insert for ' . $conversation['item-uri'] . ' (protocol ' . $conversation['protocol'] . ') failed', - LOGGER_DEBUG); + Logger::DEBUG); } } }