cvs: phpweb / results.php
| From: | Hannes Magnusson | Date: | Wed, 19 Mar 2008 12:35:36 +0000 |
| Subject: | cvs: phpweb / results.php | ||
| Groups: | php.webmaster | ||
| Request: | Send a blank email to php-webmaster+get-1324@lists.php.net to get a copy of this message | ||
bjori Wed Mar 19 12:35:36 2008 UTC
Modified files:
/phpweb results.php
Log:
- Blindly ignore smarty hits
- Add noindex robot rule
http://cvs.php.net/viewvc.cgi/phpweb/results.php?r1=1.34&r2=1.35&diff_format=u
Index: phpweb/results.php
diff -u phpweb/results.php:1.34 phpweb/results.php:1.35
--- phpweb/results.php:1.34 Wed Mar 19 12:28:03 2008
+++ phpweb/results.php Wed Mar 19 12:35:36 2008
@@ -1,12 +1,12 @@
<?php
-// $Id: results.php,v 1.34 2008/03/19 12:28:03 bjori Exp $
+// $Id: results.php,v 1.35 2008/03/19 12:35:36 bjori Exp $
$_SERVER['BASE_PAGE'] = 'results.php';
include $_SERVER['DOCUMENT_ROOT'] . '/include/prepend.inc';
#include $_SERVER['DOCUMENT_ROOT'] . '/include/loadavg.inc';
function exit_with_pretty_error($title, $header, $msg) {
if ($title) {
- site_header($title);
+ site_header($title, array("noindex"));
}
echo '<h2>' .$header. '</h2>';
echo '<p>' .$msg. '</p>';
@@ -73,7 +73,7 @@
$res = unserialize($data);
// HTTP status line is passed on, signifies an error
-site_header('Search results');
+site_header('Search results', array("noindex"));
if (!is_array($res)) {
exit_with_pretty_error(null, 'Internal error', 'Please try again later');
@@ -117,6 +117,7 @@
$type = substr($displayurl,0,strpos($displayurl,'.'));
if($type=='pecl' && strstr($displayurl,"/bugs/")) $type =
"peclbugs";
if($type=='pear' && strstr($displayurl,"/bugs/")) $type =
"pearbugs";
+ if($type=='smarty') continue;
$display_title = str_replace('PHP:', '', $hit['Title']);
$types = array('pear'=>'<img src="http://static.php.net/www.php.net/images/pear_item.gif"
height="19" width="17" style="float:left;
margin-left:-30px;"/>',
'pecl'=>'<img src="http://static.php.net/www.php.net/images/pecl_item.gif"
height="19" width="17" style="float:left;
margin-left:-30px;"/>',