X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=src%2Fhttp%2Fpages%2Fhomepage.cpp;h=d74a30e4b33bafaf89af4aa2a893c4b4a90ce353;hb=a558b16c8034966d14e1d63db44dcb952d849618;hp=fc60f788d6dd54bee4060099019d2369e70f8935;hpb=07319f767b4c4f0e06e9957f217d5107b196617b;p=fms.git diff --git a/src/http/pages/homepage.cpp b/src/http/pages/homepage.cpp index fc60f78..d74a30e 100644 --- a/src/http/pages/homepage.cpp +++ b/src/http/pages/homepage.cpp @@ -36,22 +36,34 @@ const std::string HomePage::GeneratePage(const std::string &method, const std::m st.Step(); if(st.RowReturned()) { - std::string currentmajor=VERSION_MAJOR; - std::string currentminor=VERSION_MINOR; - std::string currentrelease=VERSION_RELEASE; - std::string major=""; - std::string minor=""; - std::string release=""; + int major=0; + int minor=0; + int release=0; + int currentmajor=0; + int currentminor=0; + int currentrelease=0; std::string freesite=""; - st.ResultText(0,major); - st.ResultText(1,minor); - st.ResultText(2,release); + std::string majorstr=""; + std::string minorstr=""; + std::string releasestr=""; + + StringFunctions::Convert(VERSION_MAJOR,currentmajor); + StringFunctions::Convert(VERSION_MINOR,currentminor); + StringFunctions::Convert(VERSION_RELEASE,currentrelease); + + st.ResultInt(0,major); + st.ResultInt(1,minor); + st.ResultInt(2,release); st.ResultText(3,freesite); + StringFunctions::Convert(major,majorstr); + StringFunctions::Convert(minor,minorstr); + StringFunctions::Convert(release,releasestr); + if(currentmajorFMS "+major+"."+minor+"."+release+"
"; - content+="You can see the release info here
"; + content+="You are running an old version of FMS. Please update here: FMS "+majorstr+"."+minorstr+"."+releasestr+"
"; + content+="You can see the release info here
"; showgenericupdate=false; } @@ -59,7 +71,7 @@ const std::string HomePage::GeneratePage(const std::string &method, const std::m if(showgenericupdate) { - content+="Check for new versions at the FMS Freesite
"; + content+="Check for new versions at the FMS Freesite
"; } content+="Use these pages to administer your FMS installation.";