Commit 9f722af6 authored by jan.koester's avatar jan.koester
Browse files

test

parent 3226b75e
Loading
Loading
Loading
Loading
+10 −4
Changes for plugins/content/content.cpp: 10 added lines, 4 removed lines.
Original line number Diff line number Diff line
@@ -954,8 +954,11 @@ namespace blogi {

                if(sub.find("delete") == 0){
                    int cid = -1;
                    size_t idpos = sub.find("id=");
                    if(idpos != std::string::npos) cid = atoi(sub.c_str() + idpos + 3);
                    libhttppp::HttpForm delform;
                    delform.parse(req);
                    for(const auto &cur : delform.urlData()){
                        if(cur.key == "id") { cid = atoi(cur.value.c_str()); break; }
                    }

                    if(cid > 0){
                        // Check permission
@@ -996,8 +999,11 @@ namespace blogi {
                // Sub-route: edit
                if(sub.find("edit") == 0){
                    int cid = -1;
                    size_t idpos = sub.find("id=");
                    if(idpos != std::string::npos) cid = atoi(sub.c_str() + idpos + 3);
                    libhttppp::HttpForm editform;
                    editform.parse(req);
                    for(const auto &cur : editform.urlData()){
                        if(cur.key == "id") { cid = atoi(cur.value.c_str()); break; }
                    }

                    if(cid > 0){
                        // Check permission