* Fix permalink patterns for some cases to properly detect pagination variables instead of interpreting search words as those (garvinhicking)
This commit is contained in:
parent
9d6e2b8a97
commit
88188ee8e3
@ -3,6 +3,10 @@
|
||||
Version 1.2 ()
|
||||
------------------------------------------------------------------------
|
||||
|
||||
* Fix permalink patterns for some cases to properly detect
|
||||
pagination variables instead of interpreting search words
|
||||
as those (garvinhicking)
|
||||
|
||||
* Improve performance of displaying the complete archive. Instead
|
||||
of year*months SQL queries, only one query is now used.
|
||||
(garvinhicking)
|
||||
|
17
index.php
17
index.php
@ -107,8 +107,11 @@ if (preg_match(PAT_ARCHIVES, $uri, $matches) || isset($serendipity['GET']['range
|
||||
unset($_args[$k]);
|
||||
}
|
||||
} elseif ($v{0} == 'A') { /* Author */
|
||||
$serendipity['GET']['viewAuthor'] = $_GET['viewAuthor'] = (int)substr($v, 1);
|
||||
$url_author = substr($v, 1);
|
||||
if (is_numeric($url_author)) {
|
||||
$serendipity['GET']['viewAuthor'] = $_GET['viewAuthor'] = (int)$url_author;
|
||||
unset($_args[$k]);
|
||||
}
|
||||
} elseif ($v{0} == 'W') { /* Week */
|
||||
$week = substr($v, 1);
|
||||
if (is_numeric($week)) {
|
||||
@ -351,10 +354,13 @@ if (preg_match(PAT_ARCHIVES, $uri, $matches) || isset($serendipity['GET']['range
|
||||
unset($_args[$k]);
|
||||
}
|
||||
} elseif ($v{0} == 'A') { /* Author */
|
||||
$serendipity['GET']['viewAuthor'] = $_GET['viewAuthor'] = (int)substr($v, 1);
|
||||
$url_author = substr($v, 1);
|
||||
if (is_numeric($url_author)) {
|
||||
$serendipity['GET']['viewAuthor'] = $_GET['viewAuthor'] = (int)$url_author;
|
||||
unset($_args[$k]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
include(S9Y_INCLUDE_PATH . 'include/genpage.inc.php');
|
||||
} else if (preg_match(PAT_PLUGIN, $uri, $matches)) {
|
||||
@ -392,10 +398,13 @@ if (preg_match(PAT_ARCHIVES, $uri, $matches) || isset($serendipity['GET']['range
|
||||
unset($serendipity['uriArguments'][$k]);
|
||||
}
|
||||
} elseif ($v{0} == 'A') { /* Author */
|
||||
$serendipity['GET']['viewAuthor'] = $_GET['viewAuthor'] = (int)substr($v, 1);
|
||||
$url_author = substr($v, 1);
|
||||
if (is_numeric($url_author)) {
|
||||
$serendipity['GET']['viewAuthor'] = $_GET['viewAuthor'] = (int)$url_author;
|
||||
unset($_args[$k]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!$is_multicat) {
|
||||
$matches[1] = serendipity_searchPermalink($serendipity['permalinkCategoryStructure'], implode('/', $_args), $matches[1], 'category');
|
||||
@ -463,6 +472,8 @@ if (preg_match(PAT_ARCHIVES, $uri, $matches) || isset($serendipity['GET']['range
|
||||
$serendipity['GET']['page'] = $page;
|
||||
unset($_args[$k]);
|
||||
unset($serendipity['uriArguments'][$k]);
|
||||
} else {
|
||||
$search[] = $v;
|
||||
}
|
||||
} else {
|
||||
$search[] = $v;
|
||||
|
Loading…
x
Reference in New Issue
Block a user