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
|
|
|
|
// ============================================================================
|
2017-12-10 22:14:12 +01:00
|
|
|
function updateBludit() {
|
2018-07-17 19:13:01 +02:00
|
|
|
global $site;
|
2017-12-10 22:14:12 +01:00
|
|
|
// Check if Bludit need to be update.
|
2018-07-17 19:13:01 +02:00
|
|
|
if( ($site->currentBuild() < BLUDIT_BUILD) || isset($_GET['update']) ) {
|
2017-12-10 22:14:12 +01:00
|
|
|
Log::set('UPDATE SYSTEM - Starting.');
|
2017-05-16 00:46:20 +02:00
|
|
|
|
2017-12-10 22:14:12 +01:00
|
|
|
// From Bludit v2.0.x to v2.1.x
|
2018-07-17 19:13:01 +02:00
|
|
|
if ($site->currentBuild() < '20171102') {
|
2017-12-10 22:14:12 +01:00
|
|
|
// Nothing to do
|
|
|
|
}
|
2017-05-16 00:46:20 +02:00
|
|
|
|
2017-12-10 22:14:12 +01:00
|
|
|
// Set the current build number
|
2018-07-17 19:13:01 +02:00
|
|
|
$site->set(array('currentBuild'=>BLUDIT_BUILD));
|
2017-12-10 22:14:12 +01:00
|
|
|
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
|
|
|
// ============================================================================
|
|
|
|
|
2015-11-20 04:21:39 +01:00
|
|
|
// Try update Bludit
|
2017-12-10 22:14:12 +01:00
|
|
|
updateBludit();
|
2015-07-27 02:29:47 +02:00
|
|
|
|
2017-09-09 00:33:14 +02:00
|
|
|
// Title of the page
|
|
|
|
$layout['title'] .= ' - '.$Language->g('Dashboard');
|