use abstract plugin id
This commit is contained in:
parent
d657d5b0e2
commit
25f4e928ad
@ -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');
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -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',
|
||||||
]
|
]
|
||||||
);
|
);
|
||||||
|
@ -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;
|
||||||
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user