Skip to content
This repository has been archived by the owner on Jan 4, 2023. It is now read-only.

Commit

Permalink
add optional $pagesTable (for compareUrls.php)
Browse files Browse the repository at this point in the history
  • Loading branch information
stevesouders committed Feb 22, 2016
1 parent 7c949aa commit 13ada4b
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions pages.inc
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,14 @@ function pageData($pageid, $url = null, $label = null, $urlhash = null) {
}


function getPage($url, $crawlid) {
function getPage($url, $crawlid, $pagesTable="") {
global $gPagesTable, $gUrlsTable;

if ( ! $pagesTable ) {
$pagesTable = $gPagesTable;
}
$urlhash = doSimpleQuery("select urlhash from $gUrlsTable where urlOrig = '$url';");
return doRowQuery("select * from $gPagesTable where urlhash=$urlhash and url='$url' and crawlid=$crawlid limit 1;");
return doRowQuery("select * from $pagesTable where urlhash=$urlhash and url='$url' and crawlid=$crawlid limit 1;");
}


Expand Down

0 comments on commit 13ada4b

Please sign in to comment.