]> git.mxchange.org Git - friendica.git/blobdiff - mod/common.php
Class file relocations
[friendica.git] / mod / common.php
index d18389559d3017996c2856781274a62bf2f4a792..12f1ba27371d5489d241b88f4a0033919aa0d8a9 100644 (file)
@@ -1,5 +1,8 @@
 <?php
 
+use Friendica\App;
+use Friendica\Database\DBM;
+
 require_once('include/socgraph.php');
 require_once('include/Contact.php');
 require_once('include/contact_selectors.php');
@@ -32,14 +35,14 @@ function common_content(App $a) {
                        intval($cid),
                        intval($uid)
                );
-               /// @TODO Handle $c with dbm::is_result()
+               /// @TODO Handle $c with DBM::is_result()
                $a->page['aside'] = "";
                profile_load($a, "", 0, get_contact_details_by_url($c[0]["url"]));
        } else {
                $c = q("SELECT `name`, `url`, `photo` FROM `contact` WHERE `self` = 1 AND `uid` = %d LIMIT 1",
                        intval($uid)
                );
-               /// @TODO Handle $c with dbm::is_result()
+               /// @TODO Handle $c with DBM::is_result()
 
                $vcard_widget .= replace_macros(get_markup_template("vcard-widget.tpl"),array(
                        '$name' => htmlentities($c[0]['name']),
@@ -53,25 +56,24 @@ function common_content(App $a) {
                $a->page['aside'] .= $vcard_widget;
        }
 
-       if (! dbm::is_result($c)) {
+       if (! DBM::is_result($c)) {
                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'];
-                               }
                        }
                }
        }
@@ -101,7 +103,7 @@ function common_content(App $a) {
        }
 
 
-       if (! dbm::is_result($r)) {
+       if (! DBM::is_result($r)) {
                return $o;
        }