+ protected function filterLinks($linkInfos)
+ {
+ $filteredLinkInfos = array();
+ foreach ($linkInfos as $linkInfo) {
+ $linkInfo->url = Helper::rewriteUrl($linkInfo->url);
+ $allowed = Helper::isUrlAllowed($linkInfo->url);
+ $crawl = $allowed;
+ $index = $GLOBALS['phinde']['indexNonAllowed'] || $allowed;
+
+ if ($crawl && count($GLOBALS['phinde']['crawlBlacklist'])) {
+ foreach ($GLOBALS['phinde']['crawlBlacklist'] as $bl) {
+ if (preg_match('#' . $bl . '#', $linkInfo->url)) {
+ $crawl = false;
+ }
+ }
+ }
+
+ $linkInfo->known = $this->es->isKnown($linkInfo->url);
+ $linkInfo->crawl = $crawl;
+ $linkInfo->index = $index;
+ $filteredLinkInfos[] = $linkInfo;
+ }
+ return $filteredLinkInfos;
+ }
+