]> git.mxchange.org Git - friendica.git/blobdiff - mod/wall_upload.php
Remove network exception in handle_tag
[friendica.git] / mod / wall_upload.php
index f4632f835c15bc495c0bb9a1ea71cc366fbffdaa..c23c3adbc6e7e8295fdf01171618008038769561 100644 (file)
@@ -13,6 +13,7 @@ use Friendica\Core\L10n;
 use Friendica\Core\System;
 use Friendica\Core\Config;
 use Friendica\Database\DBA;
+use Friendica\Model\Contact;
 use Friendica\Model\Photo;
 use Friendica\Object\Image;
 
@@ -30,7 +31,7 @@ function wall_upload_post(App $a, $desktopmode = true)
                                INNER JOIN `contact` on `user`.`uid` = `contact`.`uid`
                                WHERE `user`.`nickname` = '%s' AND `user`.`blocked` = 0
                                AND `contact`.`self` = 1 LIMIT 1",
-                               dbesc($nick)
+                               DBA::escape($nick)
                        );
 
                        if (!DBA::isResult($r)) {
@@ -46,7 +47,7 @@ function wall_upload_post(App $a, $desktopmode = true)
                                INNER JOIN `contact` on `user`.`uid` = `contact`.`uid`
                                WHERE `user`.`nickname` = '%s' AND `user`.`blocked` = 0
                                AND `contact`.`self` = 1 LIMIT 1",
-                               dbesc($user_info['screen_name'])
+                               DBA::escape($user_info['screen_name'])
                        );
                }
        } else {
@@ -66,7 +67,7 @@ function wall_upload_post(App $a, $desktopmode = true)
        $page_owner_uid   = $r[0]['uid'];
        $default_cid      = $r[0]['id'];
        $page_owner_nick  = $r[0]['nickname'];
-       $community_page   = (($r[0]['page-flags'] == PAGE_COMMUNITY) ? true : false);
+       $community_page   = (($r[0]['page-flags'] == Contact::PAGE_COMMUNITY) ? true : false);
 
        if ((local_user()) && (local_user() == $page_owner_uid)) {
                $can_post = true;