aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2013-02-09 13:20:10 -0800
committerfriendica <info@friendica.com>2013-02-09 13:20:10 -0800
commite0cbbbf918e17d1c6b415c2f9bd4780b97c4f204 (patch)
treea1a068efc936d38febcb808daa230f2404564ff5 /include
parent6022a9e9cdf12d60a138f06300285f231d2c2976 (diff)
downloadvolse-hubzilla-e0cbbbf918e17d1c6b415c2f9bd4780b97c4f204.tar.gz
volse-hubzilla-e0cbbbf918e17d1c6b415c2f9bd4780b97c4f204.tar.bz2
volse-hubzilla-e0cbbbf918e17d1c6b415c2f9bd4780b97c4f204.zip
smarty support in intltext, fix old pending accounts query in ping, log failed email register notify
Diffstat (limited to 'include')
-rw-r--r--include/account.php7
-rw-r--r--include/plugin.php16
2 files changed, 18 insertions, 5 deletions
diff --git a/include/account.php b/include/account.php
index f89197e0c..444036473 100644
--- a/include/account.php
+++ b/include/account.php
@@ -247,14 +247,14 @@ function send_reg_approval_email($arr) {
push_lang('en');
$email_msg = replace_macros(get_intltext_template('register_verify_email.tpl'), array(
- '$sitename' => get_config('config','sitename'),
+ '$sitename' => get_config('system','sitename'),
'$siteurl' => z_root(),
'$email' => $arr['email'],
'$uid' => $arr['account']['account_id'],
'$hash' => $hash
));
- $res = mail($admin['email'], sprintf( t('Registration request at %s'), get_config('config','sitename')),
+ $res = mail($admin['email'], sprintf( t('Registration request at %s'), get_config('system','sitename')),
$email_msg,
'From: ' . t('Administrator') . '@' . get_app()->get_hostname() . "\n"
. 'Content-type: text/plain; charset=UTF-8' . "\n"
@@ -263,6 +263,9 @@ function send_reg_approval_email($arr) {
if($res)
$delivered ++;
+ else
+ logger('send_reg_approval_email: failed to ' . $admin['email'] . 'account_id: ' . $arr['account']['account_id']);
+
pop_lang();
}
diff --git a/include/plugin.php b/include/plugin.php
index b48cadb1e..6660fba59 100644
--- a/include/plugin.php
+++ b/include/plugin.php
@@ -514,12 +514,22 @@ function get_intltext_template($s) {
if($a->get_template_engine() === 'smarty3')
$engine = "/smarty3";
+ $file = '';
if(file_exists("view/{$a->language}$engine/$s"))
- return file_get_contents("view/{$a->language}$engine/$s");
+ $file = "view/{$a->language}$engine/$s";
elseif(file_exists("view/en$engine/$s"))
- return file_get_contents("view/en$engine/$s");
+ $file = "view/en$engine/$s";
else
- return file_get_contents("view/tpl/$engine/$s");
+ $file = "view/tpl/$engine/$s";
+ if($engine === '/smarty3') {
+ $template = new FriendicaSmarty();
+ $template->filename = $file;
+
+ return $template;
+ }
+ else
+ return file_get_contents($file);
+
}}
if(! function_exists('get_markup_template')) {