$info = rex_i18n::msg('content_articlemoved'); ob_end_clean(); rex_response::sendRedirect($context->getUrl(['page' => 'content/edit', 'info' => $info], false)); } else { $warning = rex_i18n::msg('content_errormovearticle'); } } else { $warning = rex_i18n::msg('no_rights_to_this_function'); } } // ------------------------------------------ END: MOVE ARTICLE // ------------------------------------------ START: COPY ARTICLE if (rex_post('copyarticle', 'boolean')) { $category_copy_id_new = rex_post('category_copy_id_new', 'int'); if (rex::getUser()->hasPerm('copyArticle[]') && rex::getUser()->getComplexPerm('structure')->hasCategoryPerm($category_copy_id_new)) { if (($new_id = rex_article_service::copyArticle($article_id, $category_copy_id_new)) !== false) { $info = rex_i18n::msg('content_articlecopied'); ob_end_clean(); rex_response::sendRedirect($context->getUrl(['page' => 'content/edit', 'article_id' => $new_id, 'info' => $info], false)); } else { $warning = rex_i18n::msg('content_errorcopyarticle'); } } else { $warning = rex_i18n::msg('no_rights_to_this_function'); } } // ------------------------------------------ END: COPY ARTICLE // ------------------------------------------ START: MOVE CATEGORY if (rex_post('movecategory', 'boolean')) { $category_id_new = rex_post('category_id_new', 'int'); if (rex::getUser()->hasPerm('moveCategory[]') && rex::getUser()->getComplexPerm('structure')->hasCategoryPerm($article->getValue('parent_id')) && rex::getUser()->getComplexPerm('structure')->hasCategoryPerm($category_id_new)) {