Loading plugins/content/content.cpp +14 −21 Original line number Diff line number Diff line Loading @@ -91,7 +91,7 @@ namespace blogi { if (ncount<1) { *condat << " </div>"; std::string *out=new std::string; std::string out; page->getElementbyID("main")->insertChild(condat->parse());; Args->theme->printSite(out,page,curreq->getRequestURL(),Args->auth->isLoggedIn(curreq,sid),meta.c_str()); Loading @@ -99,8 +99,8 @@ namespace blogi { resp.setVersion(HTTPVERSION(1.1)); resp.setState(HTTP200); resp.setContentType("text/html"); resp.send(curcon,out->c_str(),out->length()); delete out; resp.send(curcon,out.c_str(),out.length()); delete condat; return; } Loading Loading @@ -148,7 +148,7 @@ namespace blogi { *condat << "</ul></div>"; } std::string *out=new std::string; std::string out; page->getElementbyID("main")->insertChild(condat->parse()); Loading @@ -161,8 +161,8 @@ namespace blogi { resp.setVersion(HTTPVERSION(1.1)); resp.setState(HTTP200); resp.setContentType("text/html"); resp.send(curcon,out->c_str(),out->length()); delete out; resp.send(curcon,out.c_str(),out.length()); out; }; void contentPage(netplus::con* curcon, libhttppp::HttpRequest* curreq,libhtmlpp::HtmlElement &page) { Loading Loading @@ -203,12 +203,11 @@ namespace blogi { << "<span class=\"author\">verfasst von " << res[0][3] << " am "<< res[0][4] <<" </span>" << "</div></div>"; std::string *out=new std::string; std::string out; try{ page.getElementbyID("main")->insertChild(condat->parse()); }catch(libhtmlpp::HTMLException &e){ delete out; delete condat; excep[libhttppp::HTTPException::Error] << e.what(); throw excep; Loading @@ -222,8 +221,7 @@ namespace blogi { resp.setVersion(HTTPVERSION(1.1)); resp.setState(HTTP200); resp.setContentType("text/html"); resp.send(curcon,out->c_str(),out->length()); delete out; resp.send(curcon,out.c_str(),out.length()); }; void addPostPage(netplus::con *curcon,libhttppp::HttpRequest *curreq,libhtmlpp::HtmlElement &page){ Loading Loading @@ -360,7 +358,7 @@ namespace blogi { << "</form>" << "</div>"; std::string *out = new std::string; std::string out; page.getElementbyID("main")->insertChild(condat.parse()); Loading @@ -370,8 +368,7 @@ namespace blogi { resp.setVersion(HTTPVERSION(1.1)); resp.setState(HTTP200); resp.setContentType("text/html"); resp.send(curcon,out->c_str(),out->length()); delete out; resp.send(curcon,out.c_str(),out.length()); } void delPostPage(netplus::con* curcon, libhttppp::HttpRequest* curreq,libhtmlpp::HtmlElement &page) { Loading Loading @@ -408,12 +405,11 @@ namespace blogi { condat << "<span>Beitrag geloescht</span>"; std::string *out=new std::string; std::string out; try{ page.getElementbyID("main")->insertChild(condat.parse()); }catch(libhtmlpp::HTMLException &e){ delete out; excep[libhttppp::HTTPException::Error] << e.what(); throw excep; } Loading @@ -424,8 +420,7 @@ namespace blogi { resp.setVersion(HTTPVERSION(1.1)); resp.setState(HTTP200); resp.setContentType("text/html"); resp.send(curcon,out->c_str(),out->length()); delete out; resp.send(curcon,out.c_str(),out.length()); } Loading Loading @@ -611,12 +606,11 @@ namespace blogi { << "</form>" << "</div>"; }; std::string *out=new std::string; std::string out; try{ page.getElementbyID("main")->insertChild(condat.parse()); }catch(libhtmlpp::HTMLException &e){ delete out; excep[libhttppp::HTTPException::Error] << e.what(); throw excep; } Loading @@ -626,8 +620,7 @@ namespace blogi { resp.setVersion(HTTPVERSION(1.1)); resp.setState(HTTP200); resp.setContentType("text/html"); resp.send(curcon,out->c_str(),out->length()); delete out; resp.send(curcon,out.c_str(),out.length()); } const char *getName(){ Loading plugins/gameinfo/gameinfo.cpp +2 −3 Original line number Diff line number Diff line Loading @@ -131,7 +131,7 @@ namespace blogi { condat << "</div>"; std::string *out=new std::string,sid; std::string out,sid; page->getElementbyID("main")->insertChild(condat.parse()); Args->theme->printSite(out,page,req->getRequestURL(), Loading @@ -141,8 +141,7 @@ namespace blogi { resp.setVersion(HTTPVERSION(1.1)); resp.setState(HTTP200); resp.setContentType("text/html"); resp.send(curcon,out->c_str(),out->length()); delete out; resp.send(curcon,out.c_str(),out.length()); 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 +2 −3 Original line number Diff line number Diff line Loading @@ -322,7 +322,7 @@ namespace blogi { } libhtmlpp::HtmlString fileHtml; std::string *out=new std::string,sid; std::string out,sid; try{ RenderUI(path,ndir,fileHtml); Loading @@ -344,8 +344,7 @@ namespace blogi { curres.setVersion(HTTPVERSION(1.1)); curres.setContentType("text/html"); curres.setState(HTTP200); curres.send(curcon, out->c_str(),out->length()); delete out; curres.send(curcon, out.c_str(),out.length()); }catch(libhttppp::HTTPException &e){ libhttppp::HttpResponse curres; curres.setVersion(HTTPVERSION(1.1)); Loading plugins/nodeinfo/nodeinfo.cpp +5 −7 Original line number Diff line number Diff line Loading @@ -114,15 +114,14 @@ namespace blogi { html.setAttribute("id","content"); html.insertChild(&table); std::string *out=new std::string,sid,*systable=new std::string; std::string out,sid,systable; libhtmlpp::print(&html,systable); libhtmlpp::HtmlString *condat=new libhtmlpp::HtmlString(); *condat << *systable; libhtmlpp::HtmlString condat; condat << systable; delete systable; page->getElementbyID("main")->insertChild(condat->parse()); page->getElementbyID("main")->insertChild(condat.parse()); Args->theme->printSite(out,page,req->getRequestURL(), Args->auth->isLoggedIn(req,sid)); Loading @@ -133,8 +132,7 @@ namespace blogi { resp.setVersion(HTTPVERSION(1.1)); resp.setState(HTTP200); resp.setContentType("text/html"); resp.send(curcon,out->c_str(),out->length()); delete out; resp.send(curcon,out.c_str(),out.length()); return true; } Loading Loading
plugins/content/content.cpp +14 −21 Original line number Diff line number Diff line Loading @@ -91,7 +91,7 @@ namespace blogi { if (ncount<1) { *condat << " </div>"; std::string *out=new std::string; std::string out; page->getElementbyID("main")->insertChild(condat->parse());; Args->theme->printSite(out,page,curreq->getRequestURL(),Args->auth->isLoggedIn(curreq,sid),meta.c_str()); Loading @@ -99,8 +99,8 @@ namespace blogi { resp.setVersion(HTTPVERSION(1.1)); resp.setState(HTTP200); resp.setContentType("text/html"); resp.send(curcon,out->c_str(),out->length()); delete out; resp.send(curcon,out.c_str(),out.length()); delete condat; return; } Loading Loading @@ -148,7 +148,7 @@ namespace blogi { *condat << "</ul></div>"; } std::string *out=new std::string; std::string out; page->getElementbyID("main")->insertChild(condat->parse()); Loading @@ -161,8 +161,8 @@ namespace blogi { resp.setVersion(HTTPVERSION(1.1)); resp.setState(HTTP200); resp.setContentType("text/html"); resp.send(curcon,out->c_str(),out->length()); delete out; resp.send(curcon,out.c_str(),out.length()); out; }; void contentPage(netplus::con* curcon, libhttppp::HttpRequest* curreq,libhtmlpp::HtmlElement &page) { Loading Loading @@ -203,12 +203,11 @@ namespace blogi { << "<span class=\"author\">verfasst von " << res[0][3] << " am "<< res[0][4] <<" </span>" << "</div></div>"; std::string *out=new std::string; std::string out; try{ page.getElementbyID("main")->insertChild(condat->parse()); }catch(libhtmlpp::HTMLException &e){ delete out; delete condat; excep[libhttppp::HTTPException::Error] << e.what(); throw excep; Loading @@ -222,8 +221,7 @@ namespace blogi { resp.setVersion(HTTPVERSION(1.1)); resp.setState(HTTP200); resp.setContentType("text/html"); resp.send(curcon,out->c_str(),out->length()); delete out; resp.send(curcon,out.c_str(),out.length()); }; void addPostPage(netplus::con *curcon,libhttppp::HttpRequest *curreq,libhtmlpp::HtmlElement &page){ Loading Loading @@ -360,7 +358,7 @@ namespace blogi { << "</form>" << "</div>"; std::string *out = new std::string; std::string out; page.getElementbyID("main")->insertChild(condat.parse()); Loading @@ -370,8 +368,7 @@ namespace blogi { resp.setVersion(HTTPVERSION(1.1)); resp.setState(HTTP200); resp.setContentType("text/html"); resp.send(curcon,out->c_str(),out->length()); delete out; resp.send(curcon,out.c_str(),out.length()); } void delPostPage(netplus::con* curcon, libhttppp::HttpRequest* curreq,libhtmlpp::HtmlElement &page) { Loading Loading @@ -408,12 +405,11 @@ namespace blogi { condat << "<span>Beitrag geloescht</span>"; std::string *out=new std::string; std::string out; try{ page.getElementbyID("main")->insertChild(condat.parse()); }catch(libhtmlpp::HTMLException &e){ delete out; excep[libhttppp::HTTPException::Error] << e.what(); throw excep; } Loading @@ -424,8 +420,7 @@ namespace blogi { resp.setVersion(HTTPVERSION(1.1)); resp.setState(HTTP200); resp.setContentType("text/html"); resp.send(curcon,out->c_str(),out->length()); delete out; resp.send(curcon,out.c_str(),out.length()); } Loading Loading @@ -611,12 +606,11 @@ namespace blogi { << "</form>" << "</div>"; }; std::string *out=new std::string; std::string out; try{ page.getElementbyID("main")->insertChild(condat.parse()); }catch(libhtmlpp::HTMLException &e){ delete out; excep[libhttppp::HTTPException::Error] << e.what(); throw excep; } Loading @@ -626,8 +620,7 @@ namespace blogi { resp.setVersion(HTTPVERSION(1.1)); resp.setState(HTTP200); resp.setContentType("text/html"); resp.send(curcon,out->c_str(),out->length()); delete out; resp.send(curcon,out.c_str(),out.length()); } const char *getName(){ Loading
plugins/gameinfo/gameinfo.cpp +2 −3 Original line number Diff line number Diff line Loading @@ -131,7 +131,7 @@ namespace blogi { condat << "</div>"; std::string *out=new std::string,sid; std::string out,sid; page->getElementbyID("main")->insertChild(condat.parse()); Args->theme->printSite(out,page,req->getRequestURL(), Loading @@ -141,8 +141,7 @@ namespace blogi { resp.setVersion(HTTPVERSION(1.1)); resp.setState(HTTP200); resp.setContentType("text/html"); resp.send(curcon,out->c_str(),out->length()); delete out; resp.send(curcon,out.c_str(),out.length()); 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 +2 −3 Original line number Diff line number Diff line Loading @@ -322,7 +322,7 @@ namespace blogi { } libhtmlpp::HtmlString fileHtml; std::string *out=new std::string,sid; std::string out,sid; try{ RenderUI(path,ndir,fileHtml); Loading @@ -344,8 +344,7 @@ namespace blogi { curres.setVersion(HTTPVERSION(1.1)); curres.setContentType("text/html"); curres.setState(HTTP200); curres.send(curcon, out->c_str(),out->length()); delete out; curres.send(curcon, out.c_str(),out.length()); }catch(libhttppp::HTTPException &e){ libhttppp::HttpResponse curres; curres.setVersion(HTTPVERSION(1.1)); Loading
plugins/nodeinfo/nodeinfo.cpp +5 −7 Original line number Diff line number Diff line Loading @@ -114,15 +114,14 @@ namespace blogi { html.setAttribute("id","content"); html.insertChild(&table); std::string *out=new std::string,sid,*systable=new std::string; std::string out,sid,systable; libhtmlpp::print(&html,systable); libhtmlpp::HtmlString *condat=new libhtmlpp::HtmlString(); *condat << *systable; libhtmlpp::HtmlString condat; condat << systable; delete systable; page->getElementbyID("main")->insertChild(condat->parse()); page->getElementbyID("main")->insertChild(condat.parse()); Args->theme->printSite(out,page,req->getRequestURL(), Args->auth->isLoggedIn(req,sid)); Loading @@ -133,8 +132,7 @@ namespace blogi { resp.setVersion(HTTPVERSION(1.1)); resp.setState(HTTP200); resp.setContentType("text/html"); resp.send(curcon,out->c_str(),out->length()); delete out; resp.send(curcon,out.c_str(),out.length()); return true; } Loading