mirror of
https://git.sekbaer.de/Friendica/friendica.git
synced 2025-06-17 04:15:15 +02:00
Useless info messages removed
This commit is contained in:
parent
0b423b73ac
commit
3fc3ded750
39 changed files with 47 additions and 90 deletions
|
@ -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');
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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'), [
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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]);
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
|
|
@ -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']);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue