parent
a119122497
commit
1b3ef7516d
13
lib/Pico.php
13
lib/Pico.php
@ -1387,9 +1387,18 @@ class Pico
|
|||||||
. (is_object($queryData) ? get_class($queryData) : gettype($queryData)) . ' given'
|
. (is_object($queryData) ? get_class($queryData) : gettype($queryData)) . ' given'
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// drop "index"
|
||||||
|
if ($page === 'index') {
|
||||||
|
$page = '';
|
||||||
|
} elseif (($pagePathLength = strrpos($page, '/')) !== false) {
|
||||||
|
if (substr($page, $pagePathLength + 1) === 'index') {
|
||||||
|
$page = substr($page, 0, $pagePathLength);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (!empty($queryData)) {
|
if (!empty($queryData)) {
|
||||||
$page = !empty($page) ? $page : 'index';
|
$queryData = ($this->isUrlRewritingEnabled() || empty($page)) ? '?' . $queryData : '&' . $queryData;
|
||||||
$queryData = $this->isUrlRewritingEnabled() ? '?' . $queryData : '&' . $queryData;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (empty($page)) {
|
if (empty($page)) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user