Skip to content

Commit

Permalink
Merge pull request joomla#3249 from Hackwar/patch-12
Browse files Browse the repository at this point in the history
Fixing version comparison for database schema
  • Loading branch information
mbabker authored and Bakual committed May 12, 2014
2 parents 34c7784 + f328913 commit bc1cc7f
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@
<li><?php echo JText::_('COM_INSTALLER_MSG_DATABASE_FILTER_ERROR'); ?>
<?php endif; ?>

<?php if (version_compare($this->schemaVersion, JVERSION) != 0) : ?>
<li><?php echo JText::sprintf('COM_INSTALLER_MSG_DATABASE_SCHEMA_ERROR', $this->schemaVersion, JVERSION); ?></li>
<?php if ($this->schemaVersion != $this->changeSet->getSchema()) : ?>
<li><?php echo JText::sprintf('COM_INSTALLER_MSG_DATABASE_SCHEMA_ERROR', $this->schemaVersion, $this->changeSet->getSchema()); ?></li>
<?php endif; ?>

<?php if (version_compare($this->updateVersion, JVERSION) != 0) : ?>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public function display($tpl = null)
$this->pagination = $this->get('Pagination');
$this->errorCount = count($this->errors);

if (version_compare($this->schemaVersion, JVERSION) != 0)
if ($this->schemaVersion != $this->changeSet->getSchema())
{
$this->errorCount++;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,11 @@
<li><?php echo JText::_('COM_INSTALLER_MSG_DATABASE_FILTER_ERROR'); ?>
<?php endif; ?>

<?php if (!(strncmp($this->schemaVersion, JVERSION, 5) === 0)) : ?>
<li><?php echo JText::sprintf('COM_INSTALLER_MSG_DATABASE_SCHEMA_ERROR', $this->schemaVersion, JVERSION); ?></li>
<?php if ($this->schemaVersion != $this->changeSet->getSchema()) : ?>
<li><?php echo JText::sprintf('COM_INSTALLER_MSG_DATABASE_SCHEMA_ERROR', $this->schemaVersion, $this->changeSet->getSchema()); ?></li>
<?php endif; ?>

<?php if (($this->updateVersion != JVERSION)) : ?>
<?php if (version_compare($this->updateVersion, JVERSION) != 0) : ?>
<li><?php echo JText::sprintf('COM_INSTALLER_MSG_DATABASE_UPDATEVERSION_ERROR', $this->updateVersion, JVERSION); ?></li>
<?php endif; ?>

Expand Down

0 comments on commit bc1cc7f

Please sign in to comment.