You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by fi...@apache.org on 2012/03/27 02:40:04 UTC

[1/2] git commit: tweaking deprecation drops

Updated Branches:
  refs/heads/master c10b80eaf -> f5d554dde


tweaking deprecation drops


Project: http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/commit/f5d554dd
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/tree/f5d554dd
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/diff/f5d554dd

Branch: refs/heads/master
Commit: f5d554ddeb576ccb40f5fec0a669eecccc3b8e67
Parents: 28e1f43
Author: Fil Maj <ma...@gmail.com>
Authored: Mon Mar 26 17:34:06 2012 -0700
Committer: Fil Maj <ma...@gmail.com>
Committed: Mon Mar 26 17:34:06 2012 -0700

----------------------------------------------------------------------
 lib/cordova.js |   20 ++++++++++----------
 1 files changed, 10 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/blob/f5d554dd/lib/cordova.js
----------------------------------------------------------------------
diff --git a/lib/cordova.js b/lib/cordova.js
index f3ede6d..30cae3e 100644
--- a/lib/cordova.js
+++ b/lib/cordova.js
@@ -194,9 +194,9 @@ var cordova = {
             }
         }
     },
-    
+    // TODO: remove in 2.0.
     addPlugin: function(name, obj) {
-        console.log("[DEPRECATION NOTICE] window.addPlugins and window.plugins will be removed in v1.7.");
+        console.log("[DEPRECATION NOTICE] window.addPlugin and window.plugins will be removed in version 2.0.");
         if (!window.plugins[name]) {
             window.plugins[name] = obj;
         }
@@ -218,28 +218,28 @@ var cordova = {
 
 /** 
  * Legacy variable for plugin support
- * TODO: remove in 1.7.
+ * TODO: remove in 2.0.
  */
 if (!window.PhoneGap) {
     window.PhoneGap = {};
     for (var i in cordova) {
         if (cordova.hasOwnProperty(i)) {
-            window.PhoneGap[i] = (function() {
-                return (typeof cordova[i] == 'function' ?
+            window.PhoneGap[i] = (function(prop) {
+                return (typeof prop == 'function' ?
                         function() {
-                            console.log("[DEPRECATION NOTICE] window.PhoneGap will be removed in v.1.7.");
-                            cordova[i].apply(cordova, arguments);
+                            console.log("[DEPRECATION NOTICE] window.PhoneGap will be removed in version 2.0.");
+                            prop.apply(cordova, arguments);
                         } : 
-                        cordova[i]
+                        prop
                        );
-            })();
+            })(cordova[i]);
         }
     }
 }
 
 /**
  * Plugins object
- * TODO: remove in 1.7.
+ * TODO: remove in 2.0.
  */
 if (!window.plugins) {
     window.plugins = {};