From 775b71134ce2acd5f518065b035e629b1b19a9fe Mon Sep 17 00:00:00 2001 From: Garvin Hicking Date: Mon, 23 Apr 2018 11:58:32 +0200 Subject: [PATCH] * 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 --- docs/NEWS | 4 ++++ include/functions_entries.inc.php | 13 ++++++++----- include/functions_smarty.inc.php | 1 - templates/2k11/legal.txt | 4 ++++ templates/bulletproof/legal.txt | 2 ++ templates/clean-blog/legal.txt | 2 ++ templates/next/legal.txt | 4 ++++ templates/skeleton/legal.txt | 4 ++++ templates/timeline/legal.txt | 4 ++++ 9 files changed, 32 insertions(+), 6 deletions(-) create mode 100644 templates/2k11/legal.txt create mode 100644 templates/bulletproof/legal.txt create mode 100644 templates/clean-blog/legal.txt create mode 100644 templates/next/legal.txt create mode 100644 templates/skeleton/legal.txt create mode 100644 templates/timeline/legal.txt diff --git a/docs/NEWS b/docs/NEWS index 40f44e9d..01329dd4 100644 --- a/docs/NEWS +++ b/docs/NEWS @@ -1,6 +1,10 @@ Version 2.x.x (major) () ------------------------------------------------------------------------ + * 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 + * Add backend_view_entry hook, that is executed for every entry in the backend entry list diff --git a/include/functions_entries.inc.php b/include/functions_entries.inc.php index 40caf71a..9f0d1b5f 100644 --- a/include/functions_entries.inc.php +++ b/include/functions_entries.inc.php @@ -1239,11 +1239,14 @@ function serendipity_printEntries($entries, $extended = 0, $preview = false, $sm 'is_comment_moderate' => (isset($serendipity['GET']['csuccess']) && $serendipity['GET']['csuccess'] == 'moderate' ? true: false) ); - if ($serendipity['serendipityAuthedUser'] === true && !isset($serendipity['POST']['preview'])) { - $userData = array(); - $userData['name'] = $serendipity['realname']; - $userData['email'] = $serendipity['email']; - $userData['url'] = ''; + if ($serendipity['serendipityAuthedUser'] === true && !isset($serendipity['POST']['preview'])) { + $userData = $serendipity['POST']; + if (empty($userData['name'])) { + $userData['name'] = $serendipity['serendipityRealname']; + } + if (empty($userData['email'])) { + $userData['email'] = $serendipity['email']; + } } else { $userData = $serendipity['POST']; } diff --git a/include/functions_smarty.inc.php b/include/functions_smarty.inc.php index d1052aa2..e2df3f8a 100644 --- a/include/functions_smarty.inc.php +++ b/include/functions_smarty.inc.php @@ -425,7 +425,6 @@ function serendipity_smarty_showCommentForm($params, &$smarty) { $params['moderate_comments'] = serendipity_db_bool($params['entry']['moderate_comments']); } - $comment_add_data = array( 'comments_messagestack' => (isset($serendipity['messagestack']['comments']) ? (array)$serendipity['messagestack']['comments'] : array()), 'is_comment_added' => (isset($serendipity['GET']['csuccess']) && $serendipity['GET']['csuccess'] == 'true' ? true: false), diff --git a/templates/2k11/legal.txt b/templates/2k11/legal.txt new file mode 100644 index 00000000..777eba0f --- /dev/null +++ b/templates/2k11/legal.txt @@ -0,0 +1,4 @@ +TODO: (Provide information on used javascripts, possible cookie, where data is +transferred to) + + diff --git a/templates/bulletproof/legal.txt b/templates/bulletproof/legal.txt new file mode 100644 index 00000000..790034a9 --- /dev/null +++ b/templates/bulletproof/legal.txt @@ -0,0 +1,2 @@ +If custom javascripts are inserted, make sure to mention them in your GDPR / +DSGVO legal notice \ No newline at end of file diff --git a/templates/clean-blog/legal.txt b/templates/clean-blog/legal.txt new file mode 100644 index 00000000..762936ea --- /dev/null +++ b/templates/clean-blog/legal.txt @@ -0,0 +1,2 @@ +TODO: (Provide information on used javascripts, possible cookie, where data is +transferred to) \ No newline at end of file diff --git a/templates/next/legal.txt b/templates/next/legal.txt new file mode 100644 index 00000000..777eba0f --- /dev/null +++ b/templates/next/legal.txt @@ -0,0 +1,4 @@ +TODO: (Provide information on used javascripts, possible cookie, where data is +transferred to) + + diff --git a/templates/skeleton/legal.txt b/templates/skeleton/legal.txt new file mode 100644 index 00000000..777eba0f --- /dev/null +++ b/templates/skeleton/legal.txt @@ -0,0 +1,4 @@ +TODO: (Provide information on used javascripts, possible cookie, where data is +transferred to) + + diff --git a/templates/timeline/legal.txt b/templates/timeline/legal.txt new file mode 100644 index 00000000..777eba0f --- /dev/null +++ b/templates/timeline/legal.txt @@ -0,0 +1,4 @@ +TODO: (Provide information on used javascripts, possible cookie, where data is +transferred to) + +