use abstract plugin id

This commit is contained in:
Jean-Christian Paul Denis 2022-12-25 21:48:47 +01:00
parent d657d5b0e2
commit 25f4e928ad
Signed by: JcDenis
GPG Key ID: 1B5B8C5B90B6C951
4 changed files with 8 additions and 8 deletions

View File

@ -15,7 +15,7 @@ if (!defined('DC_CONTEXT_ADMIN')) {
} }
# Check plugin version # Check plugin version
if (dcCore::app()->getVersion('postExpired') != dcCore::app()->plugins->moduleInfo('postExpired', 'version')) { if (dcCore::app()->getVersion(basename(__DIR__)) != dcCore::app()->plugins->moduleInfo(basename(__DIR__), 'version')) {
return null; return null;
} }
@ -83,7 +83,7 @@ class adminBehaviorPostExpired
*/ */
public static function adminPostHeaders() public static function adminPostHeaders()
{ {
return dcPage::jsLoad(dcPage::getPF('postExpired/js/postexpired.js')); return dcPage::jsModuleLoad(basename(__DIR__) . '/js/postexpired.js');
} }
/** /**

View File

@ -25,9 +25,9 @@ $this->registerModule(
dcAuth::PERMISSION_USAGE, dcAuth::PERMISSION_USAGE,
dcAuth::PERMISSION_CONTENT_ADMIN, dcAuth::PERMISSION_CONTENT_ADMIN,
]), ]),
'type' => 'plugin', 'type' => 'plugin',
'support' => 'https://github.com/JcDenis/postExpired', 'support' => 'https://github.com/JcDenis/' . basename(__DIR__),
'details' => 'https://plugins.dotaddict.org/dc2/details/postExpired', 'details' => 'https://plugins.dotaddict.org/dc2/details/' . basename(__DIR__),
'repository' => 'https://raw.githubusercontent.com/JcDenis/postExpired/master/dcstore.xml', 'repository' => 'https://raw.githubusercontent.com/JcDenis/' . basename(__DIR__) . '/master/dcstore.xml',
] ]
); );

View File

@ -18,7 +18,7 @@ if (!defined('DC_CONTEXT_ADMIN')) {
try { try {
# Check module version # Check module version
if (!dcCore::app()->newVersion( if (!dcCore::app()->newVersion(
basename(__DIR__), basename(__DIR__),
dcCore::app()->plugins->moduleInfo(basename(__DIR__), 'version') dcCore::app()->plugins->moduleInfo(basename(__DIR__), 'version')
)) { )) {
return null; return null;

View File

@ -14,7 +14,7 @@ if (!defined('DC_RC_PATH')) {
return null; return null;
} }
if (dcCore::app()->getVersion('postExpired') != dcCore::app()->plugins->moduleInfo('postExpired', 'version')) { if (dcCore::app()->getVersion(basename(__DIR__)) != dcCore::app()->plugins->moduleInfo(basename(__DIR__), 'version')) {
return null; return null;
} }