Commit 78abe8f3 authored by hass's avatar hass
Browse files

Do not use t() or st() in installation phase hooks

parent bebaed10
......@@ -49,30 +49,31 @@ function realname_schema() {
*/
function realname_requirements($phase) {
$requirements = array();
$t = get_t();
if ($phase == 'runtime') {
if (!variable_get('realname_suppress_user_name_mail_validation', FALSE) && strpos(variable_get('user_mail_register_admin_created_body', FALSE), '[user:name-raw]') === FALSE) {
$requirements['user_mail_register_admin_created_body'] = array(
'title' => t('E-mail: "Welcome (new user created by administrator)" template'),
'value' => t('Not configured'),
'title' => $t('E-mail: "Welcome (new user created by administrator)" template'),
'value' => $t('Not configured'),
'severity' => REQUIREMENT_WARNING,
'description' => t('Replace the token <code>[user:name]</code> with <code>[user:name-raw]</code> in <a href="@people">e-mail</a> template, if using username for login.', array('@people' => url('admin/config/people/accounts', array('fragment' => 'edit-email-admin-created')))),
'description' => $t('Replace the token <code>[user:name]</code> with <code>[user:name-raw]</code> in <a href="@people">e-mail</a> template, if using username for login.', array('@people' => url('admin/config/people/accounts', array('fragment' => 'edit-email-admin-created')))),
);
}
if (!variable_get('realname_suppress_user_name_mail_validation', FALSE) && strpos(variable_get('user_mail_register_no_approval_required_body', FALSE), '[user:name-raw]') === FALSE) {
$requirements['user_mail_register_no_approval_required_body'] = array(
'title' => t('E-mail: "Welcome (no approval required)" template'),
'value' => t('Not configured'),
'title' => $t('E-mail: "Welcome (no approval required)" template'),
'value' => $t('Not configured'),
'severity' => REQUIREMENT_WARNING,
'description' => t('Replace the token <code>[user:name]</code> with <code>[user:name-raw]</code> in <a href="@people">e-mail</a> template, if using username for login.', array('@people' => url('admin/config/people/accounts', array('fragment' => 'edit-email-no-approval-required')))),
'description' => $t('Replace the token <code>[user:name]</code> with <code>[user:name-raw]</code> in <a href="@people">e-mail</a> template, if using username for login.', array('@people' => url('admin/config/people/accounts', array('fragment' => 'edit-email-no-approval-required')))),
);
}
if (!variable_get('realname_suppress_user_name_mail_validation', FALSE) && strpos(variable_get('user_mail_status_activated_body', FALSE), '[user:name-raw]') === FALSE) {
$requirements['user_mail_status_activated_body'] = array(
'title' => t('E-mail: "Account activation" template'),
'value' => t('Not configured'),
'title' => $t('E-mail: "Account activation" template'),
'value' => $t('Not configured'),
'severity' => REQUIREMENT_WARNING,
'description' => t('Replace the token <code>[user:name]</code> with <code>[user:name-raw]</code> in <a href="@people">e-mail</a> template, if using username for login.', array('@people' => url('admin/config/people/accounts', array('fragment' => 'edit-email-activated')))),
'description' => $t('Replace the token <code>[user:name]</code> with <code>[user:name-raw]</code> in <a href="@people">e-mail</a> template, if using username for login.', array('@people' => url('admin/config/people/accounts', array('fragment' => 'edit-email-activated')))),
);
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment