fix multi_cat, remove track_referrer
This commit is contained in:
parent
3f645612e0
commit
6c561a6875
@ -163,6 +163,8 @@ function serveAuthorPage($matches) {
|
||||
global $serendipity;
|
||||
$serendipity['view'] = 'authors';
|
||||
|
||||
|
||||
$is_multiauth = (isset($serendipity['POST']['isMultiAuth']) && is_array($serendipity['POST']['multiAuth']));
|
||||
if ($is_multiauth) {
|
||||
$serendipity['GET']['viewAuthor'] = implode(';', $serendipity['POST']['multiAuth']);
|
||||
$serendipity['uriArguments'][] = PATH_AUTHORS;
|
||||
@ -215,6 +217,7 @@ function serveCategory($matches) {
|
||||
global $serendipity;
|
||||
$serendipity['view'] = 'categories';
|
||||
|
||||
$is_multicat = (isset($serendipity['POST']['isMultiCat']) && is_array($serendipity['POST']['multiCat']));
|
||||
if ($is_multicat) {
|
||||
$serendipity['GET']['category'] = implode(';', $serendipity['POST']['multiCat']);
|
||||
$serendipity['uriArguments'][] = PATH_CATEGORIES;
|
||||
@ -405,9 +408,6 @@ function serveEntry($matches) {
|
||||
$id = false;
|
||||
}
|
||||
|
||||
serendipity_track_referrer($id);
|
||||
$track_referer = false;
|
||||
|
||||
$_GET['serendipity']['action'] = 'read';
|
||||
$_GET['serendipity']['id'] = $id;
|
||||
|
||||
|
23
index.php
23
index.php
@ -22,7 +22,6 @@ if ($serendipity['CacheControl']) {
|
||||
header('Expires: 0');
|
||||
header('Pragma: no-cache');
|
||||
}
|
||||
$track_referer = true;
|
||||
$uri = $_SERVER['REQUEST_URI'];
|
||||
|
||||
$serendipity['uriArguments'] = serendipity_getUriArguments($uri);
|
||||
@ -67,18 +66,6 @@ if (preg_match(PAT_APPROVE, $uri, $res) && $serendipity['serendipityAuthedUser']
|
||||
define('DATA_TRACKBACK_APPROVED', false);
|
||||
}
|
||||
|
||||
if (isset($serendipity['POST']['isMultiCat']) && is_array($serendipity['POST']['multiCat'])) {
|
||||
$is_multicat = true;
|
||||
} else {
|
||||
$is_multicat = false;
|
||||
}
|
||||
|
||||
if (isset($serendipity['POST']['isMultiAuth']) && is_array($serendipity['POST']['multiAuth'])) {
|
||||
$is_multiauth = true;
|
||||
} else {
|
||||
$is_multiauth = false;
|
||||
}
|
||||
|
||||
if (preg_match(PAT_ARCHIVES, $uri, $matches) || isset($serendipity['GET']['range']) && is_numeric($serendipity['GET']['range'])) {
|
||||
serveArchives();
|
||||
} else if ((preg_match(PAT_PERMALINK, $uri, $matches) ||
|
||||
@ -100,9 +87,11 @@ if (preg_match(PAT_ARCHIVES, $uri, $matches) || isset($serendipity['GET']['range
|
||||
exit;
|
||||
} else if (preg_match(PAT_ARCHIVE, $uri)) {
|
||||
serveArchive();
|
||||
} else if ($is_multicat || preg_match(PAT_PERMALINK_CATEGORIES, $uri, $matches)) {
|
||||
} else if ((isset($serendipity['POST']['isMultiCat']) && is_array($serendipity['POST']['multiCat'])) ||
|
||||
preg_match(PAT_PERMALINK_CATEGORIES, $uri, $matches)) {
|
||||
serveCategory($matches);
|
||||
} else if ($is_multiauth || preg_match(PAT_PERMALINK_AUTHORS, $uri, $matches)) {
|
||||
} else if ((isset($serendipity['POST']['isMultiAuth']) && is_array($serendipity['POST']['multiAuth'])) ||
|
||||
preg_match(PAT_PERMALINK_AUTHORS, $uri, $matches)) {
|
||||
serveAuthorPage($matches);
|
||||
} else if (preg_match(PAT_SEARCH, $uri, $matches)) {
|
||||
serveSearch();
|
||||
@ -121,10 +110,6 @@ if (preg_match(PAT_ARCHIVES, $uri, $matches) || isset($serendipity['GET']['range
|
||||
serve404();
|
||||
}
|
||||
|
||||
if ($track_referer) {
|
||||
serendipity_track_referrer();
|
||||
}
|
||||
|
||||
if (!defined('NO_EXIT')) {
|
||||
if (empty($serendipity['smarty_file'])) {
|
||||
$serendipity['smarty_file'] = '404.tpl';
|
||||
|
Loading…
x
Reference in New Issue
Block a user