Commit b257904f authored by jan.koester's avatar jan.koester
Browse files

etst

parent e03c17d6
Loading
Loading
Loading
Loading
+8 −2
Changes for plugins/content/content.cpp: 8 added lines, 2 removed lines.
Original line number Diff line number Diff line
@@ -594,8 +594,11 @@ namespace blogi {
            }

            sql ="DELETE FROM tags_content WHERE content_id='";
            sql << cid << "';" <<" DELETE FROM content WHERE id='"; sql << cid << "';";
            sql << cid << "';";
            try { Args->database[tid]->exec(sql,res); } catch(...) {}

            sql.clear();
            sql << "DELETE FROM content WHERE id='" << cid << "';";
            if(Args->database[tid]->exec(sql,res)<0){
                libhttppp::HTTPException exp;
                exp[libhttppp::HTTPException::Error] << "Can'T content sql data!";
@@ -968,7 +971,10 @@ namespace blogi {
                        json_object_object_add(jroot, "title", json_object_new_string(tr(_lang,"Content").c_str()));
                        if(allowed){
                            dbpp::SQL dsql; dbpp::DBResult dres;
                            dsql << "DELETE FROM tags_content WHERE content_id='" << cid << "'; DELETE FROM content WHERE id='" << cid << "';";
                            dsql << "DELETE FROM tags_content WHERE content_id='" << cid << "';";
                            try { Args->database[tid]->exec(dsql,dres); } catch(...) {}
                            dsql.clear();
                            dsql << "DELETE FROM content WHERE id='" << cid << "';";
                            Args->database[tid]->exec(dsql,dres);
                            cleartags(tid);
                            json_object_object_add(jroot, "message", json_object_new_string(tr(_lang,"Post deleted").c_str()));