Canonical plugin activated by default

This commit is contained in:
Diego Najar 2019-01-28 22:11:59 +01:00
parent bf061d6fff
commit 8fc358a168
1 changed files with 12 additions and 13 deletions

View File

@ -277,7 +277,7 @@ function install($adminPassword, $timezone)
} }
// Directories for initial plugins // Directories for initial plugins
$pluginsToInstall = array('tinymce', 'tags', 'about', 'simple-stats', 'robots'); $pluginsToInstall = array('tinymce', 'about', 'simple-stats', 'robots', 'canonical');
foreach ($pluginsToInstall as $plugin) { foreach ($pluginsToInstall as $plugin) {
if (!mkdir(PATH_PLUGINS_DATABASES.$plugin, DIR_PERMISSIONS, true)) { if (!mkdir(PATH_PLUGINS_DATABASES.$plugin, DIR_PERMISSIONS, true)) {
$errorText = 'Error when trying to created the directory=>'.PATH_PLUGINS_DATABASES.$plugin; $errorText = 'Error when trying to created the directory=>'.PATH_PLUGINS_DATABASES.$plugin;
@ -480,18 +480,6 @@ function install($adminPassword, $timezone)
LOCK_EX LOCK_EX
); );
// File plugins/tags/db.php
file_put_contents(
PATH_PLUGINS_DATABASES.'tags'.DS.'db.php',
$dataHead.json_encode(
array(
'position'=>2,
'label'=>$L->get('Tags')
),
JSON_PRETTY_PRINT),
LOCK_EX
);
// File plugins/simple-stats/db.php // File plugins/simple-stats/db.php
file_put_contents( file_put_contents(
PATH_PLUGINS_DATABASES.'simple-stats'.DS.'db.php', PATH_PLUGINS_DATABASES.'simple-stats'.DS.'db.php',
@ -521,6 +509,17 @@ function install($adminPassword, $timezone)
LOCK_EX LOCK_EX
); );
// File plugins/canonical/db.php
file_put_contents(
PATH_PLUGINS_DATABASES.'canonical'.DS.'db.php',
$dataHead.json_encode(
array(
'position'=>1
),
JSON_PRETTY_PRINT),
LOCK_EX
);
// File plugins/robots/db.php // File plugins/robots/db.php
file_put_contents( file_put_contents(
PATH_PLUGINS_DATABASES.'robots'.DS.'db.php', PATH_PLUGINS_DATABASES.'robots'.DS.'db.php',