Commit 78c8ec50 authored by jan.koester's avatar jan.koester
Browse files

api change

parent 6ae5ed1a
Loading
Loading
Loading
Loading
+12 −12
Original line number Diff line number Diff line
@@ -91,7 +91,7 @@ namespace blogi {

            if (ncount<1) {
                *condat << " </div>";
                std::string out;
                libhtmlpp::HtmlString out;
                page->getElementbyID("main")->insertChild(condat->parse());;
                Args->theme->printSite(out,page,curreq->getRequestURL(),Args->auth->isLoggedIn(curreq,sid),meta.c_str());

@@ -99,7 +99,7 @@ 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.size());

                delete condat;
                return;
@@ -148,7 +148,7 @@ namespace blogi {

                *condat << "</ul></div>";
            }
            std::string out;
            libhtmlpp::HtmlString out;


            page->getElementbyID("main")->insertChild(condat->parse());
@@ -161,7 +161,7 @@ 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.size());
            out;
        };

@@ -203,7 +203,7 @@ namespace blogi {
            << "<span class=\"author\">verfasst von " << res[0][3] << " am "<< res[0][4]  <<" </span>"
            << "</div></div>";

            std::string out;
            libhtmlpp::HtmlString out;

            try{
                page.getElementbyID("main")->insertChild(condat->parse());
@@ -221,7 +221,7 @@ 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.size());
        };

        void addPostPage(netplus::con *curcon,libhttppp::HttpRequest *curreq,libhtmlpp::HtmlElement &page){
@@ -358,7 +358,7 @@ namespace blogi {
            << "</form>"
            << "</div>";

            std::string out;
            libhtmlpp::HtmlString out;

            page.getElementbyID("main")->insertChild(condat.parse());

@@ -368,7 +368,7 @@ 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.size());
        }

        void delPostPage(netplus::con* curcon, libhttppp::HttpRequest* curreq,libhtmlpp::HtmlElement &page) {
@@ -405,7 +405,7 @@ namespace blogi {

            condat << "<span>Beitrag geloescht</span>";

            std::string out;
            libhtmlpp::HtmlString out;

            try{
                page.getElementbyID("main")->insertChild(condat.parse());
@@ -420,7 +420,7 @@ 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.size());

        }

@@ -606,7 +606,7 @@ namespace blogi {
                << "</form>"
                << "</div>";
            };
            std::string out;
            libhtmlpp::HtmlString out;

            try{
                page.getElementbyID("main")->insertChild(condat.parse());
@@ -620,7 +620,7 @@ 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.size());
        }

        const char *getName(){
+3 −2
Original line number Diff line number Diff line
@@ -131,7 +131,8 @@ namespace blogi {

            condat << "</div>";

            std::string out,sid;
            libhtmlpp::HtmlString out;
            std::string sid;
            page->getElementbyID("main")->insertChild(condat.parse());

            Args->theme->printSite(out,page,req->getRequestURL(),
@@ -141,7 +142,7 @@ 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.size());
            return true;

        }
+3 −3
Original line number Diff line number Diff line
@@ -321,8 +321,8 @@ namespace blogi {
                    throw e;
                }

                libhtmlpp::HtmlString fileHtml;
                std::string out,sid;
                libhtmlpp::HtmlString fileHtml,out;
                std::string sid;

                try{
                    RenderUI(path,ndir,fileHtml);
@@ -344,7 +344,7 @@ namespace blogi {
                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.size());
            }catch(libhttppp::HTTPException &e){
                libhttppp::HttpResponse curres;
                curres.setVersion(HTTPVERSION(1.1));
+3 −2
Original line number Diff line number Diff line
@@ -114,7 +114,8 @@ namespace blogi {
            html.setAttribute("id","content");
            html.insertChild(&table);

            std::string out,sid,systable;
            libhtmlpp::HtmlString out,systable;
            std::string sid;
            libhtmlpp::print(&html,systable);

            libhtmlpp::HtmlString condat;
@@ -132,7 +133,7 @@ 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.size());
            return true;

        }
+2 −2
Original line number Diff line number Diff line
@@ -351,7 +351,7 @@ bool blogi::StaticPage::Controller(netplus::con *curcon,libhttppp::HttpRequest *
            throw excep;
        }

        std::string out;
        libhtmlpp::HtmlString out;
        condat << "<div id=\"content\" class=\"staticpage\" >"
               << res[0][1]
               << "</div>";
@@ -363,7 +363,7 @@ bool blogi::StaticPage::Controller(netplus::con *curcon,libhttppp::HttpRequest *
        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.size());
        return true;
    }
    return false;
Loading