summaryrefslogtreecommitdiff
path: root/program/js/common.js
diff options
context:
space:
mode:
authoralecpl <alec@alec.pl>2010-03-17 13:48:23 +0000
committeralecpl <alec@alec.pl>2010-03-17 13:48:23 +0000
commit81ab85e5ab9377fd805a91a78388ad9775366a34 (patch)
tree9261498ff0d54dafd8cee82e0c80ca923845464c /program/js/common.js
parent71e7545f946a6dd5a3052cd659e51dc4be3fecbc (diff)
- use jQuery.inArray() instead of rcube_in_array()
Diffstat (limited to 'program/js/common.js')
-rw-r--r--program/js/common.js21
1 files changed, 0 insertions, 21 deletions
diff --git a/program/js/common.js b/program/js/common.js
index 829da8ae8..10d0c258d 100644
--- a/program/js/common.js
+++ b/program/js/common.js
@@ -469,27 +469,6 @@ function rcube_check_email(input, inline)
}
-// find a value in a specific array and returns the index
-function find_in_array()
- {
- var args = find_in_array.arguments;
- if(!args.length) return -1;
-
- var haystack = typeof(args[0])=='object' ? args[0] : args.length>1 && typeof(args[1])=='object' ? args[1] : new Array();
- var needle = typeof(args[0])!='object' ? args[0] : args.length>1 && typeof(args[1])!='object' ? args[1] : '';
- var nocase = args.length==3 ? args[2] : false;
-
- if(!haystack.length) return -1;
-
- for(var i=0; i<haystack.length; i++)
- if(nocase && haystack[i].toLowerCase()==needle.toLowerCase())
- return i;
- else if(haystack[i]==needle)
- return i;
-
- return -1;
- }
-
// recursively copy an object
function rcube_clone_object(obj)
{