aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorrvelices <rv-github@modusoptimus.com>2012-10-28 21:25:43 +0000
committerrvelices <rv-github@modusoptimus.com>2012-10-28 21:25:43 +0000
commit8a441137654b6a6e4bbaeb14c37a9cc787ff08fc (patch)
tree3af0f247cca53c547ed19de5e5af0bc587638b7c /include
parentefc5ab1bc76c8932f9e24d0c26fa3a56b5a6852f (diff)
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
Diffstat (limited to 'include')
-rw-r--r--include/template.class.php16
1 files changed, 16 insertions, 0 deletions
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'])