allow Smarty use on international templates
This commit is contained in:
parent
eb6c46a303
commit
bce29054b9
8 changed files with 43 additions and 78 deletions
|
@ -737,11 +737,6 @@ function dfrn_confirm_post(&$a,$handsfree = null) {
|
|||
? get_intltext_template('friend_complete_eml.tpl')
|
||||
: get_intltext_template('intro_complete_eml.tpl'));
|
||||
|
||||
|
||||
$engine = get_app()->get_template_engine();
|
||||
get_app()->set_template_engine();
|
||||
|
||||
|
||||
$email_tpl = replace_macros($tpl, array(
|
||||
'$sitename' => $a->config['sitename'],
|
||||
'$siteurl' => $a->get_baseurl(),
|
||||
|
@ -751,10 +746,6 @@ function dfrn_confirm_post(&$a,$handsfree = null) {
|
|||
'$dfrn_url' => $r[0]['url'],
|
||||
'$uid' => $newuid )
|
||||
);
|
||||
|
||||
|
||||
get_app()->set_template_engine($engine);
|
||||
|
||||
require_once('include/email.php');
|
||||
|
||||
$res = mail($r[0]['email'], email_header_encode( sprintf( t("Connection accepted at %s") , $a->config['sitename']),'UTF-8'),
|
||||
|
|
|
@ -73,9 +73,6 @@ function install_post(&$a) {
|
|||
// connect to db
|
||||
$db = new dba($dbhost, $dbuser, $dbpass, $dbdata, true);
|
||||
|
||||
// disable smarty for this template
|
||||
$engine = $a->get_template_engine();
|
||||
$a->set_template_engine();
|
||||
$tpl = get_intltext_template('htconfig.tpl');
|
||||
$txt = replace_macros($tpl,array(
|
||||
'$dbhost' => $dbhost,
|
||||
|
@ -87,7 +84,6 @@ function install_post(&$a) {
|
|||
'$phpath' => $phpath,
|
||||
'$adminmail' => $adminmail
|
||||
));
|
||||
$a->set_template_engine($engine);
|
||||
|
||||
$result = file_put_contents('.htconfig.php', $txt);
|
||||
if(! $result) {
|
||||
|
|
|
@ -32,9 +32,6 @@ function lostpass_post(&$a) {
|
|||
if($r)
|
||||
info( t('Password reset request issued. Check your email.') . EOL);
|
||||
|
||||
$engine = get_app()->get_template_engine();
|
||||
get_app()->set_template_engine();
|
||||
|
||||
$email_tpl = get_intltext_template("lostpass_eml.tpl");
|
||||
$email_tpl = replace_macros($email_tpl, array(
|
||||
'$sitename' => $a->config['sitename'],
|
||||
|
@ -44,8 +41,6 @@ function lostpass_post(&$a) {
|
|||
'$reset_link' => $a->get_baseurl() . '/lostpass?verify=' . $new_password
|
||||
));
|
||||
|
||||
get_app()->set_template_engine($engine);
|
||||
|
||||
$res = mail($email, email_header_encode(sprintf( t('Password reset requested at %s'),$a->config['sitename']),'UTF-8'),
|
||||
$email_tpl,
|
||||
'From: ' . 'Administrator' . '@' . $_SERVER['SERVER_NAME'] . "\n"
|
||||
|
@ -99,8 +94,6 @@ function lostpass_content(&$a) {
|
|||
info("Your password has been reset." . EOL);
|
||||
|
||||
|
||||
$engine = get_app()->get_template_engine();
|
||||
get_app()->set_template_engine();
|
||||
|
||||
$email_tpl = get_intltext_template("passchanged_eml.tpl");
|
||||
$email_tpl = replace_macros($email_tpl, array(
|
||||
|
@ -111,8 +104,6 @@ function lostpass_content(&$a) {
|
|||
'$new_password' => $new_password,
|
||||
'$uid' => $newuid ));
|
||||
|
||||
get_app()->set_template_engine($engine);
|
||||
|
||||
$subject = sprintf( t('Your password has been changed at %s'), $a->config['sitename']);
|
||||
|
||||
$res = mail($email, email_header_encode( $subject, 'UTF-8'), $email_tpl,
|
||||
|
|
|
@ -79,10 +79,6 @@ function register_post(&$a) {
|
|||
set_pconfig($user['uid'],'system','invites_remaining',$num_invites);
|
||||
}
|
||||
|
||||
$engine = get_app()->get_template_engine();
|
||||
get_app()->set_template_engine();
|
||||
|
||||
|
||||
$email_tpl = get_intltext_template("register_open_eml.tpl");
|
||||
$email_tpl = replace_macros($email_tpl, array(
|
||||
'$sitename' => $a->config['sitename'],
|
||||
|
@ -92,10 +88,6 @@ function register_post(&$a) {
|
|||
'$password' => $result['password'],
|
||||
'$uid' => $user['uid'] ));
|
||||
|
||||
|
||||
get_app()->set_template_engine($engine);
|
||||
|
||||
|
||||
$res = mail($user['email'], email_header_encode( sprintf( t('Registration details for %s'), $a->config['sitename']),'UTF-8'),
|
||||
$email_tpl,
|
||||
'From: ' . 'Administrator' . '@' . $_SERVER['SERVER_NAME'] . "\n"
|
||||
|
@ -139,10 +131,6 @@ function register_post(&$a) {
|
|||
set_pconfig($user['uid'],'system','invites_remaining',$num_invites);
|
||||
}
|
||||
|
||||
|
||||
$engine = get_app()->get_template_engine();
|
||||
get_app()->set_template_engine();
|
||||
|
||||
$email_tpl = get_intltext_template("register_verify_eml.tpl");
|
||||
$email_tpl = replace_macros($email_tpl, array(
|
||||
'$sitename' => $a->config['sitename'],
|
||||
|
@ -154,9 +142,6 @@ function register_post(&$a) {
|
|||
'$hash' => $hash
|
||||
));
|
||||
|
||||
get_app()->set_template_engine($engine);
|
||||
|
||||
|
||||
$res = mail($a->config['admin_email'], email_header_encode( sprintf(t('Registration request at %s'), $a->config['sitename']),'UTF-8'),
|
||||
$email_tpl,
|
||||
'From: ' . 'Administrator' . '@' . $_SERVER['SERVER_NAME'] . "\n"
|
||||
|
|
|
@ -41,9 +41,6 @@ function user_allow($hash) {
|
|||
|
||||
push_lang($register[0]['language']);
|
||||
|
||||
$engine = get_app()->get_template_engine();
|
||||
get_app()->set_template_engine();
|
||||
|
||||
$email_tpl = get_intltext_template("register_open_eml.tpl");
|
||||
$email_tpl = replace_macros($email_tpl, array(
|
||||
'$sitename' => $a->config['sitename'],
|
||||
|
@ -54,10 +51,6 @@ function user_allow($hash) {
|
|||
'$uid' => $user[0]['uid']
|
||||
));
|
||||
|
||||
|
||||
get_app()->set_template_engine($engine);
|
||||
|
||||
|
||||
$res = mail($user[0]['email'], email_header_encode( sprintf(t('Registration details for %s'), $a->config['sitename']), 'UTF-8'),
|
||||
$email_tpl,
|
||||
'From: ' . 'Administrator' . '@' . $_SERVER['SERVER_NAME'] . "\n"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue