You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by pu...@apache.org on 2013/07/19 06:34:03 UTC

git commit: [CB-3177][CB-3176] remove support per deprecation policy.

Updated Branches:
  refs/heads/master adc358142 -> bc6fcfb42


[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/bc6fcfb4
Tree: http://git-wip-us.apache.org/repos/asf/cordova-wp8/tree/bc6fcfb4
Diff: http://git-wip-us.apache.org/repos/asf/cordova-wp8/diff/bc6fcfb4

Branch: refs/heads/master
Commit: bc6fcfb427d364164cdc2cbaa38514fa25eb1d7d
Parents: adc3581
Author: Jesse MacFadyen <pu...@gmail.com>
Authored: Fri Jul 19 00:33:11 2013 -0400
Committer: Jesse MacFadyen <pu...@gmail.com>
Committed: Fri Jul 19 00:33:11 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/bc6fcfb4/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/bc6fcfb4/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)
             {