hoochicken / mod_qlform

GNU Lesser General Public License v3.0
5 stars 1 forks source link

Thankyou message in case of redirection to a different page #21

Open patatagit opened 2 weeks ago

patatagit commented 2 weeks ago

Hi Mareike, I noticed that the "thankyou message" by joomla notice does not appear if the redirect is set to a different page. I tried to solve it like this. modules/mod_qlform/mod_qlform.php line 302 From:

    if ($params->get('locationbool') && !empty($strLocation)) {
        header('HTTP/1.0 302 Found');
        header('location:' . Text::_($strLocation));
        exit;
    }
To:
   if ($params->get('locationbool') && !empty($strLocation)) {
        $application = Factory::getApplication();
        $application->enqueueMessage($params->get('message'), 'message');
        $application->redirect($strLocation);
        $app->close();
        exit;
    }