summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: a3bb5b2)
raw | patch | inline | side by side (parent: a3bb5b2)
author | cajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Sat, 21 May 2005 09:50:42 +0000 (09:50 +0000) | ||
committer | cajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Sat, 21 May 2005 09:50:42 +0000 (09:50 +0000) |
include/class_password-methods.inc | patch | blob | history |
index 97157804e0f749f8ef3af84d1b0c3e92ca399780..f580eb75882b36879383f893e0e1c56efc38e0d5 100644 (file)
function get_available_methods()
{
$ret =false;
- $all = (get_declared_classes());
+ $all = get_declared_classes();
$i = 0;
foreach($all as $one) {
- if((strstr($one,"passwordmethod" ))&&($one != "passwordmethod")){
- $name = str_replace ("passwordmethod","",$one);
+ if(preg_match('/passwordMethod/i', $one) && !preg_match("/^passwordMethod$/i", $one)){
+ $name = preg_replace ("/passwordMethod/i", "", $one);
$test = new $one(false);
if($test->is_available()) {
- $ret['name'][$i]=str_replace ("passwordmethod","",$one);
+ $ret['name'][$i]= preg_replace ("/passwordMethod/i","",$one);
$ret['class'][$i]=$one;
- $ret[$i]['name']=str_replace ("passwordmethod","",$one);
- $ret[$i]['class']=$one;
- $ret[str_replace ("passwordmethod","",$one)]=$one;
+ $ret[$i]['name']= preg_replace("/passwordMethod/i","",$one);
+ $ret[$i]['class']= $one;
+ $ret[preg_replace ("/passwordMethod/i","",$one)]=$one;
$i++;
}
}