133 Commits

Author SHA1 Message Date
f4bd9bc07a
Always use native mb_* functions. 2022-02-20 01:56:52 +01:00
2d127e81e1
Cleanup and rename project to 幸運な偶然 - Lucky Coinkydink. 2022-02-19 22:19:07 +01:00
50c89e2bad
Moved caching methods out of functions.inc.php into ContentCache class. 2022-02-13 16:15:48 +01:00
surrim
9a60f9a494
Php8 fixes for #766 (#769)
* 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>
2021-07-18 22:14:23 +02:00
onli
91c8ee2d8d bootstrap4: PHP 8 compatibility fixes 2021-07-04 14:12:46 +02:00
onli
1170363a29 Fix: Entries could not be saved if blog had no category 2021-06-27 23:10:14 +02:00
onli
6e4d16d149 PHP 8 compat fixes for clean blog 2021-06-27 22:58:03 +02:00
onli
ef79ef260b PHP 8 compat fixes for the core when trackack plugin is installed 2021-06-06 18:53:48 +02:00
onli
7fe104ed40 php 8 compat fixes (context: templatechooser to clean blog) 2021-05-30 12:06:14 +02:00
onli
4c246ad426 php8 compat fixes for entry preview 2021-05-09 16:54:27 +02:00
onli
5396ef3ff5 php8 compat: Fix multiple key issues and unserialized cache key 2021-04-19 17:19:44 +02:00
onli
5ec1754434 Stop appending * to search terms (fixes #704) 2020-05-03 13:52:05 +02:00
Thomas Hochstein
9b65e717c1 Add note to serendipity_fetchEntries().
I think that will help to think about the
context of serendipity_fetchEntries() calls.

Closes #693.

Signed-off-by: Thomas Hochstein <thh@inter.net>
2020-04-11 12:53:09 +02:00
Thomas Hochstein
93ba22c8d4 Don't fallback to last page if $totalPages < 1.
See #693 for context. That should at least
avoid SQL errors.

Signed-off-by: Thomas Hochstein <thh@inter.net>
2020-04-11 12:47:55 +02:00
Stephan Brunker
aff7f2ed9c functions_entries: use rewriteURL function for comment submit link 2020-04-06 19:36:10 +02:00
Thomas Hochstein
b718637794 Set empty limit to "" in serendipity_fetchEntries.
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>
2020-03-21 17:59:13 +01:00
Lothar Serra Mari
137330fd5b Don't allow requesting an archive page that doesn't exist 2019-12-15 13:17:29 +01:00
Stephan Brunker
ea371f6a4e fixed requested changes, array processing of multilingual_stip_langs 2019-10-15 22:45:02 +02:00
Stephan Brunker
502b837dd6 Fix a lot of single issues and overhaul the language settings
see docs/NEWS and the plugin/changelog files for details
2019-10-13 22:49:03 +02:00
Thomas Hochstein
722a4ef4c4 Fix a typo in a comment.
Signed-off-by: Thomas Hochstein <thh@inter.net>
2019-10-13 17:20:45 +02:00
Thomas Hochstein
ebb852d400 Fix prev/next page links for stable archives.
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>
2019-08-17 00:52:19 +02:00
Thomas Hochstein
f4d47812a5 Fix core pagination for "stable archives".
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>
2019-08-16 21:37:45 +02:00
onli
ba6ccb3dbb Make $entry available for templates (fix #610) 2019-07-03 17:51:36 +02:00
onli
153b5a37f1 Fix: Do not throw error when entry got deleted, go to 404 page 2019-02-16 14:46:46 +01:00
onli
4c4545428d Fix internal cache, init proper functions API 2019-02-16 13:07:53 +01:00
onli
e0f230dd15 Remove serendipity_purgeEntry
Removed pregenerated entries, but that functionality is long gone
2019-02-12 23:18:52 +01:00
onli
d52f0004a4 Add voku/simplecache as alternative to Cache/Lite and use it cache
Cache/Lite is abandoned
2019-02-12 18:52:08 +01:00
Garvin Hicking
775b71134c * Fixed bug in pull request #392 which overwrote user specified
input for logged in authors with an empty realname (wrong array
      key name) and deleted all existing text input
2018-04-23 11:58:32 +02:00
onli
2debad91d0 Workaround: Add smartyvars.uriargs to cache key
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.
2017-04-20 17:42:48 +02:00
onli
bf213b752d Drop outer printEntries cache 2017-04-20 01:19:43 +02:00
onli
e61d38a61d Cache: Add additional state variables + single entry mode
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
2017-04-20 01:07:24 +02:00
onli
c8bbb35aac Fix cache by getting & setting global state variables
See https://board.s9y.org/viewtopic.php?p=10447129#p10447129. Missed in #345
2017-04-19 01:11:34 +02:00
Thomas Hochstein
68a6a58780 Fix comment preview for logged-in user.
Comment form data was unconditionally overwritten
by user data. Make that conditional ...

Fixes #487

Signed-off-by: Thomas Hochstein <thh@inter.net>
2017-04-13 19:19:02 +02:00
onli
f947c66f66 Add multiple missing CSRF tokens (#439)
Deleting comments, disabling comment threads, installing plugins, toggling a spartacus update check
2017-01-16 15:32:16 +01:00
Garvin Hicking
c62d667287 * [Security] Fix missing integer casting for inserting new categories
(thanks to cdxy)
2017-01-16 11:29:15 +01:00
Garvin Hicking
0c8416f5df Allow setting a default category.
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?
2016-12-23 10:14:27 +01:00
Garvin Hicking
cfd75ec877 Security patch, see docs/NEWS 2016-09-22 12:51:00 +02:00
onli
acef784f41 Fix: Entry preview using backend entries.tpl 2016-09-09 14:55:29 +02:00
Ian
d93674485d cleaups 2016-03-19 17:18:11 +01:00
onli
020ca7f651 Merge pull request #392 from xoxys/master
Provide authenticated userdata for frotend comment form
2016-02-12 17:32:38 +01:00
xoxys
7faa1cb195 provide userdata for frotend comment form 2016-02-12 09:12:05 +01:00
xoxys
7af3980f96 Update functions_entries.inc.php 2016-02-12 09:08:54 +01:00
xoxys
68bb6fbeb9 provide userdata for frotend comment form 2016-02-12 09:07:00 +01:00
Ian
d97acf8b05 remove RQ, see commit and cooments
1c1c11f31fd31b54ae98f2921f8411208704c9e5#commitcomment-15999285
2016-02-10 10:44:58 +01:00
Ian
1c1c11f31f RQ some function arguments
What shall we do with them, see serendipity_fetchEntry() and getClassByInstanceID() ?
2016-02-08 15:14:49 +01:00
onli
2d7947eb93 Add cache activation to configuration (closes #345) 2016-01-15 14:40:51 +01:00
Ian
2a228f68cf fix typos, brackets, whitespaces 2015-12-20 17:26:56 +01:00
onli
0125f1539e Use internal cache to speedup printEntries & fetchEntries (#345) 2015-05-30 01:23:57 +02:00
onli
b73eb367f2 Prevent negative offset (#321) 2015-03-27 00:00:10 +01:00
onli
75397c7d47 Remove $p == 1 search wildcard requirement (#309)
The bug meant to be fixed in 51208e0f72 (diff-cbbd600f627a5af39c73092fbc3fbf46) is not reproducible anymore
2015-03-07 11:55:37 +01:00