root/releases/0.65/search/rss.php

Revision 454, 0.9 kB (checked in by sven, 2 years ago)

removed some addslashes. replaced some with adodb qstr().
removed some stripslashes. a lot more still want to go, depending on how much we care about showing users even more inappropriate backslashes than currently.
fixed a few more php notices.

  • Property svn:eol-style set to native
Line 
1 <?php
2
3 //    ELGG search through everything page
4
5 // Run includes
6 require_once(dirname(dirname(__FILE__))."/includes.php");
7
8 run("search:init");
9 run("search:all:tagtypes");
10
11 $tag = optional_param('tag');
12 $output = run("search:all:display:rss", $tag);
13
14 if ($output) {
15     header("Pragma: public");
16     header("Cache-Control: public");
17     
18     // no time data on this RSS, at least not without rewriting some function outputs
19     
20     $if_none_match = (isset($_SERVER['HTTP_IF_NONE_MATCH'])) ? preg_replace('/[^0-9a-f]/', '', $_SERVER['HTTP_IF_NONE_MATCH']) : false;
21     
22     $etag = md5($output);
23     
24     if ($if_none_match && $if_none_match == $etag) {
25         header("{$_SERVER['SERVER_PROTOCOL']} 304 Not Modified");
26         exit;
27     }
28     
29     header("Content-Length: " . strlen($output));
30     header('ETag: "' . $etag . '"');
31     
32     header("Content-Type: text/xml; charset=utf-8");
33     echo $output;
34 }
35 ?>
Note: See TracBrowser for help on using the browser.