upgrade to Dotclear 2.27

master
Jean-Christian Paul Denis 2023-08-06 18:26:15 +02:00
parent a0de48bf4a
commit 5c55eaa503
Signed by: JcDenis
GPG Key ID: 1B5B8C5B90B6C951
4 changed files with 14 additions and 45 deletions

View File

@ -15,20 +15,18 @@ declare(strict_types=1);
namespace Dotclear\Plugin\CategoriesPage;
use dcCore;
use dcNsProcess;
use Dotclear\Core\Process;
class Backend extends dcNsProcess
class Backend extends Process
{
public static function init(): bool
{
static::$init = defined('DC_CONTEXT_ADMIN');
return static::$init;
return self::status(My::checkContext(My::BACKEND));
}
public static function process(): bool
{
if (!static::$init) {
if (!self::status()) {
return false;
}

View File

@ -16,20 +16,18 @@ namespace Dotclear\Plugin\CategoriesPage;
use ArrayObject;
use dcCore;
use dcNsProcess;
use Dotclear\Core\Process;
class Frontend extends dcNsProcess
class Frontend extends Process
{
public static function init(): bool
{
static::$init = defined('DC_RC_PATH');
return static::$init;
return self::status(My::checkContext(My::FRONTEND));
}
public static function process(): bool
{
if (!static::$init) {
if (!self::status()) {
return false;
}

View File

@ -14,36 +14,11 @@ declare(strict_types=1);
namespace Dotclear\Plugin\CategoriesPage;
use dcCore;
use Dotclear\Module\MyPlugin;
/**
* This module definitions.
*/
class My
class My extends MyPlugin
{
/**
* This module id.
*/
public static function id(): string
{
return basename(dirname(__DIR__));
}
/**
* This module name.
*/
public static function name(): string
{
$name = dcCore::app()->plugins->moduleInfo(self::id(), 'name');
return __(is_string($name) ? $name : self::id());
}
/**
* This module path.
*/
public static function path(): string
{
return dirname(__DIR__);
}
}

View File

@ -15,20 +15,18 @@ declare(strict_types=1);
namespace Dotclear\Plugin\CategoriesPage;
use dcCore;
use dcNsProcess;
use Dotclear\Core\Process;
class Prepend extends dcNsProcess
class Prepend extends Process
{
public static function init(): bool
{
static::$init = defined('DC_RC_PATH');
return static::$init;
return self::status(My::checkContext(My::PREPEND));
}
public static function process(): bool
{
if (!static::$init) {
if (!self::status()) {
return false;
}