[CB-3177][CB-3176] remove <plugin> support per deprecation policy.
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 @@
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 @@
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");
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 @@
}
// "^https?://"
hostMatchingRegex = uri.Scheme + "://" + hostName + uri.PathAndQuery;
- Debug.WriteLine("Adding regex :: " + hostMatchingRegex);
+ //Debug.WriteLine("Adding regex :: " + hostMatchingRegex);
AllowedDomains.Add(hostMatchingRegex);
}
@@ -164,36 +164,13 @@
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)
{