Commit 9e3fee1d authored by jan.koester's avatar jan.koester
Browse files

all values now in sql

parent 3dccd6de
Loading
Loading
Loading
Loading
+1 −1
Changes for plugins/contact/contact.cpp: 1 added line, 1 removed line.
Original line number Diff line number Diff line
@@ -50,7 +50,7 @@ namespace blogi {

        void initPlugin(){

            getConfig(*Args->database[0],"CONTACTRECIVER",_Receiver);
            getConfig(*Args->database[0],"CONTACTMAIL",_Receiver);

            std::cout << "contact plugin loaded" <<std::endl;
        }
+2 −6
Changes for plugins/gtm/gtm.cpp: 2 added lines, 6 removed lines.
Original line number Diff line number Diff line
@@ -66,12 +66,8 @@ namespace blogi {

        void initPlugin(){
            try{
                const char *gtm=Args->config->getValue(Args->config->getKey("/BLOGI/GOOGLETGM/ID"),0);
                const char *g4a=Args->config->getValue(Args->config->getKey("/BLOGI/GOOGLE4A/ID"),0);
                if(gtm)
                    GTM=gtm;
                if(g4a)
                    G4A=g4a;
                getConfig(*Args->database[0],"GOOGLEGTM",GTM);
                getConfig(*Args->database[0],"GOOGLE4A",G4A);
            }catch(...){}
            CookieBanner cookie(Args->database[0]);
            uuid_t id;
+5 −5
Changes for plugins/nginxfiler/filer.cpp: 5 added lines, 5 removed lines.
Original line number Diff line number Diff line
@@ -73,11 +73,11 @@ namespace blogi {

        void initPlugin(){
            try{
                _NHost=Args->config->getValue(Args->config->getKey("/BLOGI/NGINXFILER/HOST"),0);
                _NPort=Args->config->getIntValue(Args->config->getKey("/BLOGI/NGINXFILER/PORT"),0);
                _NPrefix=Args->config->getValue(Args->config->getKey("/BLOGI/NGINXFILER/PREFIX"),0);
                _NSSL=Args->config->getIntValue(Args->config->getKey("/BLOGI/NGINXFILER/SSL"),0);
                _Timeout=Args->config->getIntValue(Args->config->getKey("/BLOGI/NGINXFILER/TIMEOUT"),0);
                getConfig(*Args->database[0],"NGINXFILERHOST",_NHost);
                getConfig(*Args->database[0],"NGINXFILERPORT",_NPort);
                getConfig(*Args->database[0],"NGINXFILERPREFIX",_NPrefix);
                getConfig(*Args->database[0],"NGINXFILERSSL",_NSSL);
                getConfig(*Args->database[0],"NGINXFILERTIMEOUT",_Timeout);
            }catch(confplus::ConfException &e){
                libhttppp::HTTPException err;
                err[libhttppp::HTTPException::Error] << "NginxFiler init failed: " << e.what();
+10
Changes for src/conf.h: 10 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -110,4 +110,14 @@ namespace blogi {
        getConfig(db,key,buf);
        value=atoi(buf.c_str());
    }

    inline void getConfig(dbpp::Database &db,const std::string &key,bool &value){
        std::string buf;
        getConfig(db,key,buf);
        if(buf=="true")
            value=true;
        else
            value=false;
    }

};