Skip to content
Snippets Groups Projects
Commit 1d686544 authored by Brett Bieber's avatar Brett Bieber
Browse files

Do not show local search results for u=http://www.unl.edu/

parent 883c5bbf
No related branches found
No related tags found
No related merge requests found
...@@ -28,6 +28,7 @@ if ($template == 'Mobile') { ...@@ -28,6 +28,7 @@ if ($template == 'Mobile') {
$page->addScript('searchFunc.js'); $page->addScript('searchFunc.js');
if (isset($_GET['u']) //u is referring site if (isset($_GET['u']) //u is referring site
&& $_GET['u'] !== 'http://www.unl.edu/'
&& preg_match('/^https?/', $_GET['u']) && preg_match('/^https?/', $_GET['u'])
&& filter_var($_GET['u'], FILTER_VALIDATE_URL, FILTER_FLAG_SCHEME_REQUIRED) && filter_var($_GET['u'], FILTER_VALIDATE_URL, FILTER_FLAG_SCHEME_REQUIRED)
&& $scanned = @file_get_contents($_GET['u'])) { && $scanned = @file_get_contents($_GET['u'])) {
...@@ -83,7 +84,7 @@ if (isset($_GET['u']) //u is referring site ...@@ -83,7 +84,7 @@ if (isset($_GET['u']) //u is referring site
$page->maincontentarea = ' $page->maincontentarea = '
<div id="searchform"> <div id="searchform">
<form action="http://www1.unl.edu/search/" method="get"> <form action="./" method="get">
<label for="q">Search</label> <label for="q">Search</label>
<input type="text" name="q" id="q" />'; <input type="text" name="q" id="q" />';
if (!empty($local_results)) { if (!empty($local_results)) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment