Announcement

  •  » Extensions
  •  » User Delete Photo release 13 incompatibility

#1 2022-10-14 00:55:19

Cadencia
Member
Auckland, New Zealand
2013-10-12
20

User Delete Photo release 13 incompatibility

Hello/Hi/Greetings,

I described the error here https://piwigo.org/forum/viewtopic.php? … 20#p184520 which may have been the wrong forum.

The "user delete photo" plugin works for the user who actually uploaded a photo, but for all other users, displaying the image fails with a message like:

Warning: Undefined array key "UDFA" in /home/monday.hsb.co.nz/public_html/piwigo/_data/templates_c/ljbwkp_q0hi0x^63cdd10f3ce7051a6058f11a0cea7b32946d996c_0.file.picture.tpl.php on line 287

The actual line number varies according to where in the panel the user delete photo should appear.  Line 287 is "before dimensions"

The solution - well the workaround - is to change the code in /plugins/user_delete_photo/initpicture.php lines 74 to 80 from

if (($udp == $user['username']))
{
$template->assign(
array    (
'UDFA' => 'udp',
));
}

to

if (($udp == $user['username']))
{
$template->assign(
array    (
'UDFA' => 'udp',
));
} else {
$template->assign(
array    (
'UDFA' => false,
));
}


Piwigo 13.0.0
Originally installed on 26 November 2014, 7 years 10 months 2 weeks 4 days ago
Operating system: Linux
PHP: 8.1.2
MySQL: 8.0.30-0ubuntu0.22.04.1 [2022-10-14 11:51:41]
Graphics Library: ImageMagick 6.9.11-60

Offline

 

#2 2022-10-14 06:25:02

ddtddt
Piwigo Team
Quetigny - France
2007-07-27
7201

Re: User Delete Photo release 13 incompatibility

Hi :-)

Thanks

I must watch


You love Piwigo so don't hesitate to participate, learn more on the "Contribute to Piwigo" page. If you don't have much time for contribution, you can also help the project with a donation.

Online

 
  •  » Extensions
  •  » User Delete Photo release 13 incompatibility

Board footer

Powered by FluxBB

github twitter newsletter Donate Piwigo.org © 2002-2024 · Contact