bludit/bl-kernel/admin/controllers/dashboard.php

43 lines
1.4 KiB
PHP
Raw Normal View History

2015-06-26 06:31:53 +02:00
<?php defined('BLUDIT') or die('Bludit CMS.');
2015-03-27 02:00:01 +01:00
2015-06-26 06:31:53 +02:00
// ============================================================================
// Functions
// ============================================================================
function updateBludit() {
global $site;
// Check if Bludit need to be update.
if( ($site->currentBuild() < BLUDIT_BUILD) || isset($_GET['update']) ) {
Log::set('UPDATE SYSTEM - Starting.');
2017-05-16 00:46:20 +02:00
2018-09-10 20:23:37 +02:00
$plugins = array('pluginRSS', 'pluginSitemap', 'pluginTimeMachineX', 'pluginBackup');
foreach ($plugins as $plugin) {
if (pluginActivated($plugin)) {
Log::set('UPDATE SYSTEM - Re-enable plugin: '.$plugin);
deactivatePlugin($plugin);
activatePlugin($plugin);
}
}
2017-05-16 00:46:20 +02:00
// Set the current build number
$site->set(array('currentBuild'=>BLUDIT_BUILD));
Log::set('UPDATE SYSTEM - Finished.');
}
}
2015-03-27 02:00:01 +01:00
2015-08-03 02:49:12 +02:00
// ============================================================================
// Main before POST
// ============================================================================
2015-06-26 06:31:53 +02:00
// ============================================================================
// POST Method
// ============================================================================
// ============================================================================
2015-08-03 02:49:12 +02:00
// Main after POST
2015-06-26 06:31:53 +02:00
// ============================================================================
// Try update Bludit
updateBludit();
2015-07-27 02:29:47 +02:00
// Title of the page
$layout['title'] .= ' - '.$L->g('Dashboard');