]> git.mxchange.org Git - friendica.git/blobdiff - mod/common.php
The first queries are replaced with the new functions. More to come ...
[friendica.git] / mod / common.php
index d18389559d3017996c2856781274a62bf2f4a792..87e305e68d0b9ffc09f5d3914dbc215f73a9cfc7 100644 (file)
@@ -1,5 +1,7 @@
 <?php
 
+use Friendica\App;
+
 require_once('include/socgraph.php');
 require_once('include/Contact.php');
 require_once('include/contact_selectors.php');
@@ -57,21 +59,20 @@ function common_content(App $a) {
                return;
        }
 
-       if (! $cid) {
-               if (get_my_url()) {
+       if(! $cid) {
+               if(get_my_url()) {
                        $r = q("SELECT `id` FROM `contact` WHERE `nurl` = '%s' AND `uid` = %d LIMIT 1",
                                dbesc(normalise_link(get_my_url())),
                                intval($profile_uid)
                        );
-                       if (dbm::is_result($r)) {
+                       if (dbm::is_result($r))
                                $cid = $r[0]['id'];
-                       else {
+                       else {
                                $r = q("SELECT `id` FROM `gcontact` WHERE `nurl` = '%s' LIMIT 1",
                                        dbesc(normalise_link(get_my_url()))
                                );
-                               if (dbm::is_result($r)) {
+                               if (dbm::is_result($r))
                                        $zcid = $r[0]['id'];
-                               }
                        }
                }
        }