Commit 3ef965be authored by jan.koester's avatar jan.koester
Browse files

test

parent 896aefb4
Loading
Loading
Loading
Loading
+14 −4
Changes for src/blogi.cpp: 14 added lines, 4 removed lines.
Original line number Diff line number Diff line
@@ -1773,11 +1773,21 @@ RETRY_REQUEST:
                libhtmlpp::HtmlString output;
                std::string _lang = blogi::getLang(*PlgArgs->database[tid]);
                libhtmlpp::HtmlString err;
                err << "<!DOCTYPE html><html><body style=\"color:rgb(238, 238, 238); background:rgb(35, 38, 39);\"><span>"
                << blogi::tr(_lang,"Page or content not found")
                << "</span><br/><a style=\"text-decoration: none; color: rgb(58,212, 58);\" href=\""
                err << "<!DOCTYPE html><html><body style=\"color:rgb(238, 238, 238); background:rgb(35, 38, 39);\">"
                << "<span>" << blogi::tr(_lang,"Page or content not found") << "</span><br/>"
                << "<a style=\"text-decoration: none; color: rgb(58,212, 58);\" href=\""
                <<  PlgArgs->config->getstartpage()
                << "\" >" << blogi::tr(_lang,"Back to home") << "</a></body></html>";
                << "\" >" << blogi::tr(_lang,"Back to home") << "</a>"
                << " | <a style=\"text-decoration: none; color: rgb(58,212, 58);\" href=\""
                << PlgArgs->config->buildurl("login")
                << "\" >" << blogi::tr(_lang,"Login") << "</a>"
                << " | <a style=\"text-decoration: none; color: rgb(58,212, 58);\" href=\""
                << PlgArgs->config->buildurl("editor")
                << "\" >" << blogi::tr(_lang,"Editor") << "</a>"
                << " | <a style=\"text-decoration: none; color: rgb(58,212, 58);\" href=\""
                << PlgArgs->config->buildurl("settings")
                << "\" >" << blogi::tr(_lang,"Settings") << "</a>"
                << "</body></html>";
                libhtmlpp::print(err.parse(),output);
                libhttppp::HttpResponse resp;
                resp.setState(HTTP404);
+3 −2
Changes for src/conf.cpp: 3 added lines, 2 removed lines.
Original line number Diff line number Diff line
@@ -105,9 +105,10 @@ blogi::Config::~Config(){
}

const std::string blogi::Config::buildurl(const std::string &url) const{
    if(getprefix().empty())
        return "";
    std::stringstream str;
    if(getprefix().empty())
        str << '/' << url;
    else
        str << getprefix() << '/' << url;
    return str.str();
}