Commit 05dc91ba authored by Iñaki Arenaza's avatar Iñaki Arenaza Committed by Richard Mansfield
Browse files

Remove calls to get_config in language files (bug 3089)

parent 6d4e28f9
......@@ -231,9 +231,9 @@ function adduser_submit(Pieform $form, $values) {
db_commit();
try {
email_user($user, $USER, get_string('accountcreated'),
get_string('accountcreatedchangepasswordtext', 'mahara', $user->firstname, get_config('sitename'), $user->username, $user->password, get_config('sitename')),
get_string('accountcreatedchangepasswordhtml', 'mahara', $user->firstname, get_config('sitename'), $user->username, $user->password, get_config('sitename'))
email_user($user, $USER, get_string('accountcreated', 'mahara', get_config('sitename')),
get_string('accountcreatedchangepasswordtext', 'mahara', $user->firstname, get_config('sitename'), $user->username, $user->password, get_config('wwwroot'), get_config('sitename')),
get_string('accountcreatedchangepasswordhtml', 'mahara', $user->firstname, get_config('wwwroot'), get_config('sitename'), $user->username, $user->password, get_config('wwwroot'), get_config('wwwroot'), get_config('sitename'))
);
}
catch (EmailException $e) {
......
......@@ -340,9 +340,9 @@ function uploadcsv_submit(Pieform $form, $values) {
foreach ($addedusers as $user) {
$failedusers = array();
try {
email_user($user, null, get_string('accountcreated'),
get_string($straccountcreatedtext, 'mahara', $user->firstname, get_config('sitename'), $user->username, $user->password, get_config('sitename')),
get_string($straccountcreatedhtml, 'mahara', $user->firstname, get_config('sitename'), $user->username, $user->password, get_config('sitename'))
email_user($user, null, get_string('accountcreated', 'mahara', get_config('sitename')),
get_string($straccountcreatedtext, 'mahara', $user->firstname, get_config('sitename'), $user->username, $user->password, get_config('wwwroot'), get_config('sitename')),
get_string($straccountcreatedhtml, 'mahara', $user->firstname, get_config('wwwroot'), get_config('sitename'), $user->username, $user->password, get_config('wwwroot'), get_config('wwwroot'), get_config('sitename'))
);
}
catch (EmailException $e) {
......
......@@ -41,7 +41,7 @@ $string['registeredemailmessagetext'] = 'Hi %s,
Thank you for registering an account on %s. Please follow this link to
complete the signup process:
' . get_config('wwwroot') . 'register.php?key=%s
%sregister.php?key=%s
The link will expire in 24 hours.
......@@ -51,8 +51,7 @@ The %s Team';
$string['registeredemailmessagehtml'] = '<p>Hi %s,</p>
<p>Thank you for registering an account on %s. Please follow this link
to complete the signup process:</p>
<p><a href="' . get_config('wwwroot') . 'register.php?key=%s">'
. get_config('wwwroot') . 'register.php?key=%s</a></p>
<p><a href="%sregister.php?key=%s">%sregister.php?key=%s</a></p>
<p>The link will expire in 24 hours.</p>
<pre>--
......
......@@ -106,7 +106,7 @@ $string['linksandresources'] = 'Links and Resources';
$string['accessforbiddentoadminsection'] = 'You are forbidden from accessing the administration section';
$string['accountdeleted'] = 'Sorry, your account has been deleted';
$string['accountexpired'] = 'Sorry, your account has expired';
$string['accountcreated'] = get_config('sitename') . ': New account';
$string['accountcreated'] = '%s: New account';
$string['accountcreatedtext'] = 'Dear %s,
A new account has been created for you on %s. Your details are as follows:
......@@ -114,7 +114,7 @@ A new account has been created for you on %s. Your details are as follows:
Username: %s
Password: %s
Visit ' . get_config('wwwroot') . ' to get started!
Visit %s to get started!
Regards, %s Site Administrator';
$string['accountcreatedchangepasswordtext'] = 'Dear %s,
......@@ -126,25 +126,25 @@ Password: %s
Once you log in for the first time, you will be asked to change your password.
Visit ' . get_config('wwwroot') . ' to get started!
Visit %s to get started!
Regards, %s Site Administrator';
$string['accountcreatedhtml'] = '<p>Dear %s</p>
<p>A new account has been created for you on <a href="' . get_config('wwwroot') . '">%s</a>. Your details are as follows:</p>
<p>A new account has been created for you on <a href="%s">%s</a>. Your details are as follows:</p>
<ul>
<li><strong>Username:</strong> %s</li>
<li><strong>Password:</strong> %s</li>
</ul>
<p>Visit <a href="' . get_config('wwwroot') . '">' . get_config('wwwroot') . '</a> to get started!</p>
<p>Visit <a href="%s">%s</a> to get started!</p>
<p>Regards, %s Site Administrator</p>
';
$string['accountcreatedchangepasswordhtml'] = '<p>Dear %s</p>
<p>A new account has been created for you on <a href="' . get_config('wwwroot') . '">%s</a>. Your details are as follows:</p>
<p>A new account has been created for you on <a href="%s">%s</a>. Your details are as follows:</p>
<ul>
<li><strong>Username:</strong> %s</li>
......@@ -153,7 +153,7 @@ $string['accountcreatedchangepasswordhtml'] = '<p>Dear %s</p>
<p>Once you log in for the first time, you will be asked to change your password.</p>
<p>Visit <a href="' . get_config('wwwroot') . '">' . get_config('wwwroot') . '</a> to get started!</p>
<p>Visit <a href="%s">%s</a> to get started!</p>
<p>Regards, %s Site Administrator</p>
';
......@@ -270,7 +270,7 @@ $string['studentid'] = 'ID number';
$string['displayname'] = 'Display name';
$string['fullname'] = 'Full name';
$string['registerstep1description'] = 'Welcome! To use this site you must first register. You must also agree to the <a href="terms.php">terms and conditions</a>. The data we collect here will be stored according to our <a href="privacy.php">privacy statement</a>.';
$string['registerstep3fieldsoptional'] = '<h3>Choose an Optional Profile Image</h3><p>You have now successfully registered with ' . get_config('sitename') . '! You may now choose an optional profile icon to be displayed as your avatar.</p>';
$string['registerstep3fieldsoptional'] = '<h3>Choose an Optional Profile Image</h3><p>You have now successfully registered with %s! You may now choose an optional profile icon to be displayed as your avatar.</p>';
$string['registerstep3fieldsmandatory'] = '<h3>Fill Out Mandatory Profile Fields</h3><p>The following fields are required. You must fill them out before your registration is complete.</p>';
$string['registeringdisallowed'] = 'Sorry, you cannot register for this system at this time';
$string['membershipexpiry'] = 'Membership expires';
......@@ -335,16 +335,16 @@ You may continue to use %s with your current username %s, but you must set a new
Please follow the link below to continue the reset process.
' . get_config('wwwroot') . 'forgotpass.php?key=%s
%sforgotpass.php?key=%s
If you have any questions regarding the above, please feel free to contact
us.
' . get_config('wwwroot') . 'contact.php
%scontact.php
Regards, %s Site Administrator
' . get_config('wwwroot') . 'forgotpass.php?key=%s';
%sforgotpass.php?key=%s';
$string['noinstitutionsetpassemailmessagehtml'] = '<p>Dear %s,</p>
<p>You are no longer a member of %s.</p>
......@@ -352,13 +352,13 @@ $string['noinstitutionsetpassemailmessagehtml'] = '<p>Dear %s,</p>
<p>Please follow the link below to continue the reset process.</p>
<p><a href="' . get_config('wwwroot') . 'forgotpass.php?key=%s">' . get_config('wwwroot') . 'forgotpass.php?key=%s</a></p>
<p><a href="%sforgotpass.php?key=%s">%sforgotpass.php?key=%s</a></p>
<p>If you have any questions regarding the above, please feel free to <a href="' . get_config('wwwroot') . 'contact.php">contact us</a>.</p>
<p>If you have any questions regarding the above, please feel free to <a href="%scontact.php">contact us</a>.</p>
<p>Regards, %s Site Administrator</p>
<p><a href="' . get_config('wwwroot') . 'forgotpass.php?key=%s">' . get_config('wwwroot') . 'forgotpass.php?key=%s</a></p>';
<p><a href="%sforgotpass.php?key=%s">%sforgotpass.php?key=%s</a></p>';
$string['debugemail'] = 'NOTICE: This e-mail was intended for %s <%s> but has been sent to you as per the "sendallemailto" configuration setting.';
......
......@@ -68,7 +68,7 @@ $string['view'] = 'view';
$string['views'] = 'views';
$string['View'] = 'View';
$string['Views'] = 'Views';
$string['viewsubmittedtogroup'] = 'This View has been submitted to <a href="' . get_config('wwwroot') . 'group/view.php?id=%s">%s</a>';
$string['viewsubmittedtogroup'] = 'This View has been submitted to <a href="%sgroup/view.php?id=%s">%s</a>';
$string['nobodycanseethisview2'] = 'Only you can see this View';
$string['noviews'] = 'No Views.';
$string['youhavenoviews'] = 'You have no Views.';
......
......@@ -400,8 +400,8 @@ class Institution {
$fullname = display_name($user, null, true);
email_user($user, null,
get_string('noinstitutionsetpassemailsubject', 'mahara', $sitename, $this->displayname),
get_string('noinstitutionsetpassemailmessagetext', 'mahara', $fullname, $this->displayname, $sitename, $user->username, $pwrequest->key, $sitename, $pwrequest->key),
get_string('noinstitutionsetpassemailmessagehtml', 'mahara', $fullname, $this->displayname, $sitename, $user->username, $pwrequest->key, $pwrequest->key, $sitename, $pwrequest->key, $pwrequest->key));
get_string('noinstitutionsetpassemailmessagetext', 'mahara', $fullname, $this->displayname, $sitename, $user->username, get_config('wwwroot'), $pwrequest->key, get_config('wwwroot'), $sitename, get_config('wwwroot'), $pwrequest->key),
get_string('noinstitutionsetpassemailmessagehtml', 'mahara', $fullname, $this->displayname, $sitename, $user->username, get_config('wwwroot'), $pwrequest->key, get_config('wwwroot'), $pwrequest->key, get_config('wwwroot'), $sitename, get_config('wwwroot'), $pwrequest->key, get_config('wwwroot'), $pwrequest->key));
insert_record('usr_password_request', $pwrequest);
}
catch (SQLException $e) {
......
......@@ -359,15 +359,15 @@ function register_submit(Pieform $form, $values) {
insert_record('usr_registration', $values);
$f = fopen('/tmp/donal.txt','w');
fwrite($f, get_string('registeredemailmessagetext', 'auth.internal', $values['firstname'], get_config('sitename'), $values['key'], get_config('sitename')));
fwrite($f, get_string('registeredemailmessagetext', 'auth.internal', $values['firstname'], get_config('sitename'), get_config('wwwroot'), $values['key'], get_config('sitename')));
$user =(object) $values;
$user->admin = 0;
$user->staff = 0;
email_user($user, null,
get_string('registeredemailsubject', 'auth.internal', get_config('sitename')),
get_string('registeredemailmessagetext', 'auth.internal', $values['firstname'], get_config('sitename'), $values['key'], get_config('sitename')),
get_string('registeredemailmessagehtml', 'auth.internal', $values['firstname'], get_config('sitename'), $values['key'], $values['key'], get_config('sitename')));
get_string('registeredemailmessagetext', 'auth.internal', $values['firstname'], get_config('sitename'), get_config('wwwroot'), $values['key'], get_config('sitename')),
get_string('registeredemailmessagehtml', 'auth.internal', $values['firstname'], get_config('sitename'), get_config('wwwroot'), $values['key'], get_config('wwwroot'), $values['key'], get_config('sitename')));
}
catch (EmailException $e) {
log_warn($e);
......
......@@ -97,7 +97,7 @@ else {
));
}
else {
$view['submittedto'] = get_string('viewsubmittedtogroup', 'view', $view['submittedto']['id'], $view['submittedto']['name']);
$view['submittedto'] = get_string('viewsubmittedtogroup', 'view', get_config('wwwroot'), $view['submittedto']['id'], $view['submittedto']['name']);
}
}
}
......
......@@ -72,7 +72,7 @@ if ($submittedgroup && group_user_can_assess_submitted_views($submittedgroup, $U
'elements' => array(
'submittedview' => array(
'type' => 'html',
'value' => get_string('viewsubmittedtogroup', 'view', $submittedgroup->id, $submittedgroup->name),
'value' => get_string('viewsubmittedtogroup', 'view', get_config('wwwroot'), $submittedgroup->id, $submittedgroup->name),
),
'submit' => array(
'type' => 'submit',
......
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