diff options
-rw-r--r-- | core/js/oc-backbone.js | 12 | ||||
-rw-r--r-- | lib/private/util.php | 5 |
2 files changed, 17 insertions, 0 deletions
diff --git a/core/js/oc-backbone.js b/core/js/oc-backbone.js new file mode 100644 index 00000000000..75a40979340 --- /dev/null +++ b/core/js/oc-backbone.js @@ -0,0 +1,12 @@ +/* + * Copyright (c) 2015 + * + * This file is licensed under the Affero General Public License version 3 + * or later. + * + * See the COPYING-README file. + * + */ +if(!_.isUndefined(Backbone)) { + OC.Backbone = Backbone.noConflict(); +} diff --git a/lib/private/util.php b/lib/private/util.php index 1b22e03ca6f..fd11080a592 100644 --- a/lib/private/util.php +++ b/lib/private/util.php @@ -455,6 +455,11 @@ class OC_Util { $path = OC_Util::generatePath($application, 'vendor', $file); if (!in_array($path, self::$scripts)) { self::$scripts[] = $path; + if($file === 'backbone/backbone') { + // makes backbone available as OC.Backbone in order to avoid + // conflicts, because apps (like Mail) may bring own versions + OC_Util::addScript('oc-backbone'); + } } } |