mirror of
https://github.com/friendica/friendica
synced 2025-04-21 09:50:11 +00:00
Useless info messages removed
This commit is contained in:
parent
0b423b73ac
commit
3fc3ded750
39 changed files with 47 additions and 90 deletions
|
@ -50,7 +50,7 @@ class Index extends BaseAdmin
|
|||
} elseif (Addon::install($addon)) {
|
||||
info(DI::l10n()->t('Addon %s enabled.', $addon));
|
||||
} else {
|
||||
info(DI::l10n()->t('Addon %s failed to install.', $addon));
|
||||
notice(DI::l10n()->t('Addon %s failed to install.', $addon));
|
||||
}
|
||||
|
||||
break;
|
||||
|
|
|
@ -62,7 +62,6 @@ class Server extends BaseAdmin
|
|||
}
|
||||
}
|
||||
DI::config()->set('system', 'blocklist', $blocklist);
|
||||
info(DI::l10n()->t('Site blocklist updated.') . EOL);
|
||||
}
|
||||
|
||||
DI::baseUrl()->redirect('admin/blocklist/server');
|
||||
|
|
|
@ -51,7 +51,6 @@ class Settings extends BaseAdmin
|
|||
DI::config()->set('system', 'loglevel', $loglevel);
|
||||
}
|
||||
|
||||
info(DI::l10n()->t("Log settings updated."));
|
||||
DI::baseUrl()->redirect('admin/logs');
|
||||
}
|
||||
|
||||
|
|
|
@ -250,7 +250,7 @@ class Site extends BaseAdmin
|
|||
DI::baseUrl()->redirect('admin/site' . $active_panel);
|
||||
}
|
||||
} else {
|
||||
info(DI::l10n()->t('Invalid storage backend setting value.'));
|
||||
notice(DI::l10n()->t('Invalid storage backend setting value.'));
|
||||
}
|
||||
|
||||
// Has the directory url changed? If yes, then resubmit the existing profiles there
|
||||
|
@ -433,8 +433,6 @@ class Site extends BaseAdmin
|
|||
|
||||
DI::config()->set('system', 'rino_encrypt' , $rino);
|
||||
|
||||
info(DI::l10n()->t('Site settings updated.') . EOL);
|
||||
|
||||
DI::baseUrl()->redirect('admin/site' . $active_panel);
|
||||
}
|
||||
|
||||
|
|
|
@ -48,8 +48,6 @@ class Details extends BaseAdmin
|
|||
}
|
||||
}
|
||||
|
||||
info(DI::l10n()->t('Theme settings updated.'));
|
||||
|
||||
if (DI::mode()->isAjax()) {
|
||||
return;
|
||||
}
|
||||
|
@ -91,7 +89,7 @@ class Details extends BaseAdmin
|
|||
} elseif (Theme::install($theme)) {
|
||||
info(DI::l10n()->t('Theme %s successfully enabled.', $theme));
|
||||
} else {
|
||||
info(DI::l10n()->t('Theme %s failed to install.', $theme));
|
||||
notice(DI::l10n()->t('Theme %s failed to install.', $theme));
|
||||
}
|
||||
|
||||
DI::baseUrl()->redirect('admin/themes/' . $theme);
|
||||
|
|
|
@ -62,8 +62,6 @@ class Embed extends BaseAdmin
|
|||
}
|
||||
}
|
||||
|
||||
info(DI::l10n()->t('Theme settings updated.'));
|
||||
|
||||
if (DI::mode()->isAjax()) {
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -66,7 +66,7 @@ class Index extends BaseAdmin
|
|||
} elseif (Theme::install($theme)) {
|
||||
info(DI::l10n()->t('Theme %s successfully enabled.', $theme));
|
||||
} else {
|
||||
info(DI::l10n()->t('Theme %s failed to install.', $theme));
|
||||
notice(DI::l10n()->t('Theme %s failed to install.', $theme));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -45,8 +45,6 @@ class Tos extends BaseAdmin
|
|||
DI::config()->set('system', 'tosprivstatement', $displayprivstatement);
|
||||
DI::config()->set('system', 'tostext', $tostext);
|
||||
|
||||
info(DI::l10n()->t('The Terms of Service settings have been updated.'));
|
||||
|
||||
DI::baseUrl()->redirect('admin/tos');
|
||||
}
|
||||
|
||||
|
|
|
@ -116,7 +116,7 @@ class BaseSearch extends BaseModule
|
|||
protected static function printResult(ResultList $results, Pager $pager, $header = '')
|
||||
{
|
||||
if ($results->getTotal() == 0) {
|
||||
info(DI::l10n()->t('No matches'));
|
||||
notice(DI::l10n()->t('No matches'));
|
||||
return '';
|
||||
}
|
||||
|
||||
|
|
|
@ -144,9 +144,7 @@ class Contact extends BaseModule
|
|||
['id' => $contact_id, 'uid' => local_user()]
|
||||
);
|
||||
|
||||
if (DBA::isResult($r)) {
|
||||
info(DI::l10n()->t('Contact updated.') . EOL);
|
||||
} else {
|
||||
if (!DBA::isResult($r)) {
|
||||
notice(DI::l10n()->t('Failed to update contact record.') . EOL);
|
||||
}
|
||||
|
||||
|
|
|
@ -90,9 +90,7 @@ class Advanced extends BaseModule
|
|||
Model\Contact::updateAvatar($photo, local_user(), $contact['id'], true);
|
||||
}
|
||||
|
||||
if ($r) {
|
||||
info(DI::l10n()->t('Contact settings applied.') . EOL);
|
||||
} else {
|
||||
if (!$r) {
|
||||
notice(DI::l10n()->t('Contact update failed.') . EOL);
|
||||
}
|
||||
|
||||
|
|
|
@ -110,9 +110,7 @@ class Poke extends BaseModule
|
|||
*/
|
||||
private static function postReturn(bool $success)
|
||||
{
|
||||
if ($success) {
|
||||
info(DI::l10n()->t('Poke successfully sent.'));
|
||||
} else {
|
||||
if (!$success) {
|
||||
notice(DI::l10n()->t('Error while sending poke, please retry.'));
|
||||
}
|
||||
|
||||
|
|
|
@ -81,7 +81,7 @@ class Community extends BaseModule
|
|||
$items = self::getItems();
|
||||
|
||||
if (!DBA::isResult($items)) {
|
||||
info(DI::l10n()->t('No results.'));
|
||||
notice(DI::l10n()->t('No results.'));
|
||||
return $o;
|
||||
}
|
||||
|
||||
|
|
|
@ -36,7 +36,7 @@ class Feed extends BaseModule
|
|||
public static function init(array $parameters = [])
|
||||
{
|
||||
if (!local_user()) {
|
||||
info(DI::l10n()->t('You must be logged in to use this module'));
|
||||
notice(DI::l10n()->t('You must be logged in to use this module'));
|
||||
DI::baseUrl()->redirect();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -75,7 +75,7 @@ class Directory extends BaseModule
|
|||
$profiles = Profile::searchProfiles($pager->getStart(), $pager->getItemsPerPage(), $search);
|
||||
|
||||
if ($profiles['total'] === 0) {
|
||||
info(DI::l10n()->t('No entries (some entries may be hidden).') . EOL);
|
||||
notice(DI::l10n()->t('No entries (some entries may be hidden).') . EOL);
|
||||
} else {
|
||||
if (in_array('small', $app->argv)) {
|
||||
$photo = 'thumb';
|
||||
|
|
|
@ -59,11 +59,11 @@ class RemoveTag extends BaseModule
|
|||
]);
|
||||
|
||||
if ($item_id && strlen($term)) {
|
||||
if (FileTag::unsaveFile(local_user(), $item_id, $term, $category)) {
|
||||
info('Item removed');
|
||||
if (!FileTag::unsaveFile(local_user(), $item_id, $term, $category)) {
|
||||
notice(DI::l10n()->t('Item was not removed'));
|
||||
}
|
||||
} else {
|
||||
info('Item was not deleted');
|
||||
notice(DI::l10n()->t('Item was not deleted'));
|
||||
}
|
||||
|
||||
DI::baseUrl()->redirect('network?file=' . rawurlencode($term));
|
||||
|
|
|
@ -35,7 +35,7 @@ class SaveTag extends BaseModule
|
|||
public static function init(array $parameters = [])
|
||||
{
|
||||
if (!local_user()) {
|
||||
info(DI::l10n()->t('You must be logged in to use this module'));
|
||||
notice(DI::l10n()->t('You must be logged in to use this module'));
|
||||
DI::baseUrl()->redirect();
|
||||
}
|
||||
}
|
||||
|
@ -54,7 +54,6 @@ class SaveTag extends BaseModule
|
|||
if ($item_id && strlen($term)) {
|
||||
// file item
|
||||
Model\FileTag::saveFile(local_user(), $item_id, $term);
|
||||
info(DI::l10n()->t('Filetag %s saved to item', $term));
|
||||
}
|
||||
|
||||
// return filer dialog
|
||||
|
|
|
@ -53,7 +53,6 @@ class Group extends BaseModule
|
|||
$name = Strings::escapeTags(trim($_POST['groupname']));
|
||||
$r = Model\Group::create(local_user(), $name);
|
||||
if ($r) {
|
||||
info(DI::l10n()->t('Group created.'));
|
||||
$r = Model\Group::getIdByName(local_user(), $name);
|
||||
if ($r) {
|
||||
DI::baseUrl()->redirect('group/' . $r);
|
||||
|
@ -75,8 +74,8 @@ class Group extends BaseModule
|
|||
}
|
||||
$groupname = Strings::escapeTags(trim($_POST['groupname']));
|
||||
if (strlen($groupname) && ($groupname != $group['name'])) {
|
||||
if (Model\Group::update($group['id'], $groupname)) {
|
||||
info(DI::l10n()->t('Group name changed.'));
|
||||
if (!Model\Group::update($group['id'], $groupname)) {
|
||||
notice(DI::l10n()->t('Group name was not changed.'));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -216,9 +215,7 @@ class Group extends BaseModule
|
|||
DI::baseUrl()->redirect('contact');
|
||||
}
|
||||
|
||||
if (Model\Group::remove($a->argv[2])) {
|
||||
info(DI::l10n()->t('Group removed.'));
|
||||
} else {
|
||||
if (!Model\Group::remove($a->argv[2])) {
|
||||
notice(DI::l10n()->t('Unable to remove group.'));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -191,7 +191,7 @@ class Introductions extends BaseNotifications
|
|||
}
|
||||
|
||||
if (count($notifications['notifications']) == 0) {
|
||||
info(DI::l10n()->t('No introductions.') . EOL);
|
||||
notice(DI::l10n()->t('No introductions.') . EOL);
|
||||
$notificationNoContent = DI::l10n()->t('No more %s notifications.', $notifications['ident']);
|
||||
}
|
||||
|
||||
|
|
|
@ -92,7 +92,7 @@ class Contacts extends BaseProfile
|
|||
$contacts_stmt = DBA::select('contact', [], $condition, $params);
|
||||
|
||||
if (!DBA::isResult($contacts_stmt)) {
|
||||
info(DI::l10n()->t('No contacts.') . EOL);
|
||||
notice(DI::l10n()->t('No contacts.') . EOL);
|
||||
return $o;
|
||||
}
|
||||
|
||||
|
|
|
@ -176,7 +176,7 @@ class Index extends BaseSearch
|
|||
}
|
||||
|
||||
if (!DBA::isResult($r)) {
|
||||
info(DI::l10n()->t('No results.'));
|
||||
notice(DI::l10n()->t('No results.'));
|
||||
return $o;
|
||||
}
|
||||
|
||||
|
|
|
@ -41,16 +41,18 @@ class Saved extends BaseModule
|
|||
case 'add':
|
||||
$fields = ['uid' => local_user(), 'term' => $search];
|
||||
if (!DBA::exists('search', $fields)) {
|
||||
DBA::insert('search', $fields);
|
||||
info(DI::l10n()->t('Search term successfully saved.'));
|
||||
if (!DBA::insert('search', $fields)) {
|
||||
notice(DI::l10n()->t('Search term was not saved.'));
|
||||
}
|
||||
} else {
|
||||
info(DI::l10n()->t('Search term already saved.'));
|
||||
notice(DI::l10n()->t('Search term already saved.'));
|
||||
}
|
||||
break;
|
||||
|
||||
case 'remove':
|
||||
DBA::delete('search', ['uid' => local_user(), 'term' => $search]);
|
||||
info(DI::l10n()->t('Search term successfully removed.'));
|
||||
if (!DBA::delete('search', ['uid' => local_user(), 'term' => $search])) {
|
||||
notice(DI::l10n()->t('Search term was not removed.'));
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -134,9 +134,7 @@ class Index extends BaseSettings
|
|||
['uid' => local_user()]
|
||||
);
|
||||
|
||||
if ($result) {
|
||||
info(DI::l10n()->t('Profile updated.'));
|
||||
} else {
|
||||
if (!$result) {
|
||||
notice(DI::l10n()->t('Profile couldn\'t be updated.'));
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -93,9 +93,7 @@ class Index extends BaseSettings
|
|||
|
||||
$filename = '';
|
||||
|
||||
if (Photo::store($Image, local_user(), 0, $resource_id, $filename, DI::l10n()->t('Profile Photos'), 0)) {
|
||||
info(DI::l10n()->t('Image uploaded successfully.'));
|
||||
} else {
|
||||
if (!Photo::store($Image, local_user(), 0, $resource_id, $filename, DI::l10n()->t('Profile Photos'), 0)) {
|
||||
notice(DI::l10n()->t('Image upload failed.'));
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue