cosmetic
This commit is contained in:
parent
0e267a8299
commit
b8af237c5d
@ -70,13 +70,9 @@ class Install extends dcNsProcess
|
|||||||
],
|
],
|
||||||
];
|
];
|
||||||
|
|
||||||
// Nothing to change below
|
|
||||||
private static $pid = '';
|
|
||||||
|
|
||||||
public static function init(): bool
|
public static function init(): bool
|
||||||
{
|
{
|
||||||
self::$pid = basename(dirname(__DIR__));
|
self::$init = defined('DC_CONTEXT_ADMIN') && dcCore::app()->newVersion(Core::id(), dcCore::app()->plugins->moduleInfo(Core::id(), 'version'));
|
||||||
self::$init = defined('DC_CONTEXT_ADMIN') && dcCore::app()->newVersion(self::$pid, dcCore::app()->plugins->moduleInfo(self::$pid, 'version'));
|
|
||||||
|
|
||||||
return self::$init;
|
return self::$init;
|
||||||
}
|
}
|
||||||
@ -93,7 +89,7 @@ class Install extends dcNsProcess
|
|||||||
|
|
||||||
// Set module settings
|
// Set module settings
|
||||||
foreach (self::$mod_conf as $v) {
|
foreach (self::$mod_conf as $v) {
|
||||||
dcCore::app()->blog->settings->__get(self::$pid)->put(
|
dcCore::app()->blog->settings->__get(Core::id())->put(
|
||||||
$v[0],
|
$v[0],
|
||||||
$v[2],
|
$v[2],
|
||||||
$v[3],
|
$v[3],
|
||||||
@ -113,7 +109,7 @@ class Install extends dcNsProcess
|
|||||||
|
|
||||||
public static function growUp(): void
|
public static function growUp(): void
|
||||||
{
|
{
|
||||||
$current = dcCore::app()->getVersion(self::$pid);
|
$current = dcCore::app()->getVersion(Core::id());
|
||||||
|
|
||||||
// Update settings id, ns
|
// Update settings id, ns
|
||||||
if ($current && version_compare($current, '2022.12.19.1', '<=')) {
|
if ($current && version_compare($current, '2022.12.19.1', '<=')) {
|
||||||
@ -126,7 +122,7 @@ class Install extends dcNsProcess
|
|||||||
if (preg_match('/^packman_(.*?)$/', $record->setting_id, $match)) {
|
if (preg_match('/^packman_(.*?)$/', $record->setting_id, $match)) {
|
||||||
$cur = dcCore::app()->con->openCursor(dcCore::app()->prefix . dcNamespace::NS_TABLE_NAME);
|
$cur = dcCore::app()->con->openCursor(dcCore::app()->prefix . dcNamespace::NS_TABLE_NAME);
|
||||||
$cur->setting_id = $match[1];
|
$cur->setting_id = $match[1];
|
||||||
$cur->setting_ns = self::$pid;
|
$cur->setting_ns = Core::id();
|
||||||
$cur->update(
|
$cur->update(
|
||||||
"WHERE setting_id = '" . $record->setting_id . "' and setting_ns = 'pacKman' " .
|
"WHERE setting_id = '" . $record->setting_id . "' and setting_ns = 'pacKman' " .
|
||||||
'AND blog_id ' . (null === $record->blog_id ? 'IS NULL ' : ("= '" . dcCore::app()->con->escape($record->blog_id) . "' "))
|
'AND blog_id ' . (null === $record->blog_id ? 'IS NULL ' : ("= '" . dcCore::app()->con->escape($record->blog_id) . "' "))
|
||||||
|
@ -301,7 +301,7 @@ class Manage extends dcNsProcess
|
|||||||
|
|
||||||
# Display
|
# Display
|
||||||
dcPage::openModule(
|
dcPage::openModule(
|
||||||
__('pacKman'),
|
Core::name(),
|
||||||
dcPage::jsPageTabs() .
|
dcPage::jsPageTabs() .
|
||||||
dcPage::jsModuleLoad(self::$pid . '/js/packman.js') .
|
dcPage::jsModuleLoad(self::$pid . '/js/packman.js') .
|
||||||
|
|
||||||
@ -312,7 +312,7 @@ class Manage extends dcNsProcess
|
|||||||
echo
|
echo
|
||||||
dcPage::breadcrumb([
|
dcPage::breadcrumb([
|
||||||
__('Plugins') => '',
|
__('Plugins') => '',
|
||||||
__('pacKman') => '',
|
Core::name() => '',
|
||||||
]) .
|
]) .
|
||||||
dcPage::notices();
|
dcPage::notices();
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user