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