Skip to content

Commit

Permalink
Merge branch 'staging' of github.com:joomla/joomla-cms
Browse files Browse the repository at this point in the history
  • Loading branch information
Phil Taylor committed Jan 1, 2015
2 parents 543ad48 + 5173720 commit 856e9cb
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 12 deletions.
31 changes: 20 additions & 11 deletions administrator/components/com_admin/script.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,14 @@ protected function updateDatabase()
if (substr($db->name, 0, 5) == 'mysql')
{
$db->setQuery('SHOW ENGINES');
$results = $db->loadObjectList();

if ($db->getErrorNum())
try
{
echo JText::sprintf('JLIB_DATABASE_ERROR_FUNCTION_FAILED', $db->getErrorNum(), $db->getErrorMsg()) . '<br />';
$results = $db->loadObjectList();
}
catch (Exception $e)
{
echo JText::sprintf('JLIB_DATABASE_ERROR_FUNCTION_FAILED', $e->getCode(), $e->getMessage()) . '<br />';

return;
}
Expand All @@ -63,11 +66,14 @@ protected function updateDatabase()
if ($result->Support == 'DEFAULT')
{
$db->setQuery('ALTER TABLE #__update_sites_extensions ENGINE = ' . $result->Engine);
$db->execute();

if ($db->getErrorNum())
try
{
echo JText::sprintf('JLIB_DATABASE_ERROR_FUNCTION_FAILED', $db->getErrorNum(), $db->getErrorMsg()) . '<br />';
$db->execute();
}
catch (Exception $e)
{
echo JText::sprintf('JLIB_DATABASE_ERROR_FUNCTION_FAILED', $e->getCode(), $e->getMessage()) . '<br />';

return;
}
Expand Down Expand Up @@ -252,17 +258,20 @@ protected function updateManifestCaches()
}

$db->setQuery($query);
$extensions = $db->loadObjectList();
$installer = new JInstaller;

// Check for a database error.
if ($db->getErrorNum())
try
{
echo JText::sprintf('JLIB_DATABASE_ERROR_FUNCTION_FAILED', $db->getErrorNum(), $db->getErrorMsg()) . '<br />';
$extensions = $db->loadObjectList();
}
catch (Exception $e)
{
echo JText::sprintf('JLIB_DATABASE_ERROR_FUNCTION_FAILED', $e->getCode(), $e->getMessage()) . '<br />';

return;
}

$installer = new JInstaller;

foreach ($extensions as $extension)
{
if (!$installer->refreshManifestCache($extension->extension_id))
Expand Down
2 changes: 1 addition & 1 deletion installation/model/configuration.php
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ public function _createConfiguration($options)
$registry->set('ftp_user', (isset($options->ftp_save) && $options->ftp_save && isset($options->ftp_user)) ? $options->ftp_user : '');
$registry->set('ftp_pass', (isset($options->ftp_save) && $options->ftp_save && isset($options->ftp_pass)) ? $options->ftp_pass : '');
$registry->set('ftp_root', (isset($options->ftp_save) && $options->ftp_save && isset($options->ftp_root)) ? $options->ftp_root : '');
$registry->set('ftp_enable', isset($options->ftp_host) ? $options->ftp_enable : '');
$registry->set('ftp_enable', isset($options->ftp_host) ? $options->ftp_enable : 0);

// Locale settings.
$registry->set('offset', 'UTC');
Expand Down

0 comments on commit 856e9cb

Please sign in to comment.