Merge branch 'develop' into rewrite/gravity-constants
This commit is contained in:
@@ -66,7 +66,7 @@ function message_init(App $a)
|
||||
function message_post(App $a)
|
||||
{
|
||||
if (!local_user()) {
|
||||
notice(DI::l10n()->t('Permission denied.'));
|
||||
DI::sysmsg()->addNotice(DI::l10n()->t('Permission denied.'));
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -80,20 +80,20 @@ function message_post(App $a)
|
||||
|
||||
switch ($ret) {
|
||||
case -1:
|
||||
notice(DI::l10n()->t('No recipient selected.'));
|
||||
DI::sysmsg()->addNotice(DI::l10n()->t('No recipient selected.'));
|
||||
$norecip = true;
|
||||
break;
|
||||
|
||||
case -2:
|
||||
notice(DI::l10n()->t('Unable to locate contact information.'));
|
||||
DI::sysmsg()->addNotice(DI::l10n()->t('Unable to locate contact information.'));
|
||||
break;
|
||||
|
||||
case -3:
|
||||
notice(DI::l10n()->t('Message could not be sent.'));
|
||||
DI::sysmsg()->addNotice(DI::l10n()->t('Message could not be sent.'));
|
||||
break;
|
||||
|
||||
case -4:
|
||||
notice(DI::l10n()->t('Message collection failure.'));
|
||||
DI::sysmsg()->addNotice(DI::l10n()->t('Message collection failure.'));
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -111,7 +111,7 @@ function message_content(App $a)
|
||||
Nav::setSelected('messages');
|
||||
|
||||
if (!local_user()) {
|
||||
notice(DI::l10n()->t('Permission denied.'));
|
||||
DI::sysmsg()->addNotice(DI::l10n()->t('Permission denied.'));
|
||||
return Login::form();
|
||||
}
|
||||
|
||||
@@ -146,12 +146,12 @@ function message_content(App $a)
|
||||
if ($cmd === 'drop') {
|
||||
$message = DBA::selectFirst('mail', ['convid'], ['id' => DI::args()->getArgv()[2], 'uid' => local_user()]);
|
||||
if(!DBA::isResult($message)){
|
||||
notice(DI::l10n()->t('Conversation not found.'));
|
||||
DI::sysmsg()->addNotice(DI::l10n()->t('Conversation not found.'));
|
||||
DI::baseUrl()->redirect('message');
|
||||
}
|
||||
|
||||
if (!DBA::delete('mail', ['id' => DI::args()->getArgv()[2], 'uid' => local_user()])) {
|
||||
notice(DI::l10n()->t('Message was not deleted.'));
|
||||
DI::sysmsg()->addNotice(DI::l10n()->t('Message was not deleted.'));
|
||||
}
|
||||
|
||||
$conversation = DBA::selectFirst('mail', ['id'], ['convid' => $message['convid'], 'uid' => local_user()]);
|
||||
@@ -166,7 +166,7 @@ function message_content(App $a)
|
||||
$parent = $parentmail['parent-uri'];
|
||||
|
||||
if (!DBA::delete('mail', ['parent-uri' => $parent, 'uid' => local_user()])) {
|
||||
notice(DI::l10n()->t('Conversation was not removed.'));
|
||||
DI::sysmsg()->addNotice(DI::l10n()->t('Conversation was not removed.'));
|
||||
}
|
||||
}
|
||||
DI::baseUrl()->redirect('message');
|
||||
@@ -222,7 +222,7 @@ function message_content(App $a)
|
||||
$r = get_messages(local_user(), $pager->getStart(), $pager->getItemsPerPage());
|
||||
|
||||
if (!DBA::isResult($r)) {
|
||||
notice(DI::l10n()->t('No messages.'));
|
||||
DI::sysmsg()->addNotice(DI::l10n()->t('No messages.'));
|
||||
return $o;
|
||||
}
|
||||
|
||||
@@ -278,7 +278,7 @@ function message_content(App $a)
|
||||
}
|
||||
|
||||
if (!DBA::isResult($messages)) {
|
||||
notice(DI::l10n()->t('Message not available.'));
|
||||
DI::sysmsg()->addNotice(DI::l10n()->t('Message not available.'));
|
||||
return $o;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user