Permalink
Browse files

add optional $pagesTable (for compareUrls.php)

  • Loading branch information...
1 parent 7c949aa commit 13ada4b4ac089159947fbabc9522dbf59b4ad4e0 @stevesouders stevesouders committed Feb 22, 2016
Showing with 5 additions and 2 deletions.
  1. +5 −2 pages.inc
View
@@ -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;");
}

0 comments on commit 13ada4b

Please sign in to comment.