Fixed and closed #519 : changed all occurrences of ToLower() into ToLowerInvariant().

This commit is contained in:
Matteo Tomasini 2010-03-26 09:42:44 +00:00
parent 072ee52d8f
commit 5f05cecc20
8 changed files with 15 additions and 15 deletions

View file

@ -743,7 +743,7 @@ namespace ScrewTurn.Wiki.Plugins.ActiveDirectory {
/// </summary>
/// <value>The information</value>
public ComponentInformation Information {
get { return new ComponentInformation("Active Directory Provider", "Threeplicate Srl", "3.0.2.509", "http://www.screwturn.eu", "http://www.screwturn.eu/Version/ADProv/ADProv.txt"); }
get { return new ComponentInformation("Active Directory Provider", "Threeplicate Srl", "3.0.2.518", "http://www.screwturn.eu", "http://www.screwturn.eu/Version/ADProv/ADProv.txt"); }
}
@ -861,7 +861,7 @@ namespace ScrewTurn.Wiki.Plugins.ActiveDirectory {
continue;
}
string key = configEntry[0].Trim().ToLower();
string key = configEntry[0].Trim().ToLowerInvariant();
string value = configEntry[1].Trim();
switch(key) {

View file

@ -16,5 +16,5 @@ using System.Reflection;
//
// You can specify all the values or you can default the Revision and Build Numbers
// by using the '*' as shown below:
[assembly: AssemblyVersion("3.0.2.517")]
[assembly: AssemblyFileVersion("3.0.2.517")]
[assembly: AssemblyVersion("3.0.2.518")]
[assembly: AssemblyFileVersion("3.0.2.518")]

View file

@ -604,8 +604,8 @@ namespace ScrewTurn.Wiki {
string virtualDirectory = HttpContext.Current.Request.ApplicationPath;
// We need to convert the case of the virtual directory to that used in the url
// Return the virtual directory as is if we can't find it in the URL
if (requestUrl.ToLower().Contains(virtualDirectory.ToLower())) {
return requestUrl.Substring(requestUrl.ToLower().IndexOf(virtualDirectory.ToLower()),virtualDirectory.Length);
if(requestUrl.ToLowerInvariant().Contains(virtualDirectory.ToLowerInvariant())) {
return requestUrl.Substring(requestUrl.ToLowerInvariant().IndexOf(virtualDirectory.ToLowerInvariant()), virtualDirectory.Length);
}
return virtualDirectory;
}

View file

@ -787,7 +787,7 @@ namespace ScrewTurn.Wiki {
btnCancelTemplate_Click(sender, e);
// If there's a category matching the selected template name, select it automatically
for (int i = 0; i < lstCategories.Items.Count; i++) {
if (lstCategories.Items[i].Value.ToLower().Trim() == lstTemplates.SelectedValue.ToLower().Trim()) {
if(lstCategories.Items[i].Value.ToLowerInvariant().Trim() == lstTemplates.SelectedValue.ToLowerInvariant().Trim()) {
lstCategories.Items[i].Selected = true;
}
}

View file

@ -96,7 +96,7 @@ namespace ScrewTurn.Wiki {
string mime = "";
try {
string ext = Path.GetExtension(filename);
if(ext.StartsWith(".")) ext = ext.Substring(1).ToLower(); // Remove trailing dot
if(ext.StartsWith(".")) ext = ext.Substring(1).ToLowerInvariant(); // Remove trailing dot
mime = GetMimeType(ext);
}
catch {

View file

@ -83,11 +83,11 @@ namespace ScrewTurn.Wiki {
string temp = Request["Feature"];
string feature = "", parms = "";
if(temp.Contains("$")) {
feature = temp.Substring(0, temp.IndexOf("$")).ToLower();
feature = temp.Substring(0, temp.IndexOf("$")).ToLowerInvariant();
parms = temp.Substring(temp.IndexOf("$") + 1);
}
else {
feature = temp.ToLower();
feature = temp.ToLowerInvariant();
}
switch(feature) {
@ -290,7 +290,7 @@ namespace ScrewTurn.Wiki {
}
private bool IsImage(string name) {
string ext = System.IO.Path.GetExtension(name.ToLower());
string ext = System.IO.Path.GetExtension(name.ToLowerInvariant());
return ext == ".jpg" || ext == ".jpeg" || ext == ".gif" || ext == ".png" || ext == ".tif" || ext == ".tiff";
}

View file

@ -84,11 +84,11 @@ namespace ScrewTurn.Wiki {
string temp = Request["Feature"];
string feature = "", parms = "";
if(temp.Contains("$")) {
feature = temp.Substring(0, temp.IndexOf("$")).ToLower();
feature = temp.Substring(0, temp.IndexOf("$")).ToLowerInvariant();
parms = temp.Substring(temp.IndexOf("$") + 1);
}
else {
feature = temp.ToLower();
feature = temp.ToLowerInvariant();
}
switch(feature) {
@ -289,7 +289,7 @@ namespace ScrewTurn.Wiki {
}
private bool IsImage(string name) {
string ext = System.IO.Path.GetExtension(name.ToLower());
string ext = System.IO.Path.GetExtension(name.ToLowerInvariant());
return ext == ".jpg" || ext == ".jpeg" || ext == ".gif" || ext == ".png" || ext == ".tif" || ext == ".tiff";
}

View file

@ -56,7 +56,7 @@ namespace ScrewTurn.Wiki {
string size = Request["Size"];
if(string.IsNullOrEmpty(size)) size = "small";
size = size.ToLower();
size = size.ToLowerInvariant();
// Verify permissions
bool canDownload = false;