This commit is contained in:
Jean-Christian Denis 2022-11-15 22:07:37 +01:00
parent 222000a5fe
commit 16684555a0
Signed by: JcDenis
GPG key ID: 1B5B8C5B90B6C951
4 changed files with 16 additions and 16 deletions

View file

@ -25,12 +25,12 @@ $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/postWidgetText', 'support' => 'https://github.com/JcDenis/postWidgetText',
'details' => 'https://plugins.dotaddict.org/dc2/details/postWidgetText', 'details' => 'https://plugins.dotaddict.org/dc2/details/postWidgetText',
'repository' => 'https://raw.githubusercontent.com/JcDenis/postWidgetText/master/dcstore.xml', 'repository' => 'https://raw.githubusercontent.com/JcDenis/postWidgetText/master/dcstore.xml',
'settings' => [ 'settings' => [
'blog' => '#params.pwt_params' 'blog' => '#params.pwt_params',
] ],
] ]
); );

View file

@ -248,7 +248,7 @@ class postWidgetText
'excerpt' => &$excerpt, 'excerpt' => &$excerpt,
'content' => &$content, 'content' => &$content,
'excerpt_xhtml' => &$excerpt_xhtml, 'excerpt_xhtml' => &$excerpt_xhtml,
'content_xhtml' => &$content_xhtml 'content_xhtml' => &$content_xhtml,
]); ]);
} }
} }

View file

@ -34,7 +34,7 @@ class adminPostWidgetText
self::sortbyCombo(), self::sortbyCombo(),
'post_dt', 'post_dt',
'desc', 'desc',
[__('entries per page'), 20] [__('entries per page'), 20],
]; ];
} }
@ -73,7 +73,7 @@ class adminPostWidgetText
'small-icon' => dcPage::getPF('postWidgetText/icon.png'), 'small-icon' => dcPage::getPF('postWidgetText/icon.png'),
'large-icon' => dcPage::getPF('postWidgetText/icon-big.png'), 'large-icon' => dcPage::getPF('postWidgetText/icon-big.png'),
'permissions' => dcCore::app()->auth->check('usage,contentadmin', dcCore::app()->blog->id), 'permissions' => dcCore::app()->auth->check('usage,contentadmin', dcCore::app()->blog->id),
'active_cb' => ['adminPostWidgetText', 'adminDashboardFavoritesActive'] 'active_cb' => ['adminPostWidgetText', 'adminDashboardFavoritesActive'],
]); ]);
} }
@ -234,7 +234,7 @@ class adminPostWidgetText
$line->post_id = $bk->old_ids['post'][(int) $line->post_id]; $line->post_id = $bk->old_ids['post'][(int) $line->post_id];
$exists = $bk->postwidgettext->getWidgets([ $exists = $bk->postwidgettext->getWidgets([
'post_id' => $line->post_id 'post_id' => $line->post_id,
]); ]);
if ($exists->isEmpty()) { if ($exists->isEmpty()) {
@ -258,7 +258,7 @@ class adminPostWidgetText
{ {
if ($line->__name == 'postwidgettext') { if ($line->__name == 'postwidgettext') {
$exists = $bk->postwidgettext->getWidgets([ $exists = $bk->postwidgettext->getWidgets([
'post_id' => $line->post_id 'post_id' => $line->post_id,
]); ]);
if ($exists->isEmpty()) { if ($exists->isEmpty()) {

View file

@ -15,9 +15,9 @@ if (!defined('DC_CONTEXT_ADMIN')) {
} }
dcPage::check(dcCore::app()->auth->makePermissions([ dcPage::check(dcCore::app()->auth->makePermissions([
dcAuth::PERMISSION_USAGE, dcAuth::PERMISSION_USAGE,
dcAuth::PERMISSION_CONTENT_ADMIN, dcAuth::PERMISSION_CONTENT_ADMIN,
])); ]));
$pwt = new postWidgetText(); $pwt = new postWidgetText();
@ -66,7 +66,7 @@ $filter->js(dcCore::app()->adminurl->get('admin.plugin.postWidgetText')) . '
dcPage::breadcrumb([ dcPage::breadcrumb([
__('Plugins') => '', __('Plugins') => '',
__('Posts widgets') => '' __('Posts widgets') => '',
]) . ]) .
dcPage::notices(); dcPage::notices();