* init empty vars to avoid PHP8 warnings
* removed debug output for serendipity_session_destroy()
* init smarty fixed for PHP8
* removed optional parameters for PHP 8
* 2k11 template fixes, maybe updating smarty will solve everything
* init or test undefined variables for PHP 8
* remove only existing files
* make sure string is not empty before comparing the first letter
* check if SMARTY_DIR was already defined
* use mb_language('uni') for unicode
* fixed image filter bug
* Smarty debug fixed in external lib
* fixed archive bug
* fixed entries bug
* updated plugin versions
Co-authored-by: surrim <surrim@happyhydro.org>
If $limit is empty(), no limit is set, so we can
set the LIMIT statement to "" to achieve the same.
But an empty() $limit can be "0", so the
generated SQL statement could end with "0"
instead of the LIMIT statement. We catch this
with forcing an empty() $limit to "".
Fixes#636.
(No matter that this shouldn't even happen.)
Signed-off-by: Thomas Hochstein <thh@inter.net>
We shouldn't swap prev/next links for archive
pages. With stable archives, the title page is
the last page of the archive, not the first, so
all other pages are "previos", and we should
display it like that.
That may seem counterintuitive at first, but
otherwise archive page directions and pagination
directions don't match (see bulletproof), and we
shouldn't count archive pages differently from
the URL. With the current code, page 100 of 100
archive pages would be shown in footer_info as
page 1, page 99 as page 2, and that doesn't make
sense either.
Signed-off-by: Thomas Hochstein <thh@inter.net>
The current page will always be the current page,
regardless of archive sorting order. Page 76 of
86 pages will remain page 76, even if the archive
sorting is changed; it won't become page 10.
Fixes#625 in core.
Themes will have to cope with the sorting order
in their pagination code if they want to display
a descending order for stable archive sorting.
Signed-off-by: Thomas Hochstein <thh@inter.net>
The freetags plugin sets this->displaytag in the frontend_fetchentries hook, and only sets clean_page if it sees that variable in the entry_display hook. The result is that wrong entries are shown on tag pages. Adding the smartyvars allows caching the correct $entries the plugin would have returned, working around that limitation without simulatign the frontend_fetchentries hook.
fetchEntries is heaviliy realient on glboal state variables, and that was missed initially. The last commit c8bbb35aacee7af8527820f3d3d5fd47d1dbf340 fixed that partially, but did not catch all global state variables. Additionally, this fixed the clean_page mode as used by staticpage by adding the logic and event hook to printEntriesCached
Needs some testing, I am not sure how to solve the case now where "no category" shall be used. It will always fall back to the default category.
Probably if someone uses a default category, that's the intended behaviour?