mirror of
https://github.com/friendica/friendica
synced 2025-02-07 06:58:50 +00:00
Replace Logger with $this->logger in all Module classes
This commit is contained in:
parent
d4873dbc6b
commit
c6cef6bbce
2 changed files with 5 additions and 7 deletions
|
@ -7,7 +7,6 @@
|
||||||
|
|
||||||
namespace Friendica\Module\Api\GNUSocial\Statusnet;
|
namespace Friendica\Module\Api\GNUSocial\Statusnet;
|
||||||
|
|
||||||
use Friendica\Core\Logger;
|
|
||||||
use Friendica\Database\DBA;
|
use Friendica\Database\DBA;
|
||||||
use Friendica\Module\BaseApi;
|
use Friendica\Module\BaseApi;
|
||||||
use Friendica\DI;
|
use Friendica\DI;
|
||||||
|
@ -40,7 +39,7 @@ class Conversation extends BaseApi
|
||||||
$id = $this->getRequestValue($request, 'id', 0);
|
$id = $this->getRequestValue($request, 'id', 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
Logger::info(BaseApi::LOG_PREFIX . '{subaction}', ['module' => 'api', 'action' => 'conversation', 'subaction' => 'show', 'id' => $id]);
|
$this->logger->info(BaseApi::LOG_PREFIX . '{subaction}', ['module' => 'api', 'action' => 'conversation', 'subaction' => 'show', 'id' => $id]);
|
||||||
|
|
||||||
// try to fetch the item for the local user - or the public item, if there is no local one
|
// try to fetch the item for the local user - or the public item, if there is no local one
|
||||||
$item = Post::selectFirst(['parent-uri-id'], ['uri-id' => $id]);
|
$item = Post::selectFirst(['parent-uri-id'], ['uri-id' => $id]);
|
||||||
|
|
|
@ -15,7 +15,6 @@ use Friendica\Content\Text\HTML;
|
||||||
use Friendica\Content\Widget;
|
use Friendica\Content\Widget;
|
||||||
use Friendica\Core\Cache\Enum\Duration;
|
use Friendica\Core\Cache\Enum\Duration;
|
||||||
use Friendica\Core\L10n;
|
use Friendica\Core\L10n;
|
||||||
use Friendica\Core\Logger;
|
|
||||||
use Friendica\Core\Renderer;
|
use Friendica\Core\Renderer;
|
||||||
use Friendica\Core\Search;
|
use Friendica\Core\Search;
|
||||||
use Friendica\Database\DBA;
|
use Friendica\Database\DBA;
|
||||||
|
@ -134,7 +133,7 @@ class Index extends BaseSearch
|
||||||
// Don't perform a fulltext or tag search on search results that look like an URL
|
// Don't perform a fulltext or tag search on search results that look like an URL
|
||||||
// Tags don't look like an URL and the fulltext search does only work with natural words
|
// Tags don't look like an URL and the fulltext search does only work with natural words
|
||||||
if (parse_url($search, PHP_URL_SCHEME) && parse_url($search, PHP_URL_HOST)) {
|
if (parse_url($search, PHP_URL_SCHEME) && parse_url($search, PHP_URL_HOST)) {
|
||||||
Logger::info('Skipping tag and fulltext search since the search looks like a URL.', ['q' => $search]);
|
$this->logger->info('Skipping tag and fulltext search since the search looks like a URL.', ['q' => $search]);
|
||||||
DI::sysmsg()->addNotice(DI::l10n()->t('No results.'));
|
DI::sysmsg()->addNotice(DI::l10n()->t('No results.'));
|
||||||
return $o;
|
return $o;
|
||||||
}
|
}
|
||||||
|
@ -159,11 +158,11 @@ class Index extends BaseSearch
|
||||||
$pager = new Pager(DI::l10n(), DI::args()->getQueryString(), $itemsPerPage);
|
$pager = new Pager(DI::l10n(), DI::args()->getQueryString(), $itemsPerPage);
|
||||||
|
|
||||||
if ($tag) {
|
if ($tag) {
|
||||||
Logger::info('Start tag search.', ['q' => $search, 'start' => $pager->getStart(), 'items' => $pager->getItemsPerPage(), 'last' => $last_uriid]);
|
$this->logger->info('Start tag search.', ['q' => $search, 'start' => $pager->getStart(), 'items' => $pager->getItemsPerPage(), 'last' => $last_uriid]);
|
||||||
$uriids = Tag::getURIIdListByTag($search, DI::userSession()->getLocalUserId(), $pager->getStart(), $pager->getItemsPerPage(), $last_uriid);
|
$uriids = Tag::getURIIdListByTag($search, DI::userSession()->getLocalUserId(), $pager->getStart(), $pager->getItemsPerPage(), $last_uriid);
|
||||||
$count = Tag::countByTag($search, DI::userSession()->getLocalUserId());
|
$count = Tag::countByTag($search, DI::userSession()->getLocalUserId());
|
||||||
} else {
|
} else {
|
||||||
Logger::info('Start fulltext search.', ['q' => $search]);
|
$this->logger->info('Start fulltext search.', ['q' => $search]);
|
||||||
$uriids = Post\Content::getURIIdListBySearch($search, DI::userSession()->getLocalUserId(), $pager->getStart(), $pager->getItemsPerPage(), $last_uriid);
|
$uriids = Post\Content::getURIIdListBySearch($search, DI::userSession()->getLocalUserId(), $pager->getStart(), $pager->getItemsPerPage(), $last_uriid);
|
||||||
$count = Post\Content::countBySearch($search, DI::userSession()->getLocalUserId());
|
$count = Post\Content::countBySearch($search, DI::userSession()->getLocalUserId());
|
||||||
}
|
}
|
||||||
|
@ -197,7 +196,7 @@ class Index extends BaseSearch
|
||||||
'$title' => $title
|
'$title' => $title
|
||||||
]);
|
]);
|
||||||
|
|
||||||
Logger::info('Start Conversation.', ['q' => $search]);
|
$this->logger->info('Start Conversation.', ['q' => $search]);
|
||||||
|
|
||||||
$o .= DI::conversation()->render($items, Conversation::MODE_SEARCH, false, false, 'commented', DI::userSession()->getLocalUserId());
|
$o .= DI::conversation()->render($items, Conversation::MODE_SEARCH, false, false, 'commented', DI::userSession()->getLocalUserId());
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue