* - who takes no responsibility for any additional content which may appear herein
*
*/
+
use Friendica\Core\Addon;
+use Friendica\Core\Config;
function morechoice_install() {
}
-// We aren't going to bother translating these to other languages.
+// We aren't going to bother translating these to other languages.
function morechoice_gender_selector($a,&$b) {
- if($a->config['system']['language'] == 'en') {
+ if(Config::get('system', 'language') == 'en') {
$b[] = 'Androgyne';
- $b[] = 'Bear';
- $b[] = 'Bigender';
+ $b[] = 'Bear';
+ $b[] = 'Bigender';
$b[] = 'Cross dresser';
$b[] = 'Drag queen';
$b[] = 'Eunuch';
- $b[] = 'Faux queen';
+ $b[] = 'Faux queen';
$b[] = 'Gender fluid';
$b[] = 'Kathoey';
$b[] = 'Lady';
}
function morechoice_sexpref_selector($a,&$b) {
- if($a->config['system']['language'] == 'en') {
+ if(Config::get('system', 'language') == 'en') {
$b[] = 'Girls with big tits';
$b[] = 'Millionaires';
$b[] = 'Guys with big schlongs';
}
function morechoice_marital_selector($a,&$b) {
- if($a->config['system']['language'] == 'en') {
+ if(Config::get('system', 'language') == 'en') {
$b[] = 'Married to my job';
$b[] = 'Polygamist';
$b[] = 'Half married';
* Author: Rabuzarus <https://friendica.kommune4.de/profile/rabuzarus> (Port to Friendica)
*/
+use Friendica\App;
use Friendica\Content\Text\BBCode;
+use Friendica\Core\Config;
use Friendica\Core\L10n;
use Friendica\Util\Emailer;
-use Friendica\App;
-function notifyall_install()
+function notifyall_install()
{
logger("installed notifyall");
}
-function notifyall_uninstall()
+function notifyall_uninstall()
{
logger("removed notifyall");
}
function notifyall_module() {}
-function notifyall_addon_admin(App $a, &$o)
+function notifyall_addon_admin(App $a, &$o)
{
$o = '<div></div> <a href="' . z_root() . '/notifyall">' . L10n::t('Send email to all members') . '</a></br/>';
}
-function notifyall_post(App $a)
+function notifyall_post(App $a)
{
if(!is_site_admin()) {
return;
}
$text = trim($_REQUEST['text']);
-
+
if(! $text) {
return;
}
- $sitename = $a->config['sitename'];
+ $sitename = Config::get('config', 'sitename');
- if (empty($a->config['admin_name'])) {
+ if (empty(Config::get('config', 'admin_name'))) {
$sender_name = '"' . L10n::t('%s Administrator', $sitename) . '"';
} else {
- $sender_name = '"' . L10n::t('%1$s, %2$s Administrator', $a->config['admin_name'], $sitename) . '"';
+ $sender_name = '"' . L10n::t('%1$s, %2$s Administrator', Config::get('config', 'admin_name'), $sitename) . '"';
}
- if (! x($a->config['sender_email'])) {
+ if (! x(Config::get('config', 'sender_email'))) {
$sender_email = 'noreply@' . $a->get_hostname();
} else {
- $sender_email = $a->config['sender_email'];
+ $sender_email = Config::get('config', 'sender_email');
}
$subject = $_REQUEST['subject'];
// if this is a test, send it only to the admin(s)
// admin_email might be a comma separated list, but we need "a@b','c@d','e@f
if (intval($_REQUEST['test'])) {
- $email = $a->config['admin_email'];
+ $email = Config::get('config', 'admin_email');
$email = "'" . str_replace([" ",","], ["","','"], $email) . "'";
}
$sql_extra = ((intval($_REQUEST['test'])) ? sprintf(" AND `email` in ( %s )", $email) : '');
$b['itemlink'] = $a->get_baseurl();
$b['epreamble'] = $b['preamble'] = L10n::t('Your account on %s will expire in a few days.', Config::get('system', 'sitename'));
$b['subject'] = L10n::t('Your Friendica account is about to expire.');
- $b['body'] = L10n::t("Hi %1\$s,\n\nYour account on %2\$s will expire in less than five days. You may keep your account by logging in at least once every 30 days", $b['params']['to_name'], "[url=" . $app->config["system"]["url"] . "]" . $app->config["sitename"] . "[/url]");
+ $b['body'] = L10n::t("Hi %1\$s,\n\nYour account on %2\$s will expire in less than five days. You may keep your account by logging in at least once every 30 days", $b['params']['to_name'], "[url=" . Config::get('system', 'url') . "]" . Config::get('config', 'sitename') . "[/url]");
}
}
$application_name = $a->get_hostname();
}
- $adminlist = explode(",", str_replace(" ", "", $a->config['admin_email']));
+ $adminlist = explode(",", str_replace(" ", "", Config::get('config', 'admin_email')));
$params["type"] = "client_associate";
$params["contacts"] = $adminlist[0];
use Friendica\App;
use Friendica\Core\Addon;
+use Friendica\Core\Config;
use Friendica\Core\L10n;
use Friendica\Core\PConfig;
use Friendica\Util\Emailer;
info(L10n::t('Secure Mail Settings saved.') . EOL);
if ($_POST['securemail-submit'] == L10n::t('Save and send test')) {
- $sitename = $a->config['sitename'];
+ $sitename = Config::get('config', 'sitename');
$hostname = $a->get_hostname();
if (strpos($hostname, ':')) {
$hostname = substr($hostname, 0, strpos($hostname, ':'));
}
- $sender_email = $a->config['sender_email'];
+ $sender_email = Config::get('config', 'sender_email');
if (empty($sender_email)) {
$sender_email = 'noreply@' . $hostname;
}
$b['itemlink'] = $a->get_baseurl();
$b['epreamble'] = $b['preamble'] = L10n::t('Your account on %s will expire in a few days.', Config::get('system', 'sitename'));
$b['subject'] = L10n::t('Your Friendica test account is about to expire.');
- $b['body'] = L10n::t("Hi %1\$s,\n\nYour test account on %2\$s will expire in less than five days. We hope you enjoyed this test drive and use this opportunity to find a permanent Friendica website for your integrated social communications. A list of public sites is available at %s/siteinfo - and for more information on setting up your own Friendica server please see the Friendica project website at http://friendica.com.", $b['params']['to_name'], "[url=".$app->config["system"]["url"]."]".$app->config["sitename"]."[/url]", get_server());
+ $b['body'] = L10n::t("Hi %1\$s,\n\nYour test account on %2\$s will expire in less than five days. We hope you enjoyed this test drive and use this opportunity to find a permanent Friendica website for your integrated social communications. A list of public sites is available at %s/siteinfo - and for more information on setting up your own Friendica server please see the Friendica project website at http://friendica.com.", $b['params']['to_name'], "[url=".Config::get('system', 'url')."]".Config::get('config', 'sitename')."[/url]", get_server());
}
}