Update of /cvsroot/php-blog/serendipity
In directory sc8-pr-cvs1:/tmp/cvs-serv7839
Modified Files:
index.php
Log Message:
Pass entry_id, if available, to serendipity_track_referrer() and exit() after header().
Index: index.php
===================================================================
RCS file: /cvsroot/php-blog/serendipity/index.php,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- index.php 30 Mar 2003 15:50:04 -0000 1.3
+++ index.php 7 Apr 2003 05:37:38 -0000 1.4
@@ -1,9 +1,10 @@
<?php
session_start();
include_once("serendipity_config.inc.php");
-serendipity_track_referrer();
+$track_referer = true;
$uri = $_SERVER['REQUEST_URI'];
+
if (preg_match('@/archives/@', $uri)) {
if (preg_match('@/(d_(\d+)\.html)@', $uri, $matches)) {
$range = $matches[2];
@@ -33,6 +34,9 @@
} else if (preg_match('@/(e_(\d+)\.html)@', $uri, $matches)) {
$id = $matches[2];
+ serendipity_track_referrer($id);
+ $track_referer = false;
+
$_GET['serendipity']['action'] = 'read';
$_GET['serendipity']['id'] = $id;
@@ -82,9 +86,11 @@
print $data;
}
} else if (preg_match('@/admin$@', $uri)) {
- header("Location: {$serendipity['serendipityHTTPPath']}serendipity_admin.php");
+ header("Location: {$serendipity['serendipityHTTPPath']}serendipity_admin.php");
+ exit;
} else if (preg_match('@/entries$@', $uri)) {
header("Location: {$serendipity['serendipityHTTPPath']}serendipity_entries.php");
+ exit;
} else if (preg_match('@/(index\.(php|html))?@', $uri)) {
if (count($serendipity['GET']) == 2) {
ob_start();
@@ -108,5 +114,9 @@
?>
The document, <?=$uri?> was not found.
<?php
+}
+
+if ($track_referer) {
+ serendipity_track_referrer();
}
?>
|