auth->check('publish,contentadmin', dcCore::app()->blog->id)) { try { dcCore::app()->meta->delMeta($template, 'template'); http::redirect($p_url . '&del=' . $template); } catch (Exception $e) { dcCore::app()->error->add($e->getMessage()); } } $params = []; $params['limit'] = [(($page - 1) * $nb_per_page),$nb_per_page]; $params['no_content'] = true; $params['meta_id'] = $template; $params['meta_type'] = 'template'; $params['post_type'] = ''; # Get posts try { $posts = dcCore::app()->meta->getPostsByMeta($params); $counter = dcCore::app()->meta->getPostsByMeta($params, true); $post_list = new adminPostList($posts, $counter->f(0)); } catch (Exception $e) { dcCore::app()->error->add($e->getMessage()); } # Actions combo box $combo_action = []; if (dcCore::app()->auth->check(dcCore::app()->auth->makePermissions([ dcAuth::PERMISSION_PUBLISH, dcAuth::PERMISSION_CONTENT_ADMIN, ]), dcCore::app()->blog->id)) { $combo_action[__('Status')] = [ __('Publish') => 'publish', __('Unpublish') => 'unpublish', __('Schedule') => 'schedule', __('Mark as pending') => 'pending', ]; } $combo_action[__('Mark')] = [ __('Mark as selected') => 'selected', __('Mark as unselected') => 'unselected', ]; $combo_action[__('Change')] = [__('Change category') => 'category']; if (dcCore::app()->auth->check(dcCore::app()->auth->makePermissions([ dcAuth::PERMISSION_ADMIN, ]), dcCore::app()->blog->id)) { $combo_action[__('Change')] = array_merge( $combo_action[__('Change')], [__('Change author') => 'author'] ); } if (dcCore::app()->auth->check(dcCore::app()->auth->makePermissions([ dcAuth::PERMISSION_DELETE, dcAuth::PERMISSION_CONTENT_ADMIN, ]), dcCore::app()->blog->id)) { $combo_action[__('Delete')] = [__('Delete') => 'delete']; } # --BEHAVIOR-- adminPostsActionsCombo dcCore::app()->callBehavior('adminPostsActionsCombo', [&$combo_action]); ?>