diff --git a/.project b/.project index 032e5fe18619818e11ba8d02bc5d2cdc9c476420..99eb468ed852a2bfe24e141eb085d85d81dcdb69 100644 --- a/.project +++ b/.project @@ -5,6 +5,16 @@ <projects> </projects> <buildSpec> + <buildCommand> + <name>org.eclipse.wst.validation.validationbuilder</name> + <arguments> + </arguments> + </buildCommand> + <buildCommand> + <name>org.eclipse.dltk.core.scriptbuilder</name> + <arguments> + </arguments> + </buildCommand> </buildSpec> <natures> </natures> diff --git a/lib/php/Spider.php b/lib/php/Spider.php index 0977d05a6f097fb0afbea99deee329d4d0fd0735..25ca770fae8504eb18f87b9baa6cab89d60cd1ac 100644 --- a/lib/php/Spider.php +++ b/lib/php/Spider.php @@ -95,7 +95,11 @@ class Spider foreach ($subUris as $subUri) { if (!array_key_exists($subUri, $this->visited)) { - $this->spiderPage($baseUri, $subUri, $depth + 1); + try { + $this->spiderPage($baseUri, $subUri, $depth + 1); + } catch(Exception $e) { + echo "The page, ".$uri.' linked to a page that could not be accessed: ' . $subUri.'<br />'; + } } } } diff --git a/src/UNL/WDN/Assessment.php b/src/UNL/WDN/Assessment.php index 8b42f534ff134fdabe32ca6948059bc48279e82b..68969b7892bc35ac06e07f4ee8a0b4eb87e47158 100644 --- a/src/UNL/WDN/Assessment.php +++ b/src/UNL/WDN/Assessment.php @@ -18,7 +18,7 @@ class UNL_WDN_Assessment protected function getSpider() { $plogger = new UNL_WDN_Assessment_PageLogger($this); - $downloader = new UNL_WDN_Assessment_PageDownloader(); + $downloader = new Spider_Downloader(); $parser = new Spider_Parser(); $spider = new Spider($downloader, $parser); diff --git a/src/UNL/WDN/Assessment/PageDownloader.php b/src/UNL/WDN/Assessment/PageDownloader.php deleted file mode 100644 index ead5c8196152bdb45d819395a4bb52f15649393d..0000000000000000000000000000000000000000 --- a/src/UNL/WDN/Assessment/PageDownloader.php +++ /dev/null @@ -1,19 +0,0 @@ -<?php -class UNL_WDN_Assessment_PageDownloader extends Spider_Downloader -{ - protected $assessment; - - function __construct(UNL_WDN_Assessment $assessment) - { - $this->assessment = $assessment; - } - - public function download($uri) - { - try { - return parent::download($uri); - } catch(Exception $e) { - echo 'Link to missing page. '.$uri; - } - } -} \ No newline at end of file