From 8a441137654b6a6e4bbaeb14c37a9cc787ff08fc Mon Sep 17 00:00:00 2001 From: rvelices Date: Sun, 28 Oct 2012 21:25:43 +0000 Subject: feature 2771: added backward compatibility with pre jquery ui 1.9 effect file naming (combine script id issues) git-svn-id: http://piwigo.org/svn/trunk@18775 68402e56-0260-453c-a942-63ccdbb3a9ee --- include/template.class.php | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'include/template.class.php') diff --git a/include/template.class.php b/include/template.class.php index cf823cb5a..d43f8a79a 100644 --- a/include/template.class.php +++ b/include/template.class.php @@ -598,6 +598,14 @@ class Template { default: $this->smarty->trigger_error("combine_script: invalid 'load' parameter", E_USER_ERROR); } } + + // TEMP in 2.5 for backward compatibility + if(!empty($params['require'])) + { + $params['require'] = str_replace('jquery.effects.', 'jquery.ui.effect-', $params['require'] ); + $params['require'] = str_replace('jquery.effects', 'jquery.ui.effect', $params['require'] ); + } + $this->scriptLoader->add( $params['id'], $load, empty($params['require']) ? array() : explode( ',', $params['require'] ), @$params['path'], @@ -680,6 +688,14 @@ var s,after = document.getElementsByTagName(\'script\')[document.getElementsByTa $content = trim($content); if ( !empty($content) ) { // second call + + // TEMP in 2.5 for backward compatibility + if(!empty($params['require'])) + { + $params['require'] = str_replace('jquery.effects.', 'jquery.ui.effect-', $params['require'] ); + $params['require'] = str_replace('jquery.effects', 'jquery.ui.effect', $params['require'] ); + } + $this->scriptLoader->add_inline( $content, empty($params['require']) ? array() : explode(',', $params['require']) -- cgit v1.2.3