also don't even follow links from deep search pages

This commit is contained in:
Shish 2018-07-19 08:51:19 +01:00
parent 71445fdf96
commit 9b0edcf449
2 changed files with 5 additions and 1 deletions

View File

@ -334,6 +334,10 @@ class Index extends Extension {
$hash = strtolower($matches[2]);
$event->add_querylet(new Querylet('images.hash = :hash', array("hash" => $hash)));
}
else if(preg_match("/^(phash)[=|:]([0-9a-fA-F]*)$/i", $event->term, $matches)) {
$phash = strtolower($matches[2]);
$event->add_querylet(new Querylet('images.phash = :phash', array("phash" => $phash)));
}
else if(preg_match("/^(filetype|ext)[=|:]([a-zA-Z0-9]*)$/i", $event->term, $matches)) {
$ext = strtolower($matches[2]);
$event->add_querylet(new Querylet('images.ext = :ext', array("ext" => $ext)));

View File

@ -137,7 +137,7 @@ and of course start organising your images :-)
if (count($this->search_terms) > 0) {
if($this->page_number > 3) {
// only index the first pages of each term
$page->add_html_header('<meta name="robots" content="noindex">');
$page->add_html_header('<meta name="robots" content="noindex, nofollow">');
}
$query = url_escape(implode(' ', $this->search_terms));
$page->add_block(new Block("Images", $this->build_table($images, "#search=$query"), "main", 10, "image-list"));