]> git.mxchange.org Git - friendica.git/blobdiff - mod/item.php
Only perform OAuth when no login data are provided
[friendica.git] / mod / item.php
index 4e14a047f5577f45e6ac2b04a518d04c0c8dd460..a9f1ef808baad0daf07f45f6504851967bb25db1 100644 (file)
@@ -40,7 +40,6 @@ use Friendica\Core\Worker;
 use Friendica\Database\DBA;
 use Friendica\DI;
 use Friendica\Model\Attach;
-use Friendica\Model\Config\PConfig;
 use Friendica\Model\Contact;
 use Friendica\Model\Conversation;
 use Friendica\Model\FileTag;
@@ -303,10 +302,10 @@ function item_post(App $a) {
 
                if (strlen($str_group_allow) || strlen($str_contact_allow) || strlen($str_group_deny) || strlen($str_contact_deny)) {
                        $private = Item::PRIVATE;
-               } elseif (PConfig::get($profile_uid, 'system', 'unlisted')) {
-                       $private == Item::UNLISTED;
+               } elseif (DI::pConfig()->get($profile_uid, 'system', 'unlisted')) {
+                       $private = Item::UNLISTED;
                } else {
-                       $private == Item::PUBLIC;
+                       $private = Item::PUBLIC;
                }
 
                // If this is a comment, set the permissions from the parent.