Last active
October 12, 2018 07:50
-
-
Save Roang-zero1/af171e5e6576add9d2f8cdecf3e8cb00 to your computer and use it in GitHub Desktop.
Patch for Piwigo 2.9.4 to not watermark pictures tagged with public
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| diff -r piwigo/include/derivative.inc.php current/include/derivative.inc.php | |
| 313c313 | |
| < if (!$params->will_watermark($src->get_size()) && !$src->rotation) | |
| --- | |
| > if ($params->will_watermark($src->get_size()) && !$src->rotation) | |
| diff -r piwigo/i.php current/i.php | |
| 468a469 | |
| > $page['image_id'] = $row['id']; | |
| 502a504,512 | |
| > } | |
| > | |
| > $query = 'SELECT t.*, count(*) AS counter | |
| > FROM image_tag | |
| > INNER JOIN tags t ON tag_id = id | |
| > WHERE image_id = '.$page['image_id'].' and t.name = "public" | |
| > GROUP BY image_id'; | |
| > if ($row=pwg_db_fetch_assoc(pwg_query($query))){ | |
| > $params->use_watermark = false; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment