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');
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
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);
}
// 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);
}
$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);
}
return $post_id;
}
- info(DI::l10n()->t('Post published.'));
item_post_return(DI::baseUrl(), $api_source, $return_path);
// NOTREACHED
}
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
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');
}
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');
$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;
}
}
if ($o === '') {
- info("No items found");
+ notice("No items found");
}
return $o;
$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'), [
}
if (($a->argc > 1) && $a->argv[1] === 'done') {
- info(DI::l10n()->t('Post successful.') . EOL);
return;
}
// 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]);
}
}
}
- if (!$failed) {
- info(DI::l10n()->t('Email settings updated.') . EOL);
- }
}
}
DI::pConfig()->set(local_user(), 'feature', substr($k, 8), ((intval($v)) ? 1 : 0));
}
}
- info(DI::l10n()->t('Features updated') . EOL);
return;
}
// 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
$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
$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
$return_path = $base_return_path . '/' . $contact['id'];
}
- info(DI::l10n()->t('Contact unfollowed'));
DI::baseUrl()->redirect($return_path);
// NOTREACHED
}
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']);
}
} 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();
}
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']));
}
}
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.
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;
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;
} 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;
}
}
DI::config()->set('system', 'blocklist', $blocklist);
- info(DI::l10n()->t('Site blocklist updated.') . EOL);
}
DI::baseUrl()->redirect('admin/blocklist/server');
DI::config()->set('system', 'loglevel', $loglevel);
}
- info(DI::l10n()->t("Log settings updated."));
DI::baseUrl()->redirect('admin/logs');
}
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
DI::config()->set('system', 'rino_encrypt' , $rino);
- info(DI::l10n()->t('Site settings updated.') . EOL);
-
DI::baseUrl()->redirect('admin/site' . $active_panel);
}
}
}
- info(DI::l10n()->t('Theme settings updated.'));
-
if (DI::mode()->isAjax()) {
return;
}
} 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);
}
}
- info(DI::l10n()->t('Theme settings updated.'));
-
if (DI::mode()->isAjax()) {
return;
}
} 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::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');
}
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 '';
}
['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);
}
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);
}
*/
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.'));
}
$items = self::getItems();
if (!DBA::isResult($items)) {
- info(DI::l10n()->t('No results.'));
+ notice(DI::l10n()->t('No results.'));
return $o;
}
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();
}
}
$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';
]);
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));
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();
}
}
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
$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);
}
$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.'));
}
}
}
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.'));
}
}
}
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']);
}
$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;
}
}
if (!DBA::isResult($r)) {
- info(DI::l10n()->t('No results.'));
+ notice(DI::l10n()->t('No results.'));
return $o;
}
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;
}
}
['uid' => local_user()]
);
- if ($result) {
- info(DI::l10n()->t('Profile updated.'));
- } else {
+ if (!$result) {
notice(DI::l10n()->t('Profile couldn\'t be updated.'));
return;
}
$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.'));
}