From 0ce5d7cd4259c84eebe84aa7730dbb621000f813 Mon Sep 17 00:00:00 2001 From: Markus Birth Date: Sun, 10 Jul 2016 16:31:58 +0200 Subject: [PATCH] Bugfix in mail output and cleanup. --- index.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/index.php b/index.php index 44f73be..a26fc3a 100644 --- a/index.php +++ b/index.php @@ -70,7 +70,7 @@ if (!$tpl_done && isset($_SESSION['access_token']) && $_SESSION['access_token']) $client->setAccessToken($_SESSION['access_token']); if ($client->isAccessTokenExpired()) { // TODO: Redirect to $client->createAuthUrl(); to reauthenticate - echo "Token expired! createAuthUrl() . "\">Request new one."; + echo 'Token expired! Request new one.'; #session_destroy(); die(); } @@ -97,7 +97,7 @@ if (!$tpl_done && isset($_SESSION['access_token']) && $_SESSION['access_token']) } else { switch ($_GET['action']) { case 'send': - echo "This would send the mail..."; + echo 'This would send the mail...'; $mo = new MailOutput(dirname(__FILE__) . '/templates'); $mo->setTemplate('mail_' . $form_type); $action = $form_type; @@ -112,7 +112,7 @@ if (!$tpl_done && isset($_SESSION['access_token']) && $_SESSION['access_token']) $data['email_date'] = date('r'); $data = array_merge($data, $fields); - $mo->setTemplateVars($data); + $mo->addTemplateVars($data); $mail_html = $mo->getRenderedOutput(); list($headers, $mailbody) = preg_split('/\r?\n\r?\n/', $mail_html, 2);