From 2e075959c401c0ac76eb2ec2ac742c43d5df4483 Mon Sep 17 00:00:00 2001 From: Hylke Bons Date: Thu, 26 May 2011 01:44:10 +0100 Subject: [PATCH] repo base: use new config scheme to get the user name's and email --- SparkleLib/SparkleRepoBase.cs | 22 ++-------------------- 1 file changed, 2 insertions(+), 20 deletions(-) diff --git a/SparkleLib/SparkleRepoBase.cs b/SparkleLib/SparkleRepoBase.cs index c5def973..02d176fa 100644 --- a/SparkleLib/SparkleRepoBase.cs +++ b/SparkleLib/SparkleRepoBase.cs @@ -452,16 +452,7 @@ namespace SparkleLib { protected string UserName { get { - string global_config_file_path = Path.Combine (SparklePaths.SparkleConfigPath, "config.xml"); - - if (!File.Exists (global_config_file_path)) - return ""; - - XmlDocument xml = new XmlDocument(); - xml.Load (global_config_file_path); - - XmlNode node = xml.SelectSingleNode("//user/name/text()"); - return node.Value; + return SparkleConfig.DefaultConfig.UserName; } } @@ -469,16 +460,7 @@ namespace SparkleLib { protected string UserEmail { get { - string global_config_file_path = Path.Combine (SparklePaths.SparkleConfigPath, "config.xml"); - - if (!File.Exists (global_config_file_path)) - return ""; - - XmlDocument xml = new XmlDocument(); - xml.Load (global_config_file_path); - - XmlNode node = xml.SelectSingleNode("//user/email/text()"); - return node.Value; + return SparkleConfig.DefaultConfig.UserEmail; } }