Skip to content

Commit

Permalink
#125: define beta install files and order
Browse files Browse the repository at this point in the history
  • Loading branch information
yiendos committed Jul 23, 2020
1 parent 00e9321 commit cdd4068
Showing 1 changed file with 4 additions and 15 deletions.
19 changes: 4 additions & 15 deletions src/Joomlatools/Console/Command/Database/Install.php
Original file line number Diff line number Diff line change
Expand Up @@ -234,20 +234,6 @@ protected function _getInstallFiles($sample_data = false)
{
$files = array();

$beta_installs = function($path) {

$beta_installs = array();

foreach (array_diff(scandir($path), array('.', '..')) AS $install_sql)
{
if (strpos($install_sql, 'sample_') === false){
$beta_installs[] = $path .$install_sql;
}
}

return $beta_installs;
};

if (Util::isPlatform($this->target_dir) || Util::isKodekitPlatform($this->target_dir))
{
$path = $this->target_dir .'/install/mysql/';
Expand All @@ -267,7 +253,10 @@ protected function _getInstallFiles($sample_data = false)

if (version_compare($version->release, '3.9', '>'))
{
$files = $beta_installs($path);
$files[] = $path . "base.sql";
$files[] = $path . "extensions.sql";
$files[] = $path . "supports.sql";

}else{
$files[] = $path.'joomla.sql';
}
Expand Down

0 comments on commit cdd4068

Please sign in to comment.