]> git.mxchange.org Git - friendica.git/commitdiff
Useless info messages removed
authorMichael <heluecht@pirati.ca>
Thu, 23 Jul 2020 06:11:21 +0000 (06:11 +0000)
committerMichael <heluecht@pirati.ca>
Thu, 23 Jul 2020 06:11:21 +0000 (06:11 +0000)
39 files changed:
mod/events.php
mod/follow.php
mod/item.php
mod/message.php
mod/network.php
mod/oexchange.php
mod/photos.php
mod/settings.php
mod/tagrm.php
mod/unfollow.php
mod/wallmessage.php
src/App/Authentication.php
src/App/Module.php
src/Core/UserImport.php
src/Model/FileTag.php
src/Module/Admin/Addons/Index.php
src/Module/Admin/Blocklist/Server.php
src/Module/Admin/Logs/Settings.php
src/Module/Admin/Site.php
src/Module/Admin/Themes/Details.php
src/Module/Admin/Themes/Embed.php
src/Module/Admin/Themes/Index.php
src/Module/Admin/Tos.php
src/Module/BaseSearch.php
src/Module/Contact.php
src/Module/Contact/Advanced.php
src/Module/Contact/Poke.php
src/Module/Conversation/Community.php
src/Module/Debug/Feed.php
src/Module/Directory.php
src/Module/Filer/RemoveTag.php
src/Module/Filer/SaveTag.php
src/Module/Group.php
src/Module/Notifications/Introductions.php
src/Module/Profile/Contacts.php
src/Module/Search/Index.php
src/Module/Search/Saved.php
src/Module/Settings/Profile/Index.php
src/Module/Settings/Profile/Photo/Index.php

index 437cc160b44493b3b6a0aac0808a35d36888a6e8..0c16044b48ae1fef8fbafc6e048ca9fa6f099165 100644 (file)
@@ -584,8 +584,6 @@ function events_content(App $a)
 
                if (Item::exists(['id' => $ev[0]['itemid']])) {
                        notice(DI::l10n()->t('Failed to remove event') . EOL);
-               } else {
-                       info(DI::l10n()->t('Event removed') . EOL);
                }
 
                DI::baseUrl()->redirect('events');
index 141fa9fdba2c392ab6748c7d5c2b41cc4399f6ab..ac07d040cc99afb11d9afcbe9747fa91de507c16 100644 (file)
@@ -62,7 +62,7 @@ function follow_post(App $a)
                DI::baseUrl()->redirect('contact/' . $result['cid']);
        }
 
-       info(DI::l10n()->t('The contact could not be added.'));
+       notice(DI::l10n()->t('The contact could not be added.'));
 
        DI::baseUrl()->redirect($return_path);
        // NOTREACHED
index c4d7231c22934d7d21ef447834c93612ff7a5130..57fb64e3dac8d3c4864407cb775bdad493a5a23a 100644 (file)
@@ -333,7 +333,7 @@ function item_post(App $a) {
                                System::jsonExit(['preview' => '']);
                        }
 
-                       info(DI::l10n()->t('Empty post discarded.'));
+                       notice(DI::l10n()->t('Empty post discarded.'));
                        if ($return_path) {
                                DI::baseUrl()->redirect($return_path);
                        }
@@ -703,7 +703,6 @@ function item_post(App $a) {
                // update filetags in pconfig
                FileTag::updatePconfig($uid, $categories_old, $categories_new, 'category');
 
-               info(DI::l10n()->t('Post updated.'));
                if ($return_path) {
                        DI::baseUrl()->redirect($return_path);
                }
@@ -725,7 +724,7 @@ function item_post(App $a) {
        $post_id = Item::insert($datarray);
 
        if (!$post_id) {
-               info(DI::l10n()->t('Item wasn\'t stored.'));
+               notice(DI::l10n()->t('Item wasn\'t stored.'));
                if ($return_path) {
                        DI::baseUrl()->redirect($return_path);
                }
@@ -826,7 +825,6 @@ function item_post(App $a) {
                return $post_id;
        }
 
-       info(DI::l10n()->t('Post published.'));
        item_post_return(DI::baseUrl(), $api_source, $return_path);
        // NOTREACHED
 }
index 438f96030b529808bbbf4889a281c539b8f6ef2c..4404e6aff81f0650a1e549247cd6ed8e6af8e353 100644 (file)
@@ -94,8 +94,6 @@ function message_post(App $a)
                case -4:
                        notice(DI::l10n()->t('Message collection failure.') . EOL);
                        break;
-               default:
-                       info(DI::l10n()->t('Message sent.') . EOL);
        }
 
        // fake it to go back to the input form if no recipient listed
@@ -178,17 +176,16 @@ function message_content(App $a)
                if ($cmd === 'drop') {
                        $message = DBA::selectFirst('mail', ['convid'], ['id' => $a->argv[2], 'uid' => local_user()]);
                        if(!DBA::isResult($message)){
-                               info(DI::l10n()->t('Conversation not found.') . EOL);
+                               notice(DI::l10n()->t('Conversation not found.') . EOL);
                                DI::baseUrl()->redirect('message');
                        }
 
-                       if (DBA::delete('mail', ['id' => $a->argv[2], 'uid' => local_user()])) {
-                               info(DI::l10n()->t('Message deleted.') . EOL);
+                       if (!DBA::delete('mail', ['id' => $a->argv[2], 'uid' => local_user()])) {
+                               notice(DI::l10n()->t('Message was not deleted.') . EOL);
                        }
 
                        $conversation = DBA::selectFirst('mail', ['id'], ['convid' => $message['convid'], 'uid' => local_user()]);
                        if(!DBA::isResult($conversation)){
-                               info(DI::l10n()->t('Conversation removed.') . EOL);
                                DI::baseUrl()->redirect('message');
                        }
 
@@ -201,8 +198,8 @@ function message_content(App $a)
                        if (DBA::isResult($r)) {
                                $parent = $r[0]['parent-uri'];
 
-                               if (DBA::delete('mail', ['parent-uri' => $parent, 'uid' => local_user()])) {
-                                       info(DI::l10n()->t('Conversation removed.') . EOL);
+                               if (!DBA::delete('mail', ['parent-uri' => $parent, 'uid' => local_user()])) {
+                                       notice(DI::l10n()->t('Conversation was not removed.') . EOL);
                                }
                        }
                        DI::baseUrl()->redirect('message');
@@ -301,7 +298,7 @@ function message_content(App $a)
                $r = get_messages(local_user(), $pager->getStart(), $pager->getItemsPerPage());
 
                if (!DBA::isResult($r)) {
-                       info(DI::l10n()->t('No messages.') . EOL);
+                       notice(DI::l10n()->t('No messages.') . EOL);
                        return $o;
                }
 
index f847e6757e0da2ab049dc6aaef81e0bd4b790f8d..2afc90dbf1389822b8ba244442e3068e205bdb82 100644 (file)
@@ -305,7 +305,7 @@ function network_content(App $a, $update = 0, $parent = 0)
        }
 
        if ($o === '') {
-               info("No items found");
+               notice("No items found");
        }
 
        return $o;
@@ -569,7 +569,7 @@ function networkThreadedView(App $a, $update, $parent)
                        $sql_extra3 .= " OR (`thread`.`contact-id` = '$contact_str_self' AND `temp1`.`allow_gid` LIKE '" . Strings::protectSprintf('%<' . intval($gid) . '>%') . "' AND `temp1`.`private`))";
                } else {
                        $sql_extra3 .= " AND false ";
-                       info(DI::l10n()->t('Group is empty'));
+                       notice(DI::l10n()->t('Group is empty'));
                }
 
                $o = Renderer::replaceMacros(Renderer::getMarkupTemplate('section_title.tpl'), [
index 97367c3ea5f964ff0b9c25c5912770e90825caf5..6a05d4994461cb3e7e30075682e9363f9163ce33 100644 (file)
@@ -45,7 +45,6 @@ function oexchange_content(App $a) {
        }
 
        if (($a->argc > 1) && $a->argv[1] === 'done') {
-               info(DI::l10n()->t('Post successful.') . EOL);
                return;
        }
 
index f33a9241eff476f4d3cd6c0f8d3cf3752353a930..4118b806950869f1be93e4e9a0916d1b8c4a9aaa 100644 (file)
@@ -295,7 +295,6 @@ function photos_post(App $a)
 
                                // Update the photo albums cache
                                Photo::clearAlbumCache($page_owner_uid);
-                               notice('Successfully deleted the photo.');
                        } else {
                                notice('Failed to delete the photo.');
                                DI::baseUrl()->redirect('photos/' . $a->argv[1] . '/image/' . $a->argv[3]);
index 9b2f4f650e7d9e155f91d75dd869f70f015fce72..14db27e6f8a5d3f4ac4f133a277aff4b5ecae83c 100644 (file)
@@ -202,9 +202,6 @@ function settings_post(App $a)
                                                }
                                        }
                                }
-                               if (!$failed) {
-                                       info(DI::l10n()->t('Email settings updated.') . EOL);
-                               }
                        }
                }
 
@@ -219,7 +216,6 @@ function settings_post(App $a)
                                DI::pConfig()->set(local_user(), 'feature', substr($k, 8), ((intval($v)) ? 1 : 0));
                        }
                }
-               info(DI::l10n()->t('Features updated') . EOL);
                return;
        }
 
@@ -231,7 +227,7 @@ function settings_post(App $a)
                        // was there an error
                        if ($_FILES['importcontact-filename']['error'] > 0) {
                                Logger::notice('Contact CSV file upload error');
-                               info(DI::l10n()->t('Contact CSV file upload error'));
+                               notice(DI::l10n()->t('Contact CSV file upload error'));
                        } else {
                                $csvArray = array_map('str_getcsv', file($_FILES['importcontact-filename']['tmp_name']));
                                // import contacts
@@ -443,8 +439,8 @@ function settings_post(App $a)
                $fields['openidserver'] = '';
        }
 
-       if (DBA::update('user', $fields, ['uid' => local_user()])) {
-               info(DI::l10n()->t('Settings updated.') . EOL);
+       if (!DBA::update('user', $fields, ['uid' => local_user()])) {
+               notice(DI::l10n()->t('Settings were not updated.') . EOL);
        }
 
        // clear session language
index 4022f999db3c04a87b7130e3d358dca6e2a0a1db..179276663b0fc5e60dba427ccae776c39d4d5d55 100644 (file)
@@ -44,7 +44,6 @@ function tagrm_post(App $a)
 
        $item_id = $_POST['item'] ?? 0;
        update_tags($item_id, $tags);
-       info(DI::l10n()->t('Tag(s) removed') . EOL);
 
        DI::baseUrl()->redirect($_SESSION['photo_return']);
        // NOTREACHED
index 09466ba8027dc91b1d68d21cf036fa42e9315144..5ccc9c859af35382b5923dfa786cb8f2cf12a665 100644 (file)
@@ -79,7 +79,6 @@ function unfollow_post(App $a)
                $return_path = $base_return_path . '/' . $contact['id'];
        }
 
-       info(DI::l10n()->t('Contact unfollowed'));
        DI::baseUrl()->redirect($return_path);
        // NOTREACHED
 }
index e5b482a65e94ed4eb3f9a1e09187e6a2421a0c3b..82d87ca2905bf26f19baa45d4d8c3cfda32f0711 100644 (file)
@@ -84,8 +84,6 @@ function wallmessage_post(App $a) {
                case -4:
                        notice(DI::l10n()->t('Message collection failure.') . EOL);
                        break;
-               default:
-                       info(DI::l10n()->t('Message sent.') . EOL);
        }
 
        DI::baseUrl()->redirect('profile/'.$user['nickname']);
index 678bb0058c692e2aae978471f5cd1717e4251cb2..a0ce5df650f7a365cb1267833a578628820300cb 100644 (file)
@@ -270,7 +270,7 @@ class Authentication
                        }
                } catch (Exception $e) {
                        $this->logger->warning('authenticate: failed login attempt', ['action' => 'login', 'username' => Strings::escapeTags($username), 'ip' => $_SERVER['REMOTE_ADDR']]);
-                       info($this->l10n->t('Login failed. Please check your credentials.' . EOL));
+                       notice($this->l10n->t('Login failed. Please check your credentials.' . EOL));
                        $this->baseUrl->redirect();
                }
 
@@ -389,8 +389,6 @@ class Authentication
                                info($this->l10n->t('Welcome %s', $user_record['username']));
                                info($this->l10n->t('Please upload a profile photo.'));
                                $this->baseUrl->redirect('settings/profile/photo/new');
-                       } else {
-                               info($this->l10n->t("Welcome back %s", $user_record['username']));
                        }
                }
 
index 4b9eb68bdd085425242d2d4b70d7adf9a27ad754..58c595cb7baf18c092eff15537f781fd08a88459 100644 (file)
@@ -237,7 +237,7 @@ class Module
        public function run(Core\L10n $l10n, App\BaseURL $baseUrl, LoggerInterface $logger, array $server, array $post)
        {
                if ($this->printNotAllowedAddon) {
-                       info($l10n->t("You must be logged in to use addons. "));
+                       notice($l10n->t("You must be logged in to use addons. "));
                }
 
                /* The URL provided does not resolve to a valid module.
index 06ba6398a85930f37faf74446ba39b5cecfaaa15..ed131910c74c9444cdcd8926d2854ffa7c25f6af 100644 (file)
@@ -271,7 +271,7 @@ class UserImport
 
                                if ($r === false) {
                                        Logger::log("uimport:insert profile: ERROR : " . DBA::errorMessage(), Logger::INFO);
-                                       info(DI::l10n()->t("User profile creation error"));
+                                       notice(DI::l10n()->t("User profile creation error"));
                                        DBA::delete('user', ['uid' => $newuid]);
                                        DBA::delete('profile_field', ['uid' => $newuid]);
                                        return;
index 0b728e33d7c979b3046dc658dfccbf70a0418c49..a2c8bb43972a426e9647d7a5866915a2acd5d247 100644 (file)
@@ -271,8 +271,6 @@ class FileTag
                        if (!strlen($saved) || !stristr($saved, '[' . self::encode($file) . ']')) {
                                DI::pConfig()->set($uid, 'system', 'filetags', $saved . '[' . self::encode($file) . ']');
                        }
-
-                       info(DI::l10n()->t('Item filed'));
                }
 
                return true;
index 3049cdc6a70282fa5e807dd907773d0bce14a453..d52085389da6aa547b340f27b1372777d6bf3e94 100644 (file)
@@ -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;
index 4f19ca361d11a9f1c9d835710d7889430c29b4ed..eccb65598f09a1fbdb03abdadbe2d89894d2005c 100644 (file)
@@ -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');
index 5158108e463ff75874194bfba6703c485bd3423c..b60936c785b8455f7223fd7b00218d2225cfd7ae 100644 (file)
@@ -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');
        }
 
index 2e16cc657ebe43807ee9998302a23c7484d4e80d..c4b320e72d79b6dfec72c2722c5c380e61e3441e 100644 (file)
@@ -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);
        }
 
index c8d0578382c0b6759c95eb1267963c6f57044224..405e28902220b7048eb79e1e581546beaaf8b376 100644 (file)
@@ -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);
index 675e33c8465cfc77930cc5fb0d3584f0e461a50c..37de7c23841d4d30b444c97d88a28e9013427662 100644 (file)
@@ -62,8 +62,6 @@ class Embed extends BaseAdmin
                                }
                        }
 
-                       info(DI::l10n()->t('Theme settings updated.'));
-
                        if (DI::mode()->isAjax()) {
                                return;
                        }
index 955ddadc700f6827f1142a5e0933d35ff2356fd3..78d27dfa0b328dd1d15fd028290f0e7057c680d2 100644 (file)
@@ -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));
                                                }
                                        }
 
index 811a0eb25c0a7d10e8e666ff20540fa2694b6bb9..a3bc94a1fe5094403681259de077b0cbbea5b056 100644 (file)
@@ -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');
        }
 
index e67d3c3c93819234cb7ca0d85cea73a088426c42..57b5976ef0c9834c7cf1685b5e29ddc705a403a5 100644 (file)
@@ -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 '';
                }
 
index f63d42c0ea58ae9a4252ad143b7775681ac0e065..ee8ad3663da208b237075769cb48a6c61a9b31e0 100644 (file)
@@ -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);
                }
 
index d29d0609a930e4d7719cdc3f829291cdb57d0fe1..8640808439ad32247b6811d83092745fa9817c6c 100644 (file)
@@ -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);
                }
 
index b4adff46d3d624abd8d1c6f3d7ba09455ccadbc9..9f2ae7bde684e76e3e7e8ad2d7fcc91e2ec4fc61 100644 (file)
@@ -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.'));
                }
 
index 5637c6f4199e69ba8f4bb2bde02517741e6cd9a3..c86bf9176c116b272d940f6d729143c0af095f01 100644 (file)
@@ -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;
                }
 
index e969de9cc3889a419bcaf0db3195e6aedfeb9162..f0f86f607f2440422e7f212801375ba9b0ee724b 100644 (file)
@@ -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();
                }
        }
index 3d03f10711935e17e1c755fddd62e240df823b56..491023145cdff4fb9a869b9a1f79e0e74b3cc739 100644 (file)
@@ -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';
index 7866656e33895967ad94c0fcff18df1256912e05..a8a8a896b3f3d49dd23afd16eb085a6967f8d91c 100644 (file)
@@ -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));
index 12226107bae6122e0872d5920b92d7babb137c86..4b2fdb09e8aca86a7a4839c06ac727e12383187c 100644 (file)
@@ -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
index 11e7f1a760e5b4bbfe33e8b5028f9c9d573eb216..d5f1fc8ef8430bee958096997dd5b7ae26532355 100644 (file)
@@ -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.'));
                                }
                        }
index 0b1cb9e6a39bfc42f408c4ef35933acdf568f6cc..4b05b8c2cd5e9c29d8f0cc1f491fb3d689fcd8b1 100644 (file)
@@ -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']);
                }
 
index 3d55c57f48c10c4b4fdd6fcb0c9bd337af67585a..dbf0cf8d846fd0ad259f1638feb938fee968768b 100644 (file)
@@ -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;
                }
 
index 23f12d2638df0ce3ac1e5548d767207a4c4e4c48..bf3ae2585b19de398b99ef90f2f9163aa8c35b4c 100644 (file)
@@ -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;
                }
 
index 73372b03a0ef00c577684701f4d78595ecf7e863..0f45b50f5b770f8511281384a0d1aec329d40b51 100644 (file)
@@ -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;
                        }
                }
index 1335a8211e4d29176bf28b2f771033cb79faeb44..a7e02f4299bf7ef3cc22c9d1866f948b220663b9 100644 (file)
@@ -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;
                }
index 3e4f9b8a4efe7b1e8d7332045485bc2e1bd26a41..df9622f2e9f902b243fa08ad8ab00df42b2153b0 100644 (file)
@@ -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.'));
                }