fix new permissions and notices
This commit is contained in:
parent
3fd34adc72
commit
1c4253d594
@ -27,7 +27,7 @@ dcCore::app()->menu[dcAdmin::MENU_PLUGINS]->addItem(
|
||||
'/plugin.php\?p=enhancePostContent(&.*)?$/',
|
||||
$_SERVER['REQUEST_URI']
|
||||
),
|
||||
dcCore::app()->auth->check('contentadmin', dcCore::app()->blog->id)
|
||||
dcCore::app()->auth->check(dcCore::app()->auth->makePermissions([dcAuth::PERMISSION_CONTENT_ADMIN]), dcCore::app()->blog->id)
|
||||
);
|
||||
|
||||
dcCore::app()->addBehavior(
|
||||
@ -56,7 +56,7 @@ class epcAdminBehaviors
|
||||
'url' => 'plugin.php?p=enhancePostContent',
|
||||
'small-icon' => 'index.php?pf=enhancePostContent/icon.png',
|
||||
'large-icon' => 'index.php?pf=enhancePostContent/icon-big.png',
|
||||
'permissions' => dcCore::app()->auth->check('contentadmin', dcCore::app()->blog->id),
|
||||
'permissions' => dcCore::app()->auth->check(dcCore::app()->auth->makePermissions([dcAuth::PERMISSION_CONTENT_ADMIN]), dcCore::app()->blog->id),
|
||||
'active_cb' => [
|
||||
'epcAdminBehaviors',
|
||||
'adminDashboardFavoritesActive',
|
||||
|
10
index.php
10
index.php
@ -14,7 +14,7 @@ if (!defined('DC_CONTEXT_ADMIN')) {
|
||||
return null;
|
||||
}
|
||||
|
||||
dcPage::check('contentadmin');
|
||||
dcPage::check(dcCore::app()->auth->makePermissions([dcAuth::PERMISSION_CONTENT_ADMIN]));
|
||||
|
||||
# -- Prepare queries and object --
|
||||
|
||||
@ -63,7 +63,7 @@ try {
|
||||
|
||||
dcCore::app()->blog->triggerBlog();
|
||||
|
||||
dcPage::addSuccessNotice(
|
||||
dcAdminNotices::addSuccessNotice(
|
||||
__('Filter successfully updated.')
|
||||
);
|
||||
|
||||
@ -85,13 +85,13 @@ try {
|
||||
$cur->epc_value = html::escapeHTML($_POST['new_value']);
|
||||
|
||||
if ($records->isRecord($cur->epc_filter, $cur->epc_key)) {
|
||||
dcPage::addErrorNotice(__('Key already exists for this filter'));
|
||||
dcAdminNotices::addErrorNotice(__('Key already exists for this filter'));
|
||||
} else {
|
||||
$records->addRecord($cur);
|
||||
|
||||
dcCore::app()->blog->triggerBlog();
|
||||
|
||||
dcPage::addSuccessNotice(
|
||||
dcAdminNotices::addSuccessNotice(
|
||||
__('Filter successfully updated.')
|
||||
);
|
||||
}
|
||||
@ -112,7 +112,7 @@ try {
|
||||
|
||||
dcCore::app()->blog->triggerBlog();
|
||||
|
||||
dcPage::addSuccessNotice(
|
||||
dcAdminNotices::addSuccessNotice(
|
||||
__('Filter successfully updated.')
|
||||
);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user