39 lines
816 B
PHP
39 lines
816 B
PHP
<?php
|
|
/**
|
|
* @brief Photoblog2, a plugin for Dotclear 2
|
|
*
|
|
* @package Dotclear
|
|
* @subpackage Plugins
|
|
*
|
|
* @author julien mudry and contributors
|
|
*
|
|
* @copyright julien mudry
|
|
* @copyright GPL-2.0 https://www.gnu.org/licenses/gpl-2.0.html
|
|
*/
|
|
if (!defined('DC_CONTEXT_ADMIN')) {
|
|
return;
|
|
}
|
|
|
|
if (!dcCore::app()->newVersion(basename(__DIR__), dcCore::app()->plugins->moduleInfo(basename(__DIR__), 'version'))) {
|
|
return;
|
|
}
|
|
|
|
try {
|
|
// Insert below necessary initialisations and updates
|
|
|
|
; // Init to be completed
|
|
|
|
$old_version = dcCore::app()->getVersion(basename(__DIR__));
|
|
if (version_compare((string) $old_version, '1.0', '<')) {
|
|
|
|
; // Update since 1.0 to be completed
|
|
|
|
}
|
|
|
|
return true;
|
|
} catch (Exception $e) {
|
|
dcCore::app()->error->add($e->getMessage());
|
|
}
|
|
|
|
return false;
|