Skip to content

Commit

Permalink
Dev: Install UpdateCheck plugin by default
Browse files Browse the repository at this point in the history
  • Loading branch information
olleharstedt committed Oct 10, 2018
1 parent 62665b3 commit 3020611
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 0 deletions.
20 changes: 20 additions & 0 deletions application/core/LsDefaultDataSets.php
Expand Up @@ -924,4 +924,24 @@ public static function getTutorialEntryData()

return $returnArray;
}

/**
* Get data for plugins installed by default.
* Note: Authdb is installed during first login.
* @return array
*/
public static function getDefaultPluginsData()
{
return [
[
'id' => null,
'name' => 'UpdateCheck',
'plugin_type' => 'core',
'active' => 1,
'version' => '1.0.0',
'load_error' => 0,
'load_error_message' => null
]
];
}
}
5 changes: 5 additions & 0 deletions installer/create-database.php
Expand Up @@ -838,6 +838,11 @@ function createDatabase($oDB){
'version' => 'integer NOT NULL',
));

// Install default plugins.
foreach (LsDefaultDataSets::getDefaultPluginsData() as $plugin) {
$oDB->createCommand()->insert("{{plugins}}", $plugin);
}

// Set database version
$oDB->createCommand()->insert("{{settings_global}}", ['stg_name'=> 'DBVersion' , 'stg_value' => $databaseCurrentVersion]);

Expand Down

0 comments on commit 3020611

Please sign in to comment.