Permalink
Browse files

add $bDontChangeLocation option to AVOID the smart deviceWhere() func…

…tion
  • Loading branch information...
1 parent cea8bc5 commit 5e6ecce8cfe42f83b251b38887de0c2b4451b303 @stevesouders stevesouders committed May 17, 2016
Showing with 3 additions and 2 deletions.
  1. +3 −2 crawls.inc
View
@@ -24,13 +24,14 @@ require_once("requests.inc");
////////////////////////////////////////////////////////////////////////////////
// Return a hash corresponding to the specified crawl. Return FALSE if not found.
-function getCrawl($label, $archive=null, $location=null) {
+function getCrawl($label, $archive=null, $location=null, $bDontChangeLocation=null) {
global $gArchive;
$archive = ( $archive ? $archive : $gArchive );
$location = ( $location ? $location : curDevice() );
$crawlsTable = crawlsTable();
- $query = "select * from $crawlsTable where label = '$label' and archive = '$archive' and " . deviceWhere($location, "location") . ";";
+ $query = "select * from $crawlsTable where label = '$label' and archive = '$archive' and " .
+ ( $bDontChangeLocation ? "location='$location'" : deviceWhere($location, "location") ) . ";";
return doRowQuery($query);
}

0 comments on commit 5e6ecce

Please sign in to comment.