Exemple #1
0
void Articles::remove(const std::string slug) {

    CHECK_PERMISSION_OR_GO_TO_LOGIN();

    const bool success = articlesModel->remove(
        get_interface_lang(),
        slug
    );
    
    if (success) {
        set_message(_("The article has been removed"));
    } else {
        set_message(_("A problem occured while trying to remove"));
    }
    go_to_main_page();
}
Exemple #2
0
void Articles::remove(const std::string slug) {

    LOGIN_REQUIRED();

    const bool success = articlesModel->remove(
        get_interface_lang(),
        slug
    );
    
    if (success) {
        add_success(_("The article has been removed"));
    } else {
        add_error(_("A problem occured while trying to remove"));
    }
    go_to_main_page();
}