mirror of
https://github.com/friendica/friendica
synced 2025-04-26 06:30:11 +00:00
The notice and info have been moved
This commit is contained in:
parent
20291ddc2b
commit
fdfa1f8630
73 changed files with 273 additions and 284 deletions
|
@ -34,7 +34,7 @@ class Directory extends BaseSearch
|
|||
protected function content(array $request = []): string
|
||||
{
|
||||
if (!local_user()) {
|
||||
notice(DI::l10n()->t('Permission denied.'));
|
||||
DI::sysmsg()->addNotice(DI::l10n()->t('Permission denied.'));
|
||||
return Login::form();
|
||||
}
|
||||
|
||||
|
|
|
@ -149,7 +149,7 @@ class Index extends BaseSearch
|
|||
// 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)) {
|
||||
Logger::info('Skipping tag and fulltext search since the search looks like a URL.', ['q' => $search]);
|
||||
notice(DI::l10n()->t('No results.'));
|
||||
DI::sysmsg()->addNotice(DI::l10n()->t('No results.'));
|
||||
return $o;
|
||||
}
|
||||
|
||||
|
@ -191,7 +191,7 @@ class Index extends BaseSearch
|
|||
|
||||
if (empty($items)) {
|
||||
if (empty($last_uriid)) {
|
||||
notice(DI::l10n()->t('No results.'));
|
||||
DI::sysmsg()->addNotice(DI::l10n()->t('No results.'));
|
||||
}
|
||||
return $o;
|
||||
}
|
||||
|
|
|
@ -26,6 +26,7 @@ use Friendica\BaseModule;
|
|||
use Friendica\Core\L10n;
|
||||
use Friendica\Core\Search;
|
||||
use Friendica\Database\Database;
|
||||
use Friendica\DI;
|
||||
use Friendica\Module\Response;
|
||||
use Friendica\Util\Profiler;
|
||||
use Psr\Log\LoggerInterface;
|
||||
|
@ -55,16 +56,16 @@ class Saved extends BaseModule
|
|||
$fields = ['uid' => local_user(), 'term' => $search];
|
||||
if (!$this->dba->exists('search', $fields)) {
|
||||
if (!$this->dba->insert('search', $fields)) {
|
||||
notice($this->t('Search term was not saved.'));
|
||||
DI::sysmsg()->addNotice($this->t('Search term was not saved.'));
|
||||
}
|
||||
} else {
|
||||
notice($this->t('Search term already saved.'));
|
||||
DI::sysmsg()->addNotice($this->t('Search term already saved.'));
|
||||
}
|
||||
break;
|
||||
|
||||
case 'remove':
|
||||
if (!$this->dba->delete('search', ['uid' => local_user(), 'term' => $search])) {
|
||||
notice($this->t('Search term was not removed.'));
|
||||
DI::sysmsg()->addNotice($this->t('Search term was not removed.'));
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue