]> git.mxchange.org Git - friendica.git/blobdiff - mod/crepair.php
Changed $a->get_baseurl() to App::get_baseurl()
[friendica.git] / mod / crepair.php
index 3abbe343b26d0d09709fe0bcd9f3e47a50ab9757..c141958e8b958778acddab4e78858f7f2fd5697d 100644 (file)
@@ -2,9 +2,10 @@
 require_once("include/contact_selectors.php");
 require_once("mod/contacts.php");
 
-function crepair_init(&$a) {
-       if(! local_user())
+function crepair_init(App &$a) {
+       if (! local_user()) {
                return;
+       }
 
        $contact_id = 0;
 
@@ -14,7 +15,7 @@ function crepair_init(&$a) {
                        intval(local_user()),
                        intval($contact_id)
                );
-               if(! count($r)) {
+               if (! dbm::is_result($r)) {
                        $contact_id = 0;
                }
        }
@@ -29,10 +30,10 @@ function crepair_init(&$a) {
        }
 }
 
-
-function crepair_post(&$a) {
-       if(! local_user())
+function crepair_post(App &$a) {
+       if (! local_user()) {
                return;
+       }
 
        $cid = (($a->argc > 1) ? intval($a->argv[1]) : 0);
 
@@ -43,8 +44,9 @@ function crepair_post(&$a) {
                );
        }
 
-       if(! count($r))
+       if (! dbm::is_result($r)) {
                return;
+       }
 
        $contact = $r[0];
 
@@ -94,9 +96,9 @@ function crepair_post(&$a) {
 
 
 
-function crepair_content(&$a) {
+function crepair_content(App &$a) {
 
-       if(! local_user()) {
+       if (! local_user()) {
                notice( t('Permission denied.') . EOL);
                return;
        }
@@ -110,7 +112,7 @@ function crepair_content(&$a) {
                );
        }
 
-       if(! count($r)) {
+       if (! dbm::is_result($r)) {
                notice( t('Contact not found.') . EOL);
                return;
        }