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
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;
}
@ -83,7 +83,7 @@ class adminBehaviorPostExpired
*/
public static function adminPostHeaders()
{
return dcPage::jsLoad(dcPage::getPF('postExpired/js/postexpired.js'));
return dcPage::jsModuleLoad(basename(__DIR__) . '/js/postexpired.js');
}
/**

View File

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

View File

@ -14,7 +14,7 @@ if (!defined('DC_RC_PATH')) {
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;
}