X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=mod%2Fpoco.php;h=d8941e51ade5c6de1caa52d71197d6693bc06c8e;hb=977248f5105a2b3f127d0aa752ce27214605fbf0;hp=595a4bd2ee4affd4393642534c10f1d37f1b30d5;hpb=33664ebb48f415dd74a32da13edb25f54e494134;p=friendica.git diff --git a/mod/poco.php b/mod/poco.php index 595a4bd2ee..d8941e51ad 100644 --- a/mod/poco.php +++ b/mod/poco.php @@ -6,7 +6,6 @@ use Friendica\App; use Friendica\Content\Text\BBCode; -use Friendica\Core\Config; use Friendica\Core\Logger; use Friendica\Core\Protocol; use Friendica\Core\Renderer; @@ -20,7 +19,7 @@ use Friendica\Util\XML; function poco_init(App $a) { $system_mode = false; - if (intval(Config::get('system', 'block_public')) || (Config::get('system', 'block_local_dir'))) { + if (intval(DI::config()->get('system', 'block_public')) || (DI::config()->get('system', 'block_local_dir'))) { throw new \Friendica\Network\HTTPException\ForbiddenException(); } @@ -68,7 +67,7 @@ function poco_init(App $a) { if (! $system_mode && ! $global) { $users = q("SELECT `user`.*,`profile`.`hide-friends` from user left join profile on `user`.`uid` = `profile`.`uid` - where `user`.`nickname` = '%s' and `profile`.`is-default` = 1 limit 1", + where `user`.`nickname` = '%s' limit 1", DBA::escape($nickname) ); if (! DBA::isResult($users) || $users[0]['hidewall'] || $users[0]['hide-friends']) { @@ -141,7 +140,7 @@ function poco_init(App $a) { `profile`.`postal-code` AS `ppostalcode`, `profile`.`country-name` AS `pcountry`, `user`.`account-type` FROM `contact` INNER JOIN `profile` ON `profile`.`uid` = `contact`.`uid` INNER JOIN `user` ON `user`.`uid` = `contact`.`uid` - WHERE `self` = 1 AND `profile`.`is-default` + WHERE `self` = 1 AND `contact`.`uid` IN (SELECT `uid` FROM `pconfig` WHERE `cat` = 'system' AND `k` = 'suggestme' AND `v` = 1) LIMIT %d, %d", intval($startIndex), intval($itemsPerPage)