Skip to content

Commit

Permalink
Move deleted files and folders and renamed files lists out of script.php
Browse files Browse the repository at this point in the history
  • Loading branch information
richard67 committed Jun 20, 2022
1 parent b95adc7 commit 13047a4
Showing 1 changed file with 0 additions and 37 deletions.
37 changes: 0 additions & 37 deletions administrator/components/com_admin/script.php
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,6 @@ public function update($installer)
$this->updateAssets($installer);
$this->clearStatsCache();
$this->convertTablesToUtf8mb4(true);
$this->addUserAuthProviderColumn();
$this->cleanJoomlaCache();
}

Expand Down Expand Up @@ -1572,40 +1571,4 @@ function ($template) use ($db)
['atum', 'cassiopeia']
);
}

/**
* Add the user Auth Provider Column as it could be present from 3.10 already
*
* @return void
*
* @since 4.1.1
*/
protected function addUserAuthProviderColumn(): void
{
$db = Factory::getContainer()->get('DatabaseDriver');

// Check if the column already exists
$fields = $db->getTableColumns('#__users');

// Column exists, skip
if (isset($fields['authProvider']))
{
return;
}

$query = 'ALTER TABLE ' . $db->quoteName('#__users')
. ' ADD COLUMN ' . $db->quoteName('authProvider') . ' varchar(100) DEFAULT ' . $db->quote('') . ' NOT NULL';

// Add column
try
{
$db->setQuery($query)->execute();
}
catch (Exception $e)
{
echo Text::sprintf('JLIB_DATABASE_ERROR_FUNCTION_FAILED', $e->getCode(), $e->getMessage()) . '<br>';

return;
}
}
}

0 comments on commit 13047a4

Please sign in to comment.