cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From purplecabb...@apache.org
Subject git commit: [CB-3177][CB-3176] remove <plugin> support per deprecation policy.
Date Fri, 19 Jul 2013 04:37:50 GMT
Updated Branches:
  refs/heads/3.0.x 5b75f2eed -> f05710dc6


[CB-3177][CB-3176] remove <plugin> support per deprecation policy.


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

Branch: refs/heads/3.0.x
Commit: f05710dc6ac03793bfab974a9e9482f6bb7457ff
Parents: 5b75f2e
Author: Jesse MacFadyen <purplecabbage@gmail.com>
Authored: Fri Jul 19 00:33:11 2013 -0400
Committer: Jesse MacFadyen <purplecabbage@gmail.com>
Committed: Fri Jul 19 00:35:26 2013 -0400

----------------------------------------------------------------------
 wp7/template/cordovalib/ConfigHandler.cs | 35 +++++++++------------------
 wp8/template/cordovalib/ConfigHandler.cs | 27 ++-------------------
 2 files changed, 14 insertions(+), 48 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-wp8/blob/f05710dc/wp7/template/cordovalib/ConfigHandler.cs
----------------------------------------------------------------------
diff --git a/wp7/template/cordovalib/ConfigHandler.cs b/wp7/template/cordovalib/ConfigHandler.cs
index 31934c1..0342930 100644
--- a/wp7/template/cordovalib/ConfigHandler.cs
+++ b/wp7/template/cordovalib/ConfigHandler.cs
@@ -162,6 +162,18 @@ namespace WPCordovaClassLib.CordovaLib
             return false;
         }
 
+        public string[] AutoloadPlugins
+        {
+            get
+            {
+                // TODO:
+                var res = from results in AllowedPlugins.TakeWhile(p => p.Value.isAutoLoad)
+                          select results.Value.Name;
+
+                return new string[] { "", "" };
+            }
+        }
+
         public bool IsPluginAllowed(string key)
         {
             return AllowAllPlugins || AllowedPlugins.Keys.Contains(key);
@@ -169,31 +181,8 @@ namespace WPCordovaClassLib.CordovaLib
 
         private void LoadPluginFeatures(XDocument document)
         {
-            var plugins = from results in document.Descendants("plugin")
-                          select new
-                          {
-                              name = (string)results.Attribute("name"),
-                              autoLoad = results.Attribute("onload")
-                          };
-
-            foreach (var plugin in plugins)
-            {
-                Debug.WriteLine("Warning: Deprecated use of <plugin> by plugin : "
+ plugin.name);
-                PluginConfig pConfig = new PluginConfig(plugin.name, plugin.autoLoad != null
&& plugin.autoLoad.Value == "true");
-                if (pConfig.Name == "*")
-                {
-                    AllowAllPlugins = true;
-                    // break; wait, don't, some still could be autoload
-                }
-                else
-                {
-                    AllowedPlugins[pConfig.Name] = pConfig;
-                }
-            }
-
             var features = document.Descendants("feature");
 
-
             foreach (var feature in features)
             {
                 var name = feature.Attribute("name");

http://git-wip-us.apache.org/repos/asf/cordova-wp8/blob/f05710dc/wp8/template/cordovalib/ConfigHandler.cs
----------------------------------------------------------------------
diff --git a/wp8/template/cordovalib/ConfigHandler.cs b/wp8/template/cordovalib/ConfigHandler.cs
index de57471..5c81797 100644
--- a/wp8/template/cordovalib/ConfigHandler.cs
+++ b/wp8/template/cordovalib/ConfigHandler.cs
@@ -85,7 +85,7 @@ namespace WPCordovaClassLib.CordovaLib
                 }
                 //  "^https?://"
                 hostMatchingRegex = uri.Scheme + "://" + hostName + uri.PathAndQuery;
-                Debug.WriteLine("Adding regex :: " + hostMatchingRegex);
+                //Debug.WriteLine("Adding regex :: " + hostMatchingRegex);
                 AllowedDomains.Add(hostMatchingRegex);
 
             }
@@ -164,36 +164,13 @@ namespace WPCordovaClassLib.CordovaLib
                 var res = from results in AllowedPlugins.TakeWhile(p => p.Value.isAutoLoad)
                           select results.Value.Name;
 
-                return new string[] { "", "asd" };
+                return new string[] { "", "" };
             }
         }
 
         private void LoadPluginFeatures(XDocument document)
         {
-            var plugins = from results in document.Descendants("plugin")
-                          select new
-                          {
-                              name = (string)results.Attribute("name"),
-                              autoLoad = results.Attribute("onload")
-                          };
-
-            foreach (var plugin in plugins)
-            {
-                Debug.WriteLine("Warning: Deprecated use of <plugin> by plugin : "
+ plugin.name);
-                PluginConfig pConfig = new PluginConfig(plugin.name, plugin.autoLoad != null
&& plugin.autoLoad.Value == "true");
-                if (pConfig.Name == "*")
-                {
-                    AllowAllPlugins = true;
-                    // break; wait, don't, some still could be autoload
-                }
-                else
-                {
-                    AllowedPlugins[pConfig.Name] = pConfig;
-                }
-            }
-
             var features = document.Descendants("feature");
-    
 
             foreach (var feature in features)
             {


Mime
View raw message