opencaching / opencaching-pl

The source code of Opencaching.PL (and some other domains)
https://opencaching.pl/
GNU General Public License v3.0
22 stars 33 forks source link

Log picture removal link generation error #2355

Open rapotek opened 2 years ago

rapotek commented 2 years ago

There is an error in https://github.com/opencaching/opencaching-pl/blob/6ebc32d52d3736331b72c2e6becd17a11f2a001d/getLogEntries.php#L308 resulting in the user who added a picture to his own log entry has no link to remove the picture.

This line should be f.ex.: if ($loggedUser && ( $pic_record['user_id'] == $loggedUser->getUserId() || $loggedUser->hasOcTeamRole())) {

BTW: In future, this page really needs refactoring and picture removal should be done through REST API just like log removal.