add gallery3 downloadalbum module fix for php8
This commit is contained in:
parent
cabbfa077c
commit
42135d048e
1 changed files with 29 additions and 0 deletions
29
patches/gallery3-downloadalbum-php8-fix.patch
Normal file
29
patches/gallery3-downloadalbum-php8-fix.patch
Normal 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;
|
||||
}
|
Loading…
Add table
Reference in a new issue