Loading plugins/content/content.cpp +27 −18 Original line number Diff line number Diff line Loading @@ -90,15 +90,16 @@ namespace blogi { if (ncount<1) { condat << " </div>"; std::string out; std::string *out=new std::string; page.getElementbyID("main")->insertChild(condat.parse());; Args->theme->printSite(out,page,curreq->getRequestURL(),Args->auth->isLoggedIn(curreq,sid),meta.c_str()); Args->theme->printSite(out,&page,curreq->getRequestURL(),Args->auth->isLoggedIn(curreq,sid),meta.c_str()); libhttppp::HttpResponse resp; resp.setVersion(HTTPVERSION(1.1)); resp.setState(HTTP200); resp.setContentType("text/html"); resp.send(curcon,out.c_str(),out.length()); resp.send(curcon,out->c_str(),out->length()); delete out; return; } Loading Loading @@ -145,17 +146,18 @@ namespace blogi { condat << "</ul></div>"; } std::string out; std::string *out=new std::string; page.getElementbyID("main")->insertChild(condat.parse());; Args->theme->printSite(out,page,curreq->getRequestURL(),Args->auth->isLoggedIn(curreq,sid),meta.c_str()); Args->theme->printSite(out,&page,curreq->getRequestURL(),Args->auth->isLoggedIn(curreq,sid),meta.c_str()); libhttppp::HttpResponse resp; resp.setVersion(HTTPVERSION(1.1)); resp.setState(HTTP200); resp.setContentType("text/html"); resp.send(curcon,out.c_str(),out.length()); resp.send(curcon,out->c_str(),out->length()); delete out; }; void contentPage(netplus::con* curcon, libhttppp::HttpRequest* curreq,libhtmlpp::HtmlElement &page) { Loading Loading @@ -195,22 +197,24 @@ namespace blogi { << "<span class=\"author\">verfasst von " << res[0][3] << " am "<< res[0][4] <<" </span>" << "</div></div>"; std::string out; std::string *out=new std::string; try{ page.getElementbyID("main")->insertChild(condat.parse()); }catch(libhtmlpp::HTMLException &e){ delete out; excep[libhttppp::HTTPException::Error] << e.what(); throw excep; } Args->theme->printSite(out,page,curreq->getRequestURL(),Args->auth->isLoggedIn(curreq,sid)); Args->theme->printSite(out,&page,curreq->getRequestURL(),Args->auth->isLoggedIn(curreq,sid)); libhttppp::HttpResponse resp; resp.setVersion(HTTPVERSION(1.1)); resp.setState(HTTP200); resp.setContentType("text/html"); resp.send(curcon,out.c_str(),out.length()); resp.send(curcon,out->c_str(),out->length()); delete out; }; void addPostPage(netplus::con *curcon,libhttppp::HttpRequest *curreq,libhtmlpp::HtmlElement &page){ Loading Loading @@ -347,17 +351,18 @@ namespace blogi { << "</form>" << "</div>"; std::string out; std::string *out = new std::string; page.getElementbyID("main")->insertChild(condat.parse()); Args->theme->printSite(out,page,curreq->getRequestURL(),Args->auth->isLoggedIn(curreq,sid)); Args->theme->printSite(out,&page,curreq->getRequestURL(),Args->auth->isLoggedIn(curreq,sid)); libhttppp::HttpResponse resp; resp.setVersion(HTTPVERSION(1.1)); resp.setState(HTTP200); resp.setContentType("text/html"); resp.send(curcon,out.c_str(),out.length()); resp.send(curcon,out->c_str(),out->length()); delete out; } void delPostPage(netplus::con* curcon, libhttppp::HttpRequest* curreq,libhtmlpp::HtmlElement &page) { Loading Loading @@ -394,22 +399,24 @@ namespace blogi { condat << "<span>Beitrag geloescht</span>"; std::string out; std::string *out=new std::string; try{ page.getElementbyID("main")->insertChild(condat.parse()); }catch(libhtmlpp::HTMLException &e){ delete out; excep[libhttppp::HTTPException::Error] << e.what(); throw excep; } Args->theme->printSite(out,page,curreq->getRequestURL(),Args->auth->isLoggedIn(curreq,sid)); Args->theme->printSite(out,&page,curreq->getRequestURL(),Args->auth->isLoggedIn(curreq,sid)); libhttppp::HttpResponse resp; resp.setVersion(HTTPVERSION(1.1)); resp.setState(HTTP200); resp.setContentType("text/html"); resp.send(curcon,out.c_str(),out.length()); resp.send(curcon,out->c_str(),out->length()); delete out; } Loading Loading @@ -595,21 +602,23 @@ namespace blogi { << "</form>" << "</div>"; }; std::string out; std::string *out=new std::string; try{ page.getElementbyID("main")->insertChild(condat.parse()); }catch(libhtmlpp::HTMLException &e){ delete out; excep[libhttppp::HTTPException::Error] << e.what(); throw excep; } Args->theme->printSite(out,page,curreq->getRequestURL(),Args->auth->isLoggedIn(curreq,sid)); Args->theme->printSite(out,&page,curreq->getRequestURL(),Args->auth->isLoggedIn(curreq,sid)); libhttppp::HttpResponse resp; resp.setVersion(HTTPVERSION(1.1)); resp.setState(HTTP200); resp.setContentType("text/html"); resp.send(curcon,out.c_str(),out.length()); resp.send(curcon,out->c_str(),out->length()); delete out; } const char *getName(){ Loading plugins/gameinfo/gameinfo.cpp +4 −3 Original line number Diff line number Diff line Loading @@ -131,17 +131,18 @@ namespace blogi { condat << "</div>"; std::string out,sid; std::string *out=new std::string,sid; page.getElementbyID("main")->insertChild(condat.parse()); Args->theme->printSite(out,page,req->getRequestURL(), Args->theme->printSite(out,&page,req->getRequestURL(), Args->auth->isLoggedIn(req,sid)); libhttppp::HttpResponse resp; resp.setVersion(HTTPVERSION(1.1)); resp.setState(HTTP200); resp.setContentType("text/html"); resp.send(curcon,out.c_str(),out.length()); resp.send(curcon,out->c_str(),out->length()); delete out; return true; } Loading plugins/media/media.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -113,7 +113,7 @@ namespace blogi { if(strcmp(curdat->getKey(),"albumid")==0) id=atoi(curdat->getValue()); if(strcmp(curdat->getKey(),"albumname")==0) libhtmlpp::HtmlEncode(curdat->getValue(),name); libhtmlpp::HtmlEncode(curdat->getValue(),&name); } if(id<0){ Loading plugins/nginxfiler/filer.cpp +4 −3 Original line number Diff line number Diff line Loading @@ -322,7 +322,7 @@ namespace blogi { } libhtmlpp::HtmlString fileHtml; std::string out,sid; std::string *out=new std::string,sid; try{ RenderUI(path,ndir,fileHtml); Loading @@ -338,13 +338,14 @@ namespace blogi { throw ee; } Args->theme->printSite(out,page,req->getRequestURL(),Args->auth->isLoggedIn(req,sid)); Args->theme->printSite(out,&page,req->getRequestURL(),Args->auth->isLoggedIn(req,sid)); libhttppp::HttpResponse curres; curres.setVersion(HTTPVERSION(1.1)); curres.setContentType("text/html"); curres.setState(HTTP200); curres.send(curcon, out.c_str(),out.length()); curres.send(curcon, out->c_str(),out->length()); delete out; }catch(libhttppp::HTTPException &e){ libhttppp::HttpResponse curres; curres.setVersion(HTTPVERSION(1.1)); Loading plugins/nodeinfo/nodeinfo.cpp +10 −7 Original line number Diff line number Diff line Loading @@ -114,15 +114,17 @@ namespace blogi { html.setAttribute("id","content"); html.insertChild(&table); std::string out,sid,systable; libhtmlpp::print(&html,nullptr,systable); std::string *out=new std::string,sid,*systable=new std::string; libhtmlpp::print(&html,systable); libhtmlpp::HtmlString condat; condat << systable; libhtmlpp::HtmlString *condat=new libhtmlpp::HtmlString(); *condat << *systable; page.getElementbyID("main")->insertChild(condat.parse()); delete systable; Args->theme->printSite(out,page,req->getRequestURL(), page.getElementbyID("main")->insertChild(condat->parse()); Args->theme->printSite(out,&page,req->getRequestURL(), Args->auth->isLoggedIn(req,sid)); #endif Loading @@ -131,7 +133,8 @@ namespace blogi { resp.setVersion(HTTPVERSION(1.1)); resp.setState(HTTP200); resp.setContentType("text/html"); resp.send(curcon,out.c_str(),out.length()); resp.send(curcon,out->c_str(),out->length()); delete out; return true; } Loading Loading
plugins/content/content.cpp +27 −18 Original line number Diff line number Diff line Loading @@ -90,15 +90,16 @@ namespace blogi { if (ncount<1) { condat << " </div>"; std::string out; std::string *out=new std::string; page.getElementbyID("main")->insertChild(condat.parse());; Args->theme->printSite(out,page,curreq->getRequestURL(),Args->auth->isLoggedIn(curreq,sid),meta.c_str()); Args->theme->printSite(out,&page,curreq->getRequestURL(),Args->auth->isLoggedIn(curreq,sid),meta.c_str()); libhttppp::HttpResponse resp; resp.setVersion(HTTPVERSION(1.1)); resp.setState(HTTP200); resp.setContentType("text/html"); resp.send(curcon,out.c_str(),out.length()); resp.send(curcon,out->c_str(),out->length()); delete out; return; } Loading Loading @@ -145,17 +146,18 @@ namespace blogi { condat << "</ul></div>"; } std::string out; std::string *out=new std::string; page.getElementbyID("main")->insertChild(condat.parse());; Args->theme->printSite(out,page,curreq->getRequestURL(),Args->auth->isLoggedIn(curreq,sid),meta.c_str()); Args->theme->printSite(out,&page,curreq->getRequestURL(),Args->auth->isLoggedIn(curreq,sid),meta.c_str()); libhttppp::HttpResponse resp; resp.setVersion(HTTPVERSION(1.1)); resp.setState(HTTP200); resp.setContentType("text/html"); resp.send(curcon,out.c_str(),out.length()); resp.send(curcon,out->c_str(),out->length()); delete out; }; void contentPage(netplus::con* curcon, libhttppp::HttpRequest* curreq,libhtmlpp::HtmlElement &page) { Loading Loading @@ -195,22 +197,24 @@ namespace blogi { << "<span class=\"author\">verfasst von " << res[0][3] << " am "<< res[0][4] <<" </span>" << "</div></div>"; std::string out; std::string *out=new std::string; try{ page.getElementbyID("main")->insertChild(condat.parse()); }catch(libhtmlpp::HTMLException &e){ delete out; excep[libhttppp::HTTPException::Error] << e.what(); throw excep; } Args->theme->printSite(out,page,curreq->getRequestURL(),Args->auth->isLoggedIn(curreq,sid)); Args->theme->printSite(out,&page,curreq->getRequestURL(),Args->auth->isLoggedIn(curreq,sid)); libhttppp::HttpResponse resp; resp.setVersion(HTTPVERSION(1.1)); resp.setState(HTTP200); resp.setContentType("text/html"); resp.send(curcon,out.c_str(),out.length()); resp.send(curcon,out->c_str(),out->length()); delete out; }; void addPostPage(netplus::con *curcon,libhttppp::HttpRequest *curreq,libhtmlpp::HtmlElement &page){ Loading Loading @@ -347,17 +351,18 @@ namespace blogi { << "</form>" << "</div>"; std::string out; std::string *out = new std::string; page.getElementbyID("main")->insertChild(condat.parse()); Args->theme->printSite(out,page,curreq->getRequestURL(),Args->auth->isLoggedIn(curreq,sid)); Args->theme->printSite(out,&page,curreq->getRequestURL(),Args->auth->isLoggedIn(curreq,sid)); libhttppp::HttpResponse resp; resp.setVersion(HTTPVERSION(1.1)); resp.setState(HTTP200); resp.setContentType("text/html"); resp.send(curcon,out.c_str(),out.length()); resp.send(curcon,out->c_str(),out->length()); delete out; } void delPostPage(netplus::con* curcon, libhttppp::HttpRequest* curreq,libhtmlpp::HtmlElement &page) { Loading Loading @@ -394,22 +399,24 @@ namespace blogi { condat << "<span>Beitrag geloescht</span>"; std::string out; std::string *out=new std::string; try{ page.getElementbyID("main")->insertChild(condat.parse()); }catch(libhtmlpp::HTMLException &e){ delete out; excep[libhttppp::HTTPException::Error] << e.what(); throw excep; } Args->theme->printSite(out,page,curreq->getRequestURL(),Args->auth->isLoggedIn(curreq,sid)); Args->theme->printSite(out,&page,curreq->getRequestURL(),Args->auth->isLoggedIn(curreq,sid)); libhttppp::HttpResponse resp; resp.setVersion(HTTPVERSION(1.1)); resp.setState(HTTP200); resp.setContentType("text/html"); resp.send(curcon,out.c_str(),out.length()); resp.send(curcon,out->c_str(),out->length()); delete out; } Loading Loading @@ -595,21 +602,23 @@ namespace blogi { << "</form>" << "</div>"; }; std::string out; std::string *out=new std::string; try{ page.getElementbyID("main")->insertChild(condat.parse()); }catch(libhtmlpp::HTMLException &e){ delete out; excep[libhttppp::HTTPException::Error] << e.what(); throw excep; } Args->theme->printSite(out,page,curreq->getRequestURL(),Args->auth->isLoggedIn(curreq,sid)); Args->theme->printSite(out,&page,curreq->getRequestURL(),Args->auth->isLoggedIn(curreq,sid)); libhttppp::HttpResponse resp; resp.setVersion(HTTPVERSION(1.1)); resp.setState(HTTP200); resp.setContentType("text/html"); resp.send(curcon,out.c_str(),out.length()); resp.send(curcon,out->c_str(),out->length()); delete out; } const char *getName(){ Loading
plugins/gameinfo/gameinfo.cpp +4 −3 Original line number Diff line number Diff line Loading @@ -131,17 +131,18 @@ namespace blogi { condat << "</div>"; std::string out,sid; std::string *out=new std::string,sid; page.getElementbyID("main")->insertChild(condat.parse()); Args->theme->printSite(out,page,req->getRequestURL(), Args->theme->printSite(out,&page,req->getRequestURL(), Args->auth->isLoggedIn(req,sid)); libhttppp::HttpResponse resp; resp.setVersion(HTTPVERSION(1.1)); resp.setState(HTTP200); resp.setContentType("text/html"); resp.send(curcon,out.c_str(),out.length()); resp.send(curcon,out->c_str(),out->length()); delete out; return true; } Loading
plugins/media/media.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -113,7 +113,7 @@ namespace blogi { if(strcmp(curdat->getKey(),"albumid")==0) id=atoi(curdat->getValue()); if(strcmp(curdat->getKey(),"albumname")==0) libhtmlpp::HtmlEncode(curdat->getValue(),name); libhtmlpp::HtmlEncode(curdat->getValue(),&name); } if(id<0){ Loading
plugins/nginxfiler/filer.cpp +4 −3 Original line number Diff line number Diff line Loading @@ -322,7 +322,7 @@ namespace blogi { } libhtmlpp::HtmlString fileHtml; std::string out,sid; std::string *out=new std::string,sid; try{ RenderUI(path,ndir,fileHtml); Loading @@ -338,13 +338,14 @@ namespace blogi { throw ee; } Args->theme->printSite(out,page,req->getRequestURL(),Args->auth->isLoggedIn(req,sid)); Args->theme->printSite(out,&page,req->getRequestURL(),Args->auth->isLoggedIn(req,sid)); libhttppp::HttpResponse curres; curres.setVersion(HTTPVERSION(1.1)); curres.setContentType("text/html"); curres.setState(HTTP200); curres.send(curcon, out.c_str(),out.length()); curres.send(curcon, out->c_str(),out->length()); delete out; }catch(libhttppp::HTTPException &e){ libhttppp::HttpResponse curres; curres.setVersion(HTTPVERSION(1.1)); Loading
plugins/nodeinfo/nodeinfo.cpp +10 −7 Original line number Diff line number Diff line Loading @@ -114,15 +114,17 @@ namespace blogi { html.setAttribute("id","content"); html.insertChild(&table); std::string out,sid,systable; libhtmlpp::print(&html,nullptr,systable); std::string *out=new std::string,sid,*systable=new std::string; libhtmlpp::print(&html,systable); libhtmlpp::HtmlString condat; condat << systable; libhtmlpp::HtmlString *condat=new libhtmlpp::HtmlString(); *condat << *systable; page.getElementbyID("main")->insertChild(condat.parse()); delete systable; Args->theme->printSite(out,page,req->getRequestURL(), page.getElementbyID("main")->insertChild(condat->parse()); Args->theme->printSite(out,&page,req->getRequestURL(), Args->auth->isLoggedIn(req,sid)); #endif Loading @@ -131,7 +133,8 @@ namespace blogi { resp.setVersion(HTTPVERSION(1.1)); resp.setState(HTTP200); resp.setContentType("text/html"); resp.send(curcon,out.c_str(),out.length()); resp.send(curcon,out->c_str(),out->length()); delete out; return true; } Loading