]> git.mxchange.org Git - friendica.git/blobdiff - include/Contact.php
Rearranged the logging
[friendica.git] / include / Contact.php
index ea8a5f108ad120938f464db6eaeefff55485da51..15b6813714f2bff59863bb98256c4c39def94956 100644 (file)
@@ -85,7 +85,7 @@ function contact_remove($id) {
 
 function terminate_friendship($user,$self,$contact) {
 
-       /// @TODO Get rid of this, include/datetime.php should care about by itself
+       /// @TODO Get rid of this, include/datetime.php should care about it by itself
        $a = get_app();
 
        require_once('include/datetime.php');
@@ -226,14 +226,14 @@ function get_contact_details_by_url($url, $uid = -1, $default = array()) {
                        dbesc(normalise_link($url)), intval($uid));
 
        // Fetch the data from the contact table with "uid=0" (which is filled automatically)
-       if (!$r)
+       if (!dbm::is_result($r))
                $r = q("SELECT `id`, 0 AS `cid`, `id` AS `zid`, 0 AS `gid`, `uid`, `url`, `nurl`, `alias`, `network`, `name`, `nick`, `addr`, `location`, `about`, `xmpp`,
                        `keywords`, `gender`, `photo`, `thumb`, `micro`, `forum`, `prv`, (`forum` | `prv`) AS `community`, `contact-type`, `bd` AS `birthday`, 0 AS `self`
                        FROM `contact` WHERE `nurl` = '%s' AND `uid` = 0",
                                dbesc(normalise_link($url)));
 
        // Fetch the data from the gcontact table
-       if (!$r)
+       if (!dbm::is_result($r))
                $r = q("SELECT 0 AS `id`, 0 AS `cid`, `id` AS `gid`, 0 AS `zid`, 0 AS `uid`, `url`, `nurl`, `alias`, `network`, `name`, `nick`, `addr`, `location`, `about`, '' AS `xmpp`,
                        `keywords`, `gender`, `photo`, `photo` AS `thumb`, `photo` AS `micro`, `community` AS `forum`, 0 AS `prv`, `community`, `contact-type`, `birthday`, 0 AS `self`
                        FROM `gcontact` WHERE `nurl` = '%s'",
@@ -612,7 +612,7 @@ function get_contact($url, $uid = 0, $no_update = false) {
  *
  * @return string posts in HTML
  */
-function posts_from_gcontact($a, $gcontact_id) {
+function posts_from_gcontact(App $a, $gcontact_id) {
 
        require_once('include/conversation.php');
 
@@ -664,7 +664,7 @@ function posts_from_gcontact($a, $gcontact_id) {
  *
  * @return string posts in HTML
  */
-function posts_from_contact_url($a, $contact_url) {
+function posts_from_contact_url(App $a, $contact_url) {
 
        require_once('include/conversation.php');