* 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
This commit is contained in:
Garvin Hicking 2018-04-23 11:58:32 +02:00
parent 0bdae3b18c
commit 775b71134c
9 changed files with 32 additions and 6 deletions

View File

@ -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

View File

@ -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'];
}

View File

@ -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),

4
templates/2k11/legal.txt Normal file
View File

@ -0,0 +1,4 @@
TODO: (Provide information on used javascripts, possible cookie, where data is
transferred to)

View File

@ -0,0 +1,2 @@
If custom javascripts are inserted, make sure to mention them in your GDPR /
DSGVO legal notice

View File

@ -0,0 +1,2 @@
TODO: (Provide information on used javascripts, possible cookie, where data is
transferred to)

4
templates/next/legal.txt Normal file
View File

@ -0,0 +1,4 @@
TODO: (Provide information on used javascripts, possible cookie, where data is
transferred to)

View File

@ -0,0 +1,4 @@
TODO: (Provide information on used javascripts, possible cookie, where data is
transferred to)

View File

@ -0,0 +1,4 @@
TODO: (Provide information on used javascripts, possible cookie, where data is
transferred to)