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> /// </summary>
/// <value>The information</value> /// <value>The information</value>
public ComponentInformation Information { 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; continue;
} }
string key = configEntry[0].Trim().ToLower(); string key = configEntry[0].Trim().ToLowerInvariant();
string value = configEntry[1].Trim(); string value = configEntry[1].Trim();
switch(key) { 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 // You can specify all the values or you can default the Revision and Build Numbers
// by using the '*' as shown below: // by using the '*' as shown below:
[assembly: AssemblyVersion("3.0.2.517")] [assembly: AssemblyVersion("3.0.2.518")]
[assembly: AssemblyFileVersion("3.0.2.517")] [assembly: AssemblyFileVersion("3.0.2.518")]

View file

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

View file

@ -787,7 +787,7 @@ namespace ScrewTurn.Wiki {
btnCancelTemplate_Click(sender, e); btnCancelTemplate_Click(sender, e);
// If there's a category matching the selected template name, select it automatically // If there's a category matching the selected template name, select it automatically
for (int i = 0; i < lstCategories.Items.Count; i++) { 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; lstCategories.Items[i].Selected = true;
} }
} }

View file

@ -96,7 +96,7 @@ namespace ScrewTurn.Wiki {
string mime = ""; string mime = "";
try { try {
string ext = Path.GetExtension(filename); 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); mime = GetMimeType(ext);
} }
catch { catch {

View file

@ -83,11 +83,11 @@ namespace ScrewTurn.Wiki {
string temp = Request["Feature"]; string temp = Request["Feature"];
string feature = "", parms = ""; string feature = "", parms = "";
if(temp.Contains("$")) { if(temp.Contains("$")) {
feature = temp.Substring(0, temp.IndexOf("$")).ToLower(); feature = temp.Substring(0, temp.IndexOf("$")).ToLowerInvariant();
parms = temp.Substring(temp.IndexOf("$") + 1); parms = temp.Substring(temp.IndexOf("$") + 1);
} }
else { else {
feature = temp.ToLower(); feature = temp.ToLowerInvariant();
} }
switch(feature) { switch(feature) {
@ -290,7 +290,7 @@ namespace ScrewTurn.Wiki {
} }
private bool IsImage(string name) { 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"; 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 temp = Request["Feature"];
string feature = "", parms = ""; string feature = "", parms = "";
if(temp.Contains("$")) { if(temp.Contains("$")) {
feature = temp.Substring(0, temp.IndexOf("$")).ToLower(); feature = temp.Substring(0, temp.IndexOf("$")).ToLowerInvariant();
parms = temp.Substring(temp.IndexOf("$") + 1); parms = temp.Substring(temp.IndexOf("$") + 1);
} }
else { else {
feature = temp.ToLower(); feature = temp.ToLowerInvariant();
} }
switch(feature) { switch(feature) {
@ -289,7 +289,7 @@ namespace ScrewTurn.Wiki {
} }
private bool IsImage(string name) { 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"; 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"]; string size = Request["Size"];
if(string.IsNullOrEmpty(size)) size = "small"; if(string.IsNullOrEmpty(size)) size = "small";
size = size.ToLower(); size = size.ToLowerInvariant();
// Verify permissions // Verify permissions
bool canDownload = false; bool canDownload = false;