Login

    Register

Managed Hosting

PROJECT CATEGORIES

 

Switchboard Framework
Project Home Forums Known Issues Contact Project

Switchboard Framework Issue: Function issue

Name: Function issue
ID: 1
Project: Switchboard Framework
Type: Bug
Area: Code
Severity: Low
Status: Fixed
Related URL:
Creator: Kanna Four
Created: 09/22/08 10:04 AM
Updated: 09/22/08 3:08 PM
Description: index.cfm has two listcontains function. So the framework fails if i created something like a file called "a.cfm" and try to access it via action=a.

They should be changed to listfindnocase.

Other than that, this is an Awesome framework! It finally got me off the spaghetti coding.
History: Created by kannafour (Kanna Four) : 09/22/08 10:04 AM

Comment by danielslaughter (Daniel Slaughter) : 09/22/08 3:06 PM
I've recognized the bug with listContains compared to listFind in the authentication section. I've made the change and updated the version to 0.9.3. Thank you!

The problem with doing a "noCase" function is I work on a server who has a case sensitive file structure. So a file named "HelloWorld.cfm" can reside in the same directory as "helloworld.cfm". I would suggest sticking with a naming convention of either camelCase, all lower, or all UPPER (but all upper would be kinda ugly). ;)

Updated by danielslaughter (Daniel Slaughter) : 09/22/08 3:07 PM

Comment by danielslaughter (Daniel Slaughter) : 09/22/08 3:08 PM
Here is a little sample of code if you want to see the discrepancies between the two method calls:

<cfSet myList = "orange,apple,apple,grape" />
<cfOutput>
   myList: #myList#<br />
   1. listFind(myList, "apple"): #listFind(myList, "apple")#<br />
   2. listFind(myList, "app"): #listFind(myList, "app")#<br />
   3. listFindNoCase(myList, "aPpLe"): #listFindNoCase(myList, "aPpLe")#<br />
   4. listFindNoCase(myList, "aPp"): #listFindNoCase(myList, "aPp")#<br />
   5. listContains(myList, "apple"): #listContains(myList, "apple")#<br />
   6. listContains(myList, "app"): #listContains(myList, "app")#<br />
   7. listContainsNoCase(myList, "aPpLe"): #listContainsNoCase(myList, "aPpLe")#<br />
   8. listContainsNoCase(myList, "aPp"): #listContainsNoCase(myList, "aPp")#
</cfOutput>

To add a comment to this bug, please login using the link above.