add gallery3 downloadalbum module fix for php8

This commit is contained in:
notfire 2025-03-09 21:12:54 -04:00
parent cabbfa077c
commit 42135d048e
Signed by: notfire
GPG key ID: 3AFDACAAB4E56B16

View file

@ -0,0 +1,29 @@
# for use with https://github.com/gallery/gallery3-contrib
diff --git a/3.0/modules/downloadalbum/controllers/downloadalbum.php b/3.0/modules/downloadalbum/controllers/downloadalbum.php
index fd70c9e3..dde7db7c 100644
--- a/3.0/modules/downloadalbum/controllers/downloadalbum.php
+++ b/3.0/modules/downloadalbum/controllers/downloadalbum.php
@@ -220,7 +220,7 @@ class downloadalbum_Controller extends Controller {
ob_end_clean();
}
// Clear any output
- Event::add('system.display', create_function('', 'Kohana::$output = "";'));
+ //Event::add('system.display', create_function('', 'Kohana::$output = "";'));
}
/**
@@ -292,10 +292,10 @@ class downloadalbum_Controller extends Controller {
private function fixBug45028($hash) {
$output = $hash;
- if( version_compare(PHP_VERSION, '5.2.7', '<') ) {
- $str = str_pad(dechex($hash), 8, '0', STR_PAD_LEFT);
- $output = hexdec($str{6}.$str{7}.$str{4}.$str{5}.$str{2}.$str{3}.$str{0}.$str{1});
- }
+ //if( version_compare(PHP_VERSION, '5.2.7', '<') ) {
+ // $str = str_pad(dechex($hash), 8, '0', STR_PAD_LEFT);
+ // $output = hexdec($str{6}.$str{7}.$str{4}.$str{5}.$str{2}.$str{3}.$str{0}.$str{1});
+ //}
return $output;
}