1
0
Commit Graph

5375 Commits

Author SHA1 Message Date
febbb55371 [CLEANUP] Code formatting 2019-09-17 10:49:37 +02:00
a8344876e6 [BUGFIX] Fixes {$save_error} not showing when saving plugin API configuration 2019-09-17 10:49:22 +02:00
6737384bbf Adds 'vagrant' to gitignore for local development 2019-09-09 11:19:31 +02:00
f86fd35c13 document #632 2019-09-06 10:48:22 +02:00
07a241798d With MySQL use cast(okey as unsigned) instead of cast(okey as integer)
The autologin ("Save information") functionality in 2.3.1 is broken since

    commit 52a41b37d5
    CommitDate: Fri Mar 23 18:01:32 2018 +0100

	Rework autologin to use a token approach

Although a cookie serendipity[author_autologintoken] with correct
expiration (one month) which random data content is present as value
in the serendipity_options table with name autologin_Username and
correct timestamp as okey and that is found with manually executing
the SQL statement

  SELECT name, value, okey FROM serendipity_options WHERE name = 'autologin_Username' AND okey > 1565801743 LIMIT 1

like done in include/functions_config.inc.php
serendipity_checkAutologin(), the login is forgotten after 30 minutes
or so. That was not the case with 2.1.5 where the login was valid for
weeks.

Of

    if (stristr($serendipity['dbType'], 'sqlite')) {
        $cast = "okey";
    } else {
        // Adds explicits casting for mysql, postgresql and others.
        $cast = "cast(okey as integer)";
    }

from which $cast then is used in the SQL statement instead of a plain
okey; when doing that manually with

  SELECT name, value, okey FROM serendipity_options WHERE name = 'autologin_Username' AND cast(okey as integer) > 1565801743 LIMIT 1

it produces the MySQL error

  #1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'integer) > 1565801743 LIMIT 1' at line 1

This also with $serendipity['dbType'] = 'mysqli' for the above code.

Indeed, cast(okey as integer) is invalid in MySQL and should be
cast(okey as unsigned) instead which then also works manually, see
https://stackoverflow.com/a/12127022 and
https://dev.mysql.com/doc/refman/5.7/en/cast-functions.html#function_cast

Same in serendipity_issueAutologin().

Changing those two places accordingly resolves the autologin not
persistent problem.

Additionally, inspecting the serendipity_options table revealed loads
of old serendipity[author_authorinformation] cookie information that
was never deleted in serendipity_issueAutologin() with the

  OR (okey LIKE 'l_%' AND $cast < " . (time() - 1814400) . ")")

expression producing a MySQL error. This has to be done manually
once as also 2.3.1 will not delete it anymore.
2019-09-06 10:48:36 +02:00
ecd3c9fa0b Revert "Fix pagination for "stable archives" in themes."
This reverts commit d9b3333556.

With this - now reverted - commit, the prev/next
arrows in pagination were swapped because they
were the wrong way around. Unfortunately, later on,
in ebb852d400, the
root cause was fixes by "unswapping" the prev/next
links in core, so now the pagination arrows were
... eh ... wrongly swapped. So this commit has to
be reverted.

Should fix #625 for good this time.

Signed-off-by: Thomas Hochstein <thh@inter.net>
2019-08-24 08:39:13 +02:00
dd46e39884 Release 2.3.1
Signed-off-by: Thomas Hochstein <thh@inter.net>
2019-08-21 07:38:04 +02:00
573fefc8e2 Fix recode.sh - only copy language files.
Signed-off-by: Thomas Hochstein <thh@inter.net>
2019-08-18 12:19:38 +02:00
b944d76ee7 Add new language constant to all language files.
Signed-off-by: Thomas Hochstein <thh@inter.net>
2019-08-18 12:15:22 +02:00
9ae7ec779d Add plugin update notifier to NEWS.
Signed-off-by: Thomas Hochstein <thh@inter.net>
2019-08-18 10:48:59 +02:00
2d7c9a0db2 [checklang] Don't normalize languages to lc.
"serendipity_lang_pt_PT.inc.php" is mixed
case and won't be found if languages are
normalized to lowercase.

Signed-off-by: Thomas Hochstein <thh@inter.net>
2019-08-18 01:48:48 +02:00
75a6309fe3 lang DE: Remove duplicates, add missing.
Signed-off-by: Thomas Hochstein <thh@inter.net>
2019-08-18 01:30:13 +02:00
c32b692b1b lang EN: Remove duplicates, add missing.
Signed-off-by: Thomas Hochstein <thh@inter.net>
2019-08-18 01:23:55 +02:00
f85608e3ce [plugin_categories] Add description constant.
Signed-off-by: Thomas Hochstein <thh@inter.net>
2019-08-18 01:14:20 +02:00
77905d991d Fix typo.
Signed-off-by: Thomas Hochstein <thh@inter.net>
2019-08-18 01:08:32 +02:00
f8f40d27a4 Add language file checker.
This checker will find duplicate, missing and
superfluous constants in Serendipity's language
files.

Signed-off-by: Thomas Hochstein <thh@inter.net>
2019-08-18 01:04:05 +02:00
0805014761 [event_spartacus] Fix upgrade counter.
The plugin name was derived from its
install path - but bundled sidebar and
event plugins may share a path. So use
the name instead (and strip the instance
hash from it).

Signed-off-by: Thomas Hochstein <thh@inter.net>
2019-08-17 18:14:26 +02:00
3730e77ddf Bump version, add Changelog entry.
Signed-off-by: Thomas Hochstein <thh@inter.net>
2019-08-17 13:56:43 +02:00
3d0410bacd plugin_lang.php: Check additional_plugins, too.
If you have the additional_plugins repo handy,
you can just change the base path to check all
that plugins, too.

We shouldn't forget to check the UTF-8
directories.

And we just have to catch all, even fatal,
errors, due to missing function dependencies.

Signed-off-by: Thomas Hochstein <thh@inter.net>
2019-08-17 13:33:14 +02:00
4327c432a5 event_entryproperties: Add missing language constant.
Signed-off-by: Thomas Hochstein <thh@inter.net>
2019-08-17 12:59:54 +02:00
d2ad092763 plugin_lang.php: Make output more readable.
Signed-off-by: Thomas Hochstein <thh@inter.net>
2019-08-17 12:59:54 +02:00
9c66269fce addlang.sh: Move input to backup after run.
And check for input file before starting.

Signed-off-by: Thomas Hochstein <thh@inter.net>
2019-08-17 12:59:54 +02:00
770e0eb2fd Move new constant to end of language files.
Signed-off-by: Thomas Hochstein <thh@inter.net>
2019-08-17 12:59:54 +02:00
b2aef47e05 [event_spamblock] Add ChangeLog.
Signed-off-by: Thomas Hochstein <thh@inter.net>
2019-08-17 12:59:54 +02:00
8941fe6563 [event_spamblock] Don't overwrite "moderate" flag.
Unconditionally setting $serendipity['csuccess']
to 'true' will override a "moderate" flag set by
another (spamblock) plugin.

Signed-off-by: Thomas Hochstein <thh@inter.net>
2019-08-17 04:07:30 +02:00
cee38e55ab Merge pull request #629 from th-h/thh-ml-multi
Fix media library (mass) delete, enhance i18n.
2019-08-17 01:46:30 +02:00
0b58fe42f2 Add ML changes to NEWS.
Signed-off-by: Thomas Hochstein <thh@inter.net>
2019-08-17 01:43:00 +02:00
f8110dbe86 I18n for multimove.
* Add MEDIA_DIRECTORY_MOVE.
* Change German translation of "Move" to
  "Verschieben".
2019-08-17 01:38:08 +02:00
12bb9c0cc0 Fix media library (mass) delete.
Fixes #619.

Signed-off-by: Thomas Hochstein <thh@inter.net>
2019-08-17 01:36:51 +02:00
6253c03ad9 Merge pull request #628 from th-h/thh-pagination
Fix prev/next page links for stable archives.
2019-08-17 00:55:32 +02:00
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
42d57bb1c2 Add pagination fixes to NEWS.
Signed-off-by: Thomas Hochstein <thh@inter.net>
2019-08-17 00:11:16 +02:00
2f9b8e23b8 Merge pull request #627 from th-h/thh-pagination
Fix pagination for "stable archives" in themes.
2019-08-17 00:03:42 +02:00
d9b3333556 Fix pagination for "stable archives" in themes.
Timeline and Bulletproof have pagination.
Both need to swap the prev/next links for
stable archives, as the sorting order has
been reversed.

Signed-off-by: Thomas Hochstein <thh@inter.net>
2019-08-17 00:01:57 +02:00
78fc6e2bc3 Merge pull request #626 from th-h/thh-pagination
Fix core pagination for "stable archives".
2019-08-16 21:41:25 +02:00
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
221bd4a4c7 Merge pull request #620 from th-h/thh-plugin-notifier
Add plugin update notifications.
2019-08-13 22:21:28 +02:00
c35ed7be34 Merge pull request #623 from th-h/thh-i18n
Run addlang.sh and add new translations.
2019-08-11 15:09:42 +02:00
648f07f97d Remove wrongly added constants from plugin_lang.php
Signed-off-by: Thomas Hochstein <thh@inter.net>
2019-08-11 15:07:10 +02:00
f10dfd2521 Run addlang.sh and add new translations.
Signed-off-by: Thomas Hochstein <thh@inter.net>
2019-08-11 15:06:37 +02:00
39887190da Merge pull request #622 from th-h/thh-i18n
Add i18n and German translations.
2019-08-11 14:51:07 +02:00
36330c7cbe Add i18n and German translations.
* "PLUGIN_ALL_UPDATED" was hardcoded.
* Add some missing German translation
  and fix some others.
* Add new constants to addlang.txt

Signed-off-by: Thomas Hochstein <thh@inter.net>
2019-08-11 14:42:20 +02:00
69241156bf Merge pull request #621 from th-h/thh-add-spartacus-links
Add Spartacus links to plugin lists.
2019-08-11 13:45:43 +02:00
4e88c875d8 Add Spartacus links to plugin lists.
Quite some information is missing from
the list of installed plugins; and the
list of installable plugins has some
more information, but not everything
that is present on Spartacus, i.e.
the last modification date.

So let's add a link to the plugin entry
on Spartacus (in the chosen language
version).

Fixes #471.

Signed-off-by: Thomas Hochstein <thh@inter.net>
2019-08-11 13:44:46 +02:00
0bd0260fa7 Add changes to NEWS.
Signed-off-by: Thomas Hochstein <thh@inter.net>
2019-08-11 13:42:47 +02:00
53f63342c6 Fix typo / unify PHP and smarty variable names.
"requirement_failures" from PHP is saved in
"requirements_failues" - "requirements" as
in plural, and with a typo. That doesn't make
sense. Let's use "requirement_failures"
everywhere.

Signed-off-by: Thomas Hochstein <thh@inter.net>
2019-08-11 02:18:09 +02:00
35cd41d4ef Wording change for plugin version display.
"Version" should be at the start of a
sentence or line.

Signed-off-by: Thomas Hochstein <thh@inter.net>
2019-08-11 01:50:28 +02:00
8ff2ac0ae7 Wording changes for plugin version display.
"Version" should be capitalized in German -
and anywhere at the start of a sentence or
line.

Furthermore, "UPGRADE_TO_VERSION" is not
the current version ("aktuelle version"),
but the version one could upgrade to.

Signed-off-by: Thomas Hochstein <thh@inter.net>
2019-08-11 01:00:50 +02:00
f3482e1bf3 ML delete file: add "?" to conformation question.
Signed-off-by: Thomas Hochstein <thh@inter.net>
2019-08-11 00:43:18 +02:00
f2e6fb772f Merge pull request #619 from th-h/thh-spartacus-fix-cache
[event_spartacus] Don't cache wrong plugin list.
2019-08-10 23:40:40 +02:00