Skip to content

Commit

Permalink
version 1.1.1, included security fix [20181001] from Joomla 3.8.13
Browse files Browse the repository at this point in the history
  • Loading branch information
PeterMacej committed Oct 9, 2018
1 parent 097a36d commit 3dc483e
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 4 deletions.
2 changes: 1 addition & 1 deletion plg_contactformenhancer/contactformenhancer.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<license>GNU General Public License version 2 or later; see LICENSE.txt</license>
<authorEmail></authorEmail>
<authorUrl>http://petermacej.github.io/contactform_enh/</authorUrl>
<version>1.1</version>
<version>1.1.1</version>
<description>PLG_SYSTEM_CONTACTFORMENHANCER_DESCR</description>

<updateservers>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,36 @@ public function submit()

// Get the data from POST
$data = $this->input->post->get('jform', array(), 'array');

// Get item
$model->setState('filter.published', 1);
$contact = $model->getItem($id);

$params->merge($contact->params);
// Get item params, take menu parameters into account if necessary
$active = $app->getMenu()->getActive();
$stateParams = clone $model->getState()->get('params');

// If the current view is the active item and a contact view for this contact, then the menu item params take priority
if ($active && strpos($active->link, 'view=contact') && strpos($active->link, '&id=' . (int) $contact->id))
{
// $item->params are the contact params, $temp are the menu item params
// Merge so that the menu item params take priority
$contact->params->merge($stateParams);
}
else
{
// Current view is not a single contact, so the contact params take priority here
$stateParams->merge($contact->params);
$contact->params = $stateParams;
}

// Check if the contact form is enabled
if (!$contact->params->get('show_email_form'))
{
$this->setRedirect(JRoute::_('index.php?option=com_contact&view=contact&id=' . $stub, false));

return false;
}

// Check for a valid session cookie
if ($params->get('validate_session', 0))
Expand Down
4 changes: 2 additions & 2 deletions server/plg_contactformenhancer_update.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
<type>plugin</type>
<folder>system</folder>
<client>0</client>
<version>1.1.0</version>
<version>1.1.1</version>
<downloads>
<downloadurl type="full" format="zip">https://github.com/PeterMacej/contactform_enh/releases/download/v1.1.0/plg_contactformenhancer_v1.1.0.zip</downloadurl>
<downloadurl type="full" format="zip">https://github.com/PeterMacej/contactform_enh/releases/download/v1.1.1/plg_contactformenhancer_v1.1.1.zip</downloadurl>
</downloads>
<maintainer>Peter Macej</maintainer>
<maintainerurl>http://petermacej.github.io/contactform_enh/</maintainerurl>
Expand Down

0 comments on commit 3dc483e

Please sign in to comment.