$self = DBA::selectFirst('contact', ['id'], ['uid' => local_user(), 'self' => true]);
if (!DBA::isResult($self)) {
- notice(DI::l10n()->t("The bird has not found itself."));
+ DI::sysmsg()->addNotice(DI::l10n()->t("The bird has not found itself."));
return;
}
$condition = ['uid' => local_user(), 'contact-id' => $self['id']];
$photo = DBA::selectFirst('photo', ['resource-id'], $condition);
if (!DBA::isResult($photo)) {
- notice(DI::l10n()->t('There was an error, the bird flew away.'));
+ DI::sysmsg()->addNotice(DI::l10n()->t('There was an error, the bird flew away.'));
return;
}
// Update global directory in background
Profile::publishUpdate(local_user());
- info(DI::l10n()->t('Meow!'));
+ DI::sysmsg()->addInfo(DI::l10n()->t('Meow!'));
return;
}
$self = DBA::selectFirst('contact', ['id'], ['uid' => local_user(), 'self' => true]);
if (!DBA::isResult($self)) {
- notice(DI::l10n()->t("The cat hadn't found itself."));
+ DI::sysmsg()->addNotice(DI::l10n()->t("The cat hadn't found itself."));
return;
}
$condition = ['uid' => local_user(), 'contact-id' => $self['id']];
$photo = DBA::selectFirst('photo', ['resource-id'], $condition);
if (!DBA::isResult($photo)) {
- notice(DI::l10n()->t('There was an error, the cat ran away.'));
+ DI::sysmsg()->addNotice(DI::l10n()->t('There was an error, the cat ran away.'));
return;
}
// Update global directory in background
Profile::publishUpdate(local_user());
- info(DI::l10n()->t('Meow!'));
+ DI::sysmsg()->addInfo(DI::l10n()->t('Meow!'));
return;
}
$res = new SimpleXMLElement(DI::httpClient()->fetch($url));
} catch (Exception $e) {
if (empty($_SESSION['curweather_notice_shown'])) {
- notice(DI::l10n()->t('Error fetching weather data. Error was: ' . $e->getMessage()));
+ DI::sysmsg()->addNotice(DI::l10n()->t('Error fetching weather data. Error was: ' . $e->getMessage()));
$_SESSION['curweather_notice_shown'] = true;
}
global $forumdirectory_search;
if ((DI::config()->get('system', 'block_public')) && (!local_user()) && (!remote_user())) {
- notice(DI::l10n()->t('Public access denied.') . EOL);
+ DI::sysmsg()->addNotice(DI::l10n()->t('Public access denied.') . EOL);
return;
}
}
DBA::close($r);
} else {
- notice(DI::l10n()->t("No entries \x28some entries may be hidden\x29."));
+ DI::sysmsg()->addNotice(DI::l10n()->t("No entries \x28some entries may be hidden\x29."));
}
$tpl = Renderer::getMarkupTemplate('directory_header.tpl');
$recipients = DBA::p("SELECT DISTINCT `email` FROM `user` WHERE `verified` AND NOT `account_removed` AND NOT `account_expired` $sql_extra");
if (! $recipients) {
- notice(DI::l10n()->t('No recipients found.') . EOL);
+ DI::sysmsg()->addNotice(DI::l10n()->t('No recipients found.') . EOL);
return;
}
DI::emailer()->send($notifyEmail->withRecipient($recipient['email']));
}
- info(DI::l10n()->t('Emails sent'));
+ DI::sysmsg()->addInfo(DI::l10n()->t('Emails sent'));
DI::baseUrl()->redirect('admin');
}
function pumpio_content(App $a)
{
if (!local_user()) {
- notice(DI::l10n()->t('Permission denied.') . EOL);
+ DI::sysmsg()->addNotice(DI::l10n()->t('Permission denied.') . EOL);
return '';
}
DI::pConfig()->set(local_user(), 'securemail', 'enable', $enable);
if ($res) {
- info(DI::l10n()->t('Test email sent') . EOL);
+ DI::sysmsg()->addInfo(DI::l10n()->t('Test email sent') . EOL);
} else {
- notice(DI::l10n()->t('There was an error sending the test email') . EOL);
+ DI::sysmsg()->addNotice(DI::l10n()->t('There was an error sending the test email') . EOL);
}
}
}
DI::pConfig()->set(local_user(), 'statusnet', 'baseapi', $asn['apiurl']);
//DI::pConfig()->set(local_user(), 'statusnet', 'application_name', $asn['applicationname'] );
} else {
- notice(DI::l10n()->t('Please contact your site administrator.<br />The provided API URL is not valid.') . EOL . $asn['apiurl'] . EOL);
+ DI::sysmsg()->addNotice(DI::l10n()->t('Please contact your site administrator.<br />The provided API URL is not valid.') . EOL . $asn['apiurl'] . EOL);
}
}
}
DI::pConfig()->set(local_user(), 'statusnet', 'baseapi', $apibase);
} else {
// still not the correct API base, let's do noting
- notice(DI::l10n()->t('We could not contact the GNU Social API with the Path you entered.') . EOL);
+ DI::sysmsg()->addNotice(DI::l10n()->t('We could not contact the GNU Social API with the Path you entered.') . EOL);
}
}
} else {
function tumblr_content(App $a)
{
if (!local_user()) {
- notice(DI::l10n()->t('Permission denied.') . EOL);
+ DI::sysmsg()->addNotice(DI::l10n()->t('Permission denied.') . EOL);
return '';
}
DI::pConfig()->set(local_user(), 'twitter', 'oauthsecret', $token['oauth_token_secret']);
DI::pConfig()->set(local_user(), 'twitter', 'post', 1);
} catch(Exception $e) {
- notice($e->getMessage());
+ DI::sysmsg()->addNotice($e->getMessage());
} catch(TwitterOAuthException $e) {
- notice($e->getMessage());
+ DI::sysmsg()->addNotice($e->getMessage());
}
} else {
// if no PIN is supplied in the POST variables, the user has changed the setting
empty(DI::pConfig()->get($hookData['uid'], 'twitter', 'oauthtoken'))
|| empty(DI::pConfig()->get($hookData['uid'], 'twitter', 'oauthsecret'))
) {
- notice(DI::l10n()->t('Please connect a Twitter account in your Social Network settings to import Twitter posts.'));
+ DI::sysmsg()->addNotice(DI::l10n()->t('Please connect a Twitter account in your Social Network settings to import Twitter posts.'));
return;
}
$status = twitter_statuses_show($matches[1]);
if (empty($status->id_str)) {
- notice(DI::l10n()->t('Twitter post not found.'));
+ DI::sysmsg()->addNotice(DI::l10n()->t('Twitter post not found.'));
return;
}