Loading plugins/content/content.cpp +5 −5 Changes for plugins/content/content.cpp: 5 added lines, 5 removed lines. Original line number Diff line number Diff line Loading @@ -58,7 +58,7 @@ namespace blogi { ~Content(){ }; void contentIdxPage(const int tid,libhttppp::HttpRequest &curreq,libhtmlpp::HtmlElement *page,const char *tag,int start,int end,const std::string &sessionid){ void contentIdxPage(const int tid,libhttppp::HttpRequest &curreq,libhtmlpp::HtmlElement *page,const std::string &tag,int start,int end,const std::string &sessionid){ libhttppp::HTTPException excep; libhtmlpp::HtmlString condat; Loading @@ -70,8 +70,8 @@ namespace blogi { int ncount=0; if (tag) { sql << "SELECT id FROM tags where name='" << dbpp::SQL::escaped(sbuf,tag) << "' LIMIT 1"; if (!tag.empty()) { sql << "SELECT id FROM tags where name='" << dbpp::SQL::escaped(sbuf,tag.c_str()) << "' LIMIT 1"; if(Args->database[tid]->exec(sql,res)<1){ excep[libhttppp::HTTPException::Critical] << "no tag data found for this name!"; throw excep; Loading Loading @@ -741,9 +741,9 @@ namespace blogi { std::copy(curl.begin()+len,curl.end(),std::back_inserter(dtag)); dtag.push_back('\0'); libhttppp::HttpForm::urlDecode(dtag,tag); contentIdxPage(tid,req,page,tag.data(),startpos,SITELIMIT,sessionid); contentIdxPage(tid,req,page,tag,startpos,SITELIMIT,sessionid); }else{ contentIdxPage(tid,req,page,nullptr,startpos,SITELIMIT,sessionid); contentIdxPage(tid,req,page,"",startpos,SITELIMIT,sessionid); } } return true; Loading Loading
plugins/content/content.cpp +5 −5 Changes for plugins/content/content.cpp: 5 added lines, 5 removed lines. Original line number Diff line number Diff line Loading @@ -58,7 +58,7 @@ namespace blogi { ~Content(){ }; void contentIdxPage(const int tid,libhttppp::HttpRequest &curreq,libhtmlpp::HtmlElement *page,const char *tag,int start,int end,const std::string &sessionid){ void contentIdxPage(const int tid,libhttppp::HttpRequest &curreq,libhtmlpp::HtmlElement *page,const std::string &tag,int start,int end,const std::string &sessionid){ libhttppp::HTTPException excep; libhtmlpp::HtmlString condat; Loading @@ -70,8 +70,8 @@ namespace blogi { int ncount=0; if (tag) { sql << "SELECT id FROM tags where name='" << dbpp::SQL::escaped(sbuf,tag) << "' LIMIT 1"; if (!tag.empty()) { sql << "SELECT id FROM tags where name='" << dbpp::SQL::escaped(sbuf,tag.c_str()) << "' LIMIT 1"; if(Args->database[tid]->exec(sql,res)<1){ excep[libhttppp::HTTPException::Critical] << "no tag data found for this name!"; throw excep; Loading Loading @@ -741,9 +741,9 @@ namespace blogi { std::copy(curl.begin()+len,curl.end(),std::back_inserter(dtag)); dtag.push_back('\0'); libhttppp::HttpForm::urlDecode(dtag,tag); contentIdxPage(tid,req,page,tag.data(),startpos,SITELIMIT,sessionid); contentIdxPage(tid,req,page,tag,startpos,SITELIMIT,sessionid); }else{ contentIdxPage(tid,req,page,nullptr,startpos,SITELIMIT,sessionid); contentIdxPage(tid,req,page,"",startpos,SITELIMIT,sessionid); } } return true; Loading