Skip to content

Commit

Permalink
Post-install messages: the model method would result in duplicate pos…
Browse files Browse the repository at this point in the history
…t-installation message keys
  • Loading branch information
Nicholas K. Dionysopoulos committed Aug 29, 2014
1 parent e698229 commit 55d60b1
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions administrator/components/com_postinstall/models/messages.php
Original file line number Diff line number Diff line change
Expand Up @@ -424,9 +424,9 @@ public function addPostInstallationMessage(array $options)
$query = $db->getQuery(true)
->select('*')
->from($db->qn($tableName))
->where($db->q('extension_id') . ' = ' . $db->q($options['extension_id']))
->where($db->q('type') . ' = ' . $db->q($options['type']))
->where($db->q('title_key') . ' = ' . $db->q($options['title_key']));
->where($db->qn('extension_id') . ' = ' . $db->q($options['extension_id']))
->where($db->qn('type') . ' = ' . $db->q($options['type']))
->where($db->qn('title_key') . ' = ' . $db->q($options['title_key']));
$existingRow = $db->setQuery($query)->loadAssoc();

// Is the existing definition the same as the one we're trying to save?
Expand All @@ -436,7 +436,7 @@ public function addPostInstallationMessage(array $options)

foreach ($options as $k => $v)
{
if ($existingRow[$k] == $v)
if ($existingRow[$k] != $v)
{
$same = false;
break;
Expand Down

0 comments on commit 55d60b1

Please sign in to comment.