mirror of
https://github.com/friendica/friendica
synced 2025-04-30 03:04:23 +02: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
|
@ -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