Loading plugins/content/content.cpp +10 −4 Changes for plugins/content/content.cpp: 10 added lines, 4 removed lines. Original line number Diff line number Diff line Loading @@ -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 Loading Loading @@ -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 Loading Loading
plugins/content/content.cpp +10 −4 Changes for plugins/content/content.cpp: 10 added lines, 4 removed lines. Original line number Diff line number Diff line Loading @@ -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 Loading Loading @@ -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 Loading