diff --git a/www/search.php b/www/search.php index 0457d11c..2b4c5ffc 100644 --- a/www/search.php +++ b/www/search.php @@ -405,7 +405,7 @@ function WildCardQuery($db, $stype, $Like, $query) { # are we setting the whole SQL condition or just the operator and the value? $sqlSetAll = false; - if ($Debug) echo "at line " . __LINE__ . " stype='$stype'
"; + if ($Debug) echo "at line " . __FILE__ . '::' . __LINE__ . " stype='$stype'
"; if ($output_format == OUTPUT_FORMAT_DEPENDS && $stype == SEARCH_FIELD_NAME) { @@ -482,7 +482,7 @@ function WildCardQuery($db, $stype, $Like, $query) { } # $stype != SEARCH_FIELD_PACKAGE } # not OUTPUT_FORMAT_DEPENDS - if ($Debug && IsSet($sqlUserSpecifiedCondition)) echo "at line " . __LINE__ . " sqlUserSpecifiedCondition is: $sqlUserSpecifiedCondition
"; + if ($Debug && IsSet($sqlUserSpecifiedCondition)) echo "at line " . __FILE__ . '::' . __LINE__ . " sqlUserSpecifiedCondition is: $sqlUserSpecifiedCondition
"; # # include/exclude deleted ports @@ -721,7 +721,7 @@ function WildCardQuery($db, $stype, $Like, $query) { $Commits->UserIDSet($User->id); $Commits->Debug = $Debug; if ($sqlSetAll) { - if ($Debug) echo 'invoking TreePathConditionSetAll() with ' . $sqlUserSpecifiedConditionl; + if ($Debug) echo 'invoking TreePathConditionSetAll() with ' . $sqlUserSpecifiedCondition; $Commits->TreePathConditionSetAll($sqlUserSpecifiedCondition); } else { if ($Debug) echo 'invoking TreePathConditionSet() with ' . $sqlUserSpecifiedCondition; @@ -831,7 +831,7 @@ function WildCardQuery($db, $stype, $Like, $query) { } $Ports->SetLimit($PageSize); - $NumFetches = $Ports->FetchPorts($User->id, $sqlOrderBy); + $NumFetches = $Ports->FetchPorts($User->id, $sqlOrderBy, $Branch); # $result get used later on to display the search results via classes/port-display.php $result = $Ports->LocalResult; @@ -879,12 +879,12 @@ function WildCardQuery($db, $stype, $Like, $query) { if ($stype == SEARCH_FIELD_PACKAGE) { $query_params[] = '%' . $query . '%'; # see https://github.com/FreshPorts/freshports/issues/481#issuecomment-1793451539 - $sqlSelectCount = $SQL_WITH_PACKAGES . $sqlSelectCount; + $sqlSelectCount = SQL_WITH_PACKAGES . $sqlSelectCount; # join on the new WITH above $sqlFrom = " packages P2 join ports P ON p2.port_id = P.id\n" . $sqlFrom; - $sqlSelectFields = $SQL_WITH_PACKAGES . $sqlSelectFields; + $sqlSelectFields = SQL_WITH_PACKAGES . $sqlSelectFields; # we are searching by package, a port can have multiple package names; bring them all back. $sqlExtraFields .= ",\n package_names"; @@ -1305,7 +1305,7 @@ function WildCardQuery($db, $stype, $Like, $query) { case SEARCH_FIELD_COMMITTER_EMAIL: case SEARCH_FIELD_COMMITMESSAGE: case SEARCH_FIELD_PATHNAME: - if ($Debug) echo __FILE__ . '::' . __LINE__ . ' says hi'; + if ($Debug) echo __FILE__ . '::' . __LINE__ . ' says hi
'; require_once($_SERVER['DOCUMENT_ROOT'] . '/../classes/display_commit.php'); if ($Debug) echo 'time to display!'; @@ -1318,7 +1318,7 @@ function WildCardQuery($db, $stype, $Like, $query) { break; default: - if ($Debug) echo __FILE__ . '::' . __LINE__ . ' says hi'; + if ($Debug) echo __FILE__ . '::' . __LINE__ . ' says hi
'; require_once($_SERVER['DOCUMENT_ROOT'] . '/../classes/port-display.php'); $links = $Pager->GetLinks();