]> source.dussan.org Git - nextcloud-server.git/commitdiff
Revert "adding new javascript function OC.generateUrl(url, params)"
authorMorris Jobke <morris.jobke@gmail.com>
Thu, 6 Mar 2014 14:10:32 +0000 (15:10 +0100)
committerMorris Jobke <morris.jobke@gmail.com>
Thu, 6 Mar 2014 14:10:32 +0000 (15:10 +0100)
This reverts commit 8e667d1934d6bd9b4344ac624fdd2846c89abb0a.

core/js/js.js

index 279a5390a88330f2c36b627e8ba9b2f517fa5e45..77aadd23e03f59bd82da9e16fea5b400d8cd80a0 100644 (file)
@@ -175,30 +175,6 @@ var OC={
        appswebroots:(typeof oc_appswebroots !== 'undefined') ? oc_appswebroots:false,
        currentUser:(typeof oc_current_user!=='undefined')?oc_current_user:false,
        coreApps:['', 'admin','log','search','settings','core','3rdparty'],
-
-       /**
-        * Generates the absolute url for the given relative url, which can contain parameters.
-        *
-        * @returns {string}
-        * @param {string} url
-        * @param params
-        */
-       generateUrl: function(url, params) {
-               var _build = function (text, vars) {
-                       return text.replace(/{([^{}]*)}/g,
-                               function (a, b) {
-                                       var r = vars[b];
-                                       return typeof r === 'string' || typeof r === 'number' ? r : a;
-                               }
-                       );
-               };
-               if (url.charAt(0) !== '/') {
-                       url = '/' + url;
-
-               }
-               return OC.webroot + '/index.php' + _build(url, params);
-       },
-
        /**
         * get an absolute url to a file in an appen
         * @param app the id of the app the file belongs to