root/releases/0.6rc2/search/rss.php

Revision 296, 0.8 kB (checked in by carmartin, 3 years ago)

Includes should use full path given that we know where things are. Patch 1.

  • 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 = preg_replace('/[^0-9a-f]/', '', $_SERVER['HTTP_IF_NONE_MATCH']);
21     
22     $etag = md5($output);
23     
24     if ($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.