Replace "notice" calls
This commit is contained in:
+6
-6
@@ -129,7 +129,7 @@ function item_post(App $a) {
|
||||
}
|
||||
|
||||
if (!DBA::isResult($toplevel_item)) {
|
||||
notice(DI::l10n()->t('Unable to locate original post.'));
|
||||
DI::sysmsg()->addNotice(DI::l10n()->t('Unable to locate original post.'));
|
||||
if ($return_path) {
|
||||
DI::baseUrl()->redirect($return_path);
|
||||
}
|
||||
@@ -179,7 +179,7 @@ function item_post(App $a) {
|
||||
// Now check that valid personal details have been provided
|
||||
if (!Security::canWriteToUserWall($profile_uid) && !$allow_comment) {
|
||||
Logger::warning('Permission denied.', ['local' => local_user(), 'profile_uid' => $profile_uid, 'toplevel_item_id' => $toplevel_item_id, 'network' => $toplevel_item['network']]);
|
||||
notice(DI::l10n()->t('Permission denied.'));
|
||||
DI::sysmsg()->addNotice(DI::l10n()->t('Permission denied.'));
|
||||
if ($return_path) {
|
||||
DI::baseUrl()->redirect($return_path);
|
||||
}
|
||||
@@ -335,7 +335,7 @@ function item_post(App $a) {
|
||||
System::jsonExit(['preview' => '']);
|
||||
}
|
||||
|
||||
notice(DI::l10n()->t('Empty post discarded.'));
|
||||
DI::sysmsg()->addNotice(DI::l10n()->t('Empty post discarded.'));
|
||||
if ($return_path) {
|
||||
DI::baseUrl()->redirect($return_path);
|
||||
}
|
||||
@@ -685,7 +685,7 @@ function item_post(App $a) {
|
||||
$post_id = Item::insert($datarray);
|
||||
|
||||
if (!$post_id) {
|
||||
notice(DI::l10n()->t('Item wasn\'t stored.'));
|
||||
DI::sysmsg()->addNotice(DI::l10n()->t('Item wasn\'t stored.'));
|
||||
if ($return_path) {
|
||||
DI::baseUrl()->redirect($return_path);
|
||||
}
|
||||
@@ -841,7 +841,7 @@ function drop_item(int $id, string $return = '')
|
||||
$item = Post::selectFirstForUser(local_user(), $fields, ['id' => $id]);
|
||||
|
||||
if (!DBA::isResult($item)) {
|
||||
notice(DI::l10n()->t('Item not found.'));
|
||||
DI::sysmsg()->addNotice(DI::l10n()->t('Item not found.'));
|
||||
DI::baseUrl()->redirect('network');
|
||||
}
|
||||
|
||||
@@ -863,7 +863,7 @@ function drop_item(int $id, string $return = '')
|
||||
item_redirect_after_action($item, $return);
|
||||
} else {
|
||||
Logger::warning('Permission denied.', ['local' => local_user(), 'uid' => $item['uid'], 'cid' => $contact_id]);
|
||||
notice(DI::l10n()->t('Permission denied.'));
|
||||
DI::sysmsg()->addNotice(DI::l10n()->t('Permission denied.'));
|
||||
DI::baseUrl()->redirect('display/' . $item['guid']);
|
||||
//NOTREACHED
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user