related to #1693 php8.1 compat for comments in gallery and album edit in admin

This commit is contained in:
Matthieu Leproux 2022-07-26 14:30:39 +02:00 committed by plegall
parent 8ec890bdb7
commit 1e85985a0c
4 changed files with 5 additions and 4 deletions

View file

@ -203,7 +203,7 @@ $sort_fields = array(
$template->assign('image_order_options', $sort_fields); $template->assign('image_order_options', $sort_fields);
$image_order = explode(',', $category['image_order']); $image_order = explode(',', isset($category['image_order']) ? $category['image_order'] : "");
for ($i=0; $i<3; $i++) // 3 fields for ($i=0; $i<3; $i++) // 3 fields
{ {

View file

@ -104,7 +104,7 @@ span.errors {
<p> <p>
<strong>{'Complementary mail content'|@translate}</strong> <strong>{'Complementary mail content'|@translate}</strong>
<br> <br>
<textarea cols="50" rows="5" name="mail_content" id="mail_content" class="description">{$MAIL_CONTENT}</textarea> <textarea cols="50" rows="5" name="mail_content" id="mail_content" class="description">{if isset($MAIL_CONTENT)}{$MAIL_CONTENT}{/if}</textarea>
</p> </p>
{if isset($auth_key_duration)} {if isset($auth_key_duration)}

View file

@ -285,8 +285,8 @@ $template->set_filenames(array('comments'=>'comments.tpl', 'comment_list'=>'comm
$template->assign( $template->assign(
array( array(
'F_ACTION'=>PHPWG_ROOT_PATH.'comments.php', 'F_ACTION'=>PHPWG_ROOT_PATH.'comments.php',
'F_KEYWORD'=> htmlspecialchars(stripslashes(@$_GET['keyword'])), 'F_KEYWORD'=> isset($_GET['keyword']) ? htmlspecialchars(stripslashes($_GET['keyword'])) : "",
'F_AUTHOR'=> htmlspecialchars(stripslashes(@$_GET['author'])), 'F_AUTHOR'=> isset($_GET['author']) ? htmlspecialchars(stripslashes($_GET['author'])) : "",
) )
); );

View file

@ -532,6 +532,7 @@ function set_status_header($code, $text='')
*/ */
function render_category_literal_description($desc) function render_category_literal_description($desc)
{ {
!isset($desc) ? $desc = "" : false;
return strip_tags($desc, '<span><p><a><br><b><i><small><big><strong><em>'); return strip_tags($desc, '<span><p><a><br><b><i><small><big><strong><em>');
} }