From fa4b19693d3182218dc9b06edcbb7fc7fb2bea91 Mon Sep 17 00:00:00 2001 From: Ken Moore Date: Thu, 4 Aug 2016 14:37:01 -0400 Subject: [PATCH] Add an additional check to the pkg repo listing to verify which repos are active too. --- src/server/library/sysadm-pkg.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/server/library/sysadm-pkg.cpp b/src/server/library/sysadm-pkg.cpp index 0f95886..6de04e9 100644 --- a/src/server/library/sysadm-pkg.cpp +++ b/src/server/library/sysadm-pkg.cpp @@ -236,7 +236,7 @@ while(found.isEmpty() && numtry<2){ found << query.value("origin").toString(); //need the origin for later } } - if(found.length()<10 && numtry<1){ + if(found.length()<60 && numtry<1){ //Expand the search to names containing the term q_string = "SELECT origin FROM packages WHERE name LIKE '"+searchterm+"%'"; if(!category.isEmpty()){ q_string.append(" AND origin LIKE '"+category+"/%'"); } @@ -246,7 +246,7 @@ while(found.isEmpty() && numtry<2){ found << q2.value("origin").toString(); //need the origin for later } } - if(found.length()<10 && numtry<1){ + if(found.length()<60 && numtry<1){ //Expand the search to names containing the term q_string = "SELECT origin FROM packages WHERE name LIKE '%"+searchterm+"%'"; if(!category.isEmpty()){ q_string.append(" AND origin LIKE '"+category+"/%'"); } @@ -256,7 +256,7 @@ while(found.isEmpty() && numtry<2){ found << q2.value("origin").toString(); //need the origin for later } } - if(found.length()<10){ + if(found.length()<60){ //Expand the search to comments if(terms.length()<2){ q_string = "SELECT origin FROM packages WHERE comment LIKE '%"+searchterm+"%'"; } else if(numtry==0){ q_string = "SELECT origin FROM packages WHERE comment LIKE '%"+terms.join("%' AND comment LIKE '%")+"%'"; } @@ -268,7 +268,7 @@ while(found.isEmpty() && numtry<2){ found << q2.value("origin").toString(); //need the origin for later } } - if(found.length()<10){ + if(found.length()<100){ //Expand the search to full descriptions if(terms.length()<2){ q_string = "SELECT origin FROM packages WHERE desc LIKE '%"+searchterm+"%'"; } else if(numtry==0){ q_string = "SELECT origin FROM packages WHERE desc LIKE '%"+terms.join("%' AND desc LIKE '%")+"%'"; } @@ -340,8 +340,8 @@ QJsonArray PKG::list_repos(bool updated){ for(int i=0; i