Deprecated: Assigning the return value of new by reference is deprecated in /home/bluestat/public_html/source/index.php on line 477
Bugdar - Commitdiff - ViewGit - Blue Static

r1591: Fix the user approval system by actually getting email templates correctly

Robert Sesek [2007-07-20 02:20]
r1591: Fix the user approval system by actually getting email templates correctly
diff --git a/admin/usergroup.php b/admin/usergroup.php
index 89aee29..0a7362a 100755
--- a/admin/usergroup.php
+++ b/admin/usergroup.php
@@ -334,7 +334,8 @@ if ($_POST['do'] == 'doapprove')
 		$users = $db->query("SELECT * FROM " . TABLE_PREFIX . "user WHERE userid IN (" . implode(',', $idlist) . ")");
 		while ($user = $db->fetch_array($users))
 		{
-			eval('$email = "' . $template->fetch('email/accountapproved.xml') . '";');
+			$tpl = $template->fetch(FetchEmailPath('accountapproved.xml', $bugsys->datastore['language'][$bugsys->options['defaultlanguage']]['langcode']));
+			eval('$email = "' . $tpl . '";');
 			$email = $bugsys->xml->parse($email);
 			$mail->setSubject($email['email']['subject']['value']);
 			$mail->setBodyText($email['email']['bodyText']['value']);
diff --git a/docs/changes.txt b/docs/changes.txt
index 3f7dee8..2f53dd2 100644
--- a/docs/changes.txt
+++ b/docs/changes.txt
@@ -1,6 +1,7 @@
 1.2.2
 ===============================
 - Fixed: A "Call-time pass-by-reference has been deprecated" on search.php
+- Fixed: Users could not be approved due to a improper email template paths

 1.2.1
 ===============================